/* Layout: an auction lot sheet. The domain set huge beside a pinned bid panel, then the case for the name,
   a spec sheet, the bid ledger with the offer form, and the sale steps. A Sadu weave band is the one bold motif. */
:root {
  --haze: #EAF0EF;        /* Gulf haze ground */
  --surface: #F7FAFA;
  --ink: #10252C;
  --muted: #56696E;
  --rule: #C9D7D6;
  --tower: #0D6976;       /* Kuwait Towers enamel */
  --tower-soft: #D2E6E7;
  --ok: #1E7449;
  --err: #A3241C;
  /* Sadu weave: fixed wool colours, the same in both themes */
  --weave: #1E1715;
  --sadu: #A82A1F;
  --saffron: #D9A441;
  --wool: #EFE8DC;

  --display: "Reem Kufi", "Readex Pro", "Segoe UI", system-ui, sans-serif;
  --body: "Readex Pro", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", "Cascadia Mono", Consolas, ui-monospace, monospace;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: 2.2rem;
  --radius: 4px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --haze: #0A171B; --surface: #10232A; --ink: #E1EBEA; --muted: #94A9AD; --rule: #253B41;
    --tower: #55BAC6; --tower-soft: #153840; --ok: #63C792; --err: #F08A80; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --haze: #0A171B; --surface: #10232A; --ink: #E1EBEA; --muted: #94A9AD; --rule: #253B41;
  --tower: #55BAC6; --tower-soft: #153840; --ok: #63C792; --err: #F08A80; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--haze);
  color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--body);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--tower); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, label:focus-within {
  outline: 2px solid var(--tower); outline-offset: 2px;
}
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }

.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.eyebrow {
  font-size: var(--step--1); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 500;
}

/* Sadu weave band */
.sadu {
  height: 26px;
  border-block: 3px solid var(--wool);
  background:
    linear-gradient(135deg, var(--sadu) 25%, transparent 25%) -10px 0 / 20px 20px,
    linear-gradient(225deg, var(--sadu) 25%, transparent 25%) -10px 0 / 20px 20px,
    linear-gradient(315deg, var(--saffron) 25%, transparent 25%) 0 0 / 20px 20px,
    linear-gradient(45deg, var(--saffron) 25%, transparent 25%) 0 0 / 20px 20px,
    var(--weave);
}
.sadu.thin { height: 12px; border-block-width: 2px; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 18px; }
.mark { font: 700 1.35rem/1 var(--display); color: var(--ink); text-decoration: none; letter-spacing: 0.01em; }
.mark span { color: var(--tower); }
.mark .tld { color: var(--muted); font-weight: 500; }
.top nav { display: flex; gap: 6px 22px; flex-wrap: wrap; font-size: var(--step--1); }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--ink); }
.top nav .nav-cta { color: var(--tower); font-weight: 600; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
  padding-block: clamp(28px, 6vw, 72px) clamp(36px, 6vw, 80px);
}
.hero-copy { min-width: 0; display: grid; gap: 18px; position: relative; }
.domain {
  font: 700 clamp(2.5rem, 8.6vw, 6.8rem)/0.95 var(--display);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.domain em { font-style: normal; color: var(--tower); }
.domain span { color: var(--muted); font-weight: 500; font-size: 0.42em; letter-spacing: 0; margin-left: 0.04em; }
.arabic { font: 500 clamp(1.4rem, 3.4vw, 2.1rem)/1.2 var(--display); color: var(--tower); }
.lede { font-size: var(--step-1); line-height: 1.55; max-width: 34em; font-weight: 300; }
.lede strong { font-weight: 500; }
.quick { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 28px; }
.quick li { display: grid; gap: 2px; }
.quick b { font: 500 var(--step-2)/1 var(--mono); font-variant-numeric: tabular-nums; }
.quick span { font-size: var(--step--1); color: var(--muted); }
.hero-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.towers { flex: none; width: clamp(64px, 9vw, 104px); height: auto; color: var(--tower); opacity: 0.9; }

/* Bid panel */
.panel {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 28px);
  display: grid;
  gap: 18px;
  position: sticky;
  top: calc(16px + env(safe-area-inset-top, 0px));
  box-shadow: 0 1px 0 var(--rule), 0 18px 40px -28px rgba(10, 30, 36, 0.45);
}
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: var(--step--1); font-weight: 500; color: var(--ok); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status.closed { color: var(--err); }
.figure { display: grid; gap: 2px; }
.figure .big { font: 500 clamp(2.1rem, 4.6vw, 2.9rem)/1.05 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.figure .kd { color: var(--muted); font: 400 var(--step--1) var(--mono); }
.figure .sub { font-size: var(--step--1); color: var(--muted); }
.panel hr { border: 0; border-top: 1px dashed var(--rule); margin: 0; width: 100%; }
.buy-row { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; }
.buy-row .price { font: 500 var(--step-2)/1.1 var(--mono); font-variant-numeric: tabular-nums; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: var(--radius);
  font: 600 var(--step-0)/1 var(--body); text-decoration: none; cursor: pointer;
  border: 1px solid var(--tower); transition: background-color 0.15s, color 0.15s, transform 0.15s;
}
.btn.primary { background: var(--tower); color: var(--surface); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--tower); }
.btn.ghost:hover { background: var(--tower-soft); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.55; cursor: progress; }
.fine { font-size: var(--step--1); color: var(--muted); line-height: 1.5; }

