/* PaqLink app design system — "ink & signal", September 2026.
   Tokens first; components consume tokens only. Shares the marketing site's
   palette and self-hosted fonts: Inter for the UI, Bricolage Grotesque for page
   titles, JetBrains Mono for GTINs and URIs (see static/fonts/LICENSE.txt). */

@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-var-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-var-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
                 U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url("fonts/bricolage-grotesque-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url("fonts/bricolage-grotesque-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
                 U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Brand: warm paper ground, ink header, one electric accent; primary actions in
   ink (a QR code is black — the brand colour is earned). */
:root {
  --ink: #0b1020;
  --ink-2: #3f4858;
  --ink-3: #6b7383;
  --surface: #ffffff;
  --bg: #f6f5f1;
  --tint: #f8f7f3;
  --line: #e4e1d8;
  --line-soft: #eeece5;
  --line-strong: #cbc6b8;
  --black: #0b1020;
  --black-hover: #1c2440;
  --accent: #2457f5;
  --accent-hover: #1a46cf;
  --accent-weak: #e9eefe;
  --accent-on-dark: #8fb0ff;
  --good-ink: #15803d;
  --good-bg: #e6f8ec;
  --warn-ink: #b54708;
  --warn-bg: #fdf1e2;
  --danger-ink: #b42318;
  --danger-bg: #fdecea;
  --accent-glow: rgba(36, 87, 245, 0.2);
  --dark: #0b1020;
  --dark-line: rgba(255, 255, 255, 0.10);
  --dark-line-soft: rgba(255, 255, 255, 0.06);
  --dark-text: #c9d0de;
  --dark-muted: #8b95ab;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(11, 16, 32, 0.05), 0 2px 6px rgba(11, 16, 32, 0.04);
  --shadow-md: 0 2px 4px rgba(11, 16, 32, 0.04), 0 8px 20px -6px rgba(11, 16, 32, 0.10);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Bricolage Grotesque", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink-2);
  background: var(--bg);
  line-height: 1.58;
  font-size: 15.5px;
  /* Short pages left the footer floating mid-screen — pin it to the bottom. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; text-underline-offset: 3px; transition: color 0.15s var(--ease); }
a:hover { text-decoration: underline; color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent-weak); color: var(--accent-hover); }
h1, h2, h3 { color: var(--ink); }
strong { color: var(--ink); font-weight: 650; }

/* Clipped, not display:none — a display:none button is not submittable, and this
   class exists so a duplicate Save can be the form's first submit button (the one
   HTML fires when you press Enter in a text field) without being visible or
   reachable by tab. */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- App chrome ---------- */

header.site {
  background: var(--dark);
  color: var(--dark-text);
  border-bottom: 1px solid var(--dark-line-soft);
  position: sticky;
  top: 0;
  z-index: 10;
}
header.site .bar {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  color: #fff;
}
.logo:hover { text-decoration: none; color: #fff; }
.auth-card .logo, main .logo { color: var(--ink); }
.logo svg, .logo img { display: block; border-radius: 7px; }
/* Two flex items only: the mark and the wordmark. A bare text node would make
   "Paq" and "Link" separate items and the gap would land inside the word. */
.wordmark { font-family: var(--display); font-size: 1.22rem; font-weight: 700; letter-spacing: -0.035em; white-space: nowrap; }
.wordmark span, .wordmark b { color: var(--accent-on-dark); font-weight: inherit; }
.auth-card .wordmark span, main .wordmark span, .auth-card .wordmark b, main .wordmark b { color: var(--accent); }

nav.app {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
}
nav.app a {
  color: var(--dark-text);
  padding: 0.45rem 0.72rem;
  border-radius: var(--radius-sm);
  font-weight: 520;
  font-size: 0.93rem;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
nav.app a:hover { background: var(--dark-line-soft); color: #fff; text-decoration: none; }
nav.app a.active { background: var(--dark-line); color: #fff; }
header.site :focus-visible { outline-color: var(--accent-on-dark); }

.identity {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.86rem;
  color: var(--dark-muted);
  white-space: nowrap;
}
.identity .org {
  font-weight: 600;
  color: #fff;
  background: var(--dark-line-soft);
  border: 1px solid var(--dark-line);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}
.identity form { display: inline; margin: 0; }
.identity form.switch select { padding: 0.2rem 0.4rem; font: inherit; background: var(--dark-line-soft); color: #fff; border-color: var(--dark-line); }
.identity form.switch select option { color: var(--ink); background: #fff; }
.identity .btn.secondary { background: transparent; color: var(--dark-text); border-color: var(--dark-line); }
.identity .btn.secondary:hover { background: var(--dark-line-soft); color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.identity a { color: var(--dark-text); }
.identity .btn:not(.secondary) { background: var(--accent); border-color: var(--accent); color: #fff; }
.identity .btn:not(.secondary):hover { background: var(--accent-hover); border-color: var(--accent-hover); }

main.wrap {
  max-width: 1140px;
  width: 100%;
  margin: 0 auto;
  padding: 2.1rem 1.25rem 4.5rem;
  flex: 1;
}

footer.app {
  border-top: 1px solid var(--line);
  background: var(--surface);
  margin-top: 2rem;
}
footer.app .inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--ink-3);
}
footer.app .footer-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
footer.app .footer-links a { color: var(--ink-2); }
footer.app .footer-links a:hover { color: var(--accent); }

/* ---------- Typography ---------- */

h1 { font-family: var(--display); font-size: 1.9rem; font-weight: 700; letter-spacing: -0.032em; margin: 0.15rem 0 0.5rem; line-height: 1.15; }
h2 { font-family: var(--display); font-size: 1.2rem; font-weight: 650; letter-spacing: -0.022em; margin: 0 0 0.8rem; }
h3 { font-size: 0.99rem; font-weight: 650; letter-spacing: -0.015em; margin: 0 0 0.5rem; }
.muted { color: var(--ink-3); font-size: 0.9rem; }
.overline {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.15rem;
}
code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--tint);
  border: 1px solid var(--line-soft);
  padding: 0.08rem 0.35rem;
  border-radius: 5px;
  word-break: break-all;
}

/* ---------- Cards, stats ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.6rem;
  margin-bottom: 1.15rem;
}
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }

.statgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.9rem;
  margin: 1.1rem 0 1.3rem;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.2rem;
  transition: box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.stat:hover { box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.stat .label { font-size: 0.78rem; color: var(--ink-3); margin-bottom: 0.25rem; letter-spacing: 0.01em; }
.stat .value { font-family: var(--display); font-size: 1.7rem; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat .value small { font-size: 0.85rem; font-weight: 500; color: var(--ink-3); }

/* ---------- Pills / status ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.16rem 0.6rem;
  border-radius: 999px;
  background: var(--line-soft);
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.pill.good { background: var(--good-bg); color: var(--good-ink); border-color: transparent; }
.pill.warn { background: var(--warn-bg); color: var(--warn-ink); border-color: transparent; }
.pill.danger { background: var(--danger-bg); color: var(--danger-ink); border-color: transparent; }
.pill.accent { background: var(--accent-weak); color: var(--accent); border-color: transparent; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--black);
  color: #fff;
  border: 1px solid var(--black);
  padding: 0.54rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.3;
  box-shadow: 0 1px 2px rgba(11, 20, 32, 0.05);
  transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease), background 0.15s var(--ease), border-color 0.15s var(--ease);
}
.btn:hover { background: var(--black-hover); border-color: var(--black-hover); text-decoration: none; color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-glow); }
.btn.secondary {
  background: var(--surface);
  color: var(--ink-2);
  border-color: var(--line-strong);
}
.btn.secondary:hover { background: var(--tint); color: var(--ink); border-color: var(--ink-3); }
.btn.danger {
  background: var(--surface);
  color: var(--danger-ink);
  border-color: var(--line);
}
.btn.danger:hover { background: var(--danger-bg); border-color: var(--danger-bg); }
.btn.danger-solid { background: var(--danger-ink); border-color: var(--danger-ink); color: #fff; }
.btn.danger-solid:hover { background: #912018; border-color: #912018; color: #fff; }

/* ---------- Forms ---------- */

label { display: block; margin: 0.95rem 0 0.3rem; font-weight: 600; font-size: 0.88rem; }
input[type=text], input[type=email], input[type=password], input[type=url],
input[type=search], input[type=number], input[type=date], textarea, select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
/* An <input> with no type is a text field; style it like one. */
input:not([type]) {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font: inherit;
  color: var(--ink);
  background: var(--surface);
}
.card input:not([type]) { max-width: 32rem; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
/* Cards sit on pure white — the border and a soft tint header row carry
   the separation instead of a gray page background. */
.card, .stat { background: var(--surface); }
th { background: var(--tint); }
textarea { min-height: 7.5rem; font-family: var(--mono); font-size: 0.85rem; }
/* A single-line field stretched across a 1140px card looks unfinished. */
.card input[type=text], .card input[type=email], .card input[type=password],
.card input[type=url], .card input[type=search], .card input[type=number],
.card input[type=date], .card select { max-width: 32rem; }
textarea#description, textarea#recall_message { font-family: var(--font); font-size: inherit; }

/* ---------- Flash messages ---------- */

/* Amber stays the default for notices that carry no category (billing). The
   flash macro always adds one: success green, error red, info blue. */
.flash {
  background: var(--warn-bg);
  box-shadow: var(--shadow);
  border: 1px solid rgba(181, 71, 8, 0.25);
  border-left-width: 4px;
  color: var(--warn-ink);
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.92rem;
  word-break: break-word;
}
.flash.success { background: var(--good-bg); color: var(--good-ink); border-color: rgba(21, 128, 61, 0.3); }
.flash.error, .flash.danger { background: var(--danger-bg); color: var(--danger-ink); border-color: rgba(180, 35, 24, 0.3); }
.flash.info { background: var(--accent-weak); color: var(--accent-hover); border-color: rgba(36, 87, 245, 0.25); }
.flash a { color: inherit; text-decoration: underline; font-weight: 600; }
.flash .btn { margin-left: 0.5rem; }

/* ---------- Tables ---------- */

table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  font-size: 0.73rem;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 0.68rem 0.65rem;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.93rem;
  vertical-align: middle;
}
tr:hover td { background: var(--tint); }
td code, .gtin { font-variant-numeric: tabular-nums; white-space: nowrap; }
thead th { position: static; }
/* Wide staff tables scroll inside the card rather than breaking the page. */
/* position: relative keeps clipped (visually-hidden) labels inside the scroller,
   or they widen the page on a phone. */
.table-scroll { overflow-x: auto; position: relative; }
.table-scroll table { min-width: 40rem; }
.table-scroll td.muted { max-width: 18rem; }

/* ---------- Auth / narrow layouts ---------- */

.auth-card { max-width: 27rem; margin: 3.4rem auto; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 2rem 1.9rem; }
.auth-card .logo { justify-content: center; display: flex; margin-bottom: 1.1rem; }
.auth-card h1 { font-size: 1.45rem; text-align: center; }
.auth-card .muted { text-align: center; }

.empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--ink-3);
}
.empty .big { font-size: 1.05rem; color: var(--ink-2); font-weight: 600; margin-bottom: 0.3rem; }

.actions { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; margin: 0.9rem 0; }
/* One field + one button on a line (voucher code, quick filters). */
.inline-form { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; margin: 0.9rem 0; }
.inline-form input[type=text] { width: auto; flex: 1 1 12rem; }
.inline-form label { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Compact form grid for staff tools: label above field, several per row. */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.6rem 1rem; align-items: end; margin: 0.9rem 0; }
.form-grid label { margin: 0 0 0.3rem; }
.form-grid .span-2 { grid-column: span 2; }
.pill.dim { background: var(--tint); color: var(--ink-3); border-color: transparent; }

.qr-frame {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}

@media (max-width: 720px) {
  header.site .bar { padding: 0 1rem; gap: 0.6rem; }
  .identity { gap: 0.6rem; }
}

/* Every destructive action sits behind a <details> disclosure: CSP forbids the
   inline onclick a confirm() would need, so the extra deliberate click IS the
   confirmation step. Style the summary as the action it is. */
details:not(.menu) > summary { cursor: pointer; width: fit-content; font-weight: 600;
  font-size: 0.86rem; color: var(--danger-ink); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 0.32rem 0.75rem; background: var(--surface);
  list-style: none; display: inline-flex; align-items: center; gap: 0.35rem; }
details:not(.menu) > summary::-webkit-details-marker { display: none; }
details:not(.menu) > summary::after { content: ""; width: 0.4em; height: 0.4em; border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); opacity: 0.7; margin-left: 0.15rem; }
details:not(.menu)[open] > summary::after { transform: rotate(-135deg) translateY(-1px); }
details:not(.menu) > summary:hover { background: var(--danger-bg); border-color: var(--danger-bg); }
details.secondary > summary { color: var(--ink-2); border-color: var(--line-strong); }
details.secondary > summary:hover { background: var(--tint); border-color: var(--ink-3); }
details:not(.menu)[open] > summary { margin-bottom: 0.5rem; }
td > details { margin: 0.2rem 0; }

/* Role picker in a table cell: a full-width select would swallow the row. */
.rolechange { display: flex; align-items: center; gap: 0.4rem; margin: 0 0 0.35rem; }
.card .rolechange select { width: auto; max-width: 9rem; padding: 0.4rem 0.55rem; }
.rolechange .btn { padding: 0.42rem 0.8rem; font-size: 0.86rem; }
/* Extra permissions an owner granted an admin (Team page). */
.grant-pills { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.15rem 0 0.35rem; }
.grants summary { font-size: 0.86rem; }
.grants form { margin: 0.4rem 0 0; }
.grants label.choice { display: flex; gap: 0.5rem; align-items: flex-start; font-weight: 500; }
.grants label.choice input { width: auto; margin-top: 0.2rem; }
.grants .btn { padding: 0.42rem 0.8rem; font-size: 0.86rem; }

/* The nutrition editor: every input is named by a <th scope="row"><label for>, so
   a screen reader announces the row rather than 21 blank text fields. */
table.nutrition caption { text-align: left; font-weight: 600; font-size: 0.88rem;
  color: var(--ink); margin: 0.95rem 0 0.3rem; }
table.nutrition th { font-weight: 500; text-align: left; }
table.nutrition th label { display: inline; margin: 0; font-weight: inherit; font-size: inherit; }
table.nutrition td input { margin: 0; }

/* invoices */
.invoice-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; }
.invoice th { width: 12rem; }
@media print { header.site, footer.app, .actions, .noprint, .sidebar, .topbar, .bottom-nav { display: none; } .card { box-shadow: none; border: 0; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0.001ms !important; } }

/* Product-quota slider (pricing page + Billing). One control drives every tier card. */
.quota { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.4rem 1rem; margin-bottom: 1.4rem; box-shadow: var(--shadow-sm, none); }
.quota-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 0.7rem; }
.quota-label { display: block; font-family: var(--display); font-weight: 650; color: var(--ink); font-size: 1.08rem; letter-spacing: -0.01em; }
.quota-help { display: block; color: var(--ink-3); font-size: 0.86rem; margin-top: 0.15rem; max-width: 34rem; }
.quota-readout { display: flex; align-items: baseline; gap: 0.5rem; font-variant-numeric: tabular-nums; }
.quota-readout output { font-family: var(--display); font-size: 2rem; font-weight: 700; letter-spacing: -0.04em; color: var(--ink); min-width: 3ch; text-align: right; }
.quota-readout span { color: var(--ink-3); font-size: 0.9rem; }
.quota-readout input[type=number] { width: 6.5rem; margin: 0; padding: 0.35rem 0.5rem; font-size: 0.95rem; text-align: right; font-variant-numeric: tabular-nums; }
.quota-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 999px; margin: 0.6rem 0 0.35rem;
  background: linear-gradient(90deg, var(--accent), var(--accent-weak)); outline: none; }
