/* The Lucky Printer - site styles. One accent colour (deep green), neutral greys, system fonts. */
:root {
  --accent: #1f6f50;
  --accent-dark: #17563e;
  --accent-soft: #e7f2ec;
  --accent-line: #b9d8c8;
  --text: #1c2320;
  --muted: #56625d;
  --line: #dde3e0;
  --line-strong: #c4ccc8;
  --control-line: #7b8984; /* form fields, option cards, drop zone: 3.6:1 on white (WCAG 1.4.11; review frontend-7) */
  --bg: #f6f7f6;
  --card: #ffffff;
  --danger: #b42318;
  --danger-dark: #912018;
  --danger-soft: #fdeceb;
  --danger-line: #f3b8b2;
  --warn-text: #6b4a00;
  --warn-soft: #fff6dc;
  --warn-line: #f0d68a;
  --info-soft: #eef4f8;
  --info-line: #c7d9e6;
  --test-bg: #ffd84d;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(16, 24, 20, 0.05);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --wrap: 1100px;
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  overflow-wrap: break-word;
}
img, svg, canvas { max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); }
h3 { font-size: 1.125rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { color: var(--accent-dark); }
small, .small { font-size: 0.875rem; }
.muted { color: var(--muted); }
.good { color: var(--accent-dark); font-weight: 700; }
.mono { font-family: var(--mono); font-size: 0.92em; }
strong { font-weight: 650; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
/* Headings and result cards get focus from script only, to move screen readers; no ring needed. */
[tabindex="-1"]:focus { outline: none; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--card); color: var(--accent);
  padding: 10px 14px; border-radius: var(--radius-sm); box-shadow: 0 2px 8px rgba(0,0,0,.15); font-weight: 600;
}
.skip-link:focus { top: 8px; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; margin-left: auto; margin-right: auto; }
.detail-grid { max-width: 760px; }
.detail-main + .detail-side { margin-top: 16px; }
@media (min-width: 1080px) {
  .detail-grid { max-width: none; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px; align-items: start; }
  .detail-main + .detail-side { margin-top: 0; }
}

/* Test mode bar */
.testbar {
  background: var(--test-bg); color: #2b2100; text-align: center; font-weight: 700; font-size: 0.9rem;
  padding: 6px var(--gutter); letter-spacing: 0.02em;
}

/* Header */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap;
  min-height: 64px; padding-top: 8px; padding-bottom: 8px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none;
  font-weight: 750; font-size: 1.15rem; letter-spacing: -0.01em; min-height: 44px;
}
.brand:hover { color: var(--text); }
.brand svg { width: 28px; height: 28px; flex: none; }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--radius-sm);
  color: var(--text); text-decoration: none; font-weight: 550;
}
.site-nav a:hover { background: var(--accent-soft); color: var(--accent-dark); }
.site-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
@media (max-width: 560px) {
  .site-header .wrap { padding-top: 6px; padding-bottom: 4px; }
  .site-nav { width: 100%; margin: 0 -12px; }
  .site-nav a { padding: 0 12px; font-size: 0.95rem; }
}

/* Main + sections */
main { display: block; padding: 28px 0 56px; }
.section { margin: 0 0 48px; }
.section:last-child { margin-bottom: 0; }
.section-head { margin-bottom: 20px; }
.section-head p { color: var(--muted); max-width: 62ch; margin: 0; }
.page-title { margin-bottom: 8px; }
.lead { font-size: 1.125rem; color: var(--muted); max-width: 60ch; }

/* Cards */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card-tight { padding: 14px 16px; }
@media (min-width: 720px) { .card { padding: 24px; } }

.grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.grid > .card, .quote-layout > * > .card:first-child { margin-top: 0; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.stack > * + * { margin-top: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.row-between { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; justify-content: space-between; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 20px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font: inherit; font-weight: 650; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer;
  background: var(--card); color: var(--text); border-color: var(--line-strong);
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { background: #f0f3f1; color: var(--text); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-dark); border-color: var(--danger-dark); color: #fff; }
.btn-danger-outline { background: var(--card); border-color: var(--danger); color: var(--danger); }
.btn-danger-outline:hover { background: var(--danger-soft); color: var(--danger-dark); }
.btn-link {
  background: none; border: 0; padding: 0 4px; min-height: 44px; color: var(--accent); font-weight: 600;
  text-decoration: underline; text-underline-offset: 0.15em;
}
.btn-link:hover { background: none; color: var(--accent-dark); }
.btn-lg { min-height: 56px; font-size: 1.1rem; padding: 12px 28px; }
.btn-sm { min-height: 40px; padding: 6px 14px; font-size: 0.9rem; }
.btn-block { display: flex; width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-row .btn { flex: 1 1 180px; }

/* Notices */
.notice {
  border: 1px solid var(--info-line); background: var(--info-soft); border-radius: var(--radius-sm);
  padding: 12px 14px; margin: 0 0 16px;
}
.notice > :last-child { margin-bottom: 0; }
.notice-success { background: var(--accent-soft); border-color: var(--accent-line); }
.notice-warn { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn-text); }
.notice-error { background: var(--danger-soft); border-color: var(--danger-line); color: var(--danger-dark); }
.notice strong { color: inherit; }

/* Forms */
.field { margin: 0 0 16px; }
.field > label, .field > .label, fieldset > legend {
  display: block; font-weight: 650; margin-bottom: 6px;
}
fieldset { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
.hint { color: var(--muted); font-size: 0.875rem; margin: 4px 0 0; }
.field-error { color: var(--danger); font-size: 0.9rem; font-weight: 600; margin: 6px 0 0; }
input[type="text"], input[type="email"], input[type="number"], input[type="search"], select, textarea {
  display: block; width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; color: var(--text);
  background: #fff; border: 1px solid var(--control-line); border-radius: var(--radius-sm);
}
textarea { min-height: 120px; resize: vertical; line-height: 1.45; }
textarea.code { font-family: var(--mono); font-size: 0.875rem; min-height: 260px; white-space: pre; }
select { appearance: auto; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 0; border-color: var(--accent); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] {
  border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger);
}
.check {
  display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; cursor: pointer; font-weight: 500;
}
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--accent); cursor: pointer; }
.form-grid { display: grid; gap: 0 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) {
  .form-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-2 { grid-column: span 2; }
  /* City on its own row, then state + ZIP: the checkout card is narrow even on desktop. */
  .form-grid-3 { grid-template-columns: minmax(0, 1fr) minmax(0, 8.5rem); }
  .form-grid-3 > :first-child { grid-column: span 2; }
}

/* Radio / option cards */
.options { display: grid; gap: 10px; }
.option {
  position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; min-height: 56px;
  border: 1px solid var(--control-line); border-radius: var(--radius-sm); background: #fff; cursor: pointer;
}
.option:hover { border-color: var(--accent); }
.option input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--accent); cursor: pointer; }
.option:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--accent-soft); }
.option:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.option-body { flex: 1; min-width: 0; }
.option-title { display: flex; justify-content: space-between; gap: 8px; font-weight: 650; flex-wrap: wrap; }
.option-desc { display: block; color: var(--muted); font-size: 0.9rem; }

/* Stepper */
.stepper { display: flex; align-items: stretch; max-width: 220px; }
.stepper input { text-align: center; border-radius: 0; border-left: 0; border-right: 0; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper button {
  flex: none; width: 52px; min-height: 48px; font: inherit; font-size: 1.4rem; line-height: 1; cursor: pointer;
  background: #f3f5f4; border: 1px solid var(--control-line); color: var(--text);
}
.stepper button:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.stepper button:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.stepper button:hover { background: var(--accent-soft); }

/* Footer */
.site-footer { background: var(--card); border-top: 1px solid var(--line); padding: 28px 0 36px; font-size: 0.95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; align-items: flex-start; }
.site-footer p { margin: 0 0 4px; }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 4px; margin: 0; padding: 0; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; }
.footer-links li:first-child a { padding-left: 0; }

