/* CRWN ring configurator: the one stylesheet. "Atelier" palette from the certificate app:
   warm ivory, charcoal ink, CRWN maroon as the only accent. Phone first; self-hosted fonts;
   no inline styles anywhere (strict CSP, config/security.py). */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("../fonts/Inter-Regular.3875f8357497.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("../fonts/Inter-SemiBold.b72fa2728a8e.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 400; font-display: swap; src: url("../fonts/Montserrat-Regular.618651a1ea85.woff2") format("woff2"); }

:root {
  --ink: #1f2124;
  --ink-2: #2e3135;
  --muted: #5f6266;
  --subtle: #6a6d71;
  --maroon: #7a1428;
  --maroon-dark: #5e0f1f;
  --maroon-tint: #f6ecee;
  --page: #faf8f5;
  --card: #ffffff;
  --wash: #f3f0eb;
  --photo: #ece8e2;
  --line: #e7e2db;
  --line-soft: #efebe5;
  --field: #cfc8bf;
  --ok: #1d6b3a;
  --ok-bg: #e9f3ec;
  --ok-line: #cfe3d5;
  --warn: #6b3a00;
  --warn-bg: #fbf0e0;
  --warn-line: #eed6b3;
  --info: #1f4e79;
  --info-bg: #e7eef6;
  --info-line: #c9d8ea;
  --error: #a3162b;
  --error-bg: #fbedef;
  --error-line: #ecc5cb;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(31, 33, 36, 0.04), 0 10px 30px rgba(31, 33, 36, 0.06);
  --shadow-lift: 0 1px 2px rgba(31, 33, 36, 0.05), 0 16px 44px rgba(31, 33, 36, 0.1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--page); color: var(--ink);
  font: 400 16px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--maroon); text-underline-offset: 2px; }
a:hover { color: var(--maroon-dark); }
:focus-visible { outline: 3px solid var(--maroon); outline-offset: 2px; border-radius: 6px; }
img { max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: "Montserrat", sans-serif; font-weight: 400; color: var(--ink); line-height: 1.2; }
h1 { font-size: 2rem; margin: 0 0 0.5rem; letter-spacing: -0.01em; }
p { margin: 0 0 0.85rem; }
.eyebrow { margin: 0 0 6px; font: 600 11px/1.3 "Inter", sans-serif; letter-spacing: 0.16em; text-transform: uppercase; color: var(--maroon); }
.lede { color: var(--muted); max-width: 34rem; }
.fine { font-size: 0.8125rem; color: var(--subtle); margin: 0.5rem 0 0; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px;
  background: var(--maroon); color: #fff; font: 600 15px/1 "Inter", sans-serif;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.button:hover { background: var(--maroon-dark); color: #fff; }
.button:active { transform: translateY(1px); }
.button-wide { width: 100%; }
.button.quiet { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.button.quiet:hover { border-color: var(--ink); }
.button.small { min-height: 38px; padding: 0 14px; font-size: 14px; }

/* ------------------------------------------------------------------------------------------
   Storefront: the ring designer
   ------------------------------------------------------------------------------------------ */

.shop-header { background: var(--card); border-bottom: 1px solid var(--line); }
.shop-header .bar { max-width: 76rem; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 14px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 40px; width: auto; display: block; }
.shop-title { font: 400 12px/1.2 "Montserrat", sans-serif; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); padding-left: 14px; border-left: 1px solid var(--line); }
.paths { display: flex; gap: 4px; padding-left: 14px; border-left: 1px solid var(--line); }
.paths a { padding: 8px 10px; border-radius: 999px; color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.paths a:hover { color: var(--ink); }
.paths a[aria-current="page"] { background: var(--maroon-tint); color: var(--maroon); }
.shop-link { margin-left: auto; color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: none; padding: 10px 2px; }
.shop-link:hover { color: var(--maroon); }
.preview-bar { background: var(--info-bg); color: var(--info); border-bottom: 1px solid var(--info-line); padding: 8px 16px; font-size: 14px; text-align: center; }

.designer { width: 100%; max-width: 76rem; margin: 0 auto; padding: 0 0 110px; display: grid; grid-template-columns: minmax(0, 1fr); }
.stage { padding: 0; }
.viewer { margin: 0; }
.viewer-frame {
  position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--photo);
}
.ring-image { display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.25s ease; }
.ring-image.is-loading { opacity: 0.35; }
.viewer[data-has-image="0"] .ring-image { visibility: hidden; }
.viewer-placeholder {
  position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 24px; text-align: center; color: var(--muted); font-size: 15px;
}
.viewer[data-has-image="0"] .viewer-placeholder { display: flex; }
.viewer-placeholder p { margin: 0; }
.viewer-note { position: absolute; left: 12px; right: 12px; bottom: 12px; margin: 0; padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.92); color: var(--ink); font-size: 13px; text-align: center; }
.badge-unapproved { position: absolute; top: 12px; left: 12px; background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-line); border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 600; }
.viewer figcaption { padding: 10px 16px 0; font-size: 0.8125rem; color: var(--subtle); }
.stone-size { margin: 0; padding: 10px 16px 0; font-size: 0.9375rem; color: var(--ink); }
.stone-size-picture { color: var(--subtle); font-size: 0.8125rem; white-space: nowrap; }
.gallery { display: flex; gap: 8px; padding: 10px 16px 0; overflow-x: auto; }
.gallery-thumb {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 76px;
  color: var(--muted); font-size: 12px; text-decoration: none; text-align: center;
}
.gallery-thumb img {
  width: 76px; height: 76px; object-fit: cover; border-radius: 12px; background: var(--photo);
  border: 2px solid transparent;
}
.gallery-thumb:hover img { border-color: var(--line); }
.gallery-thumb.is-selected { color: var(--ink); font-weight: 600; }
.gallery-thumb.is-selected img { border-color: var(--maroon); }
/* Five pictures per ring (C-29) fit across a phone without scrolling. */
@media (max-width: 420px) {
  .gallery-thumb, .gallery-thumb img { width: 60px; }
  .gallery-thumb img { height: 60px; }
}