.quota-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: var(--surface);
  border: 2px solid var(--accent); box-shadow: 0 1px 4px rgba(11,20,32,.18); cursor: pointer; }
.quota-slider::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); cursor: pointer; }
.quota-slider:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--accent-glow); }
.quota-scale { display: flex; justify-content: space-between; color: var(--ink-3); font-size: 0.74rem; font-variant-numeric: tabular-nums; }
/* pricing.js places each number under its own slider stop (the steps are uneven). */
.quota-scale.is-placed { display: block; position: relative; height: 1.6em; }
.quota-scale.is-placed span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.tiers .rec { display: none; }
.tiers .recommended .rec { display: inline-block; }
.tiers .recommended { border-color: transparent; box-shadow: 0 0 0 2px var(--accent), var(--shadow, none); }
.tiers .unavailable { opacity: 0.55; }
.tiers .unavailable [data-tier-cta] { pointer-events: none; }
.plan .tagline { margin: 0 0 0.6rem; color: var(--ink-3); font-size: 0.88rem; min-height: 2.6em; }
.plan .per { color: var(--ink-3); font-size: 0.86rem; font-variant-numeric: tabular-nums; min-height: 1.2em; }
.plan .note { margin: 0.35rem 0 0; color: var(--ink-2); font-size: 0.9rem; min-height: 1.3em; }
.plan.popular:not(.recommended) { box-shadow: var(--shadow-sm, none); border-color: var(--line); }
.plan.popular:not(.recommended) .flag:not(.rec) { display: none; }
.compare.ladder { min-width: 0; }
/* Billing tier cards (app shell) */
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.9rem; margin: 0.4rem 0 1rem; }
.tier { position: relative; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; background: var(--surface); display: flex; flex-direction: column; gap: 0.3rem; }
.tier.current { background: var(--tint); }
.tier-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.tier-price { font-family: var(--display); font-size: 1.7rem; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.tier-price small { font-size: 0.85rem; font-weight: 500; color: var(--ink-3); }
.tier form { margin-top: auto; padding-top: 0.6rem; }
.tier .small { font-size: 0.85rem; }

/* ==============================================================   Signed-in app shell (Sep 2026): sidebar on desktop, compact top bar,
   drawer and bottom bar on phones. Same ink, paper and accent as before.
   ===================================================================== */

.skip {
  position: absolute; left: 0.75rem; top: -3rem; z-index: 100;
  background: var(--accent); color: #fff; padding: 0.5rem 0.9rem; border-radius: var(--radius-sm);
  font-weight: 600; transition: top 0.15s var(--ease);
}
.skip:focus { top: 0.75rem; color: #fff; text-decoration: none; }
main:focus { outline: none; }

.i { width: 1.15rem; height: 1.15rem; flex: none; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

body.in-app { display: block; }
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh;
  background: linear-gradient(to right, var(--dark) 248px, transparent 248px); }
.app-main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.app-main main.wrap { flex: 1; padding-top: 1.4rem; }

.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--dark); color: var(--dark-text);
  display: flex; flex-direction: column; gap: 0.9rem;
  padding: 1rem 0.85rem 1.1rem; border-right: 1px solid var(--dark-line-soft);
}
.sidebar .logo { padding: 0.35rem 0.5rem 0.2rem; }
.side-nav { display: flex; flex-direction: column; gap: 0.1rem; }
.side-nav a {
  display: flex; align-items: center; gap: 0.7rem;
  color: var(--dark-text); padding: 0.5rem 0.65rem; border-radius: var(--radius-sm);
  font-weight: 520; font-size: 0.92rem;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.side-nav a .i { opacity: 0.8; }
.side-nav a:hover { background: var(--dark-line-soft); color: #fff; text-decoration: none; }
.side-nav a.active { background: var(--dark-line); color: #fff; box-shadow: inset 3px 0 0 var(--accent-on-dark); }
.side-nav a.active .i { opacity: 1; color: var(--accent-on-dark); }
.side-foot { margin-top: auto; padding-top: 0.8rem; border-top: 1px solid var(--dark-line-soft); }
.sidebar :focus-visible, .topbar :focus-visible, .drawer-panel :focus-visible, .bottom-nav :focus-visible { outline-color: var(--accent-on-dark); }

/* <details> menus: open and close with no JavaScript at all. */
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-panel {
  position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; min-width: 15rem; max-width: 20rem;
  background: var(--surface); color: var(--ink-2); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 0.4rem;
}
.menu-panel.menu-right { left: auto; right: 0; }
.menu-panel form { margin: 0; }
.menu-panel hr { border: 0; border-top: 1px solid var(--line-soft); margin: 0.35rem 0; }
.menu-label { font-size: 0.72rem; font-weight: 650; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--ink-3); padding: 0.35rem 0.6rem 0.15rem; }
.menu-text { padding: 0.15rem 0.6rem 0.35rem; font-size: 0.88rem; color: var(--ink); word-break: break-all; }
.menu-item {
  display: flex; justify-content: space-between; gap: 0.6rem; width: 100%; text-align: left;
  padding: 0.5rem 0.6rem; border-radius: 7px; border: 0; background: none; font: inherit;
  font-size: 0.9rem; color: var(--ink); cursor: pointer;
}
.menu-item:hover { background: var(--tint); text-decoration: none; color: var(--ink); }

.company-menu > summary {
  display: flex; flex-direction: column; gap: 0.05rem;
  background: var(--dark-line-soft); border: 1px solid var(--dark-line);
  border-radius: var(--radius-sm); padding: 0.5rem 2rem 0.5rem 0.7rem; position: relative;
}
.company-menu > summary::after { content: ""; position: absolute; right: 0.8rem; top: 45%; width: 0.4rem; height: 0.4rem;
  border-right: 1.5px solid var(--dark-muted); border-bottom: 1.5px solid var(--dark-muted); transform: translateY(-50%) rotate(45deg); }
.company-menu > summary:hover { border-color: rgba(255, 255, 255, 0.25); }
.company-name { color: #fff; font-weight: 650; font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.company-role { color: var(--dark-muted); font-size: 0.76rem; }
.sidebar .company-menu .menu-panel { width: 100%; min-width: 0; max-width: none; }

.topbar {
  position: sticky; top: 0; z-index: 30; height: 56px;
  display: flex; align-items: center; gap: 0.75rem; padding: 0 1.25rem;
  background: rgba(246, 245, 241, 0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-logo, .topbar-company, .menu-drawer { display: none; }
.topbar-tools { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; }
.bell { position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%; color: var(--ink-2); }
.bell:hover { background: var(--line-soft); color: var(--ink); text-decoration: none; }
.bell .i { width: 1.3rem; height: 1.3rem; }
.badge { position: absolute; top: 2px; right: 0; min-width: 1.15rem; height: 1.15rem; padding: 0 0.3rem;
  border-radius: 999px; background: var(--danger-ink); color: #fff; font-size: 0.68rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.user-menu > summary { display: flex; align-items: center; gap: 0.5rem; padding: 0.25rem 0.5rem 0.25rem 0.25rem;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.user-menu > summary:hover { border-color: var(--line-strong); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--dark); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; }
.user-email { font-size: 0.86rem; color: var(--ink-2); max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.bottom-nav { display: none; }

/* Tablets and phones: the sidebar folds into a drawer behind "Menu". */
@media (max-width: 1023px) {
  .shell { display: block; background: none; }
  .sidebar { display: none; }
  .topbar { background: var(--dark); color: var(--dark-text); border-bottom-color: var(--dark-line-soft); padding: 0 0.75rem 0 1rem; backdrop-filter: none; }
  .topbar-logo { display: inline-flex; }
  .topbar-company { display: block; color: #fff; font-weight: 650; font-size: 0.95rem; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bell { color: var(--dark-text); }
  .bell:hover { background: var(--dark-line-soft); color: #fff; }
  .user-menu { display: none; }
  .menu-drawer { display: block; }
  .menu-drawer > summary { display: inline-flex; align-items: center; gap: 0.35rem; color: #fff;
    padding: 0.4rem 0.6rem; border-radius: var(--radius-sm); border: 1px solid var(--dark-line); font-size: 0.88rem; font-weight: 600; }
  .menu-drawer[open] > summary { background: var(--dark-line); }
  .drawer-panel {
    position: fixed; top: 56px; left: 0; right: 0; bottom: 0; z-index: 50; overflow-y: auto;
    background: var(--dark); color: var(--dark-text); padding: 0.9rem 1rem 6rem;
    display: flex; flex-direction: column; gap: 0.9rem; border-top: 1px solid var(--dark-line-soft);
  }
  .drawer-panel .side-nav a { padding: 0.7rem 0.7rem; font-size: 1rem; }
  .drawer-panel .company-menu .menu-panel { position: static; margin-top: 0.4rem; width: 100%; max-width: none; }
  .drawer-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap;
    border-top: 1px solid var(--dark-line-soft); padding-top: 0.9rem; }
  .drawer-foot .muted { color: var(--dark-muted); word-break: break-all; }
  .drawer-foot .btn.secondary { background: transparent; color: var(--dark-text); border-color: var(--dark-line); }
  body.in-app { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 16px -8px rgba(11, 16, 32, 0.15);
  }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.15rem;
    height: 60px; color: var(--ink-3); font-size: 0.72rem; font-weight: 600; }
  .bottom-nav a .i { width: 1.35rem; height: 1.35rem; }
  .bottom-nav a.active { color: var(--accent); }
  .bottom-nav a:hover { text-decoration: none; color: var(--ink); }
  footer.app { margin-top: 1rem; }
}

@media (max-width: 720px) {
  main.wrap { padding: 1.1rem 1rem 3rem; }
  h1 { font-size: 1.55rem; }
  .card { padding: 1.1rem 1rem; }
  .statgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
  .stat { padding: 0.8rem 0.9rem; }
  .stat .value { font-size: 1.35rem; }
  /* A table that is wider than the phone scrolls inside its card; the page
     itself never scrolls sideways. */
  main table { display: block; overflow-x: auto; max-width: 100%; position: relative; }
  main .table-scroll table { display: table; }
  table.nutrition { display: table; }
  code { word-break: break-all; }
  pre { white-space: pre-wrap; word-break: break-all; }
  .user-email { display: none; }
}

/* ---------- Page furniture ---------- */

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 0.8rem 1.2rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1 { margin-bottom: 0.2rem; }
.page-head .actions { margin: 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.3rem; padding: 0; margin: 0 0 0.6rem; font-size: 0.85rem; }
.crumbs li + li::before { content: "›"; color: var(--ink-3); margin-right: 0.3rem; }
.crumbs span { color: var(--ink-3); }

.toolbar { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: flex-end; margin: 0 0 1rem; }
.toolbar > input[type=search] { flex: 1 1 16rem; width: auto; max-width: none; }
.toolbar .field input[type=search] { width: 100%; max-width: none; }
.toolbar .field.grow { flex: 1 1 16rem; }
@media (max-width: 720px) {
  .toolbar { display: grid; grid-template-columns: 1fr 1fr; }
  .toolbar .field.grow, .toolbar > input[type=search] { grid-column: 1 / -1; }
  .toolbar .field select { width: 100%; max-width: none; }
}
.toolbar select { width: auto; max-width: 14rem; flex: 0 1 auto; }
.toolbar .field { display: flex; flex-direction: column; gap: 0.25rem; }
.toolbar .field label { margin: 0; font-size: 0.78rem; color: var(--ink-3); }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1rem; }
.chip { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.3rem 0.75rem; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); font-size: 0.84rem; color: var(--ink-2); font-weight: 550; }
.chip:hover { text-decoration: none; border-color: var(--ink-3); color: var(--ink); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-top: 1rem; }
.pager-links { display: flex; align-items: center; gap: 0.6rem; }
th a.sort { color: inherit; }
th a.sort:hover { color: var(--ink); text-decoration: none; }
th a.sort.active { color: var(--ink); }
.bulkbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0.6rem 0.8rem; margin-bottom: 0.8rem;
  background: var(--tint); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); font-size: 0.88rem; }
.bulkbar select { width: auto; max-width: 16rem; padding: 0.42rem 0.6rem; }
.bulkbar .btn { padding: 0.42rem 0.85rem; font-size: 0.86rem; }
td.check, th.check { width: 2.2rem; }
input[type=checkbox] { width: 1rem; height: 1rem; accent-color: var(--ink); }

.product-cell { display: flex; flex-direction: column; gap: 0.1rem; min-width: 12rem; }
.product-cell .muted { font-size: 0.82rem; }
tr.recalled td { background: #fff7f6; }

.action-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.4rem 0 1.2rem; }
.action-row .btn { padding: 0.48rem 0.95rem; font-size: 0.88rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 1.15rem; align-items: start; }
.grid-2 > .card { margin-bottom: 0; }
.stack > * + * { margin-top: 1.15rem; }

/* ---------- Home ---------- */

.attention { list-style: none; padding: 0; margin: 0; }
.attention li { display: flex; align-items: flex-start; gap: 0.7rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line-soft); }
.attention li:last-child { border-bottom: 0; }
.attention .dot { flex: none; width: 0.6rem; height: 0.6rem; border-radius: 50%; margin-top: 0.45rem; background: var(--accent); }
.attention .dot.error { background: var(--danger-ink); }
.attention .dot.warning { background: var(--warn-ink); }
.attention .text { flex: 1; min-width: 0; }
.attention a { white-space: nowrap; font-weight: 600; font-size: 0.88rem; }
.all-clear { display: flex; gap: 0.6rem; align-items: center; color: var(--good-ink); font-weight: 600; }

.meter { height: 8px; border-radius: 999px; background: var(--line-soft); overflow: hidden; margin: 0.5rem 0 0.35rem; }
.meter > span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.meter.full > span { background: var(--warn-ink); }

.checklist { list-style: none; padding: 0; margin: 0.4rem 0 0; }
.checklist li { display: flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0; }
.checklist .tick { flex: none; width: 1.35rem; height: 1.35rem; border-radius: 50%; border: 1.5px solid var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; }
.checklist .done .tick { background: var(--good-ink); border-color: var(--good-ink); color: #fff; }
.checklist .done .tick .i { width: 0.85rem; height: 0.85rem; stroke-width: 2.4; }
.checklist .done span.label { color: var(--ink-3); text-decoration: line-through; }

.activity { list-style: none; padding: 0; margin: 0; }
.activity li { padding: 0.55rem 0; border-bottom: 1px solid var(--line-soft); font-size: 0.9rem; }
.activity li:last-child { border-bottom: 0; }

/* ---------- Charts (server-drawn SVG, no JavaScript) ---------- */

.trend { width: 100%; height: 140px; display: block; }
.trend polyline { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.trend .area { fill: var(--accent-weak); stroke: none; }
.spark { width: 120px; height: 28px; display: block; }
.spark polyline { fill: none; stroke: var(--accent); stroke-width: 1.6; }
.bars { list-style: none; padding: 0; margin: 0; }
.bars li { display: grid; grid-template-columns: minmax(0, 9rem) 1fr auto; gap: 0.7rem; align-items: center; padding: 0.35rem 0; font-size: 0.9rem; }
.bars .bar { height: 10px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.bars .bar > span { display: block; height: 100%; background: var(--accent); }
.range { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.range a { padding: 0.42rem 0.85rem; font-size: 0.86rem; color: var(--ink-2); font-weight: 600; }
.range a + a { border-left: 1px solid var(--line-strong); }
.range a.active { background: var(--ink); color: #fff; }
.range a:hover { text-decoration: none; }

/* ---------- Product page ---------- */

.recall-preview { border: 1px solid #f7c4bf; background: var(--danger-bg); border-radius: var(--radius-sm); padding: 0.9rem 1rem; margin: 0.6rem 0; }
.recall-preview .t { display: block; font-weight: 700; color: var(--danger-ink); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.78rem; }
.recall-preview p { margin: 0.35rem 0; color: var(--ink); }
.recall-preview a { color: var(--danger-ink); }
.confirm { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 500; margin: 1rem 0; }
.confirm input { margin-top: 0.2rem; }

.section-nav { display: flex; gap: 0.3rem; flex-wrap: wrap; margin: 0 0 1rem; padding: 0.3rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm); position: sticky; top: 64px; z-index: 5; }
.section-nav a { padding: 0.38rem 0.75rem; border-radius: 7px; font-size: 0.86rem; font-weight: 600; color: var(--ink-2); }
.section-nav a:hover { background: var(--tint); text-decoration: none; color: var(--ink); }
.form-section { scroll-margin-top: 130px; }
.form-section + .form-section { border-top: 1px solid var(--line-soft); margin-top: 1.6rem; padding-top: 0.4rem; }
.sticky-actions { position: sticky; bottom: 0; z-index: 6; display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.96); border-top: 1px solid var(--line); margin: 1.4rem -1.6rem -1.5rem;
  padding: 0.8rem 1.6rem; border-radius: 0 0 var(--radius) var(--radius); }
@media (max-width: 1023px) { .section-nav { top: 60px; } .sticky-actions { bottom: calc(60px + env(safe-area-inset-bottom)); } }
@media (max-width: 720px) { .sticky-actions { margin: 1.2rem -1rem -1.1rem; padding: 0.7rem 1rem; } }

.qr-panel { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.2rem; align-items: start; }
@media (max-width: 720px) { .qr-panel { grid-template-columns: 1fr; } }
.qr-panel form { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: flex-end; }
.qr-panel form select { width: auto; max-width: 18rem; }
.qr-panel form .field { display: flex; flex-direction: column; }
.qr-panel form .field label { margin: 0 0 0.3rem; }
.uri { word-break: break-all; }

/* ---------- Secrets shown once, copy buttons ---------- */

pre.codes, .secret {
  font-family: var(--mono); font-size: 0.9rem; background: var(--tint); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 0.8rem 1rem; white-space: pre-wrap; word-break: break-all; margin: 0.6rem 0;
}
.copy-row { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.copy-row .secret { flex: 1 1 18rem; margin: 0; }
.copy-btn[hidden] { display: none; }
.copy-btn.copied { color: var(--good-ink); border-color: var(--good-ink); }

/* ---------- Team ---------- */

.role-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 0.6rem; margin: 0.4rem 0 0; }
.role-grid div { border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 0.6rem 0.8rem; background: var(--tint); font-size: 0.88rem; }
.role-grid strong { display: block; }

/* ---------- Help and errors in the app ---------- */

.help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 1.15rem; margin-bottom: 1.15rem; }
.help-grid > .card { margin: 0; }
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li { padding: 0.5rem 0; border-bottom: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 0.1rem; }
.link-list li:last-child { border-bottom: 0; }
.link-list .muted { font-size: 0.85rem; }
.prose { max-width: 48rem; }
.prose h2 { margin-top: 1.8rem; }
.prose p, .prose li { color: var(--ink-2); }
.prose .lead { font-size: 1.05rem; color: var(--ink-3); }
.prose img { max-width: 100%; height: auto; }
.prose pre { overflow-x: auto; background: var(--tint); padding: 0.8rem; border-radius: var(--radius-sm); }
.prose table { margin: 1rem 0; }
.error-page { max-width: 40rem; margin: 2rem auto; }
.error-detail { font-weight: 600; color: var(--ink); }

/* ---------- Account sections ---------- */

.subnav { display: flex; gap: 0.3rem; flex-wrap: wrap; margin: 0 0 1.2rem; border-bottom: 1px solid var(--line); }
.subnav a { padding: 0.5rem 0.8rem; font-weight: 600; font-size: 0.9rem; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subnav a:hover { color: var(--ink); text-decoration: none; border-bottom-color: var(--line-strong); }
.section-title { font-family: var(--mono); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.11em; text-transform: uppercase;
  color: var(--ink-3); margin: 1.8rem 0 0.7rem; scroll-margin-top: 80px; }
/* Billing trouble (danger flash) and the app-wide billing banner. */
.flash.danger { background: var(--danger-bg); color: var(--danger-ink); border-color: rgba(180, 35, 24, 0.25); }
.flash.billing-notice a { color: inherit; font-weight: 650; text-decoration: underline; margin-left: 0.25rem; }
/* Console announcements (C-19) */
.flash.announcement.warning { background: var(--warn-bg); color: var(--warn-ink); border-color: rgba(181, 71, 8, 0.3); }
.flash.announcement strong { margin-right: 0.35rem; }

/* ---------- Account: email preferences and sessions (U-15, U-22) ---------- */
.prefs { border: 0; padding: 0; margin: 0; }
.prefs .check { display: grid; grid-template-columns: 1.4rem 1fr; column-gap: 0.5rem; align-items: start; margin: 0.7rem 0; }
.prefs .check input { margin-top: 0.2rem; }
.prefs .check label { margin: 0; }
.prefs .check p { grid-column: 2; margin: 0.15rem 0 0; font-size: 0.88rem; }
table.sessions tr.current td { background: var(--tint); }
table.sessions form { margin: 0; }
.activity li.unread { font-weight: 600; }
.activity .new { margin-left: 0.3rem; }
.bell .dot-new { position: absolute; top: 4px; left: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent, #2563eb); }

/* ---------- API docs inside the app shell (U-25) ---------- */
.api-docs { max-width: none; }
.api-docs .compare-wrap { overflow-x: auto; margin: 1rem 0; }
.api-docs .compare { min-width: 36rem; }
.api-docs pre { white-space: pre; }

/* Sign-up, join and the Terms gate: the CPA s49 notice is drawn to attention
   as a visible paragraph, not small print. */
.terms-notice { margin: 1rem 0 0.2rem; padding: 0.7rem 0.9rem; border-left: 3px solid var(--accent, #2457f5);
  background: rgba(36, 87, 245, 0.06); border-radius: 6px; font-size: 0.9rem; line-height: 1.5; }
.accept-changes { margin: 0.3rem 0 0.9rem; padding-left: 1.2rem; }
.accept-changes li { margin: 0.3rem 0; }

/* ---------- Account deletion and ownership transfer ---------- */
.delete-plan { list-style: none; padding: 0; margin: 0.6rem 0 1rem; }
.delete-plan-item { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.7rem 0.9rem; margin: 0.6rem 0; }
.delete-plan-item[data-delete-kind="erase"] { border-color: #f7c4bf; background: var(--danger-bg); }
.delete-plan-item p { margin: 0.4rem 0 0; }
.delete-plan-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.delete-warning { color: var(--danger-ink); }
.delete-transfer { display: flex; align-items: flex-end; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.5rem; }
.delete-transfer label { flex-basis: 100%; margin: 0; }
.delete-transfer select { flex: 1 1 14rem; width: auto; }
.delete-list { padding-left: 1.2rem; }
.delete-list li { margin: 0.35rem 0; }
.delete-confirm { border-color: #f7c4bf; }
.transfer-choices label.choice { display: flex; gap: 0.5rem; align-items: flex-start; font-weight: 500; }
.transfer-choices label.choice input { width: auto; margin-top: 0.2rem; }

/* Product photo on the product form: the current photo, then the upload. */
.photo-preview { display: block; max-width: 220px; max-height: 220px; object-fit: contain;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); margin: 0.35rem 0 0.6rem; }
.photo-link { margin: 0.6rem 0 0.4rem; }

/* E-label nutrition: number box with its unit fixed beside it, energy as kJ + kcal,
   and required-but-empty boxes marked (owner idea + QA p04, 1 Nov 2026). */
.unit-pair { display: flex; flex-wrap: wrap; gap: 8px; }
.unit-input { display: inline-flex; align-items: center; gap: 6px; }
.unit-input input { width: 7.5em; max-width: 100%; }
.unit-input .unit { color: var(--ink-3); font-size: 0.9rem; min-width: 2.2em; }
.is-missing, .is-missing-row input { border-color: var(--warn-ink) !important; background: var(--warn-bg); }
.req-note { display: block; margin: 2px 0 0; color: var(--warn-ink); font-size: 0.8rem; font-weight: 600; }
