/* Olive - one stylesheet, no external libraries. The fonts ship with the app (fonts/, SIL Open Font License):
   Figtree for text, Plus Jakarta Sans for headings - the brand's fonts across app, website and marketing (24 Nov 2026).
   Colours are tokens; dark mode follows the system. */
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("fonts/figtree-var-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/plus-jakarta-sans-var-latin.woff2") format("woff2");
}
:root {
  --bg: #f6f6f1;
  --panel: #ffffff;
  --ink: #1f2a1c;
  --ink-2: #4b5747;
  --ink-3: #7b8577;
  --line: #e4e6dd;
  --line-strong: #cfd3c6;
  --accent: #557528;
  --accent-2: #46631f;
  --accent-ink: #ffffff;
  --accent-soft: #eaf1dc;
  --warn: #9a6a00;
  --warn-soft: #fbf1d6;
  --bad: #a93a2c;
  --bad-soft: #f9e3df;
  --good: #2f7a45;
  --good-soft: #dff2e4;
  --quiet-soft: #eeefea;
  --side: #20301b;
  --side-ink: #dfe8d2;
  --side-ink-2: #a9b89a;
  --radius: 12px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(31,42,28,.06);
  --shadow: 0 1px 2px rgba(31,42,28,.05), 0 4px 14px -4px rgba(31,42,28,.08);
  --shadow-lg: 0 2px 4px rgba(31,42,28,.06), 0 12px 28px -8px rgba(31,42,28,.16);
  --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
  --chart-a: #557528;   /* chart series, checked for colour blindness (dataviz validator) */
  --chart-b: #2f78c0;
  --display: "Plus Jakarta Sans", var(--font);
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141912;
    --panel: #1c2319;
    --ink: #e7ecdf;
    --ink-2: #b9c3ae;
    --ink-3: #8a957f;
    --line: #2e3829;
    --line-strong: #3d4a36;
    --accent: #9cc25a;
    --accent-2: #b3d47a;
    --chart-a: #759c3a;
    --chart-b: #4f95dc;
    --accent-ink: #13200b;
    --accent-soft: #2a3a1b;
    --warn: #e5b44a;
    --warn-soft: #3a2f14;
    --bad: #f08a7b;
    --bad-soft: #3d201b;
    --good: #7fd197;
    --good-soft: #1b3324;
    --quiet-soft: #252c22;
    --side: #0f140d;
    --side-ink: #dfe8d2;
    --side-ink-2: #8fa080;
    --shadow-sm: none;
    --shadow: 0 1px 0 rgba(255,255,255,.03) inset;
    --shadow-lg: 0 12px 28px -8px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 var(--font);
  font-feature-settings: "cv11", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
::selection { background: color-mix(in srgb, var(--accent) 25%, transparent); }
a:focus-visible, button:focus-visible, summary:focus-visible, .btn:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-2); }
h1, h2, h3 { font-family: var(--display); }
h1 { font-size: 1.75rem; font-weight: 700; line-height: 1.2; margin: 0 0 .35rem; letter-spacing: -.022em; }
h2 { font-size: 1.12rem; font-weight: 650; line-height: 1.3; margin: 0 0 .8rem; letter-spacing: -.012em; }
h3 { font-size: .97rem; font-weight: 620; margin: 1.1rem 0 .45rem; letter-spacing: -.005em; }
p { margin: .4rem 0 .8rem; }
.lead { color: var(--ink-2); font-size: 1rem; margin-bottom: 1.5rem; max-width: 46rem; }
.muted { color: var(--ink-3); }
.small { font-size: .85rem; }
.mono, pre, code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .85rem; }
pre { white-space: pre-wrap; word-break: break-word; margin: 0; }
.hidden { display: none !important; }
.center { text-align: center; }
tr.sel td { background: var(--accent-soft); }

