:root {
  color-scheme: light;
  --bg: #f4f2ec;
  --surface: #fffefa;
  --surface-soft: #eeebe2;
  --surface-quiet: #f8f6f0;
  --border: #d6d1c6;
  --border-strong: #aaa397;
  --text: #20211f;
  --muted: #666a65;
  --quiet: #858980;
  --gold: #9a7627;
  --gold-deep: #72571e;
  --gold-soft: #f4ead1;
  --green: #226846;
  --green-soft: #e3efe8;
  --blue: #315f86;
  --blue-soft: #e6eef5;
  --red: #9b413b;
  --red-soft: #f4e6e3;
  --shadow-sm: 0 1px 2px rgba(34, 31, 25, .04), 0 8px 24px rgba(34, 31, 25, .05);
  --shadow-lg: 0 24px 70px rgba(42, 37, 28, .11);
  --content: 1440px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.55; margin: 0; min-width: 320px; overflow-x: clip; }
button, input, textarea { color: inherit; font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 82%, white); outline-offset: 3px; }
::selection { background: #e8d9ad; color: var(--text); }

.skip-link { background: var(--text); border-radius: 0 0 8px 0; color: var(--surface); left: 0; padding: 10px 14px; position: fixed; top: 0; transform: translateY(-120%); transition: transform .16s ease; z-index: 30; }
.skip-link:focus { transform: translateY(0); }

.topbar { align-items: center; backdrop-filter: blur(14px); background: color-mix(in srgb, var(--surface) 92%, transparent); border-bottom: 1px solid var(--border); display: grid; gap: 24px; grid-template-columns: 1fr auto 1fr; min-height: 70px; padding: 0 clamp(18px, 4.6vw, 76px); position: sticky; top: 0; z-index: 10; }
.brand { align-items: center; display: inline-flex; gap: 11px; justify-self: start; text-decoration: none; }
.brand-name { font-size: 22px; font-weight: 900; letter-spacing: -.06em; }
.brand-name span { color: var(--gold); font-size: .78em; letter-spacing: -.03em; }
.brand-section { border-left: 1px solid var(--border); color: var(--muted); font-size: 11px; letter-spacing: .16em; padding-left: 12px; text-transform: uppercase; }
.primary-nav { align-items: center; display: flex; gap: 24px; }
.primary-nav a { color: var(--muted); font-size: 13px; font-weight: 650; text-decoration: none; }
.primary-nav a:hover, .primary-nav a[aria-current="page"] { color: var(--text); }
.privacy-state { align-items: center; color: var(--muted); display: inline-flex; font-size: 12px; gap: 9px; justify-self: end; white-space: nowrap; }
.privacy-dot { background: var(--green); border-radius: 50%; box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 14%, transparent); height: 7px; width: 7px; }

main { margin: 0 auto; max-width: var(--content); padding: 30px clamp(16px, 4.6vw, 76px) 96px; }
.eyebrow { color: var(--gold-deep); font-size: 11px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
h1, h2 { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing: -.045em; margin: 0; }
h2 { font-size: clamp(1.75rem, 3vw, 2.6rem); line-height: 1.08; }

.identify-hero { align-items: end; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow-lg); display: grid; gap: clamp(38px, 7vw, 100px); grid-template-columns: minmax(0, 1fr) minmax(260px, .43fr); overflow: hidden; padding: clamp(34px, 6vw, 84px); position: relative; }
.identify-hero::before { background: radial-gradient(circle, color-mix(in srgb, var(--gold) 15%, transparent), transparent 66%); border-radius: 50%; content: ""; height: min(58vw, 690px); left: -19%; pointer-events: none; position: absolute; top: -64%; width: min(58vw, 690px); }
.hero-copy { min-width: 0; position: relative; }
.hero-copy h1 { font-size: clamp(3rem, 4.7vw, 5.1rem); font-weight: 790; line-height: .92; margin: 15px 0 24px; max-width: 820px; }
.hero-copy h1 span { color: var(--gold-deep); }
.hero-copy > p { color: var(--muted); font-size: clamp(15px, 1.55vw, 20px); margin: 0; max-width: 760px; }
.privacy-promise { align-items: center; background: var(--green-soft); border: 1px solid color-mix(in srgb, var(--green) 24%, var(--border)); border-radius: 12px; display: inline-flex; gap: 13px; margin-top: 32px; max-width: 650px; padding: 12px 15px; }
.privacy-promise svg { fill: none; flex: 0 0 auto; height: 22px; stroke: var(--green); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; width: 22px; }
.privacy-promise strong, .privacy-promise span { display: block; }
.privacy-promise strong { color: var(--green); font-size: 12px; }
.privacy-promise span { color: var(--muted); font-size: 11px; }
.journey { counter-reset: none; display: grid; gap: 0; list-style: none; margin: 0; padding: 0; position: relative; }
.journey::before { background: var(--border); bottom: 28px; content: ""; left: 17px; position: absolute; top: 28px; width: 1px; }
.journey li { align-items: center; display: grid; gap: 14px; grid-template-columns: 36px minmax(0, 1fr); min-width: 0; padding: 15px 0; position: relative; }
.journey li > span { align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 50%; display: inline-flex; font-size: 11px; font-weight: 800; height: 36px; justify-content: center; position: relative; width: 36px; }
.journey li.is-current > span { background: var(--gold); border-color: var(--gold); color: white; box-shadow: 0 0 0 5px var(--gold-soft); }
.journey strong, .journey small { display: block; }
.journey strong { font-size: 13px; }
.journey small { color: var(--muted); font-size: 11px; margin-top: 1px; }

