:root {
  --ink:        #08080a;
  --surface:    #0f0f12;
  --surface-2:  #16161a;
  --surface-3:  #1d1d22;
  --inset:      #0b0b0e;

  --gold:       #c8a951;
  --gold-bright:#e6cf8f;
  --gold-deep:  #8a6f2c;
  --gold-glow:  rgba(200,169,81,.16);

  --ivory:      #f4efe6;
  --stone:      #9a978f;
  --stone-dim:  #6a6862;
  --hairline:   rgba(200,169,81,.20);
  --hairline-2: rgba(244,239,230,.08);

  --ok:   #7ea87a;
  --warn: #c8a951;
  --bad:  #b5654f;

  --c1:#2b2317; --c2:#45371f; --c3:#614c26; --c4:#80652e;
  --c5:#a08039; --c6:#bfa055; --c7:#d8c184; --c8:#f0e4bd;
  --nodata: #2c2c33;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono:  ui-monospace,"SF Mono","Cascadia Mono",Menlo,Consolas,monospace;

  --r: 4px;
  --shadow: 0 18px 48px rgba(0,0,0,.62);
  --nav-h: 60px;

  --on-gold: #14110a;
  --scrim:   rgba(6, 6, 9, .72);
  --marble-1: rgba(244,239,230,.05);
  --marble-2: rgba(200,169,81,.045);
  --marble-3: rgba(200,169,81,.07);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; min-height: 100%; }
body {
  background: var(--ink); color: var(--ivory);
  font-family: var(--sans); font-size: 14px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.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;
}

.marble {
  position: relative; background-color: var(--surface);
  background-image:
    linear-gradient(118deg, transparent 38%, var(--marble-1) 39.2%, transparent 40.4%),
    linear-gradient(122deg, transparent 66%, var(--marble-2) 67.4%, transparent 68.6%),
    radial-gradient(120% 90% at 12% 0%, var(--marble-3), transparent 62%);
}

h1,h2,h3,h4 { margin: 0; font-weight: 400; }
.display { font-family: var(--serif); letter-spacing: .01em; line-height: 1.1; }
.eyebrow {
  font-size: 10px; text-transform: uppercase; letter-spacing: .22em;
  color: var(--gold); margin: 0 0 8px;
}
.muted { color: var(--stone); }
.dim { color: var(--stone-dim); }
.num { font-family: var(--mono); font-variant-numeric: lining-nums tabular-nums; }

.nav {
  display: flex; align-items: center; gap: 22px;
  height: var(--nav-h); padding: 0 20px;
  background: var(--surface); border-bottom: 1px solid var(--hairline);
  position: sticky; top: 0; z-index: 60;
}
.nav-brand {
  font-family: var(--serif); font-size: 21px; letter-spacing: .18em;
  text-transform: uppercase; text-decoration: none; color: var(--ivory);
  flex-shrink: 0;
}
.nav-links { display: flex; gap: 4px; margin-left: 10px; }
.nav-links a {
  padding: 8px 13px; border-radius: var(--r); text-decoration: none;
  font-size: 13px; color: var(--stone); white-space: nowrap;
}
.nav-links a:hover { color: var(--ivory); background: var(--surface-2); }
.nav-links a[aria-current="page"] { color: var(--gold-bright); background: rgba(200,169,81,.12); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
#land-account { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--hairline-2);
  color: var(--ivory); border-radius: var(--r); padding: 7px 10px; cursor: pointer;
}