/* ---------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.side {
  background: linear-gradient(180deg, color-mix(in srgb, var(--side) 88%, #4a6b2a) 0%, var(--side) 55%);
  color: var(--side-ink);
  padding: 1.35rem 1rem; display: flex; flex-direction: column; gap: .75rem;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: .55rem; font-family: var(--display); font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; color: inherit; text-decoration: none; }
.brand.big { font-size: 1.6rem; justify-content: center; margin-bottom: 1rem; color: var(--ink); }
/* the logo: the app's own icon, as on a phone's home screen (side menu, sign-in, Ask Olive button) */
.leaf { display: inline-block; flex: none; width: 22px; height: 22px; background: url(/icons/icon-192.png) center/cover; border-radius: 6px; }
.brand .leaf { width: 26px; height: 26px; }
/* on dark green the bare leaf (the icon tile's own green blends in); on light backgrounds and as an app icon, the tile */
.side .leaf, .ask-fab .leaf { background: url(/icons/leaf.svg) center/contain no-repeat; border-radius: 0; }
.shop-name { color: var(--side-ink-2); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav { display: flex; flex-direction: column; gap: 2px; margin-top: .5rem; }
.nav-link { color: var(--side-ink); text-decoration: none; padding: .52rem .75rem; border-radius: 9px; display: flex; align-items: center; justify-content: space-between; font-weight: 500; font-size: .94rem; transition: background .15s, color .15s; }
.nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-link.on { background: rgba(156,194,90,.17); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 #9cc25a; }
.admin-link { margin-top: .75rem; border-top: 1px solid rgba(255,255,255,.08); padding-top: .75rem; }
.badge { background: #e5b44a; color: #20301b; border-radius: 999px; padding: .05rem .5rem; font-size: .72rem; font-weight: 700; font-variant-numeric: tabular-nums; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.signout { margin-top: auto; display: flex; flex-direction: column; gap: .2rem; font-size: .8rem; }
.signout .who { color: var(--side-ink-2); overflow: hidden; text-overflow: ellipsis; }
.signout .link { color: var(--side-ink); }
.main { padding: 2rem 2.25rem 4rem; max-width: 1150px; width: 100%; }

.phone-bar { display: none; }
@media (max-width: 820px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side, .main { min-width: 0; }
  /* phone top bar: Olive on the left, Help and Menu on the right; the menu opens below it as big buttons */
  .side { position: sticky; top: 0; z-index: 30; height: auto; padding: .55rem 12px .55rem 16px; flex-direction: row; flex-wrap: wrap; align-items: center; gap: .5rem; }
  .shop-name { display: none; }
  .phone-bar { display: flex; gap: .4rem; margin-left: auto; }
  .phone-btn {
    display: inline-flex; align-items: center; gap: .35rem; min-height: 2.6rem; padding: .4rem .8rem; border-radius: 10px;
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); color: var(--side-ink);
    font: inherit; font-weight: 600; font-size: .92rem; text-decoration: none; cursor: pointer;
  }
  .phone-btn .ico { margin: 0; width: 18px; height: 18px; }
  .phone-btn.on, .phone-btn[aria-expanded="true"] { background: rgba(156,194,90,.25); border-color: rgba(156,194,90,.5); color: #fff; }
  .phone-btn .badge { margin-left: .1rem; }
  .side .nav, .side .signout.in-menu { display: none; }
  .side.open .nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; width: 100%; margin: .35rem 0 .2rem; }
  .side.open .nav-link { min-height: 2.9rem; padding: .55rem .8rem; background: rgba(255,255,255,.06); justify-content: flex-start; gap: .4rem; }
  .side.open .nav-link.on { box-shadow: inset 0 0 0 1px #9cc25a; }
  .side.open .signout.in-menu { display: flex; width: 100%; justify-content: space-between; align-items: center; border-top: 1px solid rgba(255,255,255,.1); padding: .6rem .2rem .2rem; }
  .side .signout .link { padding: .5rem 0; }
  .admin-link { margin: 0; border: 0; padding-top: .55rem; }
  .signout:not(.in-menu) { margin: 0 0 0 auto; flex-direction: row; align-items: center; gap: .5rem; }
  .signout .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .signout:not(.in-menu) .who { display: none; }
  /* room under the last thing on the page for the Ask Olive button */
  .main { padding: 1.1rem 16px 5.5rem; overflow-wrap: anywhere; }
  /* the rest of the phone rules are at the END of this file, so they win over the rules they change */
}
/* Phones: list tables become one card per row, each value with its column name (site.js marks them "stack") */
@media (max-width: 640px) {
  table.stack thead { display: none; }
  table.stack, table.stack tbody { display: block; width: 100%; }
  /* one card per row: the main column as its title, the other values in short labelled pieces that wrap */
  table.stack tr { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 1rem; row-gap: .2rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
  table.stack tbody tr:last-child { border-bottom: 0; }
  table.stack td { display: block; flex: 0 1 auto; max-width: 100%; min-width: 0; border: 0; padding: 0; white-space: normal !important; }
  table.stack td.ttl { flex: 1 1 100%; order: -1; font-size: 1rem; }
  table.stack td.ttl .subject, table.stack td.ttl > .cell-val:first-child { font-weight: 650; }
  table.stack td.wide { flex-basis: 100%; }
  table.stack td.lbl { display: flex; gap: .4rem; align-items: baseline; }
  table.stack td.lbl > .cell-lbl { flex: none; color: var(--ink-3); font-size: .78rem; font-weight: 650; }
  table.stack td.lbl > .cell-val { min-width: 0; }
  table.stack .rank { color: var(--ink-3); font-weight: 600; margin-right: .35rem; }
  table.stack.ask-table td.ttl { font-weight: 600; }
  table.stack td:empty, table.stack td.blank { display: none; }
  /* Stock and data, "Your data in Olive": the name, then what it is under it */
  table.needs, table.needs tbody, table.needs tr, table.needs td { display: block; width: 100%; }
  table.needs tr { padding: .6rem 0; border-bottom: 1px solid var(--line); }
  table.needs td { border: 0; padding: .1rem 0; }
  table.needs td:first-child { font-weight: 600; }
  .table-wrap:has(> table.needs) { overflow-x: visible; }
  table.stack tbody tr:hover td { background: none; }
  .table-wrap:has(> table.stack) { overflow-x: visible; }
}

/* ---------------------------------------------------------------- blocks */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.5rem; box-shadow: var(--shadow); margin-bottom: 1.25rem;
}
.card.narrow { max-width: 420px; margin: 8vh auto; }
body.plain { padding: 0 16px; }
.grid { display: grid; gap: 1rem; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid.three, .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid.two, .grid.three, .grid.four { grid-template-columns: 1fr; } }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: .75rem; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head .lead { margin-bottom: 0; }

.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.15rem; box-shadow: var(--shadow); text-decoration: none; color: inherit; display: block; transition: border-color .15s, box-shadow .15s, transform .15s; }
.stat .num { font-size: 1.9rem; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .lbl { color: var(--ink-2); font-size: .85rem; }
a.stat:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.stat.attn .num { color: var(--warn); }

.flash { border-radius: var(--radius); padding: .7rem 1rem; margin-bottom: 1rem; border: 1px solid transparent; }
.flash.ok { background: var(--good-soft); color: var(--good); border-color: color-mix(in srgb, var(--good) 25%, transparent); }
.flash.bad { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.flash.warn { background: var(--warn-soft); color: var(--warn); }
.note { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 14%, transparent); border-radius: var(--radius); padding: .8rem 1.05rem; color: var(--ink); }
.note h3:first-child { margin-top: .1rem; }
.note.warn { background: var(--warn-soft); }

/* ---------------------------------------------------------------- forms */
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
.hint { font-weight: 400; color: var(--ink-3); font-size: .82rem; display: block; margin-top: .15rem; }
input[type=text], input[type=search], input[type=email], input[type=password], input[type=url], input[type=number], input[type=time], select, textarea {
  width: 100%; padding: .58rem .75rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--panel); color: var(--ink); font: inherit; box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}
input[type=text]:hover, input[type=search]:hover, input[type=email]:hover, input[type=password]:hover, input[type=url]:hover, input[type=number]:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--ink-3) 70%, var(--line-strong)); }
::placeholder { color: var(--ink-3); opacity: .8; }
input[type=file] { font: inherit; font-size: .9rem; color: var(--ink-2); }
input[type=file]::file-selector-button {
  font: inherit; font-weight: 600; font-size: .88rem; margin-right: .75rem; padding: .45rem .9rem; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--panel); color: var(--ink); box-shadow: var(--shadow-sm);
}
input[type=file]::file-selector-button:hover { background: var(--quiet-soft); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 1rem; height: 1rem; }
textarea { min-height: 7rem; resize: vertical; line-height: 1.45; }
textarea.reply { min-height: 16rem; }
input:focus, select:focus, textarea:focus { outline: none; box-shadow: var(--ring); border-color: var(--accent); }
.field { margin-bottom: 1rem; }
.check { display: flex; gap: .5rem; align-items: flex-start; font-weight: 400; }
.check input { margin-top: .25rem; }
.choices { display: grid; gap: .5rem; }
.choice { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: .8rem .95rem; display: flex; gap: .65rem; align-items: flex-start; font-weight: 400; cursor: pointer; background: var(--panel); transition: border-color .15s, background .15s, box-shadow .15s; }
.choice:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line-strong)); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.choice strong { display: block; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 2.4rem;
  border: 1px solid var(--line-strong); background: var(--panel); color: var(--ink);
  padding: .5rem 1.05rem; border-radius: var(--radius-sm); font: inherit; font-size: .93rem; font-weight: 600; letter-spacing: -.005em;
  cursor: pointer; text-decoration: none; line-height: 1.2; white-space: nowrap;
  box-shadow: var(--shadow-sm), inset 0 -1px 0 rgba(0,0,0,.04);
  transition: background .15s, border-color .15s, box-shadow .15s, transform .05s, color .15s;
}
.btn:hover { background: color-mix(in srgb, var(--quiet-soft) 70%, var(--panel)); border-color: color-mix(in srgb, var(--ink-3) 55%, var(--line-strong)); color: var(--ink); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn.primary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, #fff) 0%, var(--accent) 100%);
  border-color: color-mix(in srgb, var(--accent) 85%, #000); color: var(--accent-ink);
  box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 4px 12px -4px color-mix(in srgb, var(--accent) 60%, transparent), inset 0 1px 0 rgba(255,255,255,.18);
}
.btn.primary:hover { background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 100%); color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 75%, #000); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 45%, var(--line-strong)); color: var(--bad); }
.btn.small { min-height: 2rem; padding: .32rem .75rem; font-size: .84rem; border-radius: 8px; }
.btn[disabled], .btn[disabled]:hover { opacity: .5; cursor: default; transform: none; filter: none; }
button.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; text-align: left; }
button.link:hover { color: var(--accent-2); }

