:root {
  --ink: #0b0a09;
  --paper: #f4efe6;
  --paper-dim: #e7ded0;
  --paper-2: #faf6ef;
  --wine: #4a0f1f;
  --wine-deep: #2a0810;
  --wine-light: #7c2438;
  --sea: #0e2a3b;
  --sea-deep: #081a26;
  --sea-light: #2c5872;
  --gold: #b08d57;
  --gold-soft: rgba(176, 141, 87, 0.35);
  --muted: #4a463f;
  --line: rgba(11, 10, 9, 0.12);
  --line-soft: rgba(176, 141, 87, 0.28);
  --white: #fffaf3;
  --shadow-card: 0 24px 64px rgba(11, 10, 9, 0.08);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 8% 0%, rgba(124, 36, 56, 0.06), transparent 40%),
    radial-gradient(ellipse at 92% 8%, rgba(44, 88, 114, 0.07), transparent 42%),
    var(--paper);
  font: 300 15px/1.6 var(--sans);
  font-variant-numeric: lining-nums tabular-nums;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--wine);
  color: var(--paper);
}

a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 239, 230, 0.92);
  backdrop-filter: blur(14px);
}

.site-header__inner {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  min-height: 78px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
}

.site-header__inner--compact {
  grid-template-columns: auto 1fr auto;
}

.wordmark--link {
  text-decoration: none;
  color: inherit;
}

.header-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px 18px;
}

.header-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 400;
}

.header-nav a[aria-current="page"],
.header-nav a:hover {
  color: var(--ink);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 14px;
}

.wordmark__name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: 0.28em;
  color: var(--ink);
}

.wordmark__descriptor {
  border-left: 1px solid var(--gold-soft);
  padding-left: 14px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.4;
  font-weight: 400;
}

.source-state {
  justify-self: center;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 400;
}

.header-actions {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
}

/* ---------- buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--ink);
  padding: 12px 18px;
  border-radius: 0;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease;
  text-decoration: none;
  white-space: nowrap;
}

.button:hover {
  background: var(--gold);
  color: var(--ink);
}

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

.button--ghost:hover {
  border-color: var(--gold);
  background: transparent;
  color: var(--ink);
}

.button--ink {
  background: var(--sea);
  border-color: var(--sea);
  color: var(--paper);
}

.button--ink:hover {
  background: var(--sea-light);
  border-color: var(--sea-light);
  color: var(--paper);
}

.button--wine {
  background: var(--wine);
  border-color: var(--wine);
  color: var(--paper);
}

.button--wine:hover {
  background: var(--wine-light);
  border-color: var(--wine-light);
  color: var(--paper);
}

/* ---------- page ---------- */
.page {
  width: min(1180px, calc(100% - 48px));
  margin: 28px auto 56px;
}

.proposal-intro {
  padding: 12px 0 8px;
}

.kicker,
.eyebrow {
  margin: 0 0 16px;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 14px;
}

.kicker::before,
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--gold);
}

.kicker--light {
  color: var(--gold);
}

.kicker--light::before {
  background: var(--gold);
}

.proposal-intro h1 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(34px, 5.5vw, 56px);
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.proposal-intro h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--wine);
}

.proposal-intro p {
  margin: 0;
  max-width: 52ch;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 300;
}

/* ---------- layout cards ---------- */
.proposal-layout {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 22px;
  margin-top: 28px;
}

.lot-card,
.model-card,
.legal-note {
  background: var(--paper-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  border-radius: 0;
}

.lot-card {
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.lot-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--wine), var(--gold), var(--sea));
}

.lot-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.lot-card__head h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 32px;
  letter-spacing: 0.01em;
}

.choice-block {
  margin-top: 18px;
}

.choice-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
}

.choice-hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.segmented button {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  padding: 11px 14px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s ease;
}

.segmented button:hover {
  border-color: var(--gold);
}

.segmented button.is-active {
  background: var(--wine);
  border-color: var(--wine);
  color: var(--paper);
}

.lot-selectors {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
}

select,
input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 12px;
  background: var(--white);
  color: var(--ink);
  font: 400 14px/1.4 var(--sans);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

select:hover,
input:hover,
select:focus,
input:focus {
  border-color: var(--gold);
  outline: none;
  box-shadow: 0 0 0 3px var(--gold-soft);
}

.lot-facts {
  margin: 20px 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.lot-facts div {
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--white), var(--paper-dim));
  padding: 14px;
}

.lot-facts dt {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lot-facts dd {
  margin: 6px 0 0;
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink);
  font-variant-numeric: lining-nums tabular-nums;
}

.lot-facts > div.is-emphasis {
  border-color: var(--gold);
  background: linear-gradient(160deg, #fffaf3, #f0e4d0);
}

.lot-facts > div.is-emphasis dt {
  color: var(--wine);
}

/* ---------- result rail ---------- */
.result-card {
  padding: 24px;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(124, 36, 56, 0.45), transparent 55%),
    radial-gradient(ellipse at 90% 100%, rgba(44, 88, 114, 0.4), transparent 50%),
    linear-gradient(155deg, var(--sea-deep) 0%, var(--ink) 48%, var(--wine-deep) 100%);
  color: var(--paper);
  position: sticky;
  top: 100px;
  border: 1px solid rgba(176, 141, 87, 0.25);
  box-shadow: var(--shadow-card);
}

.result-card .kicker {
  margin-bottom: 10px;
}

.result-card h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.15;
}

.result-primary {
  margin-top: 20px;
  display: grid;
  gap: 6px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(244, 239, 230, 0.16);
}

.result-primary span {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.72);
}

.result-primary strong {
  font-family: var(--sans);
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 500;
  line-height: 1.1;
  color: var(--gold);
  font-variant-numeric: lining-nums tabular-nums;
}

.result-breakdown {
  margin: 14px 0 0;
  display: grid;
  gap: 10px;
}

.result-breakdown div {
  padding-top: 10px;
  border-top: 1px solid rgba(244, 239, 230, 0.12);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.result-breakdown dt {
  color: rgba(244, 239, 230, 0.7);
}

.result-breakdown dd {
  margin: 0;
  font-family: var(--sans);
  font-weight: 500;
  color: var(--paper);
  font-variant-numeric: lining-nums tabular-nums;
}

/* ---------- model / tabs ---------- */
.model-card {
  margin-top: 22px;
  padding: 24px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.tabs button {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 0;
  padding: 11px 16px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.3s ease;
}

.tabs button span {
  margin-right: 8px;
  color: var(--gold);
}

.tabs button:hover {
  border-color: var(--gold);
  color: var(--ink);
}

.tabs button.is-active {
  background: var(--wine);
  color: var(--paper);
  border-color: var(--wine);
}

.tabs button.is-active span {
  color: var(--gold);
}

.tab-panel {
  padding-top: 20px;
}

.tab-panel h3 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
}

.is-hidden {
  display: none;
}

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

.payment-head h3 {
  margin: 0;
}

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

.payment-card {
  display: grid;
  gap: 8px;
  text-align: left;
  padding: 16px 18px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
  font: inherit;
  letter-spacing: 0;
  text-transform: none;
}

.payment-card strong {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.25;
}

.payment-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.payment-card em {
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wine);
}

.payment-card:hover {
  border-color: var(--gold);
}

.payment-card.is-active {
  border-color: var(--wine);
  background: linear-gradient(180deg, rgba(74, 15, 31, 0.04), transparent);
  box-shadow: inset 0 0 0 1px rgba(74, 15, 31, 0.08);
}

.payment-discounts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.payment-discounts label {
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.payment-discounts input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  padding: 10px 12px;
  font: 500 14px/1.2 var(--sans);
}

.payment-summary {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.payment-summary > div,
.payment-summary--dialog > div {
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.payment-summary span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.payment-summary strong {
  font-family: var(--sans);
  font-variant-numeric: lining-nums tabular-nums;
  font-weight: 500;
  font-size: 18px;
}

.payment-summary--dialog {
  margin: 0 0 16px;
}

.payment-calendars {
  display: grid;
  gap: 18px;
}

@media (min-width: 900px) {
  .payment-calendars {
    grid-template-columns: 1fr 1fr;
  }
}

.payment-calendar-block {
  min-width: 0;
}

.payment-calendar-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink, #2b211d);
}

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

.payment-calendar {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--white);
  max-height: 420px;
  overflow: auto;
}