/* ---------- Home ---------- */
.hero { padding: 16px 0 8px; }
.hero-grid { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px; } }
.hero h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3rem); margin-bottom: 16px; max-width: 18ch; }
.hero .lead { margin-bottom: 24px; }
.hero-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.hero-points li { display: flex; gap: 12px; align-items: flex-start; }
.hero-points svg { flex: none; width: 24px; height: 24px; color: var(--accent); margin-top: 1px; }
.hero-points strong { display: block; }
.hero-points span { color: var(--muted); font-size: 0.95rem; }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps > li { counter-increment: step; }
.steps > li::before {
  content: counter(step); width: 40px; height: 40px; border-radius: 50%; margin-bottom: 14px;
  display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 750; font-size: 1.1rem;
}
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--muted); margin: 0; }

.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding: 6px 0 6px 30px; }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: 11px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent-soft) no-repeat center / 10px;
  border: 2px solid var(--accent);
}
.ticks.no li::before { border-color: var(--danger); background: var(--danger-soft); }
.ticks.no li::after {
  content: ""; position: absolute; left: 7px; top: 19px; width: 10px; height: 2px; background: var(--danger);
}

.quotes { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); margin: 0 0 20px; padding: 0; list-style: none; }
@media (min-width: 720px) { .quotes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.quote-card { margin: 0; display: flex; flex-direction: column; gap: 10px; height: 100%; }
.quote-card blockquote { margin: 0; position: relative; padding-left: 18px; border-left: 3px solid var(--accent-line); }
.quote-text { white-space: pre-wrap; margin: 0; }
.quote-date { color: var(--muted); font-size: 0.875rem; margin: auto 0 0; }
.score-line { font-weight: 650; margin-bottom: 6px; }
.link-lines p { margin: 0 0 6px; }

/* ---------- Quote page ---------- */
.quote-layout { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 960px) {
  .quote-layout { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px; }
  .sticky { position: sticky; top: 16px; }
}
.step-title { display: flex; align-items: center; gap: 10px; }
.step-num {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: var(--accent); color: #fff; font-size: 0.95rem; font-weight: 750;
}
.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  text-align: center; padding: 28px 16px; min-height: 170px; border: 2px dashed var(--control-line);
  border-radius: var(--radius); background: #fbfcfb; cursor: pointer; transition: border-color .15s, background-color .15s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.dropzone svg { width: 40px; height: 40px; color: var(--accent); }
.dropzone-title { font-weight: 700; font-size: 1.05rem; }
.dropzone input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

.viewer {
  position: relative; margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: #eef1ef; aspect-ratio: 4 / 3; max-height: 460px; width: 100%;
}
@media (max-width: 559px) { .viewer { aspect-ratio: 1 / 1; } }
/* pan-y: a vertical swipe on the preview scrolls the page; sideways drags and two fingers turn and zoom the model
   (review frontend-6). mesh.js sets the same after OrbitControls, which writes touch-action: none. */
.viewer canvas { display: block; width: 100% !important; height: 100% !important; touch-action: pan-y; }
.viewer-label {
  position: absolute; left: 10px; bottom: 10px; right: 10px; pointer-events: none; display: flex; justify-content: space-between;
  gap: 8px; flex-wrap: wrap; font-size: 0.82rem; color: #2b3330;
}
.viewer-label span { background: rgba(255,255,255,.88); border-radius: 4px; padding: 2px 8px; }
.viewer-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); padding: 16px; text-align: center; }

.file-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.file-item { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 12px; }
.file-item.is-selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.file-item.has-error { border-color: var(--danger-line); background: #fffafa; }
.file-head { display: flex; gap: 12px; align-items: flex-start; }
.file-thumb {
  flex: none; width: 64px; height: 64px; border-radius: var(--radius-sm); background: #eef1ef; border: 1px solid var(--line);
  overflow: hidden; display: grid; place-items: center; padding: 0; cursor: pointer;
}
.file-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-thumb svg { width: 28px; height: 28px; color: #8a9893; }
.file-main { flex: 1; min-width: 0; }
.file-name { font-weight: 650; overflow-wrap: anywhere; margin: 0; }
.file-meta { color: var(--muted); font-size: 0.875rem; margin: 2px 0 0; }
.file-remove { flex: none; min-width: 44px; min-height: 44px; margin: -6px -6px 0 0; padding: 6px 12px; gap: 6px; }
.file-remove svg { width: 18px; height: 18px; flex: none; }
@media (max-width: 559px) {
  .file-remove { padding: 0; width: 44px; }
  .file-remove .rm-text { display: none; }
}
.file-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 0; padding: 0; list-style: none; font-size: 0.92rem; }
.file-stats li { white-space: nowrap; }
.file-stats b { font-weight: 650; }
.file-warn { margin: 10px 0 0; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 0.92rem; }
.file-warn.warn { background: var(--warn-soft); border: 1px solid var(--warn-line); color: var(--warn-text); }
.file-warn.err { background: var(--danger-soft); border: 1px solid var(--danger-line); color: var(--danger-dark); }
.file-warn .check { padding: 6px 0 0; color: var(--text); }

.estimate { background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--radius); padding: 16px; margin: 0 0 16px; }
.estimate-label { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent-dark); margin: 0 0 4px; }
.estimate-range { font-size: 1.9rem; font-weight: 750; line-height: 1.15; margin: 0 0 4px; font-variant-numeric: tabular-nums; }
.estimate p { margin: 0; }
.estimate .hint { margin-top: 6px; }