/* ---------------------------------------------------------------- tables and lists */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: .62rem .65rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 650; border-bottom-color: var(--line-strong); }
tbody tr { transition: background .12s; }
tbody tr:hover td { background: color-mix(in srgb, var(--quiet-soft) 55%, transparent); }
tbody tr:last-child td { border-bottom: 0; }
tr.link-row { cursor: pointer; }
tr.link-row:hover td { background: var(--accent-soft); }
td a.row-link { color: inherit; text-decoration: none; display: block; }
.subject { font-weight: 600; }
.clip { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.chip { display: inline-block; border-radius: 999px; padding: .12rem .62rem; font-size: .76rem; font-weight: 600; white-space: nowrap; letter-spacing: .005em; box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 16%, transparent); }
.chip.ready { background: var(--accent-soft); color: var(--accent); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.quiet { background: var(--quiet-soft); color: var(--ink-3); }
.chip.done { background: var(--good-soft); color: var(--good); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }

.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; overflow-x: auto; }
.tab { padding: .6rem .9rem; text-decoration: none; color: var(--ink-2); border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 500; transition: color .15s, border-color .15s; }
.tab:hover { color: var(--ink); border-color: var(--line-strong); }
.tab.on { color: var(--ink); border-color: var(--accent); font-weight: 650; }
.tab .count { color: var(--ink-3); font-weight: 400; margin-left: .2rem; }

.checks { list-style: none; padding: 0; margin: 0; }
.checks li { display: grid; grid-template-columns: 1.6rem 1fr auto; gap: .5rem; padding: .7rem 0; border-bottom: 1px solid var(--line); align-items: start; }
.checks li:last-child { border-bottom: 0; }
.dot { width: 1.1rem; height: 1.1rem; border-radius: 50%; margin-top: .15rem; }
.dot.ok { background: var(--good); }
.dot.warn { background: var(--warn); }
.dot.bad { background: var(--bad); }
.dot.quiet { background: var(--ink-3); }

.steps { display: flex; gap: .4rem; margin-bottom: 1.5rem; flex-wrap: wrap; counter-reset: s; }
.step { flex: 1 1 120px; padding: .55rem .75rem; border-radius: var(--radius-sm); font-weight: 500; background: var(--quiet-soft); color: var(--ink-3); font-size: .85rem; text-decoration: none; }
.step.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.step.done { background: var(--accent-soft); color: var(--accent); }

