/* Eastking Client Deal Room — White & Gold, refined luxury. */

:root {
  --ink: #1b1f24;
  --ink-soft: #39414a;
  --muted: #787771;
  --gold: #b08d57;
  --gold-deep: #8a6a38;
  --gold-pale: #f4ecdd;
  --line: #e7e0d3;
  --line-soft: #f0ebe1;
  --paper: #ffffff;
  --cream: #faf7f1;
  --cream-2: #f6f1e7;
  --ok: #2f6b52;
  --ok-pale: #eaf3ee;
  --warn: #8a5a1a;
  --warn-pale: #fbf3e4;
  --danger: #9b3b32;
  --danger-pale: #fbeeec;
  --shadow: 0 18px 44px rgba(31, 26, 17, .06);
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -.01em;
  margin: 0;
  color: var(--ink);
}

h1 { font-size: clamp(30px, 4.2vw, 44px); line-height: 1.1; }
h2 { font-size: clamp(21px, 2.4vw, 27px); line-height: 1.2; }
h3 { font-size: 19px; }
p { margin: 0 0 12px; }

.eyebrow {
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 700;
}

.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; line-height: 1.55; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

/* ------------------------------------------------------------------ Shell -- */

.topbar {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}
.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand img { height: 40px; width: auto; display: block; }
.brand-divider { width: 1px; height: 28px; background: var(--line); }
.brand-label {
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.nav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.nav a {
  font-size: 12.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}
.nav a:hover { color: var(--gold-deep); text-decoration: none; }
.nav form { margin: 0; }
.linkish {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 12.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
  cursor: pointer;
}
.linkish:hover { color: var(--danger); }

.shell { max-width: 1180px; margin: 0 auto; padding: 38px 26px 60px; }
.shell-narrow { max-width: 820px; margin: 0 auto; padding: 38px 26px 60px; }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.page-head h1 { font-size: clamp(26px, 3.2vw, 36px); }
.page-head .sub { color: var(--muted); font-size: 13.5px; margin-top: 6px; }

/* ------------------------------------------------------------------ Cards -- */

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: var(--shadow);
  padding: 26px;
}
.card + .card { margin-top: 22px; }
.card-flush { padding: 0; overflow: hidden; }
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.card-head h2, .card-head h3 { font-size: 21px; }
.card-head .sub { color: var(--muted); font-size: 12.5px; margin-top: 4px; }

.hairline { height: 1px; background: var(--line); border: 0; margin: 20px 0; }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: minmax(0, 1.42fr) minmax(280px, .78fr); align-items: start; }
.grid-2-even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack > * + * { margin-top: 22px; }

/* ------------------------------------------------------------------ Buttons -- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  font-size: 12px;
  letter-spacing: .09em;
  text-transform: uppercase;
  font-weight: 700;
  border-radius: 2px;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.btn:hover { background: #000; text-decoration: none; color: #fff; }
.btn-gold { background: var(--gold); border-color: var(--gold); }
.btn-gold:hover { background: var(--gold-deep); border-color: var(--gold-deep); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--cream-2); color: var(--ink); border-color: var(--gold); }
.btn-danger { background: transparent; color: var(--danger); border-color: #e7cfcb; }
.btn-danger:hover { background: var(--danger-pale); color: var(--danger); }
.btn-sm { padding: 8px 12px; font-size: 10.5px; letter-spacing: .07em; }
.btn[disabled], .btn.is-disabled { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ------------------------------------------------------------------ Forms -- */

.field { margin-bottom: 16px; }
.field label, .label {
  display: block;
  font-size: 11px;
  letter-spacing: .13em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 7px;
}
.field input[type=text], .field input[type=email], .field input[type=password],
.field input[type=date], .field input[type=tel], .field input[type=number],
.field input[type=search], .field select, .field textarea {
  width: 100%;
  border: 1px solid #d9d2c4;
  background: #fff;
  border-radius: 2px;
  padding: 12px 13px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(176, 141, 87, .14);
}
.field textarea { min-height: 96px; resize: vertical; line-height: 1.55; }
.field .hint { font-size: 11.5px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: var(--ink-soft); line-height: 1.55; }
.check input { margin-top: 3px; flex: 0 0 auto; width: 16px; height: 16px; accent-color: var(--gold-deep); }
.inline-form { display: inline; }

/* ------------------------------------------------------------------ Alerts -- */