.payment-calendar__item {
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) minmax(180px, 1.4fr) auto;
  gap: 12px 18px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: lining-nums tabular-nums;
}

.payment-calendar__item:last-child {
  border-bottom: 0;
}

.payment-calendar__when {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.3;
  color: var(--ink);
}

.payment-calendar__meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.payment-calendar__amount {
  justify-self: end;
  font-weight: 500;
  font-size: 16px;
  white-space: nowrap;
}

.payment-calendar__empty {
  padding: 16px;
  color: var(--muted);
}

.schedule-dialog {
  width: min(920px, calc(100% - 32px));
}

.schedule-body .table-wrap {
  margin-top: 0;
}

.fineprint {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.table-wrap {
  overflow: auto;
  margin-top: 18px;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  min-width: 720px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
}

th {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  background: var(--paper-dim);
}

td {
  font-size: 14px;
  font-variant-numeric: lining-nums tabular-nums;
}

tr:last-child td {
  border-bottom: none;
}

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

.compare-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 18px;
  position: relative;
}

.compare-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--wine), var(--gold), var(--sea));
}

.compare-card h4 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
}

.compare-card p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
}

.compare-card b {
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 500;
  font-variant-numeric: lining-nums tabular-nums;
}

.legal-note {
  margin-top: 18px;
  padding: 18px 20px;
  color: var(--muted);
  border-left: 3px solid var(--gold);
  font-size: 13px;
  line-height: 1.7;
}

/* ---------- inventory / chess dialog ---------- */
:root {
  --success: #2f6b4f;
  --warning: #b08d57;
  --danger: #7c2438;
}

.inventory-dialog {
  width: min(1180px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  border: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
}

.inventory-dialog::backdrop {
  background: rgba(8, 26, 38, 0.72);
  backdrop-filter: blur(4px);
}

.dialog-shell {
  max-height: calc(100dvh - 32px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: var(--paper-2);
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.3);
}

.dialog-head,
.dialog-head--inventory {
  min-height: 104px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 25px 28px 19px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}

.dialog-head h2,
.dialog-head--inventory h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
}

.dialog-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
}

.dialog-head p:not(.kicker) {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.kicker--small {
  margin: 0 0 6px;
  font-size: 10px;
}

.inventory-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.inventory-header-close {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  padding: 10px 14px;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.inventory-toolbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-dim);
}

.inventory-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 10px;
}

.inventory-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.inventory-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.inventory-legend .available { background: var(--success); }
.inventory-legend .reserved { background: var(--warning); }
.inventory-legend .sold { background: var(--danger); }
.inventory-legend .not_for_sale { background: var(--muted); }

.inventory-explorer {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 400px);
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--paper-2);
}

.inventory-zone-tabs {
  display: flex;
  min-width: 0;
  grid-column: 1;
  grid-row: 1;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.inventory-zone-tab {
  position: relative;
  flex: 0 0 auto;
  min-width: 108px;
  height: 58px;
  border: 0;
  border-right: 1px solid var(--line);
  padding: 0 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.38);
  text-align: left;
  opacity: 0.55;
  cursor: pointer;
  font: inherit;
}

.inventory-zone-tab:last-child { border-right: 0; }