.msg { background: var(--quiet-soft); border-radius: var(--radius); padding: 1rem; white-space: pre-wrap; word-break: break-word; max-height: 28rem; overflow: auto; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; font-size: .9rem; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; }
details > summary { cursor: pointer; color: var(--ink-2); font-weight: 600; margin: .5rem 0; }
details.card > summary { list-style: none; display: flex; align-items: baseline; gap: .55rem; flex-wrap: wrap; margin: 0; color: var(--ink); }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::before {
  content: ""; flex: none; width: .5rem; height: .5rem; margin-right: .1rem; align-self: center;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(-45deg); transition: transform .15s;
}
details.card[open] > summary::before { transform: rotate(45deg); }
details.card > summary strong { font-size: 1.05rem; font-weight: 650; letter-spacing: -.01em; }
details.card[open] > summary { margin-bottom: 1rem; }
details.card:not([open]):hover { border-color: var(--line-strong); }
.live { display: flex; gap: .6rem; align-items: center; }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; color: var(--ink-3); padding: 2.5rem 1rem; }
.pager { display: flex; gap: .5rem; justify-content: center; margin-top: 1rem; }

/* setup interview */
.wizard { max-width: 760px; }
.wizard h2 + .choices, .wizard h2 + p + .choices { margin-bottom: 1.25rem; }
.wizard h2:not(:first-child) { margin-top: 1.5rem; }
.wizard .row.between { margin-top: 1.25rem; }
.choice.off { opacity: .55; cursor: default; }
.choice input[type=text] { margin-top: .4rem; }
.choices.inline { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.option { border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; }
.option h3 { margin-top: 0; }
details.more { margin: .75rem 0 0; }
.example { margin-top: .3rem; }
.ok-note { margin-top: 1rem; }
.btn.big { padding: .75rem 1.5rem; font-size: 1.05rem; }
.link-btn { border-color: transparent; background: none; }
.next { border-color: var(--accent); }
.next-list { margin: 0; padding-left: 1.2rem; }
.next-list li { padding: .45rem 0; }
.next-list li > span { margin-right: .75rem; }

/* mailbox reading check (Email page) */
.reading { margin-top: .35rem; }
.reading .warn-text, .warn-text { color: var(--warn); }
.reading .pre { white-space: pre-wrap; background: var(--quiet-soft); border-radius: 6px; padding: .4rem .6rem; margin-top: .2rem; max-height: 9rem; overflow: auto; }

/* PC program link code (Email page) */
.big-code { font-size: 1rem; padding: .3rem .5rem; background: var(--quiet-soft); border-radius: 6px; word-break: break-all; }
.sending { margin-top: .35rem; }

/* tasks (the Outlook-style task list) */
.steps { white-space: pre-line; margin-bottom: .75rem; }
.links { margin-bottom: .5rem; }
.late { color: var(--bad); font-weight: 600; }
.due { color: var(--warn); font-weight: 600; }
.task-msg { border-top: 1px solid var(--line); padding-top: .75rem; margin-top: .75rem; }
.task-msg:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.task-msg.on .msg { outline: 2px solid var(--accent-soft); }
.task-msg.shop { padding-left: .75rem; border-left: 3px solid var(--accent); }
.task-msg.shop .msg { max-height: 16rem; }
.order-card { border-top: 1px solid var(--line); padding: .6rem 0; }
.order-card:first-of-type { border-top: 0; padding-top: 0; }
.order-card.open { border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); border-left: 5px solid var(--warn); background: var(--warn-soft); border-radius: var(--radius); padding: .6rem .75rem; margin: .4rem 0; }
.order-lines { margin: .35rem 0 0; padding-left: 1.1rem; }
.order-customer { margin: .25rem 0 0; overflow-wrap: anywhere; }
.order-customer > * + * { margin-left: .15rem; }
.order-lines li { margin: .15rem 0; }
.order-lines li > span + span { margin-left: .4rem; }
.order-lines .ok { color: var(--good); }
/* rules page */
.rule p { margin: .2rem 0 .5rem; }
.rule-off { border-top: 1px solid var(--line); padding: .5rem 0; }
.rule-note { margin: .4rem 0 0; }
/* Ask Olive: the chat on /Ask and in the panel from the button on every page */
.ask-page { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.25rem; align-items: start; }
@media (max-width: 1000px) { .ask-page { grid-template-columns: 1fr; } }
.ask-side h3 { margin: 0 0 .5rem; font-size: 1rem; }
ul.tight { margin: .25rem 0 0; padding-left: 1.1rem; }
ul.tight li { margin: .2rem 0; }
.ask-box { display: flex; flex-direction: column; gap: .6rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.ask-page .ask-box { min-height: 60vh; }
.ask-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: .75rem; min-height: 12rem; max-height: 65vh; padding-right: .25rem; }
.ask-empty p { margin: 0 0 .4rem; }
.ask-examples { margin: 0; padding-left: 1.1rem; }
.ask-examples li { margin: .3rem 0; }
.ask-msg { max-width: 92%; border-radius: var(--radius); padding: .6rem .85rem; line-height: 1.45; overflow-wrap: anywhere; }
.ask-msg.you { align-self: flex-end; background: var(--accent-soft); }
.ask-msg.olive { align-self: flex-start; background: var(--quiet-soft); }
.ask-msg.bad { background: var(--bad-soft); color: var(--bad); }
.ask-text p { margin: 0 0 .5rem; }
.ask-text p:last-child, .ask-text ul:last-child, .ask-text ol:last-child { margin-bottom: 0; }
.ask-text ul, .ask-text ol { margin: .2rem 0 .5rem; padding-left: 1.2rem; }
.ask-text li { margin: .15rem 0; }
.ask-table { margin: .3rem 0 .6rem; font-size: .88rem; background: var(--panel); border-radius: 6px; }
.ask-table th, .ask-table td { padding: .35rem .5rem; }
.ask-meta { margin-top: .35rem; font-size: .75rem; color: var(--ink-3); }
.ask-files { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 .2rem; }
.ask-file .muted { font-weight: 400; }
.ask-changes { margin-top: .5rem; padding-top: .5rem; border-top: 1px solid var(--line); }
.ask-changes .row { gap: .5rem; align-items: center; margin-top: .4rem; }
.ask-changes .new { font-weight: 600; }
.ask-step { display: flex; gap: .5rem; align-items: center; color: var(--ink-2); font-size: .9rem; }
.ask-form textarea { min-height: 3.2rem; width: 100%; }
.ask-form .row { margin-top: .4rem; }
.ask-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 40; display: inline-flex; align-items: center; gap: .45rem;
  background: var(--side); color: var(--side-ink); border: 0; border-radius: 999px; padding: .65rem 1.05rem;
  font: inherit; font-weight: 600; cursor: pointer; box-shadow: 0 4px 16px rgba(0,0,0,.18);
}
.ask-fab .leaf { width: 20px; height: 20px; border-radius: 5px; }
.ask-fab:hover { filter: brightness(1.15); }
.ask-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 41; width: min(440px, calc(100vw - 32px));
  height: min(640px, calc(100vh - 40px)); height: min(640px, calc(100dvh - 40px));
  display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,.22);
}
.ask-float.hidden { display: none; }
.ask-head { display: flex; justify-content: space-between; align-items: center; padding: .7rem 1rem; border-bottom: 1px solid var(--line); }
.ask-float .ask-box { flex: 1; min-height: 0; border: 0; box-shadow: none; border-radius: 0 0 var(--radius) var(--radius); }
.ask-float .ask-log { max-height: none; min-height: 0; }
@media (max-width: 600px) {
  .ask-fab { right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); }
  /* pinned to the visible screen from top and bottom: a height of 100vh is taller than what an iPhone shows
     (it counts the space behind Safari's bars), which pushed the top and its Close button under the status bar */
  .ask-float {
    left: 10px; right: 10px; width: auto; height: auto;
    top: max(10px, env(safe-area-inset-top)); bottom: max(10px, env(safe-area-inset-bottom));
  }
  .ask-head { padding: .55rem .75rem .55rem 1rem; }
  .ask-head .link, .ask-head a { padding: .45rem .5rem; display: inline-block; }
  .ask-form textarea { font-size: 16px; min-height: 4.9rem; }   /* smaller text makes an iPhone zoom the page when you tap the box */
  /* Ask page: the chat fills the screen under the top bar, the box to type in stays at its bottom */
  .ask-page .ask-box { height: calc(100vh - 7.5rem); height: calc(100dvh - 7.5rem); min-height: 24rem; padding: .75rem; }
  .ask-page .ask-log { max-height: none; min-height: 0; }
  .ask-msg.olive { max-width: 100%; }
  .ask-msg { padding: .6rem .75rem; }
  .ask-text { font-size: .95rem; }
  .ask-table { font-size: .85rem; }
  .ask-meta { overflow-wrap: anywhere; }
  /* home: the four counts two by two */
  .grid.tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .grid.tiles .tile { grid-template-columns: 1fr; padding: .8rem .9rem; }
  .grid.tiles .tile .tile-ico { display: none; }
}
.trial-stats { margin: 1rem 0 1.25rem; }
/* ---------------------------------------------------------------- home */
.hero {
  position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap;
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--panel) 75%);
  border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); padding: 1.6rem 1.75rem; margin-bottom: 1.25rem; box-shadow: var(--shadow);
}
.hero::after {
  content: ""; position: absolute; right: -40px; top: -50px; width: 190px; height: 190px; border-radius: 0 60% 0 60%;
  background: var(--accent); opacity: .07; transform: rotate(-12deg); pointer-events: none;
}
.hero-main { position: relative; z-index: 1; min-width: 0; flex: 1 1 260px; }
.hero-greet { color: var(--ink-2); font-size: .95rem; margin-bottom: .15rem; }
.hero h1 { font-size: 1.9rem; margin-bottom: .6rem; }
.hero-mode { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; color: var(--ink-2); font-size: .92rem; }
.mode-pill { display: inline-flex; align-items: center; gap: .4rem; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: .2rem .7rem; font-weight: 600; color: var(--ink); font-size: .85rem; }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); }
.hero-side { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; text-align: right; }
.hero-next { font-size: .85rem; }
.btn .ico, .ico { width: 16px; height: 16px; vertical-align: -3px; margin-right: .3rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 600px) { .hero { padding: 1.25rem; } .hero-side { align-items: flex-start; text-align: left; } .hero h1 { font-size: 1.55rem; } }