.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: rgba(200,169,81,.16); border: 1px solid var(--hairline);
  color: var(--gold-bright); font-size: 12px;
  display: grid; place-items: center; text-decoration: none;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: var(--r); border: 1px solid transparent;
  font-family: inherit; font-size: 13px; letter-spacing: .02em;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .16s, border-color .16s, color .16s;
}
.btn-primary { background: var(--gold); color: var(--on-gold); font-weight: 600; }
.btn-primary:hover { background: var(--gold-bright); }
.btn-ghost { border-color: var(--hairline); color: var(--ivory); background: transparent; }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-bright); }
.btn-quiet { color: var(--stone); background: transparent; }
.btn-quiet:hover { color: var(--ivory); background: var(--surface-2); }
.btn-danger { color: var(--bad); border-color: rgba(181,101,79,.4); background: transparent; }
.btn-danger:hover { background: rgba(181,101,79,.12); }
.btn-signout { background: #c8412b; border-color: #c8412b; color: #fff; font-weight: 600; min-width: 220px; }
.btn-signout:hover { background: #a93420; border-color: #a93420; }
.signout-bar { display: flex; justify-content: center; margin: 36px 0 8px; padding-top: 28px; border-top: 1px solid var(--hairline-2); }
@media (max-width: 720px) { .signout-bar .btn-signout { width: 100%; min-height: 48px; } }
.btn-lg { padding: 14px 26px; font-size: 14.5px; }
.btn-sm { padding: 7px 12px; font-size: 12px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

.page { max-width: 1240px; margin: 0 auto; padding: 32px 20px 80px; }
.page-narrow { max-width: 820px; }
.page-head { display: flex; align-items: flex-end; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--serif); font-size: 30px; }
.page-head .sub { color: var(--stone); font-size: 13.5px; margin-top: 6px; }
.page-head .spacer { flex: 1; }

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

.card {
  background: var(--surface); border: 1px solid var(--hairline-2);
  border-radius: var(--r); padding: 20px;
}
.card-head {
  display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px;
}
.card-head h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .18em; color: var(--stone-dim); }
.card-head .spacer { flex: 1; }

.stat .label {
  font-size: 10px; text-transform: uppercase; letter-spacing: .18em;
  color: var(--stone-dim); margin-bottom: 8px;
}
.stat .value { font-family: var(--serif); font-size: 32px; color: var(--ivory); line-height: 1; }
.stat .value.gold { color: var(--gold-bright); }
.stat .foot { font-size: 11px; color: var(--stone-dim); margin-top: 8px; }

.trend-up { color: var(--ok); }
.trend-down { color: var(--bad); }

.market-row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 16px;
  align-items: center; padding: 11px 0;
  border-bottom: 1px solid var(--hairline-2); font-size: 13px;
}
.market-row:last-child { border-bottom: none; }

.eng-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  padding-bottom: 16px; margin-bottom: 4px;
  border-bottom: 1px solid var(--hairline-2);
}
.eng-stat .label {
  font-size: 10px; text-transform: uppercase; letter-spacing: .18em;
  color: var(--stone-dim); margin-bottom: 6px;
}
.eng-stat .value { font-family: var(--serif); font-size: 26px; color: var(--ivory); line-height: 1; }
.eng-stat .value.gold { color: var(--gold-bright); }
.eng-stat .foot { font-size: 11px; color: var(--stone-dim); margin-top: 6px; }

.eng { display: inline-flex; flex-direction: column; gap: 2px; line-height: 1.25; }
.eng strong { color: var(--gold-bright); font-weight: 500; }
.eng small { font-size: 11px; color: var(--stone-dim); }

@media (max-width: 640px) {
  .eng-stats { grid-template-columns: 1fr; gap: 14px; }
}