.price-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px; justify-content: space-between;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(31, 33, 36, 0.06);
  transition: transform 0.2s ease;
}
.price-bar.is-hidden { transform: translateY(110%); }
.price-thumb-link { flex: none; line-height: 0; }
.price-thumb { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; object-position: center 45%; background: var(--photo); }
.price-text { display: flex; flex-direction: column; min-width: 0; margin-right: auto; }
.price-label { font: 600 11px/1.3 "Inter", sans-serif; letter-spacing: 0.12em; text-transform: uppercase; color: var(--subtle); margin: 0; }
.price { font: 400 1.25rem/1.25 "Montserrat", sans-serif; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.price small { font: 600 11px "Inter", sans-serif; color: var(--subtle); letter-spacing: 0.06em; }

.panel { padding: 24px 16px 0; min-width: 0; }
.intro { margin-bottom: 8px; }

.step { border-top: 1px solid var(--line); padding: 22px 0 24px; }
.step h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 1.15rem; margin: 0 0 14px; }
.step-num {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--ink); color: #fff; font: 600 12px/1 "Inter", sans-serif;
}
.step-value { margin-left: auto; font: 400 14px/1.3 "Inter", sans-serif; color: var(--muted); }
.step-note { font-size: 0.875rem; color: var(--muted); margin: 12px 0 0; }

.families { display: grid; gap: 12px; }
.family h3 { font: 600 11px/1.3 "Inter", sans-serif; letter-spacing: 0.12em; text-transform: uppercase; color: var(--subtle); margin: 0 0 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px 6px 8px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink);
  font: 400 14px/1.2 "Inter", sans-serif; cursor: pointer; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.carat-chip { padding: 6px 14px; }
.chip:hover { border-color: var(--ink-2); }
.chip.is-selected, .tile.is-selected, .card-option.is-selected {
  border-color: var(--maroon); box-shadow: inset 0 0 0 1px var(--maroon); background: var(--maroon-tint);
}
.chip.is-selected { font-weight: 600; }
.dot { width: 26px; height: 26px; flex: none; display: block; }
.dot-big { width: 120px; height: 120px; }