.run-card { padding: .95rem 1.2rem; }
.run-line { display: flex; gap: .85rem; align-items: center; }
.run-icon { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; }
.run-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.run-icon.ok { background: var(--good-soft); color: var(--good); }
.run-icon.bad { background: var(--bad-soft); color: var(--bad); }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .35rem; }

.tiles { margin-bottom: 1.25rem; }
.tile {
  position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .85rem; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow);
  text-decoration: none; color: inherit; transition: border-color .15s, transform .15s;
}
.tile:hover { border-color: var(--accent); transform: translateY(-1px); }
.tile-ico { grid-row: 1 / 3; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.tile-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tile.attn .tile-ico { background: var(--warn-soft); color: var(--warn); }
.tile-num { font-size: 1.7rem; font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; }
.tile.attn .tile-num { color: var(--warn); }
.tile-lbl { color: var(--ink-2); font-size: .82rem; }

.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; margin-bottom: .6rem; }
.card-head h2 { margin: 0; }

.bars { width: 100%; height: auto; display: block; overflow: visible; }
.bars .axis { stroke: var(--line); stroke-width: 1; }
.bars .bar { fill: var(--accent); opacity: .7; transition: opacity .15s; }
.bars .bar.today { opacity: 1; }
.bars .hit { fill: transparent; }
.bars .bar-g:hover .bar { opacity: 1; }
.bars .val { fill: var(--ink-2); font-size: 14px; font-weight: 600; text-anchor: middle; font-variant-numeric: tabular-nums; }
.bars .day { fill: var(--ink-3); font-size: 14px; text-anchor: middle; }
.bars .day.today { fill: var(--ink); font-weight: 600; }

