
    /* Prototype typography, surfaces and responsive layout, retained for the connected dashboard. */
    :root {
      --math-track: #e9ecef;
      --math-thumb: #6c757d;
    }

    :root {
      --bg: #f6f7fb;
      --surface: #ffffff;
      --surface-soft: #f8fafc;
      --surface-raised: #ffffff;
      --ink: #111827;
      --muted: #697386;
      --faint: #98a2b3;
      --line: #e3e7ee;
      --line-strong: #d4dae4;
      --blue: #2563eb;
      --blue-hover: #1d4ed8;
      --blue-soft: #edf4ff;
      --green: #078a5b;
      --green-soft: #eaf9f2;
      --amber: #a05a00;
      --amber-soft: #fff6e8;
      --red: #c43232;
      --red-soft: #fff0f0;
      --purple: #7252c7;
      --purple-soft: #f2effc;
      --shadow: 0 14px 40px rgba(31, 42, 68, .07);
      --shadow-float: 0 20px 60px rgba(31, 42, 68, .15);
      --radius: 18px;
      --sidebar: 250px;
    }

    html[data-theme="dark"] {
      --bg: #0e1117;
      --surface: #171b23;
      --surface-soft: #1d222c;
      --surface-raised: #202630;
      --ink: #eef2f7;
      --muted: #a7b0be;
      --faint: #7f8998;
      --line: #2c3441;
      --line-strong: #3a4453;
      --blue: #7ca0ff;
      --blue-hover: #97b4ff;
      --blue-soft: #1c2a48;
      --green: #67d9a7;
      --green-soft: #173429;
      --amber: #f1b86d;
      --amber-soft: #3a2a16;
      --red: #ff8b88;
      --red-soft: #3d2225;
      --purple: #c3a8ff;
      --purple-soft: #2f2745;
      --shadow: 0 14px 40px rgba(0, 0, 0, .22);
      --shadow-float: 0 22px 66px rgba(0, 0, 0, .48);
      --math-track: #2b3035;
      --math-thumb: #adb5bd;
    }

    @media (prefers-color-scheme: dark) {
      html[data-theme="system"] {
        --math-track: #2b3035;
        --math-thumb: #adb5bd;
        --bg: #0e1117;
        --surface: #171b23;
        --surface-soft: #1d222c;
        --surface-raised: #202630;
        --ink: #eef2f7;
        --muted: #a7b0be;
        --faint: #7f8998;
        --line: #2c3441;
        --line-strong: #3a4453;
        --blue: #7ca0ff;
        --blue-hover: #97b4ff;
        --blue-soft: #1c2a48;
        --green: #67d9a7;
        --green-soft: #173429;
        --amber: #f1b86d;
        --amber-soft: #3a2a16;
        --red: #ff8b88;
        --red-soft: #3d2225;
        --purple: #c3a8ff;
        --purple-soft: #2f2745;
        --shadow: 0 14px 40px rgba(0, 0, 0, .22);
        --shadow-float: 0 22px 66px rgba(0, 0, 0, .48);
      }
    }

    * {
      box-sizing: border-box;
    }

    html {
      scroll-behavior: smooth;
    }

    body {
      margin: 0;
      background: var(--bg);
      color: var(--ink);
      font: 15px/1.5 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      letter-spacing: -.005em;
      min-width: 320px;
    }

    button,
    select,
    input {
      font: inherit;
    }

    button,
    a {
      -webkit-tap-highlight-color: transparent;
    }

    button {
      color: inherit;
    }

    :focus-visible {
      outline: 3px solid var(--blue);
      outline: 3px solid color-mix(in srgb, var(--blue) 32%, transparent);
      outline-offset: 2px;
    }

    .icon {
      width: 19px;
      height: 19px;
      flex: 0 0 auto;
      stroke: currentColor;
      fill: none;
      stroke-width: 1.8;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .app {
      min-height: 100vh;
    }

    .sidebar {
      position: fixed;
      inset: 0 auto 0 0;
      z-index: 20;
      width: var(--sidebar);
      padding: 24px 16px 18px;
      display: flex;
      flex-direction: column;
      background: var(--surface);
      background: color-mix(in srgb, var(--surface) 92%, transparent);
      border-right: 1px solid var(--line);
      -webkit-backdrop-filter: blur(18px);
      backdrop-filter: blur(18px);
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 11px;
      min-height: 42px;
      padding: 0 10px;
      margin-bottom: 24px;
      font-weight: 840;
      letter-spacing: -.04em;
      font-size: 18px;
    }

    .brand-mark {
      display: grid;
      place-items: center;
      width: 31px;
      height: 31px;
      border-radius: 10px;
      color: #fff;
      background: var(--blue);
      box-shadow: 0 8px 20px color-mix(in srgb, var(--blue) 28%, transparent);
    }

    .brand-mark .icon {
      width: 17px;
      height: 17px;
      stroke-width: 2.4;
    }

    .nav-label {
      padding: 0 12px;
      margin: 20px 0 8px;
      color: var(--faint);
      font-size: 11px;
      font-weight: 760;
      letter-spacing: .11em;
      text-transform: uppercase;
    }

    .nav {
      display: grid;
      gap: 4px;
    }

    .nav-button {
      display: flex;
      align-items: center;
      gap: 12px;
      width: 100%;
      min-height: 43px;
      padding: 10px 12px;
      border: 0;
      border-radius: 12px;
      background: transparent;
      color: var(--muted);
      text-align: left;
      cursor: pointer;
      font-weight: 620;
      transition: background .18s, color .18s, transform .18s;
    }

    .nav-button:hover {
      color: var(--ink);
      background: var(--surface-soft);
    }

    .nav-button.active {
      color: var(--blue);
      background: var(--blue-soft);
    }

    .nav-button .count {
      margin-left: auto;
      min-width: 23px;
      padding: 1px 7px;
      border-radius: 999px;
      color: var(--blue);
      background: var(--blue-soft);
      background: color-mix(in srgb, var(--blue) 12%, transparent);
      font-size: 12px;
      text-align: center;
    }

    .sidebar-bottom {
      margin-top: auto;
      display: grid;
      gap: 4px;
      padding-top: 20px;
    }

    .sidebar-bottom .danger {
      color: var(--red);
    }

    .shell {
      margin-left: var(--sidebar);
      min-height: 100vh;
    }

    .topbar {
      position: sticky;
      top: 0;
      z-index: 15;
      min-height: 72px;
      padding: 13px clamp(20px, 4vw, 54px);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 20px;
      background: var(--bg);
      background: color-mix(in srgb, var(--bg) 84%, transparent);
      border-bottom: 1px solid var(--line);
      border-bottom: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
      -webkit-backdrop-filter: blur(16px);
      backdrop-filter: blur(16px);
    }

    .mobile-brand {
      display: none;
    }

    .topbar-nav {
      display: none;
    }

    .top-title {
      font-size: 14px;
      color: var(--muted);
    }

    .top-title strong {
      display: block;
      color: var(--ink);
      font-size: 17px;
      letter-spacing: -.02em;
    }

    .top-actions {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .theme-switch {
      display: flex;
      padding: 3px;
      border: 1px solid var(--line);
      border-radius: 11px;
      background: var(--surface);
    }

    .theme-switch button {
      width: 34px;
      height: 32px;
      display: grid;
      place-items: center;
      padding: 0;
      border: 0;
      border-radius: 8px;
      color: var(--muted);
      background: transparent;
      cursor: pointer;
    }

    .theme-switch button:hover {
      color: var(--ink);
    }

    .theme-switch button.active {
      color: var(--blue);
      background: var(--blue-soft);
    }

    .theme-switch .icon {
      width: 16px;
      height: 16px;
    }

    .avatar-button {
      width: 38px;
      height: 38px;
      display: grid;
      place-items: center;
      padding: 0;
      border: 1px solid var(--line);
      border-radius: 50%;
      color: #fff;
      background: linear-gradient(145deg, #4169df, #7355c7);
      font-weight: 780;
      cursor: pointer;
    }

    main {
      padding: 38px clamp(20px, 4vw, 54px) 72px;
      max-width: 1500px;
      margin: 0 auto;
    }

    .view {
      display: none;
      animation: enter .24s ease both;
    }

    .view.active {
      display: block;
    }

    @keyframes enter {
      from {
        opacity: 0;
        transform: translateY(5px);
      }
    }

    @media (prefers-reduced-motion: reduce) {

      *,
      *::before,
      *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
      }
    }

    .page-head {
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      gap: 24px;
      margin-bottom: 28px;
    }

    .eyebrow {
      margin-bottom: 7px;
      color: var(--blue);
      font-size: 12px;
      font-weight: 780;
      letter-spacing: .11em;
      text-transform: uppercase;
    }

    h1 {
      margin: 0;
      font-size: clamp(30px, 4vw, 45px);
      line-height: 1.08;
      letter-spacing: -.045em;
    }

    h1#page-title {
        font-size: calc(1.375rem + 1.5vw);
        font-family: "Crimson Pro",Georgia,"Times New Roman",serif;
        font-weight: 600;
    }

    h2 {
      margin: 0;
      font-size: 20px;
      letter-spacing: -.025em;
    }

    h3 {
      margin: 0;
      font-size: 16px;
      letter-spacing: -.015em;
    }

    .lede {
      max-width: 650px;
      margin: 9px 0 0;
      color: var(--muted);
      font-size: 16px;
    }

    .button {
      min-height: 42px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 9px;
      padding: 9px 15px;
      border: 1px solid var(--line-strong);
      border-radius: 11px;
      background: var(--surface);
      color: var(--ink);
      font-weight: 690;
      cursor: pointer;
      transition: transform .16s, border-color .16s, background .16s;
    }

    .button:hover {
      transform: translateY(-1px);
      border-color: var(--line);
      border-color: color-mix(in srgb, var(--blue) 45%, var(--line));
    }

    .button.primary {
      color: #fff;
      border-color: var(--blue);
      background: var(--blue);
      box-shadow: 0 8px 24px color-mix(in srgb, var(--blue) 22%, transparent);
    }

    .button.primary:hover {
      background: var(--blue-hover);
    }

    .button.danger {
      color: #fff;
      border-color: var(--red);
      background: var(--red);
    }

    .button.ghost {
      border-color: transparent;
      background: transparent;
      color: var(--muted);
    }

    .button:disabled,
    .button[aria-disabled="true"] {
      opacity: .55;
      cursor: not-allowed;
      transform: none;
    }

    .button.small {
      min-height: 35px;
      padding: 6px 11px;
      font-size: 13px;
      border-radius: 9px;
    }

    .metric-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 14px;
      margin-bottom: 28px;
    }

    .metric {
      position: relative;
      overflow: hidden;
      min-height: 140px;
      padding: 1em;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--surface);
      box-shadow: var(--shadow);
    }

    .metric:after {
      content: "";
      position: absolute;
      top: -28px;
      right: -20px;
      width: 90px;
      height: 90px;
      border-radius: 50%;
      background: var(--surface-soft);
      background: color-mix(in srgb, var(--metric-color, var(--blue)) 10%, transparent);
    }

    .metric-top {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 640;
    }

    .metric-icon {
      width: 35px;
      height: 35px;
      display: grid;
      place-items: center;
      border-radius: 11px;
      color: var(--metric-color, var(--blue));
      background: var(--surface-soft);
      background: color-mix(in srgb, var(--metric-color, var(--blue)) 11%, transparent);
    }

    .metric-number {
      margin-top: 19px;
      font-size: 31px;
      font-weight: 790;
      line-height: 1;
      letter-spacing: -.035em;
    }

    .metric-note {
      margin-top: 9px;
      color: var(--faint);
      font-size: 12px;
    }

    .metric-note strong {
      color: var(--green);
    }

    .dashboard-grid {
      display: grid;
      grid-template-columns: minmax(0, 1.45fr) minmax(290px, .72fr);
      gap: 20px;
    }

    .stack {
      display: grid;
      gap: 20px;
      align-content: start;
    }

    .panel {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--surface);
      box-shadow: var(--shadow);
      overflow: hidden;
    }

    .panel-head {
      min-height: 64px;
      padding: 16px 19px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 15px;
      border-bottom: 1px solid var(--line);
    }

    .panel-body {
      padding: 19px;
    }

    .text-link {
      border: 0;
      padding: 4px;
      color: var(--blue);
      background: transparent;
      font-weight: 690;
      cursor: pointer;
    }

    .task-list {
      display: grid;
      gap: 11px;
    }

    .task-card {
      display: grid;
      grid-template-columns: 45px minmax(0, 1fr) auto;
      gap: 13px;
      align-items: center;
      padding: 14px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: var(--surface-soft);
    }

    .doc-icon {
      width: 45px;
      height: 52px;
      position: relative;
      display: grid;
      place-items: center;
      border: 1px solid var(--line);
      border: 1px solid color-mix(in srgb, var(--blue) 25%, var(--line));
      border-radius: 9px;
      background: var(--surface);
      color: var(--blue);
    }

    .doc-icon:after {
      content: "PDF";
      position: absolute;
      bottom: 5px;
      font-size: 8px;
      font-weight: 850;
      letter-spacing: .09em;
    }

    .doc-icon .icon {
      transform: translateY(-4px);
      width: 17px;
    }

    .task-main {
      min-width: 0;
    }

    .task-title {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-weight: 700;
    }

    .task-meta {
      margin-top: 3px;
      color: var(--muted);
      font-size: 13px;
    }

    .due {
      color: var(--amber);
      font-weight: 680;
    }

    .activity {
      display: grid;
      gap: 17px;
    }

    .activity-row {
      display: grid;
      grid-template-columns: 27px 1fr;
      gap: 12px;
      align-items: start;
    }

    .activity-mark {
      position: relative;
      z-index: 1;
      width: 27px;
      height: 27px;
      display: grid;
      place-items: center;
      border-radius: 50%;
      color: var(--green);
      background: var(--green-soft);
    }

    .activity-mark:after {
      content: "";
      position: absolute;
      top: 27px;
      left: 13px;
      width: 1px;
      height: 32px;
      background: var(--line);
    }

    .activity-row:last-child .activity-mark:after {
      display: none;
    }

    .activity-copy {
      font-size: 14px;
    }

    .activity-copy span {
      color: var(--muted);
    }

    .activity-copy time {
      display: block;
      margin-top: 2px;
      color: var(--faint);
      font-size: 12px;
    }

    .identity-card {
      padding: 20px;
      border: 1px solid var(--line);
      border: 1px solid color-mix(in srgb, var(--green) 25%, var(--line));
      border-radius: var(--radius);
      background: linear-gradient(145deg, var(--surface), var(--green-soft));
      background: linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--green-soft) 65%, var(--surface)));
    }

    .identity-top {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .seal {
      width: 42px;
      height: 42px;
      display: grid;
      place-items: center;
      border-radius: 50%;
      color: var(--green);
      background: var(--green-soft);
      border: 1px solid var(--line);
      border: 1px solid color-mix(in srgb, var(--green) 30%, transparent);
    }

    .seal .icon {
      width: 22px;
      height: 22px;
      stroke-width: 2.2;
    }

    .identity-lines {
      display: grid;
      gap: 10px;
      margin-top: 18px;
    }

    .identity-line {
      display: flex;
      justify-content: space-between;
      gap: 14px;
      color: var(--muted);
      font-size: 13px;
    }

    .identity-line strong {
      color: var(--ink);
    }

    .toolbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 14px 17px;
      border-bottom: 1px solid var(--line);
    }

    .search {
      position: relative;
      flex: 1;
      max-width: 390px;
    }

    .search .icon {
      position: absolute;
      left: 12px;
      top: 50%;
      transform: translateY(-50%);
      color: var(--faint);
      width: 17px;
    }

    .search input {
      width: 100%;
      min-height: 39px;
      padding: 8px 12px 8px 39px;
      border: 1px solid var(--line-strong);
      border-radius: 10px;
      color: var(--ink);
      background: var(--surface-soft);
      outline: none;
    }

    .search input:focus {
      border-color: var(--blue);
      box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 12%, transparent);
    }

    .select {
      min-height: 39px;
      padding: 7px 34px 7px 11px;
      border: 1px solid var(--line-strong);
      border-radius: 10px;
      color: var(--ink);
      background: var(--surface-soft);
    }

    .table-wrap {
      overflow-x: auto;
      padding-bottom: 6px;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: auto !important;
      scrollbar-color: var(--math-thumb) var(--math-track) !important;
      display: block !important;
      overflow-x: auto !important;
      overflow-y: hidden !important;
      max-width: 100% !important;
    }

    .table-wrap::-webkit-scrollbar {
      scrollbar-width: auto !important;
      height: 6px !important;
      display: block !important;
    }

    .table-wrap::-webkit-scrollbar-track {
      background: var(--math-track) !important;
      border-radius: 4px !important;
    }

    .table-wrap::-webkit-scrollbar-thumb {
      background: var(--math-thumb) !important;
      border-radius: 4px !important;
      border: 1px solid var(--math-track) !important;
    }

    .table-wrap::-webkit-scrollbar-thumb:hover {
      background: #0d6efd !important;
    }

    table {
      width: 100%;
      min-width: 760px;
      border-collapse: collapse;
    }

    th {
      padding: 12px 18px;
      color: var(--faint);
      background: var(--surface-soft);
      font-size: 11px;
      text-align: left;
      letter-spacing: .075em;
      text-transform: uppercase;
    }

    td {
      padding: 16px 18px;
      border-top: 1px solid var(--line);
      vertical-align: middle;
    }

    tbody tr:hover {
      background: var(--blue-soft);
      background: color-mix(in srgb, var(--blue-soft) 35%, transparent);
    }

    .file-cell {
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 245px;
    }

    .file-mini {
      width: 34px;
      height: 39px;
      display: grid;
      place-items: center;
      border: 1px solid var(--line);
      border-radius: 8px;
      color: var(--blue);
      background: var(--surface-soft);
    }

    .file-mini .icon {
      width: 16px;
    }

    .file-name {
      font-weight: 690;
    }

    .file-sub {
      color: var(--faint);
      font-size: 12px;
    }

    .status {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      padding: 5px 9px;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 720;
      white-space: nowrap;
    }

    .status:before {
      content: "";
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: currentColor;
    }

    .status.awaiting {
      color: var(--amber);
      background: var(--amber-soft);
    }

    .status.signed {
      color: var(--green);
      background: var(--green-soft);
    }

    .status.expired {
      color: var(--red);
      background: var(--red-soft);
    }

    .status.draft {
      color: var(--purple);
      background: var(--purple-soft);
    }

    .more {
      width: 34px;
      height: 34px;
      display: grid;
      place-items: center;
      padding: 0;
      border: 0;
      border-radius: 9px;
      background: transparent;
      color: var(--muted);
      cursor: pointer;
    }

    .more:hover {
      background: var(--surface-soft);
      color: var(--ink);
    }

    .empty-filter {
      display: none;
      padding: 46px 20px;
      color: var(--muted);
      text-align: center;
    }

    .inbox-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 16px;
    }

    .sign-card {
      padding: 20px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--surface);
      box-shadow: var(--shadow);
    }

    .sign-head {
      display: flex;
      justify-content: space-between;
      gap: 16px;
      align-items: flex-start;
    }

    .sign-source {
      margin-top: 6px;
      color: var(--muted);
      font-size: 13px;
    }

    .sign-preview {
      margin: 20px 0;
      height: 160px;
      padding: 18px 22px;
      border: 1px solid var(--line);
      border-radius: 13px;
      background: var(--surface-soft);
      box-shadow: inset 0 0 0 8px var(--surface);
    }

    .preview-line {
      height: 6px;
      border-radius: 999px;
      background: var(--line-strong);
      margin: 9px 0;
    }

    .preview-line:nth-child(2) {
      width: 76%;
    }

    .preview-line:nth-child(3) {
      width: 90%;
    }

    .preview-sign {
      width: 34%;
      height: 18px;
      margin-top: 26px;
      border-bottom: 2px solid var(--blue);
      transform: rotate(-2deg);
    }

    .sign-foot {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
    }

    .sign-due {
      color: var(--muted);
      font-size: 13px;
    }

    .tabs {
      display: inline-flex;
      gap: 4px;
      padding: 4px;
      margin-bottom: 18px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: var(--surface);
    }

    .tab {
      min-height: 35px;
      padding: 6px 13px;
      border: 0;
      border-radius: 9px;
      color: var(--muted);
      background: transparent;
      cursor: pointer;
      font-weight: 680;
    }

    .tab.active {
      color: var(--blue);
      background: var(--blue-soft);
    }

    .tab-pane {
      display: none;
    }

    .tab-pane.active {
      display: block;
    }

    .account-grid {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 310px;
      gap: 20px;
      align-items: start;
    }

    .account-panel {
      padding: 24px;
    }

    .form-section+.form-section {
      margin-top: 30px;
      padding-top: 26px;
      border-top: 1px solid var(--line);
    }

    .section-copy {
      margin: 5px 0 19px;
      color: var(--muted);
      font-size: 13px;
    }

    .form-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 17px;
    }

    label {
      display: block;
    }

    .field-label {
      display: flex;
      justify-content: space-between;
      gap: 8px;
      margin-bottom: 7px;
      font-size: 13px;
      font-weight: 670;
    }

    .field-label em {
      color: var(--amber);
      font-style: normal;
      font-size: 11px;
      font-weight: 700;
    }

    .field {
      width: 100%;
      min-height: 43px;
      padding: 9px 12px;
      border: 1px solid var(--line-strong);
      border-radius: 10px;
      color: var(--ink);
      background: var(--surface-soft);
      outline: none;
    }

    .field:focus {
      border-color: var(--blue);
      box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 12%, transparent);
    }

    .field-with-status {
      position: relative;
    }

    .field-with-status .field {
      padding-right: 41px;
    }

    .verified-mark {
      position: absolute;
      right: 12px;
      top: 50%;
      transform: translateY(-50%);
      color: var(--green);
    }

    .form-actions {
      display: flex;
      justify-content: flex-end;
      gap: 10px;
      margin-top: 22px;
    }

    .profile-card {
      padding: 23px;
      text-align: center;
    }

    .avatar-large {
      width: 92px;
      height: 92px;
      margin: 0 auto 15px;
      display: grid;
      place-items: center;
      overflow: hidden;
      border-radius: 50%;
      color: #fff;
      background: linear-gradient(145deg, #4169df, #7355c7);
      font-size: 28px;
      font-weight: 780;
      box-shadow: 0 12px 30px color-mix(in srgb, var(--blue) 18%, transparent);
    }

    .avatar-large img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .upload-label {
      margin-top: 13px;
    }

    .upload-label input {
      position: absolute;
      width: 1px;
      height: 1px;
      overflow: hidden;
      opacity: 0;
    }

    .verification-box {
      margin-top: 20px;
      padding: 15px;
      border-radius: 13px;
      background: var(--surface-soft);
      text-align: left;
    }

    .verification-title {
      display: flex;
      align-items: center;
      gap: 8px;
      color: var(--green);
      font-weight: 720;
    }

    .verification-box p {
      margin: 7px 0 0;
      color: var(--muted);
      font-size: 12px;
    }

    .security-list {
      display: grid;
      gap: 10px;
      margin-top: 20px;
      text-align: left;
    }

    .security-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      font-size: 13px;
    }

    .security-item span {
      color: var(--muted);
    }

    .danger-zone {
      margin-top: 20px;
      padding: 21px;
      border: 1px solid var(--line);
      border: 1px solid color-mix(in srgb, var(--red) 30%, var(--line));
      border-radius: var(--radius);
      background: var(--red-soft);
      background: color-mix(in srgb, var(--red-soft) 55%, var(--surface));
      grid-row-start: 2;
    }

    .danger-zone p {
      margin: 5px 0 17px;
      color: var(--muted);
      font-size: 13px;
    }

    dialog {
      width: min(560px, calc(100% - 30px));
      padding: 0;
      border: 1px solid var(--line);
      border-radius: 20px;
      color: var(--ink);
      background: var(--surface-raised);
      box-shadow: var(--shadow-float);
    }

    dialog::backdrop {
      background: rgba(5, 9, 18, .55);
      -webkit-backdrop-filter: blur(4px);
      backdrop-filter: blur(4px);
    }

    .modal-head {
      padding: 21px 23px 17px;
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 20px;
      border-bottom: 1px solid var(--line);
    }

    .modal-head p {
      margin: 4px 0 0;
      color: var(--muted);
      font-size: 13px;
    }

    .modal-body {
      padding: 22px 23px;
    }

    .modal-actions {
      display: flex;
      justify-content: flex-end;
      gap: 10px;
      padding: 16px 23px;
      border-top: 1px solid var(--line);
    }

    .dropzone {
      min-height: 150px;
      display: grid;
      place-items: center;
      padding: 25px;
      border: 1.5px dashed var(--line-strong);
      border-radius: 14px;
      background: var(--surface-soft);
      color: var(--muted);
      text-align: center;
    }

    .dropzone .icon {
      width: 27px;
      height: 27px;
      margin-bottom: 7px;
      color: var(--blue);
    }

    .dropzone strong {
      display: block;
      color: var(--ink);
    }

    .modal-field {
      margin-top: 17px;
    }

    .warning {
      margin: 0 0 18px;
      padding: 14px;
      border-radius: 12px;
      color: var(--red);
      background: var(--red-soft);
      font-size: 13px;
    }

    .close {
      width: 34px;
      height: 34px;
      display: grid;
      place-items: center;
      padding: 0;
      border: 0;
      border-radius: 9px;
      background: var(--surface-soft);
      color: var(--muted);
      cursor: pointer;
    }

    .toast {
      position: fixed;
      z-index: 50;
      right: 22px;
      bottom: 22px;
      max-width: min(390px, calc(100vw - 44px));
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 13px 16px;
      border: 1px solid var(--line);
      border-radius: 13px;
      background: var(--surface-raised);
      box-shadow: var(--shadow-float);
      opacity: 0;
      transform: translateY(15px);
      pointer-events: none;
      transition: .22s ease;
    }

    .toast.show {
      opacity: 1;
      transform: translateY(0);
    }

    .toast .icon {
      color: var(--green);
    }


    /* Passkey security */
    .passkey-groups {
      display: grid;
      gap: 14px;
      margin-top: 18px;
    }

    .passkey-card {
      padding: 18px;
      border: 1px solid var(--line);
      border-radius: 15px;
      background: var(--surface-soft);
    }

    .passkey-card.signature-protection {
      border-color: var(--line);
      border-color: color-mix(in srgb, var(--blue) 30%, var(--line));
      background: linear-gradient(145deg, var(--surface-soft), var(--blue-soft));
      background: linear-gradient(145deg, var(--surface-soft), color-mix(in srgb, var(--blue-soft) 45%, var(--surface-soft)));
    }

    .passkey-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 14px;
    }

    .passkey-head h3 {
      margin-bottom: 4px;
    }

    .passkey-head p {
      max-width: 620px;
      margin: 0;
      color: var(--muted);
      font-size: 13px;
    }

    .security-badge {
      flex: 0 0 auto;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 5px 9px;
      border-radius: 999px;
      color: var(--blue);
      background: var(--blue-soft);
      font-size: 11px;
      font-weight: 760;
      white-space: nowrap;
    }

    .credential-list {
      display: grid;
      gap: 9px;
    }

    .credential-row {
      display: grid;
      grid-template-columns: 38px minmax(0, 1fr) auto;
      gap: 12px;
      align-items: center;
      padding: 11px 12px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: var(--surface);
    }

    .credential-icon {
      width: 38px;
      height: 38px;
      display: grid;
      place-items: center;
      border-radius: 11px;
      color: var(--blue);
      background: var(--blue-soft);
    }

    .credential-icon .icon {
      width: 18px;
      height: 18px;
    }

    .credential-name {
      font-weight: 700;
    }

    .credential-meta {
      margin-top: 2px;
      color: var(--faint);
      font-size: 12px;
    }

    .credential-actions {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .passkey-footer {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 14px;
      margin-top: 12px;
    }

    .passkey-note {
      color: var(--faint);
      font-size: 12px;
    }

    .signature-empty {
      display: none;
      padding: 15px;
      border: 1px dashed var(--line-strong);
      border-radius: 12px;
      color: var(--muted);
      background: var(--surface);
      font-size: 13px;
    }

    .signature-empty.show { display: block; }
    .signature-configured.hidden { display: none; }

    @media (max-width: 620px) {
      .passkey-head,
      .passkey-footer {
        align-items: stretch;
        flex-direction: column;
      }

      .credential-row {
        grid-template-columns: 38px minmax(0, 1fr);
      }

      .credential-actions {
        grid-column: 1 / -1;
      }

      .credential-actions .button,
      .passkey-footer .button {
        width: 100%;
      }
    }

    @media (max-width: 1080px) {
      .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .dashboard-grid,
      .account-grid {
        grid-template-columns: 1fr;
      }

      .account-grid .stack {
        grid-template-columns: 1fr 1fr;
      }

      .danger-zone {
        margin-top: 0;
      }
    }

    @media (max-width: 820px) {
      :root {
        --sidebar: 0px;
      }

      .sidebar {
        position: sticky;
        top: 0;
        width: 100%;
        height: auto;
        padding: 9px 14px;
        display: block;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        overflow-x: auto;
      }

      .sidebar .brand,
      .nav-label,
      .sidebar-bottom {
        display: none;
      }

      .nav {
        display: flex;
        min-width: max-content;
        gap: 4px;
      }

      .nav-button {
        width: auto;
        min-height: 41px;
        padding: 9px 12px;
      }

      .nav-button .count {
        margin-left: 2px;
      }

      .shell {
        margin-left: 0;
      }

      /* One sticky header: brand, the navigation (scrolls sideways when it
         doesn't fit) and the language and theme switches. */
      .sidebar {
        display: none;
      }

      .topbar {
        top: 0;
        min-height: 60px;
        padding-top: 9px;
        padding-bottom: 9px;
        gap: 14px;
      }

      .topbar-nav {
        display: flex;
        flex: 1 1 auto;
        min-width: 0;
        gap: 4px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
      }

      .topbar-nav::-webkit-scrollbar {
        display: none;
      }

      .topbar-nav .nav-button {
        flex: none;
        width: auto;
        min-height: 38px;
        padding: 8px 11px;
        gap: 8px;
        white-space: nowrap;
      }

      .mobile-brand {
        display: flex;
        align-items: center;
        gap: 8px;
        font-weight: 800;
        letter-spacing: -.03em;
      }

      .mobile-brand .brand-mark {
        width: 30px;
        height: 30px;
      }

      .top-title {
        display: none;
      }

      .inbox-grid {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 620px) {
      main {
        padding-top: 27px;
      }

      .page-head {
        align-items: flex-start;
        flex-direction: column;
      }

      .page-head .button.primary {
        width: 100%;
      }

      .metric-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
      }

      .metric {
        min-height: 128px;
        padding: 16px;
      }

      .metric-number {
        font-size: 27px;
      }

      .metric-note {
        line-height: 1.3;
      }

      .task-card {
        grid-template-columns: 42px minmax(0, 1fr);
      }

      .task-card .button {
        grid-column: 1 / -1;
        width: 100%;
      }

      .toolbar {
        align-items: stretch;
        flex-direction: column;
      }

      .search {
        max-width: none;
      }

      .form-grid,
      .account-grid .stack {
        grid-template-columns: 1fr;
      }

      .form-actions {
        flex-direction: column-reverse;
      }

      .form-actions .button {
        width: 100%;
      }

      .theme-switch button {
        width: 31px;
      }

      .avatar-button {
        display: none;
      }

      .top-actions {
        margin-left: auto;
      }

      /* Phones: brand and switches on the first row, the navigation on a
         full-width second row, still inside the one header. */
      .topbar {
        flex-wrap: wrap;
        row-gap: 8px;
      }

      .topbar-nav {
        order: 3;
        flex-basis: 100%;
      }
    }

    @font-face {
      font-family: 'Cabin Sketch';
      font-style: normal;
      font-display: swap;
      src: url('/dashboard/assets/fonts/cabin-sketch/cabin-sketch-v23-latin-regular.woff2') format('woff2');
    }

    @font-face {
      font-family: "Netsign Regular";
      src: url("/dashboard/assets/fonts/netsign.woff2") format("woff2");
      font-weight: 400;
      font-style: normal;
      unicode-range: U+004E;
    }

    @font-face {
      font-family: "Crimson Pro";
      src: url("/dashboard/assets/fonts/crimson-pro-latin.var.woff2") format("woff2");
      font-weight: 100 1000;
      font-style: normal;
    }

    .mobile-brand a,
    .brand a {
      color: inherit;
      text-decoration: none;
    }

    .mobile-brand,
    .brand {
      text-decoration: none;
      font-size: 25px;
      font-weight: 400;
      letter-spacing: -.04em;
    }

    .brand .cabin,
    .mobile-brand .cabin {
      font-family: 'Cabin Sketch';
    }

    .myfont {
      font-family: 'Netsign Regular';
    }

    .brand span.extension,
    .mobile-brand span.extension {
      color: var(--blue);
      font-family: 'Crimson Pro';
      font-weight: 600;
    }
  

    /* ── Language switch / i18n ─────────────────────────────────────── */
    .language-switch {
      display: flex; align-items: center; gap: 2px; padding: 3px;
      border: 1px solid var(--line); border-radius: 11px; background: var(--surface);
      white-space: nowrap;
    }
    .language-switch a {
      min-width: 31px; height: 32px; padding: 0 7px; display: grid; place-items: center;
      border-radius: 8px; color: var(--muted); text-decoration: none;
      font-size: 10px; font-weight: 760; letter-spacing: .02em;
    }
    .language-switch a:hover { color: var(--ink); background: var(--surface-soft); }
    .language-switch a.active { color: var(--blue); background: var(--blue-soft); }
    .language-switch a[lang="ja"] { min-width: 46px; }
    .language-select {
      display: none;
      height: 39px;
      padding: 0 30px 0 10px;
      border: 1px solid var(--line);
      border-radius: 11px;
      color: var(--ink);
      background: var(--surface);
      font: inherit;
      font-size: 12px;
      font-weight: 720;
    }
    html[lang="ja"] body {
      font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont,
        "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", "Noto Sans JP", "Segoe UI", sans-serif;
    }
    @media (max-width: 620px) {
      .language-switch a { min-width: 29px; padding: 0 5px; font-size: 9px; }
      .language-switch a[lang="ja"] { min-width: 40px; }
      .top-actions { gap: 6px; }
    }
    @media (max-width: 430px) {
      .language-switch { display: none; }
      .language-select { display: block; }
    }

/* Connected document views. */
[hidden] { display: none !important; }
a.nav-button, a.button { text-decoration: none; }
button:disabled { opacity: .5; cursor: default; }
.viewer { display: flex; align-items: center; gap: 10px; padding: 10px; min-width: 0; }
.viewer > div:last-child { min-width: 0; }
.viewer strong, .viewer span { display: block; overflow-wrap: anywhere; }
.viewer strong { font-size: 13px; }
.viewer span { font-size: 11px; color: var(--muted); }
.viewer .avatar-button { flex: 0 0 auto; cursor: default; }
.notice { padding: 14px 18px; margin: 0 0 24px; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; color: var(--muted); font-size: 13px; }
.notice strong { color: var(--ink); display: block; margin-bottom: 2px; }
.demo-notice { border-color: var(--line);
 border-color: color-mix(in srgb, var(--amber) 25%, var(--line)); background: var(--amber-soft); }
.provider-notice { border-color: var(--line);
 border-color: color-mix(in srgb, var(--blue) 25%, var(--line)); background: var(--blue-soft); }
.results-summary { display: flex; justify-content: space-between; gap: 12px; padding: 13px 18px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
.feedback { text-align: center; padding: 35px 20px; color: var(--muted); }
.feedback p { margin: 0 0 10px; }
.feedback.is-error { color: var(--red); }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 18px; padding: 16px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.document-link { color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.document-link:hover { color: var(--blue); text-decoration: underline; }
.file-name { max-width: 330px; }
.file-mini { flex: 0 0 auto; }
.progress-count { white-space: nowrap; }
.progress-track { display: block; width: 115px; height: 5px; margin-top: 7px; background: var(--line); border-radius: 5px; overflow: hidden; }
.progress-track span { display: block; height: 100%; background: var(--green); border-radius: inherit; }
.status.completed_with_refusal { color: var(--amber); background: var(--amber-soft); }
.status.refused, .status.expired { color: var(--red); background: var(--red-soft); }
.status.cancelled, .status.pending { color: var(--muted); background: var(--surface-soft); border: 1px solid var(--line); }
.status.available { color: var(--green); background: var(--green-soft); }
.expired-date { color: var(--red); }
.document-actions { white-space: nowrap; }
.inbox-grid { padding: 18px; }
.sign-card { min-width: 0; box-shadow: none; }
.sign-card h2 { overflow-wrap: anywhere; }
.sign-head { align-items: flex-start; flex-direction: column; gap: 12px; }
.sign-head > div { min-width: 0; }
.sign-head .status { flex-shrink: 0; }
.sign-source { overflow-wrap: anywhere; }
.sign-details { padding: 16px 0 20px; display: grid; gap: 9px; }
.sign-detail { margin: 0; color: var(--muted); font-size: 13px; }
.sign-gating { margin: 4px 0 0; padding: 10px 12px; border-radius: 9px; background: var(--surface-soft); color: var(--muted); font-size: 13px; }
.sign-gating.ready { color: var(--green); background: var(--green-soft); }
.sign-foot { flex-wrap: wrap; gap: 12px; }
#ready-count { color: var(--green); }
@media (max-width: 620px) {
  .results-summary { flex-direction: column; gap: 4px; }
  .pagination { justify-content: center; gap: 12px; }
  .inbox-grid { padding: 12px; }
  .sign-head { flex-direction: column; gap: 12px; }
  .sign-foot .button { width: 100%; }
}
/* Server-rendered overview, completed and account views. */
a.metric { display: block; color: inherit; text-decoration: none; }
a.metric:hover, a.metric:focus-visible { border-color: var(--line);
 border-color: color-mix(in srgb, var(--metric-color, var(--blue)) 45%, var(--line)); }
a.viewer { color: inherit; text-decoration: none; border-radius: 12px; }
a.viewer:hover, a.viewer:focus-visible { background: var(--surface-soft); }
a.viewer .avatar-button { cursor: pointer; }
a.tab { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
a.text-link { text-decoration: none; }
.text-link:disabled { color: var(--faint, var(--muted)); cursor: not-allowed; }
.identity-manage { width: 100%; margin-top: 17px; justify-content: center; }
.activity-copy time { display: block; }
.account-flash { color: var(--green); background: var(--green-soft); border-color: var(--line);
 border-color: color-mix(in srgb, var(--green) 30%, var(--line)); }
.account-error { color: var(--red); background: var(--red-soft); border-color: var(--line);
 border-color: color-mix(in srgb, var(--red) 30%, var(--line)); }
.form-section .account-error, .passkey-card .account-error { margin: 0 0 16px; }
.field[readonly] { color: var(--muted); background: var(--surface-soft); }
.passkey-add { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 14px; }
.passkey-add[hidden], .piv-enroll[hidden] { display: none; }
.passkey-add label { flex: 1 1 220px; }
.passkey-add .field-label { display: block; margin-bottom: 6px; }
.piv-enroll { display: grid; justify-items: start; gap: 10px; margin-top: 14px; }
.details-summary { cursor: pointer; font-weight: 600; }
.details-body { margin-top: 16px; }
.credential-name .status { margin-left: 6px; vertical-align: middle; }
form.security-item { margin: 0; }
.profile-card .file-sub + .file-sub { margin-top: 2px; }
.dashboard-grid table { min-width: 520px; }
.device-steps { margin-top: 16px; }
.device-steps h3 { margin-bottom: 6px; font-size: 14px; }
.device-steps ol { margin: 0 0 8px; padding-left: 20px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.credential-name .security-badge { margin-left: 4px; vertical-align: middle; }
[data-ios-app][hidden] { display: none; }
.app-banner { display: flex; align-items: center; gap: 12px; padding: 10px clamp(16px, 4vw, 54px); background: var(--surface); border-bottom: 1px solid var(--line); }
.app-banner[hidden] { display: none; }
.app-banner-icon { flex: 0 0 auto; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: var(--blue); font-size: 22px; }
.app-banner-text { flex: 1 1 auto; min-width: 0; display: grid; font-size: 13px; line-height: 1.35; }
.app-banner-text span { color: var(--muted); }
.app-banner-close { flex: 0 0 auto; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; cursor: pointer; }
.device-pair { display: grid; justify-items: start; gap: 10px; margin-top: 14px; }
.device-pair[hidden], .pair-qr[hidden], [data-pair-start][hidden] { display: none; }
.pair-qr { margin: 0; display: grid; justify-items: start; gap: 8px; }
.pair-qr-code { width: 208px; height: 208px; border-radius: 10px; border: 1px solid var(--line); }
.pair-qr figcaption { max-width: 420px; }
.pair-body { background: var(--bg); color: var(--ink); }
.pair-main { display: grid; place-items: center; padding: 32px 16px; }
.pair-panel { max-width: 480px; width: 100%; padding: 28px; display: grid; gap: 14px; justify-items: start; }
.pair-panel h1 { margin: 0; font-size: 24px; }
.pair-panel p { margin: 0; }
.device-pending { margin-bottom: 14px; border-color: var(--line);
 border-color: color-mix(in srgb, var(--amber) 45%, var(--line)); background: var(--amber-soft); }
.device-pending h3 { margin: 0 0 6px; font-size: 15px; }
.device-pending .section-copy { margin-bottom: 12px; }
.device-fingerprint { margin-top: 4px; font: 600 15px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }
.credential-actions form { margin: 0; }

/* Credit (credit.html, cart.html, pay.html, withdraw.html) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.credit-grid ~ .panel { margin-bottom: 18px; }
.credit-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 18px; margin-bottom: 18px; }
.credit-grid .panel, .panel.cart, .panel.pay, .panel.withdraw { padding: 22px; }
.credit-grid h2, .panel.cart h2 { margin: 0 0 10px; font-size: 17px; }
.panel > .panel-title { margin: 0; padding: 18px 22px 8px; font-size: 17px; }
.credit-amount { margin: 4px 0 12px; font-size: 34px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.credit-packs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.credit-pack { display: grid; gap: 4px; padding: 16px; border: 1px solid var(--line-strong); border-radius: 14px; text-decoration: none; color: var(--ink); background: var(--surface-soft); text-align: center; }
.credit-pack strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.credit-pack span { color: var(--blue); font-weight: 600; }
.credit-pack:hover, .credit-pack:focus-visible { border-color: var(--blue); background: var(--blue-soft); }
.credit-movement { font-variant-numeric: tabular-nums; color: var(--green); white-space: nowrap; }
.credit-movement.debit { color: var(--ink); }
.cart { display: grid; gap: 14px; }
.cart-line { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.cart-total { display: grid; text-align: right; }
.cart-total span { color: var(--muted); font-size: 13px; }
.cart-total strong { font-size: 26px; font-variant-numeric: tabular-nums; }
.cart-packs { display: flex; flex-wrap: wrap; gap: 8px; }
.terms-box { max-height: 420px; overflow: auto; padding: 4px 20px 12px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface-soft); font-size: 14px; line-height: 1.6; }
.terms-box:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.terms-end { margin: 18px 0 4px; color: var(--muted); font-style: italic; }
.legal h1 { font-size: 22px; margin: 16px 0 4px; }
.legal h2 { font-size: 16px; margin: 22px 0 6px; }
.legal h3 { font-size: 14px; margin: 14px 0 4px; }
.legal-meta { color: var(--muted); margin-top: 0; }
.legal table { border-collapse: collapse; margin: 8px 0; }
.legal th, .legal td { border: 1px solid var(--line-strong); padding: 6px 10px; text-align: left; vertical-align: top; }
.legal-form { border: 1px dashed var(--line-strong); border-radius: 10px; padding: 4px 16px; margin: 10px 0; }
.cart-consents { display: grid; gap: 12px; margin: 0; padding: 0; border: 0; }
.consent { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; font-size: 14px; line-height: 1.5; }
.consent input { width: 18px; height: 18px; margin-top: 2px; }
.consent input:disabled + span { color: var(--faint); }
.checkout { min-height: 360px; }
.legal-page { background: var(--bg); color: var(--ink); }
.legal-main { max-width: 820px; margin: 0 auto; padding: 24px 18px 64px; font-size: 15px; line-height: 1.65; }
.legal-back a { color: var(--blue); font-weight: 600; text-decoration: none; }
.legal-note { padding: 10px 14px; border-radius: 10px; background: var(--amber-soft); color: var(--amber); }
@media (max-width: 860px) {
  .credit-grid { grid-template-columns: 1fr; }
  .credit-packs { grid-template-columns: 1fr; }
  .terms-box { max-height: 60vh; padding: 4px 14px 10px; }
}