.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px 10px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); color: var(--ink);
  font: 400 13px/1.2 "Inter", sans-serif; cursor: pointer; min-height: 44px;
}
.tile:hover:not(:disabled) { border-color: var(--ink-2); }
.tile:disabled { opacity: 0.35; cursor: not-allowed; }
.stone-tiles { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.stone-tile { align-items: flex-start; text-align: left; padding: 12px 14px; gap: 2px; }
.stone-tile strong { font-size: 15px; }
.stone-tile span { color: var(--muted); font-size: 13px; line-height: 1.4; }
.grade-chip { min-width: 52px; justify-content: center; padding: 6px 12px; }
.sub-step { font: 600 11px/1.3 "Inter", sans-serif; letter-spacing: 0.12em; text-transform: uppercase; color: var(--subtle); margin: 16px 0 8px; }
.more-grades { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 10px; }
.more-grades summary { cursor: pointer; color: var(--muted); font-size: 14px; font-weight: 600; }
.shape-icon { width: 34px; height: 34px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; }
.shape-icon .facet { stroke-width: 0.8; stroke-opacity: 0.45; }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.card-option {
  display: flex; flex-direction: column; text-align: left; padding: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); color: var(--ink);
  font: inherit; cursor: pointer;
}
.card-option:hover { border-color: var(--ink-2); }
.card-media { display: grid; place-items: center; aspect-ratio: 4 / 3; background: var(--photo); overflow: hidden; }
.card-thumb { width: 100%; height: 100%; object-fit: cover; object-position: center 45%; transform: scale(1.25); }
.card-icon { display: grid; place-items: center; }
.setting-icon { width: 72px; height: 72px; fill: none; stroke: var(--ink); stroke-width: 1.6; }
.setting-icon .stone { fill: #fff; }
.setting-icon .halo { stroke-dasharray: 2 3; stroke-width: 3; }
.setting-icon .bezel { stroke-width: 4; }
.card-text { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; font-size: 13px; color: var(--muted); }
.card-text strong { font-size: 15px; color: var(--ink); font-weight: 600; }

.quote { padding-bottom: 8px; }
.summary { display: grid; gap: 16px; margin-bottom: 20px; }
.summary dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.summary dt { font: 600 11px/1.3 "Inter", sans-serif; letter-spacing: 0.12em; text-transform: uppercase; color: var(--subtle); }
.summary dd { margin: 2px 0 0; font-weight: 600; }
.share-row { margin: 0; }
.estimate { background: var(--wash); border-radius: var(--radius); padding: 18px; }
.estimate .price { font-size: 1.6rem; margin: 2px 0 0; white-space: normal; }
.sample-note { color: var(--warn); }
.breakdown { margin-top: 12px; font-size: 14px; }
.breakdown summary { cursor: pointer; color: var(--muted); }
.breakdown ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.breakdown li { display: flex; justify-content: space-between; gap: 12px; }
.breakdown li span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }

.quote-form { display: grid; gap: 14px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--field); border-radius: var(--radius-sm);
  background: var(--card); color: var(--ink); font: 400 16px/1.4 "Inter", sans-serif;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--maroon); box-shadow: 0 0 0 3px var(--maroon-tint); }