/* Sections */
.section { padding-block: clamp(44px, 7vw, 88px); border-top: 1px solid var(--rule); }
.section-head { display: grid; gap: 10px; max-width: 46em; margin-bottom: clamp(24px, 4vw, 40px); }
.section-head h2 { font: 700 var(--step-3)/1.15 var(--display); }
.section-head p { color: var(--muted); font-size: var(--step-1); font-weight: 300; }

.reasons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px clamp(28px, 5vw, 64px); }
.reason { display: grid; gap: 8px; min-width: 0; padding-top: 16px; border-top: 2px solid var(--ink); }
.reason h3 { font: 600 var(--step-1)/1.3 var(--body); }
.reason p { color: var(--muted); max-width: 36em; }
.uses { list-style: none; padding: 0; margin: clamp(28px, 4vw, 40px) 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.uses li { padding: 6px 12px; border: 1px solid var(--rule); border-radius: 999px; font-size: var(--step--1); background: var(--surface); }
.uses .lbl { border: 0; background: none; padding-left: 0; color: var(--muted); }

/* Spec sheet */
.spec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(28px, 5vw, 64px); margin: 0; }
.spec div { display: grid; grid-template-columns: 11em minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.spec dt { color: var(--muted); font-size: var(--step--1); letter-spacing: 0.04em; text-transform: uppercase; }
.spec dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.spec dd .num { font-size: 0.95em; }
.spec [lang="ar"] { font-family: var(--display); font-size: 1.15em; }

/* Ledger + form */
.offer-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.ledger { min-width: 0; display: grid; gap: 14px; }
.ledger h3, .form-title { font: 600 var(--step-1)/1.3 var(--body); }
.ledger-table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.ledger-table th { text-align: left; font-weight: 500; color: var(--muted); padding: 8px 0; border-bottom: 1px solid var(--ink); }
.ledger-table td { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.ledger-table td.amt, .ledger-table th.amt { text-align: right; }
.ledger-table td.amt { font: 500 var(--step-0) var(--mono); font-variant-numeric: tabular-nums; }
.ledger-table tr.top-bid td.amt { color: var(--tower); }
.ledger-empty { padding: 18px; border: 1px dashed var(--rule); border-radius: var(--radius); color: var(--muted); }

form.offer { min-width: 0; display: grid; gap: 18px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); }
.modes { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.modes legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.modes label { display: block; text-align: center; padding: 11px 6px; font-size: var(--step--1); font-weight: 500; cursor: pointer; color: var(--muted); border-left: 1px solid var(--rule); }
.modes label:first-of-type { border-left: 0; }
.modes input { position: absolute; opacity: 0; pointer-events: none; }
.modes label:has(input:checked) { background: var(--ink); color: var(--surface); }
.field { display: grid; gap: 6px; min-width: 0; }
.field label, .field .label { font-size: var(--step--1); font-weight: 500; }
.field .hint { font-size: var(--step--1); color: var(--muted); }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], textarea {
  width: 100%; min-width: 0; font: 400 var(--step-0)/1.4 var(--body); color: var(--ink);
  background: var(--haze); border: 1px solid var(--rule); border-radius: var(--radius); padding: 11px 12px;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, textarea:focus { border-color: var(--tower); outline: none; box-shadow: 0 0 0 3px var(--tower-soft); }
.money { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: stretch; }
.money span { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--rule); border-right: 0; border-radius: var(--radius) 0 0 var(--radius); font: 500 var(--step--1) var(--mono); color: var(--muted); background: var(--surface); }
.money input { border-radius: 0 var(--radius) var(--radius) 0; font-family: var(--mono); font-size: var(--step-1); font-variant-numeric: tabular-nums; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 12px 14px; border-radius: var(--radius); font-size: var(--step--1); border: 1px solid currentColor; }
.notice.ok { color: var(--ok); }
.notice.err { color: var(--err); }
.notice[hidden] { display: none; }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; counter-reset: step; }
.steps li { counter-increment: step; display: grid; gap: 8px; align-content: start; padding: 18px 18px 18px 0; border-top: 2px solid var(--ink); min-width: 0; }
.steps li::before { content: counter(step); font: 500 var(--step-2)/1 var(--mono); color: var(--tower); }
.steps h3 { font: 600 var(--step-0)/1.35 var(--body); }
.steps p { color: var(--muted); font-size: var(--step--1); }

/* FAQ */
.faq { display: grid; gap: 0; max-width: 52em; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 var(--step-1)/1 var(--mono); color: var(--tower); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 18px; color: var(--muted); max-width: 44em; }

/* Footer */
.foot { padding-block: 28px 36px; display: flex; justify-content: space-between; gap: 10px 28px; flex-wrap: wrap; font-size: var(--step--1); color: var(--muted); }
.foot .mark { font-size: 1.05rem; }

@media (max-width: 920px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .panel { position: static; }
  .offer-grid { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .reasons, .row2 { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .spec div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .towers { display: none; }
  .top nav a:not(.nav-cta) { display: none; }
  .actions { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
