.app-pages {
  display: grid;
  gap: 14px;
}

.app-page {
  display: grid;
  gap: 14px;
}

.app-page.hidden {
  display: none;
}

.app-page:target {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.app-pages:has(.app-page:target) > .app-page {
  display: none;
}

.app-pages:has(.app-page:target) > .app-page:target {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.primary-nav {
  margin-top: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nav-pill {
  border: none;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  border-radius: 8px;
  padding: 8px 16px;
  width: auto;
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}

.nav-pill:hover {
  color: var(--ink);
  background: var(--accent-soft);
}

.nav-pill.is-active {
  color: var(--ink);
  background: var(--accent-soft);
}

.header-user-chip {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.90rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s;
  box-shadow: none;
}
.header-user-chip:hover { border-color: var(--line-strong); }

.shell-hero {
  padding: 26px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 18px;
}

.shell-hero-copy h2 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.shell-hero-copy p {
  margin: 0;
  color: #4a6483;
  line-height: 1.65;
}

.shell-hero-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.shell-hero-actions .ghost-btn {
  min-width: 0;
}

.shell-hero-side {
  display: grid;
  gap: 10px;
}

.shell-metric-card,
.shell-panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 18px;
}

.shell-metric-card span,
.shell-eyebrow {
  display: inline-block;
  margin: 0 0 8px;
  font-size: 0.87rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-family: "Space Grotesk", sans-serif;
}

.shell-metric-card strong {
  display: block;
  font-size: 1.1rem;
  color: #123252;
}

.shell-metric-card p,
.shell-panel p,
.shell-body-copy {
  margin: 8px 0 0;
  color: #4d6684;
  line-height: 1.58;
}

.shell-section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
}

.shell-section-head h2,
.shell-panel h2,
.shell-panel h3 {
  margin: 0;
}

.shell-section-head p {
  margin: 8px 0 0;
  color: #58708f;
}

.shell-grid {
  display: grid;
  gap: 12px;
}

.shell-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shell-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pricing-table-wrap {
  overflow-x: auto;
}

.pricing-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.pricing-table th,
.pricing-table td {
  border: 1px solid #d7e2ef;
  padding: 12px 14px;
  text-align: left;
  font-size: 0.95rem;
}

.pricing-table th {
  background: linear-gradient(180deg, #eef5ff, #e5eefb);
  color: #163b65;
  font-family: "Space Grotesk", sans-serif;
}

.auth-page-form,
.auth-page-actions {
  display: grid;
  gap: 10px;
}

.auth-page-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-page-actions-single,
.shell-section-row {
  display: grid;
  gap: 10px;
}

.auth-page-actions-single {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shell-section-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.shell-bullet-list {
  margin: 14px 0 0;
  padding-left: 18px;
  color: #42607f;
  display: grid;
  gap: 8px;
}

.account-summary-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #d3deec;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
}

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

.account-kpi {
  border: 1px solid #d7e2ef;
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(180deg, #fbfdff, #f3f8fe);
}

.account-kpi span {
  display: block;
  margin-bottom: 4px;
  color: #647d9b;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.account-kpi strong {
  font-size: 1.18rem;
  color: #163b65;
}

.account-sync-note {
  margin: 2px 0 0;
  color: #8b5e34;
  font-size: 0.85rem;
  line-height: 1.6;
}

.account-inline-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.account-ledger-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 8px;
}

.account-ledger-item,
.account-ledger-empty {
  border: 1px solid #d3deec;
  border-radius: 12px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #fbfdff, #f3f8fe);
}

.account-ledger-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.account-ledger-type {
  font-weight: 800;
  color: #173a63;
}

.account-ledger-points {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 800;
}

.ledger-positive {
  color: #0f8a53;
}

.ledger-negative {
  color: #b42318;
}

.account-ledger-meta {
  margin-top: 6px;
  color: #5d7492;
  font-size: 0.86rem;
}

.contact-email-line {
  font-size: 1.08rem;
  font-weight: 800;
}

.legal-panel {
  padding: 24px;
}

.legal-panel p {
  line-height: 1.72;
}

@media (max-width: 1100px) {
  .shell-hero {
    grid-template-columns: 1fr;
  }

  .shell-grid-2,
  .shell-grid-3,
  .account-summary-grid,
  .auth-page-actions,
  .auth-page-actions-single,
  .shell-section-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .primary-nav {
    gap: 6px;
  }

  .nav-pill {
    width: calc(50% - 3px);
    justify-content: center;
  }

  .shell-hero,
  .shell-panel,
  .shell-metric-card {
    padding: 16px;
  }
}


/* ── Dark mode shell overrides ── */
[data-theme="dark"] .nav-pill,
[data-theme="dark"] .header-user-chip {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
[data-theme="dark"] .nav-pill:hover,
[data-theme="dark"] .nav-pill.is-active,
[data-theme="dark"] .header-user-chip:hover {
  background: var(--accent-soft);
  color: var(--ink);
}

[data-theme="dark"] .shell-metric-card,
[data-theme="dark"] .shell-panel,
[data-theme="dark"] .account-summary-card,
[data-theme="dark"] .account-kpi,
[data-theme="dark"] .account-ledger-item,
[data-theme="dark"] .account-ledger-empty {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

[data-theme="dark"] .shell-hero-copy p,
[data-theme="dark"] .shell-panel p,
[data-theme="dark"] .shell-body-copy,
[data-theme="dark"] .shell-section-head p,
[data-theme="dark"] .shell-bullet-list,
[data-theme="dark"] .account-ledger-meta,
[data-theme="dark"] .shell-metric-card span,
[data-theme="dark"] .shell-eyebrow {
  color: var(--muted);
}

[data-theme="dark"] .shell-metric-card strong,
[data-theme="dark"] .account-kpi strong,
[data-theme="dark"] .account-ledger-type,
[data-theme="dark"] .shell-section-head h2,
[data-theme="dark"] .shell-panel h3 {
  color: var(--ink);
}

[data-theme="dark"] .account-sync-note {
  color: #fbbf24;
}

[data-theme="dark"] .pricing-table th,
[data-theme="dark"] .pricing-table td {
  border-color: var(--line);
}

[data-theme="dark"] .pricing-table th {
  background: var(--surface-strong);
  color: var(--ink);
}

/* ── Consent block (signup & google consent modal) ── */
.consent-dialog {
  width: min(860px, 94vw);
  max-height: min(88vh, 860px);
  background: #11161c;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.consent-dialog .gc-close-btn {
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.consent-dialog .gc-close-btn:hover,
.consent-dialog .gc-close-btn:focus-visible {
  color: #F5F5F5;
  background: rgba(255, 255, 255, 0.06);
}

.consent-head {
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 20px;
  overflow: hidden;
}

.consent-head-copy {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.consent-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 20px;
}

.consent-brand-symbol {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.consent-brand-wordmark {
  display: inline-flex;
  align-items: center;
  width: 96px;
  height: 18px;
}

.consent-brand-symbol .brand-symbol-asset {
  width: 16px !important;
  height: 17px !important;
  max-width: 16px !important;
  max-height: 17px !important;
  object-fit: contain;
}

.consent-brand-wordmark .brand-wordmark-asset {
  width: 100% !important;
  height: auto !important;
}

.consent-dialog .auth-head h3 {
  margin: 0;
  color: #F5F5F5;
  font-size: 1.55rem;
  line-height: 1.12;
}

.consent-dialog .auth-copy {
  margin: 0;
  color: #94a3b8;
  font-size: 0.95rem;
}

.consent-form {
  gap: 18px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.consent-block {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 0;
  background: rgba(255, 255, 255, 0.02);
}
.consent-all-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  font-size: 0.96rem;
  font-weight: 800;
  color: #F5F5F5;
}
.consent-all-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: #F5F5F5;
}
.consent-divider {
  height: 1px;
  background: rgba(148, 163, 184, 0.12);
}
.consent-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  gap: 12px;
}
.consent-check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}
.consent-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: #F5F5F5;
}
.consent-check span {
  font-size: 0.94rem;
  color: #94a3b8;
  line-height: 1.5;
}
.consent-check strong {
  color: #F5F5F5;
  font-weight: 800;
}
.consent-view-btn {
  min-width: 56px;
  min-height: 34px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  padding: 0 12px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}
.consent-view-btn:hover { color: #F5F5F5; border-color: rgba(255, 255, 255, 0.28); background: rgba(255, 255, 255, 0.06); }
.consent-view-btn.is-active {
  color: #F5F5F5;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
}
.consent-preview {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(255, 255, 255, 0.03);
  padding: 16px 18px 18px;
  display: grid;
  gap: 12px;
}
.consent-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.consent-preview-title {
  margin: 0;
  font-size: 0.98rem;
  color: #F5F5F5;
  letter-spacing: -0.01em;
}
.consent-preview-close-btn {
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(255, 255, 255, 0.03);
  color: #cbd5e1;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}
.consent-preview-close-btn:hover {
  color: #F5F5F5;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
}
.consent-preview-body {
  max-height: 280px;
  overflow-y: auto;
  padding-right: 8px;
}
.consent-preview-body.legal-body {
  gap: 0;
}
.consent-preview-body .legal-section {
  padding: 18px 0;
}
.consent-preview-body .legal-section:first-child {
  padding-top: 0;
}
.consent-preview-body .legal-section:last-child {
  padding-bottom: 0;
}
.consent-preview-body .legal-section-title {
  font-size: 0.96rem;
  margin-bottom: 10px;
}
.consent-preview-body .legal-section p {
  font-size: 0.88rem;
  line-height: 1.68;
}
.auth-consent-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  position: sticky;
  bottom: 0;
  padding-top: 12px;
  margin-top: 0;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: #11161c;
}

.auth-consent-summary-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.auth-disclaimer {
  font-size: 0.92rem;
  color: #cbd5e1;
  text-align: left;
  margin: 0;
  line-height: 1.6;
}
.auth-consent-footer {
  font-size: 0.86rem;
  color: #64748b;
  text-align: left;
  margin: 0;
  line-height: 1.6;
}

.consent-actions {
  align-self: end;
}

.consent-actions button,
#gc-submit-btn {
  min-width: 202px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 800;
  background: #F5F5F5;
  color: #0f172a;
  border: none;
}

@media (max-width: 720px) {
  .consent-dialog {
    width: min(94vw, 640px);
    padding: 20px;
  }

  .consent-head {
    gap: 12px;
  }

  .consent-dialog .auth-head h3 {
    font-size: 1.35rem;
  }

  .consent-row {
    align-items: flex-start;
  }

  .auth-consent-summary {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .consent-actions,
  .consent-actions button,
  #gc-submit-btn {
    width: 100%;
  }
}

@media (max-width: 540px) {
  .consent-dialog {
    padding: 18px;
    border-radius: 22px;
  }

  .consent-brand-lockup {
    gap: 10px;
  }

  .consent-brand-symbol {
    width: 26px;
    height: 26px;
    border-radius: 8px;
  }

  .consent-brand-wordmark {
    width: 88px;
    height: 16px;
  }

  .consent-row {
    flex-direction: column;
  }

  .consent-view-btn {
    width: 100%;
  }
}

/* ── Legal / Contact pages ── */
.legal-page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 44px 28px 64px;
}

.legal-shell-bar {
  margin-bottom: 22px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.legal-shell-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 0 0 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.legal-shell-link {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 0 6px;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid transparent;
  background: transparent !important;
  box-shadow: none !important;
  color: #64748b;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
  font-family: inherit;
}

.legal-shell-link:hover {
  color: #0f172a;
  border-bottom-color: rgba(15, 23, 42, 0.18);
}

.legal-shell-link.is-current {
  color: #0f172a;
  border-bottom-color: #0f172a;
}

.legal-hero {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}

.legal-eyebrow {
  font-size: 0.90rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.legal-title {
  font-size: clamp(2.45rem, 4.2vw, 3.9rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.02;
  color: var(--ink);
  margin-bottom: 16px;
}

.legal-lead {
  font-size: 1.14rem;
  line-height: 1.8;
  color: var(--muted);
  max-width: 760px;
}

.legal-body {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.legal-section {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.legal-section:last-of-type {
  border-bottom: none;
}

.legal-section-title {
  font-size: 1.24rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.legal-section p {
  font-size: 1.03rem;
  line-height: 1.82;
  color: var(--muted);
  margin-bottom: 10px;
}
.legal-section p:last-child { margin-bottom: 0; }

.legal-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.legal-list li {
  font-size: 1.01rem;
  color: var(--muted);
  padding-left: 20px;
  position: relative;
  line-height: 1.72;
}
.legal-list li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--muted);
}

.legal-group {
  margin-top: 18px;
}
.legal-group-label {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--ink) !important;
  margin-bottom: 8px !important;
}
.legal-note {
  font-size: 0.94rem !important;
  color: var(--muted);
  margin-top: 12px !important;
  padding: 14px 16px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.legal-contact-box {
  margin-top: 24px;
  padding: 16px 0 0;
  border: none;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.legal-contact-label {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.legal-contact-box p {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 8px;
  line-height: 1.68;
}
.contact-email-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 0 2px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(15, 23, 42, 0.18);
  transition: opacity 0.15s, border-color 0.15s;
}
.contact-email-link:hover {
  opacity: 0.8;
  border-bottom-color: var(--ink);
}

/* Contact page cards */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}
.contact-card {
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}
.contact-card-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}
.contact-card-desc {
  font-size: 0.98rem;
  color: var(--muted);
  line-height: 1.72;
}

.contact-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 24px;
  padding-top: 6px;
}
.contact-info-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 0;
  border-bottom: none;
}
.contact-info-label {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 0;
  flex-shrink: 0;
}
.contact-info-value {
  font-size: 0.98rem;
  color: var(--ink);
  line-height: 1.6;
}

@media (max-width: 680px) {
  .legal-page { padding: 30px 18px 48px; }
  .legal-shell-nav { gap: 8px 14px; }
  .contact-cards { grid-template-columns: 1fr; }
  .contact-info { grid-template-columns: 1fr; }
  .contact-info-row { gap: 4px; }
}

/* Dark mode overrides */
[data-theme="dark"] .legal-title,
[data-theme="dark"] .legal-section-title,
[data-theme="dark"] .contact-card-label,
[data-theme="dark"] .contact-info-value,
[data-theme="dark"] .legal-group-label,
[data-theme="dark"] .contact-email-link {
  color: var(--ink);
}
[data-theme="dark"] .legal-lead,
[data-theme="dark"] .legal-section p,
[data-theme="dark"] .legal-list li,
[data-theme="dark"] .legal-eyebrow,
[data-theme="dark"] .legal-contact-label,
[data-theme="dark"] .legal-contact-box p,
[data-theme="dark"] .contact-card-desc,
[data-theme="dark"] .contact-info-label {
  color: var(--muted);
}
[data-theme="dark"] .contact-card,
[data-theme="dark"] .legal-contact-box,
[data-theme="dark"] .contact-info {
  background: var(--surface);
  border-color: var(--line);
}
[data-theme="dark"] .legal-shell-link {
  background: transparent !important;
  box-shadow: none !important;
  color: var(--muted);
}
[data-theme="dark"] .legal-shell-link:hover {
  color: var(--ink);
  border-bottom-color: rgba(255, 255, 255, 0.18);
}
[data-theme="dark"] .legal-shell-link.is-current {
  color: var(--ink);
  border-bottom-color: rgba(255, 255, 255, 0.82);
}
[data-theme="dark"] .legal-shell-nav {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .legal-note {
  background: var(--surface-strong);
  border-color: var(--line-strong);
}
[data-theme="dark"] .legal-hero,
[data-theme="dark"] .legal-section {
  border-color: var(--line);
}

/* ── Signup: nationality radio pill ── */
.nationality-radio-group {
  display: flex;
  gap: 8px;
  padding: 2px 0;
}

.nationality-radio {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  user-select: none;
}

.nationality-radio input[type="radio"] {
  display: none;
}

.nationality-radio:has(input:checked) {
  border-color: var(--accent, #1463ff);
  background: rgba(20, 99, 255, 0.07);
  color: var(--accent, #1463ff);
  font-weight: 700;
}

[data-theme="dark"] .nationality-radio {
  border-color: var(--line);
  color: var(--muted);
}

[data-theme="dark"] .nationality-radio:has(input:checked) {
  border-color: var(--accent, #4d8cff);
  background: rgba(77, 140, 255, 0.1);
  color: var(--accent, #4d8cff);
}

/* ── Signup: field-error inline ── */
.field-error {
  display: block;
  margin-top: 5px;
  font-size: 0.88rem;
  color: #c53e2f;
  font-weight: 600;
  min-height: 1em;
}

[data-theme="dark"] .field-error {
  color: #f87171;
}

/* ── Branded Modal (Orjang Modal) ── */
.orjang-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: orjang-modal-fadein 0.25s ease-out;
  transition: opacity 0.2s;
}

.orjang-modal-overlay.is-closing {
  opacity: 0;
}

.orjang-modal-content {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  width: 90%;
  max-width: 400px;
  padding: 32px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: orjang-modal-pop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.orjang-modal-header {
  margin-bottom: 24px;
}

.orjang-modal-logo {
  height: 22px;
  width: auto;
}

.orjang-modal-body {
  margin-bottom: 28px;
}

.orjang-modal-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.orjang-modal-text {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
  word-break: keep-all;
}

.orjang-modal-footer {
  width: 100%;
}

.orjang-modal-footer--confirm {
  display: flex;
  gap: 10px;
}

.orjang-modal-footer--confirm .orjang-modal-cancel-btn,
.orjang-modal-footer--confirm .orjang-modal-ok-btn {
  flex: 1;
  padding: 14px;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 14px;
}

.orjang-modal-confirm-btn {
  width: 100%;
  padding: 14px;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 14px;
}

/* Theme-specific logo visibility */
.theme-dark-only { display: none; }
.theme-light-only { display: block; }
[data-theme="dark"] .theme-dark-only { display: block; }
[data-theme="dark"] .theme-light-only { display: none; }

@keyframes orjang-modal-fadein {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes orjang-modal-pop {
  from { transform: scale(0.9) translateY(10px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
.orjang-modal-text br { display: block; }
