:root {
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none; color: var(--ink); background: var(--ground);
  --forest: #18382d; --green: #275e3f; --signal: #357046; --ink: #26342e;
  --muted: #58645b; --ground: #f5f3ed; --surface: #fffefa; --sidebar: #ebe9e1;
  --line: #d1d5ca; --control-line: #818c7c; --soft: #eff1e9;
  --warning: #81551c; --danger: #8b4935; --radius: 4px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s6: 24px; --s8: 32px; --s12: 48px;
  --motion: 150ms ease;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-size: 14px; line-height: 1.55; }
button, input, textarea, select { font: inherit; }
button, a, input, select, textarea, summary { touch-action: manipulation; }
button, summary { cursor: pointer; }
a { color: var(--forest); text-underline-offset: 4px; }
button { color: inherit; }
button, a, input, select, textarea, summary { transition: background-color var(--motion), border-color var(--motion), color var(--motion); }
:where(button, a, input, select, textarea, summary):focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
:where(input, textarea, select):focus { border-color: var(--forest); }
:where(button, input, select, textarea):disabled { opacity: .6; cursor: not-allowed; }
:where(h1, h2, h3, p) { overflow-wrap: anywhere; }
h1 { font-size: clamp(26px, 2.5vw, 34px); font-weight: 650; line-height: 1.2; letter-spacing: -1px; margin: 8px 0 12px; }
h2 { font-size: 20px; font-weight: 620; line-height: 1.35; letter-spacing: -.4px; }
h3 { font-size: 18px; font-weight: 620; line-height: 1.4; letter-spacing: -.25px; }
p { margin: 0 0 12px; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 10; padding: 12px 16px; background: var(--forest); color: white; }
.skip-link:focus { top: 12px; }
.shell { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--sidebar); border-right: 1px solid var(--line); padding: 32px 20px 16px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; height: 100svh; min-width: 0; }
.brand { display: flex; align-items: center; gap: 8px; margin-bottom: 40px; text-decoration: none; font-size: 28px; line-height: 1; font-weight: 750; letter-spacing: -1.4px; }
.brand-icon { background: var(--forest); color: var(--ground); width: 32px; height: 36px; border-radius: var(--radius); display: grid; place-items: center; font: italic 34px/1 Georgia, serif; }
.version { font-size: 11px; font-weight: 500; letter-spacing: 0; color: var(--muted); margin-left: 4px; }
.navigation { display: grid; gap: 4px; }
.nav { background: none; border: 0; border-left: 2px solid transparent; min-height: 48px; text-align: left; display: flex; align-items: center; gap: 10px; padding: 12px; }
.nav:hover { background: #dedfd5; }
.nav.selected { border-left-color: var(--forest); background: #dce1d4; font-weight: 650; color: var(--forest); }
.nav-marker { flex-shrink: 0; width: 7px; height: 7px; border: 1px solid currentColor; }
.nav.selected .nav-marker { background: currentColor; }
.count { margin-left: auto; font-variant-numeric: tabular-nums; font-size: 12px; }
.eyebrow { color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .2px; margin: 0; }
.watch-heading { display: flex; align-items: center; justify-content: space-between; margin-top: 32px; padding-left: 12px; }
.icon-button { width: 44px; height: 44px; flex-shrink: 0; border: 0; background: none; font-size: 26px; line-height: 1; padding: 0; color: var(--forest); }
.icon-button:hover { background: #dedfd5; }
.watch-list { display: grid; grid-auto-rows: max-content; align-content: start; gap: 4px; flex: 1 1 auto; min-height: 0; overflow-y: auto; margin-top: 8px; padding: 3px; }
.brand, .navigation, .watch-heading, .sidebar-bottom { flex-shrink: 0; }
.watch-item { border: 0; border-left: 2px solid transparent; background: none; padding: 12px 10px; text-align: left; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; min-height: 48px; }
.watch-item.current { border-left-color: var(--signal); background: var(--surface); font-weight: 600; }
.watch-item:hover { background: #dedfd5; }
.watch-item small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 4px; }
.mobile-watch-picker { display: none; }
.sidebar-bottom { margin-top: auto; padding-top: 24px; font-size: 12px; color: var(--muted); }
.environment-line { display: flex; gap: 8px; align-items: center; }
.status-dot { width: 6px; height: 6px; flex-shrink: 0; background: var(--signal); border-radius: 50%; }
.identity-line { padding-top: 8px; }
.plan { display: block; }
.text-button { display: inline-flex; align-items: center; min-height: 44px; border: 0; background: none; padding: 8px 0; text-decoration: underline; text-underline-offset: 4px; color: var(--muted); font-size: 13px; }
.text-button:hover { color: var(--forest); }
.text-button.danger { color: var(--danger); margin-top: 8px; }
main { min-width: 0; width: 100%; max-width: 1440px; padding: 0 40px; }
main:focus { outline: 0; }
.topbar { min-height: 72px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--muted); }
.pilot { color: var(--forest); font-size: 12px; border-left: 1px solid var(--line); padding-left: 16px; }
.intro { margin-top: 24px; border-left: 2px solid var(--signal); padding-left: 16px; max-width: 640px; }
.intro p { margin-bottom: 4px; }
.intro span { color: var(--muted); font-size: 13px; }
.section-heading { display: flex; justify-content: space-between; align-items: start; gap: 24px; margin: 32px 0 24px; }
.watch-context { min-width: 0; flex: 1; }
.watch-context > p:not(.eyebrow) { color: var(--muted); font-size: 14px; line-height: 1.65; margin-bottom: 4px; }
.watch-status { font-weight: 400; border-left: 1px solid var(--control-line); margin-left: 8px; padding-left: 8px; }
.watch-instructions { font-size: 13px; color: var(--muted); margin-top: 8px; }
.watch-instructions summary { min-height: 44px; display: list-item; padding: 10px 0; }
.watch-instructions p { max-width: 760px; }
.actions { display: flex; gap: 8px; flex-shrink: 0; padding-top: 28px; }
.button { min-height: 44px; border: 1px solid var(--forest); background: var(--forest); color: var(--surface); border-radius: var(--radius); padding: 10px 16px; line-height: 1.4; font-size: 13px; font-weight: 600; }
.button:hover { background: #28523e; border-color: #28523e; }
.button:active { background: #10281f; }
.button.secondary { background: transparent; border-color: var(--control-line); color: var(--forest); }
.button.secondary:hover { background: #e6e9dd; border-color: var(--forest); }
.button[aria-busy="true"] { cursor: progress; }
.stats { display: grid; grid-template-columns: 124px 190px minmax(180px, 1fr); padding: 20px 0 16px; border-top: 1px solid var(--forest); border-bottom: 1px solid var(--line); margin-bottom: 28px; gap: 12px 0; }
.stats > div { padding: 0 24px; border-left: 1px solid var(--line); min-width: 0; }
.stats > div:first-child { padding-left: 0; border: 0; }
.stats span { display: block; color: var(--muted); font-size: 13px; }
.stats strong { display: block; font-size: 28px; font-weight: 600; letter-spacing: -.5px; font-variant-numeric: tabular-nums; line-height: 1.4; overflow-wrap: anywhere; }
.stats .best-summary { padding-right: 0; }
.decision-note { grid-column: 1/-1; margin: 0; font-size: 13px; color: var(--muted); }
.result-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.result-toolbar h2 { font-size: 14px; font-weight: 600; letter-spacing: 0; margin: 0; }
.result-toolbar > div { display: flex; align-items: center; gap: 12px; }
.checkbox { display: flex; align-items: center; min-height: 44px; gap: 8px; color: var(--muted); font-size: 12px; max-width: 280px; line-height: 1.4; }
.checkbox input { width: 18px; height: 18px; flex-shrink: 0; margin: 0; accent-color: var(--forest); }
.result-toolbar select { width: auto; min-width: 154px; font-size: 13px; padding: 8px 12px; }
.opportunities { border-top: 1px solid var(--line); }
.opportunity { display: grid; grid-template-columns: minmax(0, 1fr) minmax(155px, auto) 120px; gap: 12px 24px; position: relative; padding: 24px 0 12px 16px; border-bottom: 1px solid var(--line); }
.opportunity::before { content: ""; position: absolute; left: 0; top: 28px; height: 7px; width: 7px; border: 1px solid var(--muted); }
.opportunity.best-candidate { background: var(--surface); padding-right: 16px; border-left: 2px solid var(--signal); }
.opportunity.best-candidate::before { background: var(--signal); border-color: var(--signal); left: -5px; }
.record-main { min-width: 0; }
.card-header { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: 12px; }
.tag, .best-marker { color: var(--green); font-weight: 550; font-size: 12px; }
.tag.pending { color: var(--warning); }
.tag.failed { color: var(--danger); }
.best-marker { color: var(--forest); font-weight: 650; border-bottom: 1px solid var(--signal); }
.opportunity h2 { margin: 8px 0; font-size: 18px; line-height: 1.4; letter-spacing: -.25px; }
.card-meta { color: var(--muted); font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.record-price { min-width: 0; align-self: start; padding-top: 24px; text-align: right; }
.record-price strong, .card-price { display: block; font-size: 26px; font-weight: 600; letter-spacing: -.6px; line-height: 1.3; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.record-price .card-meta { margin-top: 4px; }
.record-price .price-comparison, .price-comparison { color: var(--green); font-size: 12px; margin-top: 8px; }
.score { align-self: start; min-width: 0; padding-top: 24px; color: var(--forest); font-variant-numeric: tabular-nums; }
.score > span, .score-label { font-size: 12px; font-weight: 500; display: block; }
.score strong { font-size: 23px; font-weight: 600; line-height: 1.5; }
.score small { font-size: 12px; font-weight: 400; color: var(--muted); }
.score.muted { color: var(--muted); }
.score .score-value { display: flex; gap: 4px; align-items: baseline; }
.score .score-note, .score > p { font-size: 12px; line-height: 1.5; margin: 8px 0 0; color: var(--muted); }
progress { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 4px; border: 0; background: #dfe3d8; color: var(--signal); margin-top: 4px; }
progress::-webkit-progress-bar { background: #dfe3d8; }
progress::-webkit-progress-value { background: var(--signal); }
progress::-moz-progress-bar { background: var(--signal); }
.score.muted progress::-webkit-progress-value { background: var(--muted); }
.card-actions { display: flex; gap: 16px; align-items: center; font-size: 13px; margin-top: 8px; flex-wrap: wrap; }
.card-actions a, .card-actions button { display: inline-flex; align-items: center; min-height: 44px; }
.card-actions button { border: 0; padding: 8px 0; background: transparent; color: var(--forest); text-decoration: underline; text-underline-offset: 4px; }
.card-actions a:hover, .card-actions button:hover { color: var(--green); text-decoration-thickness: 2px; }
.explanation { grid-column: 1/-1; color: var(--muted); font-size: 13px; line-height: 1.7; }
.explanation summary { min-height: 44px; padding: 10px 0; border-top: 1px solid var(--line); color: var(--forest); }
.explanation > div, .explanation > p { padding-bottom: 8px; }
.conditions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 24px; margin: 8px 0 16px; }
.condition-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.breakdown { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 12px 0; font-variant-numeric: tabular-nums; }
.empty { border-left: 2px solid var(--control-line); padding: 24px; margin: 24px 0; max-width: 680px; }
.empty h2, .empty h3 { margin: 0 0 8px; font-size: 22px; }
.empty p { color: var(--muted); margin-bottom: 16px; }
.empty .button { margin-right: 8px; }
.no-match-note { color: var(--warning); padding: 12px 16px; background: #f1eadc; border-left: 2px solid var(--warning); margin: 16px 0; }
.footnote, .field-help { color: var(--muted); font-size: 13px; line-height: 1.65; }
.footnote { margin: 20px 0 12px; }
.field-help { margin: 8px 0 16px; }
footer { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); margin-top: 32px; padding: 20px 0; font-size: 12px; color: var(--muted); }
.message, .dialog-message { border-left: 3px solid var(--danger); padding: 12px 16px; color: #743d2b; background: #f7e9df; margin: 16px 0; font-size: 14px; overflow-wrap: anywhere; }
.message.success { border-left-color: var(--signal); background: #e7eddf; color: var(--forest); }
.dialog-message p { margin: 0; }
.dialog-message small { display: block; font-size: 12px; padding-top: 4px; }
dialog { border: 1px solid var(--control-line); background: var(--surface); color: var(--ink); border-radius: 6px; width: calc(100% - 32px); max-width: 640px; max-height: 90vh; max-height: 90svh; padding: 24px; box-shadow: 0 16px 64px #142d2833; }
dialog::backdrop { background: #172a2366; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; position: sticky; top: -24px; background: var(--surface); z-index: 2; padding-top: 4px; }
.dialog-heading h2 { margin: 0; font-size: 23px; }
form > label, .form-row label { display: grid; gap: 8px; font-size: 14px; font-weight: 600; margin: 16px 0; color: var(--ink); }
input, textarea, select { border: 1px solid var(--control-line); border-radius: var(--radius); background: var(--surface); color: var(--ink); padding: 10px 12px; width: 100%; min-width: 0; min-height: 44px; font-size: 14px; }
input::placeholder, textarea::placeholder { color: #667261; opacity: 1; font-weight: 400; }
textarea { resize: vertical; line-height: 1.6; }
.code { font: 13px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre; }
.form-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.form-row label { margin-bottom: 0; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 24px; }
#watch-dialog, #ingest-dialog { max-width: 720px; }
#watch-dialog input, #watch-dialog select, #ingest-dialog input, #ingest-dialog select { scroll-margin-block: 80px; }
#watch-category-help { margin: 8px 0 0; }
.watch-form-intro { color: var(--muted); margin: 0 0 20px; }
.criteria-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.criteria-grid label, .watch-search-note > label { display: grid; gap: 8px; margin: 0; font-size: 13px; font-weight: 600; }
.watch-identity { grid-template-columns: minmax(0, 1fr); margin-bottom: 16px; }
.watch-type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mode-help { border-left: 2px solid var(--signal); padding-left: 12px; margin: 12px 0 16px; }
.inline-button { color: var(--forest); background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; padding: 0 4px; }
.watch-period { display: grid; grid-template-columns: minmax(0, 1fr) 140px; align-items: center; gap: 12px; margin: 16px 0 0; font-weight: 600; }
.manual-location-fields { padding-top: 4px; }
#manual-attribute-fields label, #manual-form > .criteria-grid label, .manual-location-fields label { display: grid; gap: 8px; margin: 0; font-size: 13px; font-weight: 600; }
#manual-form > .criteria-grid { margin: 16px 0; }
.history-price-context { color: var(--muted); }
.criteria-section { border: 0; margin: 24px 0 16px; padding: 0; min-width: 0; }
.criteria-section legend { width: 100%; border-top: 1px solid var(--line); padding: 16px 0; font-size: 16px; font-weight: 650; }
.criteria-price { display: grid; grid-template-columns: minmax(0, 1fr) 108px; gap: 8px; }
.input-unit { position: relative; display: block; }
.input-unit input { padding-right: 42px; }
.input-unit > span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 400; pointer-events: none; }
#watch-dialog input, #watch-dialog select, #watch-dialog textarea { font-weight: 400; }
.watch-preferences { border: 1px solid var(--line); border-radius: 6px; margin-top: 12px; padding: 0 16px; }
.watch-preferences > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; list-style: none; min-height: 64px; padding: 12px 0; color: var(--forest); font-weight: 600; }
.watch-preferences > summary::-webkit-details-marker { display: none; }
.watch-preferences > summary small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); line-height: 1.5; margin-top: 2px; }
.watch-preferences .disclosure-icon { font-size: 23px; font-weight: 400; flex-shrink: 0; }
.watch-preferences .disclosure-icon::before { content: '+'; }
.watch-preferences[open] > summary .disclosure-icon::before { content: '−'; }
.watch-preferences-content { padding: 4px 0 16px; }
.watch-preferences-content > .criteria-grid + .criteria-grid { margin-top: 16px; }
.watch-cash-only { margin: 0; max-width: none; font-size: 13px; }
.watch-cash-only input { min-height: 18px; padding: 0; }
.watch-search-note > label { margin: 4px 0 0; }
.watch-form-actions { position: sticky; bottom: -24px; z-index: 1; background: var(--surface); padding: 16px 0 24px; margin-bottom: -24px; }
#ingest-dialog .form-actions { position: sticky; bottom: -24px; z-index: 1; background: var(--surface); padding: 16px 0 24px; margin-bottom: -24px; }
.watch-form-actions .button:first-child { min-width: 160px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tabs .button { border-radius: 0; border: 0; border-bottom: 2px solid transparent; }
.tabs .button[aria-pressed="true"] { border-bottom-color: var(--forest); background: var(--soft); }
#changes-view, #account-view { padding-top: 32px; }
.page-description { color: var(--muted); max-width: 680px; margin-bottom: 28px; }
.change-row { position: relative; display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 24px; padding: 24px 0 24px 20px; border-left: 1px solid var(--control-line); border-bottom: 1px solid var(--line); }
.change-row::before { content: ""; position: absolute; width: 7px; height: 7px; left: -4px; top: 32px; background: var(--surface); border: 1px solid var(--signal); }
.change-date { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.change-date time { display: block; font-size: 14px; font-weight: 550; color: var(--ink); }
.change-body { min-width: 0; }
.change-body h2 { margin: 8px 0; font-size: 18px; line-height: 1.4; letter-spacing: -.25px; }
.change-row p { color: var(--muted); font-size: 13px; margin: 8px 0; }
.change-kind { color: var(--forest); font-size: 13px; font-weight: 650; }
.change-delta { font-variant-numeric: tabular-nums; font-size: 20px; line-height: 1.5; overflow-wrap: anywhere; }
.change-delta strong, .delta { color: var(--green); font-weight: 600; }
.change-action { align-self: center; display: grid; gap: 8px; }
.change-action .button { white-space: nowrap; }
.account-plan { display: flex; align-items: baseline; gap: 16px; border-bottom: 1px solid var(--forest); padding-bottom: 16px; margin-bottom: 8px; }
.account-plan h2, .account-plan h3 { margin: 0; font-size: 26px; }
.account-plan p { color: var(--muted); margin: 0; font-size: 13px; }
.capacity-list { max-width: 880px; }
.capacity-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px 180px; gap: 24px; align-items: center; border-bottom: 1px solid var(--line); padding: 16px 0; }
.capacity-row strong { font-weight: 550; }
.capacity-row span { font-variant-numeric: tabular-nums; }
.capacity-row progress { margin: 0; }
.watch-capacity { margin-top: 32px; }
.watch-capacity h3 { margin-bottom: 8px; }
.account-resets { border-left: 2px solid var(--signal); padding-left: 16px; margin-top: 28px; font-size: 13px; color: var(--muted); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 16px 0; font-variant-numeric: tabular-nums; }
td, th { text-align: left; vertical-align: top; padding: 12px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }
table caption { text-align: left; color: var(--muted); margin-bottom: 8px; }
.history-summary h3 { margin-top: 0; }
.history-stats { display: flex; gap: 24px; flex-wrap: wrap; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; margin-bottom: 16px; }
.history-stats strong { display: block; font-size: 20px; font-weight: 550; }
.history-stats span { font-size: 12px; color: var(--muted); }
.history-chart { display: block; width: 100%; height: auto; background: var(--soft); }
.history-chart path { fill: none; stroke: var(--signal); stroke-width: 2; }
.history-chart text { fill: var(--muted); font-size: 12px; }
.history-chart line { stroke: var(--line); stroke-width: 1; }
.history-chart circle { fill: var(--signal); }
#more-results, #more-history, #more-changes { margin-top: 20px; }

@media (min-width: 1500px) { main { padding: 0 64px; } }
@media (max-width: 1180px) {
  .shell { grid-template-columns: 208px minmax(0, 1fr); }
  .sidebar { padding-left: 16px; padding-right: 16px; }
  main { padding: 0 28px; }
  .section-heading { gap: 16px; }
  .actions { flex-direction: column; }
  .opportunity { grid-template-columns: minmax(0, 1fr) 155px 104px; gap: 12px 16px; }
  .record-price strong { font-size: 23px; }
  .result-toolbar { align-items: start; }
  .result-toolbar > div { align-items: end; flex-direction: column; gap: 4px; }
  .checkbox { max-width: 260px; }
  .change-row { grid-template-columns: 88px minmax(0, 1fr); gap: 16px; }
  .change-action { grid-column: 2; display: flex; flex-wrap: wrap; }
}
@media (max-width: 900px) {
  .shell { display: block; }
  .sidebar { height: auto; position: static; display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 8px 12px; padding: 16px 24px 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { grid-column: 1/-1; margin-bottom: 4px; font-size: 26px; }
  .navigation { grid-column: 1/-1; display: flex; gap: 4px; }
  .nav { flex: 1; justify-content: center; min-height: 44px; padding: 8px; border-left: 0; border-bottom: 2px solid transparent; gap: 8px; }
  .nav.selected { border-bottom-color: var(--forest); border-left: 0; }
  .nav .count { margin-left: 0; }
  .watch-list { display: none; }
  .watch-heading { margin: 0; padding: 0; grid-column: 2; grid-row: 3; align-self: end; }
  .watch-heading p { display: none; }
  .mobile-watch-picker { display: grid; grid-column: 1; grid-row: 3; gap: 4px; font-size: 12px; color: var(--muted); }
  .mobile-watch-picker select { max-width: 100%; font-size: 14px; }
  .sidebar-bottom { grid-column: 1/-1; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0; padding: 0; font-size: 12px; }
  .identity-line { padding: 0; display: flex; align-items: center; gap: 12px; }
  .plan { display: inline; }
  .identity-line .text-button { font-size: 12px; }
  .topbar { min-height: 56px; }
  main { padding: 0 24px; }
  .section-heading { margin-top: 24px; }
}
@media (max-width: 620px) {
  .sidebar { padding: 16px 16px 8px; }
  .brand-icon { height: 32px; width: 28px; font-size: 30px; }
  .nav { font-size: 13px; gap: 6px; padding-left: 6px; padding-right: 6px; }
  .nav-marker { width: 6px; height: 6px; }
  .sidebar-bottom { flex-wrap: wrap; }
  .environment-line { font-size: 11px; }
  .identity-line { gap: 8px; }
  .identity-line .text-button { font-size: 11px; }
  .plan { font-size: 11px; }
  main { padding: 0 16px; }
  .topbar { gap: 8px; font-size: 12px; }
  .pilot { font-size: 11px; padding-left: 8px; }
  h1 { font-size: 27px; letter-spacing: -.7px; }
  .section-heading { display: block; }
  .actions { flex-direction: row; padding-top: 16px; flex-wrap: wrap; }
  .stats { grid-template-columns: 90px minmax(0, 1fr); row-gap: 12px; padding-top: 16px; margin-bottom: 20px; }
  .stats > div { padding: 0 16px; }
  .stats strong { font-size: 26px; }
  .stats .best-summary { grid-column: 1/-1; padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--line); display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
  .stats .best-summary strong { font-size: 25px; }
  .stats span { font-size: 12px; }
  .result-toolbar { display: grid; gap: 8px; }
  .result-toolbar > div { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
  .checkbox { max-width: 180px; font-size: 12px; }
  .result-toolbar select { min-width: 0; width: 145px; padding: 8px; font-size: 12px; }
  .opportunity { grid-template-columns: minmax(0, 1fr) 104px; gap: 8px 16px; padding-top: 20px; padding-left: 12px; }
  .opportunity::before { top: 25px; }
  .record-main { grid-column: 1/-1; }
  .record-price { grid-column: 1; grid-row: 2; padding-top: 4px; text-align: left; }
  .record-price strong { font-size: 26px; }
  .score { grid-column: 2; grid-row: 2; padding-top: 4px; }
  .opportunity h2 { font-size: 18px; }
  .opportunity.best-candidate { padding-right: 12px; }
  .card-header { gap: 4px 10px; }
  .card-actions { margin-top: 4px; }
  .conditions { grid-template-columns: minmax(0, 1fr); }
  .empty { padding: 16px; }
  .empty h2, .empty h3 { font-size: 21px; }
  .change-row { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 20px 0 20px 16px; }
  .change-date { display: flex; align-items: baseline; gap: 8px; }
  .change-date time { display: inline; }
  .change-action { grid-column: 1; }
  .change-delta { font-size: 18px; }
  .capacity-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; padding: 16px 0; }
  .capacity-row progress { grid-column: 1/-1; }
  .account-plan { display: block; }
  .account-plan p { margin-top: 8px; }
  .history-stats { gap: 16px; }
  footer { font-size: 12px; align-items: start; }
  footer > span:last-child { max-width: 230px; text-align: right; }
  dialog { padding: 20px; width: calc(100% - 24px); }
  .dialog-heading { top: -20px; }
  .dialog-heading h2 { font-size: 22px; }
  input, textarea, select { font-size: 16px; }
  .code { font-size: 16px; }
  .form-row { grid-template-columns: minmax(0, 1fr) 112px; gap: 12px; }
  .form-row:nth-of-type(2) { grid-template-columns: minmax(0, 1fr); }
  .tabs .button { padding: 10px 12px; }
  .form-actions { gap: 8px; }
  .criteria-grid, .watch-identity { grid-template-columns: minmax(0, 1fr); }
  .watch-type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .criteria-price { grid-template-columns: minmax(0, 1fr) 108px; }
  .watch-preferences { padding: 0 12px; }
  .watch-form-actions { bottom: -20px; padding-bottom: 20px; margin-bottom: -20px; }
  #ingest-dialog .form-actions { bottom: -20px; padding-bottom: 20px; margin-bottom: -20px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }


/* Refinement after the rendered comparison and timeline review. */
.record-label, .price-basis { display: block; color: var(--muted); font-size: 12px; line-height: 1.6; }
.record-status { font-weight: 550; color: var(--green); }
.record-status.ineligible { color: var(--danger); }
.record-status.pending_verification, .record-stale { color: var(--warning); }
.record-availability { color: var(--muted); }
.observation-meta, .evidence-note { color: var(--muted); font-size: 12px; line-height: 1.65; }
.observation-meta { margin: 8px 0 0; }
.score .score-note { display: block; }
.score-value > span { font-size: 12px; color: var(--muted); }
.condition-row dt, .condition-row dd, .breakdown dt, .breakdown dd { margin: 0; }
.condition-row dd { flex-shrink: 0; font-weight: 550; }
.condition-row.fail dd { color: var(--danger); }
.condition-row.pass dd { color: var(--green); }
.condition-row.unknown dd { color: var(--warning); }
.breakdown dd { font-weight: 550; color: var(--ink); }
.result-note { color: var(--warning); padding: 12px 16px; background: #f1eadc; border-left: 2px solid var(--warning); margin: 16px 0; }
.change-body .change-kind { color: var(--forest); font-weight: 650; }
.change-row.actionable::before { background: var(--signal); }
.change-date > span { display: block; margin-bottom: 4px; }
.history-stats small { display: block; color: var(--muted); font-size: 12px; }
.history-anchor, .history-table td small { display: block; color: var(--muted); font-size: 12px; }
.history-chart .anchor { fill: var(--surface); stroke: var(--signal); }
.account-section h2 { font-size: 18px; margin: 28px 0 8px; }
.capacity-row > small { grid-column: 1/-1; color: var(--warning); }
.loading { color: var(--muted); padding: 24px 0; }
.evidence-list { padding-left: 20px; }
.evidence-list li { padding: 4px 0; overflow-wrap: anywhere; }
.evidence-list a { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 620px) { .change-date > span { display: inline; margin: 0; } }
.condition-row dt { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 620px) { .history-chart text { font-size: 18px; } }