.field .help { font-size: 13px; color: var(--subtle); margin: 6px 0 0; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--error); }
.field-error, .form-error { color: var(--error); font-size: 14px; margin: 6px 0 0; }
.form-error { background: var(--error-bg); border: 1px solid var(--error-line); border-radius: var(--radius-sm); padding: 10px 14px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.size-guide { margin-top: 8px; font-size: 14px; }
.size-guide summary { cursor: pointer; color: var(--maroon); font-weight: 600; }
.size-guide p { margin: 10px 0 0; color: var(--muted); }
.size-finder { margin-top: 12px; }
.size-finder-row { display: flex; gap: 8px; }
.size-finder-row input { flex: 1; min-width: 0; }
.size-finder-row .button { white-space: nowrap; }
.size-chart { width: 100%; margin-top: 12px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.size-chart th, .size-chart td { padding: 5px 8px; text-align: right; border-bottom: 1px solid var(--line-soft); }
.size-chart th:first-child { text-align: left; }
.size-chart thead th { font: 600 11px/1.3 "Inter", sans-serif; letter-spacing: 0.12em; text-transform: uppercase; color: var(--subtle); }
.size-chart tr.is-match { background: var(--maroon-tint); }

.shop-footer { text-align: center; color: var(--subtle); font-size: 0.8125rem; padding: 18px 16px 120px; border-top: 1px solid var(--line); }
.shop-footer p { margin: 0 0 4px; }
.shop-footer a { color: var(--subtle); }

/* Thanks page */
.thanks { max-width: 40rem; margin: 0 auto; padding: 32px 16px 64px; text-align: center; }
.thanks-image { width: min(360px, 80vw); height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); background: var(--photo); margin: 8px auto 20px; display: block; }
.thanks .ref { display: inline-block; font: 600 15px/1 "Inter", sans-serif; letter-spacing: 0.06em; background: var(--wash); border-radius: 999px; padding: 8px 14px; margin-bottom: 16px; }

@media (max-width: 479px) {
  .shop-header .bar { gap: 10px; }
  .brand img { height: 34px; }
  .shop-link { display: none; }
  .paths { padding-left: 8px; }
  .paths a { padding: 6px 8px; font-size: 13px; }
  .price { font-size: 1rem; }
  .price-bar { gap: 10px; }
  .price-bar .price small { display: none; }
  .price-bar .button { padding: 0 16px; font-size: 14px; min-height: 44px; }
  .tiles { gap: 6px; }
  .tile { font-size: 12px; }
}

@media (min-width: 640px) {
  .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stone-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 960px) {
  .designer { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; padding: 28px 24px 56px; }
  .stage { position: sticky; top: 20px; align-self: start; }
  .viewer-frame { border-radius: 24px; box-shadow: var(--shadow); }
  .viewer figcaption { padding: 12px 4px 0; }
  .stone-size { padding: 12px 4px 0; }
  .gallery { padding: 12px 0 0; }
  .price-bar {
    position: static; margin-top: 16px; padding: 14px 16px 14px 20px; border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: none; background: var(--card); backdrop-filter: none;
  }
  .price-bar.is-hidden { transform: none; }
  .price-thumb-link { display: none; }
  .panel { padding: 0; }
  .intro { padding-top: 6px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-footer { padding-bottom: 24px; }
  h1 { font-size: 2.25rem; }
}

@media (min-width: 1200px) {
  .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ------------------------------------------------------------------------------------------
   Studio: staff screens
   ------------------------------------------------------------------------------------------ */

.studio-header { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.studio-header .bar { max-width: 90rem; margin: 0 auto; padding: 6px 16px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-height: 58px; }
.studio-header .brand img { height: 34px; }
.studio-nav { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; font-size: 14px; }
.studio-nav a { color: var(--ink); text-decoration: none; font-weight: 600; padding: 10px 10px; border-radius: 10px; }
.studio-nav a:hover { background: var(--wash); }
.studio-nav a[aria-current="page"] { background: var(--maroon-tint); color: var(--maroon); }
.studio-nav form { margin: 0; }
.link-button { background: none; border: 0; min-height: 40px; padding: 8px 10px; font: 600 14px "Inter", sans-serif; color: var(--muted); cursor: pointer; }
.link-button:hover { color: var(--maroon); }
.studio-main { width: 100%; max-width: 90rem; margin: 0 auto; padding: 24px 16px 64px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { font-size: 1.75rem; }
.page-head .muted { max-width: 52rem; }
.small { font-size: 0.8125rem; }
kbd { font: 600 12px "Inter", sans-serif; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; background: var(--card); }
code { font-size: 0.9em; background: var(--wash); padding: 1px 6px; border-radius: 6px; }

.messages { display: grid; gap: 8px; margin-bottom: 16px; }
.message, .notice { margin: 0 0 16px; padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid var(--info-line); background: var(--info-bg); color: var(--info); }
.message { margin: 0; }
.message.success { border-color: var(--ok-line); background: var(--ok-bg); color: var(--ok); }
.message.error, .notice.error { border-color: var(--error-line); background: var(--error-bg); color: var(--error); }
.notice.warn { border-color: var(--warn-line); background: var(--warn-bg); color: var(--warn); }
.notice ul { margin: 6px 0 0; padding-left: 20px; }
.notice p { margin: 0; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card h2 { font-size: 1.15rem; margin: 0 0 12px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.tiles-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { display: flex; flex-direction: column; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat-label { font: 600 11px/1.3 "Inter", sans-serif; letter-spacing: 0.12em; text-transform: uppercase; color: var(--subtle); }
.stat-value { font: 400 2rem/1.1 "Montserrat", sans-serif; font-variant-numeric: tabular-nums; }
.stat-value small { font: 400 14px "Inter", sans-serif; color: var(--muted); }
.meter { width: 100%; height: 8px; appearance: none; border: 0; border-radius: 999px; background: var(--wash); overflow: hidden; }
.meter::-webkit-progress-bar { background: var(--wash); border-radius: 999px; }
.meter::-webkit-progress-value { background: var(--maroon); border-radius: 999px; }
.meter::-moz-progress-bar { background: var(--maroon); border-radius: 999px; }

.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font: 600 12px/1.6 "Inter", sans-serif; background: var(--wash); color: var(--ink); white-space: nowrap; }
.pill.ok, .pill.approved, .pill.won { background: var(--ok-bg); color: var(--ok); }
.pill.review, .pill.new { background: var(--info-bg); color: var(--info); }
.pill.warn, .pill.queued, .pill.generating, .pill.contacted, .pill.quoted { background: var(--warn-bg); color: var(--warn); }
.pill.failed, .pill.rejected { background: var(--error-bg); color: var(--error); }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table thead th { font: 600 11px/1.3 "Inter", sans-serif; letter-spacing: 0.08em; text-transform: uppercase; color: var(--subtle); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.list li a { color: var(--ink); text-decoration: none; }
.list li .pill { margin-left: auto; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 10px; }
.filters label { display: flex; flex-direction: column; gap: 4px; font: 600 12px "Inter", sans-serif; color: var(--muted); }
.filters select { min-height: 38px; border: 1px solid var(--field); border-radius: 10px; padding: 4px 10px; font: 400 14px "Inter", sans-serif; background: var(--card); }
.filters .check-filter { flex-direction: row; align-items: center; gap: 6px; font-size: 14px; color: var(--ink); align-self: center; }
.filters .check-filter input { width: 18px; height: 18px; accent-color: var(--maroon); }
.filters .switch { margin-left: auto; font-size: 14px; font-weight: 600; align-self: center; }
.bulk-bar { position: sticky; top: 58px; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 0; background: var(--page); }
.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.review-card { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; outline: none; }
.review-card:focus { box-shadow: 0 0 0 3px var(--maroon); }
.review-card.is-checked { border-color: var(--maroon); box-shadow: inset 0 0 0 1px var(--maroon); }
.review-card.status-approved { border-color: var(--ok-line); }
.review-card.is-done { opacity: 0.45; }
.review-select { position: absolute; top: 8px; left: 8px; z-index: 2; background: rgba(255, 255, 255, 0.9); border-radius: 8px; padding: 4px 6px; line-height: 0; }
.review-select input { width: 18px; height: 18px; margin: 0; accent-color: var(--maroon); }
.review-media { display: block; aspect-ratio: 1 / 1; background: var(--photo); }
.review-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.review-media.empty { display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.review-text { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 4px; font-size: 13px; }
.review-text strong { font-size: 14px; }
.review-text .pill { align-self: flex-start; margin-top: 4px; }
.review-actions { display: flex; gap: 6px; padding: 6px 10px 10px; }
.review-actions .button { flex: 1; min-height: 34px; padding: 0 8px; font-size: 13px; }
.pager { display: flex; gap: 16px; justify-content: center; align-items: center; margin: 20px 0; font-size: 14px; }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tabs a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600; background: var(--card); }
.tabs a[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.field.check { display: flex; align-items: center; gap: 10px; grid-column: 1 / -1; }
.field.check input { width: 20px; height: 20px; min-height: 0; accent-color: var(--maroon); }
.field.check label { margin: 0; }
.price-table td { padding: 6px 6px; }
.pair { display: flex; gap: 4px; align-items: center; }
.money { width: 84px; min-height: 36px; padding: 4px 8px; border: 1px solid var(--field); border-radius: 8px; font: 400 14px "Inter", sans-serif; text-align: right; font-variant-numeric: tabular-nums; }
.money:focus { outline: none; border-color: var(--maroon); box-shadow: 0 0 0 3px var(--maroon-tint); }
.factor-groups { display: grid; gap: 12px; }
.factor-name { margin: 0 0 4px; font: 600 12px/1.3 "Inter", sans-serif; color: var(--muted); }
.factor-row { display: flex; flex-wrap: wrap; gap: 6px; }
.factor { display: flex; flex-direction: column; align-items: center; gap: 2px; font: 600 12px "Inter", sans-serif; }
.factor .money { width: 64px; }
.save-bar { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 12px 0; background: var(--page); border-top: 1px solid var(--line); }
.sheet-actions, .sheet-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.sheet-upload input[type="file"] { max-width: 100%; font: 400 14px "Inter", sans-serif; }

.quote-layout { display: grid; gap: 20px; }
.quote-image { display: block; width: 100%; height: auto; max-width: 520px; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); background: var(--photo); }
.quote-image.empty { display: grid; place-items: center; color: var(--muted); }
.facts { margin: 0; display: grid; gap: 8px; }
.facts div { display: grid; grid-template-columns: 130px 1fr; gap: 12px; }
.facts dt { color: var(--muted); font-size: 14px; }
.facts dd { margin: 0; font-weight: 600; }
.message-text { background: var(--wash); border-radius: var(--radius-sm); padding: 12px 14px; }
.stack { display: grid; gap: 14px; }
.stack .card { margin: 0; }

.login { width: 100%; max-width: 26rem; margin: 0 auto; padding: 48px 16px; }
.login-logo { display: block; height: 72px; width: auto; margin: 0 auto 24px; }
.login h1 { text-align: center; }
.login > .muted { text-align: center; }

/* allauth's screens (2-step setup, codes, recovery codes) inside .login.account */
.account form { display: grid; gap: 14px; margin: 16px 0; }
.account form p { margin: 0; }
.account form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.account form input[type="text"], .account form input[type="password"] {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--field); border-radius: var(--radius-sm);
  background: var(--card); color: var(--ink); font: 400 16px/1.4 "Inter", sans-serif;
}
.account form input:focus { outline: none; border-color: var(--maroon); box-shadow: 0 0 0 3px var(--maroon-tint); }
.account form input:disabled { background: var(--wash); font-family: ui-monospace, monospace; font-size: 14px; }
.account form p > span { display: block; font-size: 13px; color: var(--subtle); margin-top: 6px; }
.account form button {
  min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--maroon); color: #fff;
  font: 600 15px/1 "Inter", sans-serif; cursor: pointer;
}
.account form button:hover { background: var(--maroon-dark); }
.account form .link-button { background: none; color: var(--muted); min-height: 40px; }
.account form .link-button:hover { color: var(--maroon); }
.account form img { display: block; width: 220px; height: auto; margin: 0 auto; background: #fff; padding: 8px; border-radius: var(--radius-sm); }
.account ul.errorlist { list-style: none; margin: 0; padding: 0; color: var(--error); font-size: 14px; }
.account-links { text-align: center; margin-top: 24px; }

@media (min-width: 900px) {
  .quote-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}