.capture-section, .match-section, .identity-actions, .listing-draft { margin-top: 28px; }
.capture-section, .match-section, .listing-draft { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-sm); padding: clamp(22px, 4vw, 48px); }
.section-heading { align-items: end; display: flex; gap: 28px; justify-content: space-between; margin-bottom: 28px; }
.section-heading h2 { margin-top: 6px; }
.section-heading > p { color: var(--muted); font-size: 12px; margin: 0; max-width: 520px; text-align: right; }
.capture-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.capture-card { background: var(--surface-quiet); border: 1px solid var(--border); border-radius: 15px; min-width: 0; overflow: hidden; padding: 16px; transition: border-color .18s ease, box-shadow .18s ease; }
.capture-card.has-image { border-color: color-mix(in srgb, var(--green) 48%, var(--border)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 8%, transparent); }
.capture-card-heading { align-items: baseline; display: flex; gap: 8px; justify-content: space-between; padding: 0 2px 12px; }
.capture-card-heading span { font-size: 13px; font-weight: 810; }
.capture-card-heading small { color: var(--muted); font-size: 10px; }
.capture-stage { align-items: center; aspect-ratio: 4 / 3; background: linear-gradient(150deg, #ebe8df, #ded9ce); border-radius: 12px; display: flex; justify-content: center; overflow: hidden; position: relative; }
.capture-stage::after { background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.28) 48%, transparent 66%); content: ""; inset: 0; pointer-events: none; position: absolute; transform: translateX(-130%); }
.capture-card:not(.has-image):hover .capture-stage::after { animation: scan 1.8s ease infinite; }
@keyframes scan { to { transform: translateX(130%); } }
.capture-stage img { height: 100%; object-fit: contain; position: relative; width: 100%; z-index: 2; }
.capture-guide { aspect-ratio: 1; height: 80%; left: 50%; pointer-events: none; position: absolute; top: 50%; transform: translate(-50%, -50%); }
.capture-guide i { border: 1px dashed color-mix(in srgb, var(--text) 32%, transparent); border-radius: 50%; inset: 0; position: absolute; }
.capture-guide b::before, .capture-guide b::after { background: color-mix(in srgb, var(--text) 25%, transparent); content: ""; left: 50%; position: absolute; top: 50%; transform: translate(-50%, -50%); }
.capture-guide b::before { height: 1px; width: 24px; }.capture-guide b::after { height: 24px; width: 1px; }
.capture-empty { color: var(--muted); position: relative; text-align: center; z-index: 1; }
.capture-empty strong, .capture-empty span { display: block; }
.capture-empty strong { color: var(--text); font-size: 13px; }.capture-empty span { font-size: 11px; margin-top: 3px; }
.capture-card.has-image .capture-guide, .capture-card.has-image .capture-empty { display: none; }
.quality-note { color: var(--muted); font-size: 10px; min-height: 20px; padding: 8px 2px 0; }
.quality-note[data-state="good"] { color: var(--green); }.quality-note[data-state="warn"] { color: var(--gold-deep); }
.capture-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.button { align-items: center; border: 1px solid transparent; border-radius: 8px; display: inline-flex; font-size: 11px; font-weight: 780; gap: 7px; justify-content: center; min-height: 37px; padding: 0 12px; text-decoration: none; }
.button svg { fill: none; height: 15px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; width: 15px; }
.button-primary { background: var(--text); color: var(--surface); }.button-primary:hover { background: #090a09; }
.button-secondary { background: var(--surface); border-color: var(--border); color: var(--text); cursor: pointer; }
.button-secondary:hover { border-color: var(--border-strong); }
.file-input { height: 1px; margin: -1px; opacity: 0; overflow: hidden; padding: 0; position: absolute; width: 1px; }
.remove-capture { background: transparent; border: 0; color: var(--red); font-size: 10px; font-weight: 760; margin-left: auto; padding: 9px 2px; }

.match-heading { align-items: center; }
.capture-count { background: var(--surface-soft); border-radius: 999px; color: var(--muted); font-size: 11px; font-weight: 750; padding: 8px 12px; white-space: nowrap; }
.capture-count.is-complete { background: var(--green-soft); color: var(--green); }
.clue-form { margin: 0 auto; max-width: 900px; }
.clue-form > label { display: block; font-size: clamp(18px, 2vw, 24px); font-weight: 780; letter-spacing: -.025em; }
.clue-form > p { color: var(--muted); font-size: 12px; margin: 6px 0 16px; }
.clue-box { align-items: center; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 999px; box-shadow: 0 12px 36px rgba(42, 37, 28, .08); display: grid; gap: 10px; grid-template-columns: auto minmax(0, 1fr) auto; min-height: 64px; padding: 5px 6px 5px 20px; }
.clue-box:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 14%, transparent), 0 14px 40px rgba(42, 37, 28, .1); }
.clue-box > svg { fill: none; height: 20px; stroke: var(--muted); stroke-linecap: round; stroke-width: 1.7; width: 20px; }
.clue-box input { background: transparent; border: 0; font-size: 15px; min-height: 50px; min-width: 0; outline: 0; width: 100%; }
.clue-box button { background: var(--gold); border: 0; border-radius: 999px; color: white; font-size: 12px; font-weight: 800; min-height: 50px; padding: 0 20px; white-space: nowrap; }
.clue-box button:hover { background: var(--gold-deep); }
.example-clues { align-items: center; display: flex; flex-wrap: wrap; gap: 7px; padding: 13px 10px 0; }
.example-clues span { color: var(--quiet); font-size: 10px; font-weight: 760; letter-spacing: .09em; text-transform: uppercase; }
.example-clues button { background: transparent; border: 0; color: var(--gold-deep); font-size: 10px; padding: 3px 4px; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--gold) 38%, transparent); text-underline-offset: 3px; }
.matcher-boundary { background: var(--blue-soft); border-left: 3px solid var(--blue); border-radius: 0 9px 9px 0; color: var(--muted); font-size: 11px; margin: 26px auto 0; max-width: 900px; padding: 12px 15px; }
.matcher-boundary strong { color: var(--blue); }
.match-results { border: 1px solid var(--border); border-radius: 14px; margin: 28px auto 0; max-width: 980px; overflow: hidden; }
.results-heading { align-items: center; background: var(--surface-quiet); border-bottom: 1px solid var(--border); display: flex; gap: 18px; justify-content: space-between; padding: 14px 18px; }
.results-heading strong { display: block; font-size: 13px; margin-top: 2px; }
.results-heading button { background: transparent; border: 0; color: var(--muted); font-size: 10px; font-weight: 760; }
.result-list { display: grid; }
.result-card { align-items: center; background: var(--surface); border: 0; border-bottom: 1px solid var(--border); display: grid; gap: 14px; grid-template-columns: 50px minmax(0, 1fr) auto; min-width: 0; padding: 13px 16px; text-align: left; width: 100%; }
.result-card:hover, .result-card:focus-visible { background: var(--surface-quiet); }
.result-card:last-child { border-bottom: 0; }
.result-coin { background: var(--surface-quiet); border: 1px solid var(--border); border-radius: 50%; box-shadow: inset 0 0 0 7px color-mix(in srgb, var(--border) 34%, transparent); height: 50px; position: relative; width: 50px; }
.result-coin::after { background: var(--gold); border-radius: 50%; content: ""; height: 5px; left: calc(50% - 2.5px); position: absolute; top: calc(50% - 2.5px); width: 5px; }
.result-copy { min-width: 0; }
.result-copy strong { display: block; font-size: 13px; overflow-wrap: anywhere; }
.result-copy small { align-items: center; color: var(--muted); display: flex; flex-wrap: wrap; font-size: 10px; gap: 6px; margin-top: 4px; }
.authority-chip { border: 1px solid color-mix(in srgb, var(--blue) 35%, var(--border)); border-radius: 999px; color: var(--blue); font-size: 9px; font-weight: 820; padding: 1px 5px; }
.result-value { align-items: flex-end; display: flex; flex-direction: column; min-width: 112px; }
.result-value strong { color: var(--gold-deep); font-size: 11px; }.result-value small { color: var(--muted); font-size: 9px; margin-top: 2px; }
.result-state { color: var(--muted); padding: 42px 20px; text-align: center; }
.result-state strong, .result-state span { display: block; }.result-state strong { color: var(--text); }.result-state span { font-size: 11px; margin-top: 4px; }
.load-more { background: var(--surface-quiet); border: 0; border-top: 1px solid var(--border); color: var(--gold-deep); font-size: 11px; font-weight: 780; min-height: 44px; width: 100%; }