.inventory-zone-tab > span {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.inventory-zone-tab strong {
  font-size: 13px;
  font-weight: 500;
}

.inventory-zone-tab small {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.inventory-zone-tab::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: transparent;
}

.inventory-zone-tab.is-active {
  background: rgba(255, 255, 255, 0.78);
  opacity: 1;
}

.inventory-zone-tab.is-active::after {
  background: var(--gold);
}

.inventory-spatial-panel {
  min-width: 0;
  min-height: 0;
  grid-column: 1;
  grid-row: 2;
  overflow: auto;
  border-right: 1px solid var(--line);
  padding: 18px 20px 20px;
}

.dialog-shell--inventory .inventory-grid {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 0;
  max-height: none;
  grid-template-columns: 1fr;
}

.inventory-floor {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.inventory-floor__label {
  display: grid;
  place-content: center;
  border-right: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.inventory-floor__label strong {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  line-height: 0.95;
  color: var(--ink);
}

.inventory-floor__label span {
  margin-top: 4px;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.inventory-floor__lots {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: stretch;
  min-width: 0;
  overflow-x: auto;
}

.inventory-lot {
  width: 108px;
  min-width: 108px;
  max-width: 108px;
  flex: 0 0 108px;
  min-height: 78px;
  display: grid;
  align-content: center;
  gap: 3px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  background: var(--white);
  text-align: left;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.inventory-lot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  margin-bottom: 2px;
}

.inventory-lot.available::before { background: var(--success); }
.inventory-lot.reserved::before { background: var(--warning); }
.inventory-lot.sold::before { background: var(--danger); }

.inventory-lot:hover { border-color: var(--wine); }

.inventory-lot.is-selected {
  color: var(--white);
  border-color: var(--wine);
  background: var(--wine);
}

.inventory-lot strong {
  overflow: hidden;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-lot span,
.inventory-lot small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-lot.is-selected span,
.inventory-lot.is-selected small {
  color: rgba(255, 255, 255, 0.62);
}

.inventory-empty {
  min-height: 220px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.inventory-preview {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-height: 0;
  overflow: auto;
  padding: 18px 18px 22px;
  background: var(--paper);
  border-left: 1px solid var(--line);
}

.inventory-preview__title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.inventory-preview__title h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.15;
}

.status-pill {
  flex: 0 0 auto;
  border: 1px solid var(--success);
  color: var(--success);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.inventory-preview__section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 14px 0 8px;
}

.inventory-preview__section-head > span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.inventory-preview__section-head strong {
  font-size: 12px;
  font-weight: 500;
}

.inventory-preview__orientation,
.inventory-preview__context {
  border: 1px solid var(--line);
  background: var(--white);
  min-height: 160px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.inventory-preview__orientation img,
.inventory-preview__context img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  display: block;
}

.inventory-preview__facts {
  margin-top: 14px;
}

.inventory-preview__facts dl {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.inventory-preview__facts dl > div {
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.inventory-preview__facts dt {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.inventory-preview__facts dd {
  margin: 0;
  font-variant-numeric: lining-nums tabular-nums;
  font-size: 14px;
}

.inventory-preview__finish {
  margin-top: 16px;
}


.inventory-lot.sold,
.inventory-lot.not_for_sale {
  background: rgba(11, 10, 9, 0.08);
  color: var(--muted);
}

.inventory-lot.reserved {
  background: rgba(176, 141, 87, 0.14);
}

.inventory-lot.is-locked:not(.is-selected) {
  cursor: default;
}

.inventory-lot.sold::before { background: var(--danger); }
.inventory-lot.reserved::before { background: var(--warning); }
.inventory-lot.not_for_sale::before { background: var(--muted); }

.status-pill--available { border-color: var(--success); color: var(--success); }
.status-pill--reserved { border-color: var(--warning); color: var(--wine); }
.status-pill--sold,
.status-pill--not_for_sale { border-color: var(--muted); color: var(--muted); }

.dialog-footer {
  min-height: 64px;
  display: flex;
  align-items: center;
  padding: 12px 28px;
  border-top: 1px solid var(--line);
  background: var(--paper-dim);
}

.dialog-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.quick-select-toggle {
  width: 100%;
  margin-top: 16px;
}

.quick-select-toggle.is-open {
  border-color: var(--gold);
}

.quick-select {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

@media (max-width: 980px) {
  .inventory-explorer {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .inventory-zone-tabs,
  .inventory-spatial-panel,
  .inventory-preview {
    grid-column: 1;
  }

  .inventory-zone-tabs { grid-row: 1; }
  .inventory-spatial-panel { grid-row: 2; border-right: 0; }
  .inventory-preview {
    grid-row: 3;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .inventory-header-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .dialog-head--inventory {
    flex-direction: column;
  }
}

/* ---------- print ---------- */
@media print {
  .site-header,
  .header-actions,
  .tabs,
  .lot-selectors,
  .button,
  .inventory-dialog {
    display: none !important;
  }

  .result-card {
    position: static;
    break-inside: avoid;
  }

  .tab-panel.is-hidden {
    display: block !important;
  }
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .proposal-layout {
    grid-template-columns: 1fr;
  }

  .result-card {
    position: static;
  }

  .lot-selectors,
  .controls-grid,
  .payment-grid,
  .payment-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-header__inner,
  .page {
    width: calc(100% - 28px);
  }

  .site-header__inner {
    grid-template-columns: 1fr;
    padding: 12px 0;
    gap: 10px;
  }

  .source-state {
    justify-self: start;
  }

  .header-actions {
    width: auto;
    justify-self: end;
  }

  .header-actions .button {
    flex: 0 0 auto;
    width: auto;
  }

  .lot-selectors,
  .controls-grid,
  .compare-cards,
  .inventory-grid,
  .lot-facts,
  .payment-grid,
  .payment-summary {
    grid-template-columns: 1fr;
  }

  .payment-head {
    flex-direction: column;
  }

  .payment-calendar-head {
    flex-direction: column;
  }

  .payment-calendar__item {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .payment-calendar__amount {
    justify-self: start;
  }

  .wordmark__name {
    letter-spacing: 0.18em;
    font-size: 18px;
  }

  .header-nav {
    justify-content: flex-start;
    order: 2;
    width: 100%;
  }

  .header-actions {
    order: 3;
  }
}

/* ---------- documents ---------- */
.docs-shell {
  margin-top: 8px;
  padding: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 250, 243, 0.92), rgba(244, 239, 230, 0.7));
}

.docs-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.docs-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.docs-breadcrumbs button {
  border: 0;
  background: transparent;
  color: var(--wine);
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0;
}

.docs-breadcrumbs__current {
  color: var(--ink);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.docs-breadcrumbs__sep {
  color: var(--muted);
}

.docs-count {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

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

.docs-card {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 132px;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  background: var(--white);
  text-align: left;
  text-decoration: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.docs-card:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}

.docs-card--folder {
  background:
    linear-gradient(135deg, rgba(74, 15, 31, 0.05), transparent 55%),
    var(--white);
}

.docs-card__badge {
  width: fit-content;
  color: var(--wine);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.docs-card strong {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.25;
  word-break: break-word;
}

.docs-card--featured strong {
  font-weight: 700;
}

.docs-card span:last-child {
  color: var(--muted);
  font-size: 13px;
}

.docs-empty {
  margin: 0;
  padding: 28px 8px;
  color: var(--muted);
}

.docs-card--wine {
  background:
    linear-gradient(145deg, rgba(74, 15, 31, 0.92), rgba(42, 8, 16, 0.96));
  border-color: transparent;
  color: var(--paper);
}

.docs-card--wine .docs-card__badge {
  color: #e7c9a4;
}

.docs-card--wine strong {
  color: #fffaf3;
}

.docs-card--wine .docs-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.docs-card--wine .docs-card__actions a {
  color: #fffaf3;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 250, 243, 0.45);
  font-size: 13px;
}

.docs-card--wine:hover {
  border-color: var(--gold);
}

.docs-card--image {
  padding: 0;
  overflow: hidden;
}

.docs-card--image img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  background: var(--paper-dim);
}

.docs-card--image strong,
.docs-card--image span:last-child {
  padding: 0 16px;
}

.docs-card--image span:last-child {
  padding-bottom: 14px;
}

.docs-card--video {
  background:
    linear-gradient(160deg, rgba(14, 42, 59, 0.08), transparent 50%),
    var(--white);
}

.faq-shell {
  margin-top: 8px;
  padding: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 250, 243, 0.92), rgba(244, 239, 230, 0.7));
}

.faq-toolbar {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.faq-toolbar input[type="search"] {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--white);
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
}

.faq-section {
  margin: 22px 0 10px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
}

.faq-list details:first-child,
.faq-list .faq-section:first-child {
  margin-top: 0;
}

.faq-item {
  border: 1px solid var(--line);
  background: var(--white);
  margin-bottom: 8px;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.35;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-answer {
  padding: 0 16px 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.faq-answer a {
  color: var(--wine);
  word-break: break-word;
}

@media (max-width: 860px) {
  .docs-grid {
    grid-template-columns: 1fr;
  }

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

/* ---------- broker chess page (nova-chess style) ---------- */
.chess-page-body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.chess-page {
  flex: 1;
  min-height: 0;
  width: min(1440px, calc(100% - 32px));
  margin: 16px auto 28px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
}

.chess-sidebar {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.chess-sidebar__label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.chess-sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: auto;
}

.chess-sidebar__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid transparent;
  color: var(--ink);
  text-decoration: none;
  background: transparent;
}

.chess-sidebar__link strong {
  font-size: 13px;
  font-weight: 500;
}

.chess-sidebar__link small {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.chess-sidebar__link.is-active {
  border-color: var(--sea);
  background: rgba(14, 42, 59, 0.08);
}

.chess-sidebar__link.is-active strong {
  color: var(--sea);
}

.chess-sidebar__meta {
  margin: auto 0 0;
  color: var(--muted);
  font-size: 13px;
}

.chess-main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chess-main__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.chess-main__head h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 34px;
}

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

.chess-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  color: var(--muted);
  font-size: 13px;
}

.chess-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chess-legend i {
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
}

.chess-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--white);
}

.chess-filters__check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink);
  user-select: none;
}

.chess-filters__check input {
  width: 16px;
  height: 16px;
  accent-color: var(--wine);
}

.chess-filters__check small {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.chess-filters__layouts {
  display: grid;
  gap: 6px;
}

.chess-filters__layout-btns {
  display: inline-flex;
  border: 1px solid var(--line);
  background: var(--paper-2);
}

.chess-filters__layout {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 9px 12px;
  font: 500 12px/1.2 var(--sans);
  letter-spacing: 0.04em;
  cursor: pointer;
  min-width: 44px;
}

.chess-filters__layout.is-active {
  background: var(--wine);
  color: #fff;
}

.chess-filters__price {
  display: grid;
  gap: 6px;
}

.chess-filters__label {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.chess-filters__price-inputs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chess-filters__price-inputs input {
  width: 78px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink);
  padding: 8px 10px;
  font: 500 13px/1.2 var(--sans);
}

.chess-filters__price-inputs input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}

.chess-filters__dash {
  color: var(--muted);
}

.chess-filters__discount {
  display: inline-flex;
  border: 1px solid var(--line);
  background: var(--paper-2);
}

.chess-filters__mode {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 9px 12px;
  font: 500 12px/1.2 var(--sans);
  letter-spacing: 0.04em;
  cursor: pointer;
}

.chess-filters__mode.is-active {
  background: var(--wine);
  color: #fff;
}

.chess-filters__meta {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.chess-filters__reset {
  margin-left: auto;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
  font: 500 12px/1.2 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.chess-filters__reset:hover {
  border-color: var(--gold);
  color: var(--ink);
}

.checkerboard__item--match {
  outline: 2px solid rgba(74, 15, 31, 0.55);
  outline-offset: -2px;
  box-shadow: 0 0 0 3px rgba(184, 149, 98, 0.28);
  z-index: 1;
}

.checkerboard__item--dimmed {
  opacity: 0.28;
  filter: grayscale(0.35);
}

.checkerboard__item--dimmed:hover {
  opacity: 0.55;
}

.chess-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 10px 14px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}

.chess-theme-toggle:hover {
  border-color: var(--gold);
  color: var(--ink);
}

.chess-theme-toggle__swatch {
  width: 14px;
  height: 14px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, var(--paper) 50%, #100e0d 50%);
}

/* Wine bottle status marker */
.status-bottle {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 11px;
  height: 34px;
  display: block;
  flex: none;
  pointer-events: none;
  --bottle-fill: 0%;
  --bottle-wine: transparent;
  --bottle-glass: rgba(11, 10, 9, 0.42);
}

.status-bottle--legend {
  position: relative;
  top: auto;
  left: auto;
  width: 12px;
  height: 36px;
}

.status-bottle__wine,
.status-bottle__glass {
  position: absolute;
  inset: 0;
}

.status-bottle__wine {
  overflow: hidden;
  -webkit-mask: url("assets/bottle-fill.png") center / 100% 100% no-repeat;
  mask: url("assets/bottle-fill.png") center / 100% 100% no-repeat;
}

.status-bottle__level {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--bottle-fill);
  background: var(--bottle-wine);
}

.status-bottle__glass {
  background: var(--bottle-glass);
  -webkit-mask: url("assets/bottle-outline.png") center / 100% 100% no-repeat;
  mask: url("assets/bottle-outline.png") center / 100% 100% no-repeat;
}

.status-bottle--available,
.checkerboard__item--available .status-bottle {
  --bottle-fill: 0%;
  --bottle-wine: transparent;
  --bottle-glass: rgba(11, 10, 9, 0.42);
}

.status-bottle--reserved,
.checkerboard__item--reserved .status-bottle {
  --bottle-fill: 30%;
  --bottle-wine: #b08d57;
  --bottle-glass: #b08d57;
}

.status-bottle--sold,
.checkerboard__item--sold .status-bottle,
.checkerboard__item--not_for_sale .status-bottle {
  --bottle-fill: 68%;
  --bottle-wine: #4a0f1f;
  --bottle-glass: #7c2438;
}

.checkerboard-container {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.checkerboard-container__area {
  overflow: auto;
  flex: 1;
  min-height: 420px;
  border: 1px solid var(--line);
  background: var(--paper-2);
}

.checkerboard-container__area__grid {
  padding: 14px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  width: 100%;
}

.checkerboard-row {
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: stretch;
  min-height: 0;
  flex-shrink: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.checkerboard-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.checkerboard-row__floor-label {
  width: 52px;
  min-width: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  padding-right: 10px;
  color: var(--ink);
}

.checkerboard-row__floor-label strong {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
}

.checkerboard-row__floor-label span {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.checkerboard-row__tiles {
  display: grid;
  grid-template-columns: repeat(var(--chess-cols, 9), minmax(0, 1fr));
  gap: 6px;
  align-items: stretch;
  flex: 1;
  min-width: 0;
}

.checkerboard__item {
  position: relative;
  width: auto;
  min-width: 0;
  max-width: none;
  height: auto;
  min-height: 96px;
  aspect-ratio: 1.05 / 1;
  flex: unset;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 0;
  padding: 22px 8px 14px;
  border: 0;
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  font: inherit;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(11, 10, 9, 0.04);
}

.checkerboard__item--available {
  background: var(--white);
}

.checkerboard__item--reserved {
  background: rgba(176, 141, 87, 0.14);
}

.checkerboard__item--sold,
.checkerboard__item--not_for_sale {
  background: rgba(11, 10, 9, 0.07);
  color: var(--muted);
}

.checkerboard__item:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 0 0 1px rgba(11, 10, 9, 0.08),
    0 8px 18px rgba(11, 10, 9, 0.06);
}

.checkerboard__item--inactive:hover {
  transform: none;
  box-shadow: inset 0 0 0 1px rgba(11, 10, 9, 0.04);
}

.checkerboard__item--selected {
  background: var(--wine);
  color: var(--paper);
  box-shadow: 0 10px 24px rgba(74, 15, 31, 0.22);
}

.checkerboard__item--selected:hover {
  transform: none;
  box-shadow: 0 10px 24px rgba(74, 15, 31, 0.22);
}

.checkerboard__item-number {
  position: absolute;
  top: 7px;
  right: 8px;
  margin: 0;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1;
  opacity: 0.42;
}

.checkerboard__item-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
  min-width: 0;
}

.checkerboard__item-rooms {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.8em;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(11, 10, 9, 0.06);
  color: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: lowercase;
}

.checkerboard__item--available .checkerboard__item-rooms {
  background: rgba(47, 107, 79, 0.12);
  color: var(--success);
}

.checkerboard__item-area {
  display: block;
  width: 100%;
  color: inherit;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.checkerboard__item-price {
  display: block;
  width: 100%;
  margin-top: 4px;
  color: inherit;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.checkerboard__item-status {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;
  line-height: 1.2;
}

.checkerboard__item-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-top: 4px;
  color: var(--danger);
  opacity: 0.78;
}

.checkerboard__item-lock svg {
  width: 18px;
  height: 18px;
  display: block;
}

.checkerboard__item--sold .checkerboard__item-rooms {
  background: rgba(11, 10, 9, 0.08);
  color: var(--muted);
}

.checkerboard__item--selected .checkerboard__item-number {
  opacity: 0.7;
  color: var(--paper);
}

.checkerboard__item--selected .checkerboard__item-rooms {
  background: rgba(255, 250, 243, 0.16);
  color: var(--paper);
}

.checkerboard__item--selected .checkerboard__item-area,
.checkerboard__item--selected .checkerboard__item-price,
.checkerboard__item--selected .checkerboard__item-status {
  color: var(--paper);
}

.checkerboard__item--selected .checkerboard__item-lock {
  color: var(--paper);
}

/* Dark wine theme (toggle) — colors only, grid geometry unchanged */
.chess-page-body.chess-theme-dark {
  --chess-bg: #100e0d;
  --chess-bg-soft: #161311;
  --chess-cream: #f4efe6;
  --chess-cream-70: rgba(244, 239, 230, 0.72);
  --chess-cream-50: rgba(244, 239, 230, 0.5);
  --chess-cream-28: rgba(244, 239, 230, 0.28);
  --chess-cream-20: rgba(244, 239, 230, 0.2);
  --chess-cream-12: rgba(244, 239, 230, 0.12);
  --chess-cream-02: rgba(244, 239, 230, 0.02);
  --chess-gold: #b08d57;
  --chess-gold-soft: rgba(176, 141, 87, 0.14);
  --chess-gold-border: rgba(176, 141, 87, 0.55);
  --chess-wine-border: rgba(124, 36, 56, 0.6);
  color: var(--chess-cream);
  background:
    radial-gradient(ellipse at 12% 0%, rgba(176, 141, 87, 0.08), transparent 42%),
    radial-gradient(ellipse at 90% 10%, rgba(74, 15, 31, 0.22), transparent 46%),
    var(--chess-bg);
}

.chess-theme-dark .site-header--chess {
  border-bottom-color: var(--chess-cream-12);
  background: rgba(16, 14, 13, 0.92);
}

.chess-theme-dark .site-header--chess .wordmark__name,
.chess-theme-dark .site-header--chess .header-nav a[aria-current="page"],
.chess-theme-dark .site-header--chess .header-nav a:hover {
  color: var(--chess-cream);
}

.chess-theme-dark .site-header--chess .header-nav a {
  color: var(--chess-cream-70);
}

.chess-theme-dark .site-header--chess .button--ink {
  background: var(--chess-gold);
  border-color: var(--chess-gold);
  color: var(--chess-bg);
}

.chess-theme-dark .site-header--chess .button--ink:hover {
  background: #c4a36e;
  border-color: #c4a36e;
  color: var(--chess-bg);
}

.chess-theme-dark .chess-theme-toggle {
  border-color: var(--chess-cream-20);
  color: var(--chess-cream-70);
}

.chess-theme-dark .chess-theme-toggle:hover {
  border-color: var(--chess-gold);
  color: var(--chess-cream);
  background: transparent;
}

.chess-theme-dark .chess-sidebar {
  border-color: var(--chess-cream-12);
  background: var(--chess-bg-soft);
}

.chess-theme-dark .chess-sidebar__label,
.chess-theme-dark .chess-sidebar__meta,
.chess-theme-dark .chess-sidebar__link small,
.chess-theme-dark .chess-main__head p {
  color: var(--chess-cream-50);
}

.chess-theme-dark .chess-sidebar__link {
  color: var(--chess-cream-70);
}

.chess-theme-dark .chess-sidebar__link:hover {
  border-color: var(--chess-cream-20);
  color: var(--chess-cream);
}

.chess-theme-dark .chess-sidebar__link.is-active {
  border-color: var(--chess-gold);
  background: var(--chess-gold-soft);
}

.chess-theme-dark .chess-sidebar__link.is-active strong {
  color: var(--chess-gold);
}

.chess-theme-dark .chess-main__head h1 {
  color: var(--chess-gold);
}

.chess-theme-dark .chess-legend {
  color: var(--chess-cream-70);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.chess-theme-dark .chess-filters {
  background: var(--chess-bg-soft);
  border-color: var(--chess-cream-20);
}

.chess-theme-dark .chess-filters__check,
.chess-theme-dark .chess-filters__label,
.chess-theme-dark .chess-filters__meta {
  color: var(--chess-cream-70);
}

.chess-theme-dark .chess-filters__check small,
.chess-theme-dark .chess-filters__dash {
  color: var(--chess-cream-40);
}

.chess-theme-dark .chess-filters__layout-btns,
.chess-theme-dark .chess-filters__discount {
  background: var(--chess-bg);
  border-color: var(--chess-cream-20);
}

.chess-theme-dark .chess-filters__layout,
.chess-theme-dark .chess-filters__mode {
  color: var(--chess-cream-60);
}

.chess-theme-dark .chess-filters__layout.is-active,
.chess-theme-dark .chess-filters__mode.is-active {
  background: var(--gold);
  color: #1a120c;
}

.chess-theme-dark .chess-filters__price-inputs input {
  background: var(--chess-bg);
  border-color: var(--chess-cream-20);
  color: var(--chess-cream);
}

.chess-theme-dark .chess-filters__discount {
  background: var(--chess-bg);
  border-color: var(--chess-cream-20);
}

.chess-theme-dark .chess-filters__mode {
  color: var(--chess-cream-60);
}

.chess-theme-dark .chess-filters__mode.is-active {
  background: var(--gold);
  color: #1a120c;
}

.chess-theme-dark .chess-filters__reset {
  border-color: var(--chess-cream-20);
  color: var(--chess-cream-60);
}

.chess-theme-dark .checkerboard__item--match {
  outline-color: rgba(184, 149, 98, 0.8);
  box-shadow: 0 0 0 3px rgba(184, 149, 98, 0.22);
}

.chess-theme-dark .checkerboard-container__area {
  border-color: var(--chess-cream-12);
  background: rgba(0, 0, 0, 0.22);
}

.chess-theme-dark .checkerboard-row {
  border-bottom-color: var(--chess-cream-12);
}

.chess-theme-dark .checkerboard-row__floor-label {
  border-right-color: var(--chess-cream-12);
  color: var(--chess-cream);
}

.chess-theme-dark .checkerboard-row__floor-label strong {
  color: var(--chess-gold);
}

.chess-theme-dark .checkerboard-row__floor-label span {
  color: var(--chess-cream-50);
}

.chess-theme-dark .checkerboard__item {
  background: var(--chess-cream-02);
  color: var(--chess-cream-70);
  box-shadow: none;
  border: 1px solid var(--chess-cream-28);
}

.chess-theme-dark .checkerboard__item--available {
  background: var(--chess-cream-02);
  border-color: var(--chess-cream-28);
  color: var(--chess-cream-70);
}

.chess-theme-dark .checkerboard__item--reserved {
  background: var(--chess-gold-soft);
  border-color: var(--chess-gold-border);
  color: var(--chess-gold);
}

.chess-theme-dark .checkerboard__item--sold,
.chess-theme-dark .checkerboard__item--not_for_sale {
  background: rgba(74, 15, 31, 0.18);
  border-color: var(--chess-wine-border);
  color: rgba(124, 36, 56, 0.95);
}

.chess-theme-dark .checkerboard__item:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--chess-gold);
  color: var(--chess-cream);
}

.chess-theme-dark .checkerboard__item--inactive:hover {
  border-color: inherit;
  color: inherit;
}

.chess-theme-dark .checkerboard__item--selected {
  background: var(--chess-gold-soft);
  color: var(--chess-cream);
  border-color: var(--chess-gold);
  box-shadow: none;
}

.chess-theme-dark .checkerboard__item--selected:hover {
  box-shadow: none;
}

.chess-theme-dark .checkerboard__item--available .checkerboard__item-rooms,
.chess-theme-dark .checkerboard__item--sold .checkerboard__item-rooms,
.chess-theme-dark .checkerboard__item--not_for_sale .checkerboard__item-rooms,
.chess-theme-dark .checkerboard__item--selected .checkerboard__item-rooms {
  background: rgba(244, 239, 230, 0.08);
  color: inherit;
}

.chess-theme-dark .checkerboard__item--selected .checkerboard__item-number,
.chess-theme-dark .checkerboard__item--selected .checkerboard__item-area,
.chess-theme-dark .checkerboard__item--selected .checkerboard__item-price,
.chess-theme-dark .checkerboard__item--selected .checkerboard__item-status {
  color: inherit;
}

.chess-theme-dark .checkerboard__item-price {
  color: var(--chess-gold);
}

.chess-theme-dark .status-bottle--available,
.chess-theme-dark .checkerboard__item--available .status-bottle {
  --bottle-glass: rgba(244, 239, 230, 0.85);
}

.chess-theme-dark .inventory-empty {
  color: var(--chess-cream-50);
}


.chess-tooltip {
  position: fixed;
  z-index: 1900;
  width: 280px;
  max-width: calc(100vw - 16px);
  box-sizing: border-box;
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 12px 36px rgba(11, 10, 9, 0.14);
  font-size: 13px;
  color: var(--ink);
  pointer-events: none;
}

.chess-tooltip[hidden] {
  display: none !important;
}

.chess-tooltip__img {
  width: 100%;
  max-height: 130px;
  object-fit: contain;
  margin-bottom: 8px;
  background: var(--paper-2);
  border: 1px solid var(--line);
}

.chess-tooltip__row {
  margin-bottom: 4px;
  color: var(--muted);
}

.chess-tooltip__row:last-child {
  margin-bottom: 0;
}

.chess-tooltip__row strong {
  color: var(--ink);
  font-weight: 500;
}

.unit-panel-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  justify-content: flex-end;
  background: rgba(8, 26, 38, 0.42);
  backdrop-filter: blur(4px);
}

.unit-panel-overlay[hidden],
.offer-modal-overlay[hidden] {
  display: none !important;
}

.unit-panel {
  width: min(62vw, 920px);
  max-width: 100%;
  height: 100%;
  background:
    linear-gradient(180deg, var(--paper-2), var(--paper) 28%, var(--paper));
  box-shadow: -24px 0 64px rgba(8, 26, 38, 0.28);
  display: flex;
  flex-direction: column;
  min-height: 0;
  animation: unit-panel-in 0.24s ease;
  border-left: 1px solid rgba(176, 141, 87, 0.22);
}

@keyframes unit-panel-in {
  from { transform: translateX(28px); opacity: 0.55; }
  to { transform: translateX(0); opacity: 1; }
}

.unit-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 250, 243, 0.72);
}

.unit-panel__header-text {
  min-width: 0;
}

.unit-panel__header h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.1;
}

.unit-panel__header-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.unit-panel__header-side {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.unit-panel__close {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.unit-panel__close:hover {
  border-color: var(--gold);
}

.unit-panel__body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 20px 24px 28px;
  display: grid;
  gap: 22px;
  align-content: start;
}

.result-card--panel {
  position: static;
  top: auto;
  display: grid;
  gap: 18px;
  padding: 22px 24px;
}

.result-card--panel h2 {
  margin: 0;
  font-size: 26px;
}

.result-card__top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.result-card__metrics {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.4fr);
  gap: 18px 28px;
  align-items: end;
}

.result-card--panel .result-primary {
  margin-top: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.result-breakdown--inline {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
}

.result-breakdown--inline div {
  padding-top: 10px;
}

.unit-panel__gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  min-width: 0;
}

.unit-panel__figure {
  margin: 0;
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--white);
}

.unit-panel__figure-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.unit-panel__figure-head figcaption {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.unit-panel__figure-head span {
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.unit-panel__zoom {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--paper-2);
  cursor: zoom-in;
  overflow: hidden;
}

.unit-panel__zoom:disabled {
  cursor: default;
}

.unit-panel__zoom:not(:disabled):hover .unit-panel__img {
  transform: scale(1.02);
}

.unit-panel__img {
  display: block;
  width: 100%;
  height: min(38vh, 340px);
  min-height: 260px;
  object-fit: contain;
  background: var(--paper-2);
  transition: transform 0.25s ease;
}

.unit-panel__img-empty {
  display: grid;
  place-items: center;
  height: min(38vh, 340px);
  min-height: 260px;
  color: var(--muted);
  background: var(--paper-2);
  font-size: 12px;
}

.unit-panel__img[hidden] + .unit-panel__img-empty {
  display: grid;
}

.unit-panel__img:not([hidden]) + .unit-panel__img-empty {
  display: none;
}

.unit-panel__result-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  gap: 8px;
  margin: 0 0 12px;
  min-width: 0;
  width: 100%;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: grid;
  place-items: center;
  padding: 24px;
}

.image-lightbox[hidden] {
  display: none !important;
}

.image-lightbox__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(8, 26, 38, 0.82);
  backdrop-filter: blur(6px);
  cursor: zoom-out;
}

.image-lightbox__dialog {
  position: relative;
  z-index: 1;
  width: min(1100px, calc(100vw - 48px));
  max-height: calc(100dvh - 48px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--paper);
  border: 1px solid rgba(176, 141, 87, 0.28);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

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

.image-lightbox__head h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
}

.image-lightbox__tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.image-lightbox__tool {
  min-width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink);
  padding: 0 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.image-lightbox__tool:hover {
  border-color: var(--gold);
}

.image-lightbox__zoom-value {
  min-width: 52px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.image-lightbox__stage {
  overflow: auto;
  min-height: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(176, 141, 87, 0.08), transparent 50%),
    var(--paper-2);
  cursor: grab;
  touch-action: none;
}

.image-lightbox__stage.is-dragging {
  cursor: grabbing;
}

.image-lightbox__img {
  display: block;
  width: 100%;
  height: min(82dvh, 860px);
  object-fit: contain;
  transform-origin: center center;
  transition: transform 0.12s ease;
  user-select: none;
  -webkit-user-drag: none;
}

.unit-panel__result-controls label {
  display: grid;
  gap: 4px;
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.unit-panel__result-controls select {
  border: 1px solid rgba(244, 239, 230, 0.22);
  background: rgba(255, 250, 243, 0.08);
  color: var(--paper);
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}

.unit-panel__result-controls select option {
  color: var(--ink);
  background: var(--white);
}

.unit-panel__facts-block,
.unit-panel__tools {
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--white);
}

.unit-panel__facts-block h3,
.unit-panel__tools h3 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
}

.unit-panel__fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 14px;
  margin: 0;
}

