:root {
  --paper: var(--brand-canvas); --paper-2: var(--brand-subtle); --card: var(--brand-surface);
  --ink: var(--brand-text); --ink-soft: var(--brand-secondary-text); --muted: var(--brand-muted-text);
  --line: var(--brand-divider); --brass: var(--brand-accent); --brass-soft: var(--brand-accent-soft);
  --live: var(--brand-success); --live-soft: var(--brand-success-surface);
  --serif: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --sans: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 20px; --gutter: clamp(20px, 4vw, 64px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 var(--sans);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
h1, h2, h3, p { margin: 0; }
button, select, textarea { font: inherit; color: inherit; }
a { color: var(--brass); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.muted { color: var(--muted); }
.small { font-size: 14px; }

:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

/* Header */
.top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(14px + env(safe-area-inset-top)) var(--gutter) 14px;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  font: 600 30px/1 var(--serif);
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.demo-tag {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass);
  background: var(--brass-soft);
  padding: 3px 8px;
  border-radius: 99px;
  margin-right: auto;
}

/* Buttons */
button { cursor: pointer; border-radius: 99px; border: 1px solid transparent; min-height: 44px; padding: 0 18px; font-weight: 500; }
.primary { background: var(--ink); color: var(--paper); font-weight: 600; padding: 0 26px; }
.primary:hover { background: #0c1813; }
.primary[disabled] { opacity: 0.6; cursor: progress; }
.secondary { background: var(--card); border-color: var(--ink); }
.secondary:hover { background: var(--paper-2); }
.ghost { background: transparent; border-color: var(--line); }
.ghost:hover { background: var(--paper-2); }
.count {
  display: inline-block; min-width: 22px; padding: 0 6px; margin-left: 4px;
  background: var(--ink); color: var(--paper); border-radius: 99px; font-size: 13px; text-align: center;
}

/* Hero */
main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.hero { padding: clamp(36px, 8vw, 88px) 0 28px; max-width: 780px; }
.hero.compact { padding-top: 28px; }
.hero.compact .eyebrow, .hero.compact .lede, .hero.compact h1 { display: none; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass); margin-bottom: 14px; }
h1 { font: 600 clamp(44px, 9vw, 84px)/1 var(--serif); letter-spacing: -0.01em; }
.lede { font-size: clamp(16px, 2.2vw, 19px); color: var(--ink-soft); margin-top: 18px; max-width: 60ch; }

.search {
  display: flex; gap: 10px; align-items: stretch;
  margin-top: 28px; padding: 8px;
  background: var(--card); border: 1px solid var(--ink); border-radius: 22px;
  box-shadow: 0 10px 30px -18px rgba(20, 38, 31, 0.45);
}
.search textarea {
  flex: 1; min-width: 0; resize: none; border: 0; background: transparent;
  padding: 10px 12px; font-size: 17px; line-height: 1.4; outline: none;
}
.search textarea::placeholder { color: #8b8f86; }
.search:focus-within { outline: 2px solid var(--brass); outline-offset: 2px; }
.search .primary { align-self: stretch; border-radius: 16px; min-height: 52px; }

.examples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; align-items: center; }
.examples-label { font-size: 13px; color: var(--muted); margin-right: 2px; }
.chip {
  min-height: 36px; padding: 0 14px; font-size: 14px; font-weight: 400;
  background: transparent; border: 1px solid var(--line); color: var(--ink-soft);
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed='true'] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.sources-line { margin-top: 18px; font-size: 13px; color: var(--muted); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: #b9b3a3; }
.dot.on { background: var(--live); }

/* Brief card */
.results-wrap { padding-bottom: 56px; }
.brief-card {
  background: var(--ink); color: var(--paper);
  border-radius: var(--radius); padding: 20px 22px;
}
.brief-card .label { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: #c9b88f; font-weight: 600; }
.brief-card .summary { font: 500 clamp(22px, 3.4vw, 30px)/1.2 var(--serif); margin-top: 6px; }
.facets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.facet { font-size: 13px; padding: 5px 11px; border-radius: 99px; background: rgba(245, 241, 232, 0.12); }
.facet b { font-weight: 600; color: #e6d6ad; margin-right: 4px; }
.brief-card .reader { margin-top: 14px; font-size: 13px; color: #b7c2b9; }

/* Toolbar */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin: 22px 0 16px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.toolbar-right { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sort { font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.sort select { min-height: 44px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); padding: 0 14px; }
.notice { font-size: 14px; color: var(--ink-soft); background: var(--brass-soft); border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; }
#web-again { display: block; margin: -4px 0 16px; }
#web-again[hidden] { display: none; }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.card {
  display: flex; flex-direction: column; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0; overflow: hidden; min-height: 0; font-weight: 400;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--ink); box-shadow: 0 14px 30px -22px rgba(20, 38, 31, 0.6); }
.thumb { position: relative; aspect-ratio: 4 / 3; background: var(--paper-2); display: grid; place-items: center; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb svg { width: 38%; height: 38%; color: var(--ink); opacity: 0.55; }
.match {
  position: absolute; top: 10px; right: 10px;
  background: var(--ink); color: var(--paper); font-size: 13px; font-weight: 600;
  padding: 4px 10px; border-radius: 99px;
}
.new-flag { position: absolute; top: 10px; left: 10px; background: var(--brass); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 99px; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.source-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.badge { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; background: var(--paper-2); color: var(--ink-soft); }
.badge.live { background: var(--live-soft); color: var(--live); }
.card h2 { font: 600 21px/1.2 var(--serif); }
.meta { font-size: 13.5px; color: var(--ink-soft); }
.price-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); }
.price small { display: block; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.price strong { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ends { font-size: 13px; color: var(--ink-soft); text-align: right; white-space: nowrap; }
.ends.soon { color: var(--brand-danger); font-weight: 600; }
.reasons { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 13.5px; color: var(--ink-soft); }
.reasons li::before { content: '✓'; color: var(--live); font-weight: 700; margin-right: 7px; }

.empty { text-align: center; padding: 56px 16px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--ink-soft); }
.empty h2 { font: 600 28px/1.2 var(--serif); color: var(--ink); margin-bottom: 8px; }
.empty button { margin-top: 18px; }

.skeleton { height: 330px; border-radius: var(--radius); background: linear-gradient(100deg, var(--paper-2) 30%, #f3eee2 50%, var(--paper-2) 70%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* How it works */
.how { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; padding: 40px 0 64px; border-top: 1px solid var(--line); }
.how-num { font: 500 italic 34px/1 var(--serif); color: var(--brass); }
.how h2 { font: 600 24px/1.2 var(--serif); margin: 8px 0 6px; }
.how p:last-child { color: var(--ink-soft); font-size: 15px; }

.foot { border-top: 1px solid var(--line); padding: 20px var(--gutter) calc(20px + env(safe-area-inset-bottom)); font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* Sheets */
dialog.sheet {
  border: 0; padding: 0; background: var(--card); color: var(--ink);
  border-radius: 20px; width: min(720px, calc(100vw - 32px)); max-height: min(88dvh, 860px);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.5);
}
dialog.sheet::backdrop { background: rgba(20, 38, 31, 0.55); }
dialog.drawer { padding: 22px; width: min(520px, calc(100vw - 32px)); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.sheet-head h2 { font: 600 30px/1.1 var(--serif); }
.detail-thumb { aspect-ratio: 16 / 9; background: var(--paper-2); display: grid; place-items: center; position: relative; }
.detail-thumb img { width: 100%; height: 100%; object-fit: contain; }
.detail-thumb svg { width: 22%; height: 44%; color: var(--ink); opacity: 0.55; }
.detail-thumb .close { position: absolute; top: 12px; right: 12px; background: var(--card); }
.detail-body { padding: 22px; display: grid; gap: 14px; }
.detail-body h2 { font: 600 clamp(26px, 4vw, 34px)/1.15 var(--serif); }
.why { background: var(--live-soft); border-radius: 12px; padding: 14px 16px; }
.why h3 { margin: 0 0 6px; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--live); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 20px; margin: 0; }
.facts dt { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-size: 15px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.piece-origin { margin-top: 22px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--brand-canvas); overflow-wrap: anywhere; }
.piece-origin > p + p { margin-top: 10px; }
#piece-brief-original { font: 500 25px/1.3 var(--serif); color: var(--ink); }
#piece-brief-text { line-height: 1.6; min-height: 150px; }
.draft-status, .draft-error { font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.draft-status { color: var(--ink-soft); }
.draft-error { color: var(--brand-danger); }
.draft-error:empty { display: none; }
.sold-ask { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.sold-ask .secondary { max-width: 210px; padding: 10px 12px; white-space: normal; }
.detail-actions a.primary { display: inline-flex; align-items: center; min-height: 44px; border-radius: 99px; text-decoration: none; }

.hunt-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.hunt { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 8px; }
.hunt p.q { font: 500 20px/1.25 var(--serif); }
.hunt .row { display: flex; gap: 8px; justify-content: space-between; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.hunt .row button { min-height: 36px; padding: 0 14px; font-size: 14px; }
/* The row's text is muted, but its buttons are controls: muted text on the hover background is 4.49:1, under the 4.5:1 minimum. */
.hunt .row .ghost { color: var(--ink-soft); }

.toast {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  background: var(--ink); color: var(--paper); padding: 11px 18px; border-radius: 99px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 640px) {
  .search { flex-direction: column; border-radius: 18px; }
  .search .primary { border-radius: 12px; }
  .toolbar { align-items: stretch; }
  .toolbar-right { justify-content: space-between; width: 100%; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 4px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filters .chip { flex: none; }
  .grid { grid-template-columns: 1fr; }
  dialog.sheet { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 20px 20px 0 0; max-height: 92dvh; }
  .demo-tag { display: none; }
  .wordmark { margin-right: auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Sample listings have a drawing instead of a photograph, so they need less room.
   A photograph that failed to load keeps its frame (.photo-frame), so the page does not jump. */
.thumb:not(:has(img)):not(.photo-frame) { aspect-ratio: 2 / 1; }
.detail-thumb:not(:has(img)) { aspect-ratio: auto; }

/* Coverage and AI dialogs */
dialog.drawer.wide { width: min(820px, calc(100vw - 32px)); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; white-space: nowrap; background: var(--paper-2); color: var(--ink-soft); }
.pill.live { background: var(--live-soft); color: var(--live); }
.pill.key { background: var(--brass-soft); color: var(--ink); }
.pill.todo { background: var(--paper-2); color: var(--ink-soft); }
details { border-top: 1px solid var(--line); padding: 10px 0; }
summary { cursor: pointer; font: 600 22px/1.3 var(--serif); min-height: 32px; }
.src-list { list-style: none; margin: 10px 0 4px; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.src-list li { display: grid; grid-template-columns: 170px 1fr; gap: 10px; align-items: start; }
.form { display: grid; gap: 14px; margin-top: 16px; }
.form label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.form input, .form select { min-height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: var(--card); font-weight: 400; font-size: 16px; }
/* A long option (a model's name with what it can do and costs) must not widen the form past its drawer. */
.form, .form label { grid-template-columns: minmax(0, 1fr); }
.form select { width: 100%; min-width: 0; text-overflow: ellipsis; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .src-list li { grid-template-columns: 1fr; gap: 4px; }
  .top { flex-wrap: wrap; row-gap: 8px; }
  .top .ghost { min-height: 38px; padding: 0 12px; font-size: 14px; }
}

/* Photographs from live sources come in every shape: hold the frame steady. */
.thumb { flex: none; overflow: hidden; }
.thumb img { position: absolute; inset: 0; }

/* Sold before */
.sold { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); }
.sold h2 { font: 600 clamp(28px, 4vw, 38px)/1.1 var(--serif); }
.sold-summary { margin: 8px 0 18px; color: var(--ink-soft); max-width: 70ch; }
.sold-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.sold-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 10px 10px; }
.sold-thumb { width: 64px; height: 64px; border-radius: 8px; overflow: hidden; background: var(--paper-2); }
.sold-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sold-title { font: 600 18px/1.25 var(--serif); }
.sold-title a { color: var(--ink); text-decoration-color: var(--line); text-underline-offset: 3px; }
.sold-title a:hover { text-decoration-color: var(--ink); }
.sold-price { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sold-price strong { display: block; font-size: 17px; }
.sold-price small { color: var(--muted); font-size: 12.5px; }
@media (max-width: 640px) {
  .sold-row { grid-template-columns: 52px 1fr; }
  .sold-thumb { width: 52px; height: 52px; }
  .sold-price { grid-column: 2; text-align: left; }
  .sold-price strong, .sold-price small { display: inline; margin-right: 8px; }
}

/* Hunts panel */
.count.alert { background: var(--brass); color: var(--paper); }
.pill.soon { background: var(--brand-danger-surface); color: var(--brand-danger); }
.pills.tight { margin: 0; }
.hunt.paused .q { color: var(--muted); }
.hunt .row.actions { justify-content: flex-start; }
.hunt-edit { display: grid; gap: 8px; }
.hunt-edit textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--card); font-size: 16px; resize: vertical; }
.hunt-edit[hidden] { display: none; }

/* Alerts */
.alerts { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.alerts h3 { font: 600 24px/1.2 var(--serif); }
.alert-options { display: grid; gap: 12px; font-size: 14px; }
.alert-options label { display: grid; gap: 6px; font-weight: 600; color: var(--ink-soft); font-size: 13px; }
.alert-options select { min-height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: var(--card); font-weight: 400; font-size: 16px; }
.alert-options label.check { display: flex; align-items: center; gap: 10px; font-weight: 400; font-size: 15px; color: var(--ink); min-height: 44px; }
.alert-options input[type='checkbox'] { width: 20px; height: 20px; accent-color: var(--ink); }

/* Quarry on the phone: the notification guide (UX-42) */
.setup-steps { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.setup-step { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: grid; gap: 8px; background: var(--card); }
.setup-step h3 { font: 600 18px/1.3 var(--sans); letter-spacing: -.3px; }
.setup-step p { font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.setup-step-state { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.setup-step[data-state='open'] { border-color: var(--ink); }
.setup-step[data-state='done'] { background: var(--brand-success-surface); border-color: var(--brand-success); }
.setup-step[data-state='done'] .setup-step-state { color: var(--brand-success); }
.setup-step[data-state='stuck'] { background: var(--brand-danger-surface); border-color: var(--brand-danger); }
.setup-step[data-state='stuck'] .setup-step-state { color: var(--brand-danger); }
.setup-step[data-state='later'] { background: var(--paper-2); }
.setup-step[data-state='later'] h3 { color: var(--ink-soft); }
/* A label that wraps on a narrow phone keeps room above and below it. */
.setup-step button { padding-block: 10px; line-height: 1.3; }
.setup-step button[aria-disabled='true'] { opacity: .6; cursor: progress; }
.setup-status { margin-top: 14px; font-weight: 600; font-size: 15px; line-height: 1.5; }
.setup-status:empty { display: none; }
.setup-check { margin-top: 10px; padding: 14px 18px; border-radius: 14px; background: var(--paper-2); display: grid; gap: 8px; }
.setup-check h3 { font: 600 15px/1.3 var(--sans); }
.setup-check ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 15px; line-height: 1.5; }
#phone-setup-note { margin-top: 16px; }

/* Find me one, requests, staff */
.sold-row { grid-template-columns: 64px 1fr auto auto; }
.sold-ask .ghost { min-height: 38px; padding: 0 14px; font-size: 14px; white-space: nowrap; }
.reply { font-size: 14.5px; background: var(--paper-2); border-radius: 8px; padding: 8px 10px; }
.choices { border: 0; padding: 0; margin: 0; display: grid; gap: 2px; }
.choices legend { font-size: 13px; font-weight: 600; color: var(--ink-soft); padding: 0; margin-bottom: 4px; }
.form label.check, .choices label.check { display: flex; align-items: center; gap: 10px; font-weight: 400; font-size: 15px; color: var(--ink); min-height: 44px; }
.choices input[type='radio'] { width: 20px; height: 20px; accent-color: var(--ink); flex: none; }
.form textarea { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--card); font-weight: 400; font-size: 16px; resize: vertical; }
.hunt-edit label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.hunt-edit select { min-height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: var(--card); font-size: 16px; }
@media (max-width: 640px) {
  .sold-row { grid-template-columns: 52px 1fr; }
  .sold-ask { grid-column: 2; }
}

/* Curation */
.caution { font-size: 13.5px; background: var(--brass-soft); border-radius: 8px; padding: 7px 10px; color: var(--ink); }
.near-row { grid-template-columns: 64px 1fr auto; }
.near-why { font-size: 14px; color: var(--ink-soft); margin-top: 3px; }
@media (max-width: 640px) { .near-row { grid-template-columns: 52px 1fr; } }

/* Staff console */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.stat { background: var(--paper-2); border-radius: 10px; padding: 12px 14px; display: grid; gap: 2px; }
.stat strong { font: 600 26px/1.1 var(--serif); }
.stat span { font-size: 12.5px; color: var(--ink-soft); }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14.5px; color: var(--ink-soft); }
.plain-list li { overflow-wrap: anywhere; }
.report-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.report-scroll:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.report-table { width: 100%; min-width: 780px; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.report-table caption { text-align: left; padding: 12px; color: var(--ink-soft); font-size: 13px; }
.report-table th, .report-table td { padding: 12px 10px; text-align: right; border-top: 1px solid var(--line); }
.report-table thead th { font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.report-table th:first-child { text-align: left; white-space: nowrap; position: sticky; left: 0; z-index: 1; background: var(--card); }
.report-table tbody th { font-weight: 500; }
.report-table tbody tr:first-child { background: var(--paper-2); }
.report-table tbody tr:first-child th { background: var(--paper-2); }
.report-table .small { display: block; font-weight: 400; }

/* Passkeys and recovery */
.small-btn { min-height: 32px; padding: 0 12px; font-size: 13px; margin-left: 6px; }
.recovery-link { display: grid; gap: 6px; }
.recovery-link input { width: 100%; min-height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; background: var(--paper-2); font: 13px/1.2 ui-monospace, monospace; }

/* "Not this": the form in a piece's detail, and the list of what was left out of a hunt */
.not-this { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.not-this input { min-height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: var(--card); font-size: 16px; }
.left-row { display: flex; gap: 14px; align-items: center; justify-content: space-between; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.left-words { margin: 0 0 12px; font-size: 14px; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.left-words:empty { display: none; }
.linkish { background: none; border: 0; padding: 0 0 0 4px; font: inherit; font-weight: 500; text-decoration: underline; color: inherit; cursor: pointer; }
.left-row button { flex: none; white-space: nowrap; }

/* Web finds (UX-39): what Quarry checked about one, and the report of a wrong find. The state is always in words, never colour alone. */
.web-check { font-size: 13px; color: var(--ink-soft); }
.web-trust { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: grid; gap: 10px; }
.web-trust h3, .web-facts-head h3, .web-report h3 { margin: 0; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.web-trust-state { justify-self: start; font-weight: 600; padding: 4px 10px; border-radius: 8px; background: var(--brass-soft); color: var(--ink); }
.web-trust[data-web-state='opened'] .web-trust-state { background: var(--live-soft); color: var(--live); }
.web-trust dl { margin: 0; display: grid; gap: 10px; }
.web-trust dt { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.web-trust dd { margin: 2px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.web-facts-head { display: grid; gap: 2px; }
.web-report { border-top: 1px solid var(--line); padding-top: 16px; display: grid; gap: 10px; }
.web-report-reasons { display: flex; flex-wrap: wrap; gap: 8px; }
.web-report-status { color: var(--ink-soft); }
.web-report-status:empty { display: none; }

/* Quarry brand system 1.0: editorial display, quiet functional surfaces. */
[hidden] { display: none !important; }
html { scroll-padding-top: 100px; }
body { line-height: 1.6; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { min-height: 48px; border-radius: 12px; font-size: 14px; font-weight: 600; transition: background .16s, color .16s, border-color .16s; }
button:disabled { cursor: not-allowed; opacity: .65; }
a { text-underline-offset: 4px; }
:focus-visible { outline: 3px solid var(--brand-focus); outline-offset: 3px; }
.brand-inverse :focus-visible { outline-color: var(--brand-inverse-focus); }
.skip-link { position: fixed; top: 12px; left: 16px; z-index: 100; transform: translateY(-150%); background: var(--ink); color: var(--paper); padding: 12px 20px; border-radius: 10px; }
.skip-link:focus { transform: none; }
.top { min-height: 96px; gap: 16px; padding-block: 20px; background: var(--card); }
.wordmark { display: inline-flex; align-items: baseline; font-size: 38px; font-weight: 600; letter-spacing: -1.2px; }
.brand-point { width: 6px; height: 6px; border-radius: 50%; background: var(--brass); margin-left: 3px; }
.demo-tag { font-size: 12px; letter-spacing: .13em; padding: 5px 9px; border: 1px solid var(--line); background: transparent; color: var(--ink-soft); }
.primary-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.primary-nav .ghost { border-color: transparent; color: var(--ink-soft); padding-inline: 14px; }
.primary-nav .primary { margin-left: 10px; padding-inline: 24px; }
#open-account { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-toggle { display: none; }
.count { font-size: 12px; min-width: 20px; background: var(--paper-2); color: var(--ink); }
main { max-width: 1440px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr); gap: clamp(40px, 6vw, 96px); max-width: none; padding-block: 72px 64px; align-items: center; }
.hero-copy { min-width: 0; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .16em; color: var(--brass); margin-bottom: 12px; }
.eyebrow-rule { display: inline-block; width: 30px; height: 1px; background: var(--brass); margin-right: 10px; vertical-align: middle; }
h1 { font-size: clamp(64px, 6.8vw, 102px); line-height: .96; letter-spacing: -2.5px; font-weight: 500; }
h1 em { font-weight: 500; }
.lede { font-size: 17px; line-height: 1.75; max-width: 46ch; margin-top: 24px; }
.search { display: grid; gap: 0; padding: 20px; margin-top: 30px; border: 1px solid var(--brand-control-border); border-radius: 20px; box-shadow: 0 16px 44px -30px #14261f38; }
.search-label { font-size: 12px; font-weight: 700; letter-spacing: .01em; color: var(--ink); }
.search textarea { padding: 10px 0 14px; font-size: 17px; line-height: 1.55; min-height: 80px; }
.search textarea::placeholder { color: var(--muted); }
.search-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.search-hint { font-size: 12px; color: var(--muted); max-width: 22ch; }
.search-waiting { margin: 12px 0 0; }
#guest-note button { display: block; margin-top: 10px; }
.search .primary { min-height: 48px; border-radius: 12px; padding-inline: 22px; display: flex; align-items: center; gap: 24px; }
.examples { gap: 8px; margin-top: 18px; }
.examples-label { width: 100%; font-size: 12px; color: var(--muted); }
.examples .chip { font-size: 12px; min-height: 48px; border-radius: 8px; padding-inline: 10px; background: var(--card); }
.sources-line { max-width: 60ch; font-size: 12px; line-height: 1.8; }
.hero-art { position: relative; overflow: hidden; min-height: 490px; align-self: stretch; border-radius: 24px; padding: 30px; background: var(--ink); color: var(--paper); display: flex; flex-direction: column; justify-content: center; box-shadow: 0 24px 64px -40px #14261f80; }
.specimen-top { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 50px; font-size: 12px; font-weight: 600; letter-spacing: .12em; color: var(--brand-inverse-muted); }
.specimen-title { font: 500 clamp(32px, 3.6vw, 50px)/1.1 var(--serif); letter-spacing: -.6px; position: relative; z-index: 1; }
.specimen-title em { color: var(--brass-soft); }
.specimen-facts { margin: 32px 0 28px; display: grid; gap: 12px; position: relative; z-index: 1; }
.specimen-facts > div { display: flex; justify-content: space-between; gap: 18px; padding-bottom: 10px; border-bottom: 1px solid #b7c2b92b; font-size: 12px; }
.specimen-facts dt { color: var(--brand-inverse-muted); }
.specimen-facts dd { margin: 0; text-align: right; max-width: 65%; }
.specimen-action { border: 0; border-radius: 0; padding: 12px 0; display: flex; justify-content: space-between; color: var(--brass-soft); background: transparent; text-align: left; z-index: 1; font-size: 12px; }
.specimen-seal { position: absolute; font: 500 300px/1 var(--serif); right: -35px; bottom: -60px; opacity: .045; pointer-events: none; }
.hero.compact { display: block; padding: 28px 0 32px; }
.hero.compact .hero-art, .hero.compact .examples, .hero.compact .sources-line { display: none; }
.hero.compact .search { margin: 0; grid-template-columns: 1fr auto; gap: 8px 24px; padding: 16px 20px; }
.hero.compact .search-label { grid-column: 1; }
.hero.compact .search textarea { grid-column: 1; min-height: 58px; padding: 8px 0 0; }
.hero.compact .search-bottom { grid-column: 2; grid-row: 1 / 3; padding: 0; border: 0; }
.hero.compact .search-hint { display: none; }
.brief-card { border-radius: 20px; padding: 26px 30px; }
.brief-card .summary { font-family: var(--sans); font-size: clamp(21px, 3vw, 28px); font-weight: 500; }
.brief-card .label { color: var(--brand-accent-soft); font-size: 12px; }
.brief-card .reader { color: var(--brand-inverse-muted); font-size: 12px; line-height: 1.7; }
.facet { border-radius: 8px; font-size: 12px; background: #f5f1e812; }
.facet b { color: var(--brand-accent-soft); }
.results-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-top: 38px; }
.results-heading h1 { font: 500 clamp(32px, 4vw, 44px)/1.1 var(--serif); letter-spacing: -.6px; }
.results-heading .eyebrow { margin-bottom: 8px; }
#results-count { font-size: 12px; padding-bottom: 4px; }
.toolbar { margin-top: 24px; gap: 16px; }
.chip { border-radius: 10px; min-height: 48px; font-size: 13px; background: var(--card); }
.sort { font-size: 12px; }
.sort select { border-radius: 10px; font-size: 12px; padding-inline: 12px; }
.secondary { border-color: var(--brand-control-border); box-shadow: 0 2px 2px #14261f03; }
.grid { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 24px; }
.card { border-radius: 20px; border-color: var(--line); box-shadow: 0 3px 12px -8px #14261f28; }
.card:hover { border-color: var(--brand-control-border); transform: translateY(-3px); box-shadow: 0 18px 32px -22px #14261f50; }
.thumb { aspect-ratio: 1.12; background: var(--card); border-bottom: 1px solid var(--line); }
.thumb img { object-fit: contain; padding: 18px; }
.card-body { padding: 20px; gap: 12px; }
.card h2 { font-family: var(--sans); font-size: 17px; line-height: 1.45; font-weight: 600; letter-spacing: -.25px; }
.source-row { font-size: 12px; }
.badge { font-size: 12px; border-radius: 5px; }
.match { background: var(--paper); color: var(--ink); border: 1px solid var(--line); font-size: 12px; border-radius: 8px; }
.reasons { font-size: 12px; line-height: 1.6; }
.price-row { margin-top: 8px; padding-top: 14px; }
.price strong { font-size: 19px; letter-spacing: -.3px; }
.ends { font-size: 12px; }
.how { gap: 40px; padding: 40px 0 64px; }
.how-item { padding-left: 22px; border-left: 1px solid var(--line); }
.how-num { font-family: var(--sans); font-size: 12px; font-weight: 600; font-style: normal; }
.how h2 { font-family: var(--sans); font-size: 17px; line-height: 1.4; margin-block: 12px 8px; }
.how p:last-child { font-size: 13px; line-height: 1.7; }
.foot { background: var(--card); gap: 28px; padding-block: 32px; align-items: start; font-size: 12px; line-height: 1.7; }
.footer-wordmark { font: 600 32px/1 var(--serif); text-decoration: none; color: var(--ink); }
.foot > div:first-child p { margin-top: 8px; }
.footer-note { max-width: 54ch; }
.footer-note details { border: 0; padding: 4px 0; }
.footer-note summary { min-height: 32px; font: 600 12px/2 var(--sans); text-decoration: underline; text-underline-offset: 3px; }
.footer-note details p { margin-top: 6px; }
.footer-links { display: flex; flex-direction: column; gap: 12px; }
dialog.sheet { border: 1px solid var(--line); border-radius: 24px; max-height: calc(100dvh - 64px); box-shadow: 0 32px 120px #14261f38; }
dialog.sheet::backdrop { background: #14261f66; backdrop-filter: blur(5px); }
dialog.drawer { padding: 28px; }
.sheet-head { position: sticky; top: -28px; z-index: 5; background: var(--card); padding-block: 8px 18px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { font-family: var(--sans); font-size: 25px; letter-spacing: -.7px; }
.close { min-width: 48px; font-size: 12px; border-radius: 10px; }
.alerts { gap: 14px; padding-top: 24px; margin-top: 24px; }
.alerts h3 { font-family: var(--sans); font-size: 18px; letter-spacing: -.3px; }
.form input, .form select, .form textarea, .hunt-edit textarea { border-color: var(--brand-control-border); border-radius: 10px; }
.form-actions { margin-top: 8px; }
.form label { font-size: 12px; }
.form input[type=checkbox], .form input[type=radio] { min-height: 20px; width: 20px; padding: 0; flex: none; accent-color: var(--ink); }
.hunt-list { gap: 14px; }
.hunt { padding: 20px; border-radius: 16px; background: var(--card); }
.hunt p.q { font-family: var(--sans); font-size: 16px; font-weight: 600; line-height: 1.5; }
.hunt .row { line-height: 1.6; }
.empty { border: 1px solid var(--line); background: var(--card); border-radius: 20px; padding: 56px 24px; }
.empty h2 { font-family: var(--sans); font-size: 22px; font-weight: 600; }
.empty p { max-width: 56ch; margin-inline: auto; font-size: 14px; line-height: 1.7; }
.notice, .message { background: var(--brand-subtle); }
.stat { border: 1px solid var(--line); background: var(--card); padding: 20px; border-radius: 16px; }
.stat strong { font-family: var(--sans); font-size: 28px; letter-spacing: -1px; }
.stat span { font-size: 12px; }
.sold-title { font-family: var(--sans); font-size: 15px; font-weight: 600; }
.sold-row { padding: 14px; border-radius: 16px; }
#detail[open] { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); max-width: 1080px; width: calc(100vw - 64px); }
.detail-thumb { aspect-ratio: auto; min-width: 0; min-height: 0; padding: 24px; background: var(--paper-2); }
.detail-thumb img { max-height: 700px; object-fit: contain; }
.detail-thumb .close { z-index: 6; }
.detail-body { min-width: 0; padding: 32px; gap: 20px; }
.detail-body h2 { font-family: var(--sans); font-size: clamp(23px, 3vw, 30px); font-weight: 600; letter-spacing: -.8px; }
.detail-actions a.primary { padding: 12px 24px; border-radius: 12px; justify-content: center; }
.facts { gap: 18px; }
.facts dt { font-size: 12px; }
.facts dd { font-size: 14px; }
.why { padding: 18px; }
.toast { border-radius: 12px; box-shadow: 0 8px 32px #14261f30; z-index: 20; }
/* Operations: clear hierarchy and an intentional empty state, not a wall of zeroes. */
dialog.sheet.drawer.report-dashboard { width: min(1180px, calc(100vw - 48px)); max-width: calc(100vw - 48px); padding: 0; background: var(--paper); }
.report-topbar { display: flex; gap: 20px; align-items: center; position: sticky; top: 0; z-index: 6; background: var(--card); border-bottom: 1px solid var(--line); padding: 14px 28px; }
.report-wordmark { font: 600 31px/1 var(--serif); text-decoration: none; color: var(--ink); letter-spacing: -.5px; }
.report-context { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .12em; flex: 1; }
.report-content { padding: 32px; }
.report-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.report-heading h2 { font: 500 clamp(32px, 4vw, 46px)/1.1 var(--serif); letter-spacing: -.8px; margin-bottom: 8px; }
.report-heading p.muted { font-size: 13px; }
.report-heading .eyebrow { font-size: 12px; }
.report-date { border: 1px solid var(--line); border-radius: 8px; font-size: 12px; padding: 8px 12px; background: var(--card); white-space: nowrap; color: var(--ink-soft); }
.report-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.report-kpi { border: 1px solid var(--line); background: var(--card); border-radius: 16px; padding: 20px; }
.report-kpi-label { color: var(--ink-soft); font-size: 12px; font-weight: 500; }
.report-kpi-value { display: block; color: var(--ink); font-size: 32px; line-height: 1.3; font-weight: 500; letter-spacing: -1.3px; margin-block: 12px 6px; font-variant-numeric: tabular-nums; }
.report-kpi-note { color: var(--muted); font-size: 12px; }
.report-main-grid { display: grid; grid-template-columns: minmax(0,1fr) 290px; gap: 20px; align-items: stretch; }
.activity-card, .reminder-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 24px; }
.section-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.section-heading h3 { font-size: 19px; font-weight: 500; letter-spacing: -.4px; }
.section-heading .eyebrow { font-size: 12px; margin-bottom: 8px; }
.chart-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--ink-soft); padding-top: 4px; }
.chart-legend span { display: flex; align-items: center; gap: 6px; }
.chart-legend i { width: 7px; height: 7px; border-radius: 2px; display: inline-block; }
.legend-search { background: var(--ink); }.legend-saved { background: var(--brass); }
.chart-empty { min-height: 250px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px; text-align: center; margin-top: 24px; border-block: 1px solid var(--line); background: repeating-linear-gradient(to bottom,transparent 0, transparent 61px, #ddd5c330 62px); }
.chart-empty-icon { width: 48px; height: 48px; border: 1px solid var(--line); background: var(--card); border-radius: 14px; color: var(--brass); display: grid; place-items: center; font-size: 24px; }
.chart-empty h4 { margin: 0; font-size: 15px; font-weight: 600; }
.chart-empty p { font-size: 12px; color: var(--muted); max-width: 32ch; }
.chart-note { margin-top: 16px; color: var(--muted); font-size: 12px; }
.activity-bars { display: grid; grid-template-columns: repeat(8,1fr); gap: 14px; margin-top: 32px; padding-top: 12px; }
.activity-column { min-width: 0; text-align: center; font-size: 12px; color: var(--muted); }
.activity-bar-pair { display: flex; align-items: end; gap: 4px; height: 210px; justify-content: center; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.activity-bar { width: 16px; max-width: 40%; height: var(--value); background: var(--ink); border-radius: 5px 5px 0 0; }
.activity-bar.saved { background: var(--brass); }
.reminder-card { display: flex; flex-direction: column; align-items: start; }
.reminder-icon { width: 38px; height: 38px; border-radius: 12px; background: var(--paper-2); color: var(--brass); font-size: 22px; display: grid; place-items: center; margin-bottom: 24px; }
.reminder-card .eyebrow { font-size: 12px; margin-bottom: 8px; }
.reminder-card h3 { font: 500 32px/1.05 var(--serif); letter-spacing: -.5px; margin-bottom: 12px; }
.reminder-card > p.muted { font-size: 12px; line-height: 1.7; }
.switch-row { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 20px; min-height: 60px; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 600; }
.switch-row input { appearance: none; flex: none; width: 44px; height: 26px; border-radius: 20px; border: 1px solid var(--brand-control-border); background: var(--paper-2); position: relative; cursor: pointer; }
.switch-row input::before { content: ''; position: absolute; width: 18px; height: 18px; top: 3px; left: 3px; border-radius: 50%; background: var(--ink-soft); transition: transform .15s; }
.switch-row input:checked { background: var(--ink); border-color: var(--ink); }
.switch-row input:checked::before { transform: translateX(18px); background: var(--paper); }
.switch-row input:disabled { cursor: wait; }
.reminder-state { margin-top: 16px; margin-bottom: 10px; background: var(--paper-2); padding: 3px 8px; border-radius: 5px; font-size: 12px; font-weight: 600; }
#owner-report-reminder-status { font-size: 12px; line-height: 1.7; }
.text-action { color: var(--brass); background: transparent; padding: 8px 0; text-align: left; font-size: 12px; border-radius: 4px; }
.reminder-fineprint { font-size: 12px; line-height: 1.7; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; margin-top: 12px; }
.report-breakdown { margin-top: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); padding: 4px 20px 12px; }
.report-breakdown > summary { font: 500 13px/1.5 var(--sans); padding-block: 14px; min-height: 48px; }
.report-breakdown > summary span { font-size: 12px; margin-left: 12px; }
.report-table-note { margin-bottom: 16px; font-size: 12px; }
.report-table { min-width: 780px; font-size: 12px; }
.report-table th, .report-table td { padding: 10px; }
.report-table thead th, .report-table caption { font-size: 12px; }
.report-table .small { font-size: 12px; }
@media (max-width: 1000px) { .primary-nav .ghost { padding-inline: 8px; font-size: 12px; }.hero { gap: 36px; }.hero-art { padding: 24px; }.report-main-grid { grid-template-columns: minmax(0,1fr) 260px; }.chart-legend { flex-direction: column; gap: 4px; } }
@media (max-width: 760px) {
  .top { display: flex; flex-wrap: wrap; min-height: 78px; padding-block: 14px; gap: 12px; }
  .wordmark { font-size: 33px; margin: 0; }.demo-tag { display: inline-block; margin-right: auto; font-size: 12px; }
  .nav-toggle { display: inline-flex; align-items: center; gap: 14px; margin-left: auto; min-width: 48px; min-height: 48px !important; }
  .primary-nav { display: none; flex-basis: 100%; padding-top: 12px; border-top: 1px solid var(--line); flex-wrap: wrap; gap: 8px; margin: 0; }
  .primary-nav[data-open=true] { display: flex; }.primary-nav button { flex: 1 1 42%; border: 1px solid var(--line) !important; min-height: 48px !important; }.primary-nav .primary { margin: 0; }
  .hero { grid-template-columns: 1fr; padding-block: 40px; gap: 32px; }.hero h1 { font-size: 76px; }.lede { font-size: 16px; }.hero-art { min-height: 400px; }.specimen-title { font-size: 40px; }.specimen-top { margin-bottom: 28px; }
  .hero.compact .search { display: grid; grid-template-columns: 1fr; }.hero.compact .search-bottom { grid-column: 1; grid-row: auto; justify-content: end; margin-top: 12px; }.hero.compact .search textarea { width: 100%; }
  .results-heading { align-items: start; flex-direction: column; gap: 10px; }.toolbar { margin-top: 18px; }.grid { gap: 20px; grid-template-columns: repeat(2,minmax(0,1fr)); }.thumb { aspect-ratio: 1; }.card-body { padding: 16px; }.card h2 { font-size: 15px; }.price-row { flex-wrap: wrap; }.ends { text-align: left; }
  .how { padding-block: 28px 48px; gap: 28px; }.how-item { padding-left: 18px; }.foot { flex-direction: column; }
  dialog.sheet, dialog.drawer.wide { width: calc(100vw - 24px); max-width: calc(100vw - 24px); margin: auto; max-height: calc(100dvh - 32px); border-radius: 22px; }dialog.drawer { padding: 22px; }.sheet-head { top: -22px; }
  #detail[open] { width: calc(100vw - 24px); display: block; }.detail-thumb { min-height: 0; height: min(360px,80vw); aspect-ratio: auto; }.detail-thumb img { min-height: 0; }.detail-body { padding: 24px; }
  dialog.sheet.drawer.report-dashboard { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; border: 0; margin: 0; }
  .report-topbar { padding: 12px 20px; gap: 14px; }.report-context { font-size: 12px; }.report-wordmark { font-size: 28px; }.report-content { padding: 24px 20px; }.report-heading { align-items: start; flex-direction: column; gap: 16px; }.report-heading h2 { font-size: 38px; }.report-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }.report-kpi { padding: 16px; }.report-kpi-value { font-size: 28px; }.report-main-grid { grid-template-columns: 1fr; gap: 16px; }.activity-card,.reminder-card { padding: 20px; }.chart-legend { flex-direction: row; }.section-heading { flex-wrap: wrap; }.chart-empty { min-height: 210px; }.reminder-card h3 br { display: none; }.reminder-card h3 { font-size: 30px; }.reminder-icon { margin-bottom: 16px; }.reminder-fineprint { font-size: 12px; }.report-breakdown > summary span { display: block; margin: 4px 0 0; }.report-kpi-label { font-size: 12px; }.report-date { font-size: 12px; }
}
@media (max-width: 480px) { .grid { grid-template-columns: 1fr; }.hero h1 { font-size: 66px; }.hero-art { min-height: 380px; }.search { padding: 16px; }.search-hint { display: none; }.search-bottom { justify-content: stretch; }.search .primary { width: 100%; justify-content: space-between; }.hero.compact .search .primary { width: 100%; }.hero.compact .search-bottom { display: flex; }.specimen-title { font-size: 37px; }.toolbar-right { gap: 10px; }.toolbar-right .secondary { flex: 1; }.report-topbar .close { font-size: 0; width: 48px; padding: 0; }.report-topbar .close span { font-size: 25px; }.activity-bars { gap: 7px; }.activity-bar-pair { gap: 2px; }.activity-bar { width: 10px; }.chart-legend { font-size: 12px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; }*,*::before,*::after { animation: none !important; transition: none !important; } }
@media (forced-colors: active) { button,input,select,textarea { border: 1px solid ButtonText; }.switch-row input { appearance: auto; }.switch-row input::before { display: none; }.activity-bar { border: 2px solid CanvasText; }.legend-search,.legend-saved { border: 1px solid CanvasText; } }

/* Reading size and contrast take precedence over visual density. */
.reminder-card > p.muted, #owner-report-reminder-status { font-size: 14px; }
.lede, .report-heading p.muted { line-height: 1.7; }
.reasons, .source-row, .ends, .sold-summary, .detail-body p, .hunt .row { font-size: 14px; }
.detail-body dd, .detail-body h2, .card h2 { overflow-wrap: anywhere; }
.small-btn, .hunt .row button, .footer-note summary { min-height: 48px; }
/* The one link among a hunt's buttons (UX-33) looks like them. */
.hunt .row a.ghost { display: inline-flex; align-items: center; min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 99px; font-weight: 500; text-decoration: none; }
/* Patterns distinguish chart series even when color is unavailable. */
.activity-bar.saved, .legend-saved { background-color: var(--brass); background-image: repeating-linear-gradient(135deg,transparent 0 4px,var(--paper) 4px 6px); }
@media (max-width: 480px) { .top .demo-tag { display: none; } }
.report-table { font-size: 13px; }
.form input:not([type=checkbox]):not([type=radio]), .form select, .form textarea, .sort select, .alert-options select, .hunt-edit textarea { min-height: 48px; border-color: var(--brand-control-border); }
.brief-card .reader { border-top: 1px solid #b7c2b940; margin-top: 18px; padding-top: 12px; }
.brief-card .reader summary { color: var(--brand-inverse-muted); font: 500 12px/1.6 var(--sans); min-height: 48px; padding-block: 12px; }
.form label.check, .alert-options label.check, summary { min-height: 48px; }
.brief-card .reader p { margin-top: 10px; }

/* The rehearsal copy says so on every page (lib/environment.js) */
.staging-banner { position: sticky; top: 0; z-index: 1000; padding: 8px 16px; text-align: center; font-weight: 600; font-size: 14px; background: var(--brand-accent-soft, #E6D6AD); color: var(--brand-text, #14261F); border-bottom: 1px solid var(--brand-accent, #8A5F1C); }

/* Professional project organization uses the shared brand surfaces and controls. */
.project-tools { display:flex; flex-wrap:wrap; gap:12px; align-items:end; margin:20px 0; }
.project-tools label,.save-project { display:grid; gap:6px; font-size:12px; font-weight:600; flex:1; min-width:140px; }
.project-tools select,.save-project select,.hunt-project select { min-height:48px; border:1px solid var(--brand-control-border); border-radius:12px; background:var(--card); padding:10px 12px; font:inherit; color:var(--ink); width:100%; }
.save-project { flex:0 1 190px; }
.project-create { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:12px; padding:20px; background:var(--paper); border-radius:16px; }
.project-status { min-height:26px; margin:12px 0; color:var(--ink-soft); font-size:14px; }
.project-list { display:grid; gap:14px; margin:20px 0; }
.project-card { padding:20px; border:1px solid var(--line); border-radius:20px; background:var(--paper); }
.project-card h3 { font:600 20px/1.4 var(--sans); overflow-wrap:anywhere; }
.project-card .project-meta { display:flex; flex-wrap:wrap; gap:10px; align-items:center; font-size:14px; color:var(--ink-soft); margin:8px 0 16px; }
.project-edit { display:grid; gap:12px; }
.project-edit label { display:grid; gap:6px; font-size:12px; font-weight:600; }
.project-edit input { min-height:48px; width:100%; font:inherit; padding:10px 12px; border:1px solid var(--brand-control-border); border-radius:12px; background:var(--card); color:var(--ink); }
.project-actions { display:flex; gap:10px; flex-wrap:wrap; }
.archived-toggle { display:flex; align-items:center; gap:10px; min-height:48px; font-size:14px; }
.archived-toggle input { width:20px; height:20px; accent-color:var(--ink); }
.hunt-project { display:grid; gap:6px; margin:8px 0; font-size:12px; color:var(--ink-soft); }
.piece-note { border-top:1px solid var(--line); padding-top:24px; display:grid; gap:12px; }
.piece-note h3 { font:600 18px/1.4 var(--sans); }
.piece-note label { font-size:14px; font-weight:600; }
.piece-note textarea { width:100%; min-height:120px; resize:vertical; border:1px solid var(--brand-control-border); background:var(--card); border-radius:12px; padding:12px; font:16px/1.6 var(--sans); }
.piece-note .note-status { font-size:14px; min-height:24px; color:var(--ink-soft); }
@media(max-width:640px) { .project-create { grid-template-columns:1fr; padding:16px; }.project-card { padding:16px; }.project-actions button { flex:1 1 150px; }.save-project { flex:1 1 100%; }.project-tools button { flex:1; } }

.project-caption { font-size:14px; color:var(--ink-soft); overflow-wrap:anywhere; margin:4px 0 12px; }

/* Private-desk invitations and explicit request status, using shared surfaces. */
.request-banner { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:24px; align-items:center; margin:28px 0; padding:24px; border:1px solid var(--line); border-radius:24px; background:var(--paper); }
.request-banner h2 { font:600 22px/1.4 var(--sans); margin:6px 0 8px; }
.request-banner p { margin-bottom:0; }
.hunt-private-request { border-top:1px solid var(--line); margin-top:16px; padding-top:16px; }
/* Web finds: a seller's site that is new to Quarry (FIND-20), and the owner's queue and list of sites. */
.web-new-site { font-size:13px; font-weight:600; color:var(--ink); }
.alerts h4 { font:600 15px/1.3 var(--sans); margin:8px 0 0; }
.site-review p { margin:0; overflow-wrap:anywhere; }
.site-decide { display:grid; gap:8px; }
.site-decide label { margin:0; }
#site-review-status:empty, #site-review-error:empty { display:none; }
/* A quiet hunt says why, and the changes its client made (FIND-19). */
.hunt-quiet { border-top:1px solid var(--line); margin-top:8px; padding-top:16px; display:grid; gap:10px; }
.hunt-quiet p { margin:0; color:var(--ink-soft); }
.hunt-quiet ul { list-style:none; margin:0; padding:0; display:grid; gap:14px; }
.hunt-quiet li { display:grid; gap:6px; justify-items:start; font-size:14px; overflow-wrap:anywhere; }
.hunt-quiet button { min-height:48px; padding:0 16px; font-size:14px; text-align:left; white-space:normal; }
@media(max-width:640px) { .hunt-quiet button { width:100%; } }
.hunt-private-request p { color:var(--ink-soft); margin:0 0 8px; }
.request-status { font-size:14px; color:var(--ink); overflow-wrap:anywhere; }
#ask-lot { overflow-wrap:anywhere; font-weight:600; line-height:1.6; }
@media(max-width:640px) { .request-banner { grid-template-columns:1fr; gap:16px; padding:20px; }.request-banner button,.hunt-private-request button { width:100%; } }

.hunt { min-width:0; }
.hunt .q,.hunt .reply { overflow-wrap:anywhere; }
.hunt .reply { white-space:pre-wrap; }
.terms-changed { white-space:pre-wrap; }

/* Request history shows only dated, staff-recorded milestones. */
.progress-request { font-weight:600; overflow-wrap:anywhere; margin-bottom:12px; }
.progress-timeline { list-style:none; padding:0; margin:24px 0; display:grid; gap:14px; }
.progress-event { padding:18px 20px; border:1px solid var(--line); border-inline-start:3px solid var(--ink); border-radius:16px; background:var(--paper); }
.progress-event p { margin:0 0 10px; font-weight:500; overflow-wrap:anywhere; }
.progress-dates { display:flex; flex-wrap:wrap; gap:8px 18px; color:var(--ink-soft); font-size:13px; }
.progress-record { margin-top:28px; border-top:1px solid var(--line); padding-top:24px; }
.progress-record h3 { font:600 20px/1.4 var(--sans); margin-bottom:8px; }
#progress-form .check { min-height:48px; }
#progress-form select,#progress-form input[type=date] { width:100%; min-width:0; }
#progress-error:empty { display:none; }
@media(max-width:640px) { .progress-event { padding:16px; }.progress-dates { display:grid; gap:6px; }#progress-refresh,#progress-form button { width:100%; } }

/* Internal time ledger and complete, paged operating totals. */
.time-navigation { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin-top:16px; }
.time-navigation span { font-size:13px; color:var(--ink-soft); }
.time-note { white-space:pre-wrap; font-weight:400 !important; }
.time-entry button { margin-top:12px; }
.time-filters { grid-template-columns:repeat(3,minmax(0,1fr)); align-items:end; }
.time-filters button { grid-column:1 / -1; justify-self:start; }
#time-form input,#time-form textarea,.time-filters input,.time-filters select { width:100%; min-width:0; }
.time-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin:24px 0; }
.time-stat { display:grid; gap:6px; padding:18px; background:var(--paper); border:1px solid var(--line); border-radius:16px; }
.time-stat strong { font-size:28px; letter-spacing:-.04em; }
.time-stat span { font-weight:600; font-size:14px; }
.time-stat small { color:var(--ink-soft); font-size:12px; }
.time-table { min-width:650px; table-layout:fixed; }
.time-report-notes { margin:18px 0; border-block:1px solid var(--line); }
.time-report-notes summary { padding:12px 0; font-size:14px; font-weight:600; }
.time-report-notes p { padding-bottom:16px; }
.time-table th:first-child { position:static; width:190px; min-width:190px; max-width:190px; white-space:normal; overflow-wrap:anywhere; }
#time-error:empty,#time-report-error:empty { display:none; }
@media(max-width:640px) { .time-filters,.time-summary { grid-template-columns:1fr; }.time-navigation button,#time-form button,.time-filters button { width:100%; }.time-filters button { justify-self:stretch; } }

/* Named, owner-assigned allowances; counts remain readable above the limit. */
.plan-name { font-size:20px; font-weight:600; overflow-wrap:anywhere; margin:0; }
.plan-usage { display:grid; gap:12px; margin:0; }
.plan-usage>div { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:8px; padding:14px 16px; border:1px solid var(--line); border-radius:12px; background:var(--paper); }
.plan-usage dt { font-size:13px; color:var(--ink-soft); }.plan-usage dd { margin:0; font-size:14px; }.plan-usage strong { font-size:20px; }
.plan-list { display:grid; gap:12px; padding:0; list-style:none; margin-top:24px; }.plan-list strong { overflow-wrap:anywhere; }.plan-list p { margin:8px 0 0; }
.plan-limits { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
#plan-create-form input,.client-plan select,.client-plan input,#plan-after-end select { width:100%; min-width:0; }[data-payments] input,[data-payments] select { width:100%; min-width:0; }[data-payments] .form { margin-top:12px; }#account-payments h4 { margin:0 0 8px; }.client-plan { border-block:1px solid var(--line); padding:16px 0; margin:16px 0; }
[data-plan-error]:empty,[data-plan-message]:empty,#plans-error:empty,#account-plan-error:empty { display:none; }
#refresh-account-plan { scroll-margin-block:120px 16px; }
.partnership-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin:16px 0; }
.partnership-stats>div { padding:16px; border:1px solid var(--line); border-radius:16px; background:var(--card); }
.partnership-stats dt { font-size:12px; color:var(--ink-soft); }.partnership-stats dd { margin:8px 0 0; font:500 28px/1.2 var(--sans); font-variant-numeric:tabular-nums; }
.partnership-toolbar,.partnership-views,.partnership-pages { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }.partnership-toolbar { justify-content:space-between; margin-bottom:16px; }
.partnership-views [aria-pressed=true] { background:var(--ink); color:var(--paper); border-color:var(--ink); }
.partnership-filters,.partnership-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin:20px 0; }
.partnership-filters input,.partnership-filters select,#partnership-form input,#partnership-form select,#partnership-form textarea { width:100%; min-width:0; }
.partnership-list { list-style:none; padding:0; margin:16px 0 24px; display:grid; gap:12px; }
.partnership-card { display:grid; grid-template-columns:36px minmax(0,1fr) auto; gap:18px; align-items:start; border:1px solid var(--line); border-radius:16px; background:var(--card); padding:22px; }
.partnership-number { color:var(--ink-soft); font:500 24px/1.4 var(--serif); }.partnership-card h3 { font:600 17px/1.4 var(--sans); margin:0 0 6px; overflow-wrap:anywhere; }
.partnership-card p { margin:8px 0 0; overflow-wrap:anywhere; }.partnership-stage { display:inline-block; padding:5px 10px; border:1px solid var(--line); border-radius:8px; font-size:12px; font-weight:600; }
.partnership-due { display:block; font-size:12px; color:var(--ink-soft); margin-top:10px; }.partnership-overdue { color:var(--ink); font-weight:700; text-decoration:underline; text-underline-offset:3px; }
.partnership-pages { justify-content:space-between; font-size:13px; }.partnership-order { margin-top:24px; }.partnership-order summary { min-height:48px; padding-block:14px; }
.partnership-editor-heading { display:flex; justify-content:space-between; align-items:baseline; gap:20px; margin-top:24px; }.partnership-editor-heading h3 { font:500 clamp(28px,4vw,40px)/1.2 var(--serif); overflow-wrap:anywhere; margin-bottom:12px; }.partnership-editor-heading a { font-size:13px; min-height:48px; white-space:nowrap; }
.partnership-boundary { background:var(--card); border-inline-start:3px solid var(--ink); padding:16px 20px; margin:20px 0; font-size:14px; }
#partnership-form { max-width:740px; }#partnership-form .form-actions { display:flex; gap:12px; flex-wrap:wrap; }#partnership-form [name=focusRank] { max-width:180px; }
#partnership-source-title,#partnership-count,#partnership-refresh,#partnership-form button { scroll-margin-block:110px 20px; }#partnership-status:not(:empty),#partnership-error:not(:empty) { margin-bottom:18px; }#partnership-status:empty,#partnership-error:empty { display:none; }
@media(max-width:640px) { .partnership-stats { gap:8px; }.partnership-stats>div { padding:12px; }.partnership-stats dt { font-size:12px; }.partnership-stats dd { font-size:26px; }.partnership-filters,.partnership-fields { grid-template-columns:1fr; }.partnership-card { grid-template-columns:24px minmax(0,1fr); gap:12px; padding:16px; }.partnership-card>button { grid-column:2; justify-self:start; }.partnership-toolbar { align-items:stretch; }.partnership-views { flex:1; }.partnership-views button { flex:1; }.partnership-editor-heading { display:block; }.partnership-editor-heading a { display:inline-flex; align-items:center; }#partnership-form button,#partnership-refresh { width:100%; }.partnership-pages { gap:6px; }.partnership-pages button { padding-inline:10px; } }
@media(max-width:640px) { .plan-limits { grid-template-columns:1fr; }#plan-create-form button,.client-plan button,#refresh-account-plan { width:100%; } }

/* Owner operations use the shared brand surfaces and explicit text states. */
.operations-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:24px; }
.operations-card { padding:24px; border:1px solid var(--brand-divider); border-radius:20px; background:var(--brand-surface); min-width:0; }
.operations-card h3 { font:600 20px/1.3 var(--sans); overflow-wrap:anywhere; }
.operations-heading { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; }
.operations-state { font-size:13px; font-weight:600; padding:6px 12px; border-radius:999px; }
.operations-state.allowed { color:var(--brand-success); background:var(--brand-success-surface); }
.operations-state.paused { color:var(--brand-danger); background:var(--brand-danger-surface); }
.operations-card select,.operations-card button { width:100%; min-width:0; }
#controls-error:not(:empty) { color:var(--brand-danger); background:var(--brand-danger-surface); padding:12px 16px; border-radius:12px; }
@media(max-width:650px) { .operations-grid { grid-template-columns:1fr; } .operations-card { padding:20px; } }

/* Safari on an iPhone zooms the whole page in when a field whose text is
   smaller than 16px takes focus, and does not zoom back out (UX-55). Every
   other field is 16px already; the sort list, the project lists and a
   project's name took 12px from their labels. */
@media (max-width: 760px), (pointer: coarse) {
  .sort select, .project-tools select, .save-project select, .hunt-project select, .project-edit input { font-size: 16px; }
}

/* Drop-down lists (UX-58). Safari's engine draws a list its own way and keeps
   it 20 to 25px tall whatever height the rules above ask for; it obeys only a
   list the site draws itself. So every list is drawn here, once: the browser's
   own look is off, and the arrow is two strokes in the colour of the list's
   own text (currentColor), so it follows the text onto a dark surface and adds
   no colour of its own. Heights, borders and text sizes stay where each rule
   above set them; the first line here is what a list has where none of them
   reaches it. The second selector outweighs those rules on purpose: they set
   padding and background in one word, which would take the arrow and its room
   away again. 28px is the room Chrome's own arrow took (12px and 16px), so no
   list changes size there. A list that shows several rows at once has no arrow. */
select { min-height: 48px; border: 1px solid var(--brand-control-border); border-radius: 10px; padding: 0 12px; background-color: var(--card); }
select:not([multiple]):not([size]) {
  -webkit-appearance: none; appearance: none;
  padding-right: 28px;
  background-image:
    linear-gradient(45deg, transparent calc(50% - 1.25px), currentColor calc(50% - .75px), currentColor calc(50% + .75px), transparent calc(50% + 1.25px)),
    linear-gradient(135deg, transparent calc(50% - 1.25px), currentColor calc(50% - .75px), currentColor calc(50% + .75px), transparent calc(50% + 1.25px));
  background-position: right 15px center, right 10px center;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
/* A list that cannot be used is faded, as much as Chrome's own style fades it. Safari's engine shows no difference by itself. */
select:disabled { opacity: .7; }
/* On a dark surface a list takes that surface's colours; its arrow follows its text. */
.brand-inverse select { background-color: var(--brand-inverse); color: var(--brand-inverse-text); border-color: var(--brand-inverse-muted); }
/* With forced colours the browser draws its own list again: a gradient is not shown there, so the arrow would be lost. */
@media (forced-colors: active) {
  select:not([multiple]):not([size]) { -webkit-appearance: auto; appearance: auto; background-image: none; padding-right: 12px; }
}

/* Connect your AI (PLAT-29): the section in the account, and the page where a connection is approved. */
.alerts h4 { margin: 0; font: 600 15px/1.3 var(--sans); }
.copy-row { margin-top: 0; }
.copy-row input { width: 100%; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.copy-row button { justify-self: start; }
.connect { max-width: 720px; padding-block: 40px 64px; display: grid; gap: 16px; align-content: start; }
.connect .connect-title { font: 600 clamp(32px, 6vw, 44px)/1.1 var(--serif); letter-spacing: -.5px; }
.connect-part { display: grid; gap: 14px; margin-top: 8px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.connect-part h2 { font: 600 26px/1.2 var(--serif); overflow-wrap: anywhere; }
.connect-part h3 { font: 600 16px/1.3 var(--sans); margin-top: 6px; }
.connect-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--ink-soft); }
.connect-part .notice { margin-bottom: 0; }
.connect-part input { width: 100%; }
@media (max-width: 520px) { .connect-part { padding: 18px; } .connect .form-actions button { flex: 1 1 100%; } }