.alert {
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  background: var(--paper);
  padding: 13px 16px;
  font-size: 13px;
  margin-bottom: 14px;
  border-radius: 2px;
  color: var(--ink-soft);
}
.alert-error { border-left-color: var(--danger); background: var(--danger-pale); color: #6f2a24; }
.alert-success { border-left-color: var(--ok); background: var(--ok-pale); color: #22503c; }
.alert-info { border-left-color: var(--gold); background: var(--gold-pale); color: #6b5327; }
.alert-warning { border-left-color: var(--warn); background: var(--warn-pale); color: #6f4a12; }
.alerts { margin-bottom: 22px; }

/* ------------------------------------------------------------------ Badges -- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink-soft);
  background: var(--cream);
  white-space: nowrap;
}
.badge-gold { border-color: #e6d5b6; background: var(--gold-pale); color: var(--gold-deep); }
.badge-ok { border-color: #cfe2d6; background: var(--ok-pale); color: var(--ok); }
.badge-warn { border-color: #eddcc0; background: var(--warn-pale); color: var(--warn); }
.badge-muted { color: var(--muted); }
.badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ---------------------------------------------------------------- Timeline -- */

.steps { display: grid; grid-template-columns: repeat(8, minmax(62px, 1fr)); margin: 8px 0 0; }
.step { position: relative; text-align: center; padding: 0 4px; }
.step::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
  z-index: 0;
}
.step:first-child::before { left: 50%; }
.step:last-child::before { right: 50%; }
.step.done::before, .step.current::before { background: #d8c39c; }
.step-node {
  position: relative;
  z-index: 1;
  width: 25px;
  height: 25px;
  margin: 0 auto 9px;
  border-radius: 50%;
  border: 1px solid #ddd5c6;
  background: var(--paper);
  color: #a9a293;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
}
.step.done .step-node { border-color: var(--gold); color: var(--gold-deep); background: #fdfaf4; }
.step.current .step-node { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 0 0 0 4px rgba(176, 141, 87, .16); }
.step.locked .step-node { color: #c3bcae; background: #f7f4ed; }
.step-label { font-size: 10px; line-height: 1.35; color: #9c9586; }
.step.done .step-label { color: var(--ink-soft); }
.step.current .step-label { color: var(--ink); font-weight: 700; }
.step.locked .step-label { color: #b6ae9e; font-style: italic; }

/* ------------------------------------------------------------------- Case -- */

.case-title { font-size: clamp(24px, 3vw, 32px); }
.case-ref { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); font-weight: 700; }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 26px; }
.kv .k { font-size: 10px; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.kv .v { font-size: 14px; color: var(--ink); }

.next-action {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: linear-gradient(180deg, #fdfbf6, #faf6ec);
  border: 1px solid #ecdfc6;
  border-radius: 2px;
}
.next-action .mark {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid #dfc9a2;
  color: var(--gold-deep);
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 17px;
}
.next-action .label { margin-bottom: 4px; }
.next-action p { margin: 0; color: #5d5140; font-size: 13.5px; }

.rep { display: flex; align-items: center; gap: 13px; }
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--cream-2);
  border: 1px solid var(--line);
  color: var(--gold-deep);
  font-family: var(--serif);
  font-size: 16px;
  flex: 0 0 auto;
}
.rep .name { font-size: 14px; font-weight: 600; }
.rep .role { font-size: 11.5px; color: var(--muted); }

/* --------------------------------------------------------------- Documents -- */

.doc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
}
.doc-row:last-child { border-bottom: 0; }
.doc-name { font-size: 13.5px; font-weight: 600; }
.doc-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.doc-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

.upload-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.upload-slot {
  border: 1px dashed #d5c9b4;
  background: #fdfbf7;
  padding: 16px;
  border-radius: 2px;
}
.upload-slot .slot-label { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; }
.upload-slot .slot-hint { font-size: 11px; color: var(--muted); margin: 4px 0 10px; line-height: 1.5; }
.upload-slot input[type=file] { width: 100%; font-size: 11.5px; color: var(--ink-soft); }
.upload-slot input[type=file]::file-selector-button {
  border: 1px solid var(--line);
  background: #fff;
  padding: 7px 10px;
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 700;
  margin-right: 10px;
  cursor: pointer;
  border-radius: 2px;
}
.upload-slot .state { margin-top: 9px; }

/* ---------------------------------------------------------------- Contract -- */

.prose {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.7;
  color: #24282d;
  max-width: 760px;
}
.prose h2, .prose h3 { margin: 26px 0 10px; }
.prose p { margin: 0 0 14px; }
.prose ul { margin: 0 0 14px 20px; }
.prose li { margin-bottom: 8px; }
.prose .draft-flag {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--danger);
  border: 1px solid #e7cfcb;
  background: var(--danger-pale);
  padding: 8px 12px;
  display: inline-block;
  margin-bottom: 22px;
}

/* ----------------------------------------------------------------- Tables -- */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--paper); }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 720px; }
table.data th {
  text-align: left;
  font-size: 10px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: #fdfbf7;
  white-space: nowrap;
}
table.data td { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: #fdfcf9; }
table.data a { font-weight: 600; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 26px; }
.kpi { background: var(--paper); border: 1px solid var(--line); padding: 18px 20px; border-radius: 2px; }
.kpi .n { font-family: var(--serif); font-size: 30px; line-height: 1; }
.kpi .l { font-size: 10px; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); margin-top: 8px; font-weight: 700; }

/* ------------------------------------------------------------------ Guest -- */

.guest-body { background: var(--cream); }
.guest {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}
.guest-aside {
  background: #151a1f;
  color: #efe7d8;
  padding: 54px clamp(28px, 5vw, 74px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.guest-aside::after {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px solid rgba(196, 163, 106, .28);
  pointer-events: none;
}
.guest-aside .logo-plate { background: #fff; padding: 14px 18px; display: inline-block; }
.guest-aside .logo-plate img { height: 36px; display: block; }
.guest-aside h1 { color: #fff; font-size: clamp(30px, 3.6vw, 46px); margin: 0 0 16px; }
.guest-aside p { color: #c8bfae; font-size: 14px; max-width: 430px; }
.guest-aside .assurances { margin-top: 30px; display: grid; gap: 14px; max-width: 430px; position: relative; z-index: 1; }
.guest-aside .assurance { display: flex; gap: 12px; font-size: 12.5px; color: #d8cfbe; line-height: 1.5; }
.guest-aside .assurance span:first-child { color: #c9a86a; font-family: var(--serif); font-size: 15px; }
.guest-main {
  background: var(--paper);
  padding: 54px clamp(24px, 5vw, 70px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.guest-card { width: 100%; max-width: 430px; margin: 0 auto; }
.guest-card h2 { font-size: clamp(26px, 3vw, 34px); margin-bottom: 6px; }
.guest-card .lede { color: var(--muted); font-size: 13.5px; margin-bottom: 26px; }
.guest-foot { margin-top: 26px; font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.guest-foot a { color: var(--gold-deep); }

.notice-band {
  border-top: 1px solid var(--line);
  background: var(--cream);
  padding: 14px 26px;
  font-size: 11px;
  line-height: 1.55;
  color: #6f6a5f;
}
.notice-band strong { color: var(--ink-soft); }

/* ------------------------------------------------------------------ Footer -- */

.footer {
  border-top: 1px solid var(--line);
  background: var(--paper);
  padding: 26px;
  margin-top: 10px;
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}
.footer-inner .links a { margin-left: 16px; color: var(--ink-soft); }

.disclaimer {
  background: var(--cream);
  border: 1px solid var(--line);
  padding: 16px 18px;
  font-size: 11.5px;
  line-height: 1.65;
  color: #625d52;
  border-radius: 2px;
}
.disclaimer strong { display: block; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 7px; }

/* ---------------------------------------------------------------- Utility -- */

.inline-list { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  background: var(--cream-2);
  border: 1px solid var(--line);
  padding: 2px 6px;
  word-break: break-all;
}
.secret-box {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 16px;
  letter-spacing: .16em;
  background: var(--cream-2);
  border: 1px dashed #d6c8ae;
  padding: 14px;
  text-align: center;
  word-break: break-all;
}
.recovery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.recovery-grid .code { text-align: center; padding: 9px; font-size: 13.5px; letter-spacing: .08em; }
.note-entry { border-left: 2px solid #dccdb2; padding: 4px 0 4px 12px; margin-bottom: 12px; font-size: 13px; }
.note-entry .meta { font-size: 10.5px; color: var(--muted); margin-top: 4px; letter-spacing: .04em; }
.audit-entry { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 12px; }
.audit-entry:last-child { border-bottom: 0; }
.audit-entry .when { color: var(--muted); white-space: nowrap; font-size: 11px; min-width: 104px; }
.audit-entry .what { color: var(--ink-soft); }
.audit-entry .who { color: var(--muted); font-size: 11px; }

.section-label { font-size: 10px; letter-spacing: .15em; text-transform: uppercase; color: var(--gold-deep); font-weight: 700; margin-bottom: 10px; }

details.disclosure { border: 1px solid var(--line); padding: 0; background: #fff; }
details.disclosure summary {
  cursor: pointer;
  padding: 14px 18px;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink-soft);
  list-style: none;
}
details.disclosure summary::-webkit-details-marker { display: none; }
details.disclosure[open] summary { border-bottom: 1px solid var(--line); }
details.disclosure .body { padding: 18px; }

@media (max-width: 980px) {
  .grid-2, .grid-2-even, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 26px; }
  .step:nth-child(4)::before { right: 50%; }
  .step:nth-child(5)::before { left: 50%; }
  .guest { grid-template-columns: minmax(0, 1fr); }
  .guest-aside { padding: 36px 26px; min-height: auto; gap: 26px; }
  .guest-aside::after { inset: 12px; }
  .guest-main { padding: 40px 24px 54px; }
}

@media (max-width: 640px) {
  .topbar-inner { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px 18px; }
  .brand img { height: 32px; }
  .brand-label { display: none; }
  .shell, .shell-narrow { padding: 24px 16px 48px; }
  .card { padding: 20px; }
  .upload-grid, .field-row, .kv { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step:nth-child(even)::before { right: 50%; }
  .step:nth-child(odd)::before { left: 50%; }
  h1 { font-size: 28px; }
  .doc-row { flex-direction: column; align-items: flex-start; }
  .doc-actions { justify-content: flex-start; }
  .footer-inner { flex-direction: column; }
  .footer-inner .links a { margin: 0 14px 0 0; }
}
