:root {
  --ink: #17120f;
  --ink-soft: #2a231d;
  --paper: #f0e7d9;
  --paper-deep: #e2d5c3;
  --muted: #8b7c6d;
  --rule: #8c7c6b;
  --accent: #ff5a1f;
  --serif: "Bodoni Moda", Didot, serif;
  --sans: "Archivo", sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--ink); }
body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }

.masthead {
  min-height: 72px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 3.6vw;
  background: var(--ink);
  color: var(--paper);
  border-bottom: 1px solid #3a3028;
  letter-spacing: .06em;
  font-size: 11px;
  font-weight: 700;
}
.brand {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  justify-self: start;
}
.brand-mark { color: var(--accent); font-size: 18px; }
.masthead-note { margin: 0; color: #b7a793; }
.status { justify-self: end; color: #b7a793; }
.status.ready::before,
.status.partial::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  background: var(--accent);
}
.status.partial { color: var(--accent); }

.workspace {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(500px, 43%) minmax(0, 57%);
}

.intake {
  padding: 54px clamp(34px, 5vw, 78px) 72px;
  background: var(--paper);
  border-right: 1px solid #3a3028;
}
.eyebrow {
  display: inline-block;
  font-size: 10px;
  line-height: 1;
  letter-spacing: .16em;
  font-weight: 700;
  text-transform: uppercase;
}
.eyebrow.light { color: #b7a793; }
.intro { max-width: 690px; }
.intro h1 {
  margin: 18px 0 20px;
  font-family: var(--serif);
  font-size: clamp(52px, 5.2vw, 88px);
  line-height: .9;
  letter-spacing: -.045em;
  font-weight: 500;
}
.intro h1 em { color: var(--accent); font-style: italic; }
.lede {
  width: min(92%, 590px);
  margin: 0 0 44px 11%;
  font-size: 14px;
  line-height: 1.65;
  color: #5f5145;
}

.upload-shell {
  position: relative;
  min-height: 240px;
  margin: 0 -1px 34px;
  border: 1px solid var(--rule);
  overflow: hidden;
  background: var(--paper-deep);
}
.upload-shell.dragging { outline: 3px solid var(--accent); outline-offset: -3px; }
.upload-shell input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.upload-copy {
  min-height: 240px;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  grid-template-rows: auto auto 1fr;
  gap: 8px 18px;
  align-items: start;
  padding: 28px;
}
.upload-index {
  grid-row: 1 / span 3;
  font-family: var(--serif);
  font-size: 64px;
  line-height: .8;
  color: var(--accent);
}
.upload-copy strong { font-size: 19px; max-width: 340px; }
.upload-copy > span:not(.upload-index) { grid-column: 2; color: #6b5d50; font-size: 12px; line-height: 1.55; max-width: 380px; }
.text-button {
  grid-column: 3;
  grid-row: 1 / span 2;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: none;
  padding: 0 0 3px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  cursor: pointer;
}
#preview { width: 100%; height: 360px; object-fit: cover; display: block; }
.replace-photo {
  position: absolute;
  right: 16px;
  bottom: 16px;
  padding: 10px 14px;
  border: 1px solid var(--paper);
  background: var(--ink);
  color: var(--paper);
  font-size: 10px;
  letter-spacing: .08em;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}

.field-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 22px;
}
.field {
  display: grid;
  grid-template-columns: 1fr auto;
  border-top: 1px solid var(--rule);
  padding: 17px 0 22px;
}
.field-wide { grid-column: 1 / -1; }
.field > span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.field > span b { color: var(--muted); font-weight: 500; margin-left: 6px; }
.field input, .field select, .field textarea {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 10px;
  padding: 4px 0 7px;
  border: 0;
  border-radius: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 17px;
}
.field textarea { resize: vertical; min-height: 72px; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { box-shadow: inset 0 -2px 0 var(--accent); }
.field small { grid-column: 2; grid-row: 1; color: var(--muted); font-size: 10px; }
::placeholder { color: #988978; opacity: 1; }

.turnstile-wrap { padding: 14px 0 24px; border-top: 1px solid var(--rule); }
.submit-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 160px;
  align-items: center;
  gap: 20px;
  margin-top: 12px;
}
.analyze-button {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border: 0;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  transition: transform 140ms ease, background 140ms ease;
}
.analyze-button:hover:not(:disabled) { transform: translateY(-2px); background: #241c17; }
.analyze-button:disabled { cursor: wait; opacity: .62; }
.arrow { color: var(--accent); font-size: 22px; }
.submit-row p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.error-message {
  margin-top: 18px;
  padding: 14px 0;
  border-top: 3px solid var(--accent);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.market-board {
  position: relative;
  min-width: 0;
  padding: 38px clamp(34px, 5vw, 80px) 70px;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
}
.market-board::after {
  content: "SECOND TAG";
  position: fixed;
  right: -34px;
  bottom: 8px;
  color: #2a211b;
  font-family: var(--serif);
  font-size: clamp(74px, 9vw, 150px);
  line-height: .8;
  letter-spacing: -.07em;
  writing-mode: vertical-rl;
  pointer-events: none;
  z-index: 0;
}
.market-topline,
.empty-state,
.loading-state,
.result { position: relative; z-index: 1; }
.market-topline {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #45382f;
}
.data-source { color: #79695c; font-size: 9px; letter-spacing: .12em; font-weight: 700; text-align: right; }

.empty-state { min-height: 660px; padding-top: 68px; }
.empty-number {
  margin-left: -7px;
  font-family: var(--serif);
  font-size: clamp(130px, 17vw, 260px);
  line-height: .74;
  letter-spacing: -.08em;
  color: var(--accent);
}
.empty-copy { width: min(510px, 76%); margin: 48px 0 0 18%; }
.empty-copy h2 {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-size: clamp(34px, 3.5vw, 58px);
  font-weight: 500;
  line-height: .98;
  letter-spacing: -.035em;
}
.empty-copy p { color: #b7a793; line-height: 1.65; font-size: 13px; }
.method-strip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #79695c;
  font-size: 9px;
  letter-spacing: .1em;
  font-weight: 700;
}
.method-strip i { height: 1px; flex: 1; background: #45382f; }

.loading-state { min-height: 620px; padding-top: 120px; }
.loading-kicker { color: var(--accent); font-size: 11px; letter-spacing: .18em; font-weight: 700; }
.loading-line { height: 1px; margin: 24px 0; background: #44382f; overflow: hidden; }
.loading-line span { display: block; width: 32%; height: 100%; background: var(--accent); animation: scan 1.3s ease-in-out infinite alternate; }
@keyframes scan { from { transform: translateX(-100%); } to { transform: translateX(320%); } }
.loading-state > p:last-child { max-width: 430px; font-family: var(--serif); font-size: 31px; line-height: 1.1; }

.result { padding-top: 42px; }
.result-header { width: 78%; }
.result-header p { margin: 0 0 9px; color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.result-header h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(42px, 5vw, 78px);
  font-weight: 500;
  line-height: .92;
  letter-spacing: -.045em;
}
.buy-ceiling {
  display: grid;
  grid-template-columns: 130px 1fr;
  grid-template-rows: auto auto;
  align-items: end;
  gap: 4px 20px;
  margin: 58px 0 50px 12%;
  padding: 26px 0;
  border-top: 1px solid #5a493d;
  border-bottom: 1px solid #5a493d;
}
.buy-ceiling > span { grid-row: 1 / span 2; align-self: start; color: #8f7c6d; font-size: 9px; letter-spacing: .13em; font-weight: 700; }
.buy-ceiling strong { font-family: var(--serif); font-size: clamp(76px, 8vw, 126px); color: var(--accent); line-height: .75; font-weight: 500; letter-spacing: -.06em; }
.buy-ceiling p { margin: 9px 0 0; color: #8f7c6d; font-size: 10px; }

.market-band { margin-bottom: 64px; }
.band-heading, .range-captions, .section-label { display: flex; justify-content: space-between; gap: 20px; }
.band-heading { color: #8f7c6d; font-size: 9px; letter-spacing: .1em; font-weight: 700; }
.range-values { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: baseline; margin: 24px 0 13px; }
.range-values span, .range-values strong { font-family: var(--serif); font-size: 34px; font-weight: 500; }
.range-values strong { color: var(--accent); text-align: center; font-size: 47px; }
.range-values span:last-child { text-align: right; }
.range-rule { position: relative; height: 6px; background: #3c3028; }
.range-rule::before, .range-rule::after { content: ""; position: absolute; top: -4px; width: 1px; height: 14px; background: #8f7c6d; }
.range-rule::before { left: 0; }.range-rule::after { right: 0; }
.range-rule span { position: absolute; left: 50%; top: -6px; width: 2px; height: 18px; background: var(--accent); }
.range-captions { margin-top: 10px; color: #6f6054; font-size: 8px; letter-spacing: .1em; }

.strategy, .comparables { margin-top: 56px; }
.section-label { padding-bottom: 12px; border-bottom: 1px solid #45382f; color: #8f7c6d; font-size: 9px; letter-spacing: .12em; font-weight: 700; }
.section-label small { font: inherit; }
.strategy h3 { margin: 20px 0 26px; font-family: var(--serif); font-size: 36px; font-weight: 500; letter-spacing: -.025em; }
.tier-list { border-top: 1px solid #45382f; }
.tier-row {
  display: grid;
  grid-template-columns: 110px minmax(120px, .6fr) 1fr;
  gap: 22px;
  align-items: baseline;
  padding: 19px 0;
  border-bottom: 1px solid #45382f;
}
.tier-row span { color: #8f7c6d; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.tier-row strong { font-family: var(--serif); font-size: 31px; font-weight: 500; color: var(--paper); }
.tier-row p { margin: 0; color: #9e8b7a; font-size: 11px; line-height: 1.45; }

.comparable-list { margin-top: 3px; }
.comparable {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 15px;
  align-items: start;
  padding: 15px 0;
  border-bottom: 1px solid #352b25;
  color: inherit;
  text-decoration: none;
}
.comparable:hover .comparable-title { color: var(--accent); }
.comparable-index { color: #69594d; font-family: var(--serif); font-size: 18px; }
.comparable-title { font-size: 11px; line-height: 1.45; transition: color 120ms ease; }
.comparable-condition { display: block; margin-top: 4px; color: #79695c; font-size: 9px; text-transform: uppercase; letter-spacing: .05em; }
.comparable-price { font-family: var(--serif); font-size: 22px; white-space: nowrap; }
.result-footer { margin-top: 54px; padding-top: 18px; border-top: 3px solid var(--accent); color: #8f7c6d; font-size: 10px; line-height: 1.55; }
.result-footer p { max-width: 650px; }
details { margin-top: 13px; }
summary { cursor: pointer; color: #b7a793; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.result-footer ul { padding-left: 18px; }

[hidden] { display: none !important; }

@media (max-width: 1020px) {
  .masthead { grid-template-columns: 1fr 1fr; }
  .masthead-note { display: none; }
  .workspace { display: block; }
  .intake { border-right: 0; }
  .market-board { min-height: 760px; }
  .market-board::after { position: absolute; }
}

@media (max-width: 620px) {
  .masthead { padding: 0 20px; min-height: 64px; }
  .brand { gap: 8px; font-size: 10px; }
  .status { font-size: 9px; }
  .intake, .market-board { padding-left: 22px; padding-right: 22px; }
  .intake { padding-top: 36px; }
  .intro h1 { font-size: 52px; }
  .lede { width: 100%; margin-left: 0; }
  .upload-copy { grid-template-columns: 46px 1fr; }
  .text-button { grid-column: 2; grid-row: 3; justify-self: start; margin-top: 18px; }
  .field-stack { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .submit-row { grid-template-columns: 1fr; }
  .submit-row p { max-width: 240px; }
  .empty-copy { width: 90%; margin-left: 8%; }
  .buy-ceiling { margin-left: 0; grid-template-columns: 90px 1fr; }
  .buy-ceiling strong { font-size: 78px; }
  .tier-row { grid-template-columns: 80px 1fr; }
  .tier-row p { grid-column: 2; }
  .market-topline { align-items: flex-start; }
  .data-source { max-width: 150px; }
}