.spinner {
  width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--accent-line); border-top-color: var(--accent);
  animation: spin 0.9s linear infinite; flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

.progress-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.progress-list li { font-size: 0.92rem; }
.progress-list .row-between { gap: 4px 12px; }
progress {
  display: block; width: 100%; height: 10px; margin-top: 4px; border: 0; border-radius: 999px; overflow: hidden;
  background: #e3e8e5; appearance: none; -webkit-appearance: none;
}
progress::-webkit-progress-bar { background: #e3e8e5; border-radius: 999px; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--accent); border-radius: 999px; }

.phase-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.phase-list li { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.phase-list li .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; display: grid; place-items: center; }
.phase-list li.done { color: var(--text); }
.phase-list li.done .dot { background: var(--accent); border-color: var(--accent); }
.phase-list li.done .dot::after { content: ""; width: 6px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.phase-list li.active { color: var(--text); font-weight: 650; }
.phase-list li.active .dot { border-color: var(--accent); }

.price-big { font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3rem); font-weight: 800; line-height: 1.05; margin: 0 0 4px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.kv { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.kv th, .kv td { padding: 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
.kv th { font-weight: 500; color: var(--text); padding-right: 12px; }
.kv td { text-align: right; white-space: nowrap; }
.kv td.wrap-ok { white-space: normal; overflow-wrap: anywhere; }
.kv-fixed { table-layout: fixed; }
.kv-fixed th { width: 45%; }
.kv .sub { display: block; color: var(--muted); font-size: 0.85rem; font-weight: 400; }
.kv tr.total th, .kv tr.total td { font-weight: 750; font-size: 1.1rem; border-bottom: 0; padding-top: 12px; }
.kv tr:last-child th, .kv tr:last-child td { border-bottom: 0; }

.flags { margin: 16px 0 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--warn-soft); border: 1px solid var(--warn-line); color: var(--warn-text); }
.flags ul { margin: 6px 0 0; }
.flags p { margin: 0; }
.flag-list-red { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.flag-list-red li { color: var(--danger-dark); background: var(--danger-soft); border: 1px solid var(--danger-line); border-radius: var(--radius-sm); padding: 8px 10px; font-weight: 600; }
.flag-list-red li code { font-family: var(--mono); font-weight: 500; font-size: 0.85em; }

.recent { margin-top: 12px; }
#progress .notice { margin: 16px 0 0; }
#progress-status:not(:empty) { margin-top: 12px; }

/* ---------- Order / status ---------- */
.status-hero { text-align: left; }
.status-hero .badge { margin-bottom: 10px; }
.status-big { font-size: clamp(1.8rem, 1.3rem + 2.2vw, 2.6rem); font-weight: 800; line-height: 1.1; margin: 0 0 10px; letter-spacing: -0.02em; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em; background: #edf0ee; color: #39433f; border: 1px solid var(--line);
}
.badge-green { background: var(--accent-soft); color: var(--accent-dark); border-color: var(--accent-line); }
.badge-amber { background: var(--warn-soft); color: var(--warn-text); border-color: var(--warn-line); }
.badge-red { background: var(--danger-soft); color: var(--danger-dark); border-color: var(--danger-line); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 18px 28px; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.timeline li::after { content: ""; position: absolute; left: 11px; top: 20px; bottom: 0; width: 2px; background: var(--accent-line); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::after { display: none; }
.timeline time { display: block; color: var(--muted); font-size: 0.875rem; }
.timeline .label { font-weight: 600; }

/* ---------- Approve / admin ---------- */
.review-img { display: block; width: 100%; max-height: 420px; object-fit: contain; background: #eef1ef; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.decide-bar { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.decide-bar .btn { min-height: 60px; font-size: 1.15rem; }
.decide-panel { margin-top: 12px; }
.result-card { border-width: 2px; }
.result-card.ok { border-color: var(--accent); }
.result-card.no { border-color: var(--danger); }
.dl { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 0 12px; margin: 0; }
.dl dt { color: var(--muted); padding: 7px 0; border-bottom: 1px solid var(--line); }
.dl dd { margin: 0; padding: 7px 0; border-bottom: 1px solid var(--line); font-weight: 550; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.dl dt:last-of-type, .dl dd:last-of-type { border-bottom: 0; }
.dl .bad { color: var(--danger); font-weight: 700; }
.dl .good { color: var(--accent-dark); font-weight: 700; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; justify-content: space-between; margin-bottom: 16px; }
.toolbar .field { margin: 0; min-width: 200px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs button {
  font: inherit; font-weight: 650; background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px;
  min-height: 48px; color: var(--muted); cursor: pointer; white-space: nowrap;
}
.tabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.stats-line { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 0.95rem; }
.stats-line > div { min-width: 0; }
.stats-line b { display: block; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

.order-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.order-row {
  display: grid; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; gap: 4px 16px;
  grid-template-columns: minmax(0, 1fr) auto; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; min-height: 56px;
}
.order-row:hover { border-color: var(--accent); }
.order-row .who { font-weight: 650; overflow-wrap: anywhere; }
.order-row .what { color: var(--muted); font-size: 0.9rem; grid-column: 1 / -1; }
.order-row .amt { font-weight: 750; font-variant-numeric: tabular-nums; text-align: right; grid-row: 1; grid-column: -2 / -1; }
.order-row .meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; grid-column: 1 / -1; font-size: 0.85rem; color: var(--muted); }
@media (min-width: 860px) {
  .order-row { grid-template-columns: minmax(0, 2.2fr) minmax(0, 3fr) minmax(0, 2.4fr) auto; }
  .order-row .what, .order-row .meta { grid-column: auto; }
}
.settings-layout { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) { .settings-layout { grid-template-columns: 260px minmax(0, 1fr); } }
.key-list { position: relative; list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 520px; overflow-y: auto; }
.key-select { margin-bottom: 0; }
.key-select select { font-family: var(--mono); }
.key-list button {
  width: 100%; text-align: left; font: inherit; font-family: var(--mono); font-size: 0.875rem; background: none; border: 0;
  border-radius: var(--radius-sm); padding: 8px 10px; min-height: 40px; cursor: pointer; color: var(--text); overflow-wrap: anywhere;
}
.key-list button:hover { background: var(--accent-soft); }
.key-list button[aria-current="true"] { background: var(--accent); color: #fff; }
.key-list .changed::after { content: " *"; color: var(--accent); }
.key-list button[aria-current="true"].changed::after { color: #fff; }
@media (max-width: 859px) { .key-list { display: none; } }
@media (min-width: 860px) { .key-select { display: none; } }
.events { list-style: none; margin: 0; padding: 0; font-size: 0.875rem; }
.events li { padding: 6px 0; border-bottom: 1px solid var(--line); display: grid; gap: 2px; }
.events li:last-child { border-bottom: 0; }
.events code { font-family: var(--mono); font-size: 0.85em; color: var(--muted); overflow-wrap: anywhere; white-space: pre-wrap; }

/* ---------- Legal ---------- */
.legal h2 { margin-top: 1.6em; font-size: 1.3rem; }
.legal h2:first-of-type { margin-top: 0.5em; }
.legal li { margin-bottom: 0.4em; }
.draft-banner { font-weight: 700; }

@media print {
  .testbar, .site-header nav, .site-footer { display: none; }
  body { background: #fff; }
  .card { box-shadow: none; }
}