.field { display: block; margin-bottom: 16px; }
.field > .label, .label {
  display: block; font-size: 10px; text-transform: uppercase;
  letter-spacing: .18em; color: var(--stone-dim); margin-bottom: 8px;
}
.input, input[type=text], input[type=email], input[type=password],
input[type=number], input[type=search], input[type=tel], input[type=url], select, textarea {
  width: 100%; min-height: 42px; padding: 10px 13px;
  background: var(--inset); border: 1px solid var(--hairline-2);
  border-radius: var(--r); color: var(--ivory);
  font-family: var(--sans); font-size: 14px;
}
textarea { min-height: 92px; resize: vertical; line-height: 1.6; }
select {
  appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold-deep) 50%),
                    linear-gradient(135deg, var(--gold-deep) 50%, transparent 50%);
  background-position: calc(100% - 17px) 19px, calc(100% - 12px) 19px;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-glow);
}
::placeholder { color: var(--stone-dim); }
.hint { font-size: 11.5px; color: var(--stone-dim); margin-top: 7px; line-height: 1.55; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.options { display: flex; flex-wrap: wrap; gap: 7px; }
.options label {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 13px; border: 1px solid var(--hairline-2);
  border-radius: var(--r); cursor: pointer; font-size: 12.5px; color: var(--stone);
  transition: border-color .15s, color .15s, background .15s;
}
.options label:hover { color: var(--ivory); }
.options input { position: absolute; opacity: 0; pointer-events: none; }
.options label:has(input:checked) {
  color: var(--gold-bright); border-color: var(--hairline); background: rgba(200,169,81,.12);
}
.options.compact label { padding: 7px 11px; font-size: 12px; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { width: 17px; height: 17px; accent-color: var(--gold); }

.search-field { position: relative; z-index: 30; }
.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 50;
  margin: 0; padding: 4px; list-style: none;
  background: var(--surface-2); border: 1px solid var(--hairline);
  border-radius: var(--r); box-shadow: var(--shadow);
  max-height: 320px; overflow-y: auto;
}
.search-results li {
  display: flex; align-items: baseline; gap: 10px; padding: 10px 12px;
  cursor: pointer; border-bottom: 1px solid rgba(244,239,230,.045);
}
.search-results li:last-child { border-bottom: none; }
.search-results li:hover, .search-results li.active { background: rgba(200,169,81,.13); }
.search-results .r-name { font-size: 13.5px; }
.search-results .r-group {
  display: block; padding: 8px 12px 4px; cursor: default; border-bottom: none;
  font-size: 9.5px; text-transform: uppercase; letter-spacing: .16em;
  color: var(--stone-dim);
}
.search-results .r-group:hover { background: none; }
.search-results .r-pending { color: var(--stone-dim); font-size: 12px; cursor: default; }
.search-results .r-ctx {
  margin-left: auto; font-size: 10px; text-transform: uppercase;
  letter-spacing: .12em; color: var(--stone-dim);
}

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  padding: 5px 10px; border: 1px solid var(--hairline-2);
  border-radius: 20px; color: var(--stone);
}
.chip-gold { color: var(--gold-bright); border-color: var(--hairline); background: rgba(200,169,81,.12); }
.chip[data-band="alta"]  { color: var(--ok);   border-color: rgba(126,168,122,.4); }
.chip[data-band="média"] { color: var(--warn); border-color: var(--hairline); }
.chip[data-band="baixa"] { color: var(--bad);  border-color: rgba(181,101,79,.4); }

.src {
  display: inline-block; font-size: 9px; letter-spacing: .12em;
  text-transform: uppercase; padding: 3px 8px; border: 1px solid;
}
.src-ine { color: var(--ok); border-color: rgba(126,168,122,.4); }
.src-assumido { color: var(--warn); border-color: var(--hairline); }
.src-indexado { color: var(--ok); border-color: rgba(126,168,122,.55); border-style: dashed; }
.src-declarado { color: var(--gold-bright); border-color: rgba(200,169,81,.4); }