.unit-panel__fields div {
  display: grid;
  gap: 3px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.unit-panel__fields dt {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.unit-panel__fields dd {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.unit-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
}

.unit-panel__action {
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink);
  padding: 10px 14px;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.unit-panel__action:hover,
.unit-panel__action.is-active {
  border-color: var(--sea);
  background: rgba(14, 42, 59, 0.08);
  color: var(--sea);
}

.unit-panel__plan-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.unit-panel__plan-btn {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.unit-panel__plan-btn:hover,
.unit-panel__plan-btn.is-active {
  border-color: var(--gold);
  background: var(--gold-soft);
  color: var(--ink);
}

.unit-panel__plan-hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.4;
}

.unit-panel__fold {
  margin: 0 0 12px;
  border: 1px solid var(--line);
  background: var(--white);
}

.unit-panel__fold summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

.unit-panel__fold summary::-webkit-details-marker {
  display: none;
}

.unit-panel__fold summary::after {
  content: "▾";
  float: right;
  color: var(--muted);
}

.unit-panel__fold[open] summary::after {
  content: "▴";
}

.unit-panel__fold-body {
  display: grid;
  gap: 10px;
  padding: 0 14px 14px;
}

.unit-panel__fold-body .unit-panel__select-label {
  margin-bottom: 0;
}

.unit-panel__fold-body input[type="text"] {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink);
  padding: 10px 12px;
  font: 500 14px/1.2 var(--sans);
}

.unit-panel__fold-body input[type="text"].is-invalid {
  border-color: #c45c4a;
  background: #fdf4f2;
}

.unit-panel__plan-hint--error {
  color: #c45c4a;
}

.unit-panel__calc {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--paper-2);
}

