/* Screens added to the approved scanner. Keep the accent for actions and state. */
.app { overflow: clip; }
.bottom-nav {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  position: sticky;
  bottom: 0;
  z-index: 4;
  margin-top: 0;
  min-height: 66px;
  padding-inline: 6px;
}
.bottom-nav button { min-width: 0; min-height: 44px; white-space: nowrap; }
.header-quota {
  background: transparent;
  color: var(--muted);
  min-height: 32px;
  border-radius: 5px;
  padding: 2px 0 2px 8px;
}
.header-quota:hover { color: var(--accent); }
.review-index {
  display: block;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  font-weight: 650;
  margin-top: 24px;
  padding: 10px 0;
}
.mobile-demo { border: 0; background: var(--bg); }
.mobile-demo button { color: var(--muted); }
.ticker-categories {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0 5px;
  padding-inline: 8px;
  overflow: visible;
}
.ticker-categories button {
  min-width: 0;
  padding: 3px 0;
  min-height: 38px;
  font-size: 11px;
  line-height: 1.2;
}
.style-options .choice-face { text-align: center; }
.style-options .choice-face strong { white-space: normal; line-height: 1.25; }

.prototype-screen {
  padding-block: 20px 26px;
  line-height: 1.58;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.prototype-screen h2, .prototype-screen h3, .prototype-screen p { margin: 0; }
.prototype-screen h2 { font-size: 25px; font-weight: 740; line-height: 1.22; letter-spacing: -.035em; }
.prototype-screen h3 { font-size: 15px; line-height: 1.4; font-weight: 720; }
.prototype-screen h2:focus, #upload-heading:focus { outline: none; }
.prototype-screen p { color: var(--muted); }
.prototype-screen .back-link {
  width: fit-content;
  min-height: 42px;
  margin: -8px 0 10px -5px;
  padding-inline: 5px 10px;
  font-size: 12px;
}
.prototype-screen .screen-heading { margin-bottom: 23px; }
.screen-heading p { margin-top: 10px; max-width: 34ch; }
.prototype-screen .primary, .prototype-dialog .primary {
  min-height: 46px;
  height: auto;
  padding: 11px 16px;
  text-align: center;
  justify-content: center;
  line-height: 1.4;
}
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 660;
  text-align: center;
}
.secondary:hover { background: var(--surface); }
.quiet-action {
  min-height: 44px;
  width: fit-content;
  background: transparent;
  color: var(--accent);
  padding: 5px 2px;
  font-size: 13px;
  font-weight: 650;
}
.screen-actions { display: grid; gap: 9px; margin-top: 18px; }
.screen-section { margin-top: 23px; }
.screen-section > h3 { margin-bottom: 8px; }
.prototype-screen .screen-copy { margin-bottom: 14px; }
.prototype-screen .screen-notice {
  padding: 9px 12px;
  border-left: 1px solid #5c5336;
  background: #212024;
  margin-top: 16px;
  font-size: 12px;
}
.data-rows { margin: 6px 0 0; font-size: 13px; font-variant-numeric: tabular-nums; }
.data-rows > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
  align-items: baseline;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.data-rows dt { color: var(--muted); }