.meters { display: grid; gap: .9rem; margin-bottom: .9rem; }
.meter-top { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; font-size: .9rem; }
.meter-top strong { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.meter-track { height: 8px; border-radius: 999px; background: var(--quiet-soft); overflow: hidden; margin: .3rem 0 .25rem; }
.meter-fill { height: 100%; border-radius: 999px; background: var(--accent); }
.w0 { width: 0; } .w5 { width: 5%; } .w10 { width: 10%; } .w15 { width: 15%; } .w20 { width: 20%; } .w25 { width: 25%; } .w30 { width: 30%; }
.w35 { width: 35%; } .w40 { width: 40%; } .w45 { width: 45%; } .w50 { width: 50%; } .w55 { width: 55%; } .w60 { width: 60%; } .w65 { width: 65%; }
.w70 { width: 70%; } .w75 { width: 75%; } .w80 { width: 80%; } .w85 { width: 85%; } .w90 { width: 90%; } .w95 { width: 95%; } .w100 { width: 100%; }

.rulebook { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin: .25rem 0 .6rem; }
.rulebook a { display: block; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: .5rem .6rem; text-decoration: none; color: var(--ink-2); font-size: .8rem; line-height: 1.3; }
.rulebook a strong { display: block; color: var(--ink); font-size: 1.15rem; }
.rulebook a:hover { border-color: var(--accent); }
.rulebook a.attn { background: var(--warn-soft); border-color: transparent; }
.rulebook a.attn strong { color: var(--warn); }

.empty { display: flex; align-items: center; gap: .6rem; color: var(--ink-2); padding: .5rem 0; }
.empty svg { width: 28px; height: 28px; padding: 5px; border-radius: 50%; background: var(--good-soft); color: var(--good); fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ask-examples button.link { vertical-align: top; text-align: left; }
/* what the owner has to do: Needed / Recommended / Optional / Nothing to do (Need.Tag) */
.need { display: inline-block; border-radius: 999px; padding: .05rem .55rem; font-size: .72rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; vertical-align: 1px; margin-right: .45rem; white-space: nowrap; }
.need.must { background: var(--warn-soft); color: var(--warn); }
.need.rec { background: var(--accent-soft); color: var(--accent); }
.need.opt { background: var(--quiet-soft); color: var(--ink-3); }
.need.auto { background: var(--good-soft); color: var(--good); }
.need-why { color: var(--ink-2); font-size: .88rem; }
.need-line { margin: .1rem 0 .75rem; }
.next-list li .need { margin-right: .5rem; }
/* a customer's message and the earlier ones in the thread (_Message) */
.msg a { color: var(--accent); word-break: break-all; }
.msg-who { font-size: .8rem; font-weight: 600; color: var(--ink-2); margin: 0 0 .3rem; }
.thread { margin-top: .75rem; }
.thread summary { cursor: pointer; color: var(--accent); font-size: .9rem; }
.thread-msg { margin-top: .65rem; padding-left: .75rem; border-left: 3px solid var(--line); }
.thread-msg.ours { border-left-color: var(--accent); }
.thread-msg .msg { max-height: 16rem; }
.msg-who.translated { margin-top: .6rem; }
.msg.translation { border-left: 3px solid var(--accent-soft); padding-left: .6rem; }
.reply-english { white-space: pre-wrap; max-height: 16rem; overflow: auto; }
/* Match your spreadsheet (DataMatch) and the spreadsheets list on Stock and data */
.match-tabs { flex-wrap: wrap; margin-bottom: 1rem; }
.match-table td { vertical-align: top; }
.match-table select { min-width: 12rem; max-width: 18rem; }
.match-table tr.group td { background: var(--quiet-soft); font-size: .85rem; font-weight: 600; color: var(--ink-2); padding: .45rem .6rem; }
.match-table td.conv { min-width: 11rem; font-size: .88rem; }
.match-table tr.note-row td { background: var(--accent-soft); border-bottom: 1px solid var(--line); }
.note-box textarea { min-height: 3.2rem; width: 100%; margin: .3rem 0 .5rem; }
.rule-out { margin-top: .6rem; }
.rule-out .spinner { display: inline-block; vertical-align: -2px; }
.before-after { width: auto; margin: .4rem 0 .6rem; background: var(--panel); }
.before-after tr.bad td { color: var(--bad); }
.samples { display: flex; flex-wrap: wrap; gap: .25rem; max-width: 22rem; }
.sample { font-family: ui-monospace, Consolas, monospace; font-size: .78rem; background: var(--quiet-soft); border-radius: 6px; padding: .05rem .4rem; white-space: nowrap; }
.sample.blank { color: var(--ink-3); font-style: italic; }
.sample .n { color: var(--ink-3); }
.first-rows { margin-top: .5rem; }
.first-rows summary { cursor: pointer; color: var(--accent); font-size: .9rem; }
.first-rows table td, .first-rows table th { padding: .25rem .45rem; white-space: nowrap; max-width: 14rem; overflow: hidden; text-overflow: ellipsis; }
.first-rows tr.hdr td { background: var(--accent-soft); font-weight: 700; }
.w-num { width: 6rem; }
.mt { margin-top: .6rem; }
.match-save { gap: .6rem; align-items: center; margin: 1rem 0 2rem; }
.sheet-tabs { margin: .3rem 0 0 0; padding: 0; list-style: none; }
.sheet-tabs li { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; padding: .35rem 0; border-top: 1px solid var(--line); }
.sheet-tabs li:first-child { border-top: 0; }
@media (max-width: 640px) {
  .match-table select { min-width: 9rem; }
  .samples { max-width: 12rem; }
}
.sheet-list { list-style: none; padding: 0; margin: .6rem 0 1rem; }
.sheet-list > li { border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .8rem; margin-bottom: .6rem; }
.clip.mono { word-break: break-all; }
@media (max-width: 640px) {
  /* Match your spreadsheet: one field per block on a phone */
  .match-table thead { display: none; }
  .match-table tr { display: block; border-bottom: 1px solid var(--line); padding: .35rem 0; }
  .match-table td { display: block; border: 0; padding: .2rem .25rem; }
  .match-table select { width: 100%; max-width: none; min-width: 0; }
  .match-table td.conv { min-width: 0; }
  .samples { max-width: none; }
}
/* Stock and data: "Your data in Olive" */
.section-head { margin: 1.6rem 0 .2rem; }
.needs td { vertical-align: top; }
.needs td:first-child { white-space: nowrap; padding-right: 1rem; }
.needs .need { margin: .2rem .3rem .1rem 0; }
.steps-list li { margin-bottom: .45rem; }
details.card > summary { cursor: pointer; }
.card.inner { box-shadow: none; border: 1px solid var(--line); margin: .75rem 0; }

/* Help: What's new */
.news { list-style: none; margin: 0; padding: 0; }
.news li { padding: .5rem 0; border-top: 1px solid var(--line); }
.news li:first-child { border-top: 0; padding-top: 0; }
.news-when { display: inline-block; min-width: 6.5rem; color: var(--ink-3); font-size: .85rem; font-weight: 600; }
.news a { margin-left: .3rem; white-space: nowrap; }

/* "Add to home screen" bar on phones (site.js) */
.a2hs {
  display: flex; align-items: center; gap: .8rem; margin: 0 0 1rem; padding: .75rem .85rem;
  background: var(--panel); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.a2hs-icon { width: 44px; height: 44px; border-radius: 11px; flex: none; box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.a2hs-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; line-height: 1.35; }
.a2hs-text strong { font-size: .95rem; }
.a2hs-how { font-size: .84rem; color: var(--ink-2); }
.a2hs-share { width: 1.05em; height: 1.05em; vertical-align: -.15em; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.a2hs-btns { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; flex: none; }
body.plain .a2hs { max-width: 420px; margin: 1rem auto 0; }

/* Trial results: week-by-week chart */
.trend-legend { display: flex; gap: 1.1rem; flex-wrap: wrap; margin: .2rem 0 .4rem; color: var(--ink-2); }
.trend-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.trend-legend .sw { width: .8rem; height: .8rem; border-radius: 3px; display: inline-block; }
.trend-legend .sw.a { background: var(--chart-a); }
.trend-legend .sw.b { background: var(--chart-b); }
.bars.trend { max-width: 760px; margin-bottom: .4rem; }
.bars.trend .bar { opacity: 1; }
.bars.trend .bar.a { fill: var(--chart-a); }
.bars.trend .bar.b { fill: var(--chart-b); }
.bars.trend .bar.part { opacity: .55; }
.bars.trend .bar-g:hover .bar { opacity: .85; }
.bars.trend .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; }
.bars.trend .tick { fill: var(--ink-3); font-size: 11px; }
.bars.trend .val { font-size: 13px; fill: var(--ink); }
.bars.trend .day { font-size: 12px; }
.bars.trend .n { fill: var(--ink-3); font-size: 11px; text-anchor: middle; }
.bars.trend .val.sm { font-size: 11px; }

/* Ask Olive: reply types and rules she proposes, with her review */
.ask-setup { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .65rem .8rem; margin: .5rem 0; background: var(--panel); }
.ask-setup-head { margin-bottom: .25rem; }
.ask-setup .msg { margin: .4rem 0; max-height: none; overflow: visible; }
.nowrap { white-space: nowrap; }
.ask-out .ask-msg-text { display: block; width: 100%; margin: .4rem 0; font: inherit; font-size: .9rem; line-height: 1.45; resize: vertical; }
.ask-task { margin: .35rem 0; padding: .35rem .55rem; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 6px 6px 0; }
.rule-task { margin: .2rem 0 .4rem; }
.task-pick { gap: .4rem; align-items: center; flex-wrap: wrap; margin: 0 0 .5rem; }
.task-pick select { max-width: 100%; min-height: 2.4rem; font-size: .9rem; padding: .25rem .4rem; }
.trial-split { margin: .35rem 0 0; padding-left: 1.1rem; }
.trial-split li { margin: .15rem 0; color: var(--ink-2); }

/* a part of a reply that only goes out on eBay ([EBAY_ONLY]) */
.ebay-only { background: color-mix(in srgb, var(--chart-b) 14%, transparent); border-bottom: 2px dotted var(--chart-b); }
.ebay-only::before { content: "eBay only: "; font-weight: 600; color: var(--chart-b); }
.fetch-now { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; max-width: 22rem; text-align: right; }
@media (max-width: 820px) { .fetch-now { align-items: flex-start; text-align: left; } }

/* "Fetch data" bar (Sales channels, Stock and data) and the small "Fetch now" in a box's header */
.fetch-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; margin-bottom: 1.25rem;
  padding: .95rem 1.2rem; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.fetch-bar .fetch-text { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.fetch-bar .fetch-text strong { font-size: 1rem; letter-spacing: -.01em; }
.fetch-bar .fetch-text > span { color: var(--ink-2); font-size: .88rem; }
.fetch-bar form { flex: none; margin: 0; }
.fetch-status { color: var(--ink-3); font-size: .82rem; display: inline-flex; align-items: center; gap: .45rem; margin: 0 0 .5rem; }
.fetch-bar .fetch-status { margin: .15rem 0 0; }
.fetch-status.running { color: var(--accent); font-weight: 600; }
.fetch-small { margin: 0; flex: none; }
.fetch-small .btn .spinner, .fetch-bar .btn .spinner { width: 12px; height: 12px; }
.card-head { align-items: center; }
@media (max-width: 600px) {
  .fetch-bar { flex-direction: column; align-items: stretch; }
  .fetch-bar .btn { width: 100%; }
}

/* ---------------------------------------------------------------- phones (last, so these win over the rules above) */
@media (max-width: 820px) {
  h1 { font-size: 1.5rem; }
  .lead { font-size: .95rem; margin-bottom: 1.1rem; }
  .card { padding: 1.1rem 1rem; }
  /* buttons and links big enough for a thumb */
  .btn { white-space: normal; text-align: center; max-width: 100%; overflow-wrap: anywhere; }
  .btn.small { min-height: 2.5rem; padding: .4rem .85rem; font-size: .88rem; }
  button.link, .card-head a, a.small:not(.btn) { display: inline-block; padding: .4rem 0; }
  details > summary { padding: .45rem 0; }
  input[type=checkbox], input[type=radio] { width: 1.25rem; height: 1.25rem; }
  .check input, .choice input { margin-top: .1rem; }
  input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=time], select, textarea { font-size: 16px; }
  /* nothing cut off at the right edge: long tags and buttons wrap, tabs go onto a second line instead of hiding */
  .tabs { flex-wrap: wrap; overflow-x: visible; row-gap: 0; }
  .tab { padding: .6rem .7rem; }
  .chip, .need { white-space: normal; }
  .row > *, .grid > *, .card-head > *, .run-line > *, .hero-main, .hero-side { min-width: 0; max-width: 100%; }
  .needs td:first-child { white-space: normal; padding-right: .6rem; }
}

/* ------------------------------------------------------------------ order tracker (task page)
   Ordered -> Sent -> with the carrier. Filled dot = done, ring = where the order is now, grey = not yet. */
.track { list-style: none; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin: .7rem 0 .35rem; padding: 0; }
.track li { position: relative; display: grid; justify-items: center; align-content: start; gap: .15rem; text-align: center; min-width: 0; font-size: .8rem; }
.track li::before { content: ""; position: absolute; top: 7px; left: -50%; right: 50%; height: 3px; background: var(--chart-a); border-radius: 2px; }
.track li:first-child::before { display: none; }
.track li.todo::before { background: var(--line-strong); }
.track li.bad::before { background: var(--bad); }
.track .dot { position: relative; z-index: 1; width: 17px; height: 17px; border-radius: 50%; background: var(--chart-a); box-sizing: border-box; }
.track li.now .dot { background: var(--panel); border: 4px solid var(--chart-a); }
.track li.todo .dot { background: var(--panel); border: 2px solid var(--line-strong); }
.track li.bad .dot { background: var(--bad); }
.track .lbl { font-weight: 600; color: var(--ink); line-height: 1.25; }
.track li.todo .lbl { color: var(--ink-3); font-weight: 500; }
.track .sub { color: var(--ink-3); font-size: .72rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; line-height: 1.25; }
.order-lines .chip { vertical-align: 1px; }

/* ------------------------------------------------------------------ task list: what each task needs next */
.task-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem; }
.task-tags .chip { font-size: .7rem; }
.task-tags a.chip { text-decoration: none; }
.task-tags a.chip:hover { text-decoration: underline; }

/* ------------------------------------------------------------------ Ask Olive charts: one series, one colour */
.ask-chart { margin: .6rem 0 .3rem; padding: .7rem .8rem .55rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel); }
.ask-chart .ct-title { font-weight: 600; font-size: .85rem; margin: 0 0 .45rem; color: var(--ink); }
.ask-chart .ct-title span { color: var(--ink-3); font-weight: 400; }
.cbar { display: grid; grid-template-columns: minmax(6rem, 46%) minmax(0, 1fr) auto; align-items: center; gap: .55rem; font-size: .8rem; padding: .14rem 0; }
.cbar .cl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.cbar svg { display: block; width: 100%; height: 12px; overflow: visible; }
.cbar rect { fill: var(--chart-a); }
.cbar:hover rect { opacity: .82; }
.cbar:hover .cl { color: var(--ink); }
.cbar .cv { min-width: 2.2rem; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }

/* Tasks: a finished task fades away and the next one fades in (owner, 24 Nov 2026) */
#task-page.task-leaving { opacity: 0; transform: translateY(-.4rem); transition: opacity .35s ease, transform .35s ease; pointer-events: none; }
.task-arrive { animation: task-arrive .45s ease .35s both; }
@keyframes task-arrive { from { opacity: 0; transform: translateY(.6rem); } to { opacity: 1; transform: none; } }
.task-closed { display: flex; align-items: center; gap: .5rem; overflow: hidden; max-height: 3.5rem; padding: .6rem .9rem; margin-bottom: .8rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--good-soft); color: var(--ink-2);
  animation: task-closed 1.8s ease forwards; }