.identity-actions { background: linear-gradient(135deg, var(--text), #31342f); border-radius: 18px; color: var(--surface); display: grid; gap: clamp(28px, 4vw, 52px); grid-template-columns: minmax(220px, .36fr) minmax(0, 1fr); padding: clamp(24px, 4vw, 48px); }
.identity-actions[hidden], .listing-draft[hidden] { display: none; }
.selected-identity .eyebrow { color: #ddc578; }
.selected-identity h2 { color: white; font-size: clamp(1.7rem, 3vw, 2.6rem); margin: 7px 0 20px; }
.selected-identity > strong, .selected-identity > span { display: block; }
.selected-identity > strong { font-size: 14px; }.selected-identity > span { color: #b9bdb5; font-size: 11px; margin-top: 4px; }
.action-grid { display: grid; gap: 9px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.action-card { align-items: center; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.13); border-radius: 11px; color: white; display: grid; gap: 11px; grid-template-columns: 27px minmax(0, 1fr) auto; min-height: 86px; padding: 13px; text-align: left; text-decoration: none; width: 100%; }
button.action-card { font: inherit; }
.action-card:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.24); color: white; }
.action-card svg { fill: none; height: 23px; stroke: #ddc578; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; width: 23px; }
.action-card strong, .action-card span { display: block; }.action-card strong { font-size: 12px; }.action-card span { color: #b9bdb5; font-size: 10px; margin-top: 2px; }.action-card b { color: #ddc578; }

.listing-draft .section-heading button { background: transparent; border: 0; color: var(--muted); font-size: 28px; line-height: 1; }
.draft-boundary { background: var(--gold-soft); border-radius: 9px; color: var(--gold-deep); font-size: 11px; margin: -8px 0 24px; padding: 12px 14px; }
.listing-form { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.listing-form label { color: var(--muted); display: grid; font-size: 10px; font-weight: 780; gap: 6px; letter-spacing: .07em; text-transform: uppercase; }
.listing-form input, .listing-form textarea { background: var(--surface-quiet); border: 1px solid var(--border); border-radius: 8px; font-size: 13px; min-width: 0; padding: 11px 12px; text-transform: none; width: 100%; }
.listing-form input:focus, .listing-form textarea:focus { border-color: var(--gold); outline: 3px solid color-mix(in srgb, var(--gold) 12%, transparent); }
.listing-form label:nth-child(4) { grid-column: 1 / -1; }.listing-form textarea { resize: vertical; }
.draft-actions { align-items: center; display: flex; gap: 13px; grid-column: 1 / -1; }.draft-actions span { color: var(--green); font-size: 11px; }

.camera-dialog { background: transparent; border: 0; height: 100%; margin: 0; max-height: none; max-width: none; padding: clamp(10px, 3vw, 30px); width: 100%; }
.camera-dialog::backdrop { backdrop-filter: blur(9px); background: rgba(23, 24, 22, .82); }
.camera-shell { background: #171916; border: 1px solid rgba(255,255,255,.16); border-radius: 18px; box-shadow: 0 28px 100px rgba(0,0,0,.5); color: white; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; margin: 0 auto; max-width: 980px; overflow: hidden; }
.camera-heading { align-items: center; display: flex; gap: 20px; justify-content: space-between; padding: 17px 20px; }.camera-heading .eyebrow { color: #ddc578; }.camera-heading h2 { font-size: 20px; margin-top: 3px; }.camera-heading button { background: rgba(255,255,255,.1); border: 0; border-radius: 50%; color: white; font-size: 22px; height: 36px; width: 36px; }
.camera-view { align-items: center; background: #090a09; display: flex; justify-content: center; min-height: 0; overflow: hidden; position: relative; }
.camera-view video { height: 100%; object-fit: contain; width: 100%; }
.camera-reticle { aspect-ratio: 1; border: 1px dashed rgba(255,255,255,.7); border-radius: 50%; left: 50%; max-height: 78%; max-width: 78%; position: absolute; top: 50%; transform: translate(-50%, -50%); width: min(72vh, 72vw); }.camera-reticle i::before, .camera-reticle i::after { background: rgba(255,255,255,.55); content: ""; left: 50%; position: absolute; top: 50%; transform: translate(-50%, -50%); }.camera-reticle i::before { height: 1px; width: 30px; }.camera-reticle i::after { height: 30px; width: 1px; }
.camera-error { background: var(--red-soft); border-radius: 10px; color: var(--red); max-width: 470px; padding: 18px; position: absolute; text-align: center; }
.camera-controls { align-items: center; display: flex; flex-direction: column; gap: 5px; padding: 14px 20px 18px; }.camera-controls small { color: #adb1aa; font-size: 10px; }.shutter { align-items: center; background: transparent; border: 2px solid white; border-radius: 50%; display: flex; height: 58px; justify-content: center; padding: 4px; width: 58px; }.shutter span { background: white; border-radius: 50%; height: 44px; width: 44px; }.shutter:hover span { background: #ddc578; }

@media (max-width: 980px) {
  .identify-hero { align-items: start; grid-template-columns: minmax(0, 1fr); }
  .journey { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .journey::before { bottom: auto; height: 1px; left: 17px; right: 17px; top: 33px; width: auto; }
  .journey li { align-items: start; grid-template-columns: 36px minmax(0, 1fr); }
  .identity-actions { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .topbar { gap: 12px; grid-template-columns: 1fr auto; min-height: 62px; padding: 0 16px; }
  .primary-nav { display: none; }.privacy-state { grid-column: 2; grid-row: 1; }
  main { padding-top: 16px; }
  .hero-copy h1 { font-size: clamp(3rem, 13vw, 5.2rem); }
  .capture-grid { grid-template-columns: minmax(0, 1fr); }
  .section-heading { align-items: start; display: grid; gap: 9px; }.section-heading > p { text-align: left; }
  .listing-form { grid-template-columns: minmax(0, 1fr); }.listing-form label:nth-child(4), .draft-actions { grid-column: 1; }
}

@media (max-width: 560px) {
  body { font-size: 14px; }
  .brand-section, .privacy-state span { display: none; }.privacy-state { gap: 0; }
  main { padding-left: 10px; padding-right: 10px; }
  .identify-hero { border-radius: 16px; gap: 30px; padding: 29px 20px; }
  .hero-copy h1 { font-size: clamp(2.65rem, 11.5vw, 3.4rem); margin: 13px 0 20px; }
  .privacy-promise { align-items: start; }
  .journey { gap: 8px; }.journey::before { display: none; }.journey li { display: block; padding: 0; }.journey li > span { height: 30px; margin-bottom: 7px; width: 30px; }.journey small { line-height: 1.3; }
  .capture-section, .match-section, .listing-draft { border-radius: 14px; padding: 18px 12px; }
  .capture-card { padding: 10px; }.capture-stage { aspect-ratio: 1; }
  .capture-actions .button { flex: 1; }.remove-capture { margin-left: 0; width: 100%; }
  .match-heading { align-items: start; }.capture-count { justify-self: start; }
  .clue-box { border-radius: 13px; grid-template-columns: auto minmax(0, 1fr); padding: 4px 8px 4px 14px; }.clue-box button { border-radius: 9px; grid-column: 1 / -1; margin: 0 -4px 1px; min-height: 44px; }.clue-box input { min-height: 48px; }
  .example-clues { align-items: start; display: grid; }
  .results-heading { align-items: start; }.result-card { gap: 10px; grid-template-columns: 42px minmax(0, 1fr); padding: 12px 10px; }.result-coin { height: 42px; width: 42px; }.result-value { align-items: flex-start; grid-column: 2; min-width: 0; }
  .identity-actions { border-radius: 14px; padding: 22px 14px; }.action-grid { grid-template-columns: minmax(0, 1fr); }
  .draft-actions { align-items: start; flex-direction: column; }
  .camera-dialog { padding: 0; }.camera-shell { border: 0; border-radius: 0; max-width: none; }.camera-heading { padding: 13px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