.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; font-size: 10px; font-weight: 400; text-transform: uppercase;
  letter-spacing: .16em; color: var(--stone-dim);
  padding: 0 12px 10px 0; border-bottom: 1px solid var(--hairline);
}
.table td { padding: 13px 12px 13px 0; border-bottom: 1px solid var(--hairline-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table .t-right { text-align: right; }
.table tbody tr:hover { background: rgba(244,239,230,.02); }

.note {
  font-size: 12.5px; line-height: 1.7; color: var(--stone);
  border-left: 2px solid var(--gold-deep); padding: 2px 0 2px 14px; margin: 14px 0;
}
.note-warn { border-left-color: var(--warn); }
.note strong { color: var(--ivory); font-weight: 400; }

.empty { text-align: center; padding: 60px 24px; max-width: 460px; margin: 0 auto; }
.empty .rule { width: 44px; height: 1px; margin: 0 auto 20px;
               background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.empty h2 { font-family: var(--serif); font-size: 20px; margin-bottom: 10px; }
.empty p { color: var(--stone); font-size: 13.5px; line-height: 1.7; margin: 0 0 20px; }

.skel {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%; animation: shimmer 1.3s linear infinite;
  border-radius: var(--r); height: 14px;
}
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }

.modal {
  position: fixed; inset: 0; z-index: 100;
  background: var(--scrim); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal-card {
  position: relative; background: var(--surface);
  border: 1px solid var(--hairline); border-radius: var(--r);
  box-shadow: var(--shadow); max-width: 560px; width: 100%;
  max-height: 86vh; overflow-y: auto; padding: 30px 32px;
}
.modal-card h2 { font-family: var(--serif); font-size: 21px; margin-bottom: 8px; }
.close-btn {
  position: absolute; top: 14px; right: 16px; background: none; border: none;
  color: var(--stone-dim); font-size: 22px; line-height: 1; cursor: pointer; padding: 4px 8px;
}
.close-btn:hover { color: var(--gold); }

.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
          z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 12px 18px; border-radius: var(--r); font-size: 13px;
  background: var(--surface-2); border: 1px solid var(--hairline);
  box-shadow: var(--shadow); animation: rise .22s ease-out;
}
.toast-err { border-color: rgba(181,101,79,.5); color: #f0c6ba; }
.toast.out { opacity: 0; transition: opacity .3s; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }

@media (max-width: 1000px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1040px) {
  .nav { gap: 12px; padding: 0 14px; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 8px;
    background: var(--surface-2); border-bottom: 1px solid var(--hairline);
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px; }

  .page { padding: 22px 14px 70px; }
  .page-head h1 { font-size: 24px; }
  .grid-4, .grid-3, .grid-2, .row, .row-3 { grid-template-columns: 1fr; }

  .table.stacked thead { display: none; }
  .table.stacked tr {
    display: block; border: 1px solid var(--hairline-2);
    border-radius: var(--r); padding: 14px; margin-bottom: 12px;
  }
  .table.stacked td {
    display: flex; justify-content: space-between; gap: 16px;
    padding: 7px 0; border: none; text-align: right;
  }
  .table.stacked td::before {
    content: attr(data-label); color: var(--stone-dim);
    font-size: 10px; text-transform: uppercase; letter-spacing: .14em;
    text-align: left; flex-shrink: 0;
  }
  .table.stacked, .table.stacked tbody { display: block; width: 100%; }
  .table.stacked td { overflow-wrap: anywhere; }
  .table.stacked td.actions { justify-content: flex-end; flex-wrap: wrap; gap: 6px; padding-top: 12px; }
  .table.stacked td.actions::before { display: none; }
}

.nav.nav--compact { gap: 14px; }
.nav.nav--compact .nav-links a { padding: 8px 9px; }
.nav.nav--compact [data-cta="new-study-nav"] { display: none; }
.nav.nav--menu .nav-toggle { display: inline-flex; }
.nav.nav--menu .nav-links {
  display: none; position: absolute; top: var(--nav-h); left: 0; right: 0;
  flex-direction: column; gap: 0; padding: 8px;
  background: var(--surface-2); border-bottom: 1px solid var(--hairline);
  box-shadow: var(--shadow);
}
.nav.nav--menu .nav-links.open { display: flex; }
.nav.nav--menu .nav-links a { padding: 13px; }
.nav.nav--tight { gap: 6px; }
.nav.nav--tight .nav-right { gap: 6px; }
.nav.nav--tight #plan-slot,
.nav.nav--tight .prefs-theme { display: none; }
.nav.nav--tight .nav-toggle { padding: 7px 8px; }

.est-cell { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.est-cell small { font-size: 11px; color: var(--stone-dim); white-space: nowrap; }

@media (max-width: 640px) { .hide-sm { display: none !important; } }

.country-badge {
  display: inline-block; margin-top: 8px;
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 2px;
  border: 1px solid var(--hairline-2); color: var(--stone);
}
.country-badge[data-basis="appraisal"]   { color: var(--warn); border-color: var(--hairline); }
.country-badge[data-basis="transaction"] { color: var(--ok);   border-color: rgba(126,168,122,.35); }

.lang-switch { display: inline-flex; gap: 1px; }
.lang-switch button {
  background: none; border: 1px solid transparent; cursor: pointer;
  color: var(--stone-dim); font-family: var(--mono); font-size: 10.5px;
  letter-spacing: .08em; padding: 5px 7px; border-radius: 3px;
  transition: color .15s, background .15s;
}
.lang-switch button:hover { color: var(--ivory); background: var(--surface-2); }
.lang-switch button.active { color: var(--gold-bright); background: rgba(200,169,81,.14); }

@media (max-width: 900px) { .lang-switch { display: none; } }

.storage-note {
  display: inline-block; margin: 0 0 6px;
  font-size: 11px; letter-spacing: .04em;
  padding: 4px 10px; border-radius: 2px;
  border: 1px solid var(--hairline-2); color: var(--stone);
}
.storage-note[data-state="local"]   { color: var(--warn); border-color: var(--hairline); }
.storage-note[data-state="synced"]  { color: var(--ok);   border-color: rgba(126,168,122,.35); }
.storage-note[data-state="pending"] { color: var(--warn); border-color: var(--hairline); }

.welcome-scrim {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center; padding: 20px;
  background: var(--scrim); backdrop-filter: blur(3px);
}
.welcome-card {
  max-width: 420px; width: 100%; text-align: center;
  padding: 38px 34px; border-radius: var(--r);
  border: 1px solid var(--hairline);
}
.welcome-mark {
  width: 46px; height: 46px; margin: 0 auto 18px; border-radius: 50%;
  display: grid; place-items: center; font-size: 21px;
  background: var(--gold); color: var(--on-gold);
}
.welcome-card h2 { margin: 0 0 10px; font-size: 21px; }
.welcome-card p { margin: 0 0 22px; color: var(--stone); line-height: 1.7; font-size: 14px; }

.import-bar {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 13px 22px; border-bottom: 1px solid var(--hairline-2);
  background: rgba(200,169,81,.07); font-size: 13px;
}
.import-bar strong { display: block; color: var(--ivory); margin-bottom: 2px; }
.import-bar span { color: var(--stone); line-height: 1.6; }
.import-actions { margin-left: auto; display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 640px) {
  .import-actions { margin-left: 0; width: 100%; }
}

.cycle-wrap { display: flex; justify-content: center; margin: 0 0 26px; }
.cycle-toggle {
  display: inline-flex; gap: 2px; padding: 3px;
  background: var(--surface); border: 1px solid var(--hairline-2); border-radius: 999px;
}
.cycle-toggle button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px; border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--stone); font: inherit; font-size: 13px;
}
.cycle-toggle button.active { background: var(--gold); color: var(--on-gold); font-weight: 600; }
.cycle-flag {
  font-size: 10px; letter-spacing: .04em; padding: 2px 7px; border-radius: 999px;
  background: rgba(200, 169, 81, .16); color: var(--gold-bright);
}
.cycle-toggle button.active .cycle-flag { background: rgba(0, 0, 0, .18); color: var(--on-gold); }

.plan-save { margin: 6px 0 0; font-size: 11.5px; color: var(--gold-bright); }
.plan-price-sm { font-size: 24px !important; }

.plan-addons { margin-top: 14px; border-top: 1px solid var(--hairline-2); padding-top: 12px; }
.plan-addons summary {
  cursor: pointer; font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--stone-dim); list-style: none;
}
.plan-addons summary::-webkit-details-marker { display: none; }
.plan-addons summary::after { content: ' +'; color: var(--gold); }
.plan-addons[open] summary::after { content: ' −'; }
.ao-list { list-style: none; margin: 12px 0 0; padding: 0; }
.ao-list li {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px;
  padding: 8px 0; border-bottom: 1px solid var(--hairline-2); font-size: 13px;
}
.ao-list li:last-child { border-bottom: none; }
.ao-price { color: var(--ivory); white-space: nowrap; }
.ao-price small { color: var(--stone-dim); }
.ao-max { grid-column: 1 / -1; font-size: 11px; color: var(--stone-dim); }
.ao-note { margin: 10px 0 0; font-size: 11px; line-height: 1.5; color: var(--stone-dim); }

.plan-promo { margin-top: 14px; padding: 14px 14px 12px; border: 1px solid var(--gold);
  border-radius: var(--r); background: rgba(200,169,81,.07); }
.promo-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.promo-tag { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-bright); }
.promo-left { font-size: 11.5px; font-weight: 600; color: var(--ivory); }
.promo-price { margin-top: 8px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.promo-price s { font-size: 16px; color: var(--stone-dim); }
.promo-price strong { font-family: var(--serif); font-size: 30px; font-weight: 400; line-height: 1; color: var(--ivory); }
.promo-price small { font-size: 12px; color: var(--stone-dim); margin-left: -6px; }
.promo-off { font-size: 11px; font-weight: 600; color: var(--on-gold); background: var(--gold);
  border-radius: 999px; padding: 2px 8px; }
.promo-terms { margin: 8px 0 0; font-size: 12px; line-height: 1.5; color: var(--stone); }
.promo-bar { margin-top: 10px; height: 4px; border-radius: 4px; background: var(--hairline-2); overflow: hidden; }
.promo-bar i { display: block; height: 100%; background: var(--gold); }

.plan.plan-contact { border-style: dashed; }

.tour-root { position: fixed; inset: 0; z-index: 900; }
.tour-veil { position: absolute; inset: 0; background: var(--scrim); }
.tour-hole {
  position: fixed; border-radius: 8px; pointer-events: none;
  box-shadow: 0 0 0 9999px var(--scrim), 0 0 0 2px var(--gold);
  transition: top .18s ease, left .18s ease, width .18s ease, height .18s ease;
}
.tour-root:has(.tour-hole:not([hidden])) .tour-veil { background: transparent; }

.tour-pop {
  position: fixed; z-index: 902; width: min(360px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r); padding: 18px 20px 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
}
.tour-pop-centre { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.tour-count {
  font-size: 10px; letter-spacing: .18em; color: var(--stone-dim); margin-bottom: 8px;
}
.tour-pop h3 {
  font-family: var(--serif); font-size: 19px; font-weight: 400;
  color: var(--ivory); margin: 0 0 8px;
}
.tour-pop p { font-size: 13.5px; line-height: 1.6; color: var(--stone); margin: 0 0 16px; }
.tour-nav { display: flex; align-items: center; gap: 8px; }
.tour-nav .spacer { flex: 1; }
body.tour-open { overflow: hidden; }

.chip-example {
  background: rgba(200, 169, 81, .14); color: var(--gold-bright);
  border: 1px solid rgba(200, 169, 81, .35);
}
#example-actions { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 640px) {
  .tour-pop { width: calc(100vw - 24px); }
}

.resume-plan {
  margin: 0 0 20px; padding: 14px 18px;
  background: rgba(200, 169, 81, .1); border: 1px solid rgba(200, 169, 81, .35);
  border-radius: var(--r);
}
.resume-plan p { margin: 0 0 12px; font-size: 13.5px; color: var(--ivory); }
.resume-actions { display: flex; flex-wrap: wrap; gap: 8px; }

:root[data-theme="light"] {
  --ink:        #f7f4ee;
  --surface:    #ffffff;
  --surface-2:  #f2eee5;
  --surface-3:  #e8e2d5;
  --inset:      #efeadf;

  --gold:       #7d611f;
  --gold-bright:#5f4715;
  --gold-deep:  #8f7433;
  --gold-glow:  rgba(138,107,35,.14);

  --ivory:      #1a1815;
  --stone:      #5c574c;
  --stone-dim:  #6f6a5f;
  --hairline:   rgba(138,107,35,.30);
  --hairline-2: rgba(26,24,21,.12);

  --ok:   #416d3c;
  --warn: #8a6b23;
  --bad:  #a04a30;

  --c1:#f6f0de; --c2:#ebdfba; --c3:#ddc994; --c4:#ccb06f;
  --c5:#b8954f; --c6:#9d7a37; --c7:#7d5f26; --c8:#5a4319;
  --nodata: #e2ddd2;

  --shadow: 0 12px 32px rgba(26,24,21,.14);

  --on-gold: #fdfbf6;
  --scrim:   rgba(32,28,22,.55);
  --marble-1: rgba(26,24,21,.035);
  --marble-2: rgba(138,107,35,.05);
  --marble-3: rgba(138,107,35,.08);
}

:root[data-theme="light"] .card,
:root[data-theme="light"] .panel,
:root[data-theme="light"] .plan {
  border-color: rgba(26,24,21,.10);
  box-shadow: 0 1px 2px rgba(26,24,21,.05);
}

:root[data-theme="light"] .btn-quiet { color: var(--stone); }
:root[data-theme="light"] .btn-quiet:hover { color: var(--ivory); background: var(--surface-3); }

:root[data-theme="light"] input,
:root[data-theme="light"] select,
:root[data-theme="light"] textarea {
  background: var(--surface);
  border-color: rgba(26,24,21,.18);
}

.prefs { display: inline-flex; align-items: center; gap: 4px; }

.prefs-field { display: inline-flex; }
.prefs select {
  appearance: none; -webkit-appearance: none;
  background: transparent; border: 1px solid transparent; cursor: pointer;
  color: var(--stone-dim); font-family: var(--mono); font-size: 10.5px;
  letter-spacing: .08em; padding: 5px 16px 5px 7px; border-radius: 3px;
  transition: color .15s, background .15s, border-color .15s;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 7px top 50%, right 4px top 50%;
  background-size: 3px 3px, 3px 3px;
  background-repeat: no-repeat;
  flex: 0 0 auto;
  width: auto;
  min-width: 48px;
  height: auto;
  line-height: 1.5;
}

:root[data-theme="light"] .prefs select {
  background-color: transparent;
  border-color: transparent;
}
:root[data-theme="light"] .prefs select:hover { background-color: var(--surface-2); }
:root[data-theme="light"] .prefs select:focus-visible { border-color: var(--hairline); }
.prefs select:hover { color: var(--ivory); background-color: var(--surface-2); }
.prefs select:focus-visible { color: var(--ivory); border-color: var(--hairline); }
.prefs select option { background: var(--surface-2); color: var(--ivory); }

.prefs-theme {
  background: none; border: 1px solid transparent; cursor: pointer;
  color: var(--stone-dim); line-height: 0;
  padding: 5px 7px; border-radius: 3px;
  display: inline-flex; align-items: center;
  transition: color .15s, background .15s;
}
.prefs-theme:hover { color: var(--gold-bright); background: var(--surface-2); }

@media (max-width: 1040px) {
  .prefs #pref-cur { display: none; }

  .nav-right { gap: 8px; }
}

.fx-note {
  font-size: 11px; color: var(--stone-dim); letter-spacing: .02em;
  margin: 6px 0 0;
}

@media (max-width: 560px) {
  .nav { gap: 8px; padding: 0 10px; }
  .nav-brand { font-size: 15px; letter-spacing: .10em; }
  .nav-right { gap: 8px; }

  #land-account .btn-primary { display: none; }
  .nav-right > a.btn-primary[href="registar.html"] { display: none; }
}
@media (max-width: 400px) {
  .nav-brand { font-size: 13px; letter-spacing: .06em; }
}

.chip-warn { color: var(--warn); border-color: var(--hairline); }

.sim-bar {
  display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
  padding: 8px 20px; font-size: 12.5px;
  background: rgba(200,169,81,.12); color: var(--gold-bright);
  border-bottom: 1px solid var(--hairline);
}
.sim-option .so-real { font-style: normal; font-size: 10px; letter-spacing: .04em;
  text-transform: none; color: var(--stone); margin-left: 4px; }
.chip-bad { color: var(--bad); border-color: rgba(181,101,79,.4); }

.legal .lg-h { font-size: 22px; margin: 40px 0 12px; }
.legal a { color: var(--gold-bright); }
.legal .lg-other { margin-top: 36px; }
.lg-todo { background: rgba(200,169,81,.18); color: var(--gold-bright); padding: 0 5px; border-radius: 2px; }
.auth-consent { margin-top: 12px; text-align: center; }
.auth-consent a { color: var(--gold-bright); }
.app-foot {
  max-width: 1240px; margin: 0 auto; padding: 8px 20px 30px;
  display: flex; flex-wrap: wrap; gap: 16px; font-size: 11.5px; color: var(--stone-dim);
}
.app-foot a { color: inherit; text-decoration: none; }
.app-foot a:hover { color: var(--ivory); }
@media print { .app-foot { display: none; } }

.consent { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0 0; font-size: 13px; line-height: 1.5; color: var(--stone); cursor: pointer; }
.consent input { margin: 3px 0 0; flex: none; width: 16px; height: 16px; accent-color: var(--gold); }
.consent a { color: var(--gold-bright); }
.auth-form .consent:last-of-type { margin-bottom: 16px; }
.terms-scrim .welcome-card { text-align: left; }
.terms-scrim .welcome-card p a { color: var(--gold-bright); }
.terms-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.phone-row { display: flex; gap: 8px; align-items: stretch; }
.phone-row select { flex: none; width: auto; min-width: 108px; }
.phone-row input { flex: 1 1 auto; min-width: 0; }
.phone-row .btn { flex: none; }
.phone-verify { display: grid; gap: 10px; text-align: left; }
.phone-verify > .btn { justify-self: start; }
.phone-verify .err { margin: 0; }
.phone-code { display: grid; gap: 8px; margin-top: 4px; }
.phone-gate { max-width: 480px; }
.phone-gate #phone-host { margin: 20px 0; }
.phone-scrim .terms-actions { margin-top: 14px; }

.burger, .burger::before, .burger::after {
  display: block; width: 18px; height: 2px; border-radius: 1px;
  background: currentColor; transition: transform .2s ease, background-color .2s ease, top .2s ease;
}
.burger { position: relative; }
.burger::before, .burger::after { content: ''; position: absolute; left: 0; }
.burger::before { top: -6px; }
.burger::after { top: 6px; }
[aria-expanded="true"] > .burger { background-color: transparent; }
[aria-expanded="true"] > .burger::before { top: 0; transform: rotate(45deg); }
[aria-expanded="true"] > .burger::after { top: 0; transform: rotate(-45deg); }
.nav-toggle { width: 40px; height: 40px; padding: 0; align-items: center; justify-content: center; flex-shrink: 0; }
.nav.nav--tight .nav-toggle { padding: 0; }

.nav-drawer { display: none; }

@media (max-width: 720px) {
  .nav { gap: 10px; padding: 0 12px; }
  .nav-toggle { display: inline-flex; }
  .nav-right { gap: 10px; }
  .nav-right .nav-toggle { order: 9; }
  .nav-drawer {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 61;
    flex-direction: column; gap: 4px; padding: 6px 16px 20px;
    background: var(--surface-2); border-bottom: 1px solid var(--hairline); box-shadow: var(--shadow);
    max-height: calc(100vh - var(--nav-h)); max-height: calc(100dvh - var(--nav-h)); overflow-y: auto;
    overscroll-behavior: contain;
  }
  .nav-drawer.open { display: flex; }
  .nav-drawer .nav-links {
    display: flex; position: static; flex-direction: column; gap: 0;
    margin: 0; padding: 0; background: none; border: 0; box-shadow: none;
  }
  .nav-drawer .nav-links a {
    padding: 14px 4px; font-size: 15px; border-radius: 0;
    border-bottom: 1px solid var(--hairline);
  }
  .nav-drawer .nav-links a[aria-current="page"] { background: none; }
  .nav-tray { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding-top: 16px; }
  .nav-tray:empty { display: none; }
  .nav-tray > .btn, .nav-tray #land-account > .btn {
    width: 100%; min-height: 46px; font-size: 14px; white-space: normal;
  }
  .nav-tray #land-account { display: flex; flex-direction: column; align-items: stretch; gap: 10px; white-space: normal; }
  .nav-tray #land-account .btn-primary { display: inline-flex; order: -1; }
  .nav-tray .btn-quiet { border-color: var(--hairline); }
  .nav-tray #plan-slot { display: block; }
  .nav-tray #plan-slot .chip { display: inline-flex !important; }
  .nav-tray .prefs { display: flex; align-items: center; gap: 10px; }
  .nav-tray .prefs #pref-cur { display: inline-block; }
  .nav-tray .prefs select { height: 42px; padding: 0 28px 0 12px; font-size: 15px; }
  .nav-tray .prefs-theme { display: inline-flex; width: 42px; height: 42px; }

  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
  select, textarea { font-size: 16px !important; }
  .btn { max-width: 100%; }
  .btn-sm { min-height: 36px; }
  .btn-lg { white-space: normal; text-align: center; }
}

@media (max-width: 1040px) {
  .table.stacked .est-cell { min-width: 0; max-width: 100%; }
  .table.stacked .est-cell > span { overflow-wrap: anywhere; }
  .table.stacked .est-cell small { white-space: normal; text-align: right; line-height: 1.45; }
}

.session-ended {
  position: sticky; top: 0; z-index: 70;
  display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 20px; background: #c8412b; color: #fff; text-align: center;
}
.session-ended p { margin: 0; font-size: 14px; line-height: 1.5; }
.session-ended .btn-primary { background: #fff; color: #1d1b18; box-shadow: none; }