.unit-panel__select-label {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--muted);
}

.unit-panel__result-controls--discounts {
  margin: 0 0 12px;
}

.unit-panel__result-controls--discounts label {
  color: var(--ink);
  opacity: 1;
}

.unit-panel__result-controls--discounts input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink);
  padding: 10px 12px;
  font: 500 14px/1.2 var(--sans);
}

.unit-panel__result-controls--discounts input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}

.chess-theme-dark .unit-panel__result-controls--discounts input {
  background: var(--chess-bg);
  border-color: var(--chess-cream-20);
  color: var(--chess-cream);
}

.unit-panel__select-label select,
.unit-panel__select-label input {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  padding: 9px 11px;
  font: inherit;
}

.unit-panel__mortgage-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.unit-panel__summary {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.unit-panel__summary strong {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  color: var(--sea);
}

.unit-panel__summary span,
.unit-panel__summary-line {
  display: block;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.unit-panel__subhead {
  margin: 14px 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink, #2b211d);
}

.unit-panel__table-wrap {
  max-height: 240px;
  overflow: auto;
  margin: 0;
  background: var(--white);
}

.unit-panel__footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

.offer-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.4);
}

.offer-modal {
  width: min(420px, 100%);
  background: #fff;
  padding: 18px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.offer-modal--yield {
  width: min(920px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.yield-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.yield-modal__head h3 {
  margin: 0;
}

.yield-modal__meta {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted, #756b65);
}

.yield-modal__summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.yield-modal__summary div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line, #e4ddd2);
  background: var(--paper-2, #f7f2ea);
}

.yield-modal__summary span {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted, #756b65);
}

.yield-modal__summary strong {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink, #1f1a17);
}

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

.yield-modal__controls label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--muted, #756b65);
}

.yield-modal__controls select,
.yield-modal__controls input {
  border: 1px solid var(--line, #e4ddd2);
  background: #fff;
  color: var(--ink, #1f1a17);
  padding: 9px 11px;
  font: inherit;
}

.yield-modal__table-wrap {
  margin-bottom: 12px;
  max-height: 320px;
  overflow: auto;
}

.yield-modal__note {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted, #756b65);
  line-height: 1.4;
}

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

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

@media (max-width: 520px) {
  .yield-modal__summary,
  .yield-modal__controls {
    grid-template-columns: 1fr;
  }
}

.offer-modal h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.offer-modal__checks {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
}

.offer-modal__checks label {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 8px 4px;
  text-align: left;
  color: var(--ink);
  letter-spacing: 0.08em;
  font-size: 12px;
  cursor: pointer;
}

.offer-modal__checks input[type="checkbox"] {
  appearance: auto;
  width: 16px;
  height: 16px;
  min-width: 16px;
  max-width: 16px;
  flex: 0 0 16px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  accent-color: var(--sea);
}

.offer-modal__checks input[type="checkbox"]:hover,
.offer-modal__checks input[type="checkbox"]:focus {
  border: 0;
  box-shadow: none;
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.offer-modal__checks label span {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
  text-align: left;
}

.offer-modal .button[disabled] {
  opacity: 0.6;
  pointer-events: none;
}

.offer-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

@media (max-width: 1100px) {
  .unit-panel {
    width: min(92vw, 100%);
  }

  .result-card__metrics,
  .unit-panel__fields {
    grid-template-columns: 1fr;
  }

  .result-breakdown--inline {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .chess-page {
    grid-template-columns: 1fr;
  }

  .chess-sidebar__nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .unit-panel {
    width: 100%;
  }

  .unit-panel__gallery,
  .unit-panel__result-controls,
  .unit-panel__mortgage-grid {
    grid-template-columns: 1fr;
  }

  .unit-panel__img,
  .unit-panel__img-empty {
    height: 240px;
    min-height: 240px;
  }
}

/* ---------- mobile phone (<=768) ---------- */
.chess-mobile-bar {
  display: none;
}

@media (max-width: 768px) {
  .page {
    width: calc(100% - 24px);
    margin: 16px auto 40px;
  }

  .proposal-intro h1 {
    font-size: clamp(28px, 9vw, 40px);
  }

  .segmented {
    flex-wrap: wrap;
  }

  .segmented button {
    flex: 1 1 auto;
    min-width: calc(50% - 4px);
  }

  .lot-card__head {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .lot-card__head .button {
    width: 100%;
    justify-content: center;
  }

  .inventory-dialog {
    width: 100%;
    max-height: 100dvh;
    height: 100dvh;
    margin: 0;
  }

  .dialog-shell {
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
  }

  .dialog-head,
  .dialog-head--inventory {
    min-height: 0;
    padding: 16px 14px 12px;
    gap: 12px;
  }

  .dialog-head h2,
  .dialog-head--inventory h2 {
    font-size: 22px;
  }

  .inventory-toolbar {
    padding: 10px 14px;
    justify-content: flex-start;
  }

  .inventory-spatial-panel {
    padding: 12px 14px 16px;
  }

  .docs-shell,
  .faq-shell {
    padding: 14px;
  }

  .docs-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .docs-breadcrumbs {
    flex-wrap: wrap;
    row-gap: 4px;
    max-width: 100%;
  }

  .docs-card--image img {
    width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: cover;
  }

  .faq-answer,
  .faq-item summary {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .faq-answer a {
    overflow-wrap: anywhere;
  }

  .chess-page-body {
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
  }

  .chess-page {
    width: 100%;
    margin: 0;
    padding: 8px 8px 10px;
    gap: 8px;
    flex: 1;
    min-height: 0;
    height: auto;
    max-height: none;
    grid-template-columns: 1fr;
  }

  .chess-sidebar {
    display: none;
  }

  .chess-mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    position: relative;
    z-index: 20;
  }

  .chess-mobile-bar__picker {
    position: relative;
    flex: 1;
    min-width: 0;
  }

  .chess-mobile-building-btn {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--white);
    color: var(--ink);
    padding: 11px 14px;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    border-radius: 10px;
  }

  .chess-mobile-building-btn[aria-expanded="true"] {
    border-color: var(--gold);
  }

  .chess-mobile-bar__meta {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .chess-mobile-building-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    max-height: min(60vh, 420px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(11, 10, 9, 0.16);
    padding: 6px;
    z-index: 40;
  }

  .chess-mobile-building-menu[hidden] {
    display: none !important;
  }

  .chess-mobile-building-option {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 0;
    background: transparent;
    color: var(--ink);
    padding: 11px 12px;
    font: inherit;
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
  }

  .chess-mobile-building-option strong {
    font-size: 14px;
    font-weight: 500;
  }

  .chess-mobile-building-option small {
    color: var(--muted);
    font-size: 12px;
  }

  .chess-mobile-building-option.is-active,
  .chess-mobile-building-option:hover {
    background: rgba(14, 42, 59, 0.08);
  }

  .chess-mobile-building-option.is-active strong {
    color: var(--sea);
  }

  .chess-main {
    min-height: 0;
    height: 100%;
  }

  .chess-main__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .chess-main__head h1 {
    font-size: 24px;
  }

  .chess-main__head p {
    font-size: 12px;
  }

  .chess-legend {
    gap: 8px 12px;
    font-size: 12px;
  }

  .chess-filters {
    padding: 10px;
    gap: 10px;
  }

  .chess-filters__price-inputs input {
    width: 72px;
  }

  .chess-filters__reset {
    margin-left: 0;
    width: 100%;
  }

  .checkerboard-container {
    min-height: 240px;
  }

  .checkerboard-container__area {
    min-height: 240px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .checkerboard-container__area__grid {
    width: max-content;
    min-width: min-content;
    padding: 10px 8px 14px;
    gap: 4px;
  }

  .checkerboard-row {
    gap: 6px;
    padding-bottom: 6px;
  }

  .checkerboard-row__floor-label {
    width: 36px;
    min-width: 36px;
    padding-right: 6px;
  }

  .checkerboard-row__floor-label strong {
    font-size: 18px;
  }

  .checkerboard-row__floor-label span {
    font-size: 9px;
    letter-spacing: 0.06em;
  }

  .checkerboard-row__tiles {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    flex: 0 0 auto;
    min-width: min-content;
    width: max-content;
  }

  .checkerboard__item {
    width: 80px;
    min-width: 80px;
    max-width: 80px;
    height: 68px;
    min-height: 68px;
    aspect-ratio: auto;
    flex: 0 0 80px;
    padding: 14px 4px 8px;
    border-radius: 8px;
  }

  .checkerboard__item-number {
    top: 4px;
    right: 5px;
    font-size: 10px;
  }

  .checkerboard__item-area {
    font-size: 12px;
  }

  .checkerboard__item-price {
    font-size: 10px;
  }

  .checkerboard__item-status {
    font-size: 10px;
  }

  .status-bottle {
    top: 5px;
    left: 5px;
    width: 9px;
    height: 28px;
  }

  .unit-panel-overlay {
    align-items: stretch;
  }

  .unit-panel {
    width: 100%;
    height: 100%;
    max-height: 100dvh;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .unit-panel__body {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }

  .chess-theme-dark .chess-mobile-building-btn {
    background: var(--chess-bg-soft);
    border-color: var(--chess-cream-20);
    color: var(--chess-cream);
  }

  .chess-theme-dark .chess-mobile-building-menu {
    background: var(--chess-bg-soft);
    border-color: var(--chess-cream-20);
  }

  .chess-theme-dark .chess-mobile-building-option {
    color: var(--chess-cream-70);
  }

  .chess-theme-dark .chess-mobile-building-option.is-active,
  .chess-theme-dark .chess-mobile-building-option:hover {
    background: var(--chess-gold-soft);
  }

  .chess-theme-dark .chess-mobile-building-option.is-active strong {
    color: var(--chess-gold);
  }

  .chess-theme-dark .chess-mobile-bar__meta {
    color: var(--chess-cream-50);
  }

  .portal-hero__ctas .button,
  .portal-hero__ctas .button--ink {
    width: 100%;
    justify-content: center;
  }
}


/* ---------- portal landing ---------- */
.portal-body {
  background: var(--paper);
}

.portal-wrap {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header--portal {
  border-bottom-color: rgba(244, 239, 230, 0.1);
  background: rgba(11, 10, 9, 0.86);
  backdrop-filter: blur(10px);
}

.site-header--portal .wordmark__name,
.site-header--portal .header-nav a[aria-current="page"],
.site-header--portal .header-nav a:hover {
  color: var(--paper);
}

.site-header--portal .header-nav a {
  color: rgba(244, 239, 230, 0.72);
}

.site-header--portal .button--ink {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}

.site-header--portal .button--ink:hover {
  background: #c4a36e;
  border-color: #c4a36e;
  color: var(--ink);
}

.portal-eyebrow {
  margin: 0 0 22px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 7px 14px;
  border: 1px solid currentColor;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  opacity: 0.92;
}

.portal-eyebrow--wine {
  color: var(--wine);
}

.portal-hero {
  position: relative;
  overflow: hidden;
  color: var(--paper);
  padding: 88px 0 70px;
  background:
    radial-gradient(ellipse at 15% 10%, rgba(124, 36, 56, 0.45), transparent 55%),
    radial-gradient(ellipse at 85% 90%, rgba(44, 88, 114, 0.45), transparent 55%),
    linear-gradient(155deg, var(--sea-deep) 0%, #14100e 45%, var(--wine-deep) 100%);
}

.portal-hero__vine {
  position: absolute;
  right: -4%;
  top: 50%;
  transform: translateY(-50%);
  width: min(420px, 38vw);
  color: var(--gold);
  opacity: 0.16;
  z-index: 0;
  pointer-events: none;
}

.portal-hero__inner {
  position: relative;
  z-index: 1;
}

.portal-hero h1 {
  margin: 0;
  max-width: 14ch;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(38px, 6.6vw, 74px);
  line-height: 1.05;
  color: var(--paper);
}

.portal-hero h1 em {
  color: var(--gold);
  font-style: italic;
  font-weight: 400;
}

.portal-hero__lede {
  margin: 26px 0 0;
  max-width: 56ch;
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--paper-dim);
}

.portal-hero__ctas {
  margin-top: 38px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.portal-hero__ctas .button {
  border-color: var(--gold);
  color: var(--paper);
}

.portal-hero__ctas .button:hover {
  background: var(--gold);
  color: var(--ink);
}

.portal-hero__ctas .button--ink {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}

.portal-hero__ctas .button--ink:hover {
  background: #c4a36e;
  border-color: #c4a36e;
  color: var(--ink);
}

.portal-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin-top: 52px;
  background: rgba(244, 239, 230, 0.14);
}

.portal-stats__item {
  background: var(--wine-deep);
  padding: 26px 18px;
}

.portal-stats__num {
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1;
  color: var(--gold);
}

.portal-stats__label {
  font-size: 12px;
  line-height: 1.5;
  color: var(--paper-dim);
}

.portal-section {
  padding: 88px 0;
}

.portal-section__head {
  max-width: 640px;
}

.portal-section__head h2 {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 4.4vw, 44px);
  line-height: 1.08;
}

.portal-section__head > p {
  margin: 0;
  max-width: 58ch;
  font-size: 16px;
  line-height: 1.75;
  color: var(--muted);
}

.portal-section--about {
  background: var(--paper);
}

.portal-feature-note {
  margin-top: 28px;
  padding-left: 22px;
  border-left: 1px solid var(--gold);
}

.portal-feature-note h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--wine);
}

.portal-feature-note p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--muted);
}

.portal-section--tools {
  background: var(--sea-deep);
  color: var(--paper);
}

.portal-section--tools .portal-section__head > p {
  color: rgba(244, 239, 230, 0.82);
}

.portal-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 48px;
  background: rgba(244, 239, 230, 0.14);
}

.portal-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
  padding: 36px 28px;
  background: var(--sea-deep);
  color: inherit;
  text-decoration: none;
  transition: background 0.25s ease;
}

.portal-card:hover {
  background: #0b2030;
}

.portal-card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--gold);
}

.portal-card p {
  margin: 0;
  flex: 1;
  font-size: 14.5px;
  line-height: 1.65;
  color: rgba(244, 239, 230, 0.8);
}

.portal-card__cta {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper);
}