.data-rows dd { margin: 0; text-align: right; font-weight: 680; }
.negative-text { color: #ea9686; }
.screen-details { border-bottom: 1px solid var(--line); }
.screen-details summary {
  min-height: 48px;
  padding: 10px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  list-style: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
}
.screen-details summary::-webkit-details-marker { display: none; }
.screen-details .icon { width: 14px; flex: 0 0 14px; color: var(--muted); }
.screen-details[open] > summary > .icon { transform: rotate(180deg); }
.screen-details > div { padding-bottom: 12px; }
.screen-details p { margin: 8px 0 3px; font-size: 13px; }

.welcome-mark { margin: 26px 0; }
.welcome-mark img { display: block; width: 158px; }
.prototype-screen[data-screen="welcome"] { min-height: min(580px, 100svh); }
.prototype-screen[data-screen="welcome"] h2 { font-size: 31px; max-width: 12ch; }
.welcome-form { display: grid; gap: 18px; margin-top: auto; padding-top: 22px; }
.consent {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
  cursor: pointer;
}
.consent input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.prototype-screen[data-screen="progress"] {
  padding-top: clamp(28px, 6vh, 56px);
}
.prototype-screen[data-screen="progress"] .screen-heading h2 {
  font-size: clamp(26px, 7vw, 34px);
}
.analysis-progress {
  margin-bottom: 24px;
  padding: 16px 14px 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.progress-track {
  display: flex;
  gap: 5px;
  margin-bottom: 10px;
}
.progress-track > span {
  position: relative;
  flex: 1;
  height: 3px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--line);
  transition: background-color .25s ease;
}
.progress-track i {
  position: absolute;
  inset: 0;
  transform: scaleX(0);
  transform-origin: left;
  border-radius: inherit;
  background: var(--accent);
  transition: transform .38s cubic-bezier(.16, 1, .3, 1);
}
.progress-track [data-step="done"] i { transform: scaleX(1); }
.progress-track [data-step="current"] { background: color-mix(in srgb, var(--accent) 26%, var(--line)); }
.progress-track [data-step="current"][data-measured] i { transform: scaleX(var(--segment-fill, 0)); }
@media (prefers-reduced-motion: no-preference) {
  .progress-track [data-step="current"]:not([data-measured]) i {
    animation: progress-sweep 1.7s cubic-bezier(.4, 0, .5, 1) infinite;
  }
}
@keyframes progress-sweep {
  from { transform: translateX(-48%) scaleX(.42); }
  to { transform: translateX(100%) scaleX(.42); }
}
.analysis-progress ol { list-style: none; padding: 0; margin: 0; }
.analysis-progress li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 51px;
  padding-block: 8px;
  color: var(--muted);
  transition: color .24s ease;
}
.analysis-progress li + li { border-top: 1px solid var(--line); }
.progress-step-name { font-size: 13px; font-weight: 650; line-height: 1.4; }
.progress-step-state { font-size: 11px; }
.progress-marker {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
}
.progress-marker > * {
  grid-area: 1 / 1;
  transition: opacity .24s ease, transform .3s cubic-bezier(.16, 1, .3, 1);
}
.progress-marker > span {
  width: 8px;
  height: 8px;
  border: 1px solid currentColor;
  border-radius: 50%;
}
.progress-marker .icon {
  width: 18px;
  height: 18px;
  opacity: 0;
  transform: scale(.75);
}
.analysis-progress [data-step="current"] .progress-step-name { color: var(--text); }
.analysis-progress [data-step="current"] :is(.progress-step-state, .progress-marker) { color: var(--accent); }
.analysis-progress [data-step="current"] .progress-marker > span { background: currentColor; }
.analysis-progress [data-step="done"] :is(.progress-step-state, .progress-marker) { color: #81d4ad; }
.analysis-progress [data-step="done"] .progress-marker > span { opacity: 0; }
.analysis-progress [data-step="done"] .progress-marker .icon { opacity: 1; transform: scale(1); }
.progress-cancel { width: 100%; }

.report-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; }
.prototype-screen .report-top .back-link { margin-bottom: 7px; }
.prototype-screen .report-snapshot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 1px 7px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}
.report-snapshot strong { font-weight: 650; color: var(--text); }
.report-snapshot time { font-variant-numeric: tabular-nums; }
.report-overview { min-width: 0; }
.report-decision {
  margin-top: 16px;
  padding: 14px 15px 13px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  border-radius: 9px;
  background: color-mix(in srgb, var(--accent) 6%, var(--bg));
}
.prototype-screen .result-finding {
  margin: 0 0 8px;
  font-size: clamp(20px, 5.1vw, 24px);
  line-height: 1.2;
  letter-spacing: -.03em;
  text-wrap: balance;
}
.prototype-screen .report-next-step { color: #e0d7bc; font-size: 13px; }
.prototype-screen .report-watch-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 8px;
  margin: 2px 0 5px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.report-watch-price strong {
  font-size: clamp(27px, 8vw, 38px);
  line-height: 1.16;
  font-weight: 750;
  letter-spacing: -.035em;
}
.report-watch-price span { font-size: 12px; font-weight: 700; }
.report-watch-price span:empty { display: none; }
.prototype-screen .report-watch-note { color: #d1c7ab; font-size: 12px; line-height: 1.45; text-wrap: pretty; }
.prototype-screen .report-watch-reason { margin-bottom: 9px; }

.report-plan {
  margin-top: 15px;
  border-bottom: 1px solid var(--line);
}
.report-plan > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 3px 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.prototype-screen .report-plan h3 { font-size: 14px; }
.report-plan > header > span { font-size: 12px; font-weight: 650; color: var(--muted); }
.report-prices {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
  gap: 9px;
  margin: 0;
}
.report-prices > div { padding: 10px 0 9px; min-width: 0; }
.report-prices > div + div { border-left: 1px solid var(--line); padding-left: 10px; }
.report-prices dt, .report-targets > span { font-size: 12px; color: var(--muted); }
.report-prices dd {
  margin: 2px 0 0;
  font-size: 17px;
  font-weight: 750;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.report-stop { color: #ff8897; }
.prototype-screen .report-entry-rule {
  margin: 0 0 9px;
  font-size: 12px;
  line-height: 1.45;
  text-wrap: pretty;
}
.report-targets {
  display: grid;
  gap: 4px;
  padding: 7px 0 10px;
  border-top: 1px solid var(--line);
}
.report-targets ol {
  display: flex;
  gap: 3px 14px;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
  list-style: none;
}
.report-targets li {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}
.report-targets li span { color: var(--muted); font-size: 10px; font-weight: 700; }
.report-targets li strong { font-size: 13px; }
.prototype-screen .report-targets p { font-size: 12px; }
.prototype-screen .report-invalidation { margin-top: 8px; font-size: 12px; text-wrap: pretty; }

.prototype-screen .result-figure { margin-top: 13px; }
.prototype-screen .result-chart-toolbar h3 { color: var(--text); }
.prototype-screen #report-chart { margin: 0; }
.prototype-screen .report-chart { overflow: hidden; border-radius: 7px; background: #1b1e24; }
.prototype-screen .report-chart svg { display: block; width: 100%; height: auto; }
.prototype-screen .level-explanation { min-height: 0; margin: 10px 0 0; }
.report-full-analysis { margin-top: 18px; }
.report-full-analysis .screen-details { border-block: 1px solid var(--line); }
.report-full-analysis summary { font-size: 14px; }
.report-full-analysis summary:hover { color: var(--accent); }
.report-full-analysis .screen-details > div {
  display: grid;
  gap: 14px;
  padding: 1px 0 16px;
  max-width: 65ch;
}
.report-full-analysis h4 { margin: 0; font-size: 13px; font-weight: 700; }
.prototype-screen .report-full-analysis p { margin: 3px 0 0; font-size: 13px; line-height: 1.55; text-wrap: pretty; }
.report-evidence { margin-top: 25px; scroll-margin-block: 12px; }
.report-evidence > h3 { margin-bottom: 5px; }
.report-sections {
  display: flex;
  gap: clamp(5px, 1.4vw, 12px);
  overflow-x: auto;
  border-block: 1px solid var(--line);
  scrollbar-width: thin;
}
.report-sections button {
  flex: 1 0 auto;
  min-height: 44px;
  padding: 0;
  white-space: nowrap;
  background: none;
  color: var(--muted);
  box-shadow: inset 0 -2px transparent;
  font-size: clamp(11px, 3.1vw, 12px);
  font-weight: 650;
}
.report-sections button:hover { color: var(--text); }
.report-sections button[aria-expanded="true"] {
  box-shadow: inset 0 -2px var(--accent);
  color: var(--accent);
}
.report-sections button:focus-visible { outline-offset: -3px; }
.report-detail { padding-bottom: 4px; }
.prototype-screen .tab-heading { margin: 19px 0 8px; font-size: 17px; }
.book-totals { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; font-size: 12px; font-variant-numeric: tabular-nums; }
.book-totals strong { font-size: 20px; }
.book-balance { display: flex; gap: 3px; height: 5px; margin: 8px 0 18px; }
.book-balance span:first-child { background: var(--candle-up); }
.book-balance span:last-child { background: var(--candle-down); }

.history-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.screen-field { display: grid; gap: 6px; min-width: 0; font-size: 12px; color: var(--muted); }
.screen-field input, .screen-field select, .screen-field textarea {
  min-width: 0;
  width: 100%;
  min-height: 44px;
  padding: 9px 10px;
  border-radius: 7px;
  border: 1px solid #363b45;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}
.screen-field textarea { resize: vertical; }
.screen-field [aria-invalid="true"] { border-color: #e18d80; }
.history-list, .preview-group ul { list-style: none; padding: 0; margin: 0; }
.history-record, .setting-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  border-bottom: 1px solid var(--line);
  padding: 11px 0;
  color: var(--text);
  background: transparent;
  text-align: left;
}
.history-record > span, .setting-row > span:first-child { flex: 1; min-width: 0; }
.history-record .icon, .setting-row > .icon, .preview-group a .icon { width: 15px; flex: 0 0 15px; color: var(--muted); }
.history-record:hover, .setting-row:hover, .preview-group a:hover { color: var(--accent); }
.history-meta, .history-summary, .setting-row small { display: block; font-size: 12px; color: var(--muted); }
.history-meta { margin-block: 3px 5px; font-variant-numeric: tabular-nums; }
.screen-empty, .locked-feature { display: grid; justify-items: start; gap: 9px; padding-block: 21px; }
.screen-empty > .icon, .lock-symbol .icon { color: var(--accent); width: 23px; height: 23px; }
.screen-empty .secondary { margin-top: 6px; }
.locked-feature { border-top: 1px solid var(--line); }
.locked-feature .primary { margin-top: 12px; }
.account-identity { display: flex; align-items: center; gap: 11px; margin-bottom: 22px; }
.account-identity img { border: 1px solid var(--line); border-radius: 50%; }
.account-identity > div > span, .account-stat { font-size: 12px; color: var(--muted); }
.account-stat { margin-left: auto; text-align: right; }
.account-stat strong { display: block; font-size: 19px; color: var(--text); font-variant-numeric: tabular-nums; }
.row-value { display: flex; gap: 4px; align-items: center; color: var(--muted); font-size: 12px; }
.row-value .icon { width: 14px; color: var(--accent); }
.settings-list { border-top: 1px solid var(--line); }
.settings-list + .quiet-action { margin-top: 12px; }
.zone-list .setting-row { font-size: 12px; }

.payment-picker { border: 0; min-width: 0; padding: 0; margin: 0 0 16px; }
.payment-picker legend { color: var(--muted); font-size: 12px; padding: 0; margin-bottom: 7px; }
.term-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.term-options label { position: relative; min-width: 0; }
.term-options input { position: absolute; opacity: 0; pointer-events: none; }
.term-options span { display: block; background: var(--surface); border: 1px solid var(--line); padding: 8px; border-radius: 7px; color: var(--muted); cursor: pointer; font-size: 12px; }
.term-options strong { display: block; font-size: 12px; color: var(--text); white-space: nowrap; }
.term-options :checked + span { border-color: #9d8240; color: var(--accent); }
.term-options :focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.receipt-lines { margin-top: 10px; }
.copy-line { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.copy-line code { color: var(--muted); font-size: 12px; }
.screen-form { display: grid; gap: 8px; margin-top: 12px; }
.form-controls { display: grid; gap: 4px; }
.prototype-screen .form-feedback { color: #f2a89b; font-size: 12px; }
.form-feedback:empty { display: none; }
.prototype-screen #copy-status { color: var(--muted); }
.instruction-list { margin: 0; padding-left: 19px; color: var(--muted); }
.instruction-list li + li { margin-top: 8px; }
.preview-group + .preview-group { margin-top: 24px; }
.preview-group a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 43px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
}
.prototype-dialog {
  max-width: min(360px, calc(100vw - 32px));
  padding: 20px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.prototype-dialog::backdrop { background: #07090dbf; }
.prototype-dialog h2 { font-size: 19px; }
.prototype-dialog p { margin: 9px 0 0; font-size: 13px; color: var(--muted); }
.prototype-dialog .screen-actions { grid-template-columns: 1fr 1fr; }

@media (max-width: 700px) {
  .bottom-nav { padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
  .prototype-screen { padding-top: calc(20px + env(safe-area-inset-top)); }
}
@media (max-width: 360px) {
  .term-options span { padding-inline: 6px; }
}

.welcome-example {
  margin: 0;
  padding: 2px 9px 10px;
  background: #1b1e24;
  border-radius: 8px;
}
.welcome-example svg { display: block; width: 100%; height: auto; }
.welcome-example figcaption { color: var(--muted); font-size: 11px; padding-inline: 7px; }
.event-list { padding: 0; margin: 0; list-style: none; }
.event-list li { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 3px 9px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.event-list li > span { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.event-list strong { font-size: 13px; font-weight: 680; }
.event-list p { grid-column: 2; font-size: 12px; }