.task-closed .tick { color: var(--good); font-weight: 700; }
@keyframes task-closed {
  0%, 55% { opacity: 1; max-height: 3.5rem; }
  100% { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; margin-bottom: 0; border-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  #task-page.task-leaving { transition: none; }
  .task-arrive, .task-closed { animation: none; }
}

/* Replies > a reply's checks (TemplateChecks) */
.checks td { vertical-align: top; }
.checks .nowrap { white-space: nowrap; }
.checks .pre { white-space: pre-wrap; max-height: 12rem; overflow: auto; }
.checks td.small { max-width: 26rem; }

/* Search a long list as you type (site.js .filter-row) */
[hidden] { display: none !important; }
.filter-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .2rem 0 .8rem; }
.filter-row input[type=search] { flex: 1 1 16rem; max-width: 28rem; }
.filter-row select { width: auto; }
input.w-4 { width: 4.5em; } input.w-5 { width: 5em; } input.w-10 { width: 10em; }
.plain-list { list-style: none; padding: 0; margin: .4rem 0 0; }
.plain-list li { padding: .35rem 0; border-top: 1px solid var(--line); }
.plain-list li:first-child { border-top: 0; }
.ask-field { font-size: .88rem; margin: .15rem 0; }
.ask-field .pre { white-space: pre-wrap; margin: .1rem 0 0 .6rem; }
.ask-item-act { gap: .5rem; margin-top: .5rem; }
.ask-setup.decided { background: var(--quiet-soft); }
