/* Premier Timepieces: one stylesheet, no framework.
   Design follows the owner's mockup (Premier_Timepieces_Mockup.html):
   storefront = brushed silver on black; admin = light "workshop" with a black rail.
   Fonts are self-hosted (see VENDORED.md); nothing loads from a CDN.
   The CSP forbids inline styles, so every visual lives here. */

@font-face { font-family: "Cormorant Garamond"; src: url(../fonts/cormorant-garamond.woff2) format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url(../fonts/cormorant-garamond-italic.woff2) format("woff2"); font-weight: 300 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Jost"; src: url(../fonts/jost.woff2) format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url(../fonts/ibm-plex-sans.woff2) format("woff2"); font-weight: 100 700; font-style: normal; font-display: swap; }

:root {
  /* storefront: taken from the logo */
  --bg: #000; --panel: #111; --line: #262626; --line-2: #333;
  --ink: #e8e8e8; --ink-2: #c4c6ca; --muted: #8d9096; --faint: #5c5f66;
  --silver: linear-gradient(180deg, #f4f4f4 0%, #c3c6cb 42%, #8a8e95 56%, #dcdee2 100%);
  /* admin: the workshop */
  --abg: #f1f1ee; --apanel: #fff; --aline: #dddcd5; --aline-2: #ebeae5; --aink: #171717; --amuted: #6d6d69; --afaint: #a3a39e;
  --ok: #4f7f5a; --ok-bg: #e9f1ea; --warn: #a87f24; --warn-bg: #f7efdc; --bad: #b2493f; --bad-bg: #f6e4e1; --info: #4a6a8f; --info-bg: #e6ecf3;

  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", system-ui, sans-serif;
  --ui: "IBM Plex Sans", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
button { font-family: inherit; }
summary { cursor: pointer; }
:focus-visible { outline: 2px solid #9ab3ff; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, html { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
svg.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Watch illustration from the mockup (placeholder until photos exist).
   The dial takes its colour from fill on the <svg>. */
.watch { display: block; width: 100%; height: auto; fill: #101418; }
.dial-black { fill: #0b0b0c; } .dial-blue { fill: #1c3b6e; } .dial-green { fill: #163d2a; }
.dial-white { fill: #e9e9e7; } .dial-grey { fill: #3a3d42; } .dial-champagne { fill: #b8a374; }

/* ================= storefront ================= */
body.store, body.bare { background: var(--bg); color: var(--ink); font: 300 16px/1.6 var(--sans); }
.store h1, .store h2, .store h3, .bare h1 { font-family: var(--serif); font-weight: 500; margin: 0; letter-spacing: .005em; }
.store p { line-height: 1.6; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 28px; }
.store a:hover { color: #fff; }

.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 84px; border-bottom: 1px solid var(--line); }
.nav .brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.nav .brand img { height: 46px; width: 46px; mix-blend-mode: lighten; }
.nav .brand b { font-family: var(--serif); font-weight: 500; font-size: 22px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
.nav nav ul { list-style: none; display: flex; gap: 30px; margin: 0; padding: 0; font-size: 14px; font-weight: 400; letter-spacing: .02em; }
.nav nav a { text-decoration: none; color: var(--ink-2); padding-bottom: 4px; border-bottom: 1px solid transparent; }
.nav nav a.cur { color: #fff; border-bottom-color: #fff; }
.nav .util { display: flex; align-items: center; gap: 20px; font-size: 13px; }
.nav .util a { color: var(--muted); text-decoration: none; }
.nav .util a:last-child { color: var(--ink); border: 1px solid var(--line-2); padding: 7px 14px; border-radius: 2px; }
.nav .menu { display: none; position: relative; }
.nav .menu summary { list-style: none; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--line-2); padding: 8px 12px; }
.nav .menu summary::-webkit-details-marker { display: none; }
.nav .menu ul { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; list-style: none; margin: 0; padding: 8px 0; min-width: 220px; background: var(--panel); border: 1px solid var(--line-2); }
.nav .menu a { display: block; padding: 10px 18px; text-decoration: none; color: var(--ink-2); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 2px; padding: 14px 26px;
  font: 500 13px/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; text-decoration: none;
  border: 1px solid var(--ink-2); color: var(--ink); background: transparent; text-align: center; }
.btn:hover { border-color: #fff; color: #fff; }
.btn.primary { background: var(--silver); color: #111; border-color: transparent; }
.btn.primary:hover { color: #000; filter: brightness(1.06); }
.btn.ghost { border-color: var(--line-2); color: var(--ink-2); }
.btn.sm { padding: 10px 16px; font-size: 12px; }
.btn.block { width: 100%; }

.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; padding: 72px 0 64px; border-bottom: 1px solid var(--line); }
.hero h1 { font-size: clamp(40px, 5vw, 66px); line-height: 1.02; color: #f2f2f2; }
.hero h1 em { font-style: italic; font-weight: 400; color: #cfd2d7; }
.hero .lead { font-size: 17px; color: var(--ink-2); max-width: 48ch; margin: 22px 0 32px; }
.cta { display: flex; gap: 14px; flex-wrap: wrap; }
.stage { background: radial-gradient(60% 60% at 50% 45%, #1d1d1f 0%, #000 70%); border: 1px solid var(--line); padding: 38px 30px 26px; display: flex; flex-direction: column; align-items: center; }
.stage-link { display: block; width: min(300px, 60%); }
.stage-link img { display: block; width: 100%; }
.stage .cap { align-self: stretch; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 18px; font-size: 14px; color: var(--ink-2); }
.stage .cap b { font-family: var(--serif); font-size: 22px; font-weight: 500; color: #fff; }
.stage .cap span { color: var(--muted); }
/* The logo art sits on pure black; lighten lets the gradient show through it. */
.stage-logo, .foot-logo, .rail .logo, .bare-logo { mix-blend-mode: lighten; }
.stage-logo { width: min(320px, 80%); }

.sect { padding: 56px 0; border-bottom: 1px solid var(--line); }
.sect-h { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 28px; }
.sect-h h2, .sect-h .h2 { font-size: 34px; color: #f2f2f2; }
.sect-h a { font-size: 13px; color: var(--muted); text-decoration: none; letter-spacing: .04em; }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.store .card { background: var(--panel); border: 1px solid var(--line); text-decoration: none; color: inherit; display: block; transition: border-color .15s; }
.store .card:hover { border-color: #555; color: inherit; }
.store .card .ph { background: radial-gradient(70% 60% at 50% 45%, #1b1b1d 0%, #0d0d0d 75%); aspect-ratio: 1 / 1; display: flex; justify-content: center; align-items: center; position: relative; overflow: hidden; }
.store .card .ph .watch { width: 52%; }
.store .card .ph img { width: 100%; height: 100%; object-fit: cover; }
.flag { position: absolute; top: 12px; left: 12px; z-index: 1; font-size: 11px; letter-spacing: .06em; color: var(--ink-2); border: 1px solid var(--line-2); padding: 4px 7px; background: #0a0a0a; }
.flag.sold { color: #111; background: #cfd2d7; border-color: #cfd2d7; }
.store .card .tx { padding: 16px 18px 18px; }
.store .card .brand { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.store .card .name { font-family: var(--serif); font-size: 21px; font-weight: 500; color: #f2f2f2; margin: 4px 0 2px; line-height: 1.2; }
.store .card .meta { font-size: 13px; color: var(--muted); }
.store .card .price { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 12px; font-size: 16px; color: #fff; font-weight: 400; }
.store .card .price small { font-size: 12px; color: var(--muted); text-align: right; }

.trust { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); }
.trust div { padding: 26px 24px; border-right: 1px solid var(--line); }
.trust div:last-child { border-right: 0; }
.trust h3 { font-size: 22px; color: #f2f2f2; margin-bottom: 8px; }
.trust p { font-size: 14px; color: var(--muted); margin: 0; }
.band { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; }
.band h2 { font-size: 40px; color: #f2f2f2; line-height: 1.05; }
.band p { color: var(--ink-2); max-width: 56ch; margin: 14px 0 0; font-size: 16px; }
.journal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.journal article { border-top: 1px solid var(--line-2); padding-top: 18px; }
.kicker { font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.journal h3 { font-size: 24px; color: #f2f2f2; margin: 8px 0 10px; line-height: 1.15; }
.journal h3 a { text-decoration: none; }
.journal p { font-size: 14px; color: var(--ink-2); margin: 0; }
.empty { color: var(--ink-2); max-width: 60ch; }

.foot { padding: 40px 0 48px; color: var(--muted); font-size: 13px; }
.foot .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; margin-bottom: 28px; }
.foot-logo { width: 170px; display: block; margin-bottom: 12px; }
.foot ul { list-style: none; margin: 0; padding: 0; line-height: 2; }
.foot a { text-decoration: none; }
.foot .disc { border-top: 1px solid var(--line); padding-top: 18px; max-width: 92ch; line-height: 1.6; }

/* shop */
.shop { display: grid; grid-template-columns: 250px 1fr; gap: 36px; padding: 38px 0 64px; }
.filters h3 { font: 500 15px var(--sans); letter-spacing: .04em; margin: 0 0 12px; color: var(--ink-2); }
.filters .f { border-top: 1px solid var(--line); padding: 18px 0; }
.filters .f:first-child { border-top: 0; padding-top: 0; }
.filters .chk { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-2); padding: 5px 0; cursor: pointer; }
.filters .chk .n { color: var(--faint); font-size: 12px; }
.filters input[type=checkbox] { accent-color: #cfd2d7; margin: 0 10px 0 0; }
.filters .range { display: flex; gap: 10px; }
.filters input[type=search], .filters .range input { width: 100%; background: #0d0d0d; border: 1px solid var(--line-2); color: var(--ink); padding: 10px; font: 400 13px var(--sans); }
.filters .actions { display: flex; gap: 10px; }
.shop-h { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.shop-h h1 { font-size: 40px; color: #f2f2f2; }
.shop-h .sort label { display: block; font-size: 13px; color: var(--muted); letter-spacing: 0; }
.shop-h .sort select { width: auto; background: #0d0d0d; color: var(--ink); border: 1px solid var(--line-2); padding: 8px 10px; font: 400 13px var(--sans); margin-left: 8px; }
.shop .grid { grid-template-columns: repeat(3, 1fr); }

/* watch detail */
.crumb { font-size: 13px; color: var(--muted); padding: 22px 0 0; }
.crumb a { text-decoration: none; }
.pdp { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; padding: 22px 0 60px; }
.gallery { min-width: 0; }
.gallery .main { position: relative; background: radial-gradient(60% 60% at 50% 45%, #1e1e20 0%, #000 75%); border: 1px solid var(--line); aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.gallery .main .watch { width: 52%; }
.gallery .main img { width: 100%; height: 100%; object-fit: contain; }
.thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 8px; }
.thumbs a { position: relative; aspect-ratio: 1 / 1; background: #0f0f10; border: 1px solid var(--line); overflow: hidden; text-decoration: none; }
.thumbs a.cur { border-color: #cfd2d7; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.thumbs span { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 6px; font-size: 10px; color: var(--ink-2); background: linear-gradient(transparent, rgba(0, 0, 0, .8)); }
.buy { min-width: 0; }
.buy .brand { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.buy h1 { font-size: 44px; line-height: 1.05; color: #f2f2f2; margin: 6px 0 4px; }
.buy .ref { font-size: 15px; color: var(--ink-2); }
.buy .price { font: 400 34px var(--serif); color: #fff; margin: 22px 0 4px; }
.buy .note { font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.notice { border: 1px solid #3b5a43; background: #0f1a12; color: #b9dcc1; padding: 12px 14px; font-size: 14px; }
.buy .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.buy .acts .act:first-child, .buy .acts .act:last-child { grid-column: 1 / -1; }
.act > summary { list-style: none; }
.act > summary::-webkit-details-marker { display: none; }
.buy .acts summary.btn { padding: 14px 10px; font-size: 12px; letter-spacing: .06em; }
.act[open] > summary { border-color: #fff; }
.buy .acts .act[open] { grid-column: 1 / -1; }
.act-form { border: 1px solid var(--line); border-top: 0; background: var(--panel); padding: 16px; display: grid; gap: 12px; }
.act-form .fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.act-form p { margin: 0; color: var(--ink-2); }
.linkish { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.verify { margin-top: 26px; border: 1px solid var(--line); padding: 18px 20px; background: var(--panel); }
.verify h3 { font-size: 22px; color: #f2f2f2; margin-bottom: 8px; }
.verify p { font-size: 14px; color: var(--ink-2); margin: 0 0 10px; }
.verify ul { margin: 0; padding-left: 18px; font-size: 14px; color: var(--ink-2); line-height: 1.7; }
.verify .sig { margin-top: 12px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; }
.specs { margin-top: 26px; }
.specs h3 { font-size: 22px; color: #f2f2f2; margin-bottom: 10px; }
.specs table { width: 100%; border-collapse: collapse; font-size: 14px; }
.specs td { padding: 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs td:first-child { color: var(--muted); width: 40%; padding-right: 12px; }
.policy { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 26px; font-size: 13px; color: var(--muted); }
.policy b { display: block; color: var(--ink-2); font-weight: 400; margin-bottom: 4px; }
.policy .act-form { border-top: 1px solid var(--line); margin-top: 10px; }

/* storefront forms */
.store label, .bare label { display: grid; gap: 6px; font-size: 12px; color: var(--muted); letter-spacing: .03em; }
.store input, .store select, .store textarea, .bare input { width: 100%; background: #0d0d0d; border: 1px solid var(--line-2); color: var(--ink); padding: 12px; font: 400 14px var(--sans); border-radius: 0; }
.store textarea { min-height: 84px; resize: vertical; }
.store input[type=checkbox], .store input[type=radio] { width: auto; }
.alert { margin: 0 0 16px; padding: 10px 12px; border-left: 2px solid var(--bad); background: #1a0f0e; color: #e4a39b; font-size: 14px; }
.stack { display: grid; gap: 16px; }

/* sell */
.sell { display: grid; grid-template-columns: 1fr 380px; gap: 48px; padding: 40px 0 64px; }
.kinds { display: flex; gap: 0; margin: 8px 0 30px; border-bottom: 1px solid var(--line); }
.kinds a { padding: 0 0 12px; margin-right: 34px; font-size: 13px; color: var(--muted); letter-spacing: .03em; text-decoration: none; border-bottom: 1px solid transparent; }
.kinds a.cur { color: #fff; border-bottom-color: #fff; }
.form h1 { font-size: 42px; color: #f2f2f2; line-height: 1.05; }
.form .intro { color: var(--ink-2); font-size: 16px; max-width: 60ch; margin: 12px 0 0; }
.form .intro a { color: var(--ink); }
.form h2.step { font: 500 13px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin: 34px 0 0; display: flex; align-items: center; gap: 10px; }
.form h2.step span { display: inline-grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--line-2); border-radius: 50%; font-size: 12px; letter-spacing: 0; }
.form .fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin-top: 18px; }
.form .fields .full { grid-column: 1 / -1; }
.hint { color: var(--muted); font-size: 14px; margin: 10px 0 0; }
.photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.photos .slot { aspect-ratio: 1 / 1; border: 1px dashed var(--line-2); background: #0b0b0b; display: flex; flex-direction: column; justify-content: flex-end; padding: 10px; font-size: 12px; color: var(--muted); position: relative; cursor: pointer; overflow: hidden; gap: 0; }
.photos .slot:hover { border-color: #666; }
.photos .slot input { position: absolute; inset: 0; opacity: 0; cursor: pointer; padding: 0; z-index: 2; }
.photos .slot .slot-name { position: relative; z-index: 1; }
.photos .slot small { position: relative; z-index: 1; color: var(--faint); display: block; margin-top: 2px; font-size: 11px; }
.photos .slot.ok { border-style: solid; border-color: #3b3d42; }
.photos .slot.ok::after { content: "Added"; position: absolute; top: 8px; right: 8px; z-index: 1; font-size: 10px; color: #111; background: #cfd2d7; padding: 2px 6px; }
.photos .slot .preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.submit-row { margin-top: 26px; display: flex; gap: 12px; }
.est { border: 1px solid var(--line); background: var(--panel); padding: 24px; position: sticky; top: 20px; align-self: start; }
.est .lbl { font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.est .num { font: 400 32px/1.1 var(--serif); color: #fff; margin: 6px 0 8px; }
.est .sub { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.est ol { margin: 0; padding-left: 18px; font-size: 14px; color: var(--ink-2); line-height: 1.7; }
.est .fine { font-size: 12px; color: var(--faint); margin-top: 16px; line-height: 1.5; }
.est .fine a { color: var(--ink-2); }

/* pages and journal posts */
.page-message { max-width: 40rem; margin: 0 auto; padding: 5rem 0; text-align: center; }
.page-message .code { font-family: var(--serif); font-size: 64px; line-height: 1; color: var(--faint); margin: 0 0 .5rem; }
.page-message h1 { font-size: 40px; color: #f2f2f2; }
.page-message p { color: var(--ink-2); }
.page-message .cta { justify-content: center; }
.prose.page { max-width: 46rem; padding: 48px 0 64px; }
.prose h1 { font-size: 48px; color: #f2f2f2; line-height: 1.05; margin: 6px 0 18px; }
.prose h2 { font-size: 28px; color: #f2f2f2; margin: 32px 0 10px; }
.prose p, .prose li { color: var(--ink-2); font-size: 17px; }
.prose ul { padding-left: 20px; }
.prose .dek { font-size: 20px; color: var(--ink); }
.prose .cta { margin-top: 32px; }
.prose .crumb { padding: 0 0 18px; }
.muted { color: var(--muted); }
.sm { font-size: 12px; }

/* ================= sign-in pages ================= */
.bare-main { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 28px; padding: 32px 16px; }
.bare-logo { width: 200px; }
.bare .card { background: var(--panel); border: 1px solid var(--line); padding: 28px; width: min(420px, calc(100vw - 32px)); }
.bare .card h1 { font-size: 30px; color: #f2f2f2; margin-bottom: 12px; }
.bare .card p { color: var(--ink-2); font-size: 15px; }
.bare .card .muted { color: var(--muted); font-size: 13px; }
.bare .card a { color: var(--ink); }
.steps { padding-left: 18px; color: var(--ink-2); font-size: 15px; }
.steps li { margin-bottom: 12px; }
.setup-key { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 10px 0; padding: 12px; background: #0b0b0b; border: 1px solid var(--line); font-size: 14px; }
.setup-key dt { color: var(--muted); }
.setup-key dd { margin: 0; word-break: break-all; }
.setup-key code { font: 15px var(--mono); letter-spacing: .06em; color: #fff; }

/* ================= admin ================= */
body.admin { background: linear-gradient(90deg, #000 0, #000 216px, var(--abg) 216px); color: var(--aink);
  font: 400 13.5px/1.45 var(--ui); min-height: 100vh; display: grid; grid-template-columns: 216px minmax(0, 1fr); }
.admin a { color: var(--info); }
.rail { background: #000; color: #cfd2d7; padding: 22px 12px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; overflow-y: auto; }
.rail .logo { display: block; width: 150px; margin: 4px auto 26px; }
.rail nav a { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 9px 10px; border-radius: 4px; text-decoration: none; color: #b9bcc6; }
.rail nav a:hover { background: #151515; color: #fff; }
.rail nav a[aria-current=page] { background: #1d1d1f; color: #fff; }
.rail nav .n { font-size: 11px; background: #2a2a2d; color: #dfe1e5; border-radius: 10px; padding: 1px 7px; white-space: nowrap; }
.rail .user { margin-top: auto; border-top: 1px solid #222; padding-top: 14px; font-size: 12px; color: #8d9096; }
.rail .user b { display: block; color: #e8e8e8; font-weight: 500; font-size: 13px; }
.rail .user form { margin: 8px 0 0; }
.rail .user button { background: none; border: 0; padding: 0; color: #b9bcc6; text-decoration: underline; cursor: pointer; font-size: 12px; }
.main { padding: 0 22px 48px; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px 16px; min-height: 60px; padding: 10px 0; border-bottom: 1px solid var(--aline); margin-bottom: 22px; flex-wrap: wrap; }
.topbar h1 { font-size: 19px; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.top-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.top-actions .search input { background: #fff; border: 1px solid var(--aline); border-radius: 6px; padding: 7px 12px; width: 300px; max-width: 60vw; font: inherit; font-size: 13px; }
.flash { margin: 0 0 14px; padding: 10px 14px; border-radius: 6px; background: var(--ok-bg); color: var(--ok); border: 1px solid #cfe0d2; }
.flash.bad { background: var(--bad-bg); color: var(--bad); border-color: #e3c2bd; }
.crumbline { margin: -10px 0 14px; color: var(--amuted); font-size: 12.5px; }

.ab, .ab2 { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 6px; font: inherit; cursor: pointer; text-decoration: none; white-space: nowrap; }
.admin .ab { background: #111; color: #fff; border: 1px solid #111; padding: 7px 14px; font-weight: 500; }
.admin .ab2 { background: #fff; color: var(--aink); border: 1px solid var(--aline); padding: 6px 12px; font-size: 13px; }
.admin .ab2:hover { border-color: #b9b8b0; }
.admin .ab2.danger { color: var(--bad); border-color: #e3c2bd; }
.admin .ab2.p { background: #111; color: #fff; border-color: #111; }
.admin .ab2.light { background: #1d1d1f; color: #fff; border-color: #333; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: 12px; color: var(--info); cursor: pointer; text-decoration: underline; }
.linkbtn.danger { color: var(--bad); }
details.inline { display: inline; }
details.inline > summary { display: inline; list-style: none; }
details.inline > summary::-webkit-details-marker { display: none; }
details.inline[open] > summary { display: none; }

.panel { background: var(--apanel); border: 1px solid var(--aline); border-radius: 8px; padding: 18px 20px; margin-bottom: 14px; min-width: 0; }
.panel h2 { font-size: 14px; font-weight: 600; margin: 0 0 12px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.panel h2 span { font-weight: 400; color: var(--amuted); font-size: 12px; }
.panel.flush { padding: 0; overflow: hidden; }
.panel.flush.tbl { overflow-x: auto; }
.panel .pad, .panel h2.pad { padding: 14px 16px 0; }
details.panel > summary { list-style: none; }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary h2 { margin: 0; }
details.panel > summary h2::after { content: "+"; color: var(--amuted); }
details.panel[open] > summary h2 { margin-bottom: 12px; }
details.panel[open] > summary h2::after { content: "–"; }
.narrow { max-width: 560px; }
.narrow-wide { max-width: 860px; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
.kpi { background: #fff; border: 1px solid var(--aline); border-radius: 8px; padding: 16px 18px; }
.kpi .l { font-size: 12px; color: var(--amuted); }
.kpi .v { font-size: 26px; font-weight: 600; letter-spacing: -.02em; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.kpi .d { font-size: 12px; color: var(--amuted); }
.kpi .d.up { color: var(--ok); }
.kpi .d.dn { color: var(--bad); }
.two { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; margin-bottom: 14px; align-items: start; }
.two > .panel { margin-bottom: 0; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 12px 0; }

.aging .bar { display: block; width: 100%; height: 22px; border-radius: 4px; margin: 8px 0 10px; }
.aging .leg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; font-size: 12px; }
.aging .leg b { display: block; font-weight: 600; font-size: 14px; }
.aging .leg span { display: block; }
.aging .leg i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.sw-0 { background: #2f3138; } .sw-1 { background: #6d7079; } .sw-2 { background: #a87f24; } .sw-3 { background: #b2493f; }
.pipe { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 12px; }
.admin .pipe a, .admin .kan a { background: #fafaf7; border: 1px solid var(--aline-2); border-radius: 6px; padding: 10px 6px; text-align: center; text-decoration: none; color: var(--amuted); font-size: 11px; }
.admin .pipe a:hover, .admin .kan a:hover { border-color: var(--aline); background: #fff; }
.pipe b, .kan b { display: block; font-size: 20px; font-weight: 600; color: var(--aink); }
.kan { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin-top: 14px; }
.kan b { font-size: 16px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--aline-2); font-size: 13px; }
.list li:last-child { border-bottom: 0; }
.list li b { font-weight: 600; }
.list li a { white-space: nowrap; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); display: inline-block; margin-right: 6px; }
.dot.warn { background: var(--warn); }
.dot.bad { background: var(--bad); }
.dot.off { background: #bbb; }
.mini { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--amuted); margin-bottom: 14px; }
.mini .chip { background: #fff; border: 1px solid var(--aline); border-radius: 14px; padding: 4px 10px; display: inline-flex; align-items: center; color: var(--aink); }

.tbl { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
table.t th { text-align: left; font-weight: 500; color: var(--amuted); font-size: 11.5px; padding: 8px 7px; border-bottom: 1px solid var(--aline); white-space: nowrap; }
table.t td { padding: 7px; border-bottom: 1px solid var(--aline-2); vertical-align: middle; }
.panel.flush table.t th:first-child, .panel.flush table.t td:first-child { padding-left: 14px; }
.panel.flush table.t th:last-child, .panel.flush table.t td:last-child { padding-right: 14px; }
table.t tbody tr:last-child td { border-bottom: 0; }
table.t td.r, table.t th.r { text-align: right; }
table.t td.r { white-space: nowrap; }
table.t tr.sel td { background: #f6f6f2; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: #f9f9f6; }
table.t tfoot td { font-weight: 600; border-top: 1px solid var(--aline); background: #fafaf7; }
table.t a { text-decoration: none; }
table.t .detail { display: block; min-width: 220px; max-width: 420px; white-space: pre-wrap; word-break: break-word; font: 11.5px var(--mono); color: var(--amuted); }
table.t td.msg { max-width: 320px; white-space: pre-wrap; }
table.inv { font-size: 11.5px; }
table.inv td { white-space: nowrap; }
.neg { color: var(--bad); }
.pos { color: var(--ok); }
.pill { display: inline-block; font-size: 11px; font-weight: 500; border-radius: 4px; padding: 2px 7px; line-height: 1.5; white-space: nowrap; background: #ececea; color: #5a5a57; }
.pill.hot { background: #f3e0dd; color: #9c3b32; }
.pill.good, .pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.watch, .pill.gray { background: #ececea; color: #5a5a57; }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.info { background: var(--info-bg); color: var(--info); }
.pill.mt { margin-top: 3px; }
.mut { color: var(--amuted); }
.admin .sm { font-size: 12px; }
.mono { font: 12px var(--mono); }
.nowrap { white-space: nowrap; }
.serial { font-family: var(--mono); letter-spacing: .08em; }
.revealed .serial { font-size: 16px; background: var(--warn-bg); padding: 4px 8px; border-radius: 4px; }

/* admin filters and tabs */
.filterbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.admin .filterbar select, .admin .filterbar input { width: auto; background: #fff; border: 1px solid var(--aline); border-radius: 6px; padding: 6px 10px; font: inherit; font-size: 13px; }
.seg { display: inline-flex; border: 1px solid var(--aline); border-radius: 6px; overflow: hidden; background: #fff; flex-wrap: wrap; }
.admin .seg a { padding: 6px 11px; font-size: 13px; text-decoration: none; color: var(--amuted); }
.admin .seg a.on { background: #111; color: #fff; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--aline); margin-bottom: 16px; flex-wrap: wrap; align-items: flex-end; }
.admin .tabs > a { padding: 8px 12px; font-size: 13px; color: var(--amuted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.admin .tabs > a.cur { color: var(--aink); border-color: #111; font-weight: 500; }
.tabs .right { margin-left: auto; padding-bottom: 6px; }
.admin .tabs .right select { width: auto; }

/* admin forms */
.admin label { display: grid; gap: 4px; font-size: 12px; color: var(--amuted); }
.admin input:not([type=checkbox]):not([type=radio]):not([type=file]), .admin select, .admin textarea {
  width: 100%; background: #fff; border: 1px solid var(--aline); border-radius: 5px; padding: 7px 9px; font: inherit; font-size: 13px; color: var(--aink); }
.admin textarea { resize: vertical; min-height: 60px; }
.admin input:disabled, .admin textarea:disabled { background: #f7f7f4; color: var(--amuted); }
.admin input[aria-invalid=true] { border-color: var(--bad); }
.admin label.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--aink); }
.grid-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 14px; align-items: end; }
.grid-form.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 12px; }
.span2 { grid-column: span 2; }
.span4 { grid-column: 1 / -1; }
.row-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin: 0 0 10px; }
.row-form label { flex: 1 1 160px; }
.form-actions { display: flex; gap: 10px; align-items: center; margin: 0 0 14px; }
.aform .panel h2 { margin-bottom: 14px; }
.piece-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 14px; align-items: start; }
.side > .panel, .side > .guard, .side > details { margin-bottom: 14px; }

.calc { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.calc div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--aline-2); }
.calc div.tot { border-top: 1px solid var(--aline); border-bottom: 0; font-weight: 600; margin-top: 4px; }
.calc div span:first-child { color: var(--amuted); }
.calc div.tot span:first-child { color: var(--aink); }
.calc div.sub span:first-child { padding-left: 12px; }
.guard { background: var(--bad-bg); border: 1px solid #e3c2bd; border-radius: 6px; padding: 10px 12px; font-size: 12.5px; }
.guard b { display: block; color: var(--bad); font-weight: 600; margin-bottom: 2px; }
.guard.warn { background: var(--warn-bg); border-color: #ead9b1; }
.guard.warn b { color: var(--warn); }
.flags { background: var(--warn-bg); border: 1px solid #ead9b1; border-radius: 6px; padding: 10px 12px; font-size: 12.5px; margin: 12px 0; }
.flags.ok { background: var(--ok-bg); border-color: #cfe0d2; }
.flags b { display: block; font-weight: 600; margin-bottom: 3px; }
.flags code.detail { display: block; margin-top: 6px; white-space: pre-wrap; font: 12px var(--mono); color: var(--aink); background: #fff; padding: 8px; border-radius: 4px; }

/* photos in admin */
.thumbs-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 6px 0 16px; }
.thumbs-admin figure { margin: 0; border: 1px solid var(--aline); border-radius: 6px; overflow: hidden; background: #fafaf7; }
.thumbs-admin img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #222; }
.thumbs-admin figcaption { font-size: 11.5px; padding: 6px 8px 0; }
.thumbs-admin form { padding: 2px 8px 8px; display: flex; gap: 10px; flex-wrap: wrap; }
.qphotos { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin: 10px 0; }
.qphotos a, .qphotos .missing { position: relative; aspect-ratio: 1 / 1; border-radius: 4px; overflow: hidden; background: radial-gradient(70% 60% at 50% 45%, #2a2a2c, #0d0d0d); display: flex; align-items: flex-end; }
.qphotos img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.qphotos span { position: relative; padding: 4px; font-size: 10px; color: #e8e8e8; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); width: 100%; }
.qphotos .missing span { color: #9a9ca3; background: none; }
.qphotos.big { gap: 10px; }

/* deals */
.src { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.src > .panel { margin-bottom: 0; }
.deal .hd { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.deal .hd .th { width: 64px; height: 64px; background: radial-gradient(70% 60% at 50% 45%, #2a2a2c, #0d0d0d); border-radius: 6px; display: flex; align-items: center; justify-content: center; flex: none; }
.deal .hd .th .watch { width: 40px; }
.deal .hd h3 { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.3; }
.deal .hd .m { font-size: 12px; color: var(--amuted); }
.deal .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.deal .acts.four { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
.deal .acts .row-form { margin: 0; }
.ai { border: 1px solid var(--aline); border-radius: 6px; padding: 12px; background: #fafaf7; font-size: 12.5px; }
.ai .tag { font-size: 11px; color: var(--info); font-weight: 600; margin-bottom: 6px; }
.admin .ai textarea { min-height: 160px; font-size: 12.5px; }
.ai .big { font-size: 18px; }
.ai .row-form { margin: 0; }
.quote { background: #fafaf7; border-left: 3px solid var(--aline); padding: 8px 12px; margin: 0 0 12px; font-size: 13px; }
.board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.board section { background: #fafaf7; border: 1px solid var(--aline-2); border-radius: 8px; padding: 10px; min-height: 120px; }
.board h3 { font-size: 12px; font-weight: 600; margin: 0 0 8px; display: flex; justify-content: space-between; color: var(--amuted); }
.admin .bcard { display: grid; gap: 4px; background: #fff; border: 1px solid var(--aline); border-radius: 6px; padding: 8px; margin-bottom: 6px; text-decoration: none; color: var(--aink); font-size: 12px; }
.bcard .pill { justify-self: start; }

/* inbound queue */
.admin .qi { display: block; padding: 12px 14px; border-bottom: 1px solid var(--aline-2); text-decoration: none; color: inherit; }
.qi:last-child { border-bottom: 0; }
.qi:hover { background: #f9f9f6; }
.qi b { display: block; font-weight: 600; font-size: 13px; }
.qi span { font-size: 12px; color: var(--amuted); }

/* inspection */
.insp { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 14px; align-items: start; }
.insp .two { grid-template-columns: 1fr 1fr; }
.insp .chk { list-style: none; margin: 0; padding: 0; }
.insp .chk li { display: grid; grid-template-columns: minmax(0, 1fr) 100px minmax(0, 1fr); gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--aline-2); font-size: 13px; }
.insp .chk li:last-child { border-bottom: 0; }
.st { display: inline-flex; border: 1px solid var(--aline); border-radius: 5px; overflow: hidden; font-size: 11px; justify-self: start; }
.admin .st label { display: block; cursor: pointer; }
.st input { position: absolute; opacity: 0; pointer-events: none; }
.st label span { display: block; padding: 4px 9px; color: var(--amuted); background: #fff; }
.st input:checked + span { background: var(--ok); color: #fff; }
.st label.bad input:checked + span { background: var(--bad); }
.st input:focus-visible + span { outline: 2px solid #9ab3ff; }
.admin .insp input.note { font-size: 12px; }
.admin table.tg input { width: 70px; text-align: right; padding: 4px 6px; }
.sign { background: #111; color: #e8e8e8; border-radius: 8px; padding: 16px 18px; }
.sign h2 { color: #fff; font-size: 14px; margin: 0 0 8px; }
.sign .f { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0 12px; font-size: 12.5px; }
.sign .f div { background: #1d1d1f; border-radius: 5px; padding: 8px 10px; }
.sign .f span { display: block; color: #8d9096; font-size: 11px; }
.sign p { font-size: 12px; color: #b9bcc6; margin: 0 0 12px; }
.admin .sign .attest { display: flex; gap: 8px; align-items: flex-start; color: #e8e8e8; font-size: 12.5px; margin-bottom: 12px; }
.sign-actions { display: grid; grid-template-columns: auto 1fr; gap: 8px; }
.sign-actions button[value=sign] { background: #fff; color: #111; border: 0; border-radius: 6px; padding: 10px; font: inherit; font-weight: 600; cursor: pointer; }

/* settings */
.set { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; align-items: start; }
.set > .panel { margin-bottom: 0; }
.kv { display: grid; grid-template-columns: 1fr 150px; gap: 8px 12px; align-items: center; font-size: 13px; }
.kv > span:not(.unit) { color: var(--amuted); }
.admin .kv label { display: inline; font-size: 13px; }
.kv .unit { position: relative; display: block; }
.admin .kv .unit input { text-align: right; }
.admin .kv .unit.u-pct input { padding-right: 24px; }
.admin .kv .unit.u-money input { padding-left: 20px; }
.kv .unit i { position: absolute; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--afaint); font-size: 12px; }
.kv .unit.u-pct i { right: 9px; }
.kv .unit.u-money i { left: 9px; }
.admin input.num { width: 90px; text-align: right; }
.switch { position: relative; display: inline-block; width: 34px; height: 18px; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 9px; background: #bbb; cursor: pointer; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { left: 18px; }
.switch input:focus-visible + span { outline: 2px solid #9ab3ff; }
.admin .inline-form select { width: auto; }

/* ================= small screens ================= */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .board { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .piece-layout, .insp { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1000px) {
  .nav nav, .nav .util { display: none; }
  .nav .menu { display: block; }
  .nav .brand b { font-size: 16px; letter-spacing: .1em; }
  .hero, .shop, .pdp, .sell, .band { grid-template-columns: minmax(0, 1fr); }
  .grid, .shop .grid { grid-template-columns: repeat(2, 1fr); }
  .trust, .journal, .foot .cols { grid-template-columns: 1fr 1fr; }
  .trust div:nth-child(2) { border-right: 0; }
  .trust div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .thumbs { grid-template-columns: repeat(4, 1fr); }
  .photos { grid-template-columns: repeat(2, 1fr); }
  .est { position: static; }
  .wrap { padding: 0 16px; }

  body.admin { display: block; background: var(--abg); }
  .rail { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 16px; }
  .rail .logo { width: 72px; margin: 0; }
  .rail nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
  .rail nav a { padding: 6px 8px; }
  .rail .user { margin: 0; border: 0; padding: 0; }
  .main { padding: 0 16px 40px; }
  .two, .three, .src, .set, .insp .two { grid-template-columns: minmax(0, 1fr); }
  .pipe { grid-template-columns: repeat(4, 1fr); }
  .kan { grid-template-columns: repeat(5, 1fr); }
  .grid-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qphotos { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 600px) {
  .nav { height: 68px; }
  .grid, .shop .grid, .trust, .journal, .foot .cols, .policy { grid-template-columns: minmax(0, 1fr); }
  .trust div { border-right: 0; border-bottom: 1px solid var(--line); }
  .trust div:last-child { border-bottom: 0; }
  .form .fields, .act-form .fields { grid-template-columns: minmax(0, 1fr); }
  .buy .acts { grid-template-columns: minmax(0, 1fr); }
  .buy h1 { font-size: 36px; }
  .sect-h h2, .sect-h .h2, .band h2 { font-size: 30px; }
  .prose h1 { font-size: 38px; }
  .kpis, .aging .leg, .grid-form, .grid-form.two-col, .board, .deal .acts.four { grid-template-columns: minmax(0, 1fr); }
  .span2 { grid-column: auto; }
  .kv { grid-template-columns: 1fr 120px; }
  .insp .chk li { grid-template-columns: minmax(0, 1fr) auto; }
  .insp .chk li input.note { grid-column: 1 / -1; }
  .top-actions { margin-left: 0; }
  .top-actions .search input { width: 100%; max-width: none; }
}

/* Two-step verification: setup QR code (sign-in card and Your account), backup codes */
[hidden] { display: none !important; }
.qr-box { margin: 12px 0; width: 216px; max-width: 100%; line-height: 0; }
.qr-box svg { display: block; width: 100%; height: auto; border-radius: 4px; }
.key-help { margin: 10px 0 4px; font-size: 14px; }
.key-help summary { cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.key-help[open] summary { margin-bottom: 8px; }
.bare .key-help { margin-top: 20px; }
.bare .key-help .stack { margin-top: 12px; }
.setup-key .copy { margin-left: 6px; background: none; border: 1px solid var(--line-2); color: inherit; font: 12px var(--sans); padding: 2px 8px; cursor: pointer; }
.bare label.check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); letter-spacing: 0; }
.bare label.check input { width: auto; accent-color: var(--silver); }
.admin .steps { color: inherit; font-size: 13px; padding-left: 18px; }
.admin .setup-key { background: var(--abg); border-color: var(--aline); }
.admin .setup-key code { color: var(--aink); }
.admin .setup-key .copy { border-color: var(--aline); }
.flash.warn { background: var(--warn-bg); color: var(--warn); border-color: #ecdcb6; }
.codes { columns: 2; column-gap: 32px; padding-left: 24px; margin: 16px 0; font: 15px var(--mono); }
.codes li { margin-bottom: 6px; }
.code-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
@media print {
  body:has(.codes) { background: #fff; display: block; }
  body:has(.codes) .rail, body:has(.codes) .topbar, body:has(.codes) .code-actions, body:has(.codes) .ab { display: none; }
  body:has(.codes) .panel { border: 0; }
}

/* Settings > Users: the per-person Manage row */
details.manage > summary { list-style: none; cursor: pointer; }
details.manage > summary::-webkit-details-marker { display: none; }
details.manage[open] > summary { font-weight: 600; }
/* Manage opens the full-width row under the person (no script needed). */
table.people tr.manage-row { display: none; }
table.people tr:has(details.manage[open]) + tr.manage-row { display: table-row; }
@supports not selector(:has(a)) { table.people tr.manage-row { display: table-row; } }
table.people tr.manage-row > td { background: #fafaf8; padding: 10px 14px 14px; }
table.people tr:has(details.manage[open]) > td { border-bottom-color: transparent; background: #fafaf8; }
.manage-form { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: flex-end; }
.manage-form > label { flex: 0 1 220px; }
.manage-form .btns { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-end; }
.manage-form .btns label { min-width: 150px; }
.manage-form p { margin: 0; flex-basis: 100%; }
table.people tr.invited td { background: #fafaf8; }