.portal-section--location {
  background: var(--wine);
  color: var(--paper);
}

.portal-section--location .portal-section__head h2 {
  color: var(--paper);
}

.portal-section--location .portal-section__head > p {
  color: rgba(244, 239, 230, 0.85);
}

.portal-section--manifest {
  background: var(--paper);
}

.portal-manifest {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin-top: 36px;
  background: var(--paper-dim);
}

.portal-corpus {
  background: var(--paper);
  padding: 24px 14px;
  text-align: center;
}

.portal-corpus__code {
  font-family: var(--serif);
  font-size: 26px;
  color: var(--wine);
}

.portal-corpus__lbl {
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.portal-manifest__note {
  margin: 18px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.portal-manifest__cta {
  margin-top: 24px;
}

.portal-footer {
  background: var(--ink);
  color: rgba(244, 239, 230, 0.7);
  padding: 56px 0 30px;
}

.portal-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(244, 239, 230, 0.12);
  font-size: 12.5px;
}

.portal-footer__brand {
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: 0.22em;
  color: var(--paper);
}

.portal-footer__note {
  margin: 20px 0 0;
  font-size: 12px;
  opacity: 0.7;
}

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

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

  .portal-cards {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .portal-wrap {
    width: calc(100% - 32px);
  }

  .portal-hero,
  .portal-section {
    padding: 64px 0;
  }
}

/* ---------- shared portal header (all pages) ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 10, 9, 0.86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(244, 239, 230, 0.1);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  max-width: 1180px;
  margin: 0 auto;
  gap: 16px;
}

@media (max-width: 560px) {
  .nav-inner {
    padding: 16px 22px;
  }
}

.nav__logo {
  font-family: "Fraunces", "Cormorant Garamond", Georgia, serif;
  font-size: 19px;
  letter-spacing: 0.3em;
  color: #f4efe6;
  text-decoration: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-fix-btn,
.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: transparent;
  border: 1px solid #b08d57;
  color: #f4efe6;
  padding: 10px 18px;
  font-family: "Jost", sans-serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.35s ease, color 0.35s ease;
}

.nav-fix-btn:hover,
.nav-btn:hover {
  background: #b08d57;
  color: #0b0a09;
}

.nav-menu {
  position: relative;
}

.nav-btn svg {
  width: 10px;
  height: 10px;
  transition: transform 0.2s ease;
}

.nav-btn[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.nav-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: min(300px, calc(100vw - 24px));
  background: #f4efe6;
  border: 1px solid rgba(176, 141, 87, 0.35);
  box-shadow: 0 24px 50px rgba(11, 10, 9, 0.35);
  padding: 10px;
  display: none;
  z-index: 120;
}

.nav-panel.open {
  display: block;
}

.nav-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 13px 14px;
  text-decoration: none;
  color: #0b0a09;
}

.nav-item:hover {
  background: #e7ded0;
}

.nav-item .t {
  font-family: "Fraunces", "Cormorant Garamond", Georgia, serif;
  font-size: 17px;
  font-weight: 500;
}

.nav-item .d {
  display: none;
}

.nav-sep {
  height: 1px;
  background: #e7ded0;
  margin: 6px 4px;
}

.nav-actions .chess-theme-toggle {
  border-color: rgba(244, 239, 230, 0.28);
  color: rgba(244, 239, 230, 0.78);
  background: transparent;
}

.nav-actions .chess-theme-toggle:hover {
  border-color: #b08d57;
  color: #f4efe6;
  background: transparent;
}

@media (max-width: 768px) {
  .nav-inner {
    padding: 12px 14px;
    gap: 10px;
    align-items: flex-start;
  }

  .nav__logo {
    font-size: 15px;
    letter-spacing: 0.18em;
    padding-top: 6px;
  }

  .nav-actions {
    gap: 6px;
    max-width: calc(100% - 90px);
  }

  .nav-actions > .nav-fix-btn {
    display: none;
  }

  .nav-fix-btn,
  .nav-btn,
  .nav-actions .chess-theme-toggle {
    padding: 8px 10px;
    font-size: 10px;
    letter-spacing: 0.12em;
    gap: 6px;
  }

  .nav-item .d {
    display: none;
  }

  .nav-item {
    padding: 11px 12px;
  }

  .nav-item .t {
    font-size: 15px;
  }
}

/* ---------- fixation form ---------- */
.fixation-page .proposal-intro p {
  max-width: 62ch;
}

.fixation-shell {
  margin-top: 28px;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.fixation-form {
  padding: 28px;
}

.fixation-form__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 28px;
  align-items: start;
}

.fixation-fieldset {
  margin: 0 0 24px;
  padding: 0;
  border: 0;
}

.fixation-fieldset legend {
  margin-bottom: 14px;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  color: var(--wine);
}

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

.fixation-fields label:nth-child(1),
.fixation-fields label:nth-child(4),
.fixation-comment {
  grid-column: 1 / -1;
}

.fixation-comment textarea {
  width: 100%;
  min-height: 180px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink);
  padding: 14px;
  font: 400 14px/1.5 var(--sans);
  resize: vertical;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.fixation-comment textarea:hover,
.fixation-comment textarea:focus {
  border-color: var(--gold);
  outline: none;
  box-shadow: 0 0 0 3px var(--gold-soft);
}

.fixation-form__aside {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 96px;
}

.fixation-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.fixation-submit {
  width: 100%;
  justify-content: center;
}

.fixation-status {
  margin: 0;
  min-height: 1.4em;
  font-size: 13px;
  color: var(--muted);
}

.fixation-status--error {
  color: #9b2c2c;
}

.fixation-status--pending {
  color: var(--wine);
}

.fixation-success {
  padding: 48px 28px;
  text-align: center;
}

.fixation-success h2 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 400;
  color: var(--wine);
}

.fixation-success p {
  margin: 0 0 24px;
  color: var(--muted);
}

.fixation-telegram {
  margin-top: 28px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(74, 15, 31, 0.04), rgba(14, 42, 59, 0.05));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.fixation-telegram p {
  margin: 0;
  max-width: 52ch;
  color: var(--muted);
}

.fixation-autocomplete {
  position: relative;
}

.fixation-autocomplete__list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.fixation-autocomplete__item {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 11px 14px;
  font: 400 14px/1.4 var(--sans);
  color: var(--ink);
  cursor: pointer;
}

.fixation-autocomplete__item:hover {
  background: var(--paper-dim);
}

@media (max-width: 900px) {
  .fixation-form__grid {
    grid-template-columns: 1fr;
  }

  .fixation-form__aside {
    position: static;
  }

  .fixation-fields {
    grid-template-columns: 1fr;
  }
}
