/* K&M Hub — one stylesheet for every tab.
   Palette comes from the K&M logo: forest green and harvest gold,
   on a cool green-tinted paper. Pomegranate red is kept for things that need action. */

:root {
  --forest: #173d24;
  --forest-2: #1f5131;
  --leaf: #2e6b3f;
  --leaf-soft: #e3eee4;
  --gold: #d9a93a;
  --gold-soft: #f6ecd2;
  --pom: #b4232f;
  --pom-soft: #f9e3e4;
  --amber: #945800;  /* readable on white and amber-soft */
  --amber-soft: #fbefd9;
  --paper: #f3f5f0;
  --panel: #ffffff;
  --ink: #14211a;
  --ink-2: #4a5a50;
  --ink-3: #65726a;  /* 4.6:1 on paper, 5:1 on white (WCAG AA) */
  --line: #dce2d8;
  --line-2: #c9d2c4;

  --f-display: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif;
  --f-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-lg: 18px;
  --r-md: 12px;
  --r-sm: 8px;
  --shadow-card: 0 1px 0 rgba(23, 61, 36, .06), 0 2px 10px -4px rgba(23, 61, 36, .18);
  --gutter: clamp(16px, 3vw, 32px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.5 var(--f-body);
  font-feature-settings: "ss01", "cv11";
}
img { max-width: 100%; display: block; }
a { color: var(--leaf); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--forest); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.num, td.num, .money { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- top bar ---------- */
.topbar {
  background: var(--forest);
  color: #eef3ec;
  position: sticky; top: 0; z-index: 20;
  box-shadow: 0 1px 0 rgba(0,0,0,.2);
}
.topbar-inner {
  max-width: 1440px; margin: 0 auto;
  padding: 10px var(--gutter) 0;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
}
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 50%; background: #fff; padding: 2px; }
.brand-name { font: 700 19px/1 var(--f-display); letter-spacing: -.01em; }
.brand-name small { display: block; font: 500 12px/1.3 var(--f-body); color: #a9c2ae; letter-spacing: 0; margin-top: 3px; }
.who { display: flex; align-items: center; gap: 10px; justify-self: end; font-size: 14px; }
.who a, .who button {
  color: #e7efe5; background: transparent; border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px; padding: 6px 12px; font: inherit; cursor: pointer; text-decoration: none;
}
.who a:hover, .who button:hover { background: rgba(255,255,255,.08); color: #fff; }
.who .me { color: #a9c2ae; }

.tabs {
  max-width: 1440px; margin: 0 auto; padding: 10px var(--gutter) 0;
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px 12px; border-radius: 12px 12px 0 0;
  color: #cfe0d1; text-decoration: none; font-weight: 600; font-size: 15px;
  white-space: nowrap;
}
.tab:hover { color: #fff; background: rgba(255,255,255,.06); }
.tab[aria-current="page"] { background: var(--paper); color: var(--forest); }
.tab .ico { font-size: 16px; }

/* ---------- page ---------- */
main { max-width: 1440px; margin: 0 auto; padding: 24px var(--gutter) 64px; }
.page-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 12px 20px; margin-bottom: 20px;
}
h1, h2, h3 { font-family: var(--f-display); color: var(--forest); margin: 0; }
h1 { font-size: clamp(26px, 3.2vw, 36px); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
h2 { font-size: 21px; font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 17px; font-weight: 650; }
.lede { color: var(--ink-2); margin: 6px 0 0; max-width: 62ch; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }

/* ---------- buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 15px/1 var(--f-body); padding: 11px 16px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--panel); color: var(--ink);
  cursor: pointer; text-decoration: none; min-height: 42px;
}
.btn:hover { border-color: var(--leaf); color: var(--forest); }
.btn-primary { background: var(--leaf); border-color: var(--leaf); color: #fff; }
.btn-primary:hover { background: var(--forest); border-color: var(--forest); color: #fff; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--forest); }
.btn-gold:hover { background: #c99a2c; color: var(--forest); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-danger { color: var(--pom); border-color: #e7c2c5; background: #fff; }
.btn-danger:hover { background: var(--pom); color: #fff; border-color: var(--pom); }
.btn-sm { padding: 7px 11px; min-height: 34px; font-size: 14px; border-radius: 8px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

label { font-weight: 600; font-size: 14px; color: var(--ink); }
input[type=text], input[type=password], input[type=email], input[type=number],
input[type=date], input[type=search], select, textarea {
  width: 100%; font: 400 16px/1.4 var(--f-body); color: var(--ink);
  background: #fff; border: 1px solid var(--line-2); border-radius: 10px;
  padding: 10px 12px; min-height: 44px;
}
textarea { min-height: 88px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--leaf); box-shadow: 0 0 0 3px var(--leaf-soft); }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--leaf); vertical-align: -4px; }
.field { display: grid; gap: 6px; }
.field .help { font-size: 13px; color: var(--ink-3); }
.field .errorlist, .errorlist { list-style: none; margin: 0; padding: 0; color: var(--pom); font-size: 14px; font-weight: 600; }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.checks ul, ul.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checks label { font-weight: 500; display: flex; gap: 10px; align-items: center; }

.filters {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: end;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 12px; margin-bottom: 18px;
}
.filters .field { min-width: 160px; flex: 1 1 160px; max-width: 340px; }
.filters .field label { font-size: 13px; color: var(--ink-2); }

/* segmented view switch */
.seg { display: inline-flex; background: #e6ebe2; border-radius: 10px; padding: 3px; }
.seg a { padding: 8px 14px; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.seg a[aria-current="page"] { background: #fff; color: var(--forest); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* ---------- panels & tables ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.panel + .panel { margin-top: 16px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; }
table.data { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.data th {
  text-align: left; font-weight: 600; color: var(--ink-2); background: #f7f9f5;
  padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; font-size: 13.5px;
}
table.data td { padding: 11px 12px; border-bottom: 1px solid #eef1eb; vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; }
table.data tbody tr:hover { background: #fafcf8; }
table.data tr.is-stuck td:first-child { box-shadow: inset 4px 0 0 var(--pom); }

/* ---------- chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 999px;
  padding: 3px 10px; font-size: 13px; font-weight: 600; white-space: nowrap;
  background: #edf1ea; color: var(--ink-2);
}
.chip.ok { background: var(--leaf-soft); color: var(--forest); }
.chip.warn { background: var(--amber-soft); color: var(--amber); }
.chip.bad { background: var(--pom-soft); color: var(--pom); }
.chip.gold { background: var(--gold-soft); color: #7a5a0f; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ---------- messages ---------- */
.messages { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; }
.messages li { padding: 12px 16px; border-radius: 12px; background: var(--leaf-soft); color: var(--forest); font-weight: 600; }
.messages li.error { background: var(--pom-soft); color: var(--pom); }

/* ---------- home ---------- */
.hello { margin: 6px 0 24px; }
.hello h1 { font-size: clamp(30px, 4.4vw, 52px); }
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tile {
  display: grid; gap: 10px; padding: 20px; border-radius: var(--r-lg); text-decoration: none;
  color: var(--ink); background: var(--panel); border: 1px solid var(--line);
  min-height: 150px; align-content: start; position: relative;
}
.tile:hover { border-color: var(--leaf); box-shadow: var(--shadow-card); color: var(--ink); }
.tile .ico { font-size: 28px; }
.tile h2 { font-size: 20px; }
.tile p { margin: 0; color: var(--ink-2); }
.tile .badge { position: absolute; top: 16px; right: 16px; }

/* ---------- purchase board ---------- */
.board {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(232px, 1fr);
  gap: 14px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x proximity;
  align-items: start;
}
.col { background: #e9eee5; border-radius: var(--r-lg); padding: 10px; scroll-snap-align: start; min-height: 200px; }
.col-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 10px; gap: 8px; }
.col-head h2 { font-size: 16px; color: var(--forest); }
.col-count { font: 700 14px/1 var(--f-body); color: var(--ink-2); background: #fff; border-radius: 999px; padding: 5px 9px; }
.col-empty { color: var(--ink-3); font-size: 14px; padding: 18px 8px; text-align: center; }

.card {
  display: block; background: #fff; border-radius: var(--r-md); padding: 14px 14px 12px;
  text-decoration: none; color: var(--ink); box-shadow: var(--shadow-card);
  border: 1px solid transparent; position: relative;
}
.card + .card { margin-top: 10px; }
.card:hover { border-color: var(--leaf); color: var(--ink); }
.card.is-stuck { border-color: #eab3b8; box-shadow: inset 4px 0 0 var(--pom), var(--shadow-card); }
.card-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.card-supplier { font: 700 16px/1.25 var(--f-display); color: var(--forest); }
.card-ref { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.card-products { margin: 6px 0 10px; color: var(--ink-2); font-size: 14px; line-height: 1.4; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-total { font: 700 16px/1 var(--f-body); font-variant-numeric: tabular-nums; }
.voice { font-size: 12px; color: #7a5a0f; background: var(--gold-soft); border-radius: 6px; padding: 2px 6px; margin-left: 6px; }

/* the five-step track: the one place we spend boldness */
.track { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 0 0 10px; }
.track i { height: 5px; border-radius: 3px; background: #e2e8de; }
.track i.done { background: var(--leaf); }
.track i.now { background: var(--gold); }
.card.is-stuck .track i.now { background: var(--pom); }

/* detail page journey */
.journey { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: 0; margin: 4px 0 6px; counter-reset: step; }
.journey li { list-style: none; position: relative; padding: 34px 6px 0; text-align: center; font-size: 13.5px; color: var(--ink-3); }
.journey li::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font: 700 13px/1 var(--f-body); background: #e2e8de; color: var(--ink-3); z-index: 1;
}
.journey li::after { content: ""; position: absolute; top: 12px; left: -50%; width: 100%; height: 3px; background: #e2e8de; }
.journey li:first-child::after { display: none; }
.journey li.done { color: var(--forest); }
.journey li.done::before { background: var(--leaf); color: #fff; content: "✓"; }
.journey li.done::after, .journey li.now::after { background: var(--leaf); }
.journey li.now { color: var(--forest); font-weight: 700; }
.journey li.now::before { background: var(--gold); color: var(--forest); box-shadow: 0 0 0 4px var(--gold-soft); }
.journey li.now.stuck::before { background: var(--pom); color: #fff; box-shadow: 0 0 0 4px var(--pom-soft); }
.journey .when { display: block; font-weight: 500; color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }
.journey ol { margin: 0; padding: 0; display: contents; }

.detail-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; }
dl.facts dt { color: var(--ink-3); font-size: 14px; }
dl.facts dd { margin: 0; font-weight: 600; }

.stuck-banner {
  display: flex; gap: 12px; align-items: center; background: var(--pom-soft); color: var(--pom);
  border-radius: var(--r-md); padding: 12px 16px; font-weight: 600; margin-bottom: 16px;
}

.files { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.files li { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.files .name { font-weight: 600; overflow-wrap: anywhere; }

.log { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 14px; }
.log li { display: grid; gap: 2px; padding-left: 14px; border-left: 2px solid var(--line); }
.log .what { font-weight: 600; }

/* product lines editor */
.lines { display: grid; gap: 10px; }
.line-row { display: grid; gap: 10px; grid-template-columns: minmax(180px, 3fr) minmax(90px, 1fr) minmax(100px, 1fr) minmax(120px, 1.2fr) auto; align-items: end; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfa; }
.line-row .del { display: flex; gap: 6px; align-items: center; font-size: 14px; font-weight: 500; padding-bottom: 12px; }
@media (max-width: 700px) {
  .line-row { grid-template-columns: 1fr 1fr; }
  .line-row .field:first-child { grid-column: 1 / -1; }
}

/* ---------- stats strip (collections, health) ---------- */
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 18px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; }
.stat .v { font: 700 clamp(22px, 2.4vw, 30px)/1.1 var(--f-display); color: var(--forest); font-variant-numeric: tabular-nums; }
.stat .k { color: var(--ink-2); font-size: 14px; margin-top: 4px; }
.stat.bad .v { color: var(--pom); }
.stat.warn .v { color: var(--amber); }

.fresh { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.fresh.stale { color: var(--amber); font-weight: 600; }
.fresh.none { color: var(--ink-3); }

.empty {
  text-align: center; padding: 48px 20px; background: var(--panel); border: 1px dashed var(--line-2);
  border-radius: var(--r-lg); color: var(--ink-2);
}
.empty h2 { margin-bottom: 8px; }
.empty p { max-width: 52ch; margin: 0 auto 16px; }

.subnav { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 16px; }
.subnav a { padding: 8px 14px; border-radius: 999px; background: #e6ebe2; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 14px; }
.subnav a[aria-current="page"] { background: var(--forest); color: #fff; }

/* report frame */
.report-frame { width: 100%; min-height: 70vh; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; }

/* ---------- login ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(120% 80% at 0% 0%, #21573a 0%, var(--forest) 55%, #0f2a18 100%); }
.auth-card { width: min(420px, 100%); background: #fff; border-radius: 22px; padding: 32px 28px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.45); }
.auth-card .logo { width: 84px; height: 84px; margin: -74px auto 14px; border-radius: 50%; background: #fff; padding: 4px; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.auth-card h1 { text-align: center; font-size: 26px; }
.auth-card .lede { text-align: center; margin: 6px auto 22px; }
.auth-card form { display: grid; gap: 14px; }
.auth-card .btn { width: 100%; }
.qr { display: grid; place-items: center; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.qr img { width: 200px; height: 200px; }
.key { font-size: 13px; word-break: break-all; background: #f3f5f0; padding: 8px 10px; border-radius: 8px; }

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .topbar-inner { grid-template-columns: auto 1fr auto; gap: 8px; padding-top: 8px; }
  .brand img { width: 34px; height: 34px; }
  .brand-name { font-size: 17px; }
  .who { gap: 6px; }
  .who a, .who button { padding: 5px 10px; font-size: 13px; }
  .page-head .btn-row { width: 100%; }
  .filters-compact .field { max-width: none; }
  .brand-name small { display: none; }
  .who .me { display: none; }
  .tab { padding: 9px 13px 11px; font-size: 14.5px; }
  .board { grid-auto-columns: 86%; }
  .panel { padding: 16px; }
  .journey li { font-size: 12px; padding-top: 32px; }
  .journey .when { font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media print {
  .topbar, .filters, .btn, .seg { display: none !important; }
  body { background: #fff; }
}
.filters-compact { background: transparent; border: 0; padding: 0; }
.detail-grid > * { min-width: 0; }
input[type=file] { font: 400 14px var(--f-body); max-width: 100%; color: var(--ink-2); }
input[type=file]::file-selector-button {
  font: 600 14px var(--f-body); margin-right: 10px; padding: 9px 14px; border-radius: 10px;
  border: 1px solid var(--line-2); background: #fff; color: var(--ink); cursor: pointer;
}
.journey li { min-width: 0; }
@media (max-width: 640px) { .journey li { padding-left: 2px; padding-right: 2px; } }

/* ---------- quick add ---------- */
.quick .panel + .panel { margin-top: 12px; }
.q-step { font-size: 18px; margin-bottom: 10px; }
.pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pill span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--line-2); background: #fff; font-weight: 600; color: var(--ink);
}
.pill input:checked + span { background: var(--forest); border-color: var(--forest); color: #fff; }
.pill input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.qrow { display: grid; gap: 10px; grid-template-columns: minmax(180px, 3fr) minmax(90px, 1fr) minmax(100px, 1fr) minmax(110px, 1fr);
  padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfa; }
@media (max-width: 700px) { .qrow { grid-template-columns: 1fr 1fr 1fr; } .qrow .qp { grid-column: 1 / -1; } }
.checkline { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.sticky-save { position: sticky; bottom: 0; padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, var(--paper) 70%, rgba(243,245,240,0)); margin-top: 8px; }
.sticky-save .btn { width: 100%; max-width: 420px; min-height: 52px; font-size: 17px; }
.due { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.due.late { color: var(--pom); }
.prices { display: grid; gap: 8px; margin-top: 4px; }
.prices .pr { display: grid; grid-template-columns: 1fr 140px; gap: 10px; align-items: center; }
form.move { margin-top: 18px; padding: 14px; background: #f7f9f5; border: 1px solid var(--line); border-radius: var(--r-md); display: grid; gap: 12px; }
form.move h3, form.move .move-title { font-size: 16px; }
form.move .btn { justify-self: start; }

/* ---------- today (home) ---------- */
.quickbar { display: flex; gap: 10px; flex-wrap: wrap; margin: -8px 0 20px; }
.today { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.today-block { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.today-block.lvl-bad { border-top: 4px solid var(--pom); }
.today-block.lvl-gold { border-top: 4px solid var(--gold); }
.today-block.lvl-ok { border-top: 4px solid var(--leaf); }
.today-head { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px 12px; text-decoration: none; color: var(--ink); }
.today-head:hover { background: #fafcf8; color: var(--ink); }
.today-head .ico { font-size: 24px; line-height: 1.2; }
.today-tab { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-3); }
.today-headline { display: block; font: 700 clamp(19px, 2vw, 23px)/1.2 var(--f-display); color: var(--forest); margin-top: 2px; }
.lvl-bad .today-headline { color: var(--pom); }
.today-list { list-style: none; margin: 0; padding: 0 0 8px; border-top: 1px solid #eef1eb; }
.today-list li a { display: flex; gap: 10px; align-items: center; padding: 11px 18px; text-decoration: none; color: var(--ink); font-size: 15px; min-height: 44px; }
.today-list li a:hover { background: #fafcf8; }
.today-list li.muted { padding: 6px 18px; }
.dot.lvl-bad { color: var(--pom); } .dot.lvl-gold { color: var(--gold); } .dot.lvl-none, .dot.lvl- { color: var(--line-2); }
.today-list li a { align-items: flex-start; }
.today-list li a .dot { margin-top: 7px; flex: none; }
.qrow input[name^="price_"]::placeholder { color: var(--ink-3); }
@media (max-width: 640px) {
  .journey li:not(.now) .lbl { display: none; }
  .journey li.now .lbl { white-space: nowrap; }
  .journey li:not(.now) .when { display: none; }
}

/* ---------- ageing bars (collections) ---------- */
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 110px; gap: 12px; align-items: center; font-size: 14.5px; }
.bar-label { color: var(--ink-2); }
.bar-track { height: 14px; background: #edf1ea; border-radius: 7px; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 7px; min-width: 2px; }
.bar-fill.b1 { background: #d9c27a; } .bar-fill.b2 { background: var(--gold); }
.bar-fill.b3 { background: #d0632f; } .bar-fill.b4 { background: var(--pom); }
.bar-val { text-align: right; font-weight: 600; }
@media (max-width: 640px) { .bar-row { grid-template-columns: 90px 1fr 84px; gap: 8px; font-size: 13.5px; } }

/* ---------- shop page ---------- */
.nextstep { display: grid; gap: 2px; padding: 14px 18px; border-radius: var(--r-md); margin-bottom: 16px;
  background: var(--leaf-soft); color: var(--forest); border-left: 5px solid var(--leaf); }
.nextstep strong { font-size: 13px; }
.nextstep span { font: 600 17px/1.35 var(--f-body); }
.nextstep.lvl-bad { background: var(--pom-soft); color: var(--pom); border-left-color: var(--pom); }
.nextstep.lvl-gold { background: var(--gold-soft); color: #6b4e0c; border-left-color: var(--gold); }
.log li form { margin-top: 2px; }

/* ---------- desk ---------- */
.askbox { background: var(--forest); color: #eaf2e8; border-radius: var(--r-lg); padding: 16px 18px; margin-bottom: 22px; }
.askbox label { color: #eaf2e8; font-size: 15px; }
.askbox .muted { color: #a9c2ae; }
.askrow { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 8px; align-items: stretch; }
.askrow textarea { min-height: 52px; border-color: transparent; }
.askrow .btn { min-width: 96px; background: var(--gold); border-color: var(--gold); color: var(--forest); }
@media (max-width: 640px) { .askrow { grid-template-columns: 1fr; } }
.desk-section { margin-bottom: 24px; }
.desk-section h2 { font-size: 19px; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.count { font: 700 13px/1 var(--f-body); background: var(--pom); color: #fff; border-radius: 999px; padding: 4px 9px; }
.desk-list { display: grid; gap: 8px; }
.desk-row { display: grid; gap: 3px; padding: 13px 16px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-md); text-decoration: none; color: var(--ink); border-left: 5px solid var(--line-2); }
.desk-row:hover { border-color: var(--leaf); color: var(--ink); }
.desk-row.tone-gold { border-left-color: var(--gold); }
.desk-row.tone-bad { border-left-color: var(--pom); }
.desk-row.tone-ok { border-left-color: var(--leaf); }
.desk-kind { font-size: 12.5px; font-weight: 700; color: var(--ink-3); }
.tone-gold .desk-kind { color: #8a6410; } .tone-bad .desk-kind { color: var(--pom); }
.desk-title { font: 650 16.5px/1.3 var(--f-body); }
.desk-meta { font-size: 13px; color: var(--ink-3); }
.calm { color: var(--ink-2); background: #fff; border: 1px dashed var(--line-2); border-radius: var(--r-md); padding: 14px 16px; margin: 0; }
.prose p { margin: 0 0 10px; max-width: 70ch; } .prose p:last-child { margin-bottom: 0; }
.decide { position: sticky; bottom: 0; z-index: 5; background: #fff; border: 1px solid var(--line-2); border-radius: var(--r-lg);
  padding: 14px; margin: 16px 0; display: grid; gap: 8px; box-shadow: 0 -8px 24px -12px rgba(23,61,36,.25); }
.decide-row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px; }
.btn.big { min-height: 52px; font-size: 16.5px; }
.result { border-left: 5px solid var(--leaf); }
.tab .badge { font: 700 12px/1 var(--f-body); background: var(--gold); color: var(--forest); border-radius: 999px; padding: 3px 7px; }
.tab .badge.urgent { background: var(--pom); color: #fff; }
.panel + .panel, .panel + form, form + .panel { margin-top: 16px; }
.askmode { display: inline-flex; background: rgba(255,255,255,.1); border-radius: 10px; padding: 3px; gap: 2px; }
.askmode label { position: relative; color: #eaf2e8; }
.askmode input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.askmode span { display: inline-block; padding: 7px 16px; border-radius: 8px; font-weight: 600; font-size: 14.5px; }
.askmode input:checked + span { background: #fff; color: var(--forest); }
.askmode input:focus-visible + span { outline: 3px solid var(--gold); }
.askfoot { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 8px; }
.worker-status { display: flex; align-items: center; gap: 8px; margin: -6px 0 18px; color: var(--ink-2); }
.worker-status .dot { color: var(--leaf); flex: none; }
.worker-status.is-waiting { color: var(--amber); font-weight: 600; }
.attach { position: relative; cursor: pointer; }
.attach input { position: absolute; opacity: 0; inset: 0; width: 100%; cursor: pointer; }
.attach span { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 12px; border-radius: 8px; border: 1px dashed rgba(255,255,255,.4); color: #eaf2e8; font-size: 14px; font-weight: 600; }
.rule-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rule-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; flex-wrap: wrap; }
.rule-list li.off { opacity: .55; }
.rules-allowed { border-left: 5px solid var(--leaf); }
.rules-ask { border-left: 5px solid var(--gold); }
.rules-never { border-left: 5px solid var(--pom); }

/* ---------- desk on the home page ---------- */
.desk-hero { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); margin: 0 0 16px; overflow: hidden; }
.desk-hero.lvl-gold { border-top: 4px solid var(--gold); } .desk-hero.lvl-bad { border-top: 4px solid var(--pom); } .desk-hero.lvl-ok { border-top: 4px solid var(--leaf); }
.desk-hero-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 16px; align-items: center; padding: 16px 18px; }
.desk-hero-head { text-decoration: none; color: var(--ink); }
.lvl-bad .desk-hero-head .today-headline { color: var(--pom); }
.mini-ask { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; }
.mini-ask select { width: auto; }
.brief-line { display: block; padding: 12px 18px; border-top: 1px solid #eef1eb; color: var(--ink-2); text-decoration: none; background: #fbfcf8; }
.brief-line strong { color: var(--forest); }
@media (max-width: 860px) { .desk-hero-top { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .mini-ask { grid-template-columns: 1fr auto; } .mini-ask input { grid-column: 1 / -1; } }
.quickbar { margin: 0 0 20px; }
.decide { gap: 10px; }
.decide input[type=text] { min-height: 42px; font-size: 15px; }
@media (max-width: 640px) {
  table.data.stack thead { display: none; }
  table.data.stack, table.data.stack tbody, table.data.stack tr, table.data.stack td { display: block; width: 100%; }
  table.data.stack tr { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  /* label on the left, the cell's content (whatever it holds: links, chips, notes) on the right */
  table.data.stack td { position: relative; padding: 3px 0 3px calc(42% + 8px); border: 0; min-height: 24px; }
  table.data.stack td::before { content: attr(data-label); position: absolute; left: 0; top: 4px; width: 42%;
    color: var(--ink-3); font-size: 13px; }
  table.data.stack td[data-label=""] { padding-left: 0; }
  table.data.stack td.is-empty { display: none; }  /* phone cards skip rows with nothing in them */
  table.data.stack tr.is-stuck { box-shadow: inset 4px 0 0 var(--pom); }
  table.data.stack tr.is-stuck td:first-child { box-shadow: none; }
  .decide-row { grid-template-columns: 1.6fr 1fr 1fr; }
}
td .line { display: block; }
td .line + .line { margin-top: 3px; }
.h-link { color: inherit; text-decoration: none; } .h-link:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.qb-grid { display: grid; grid-template-columns: auto 1fr; gap: 10px; margin-top: 10px; align-items: center; }
.qb-grid select, .qb-grid input[type=text] { background: #fff; }
.attach.big span { min-height: 46px; padding: 8px 16px; font-size: 15px; border-style: solid; background: rgba(255,255,255,.08); }
.qb-drop .askfoot .btn { background: var(--gold); border-color: var(--gold); color: var(--forest); }
@media (max-width: 560px) { .qb-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  table.data.stack td.num { text-align: left; }
  dl.facts { grid-template-columns: minmax(110px, 42%) minmax(0, 1fr); }
  dl.facts dd { text-align: right; overflow-wrap: anywhere; }
  dl.facts dd .note { text-align: left; }
}

/* ---------- plan ---------- */
.phase { margin-bottom: 16px; }
.phase.current { border: 2px solid var(--gold); }
.phase-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 12px; }
.phase-head h2 { margin-top: 2px; }
.phase-prog { display: grid; gap: 6px; min-width: 180px; justify-items: end; }
.phase-prog .bar-track { width: 180px; display: block; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.step { border: 1px solid var(--line); border-radius: 10px; background: #fff; border-left: 4px solid var(--line-2); }
.step.tone-bad { border-left-color: var(--pom); } .step.tone-gold { border-left-color: var(--gold); } .step.tone-ok { border-left-color: var(--leaf); }
.step summary { list-style: none; cursor: pointer; padding: 10px 12px; display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: baseline; }
.step summary::-webkit-details-marker { display: none; }
.step-title { font-weight: 600; }
.step-meta { grid-column: 2; font-size: 13px; color: var(--ink-3); }
.step-body { padding: 0 12px 12px; }
.step-form { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; }
.step-form select, .step-form input { min-height: 38px; font-size: 14.5px; }
.step-done { padding: 8px 12px; font-size: 14.5px; }
.done-list { margin-top: 10px; } .done-list summary { cursor: pointer; padding: 4px 0; }
@media (max-width: 560px) { .step-form { grid-template-columns: 1fr; } .phase-prog { justify-items: start; } }
details.phase > summary { list-style: none; cursor: pointer; }
details.phase > summary::-webkit-details-marker { display: none; }
details.phase:not([open]) > summary { margin-bottom: 0; }
details.phase > summary h2::after { content: " ▾"; color: var(--ink-3); font-size: .8em; }
details.phase:not([open]) > summary h2::after { content: " ▸"; }
.topsearch { justify-self: center; width: min(420px, 100%); }
.topsearch input { min-height: 38px; padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08); color: #fff; font-size: 14.5px; }
.topsearch input::placeholder { color: #a9c2ae; }
.topsearch input:focus { background: #fff; color: var(--ink); box-shadow: none; }
@media (max-width: 640px) { .topsearch { grid-column: 1 / -1; grid-row: 2; width: 100%; margin-top: 2px; } }
@media (max-width: 640px) {
  .topbar { position: static; }
  .topsearch input { min-height: 36px; }
  .tabs { padding-top: 6px; }
}
.tagrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: -6px 0 14px; }
.tag { display: inline-flex; align-items: center; gap: 2px; background: var(--gold-soft); border-radius: 999px; padding: 3px 4px 3px 12px; font-size: 13.5px; font-weight: 600; }
.tag a { color: #6b4e0c; text-decoration: none; }
.tag form { display: inline; } .tag button { border: 0; background: transparent; color: #6b4e0c; cursor: pointer; font-size: 16px; line-height: 1; padding: 2px 6px; border-radius: 999px; }
.tag button:hover { background: rgba(0,0,0,.06); }
.tagadd { display: inline-flex; gap: 6px; } .tagadd input { min-height: 34px; width: 230px; font-size: 14px; padding: 6px 10px; }
.answer-yes { border-left: 5px solid var(--leaf); } .answer-no { border-left: 5px solid var(--pom); } .answer-change { border-left: 5px solid var(--gold); }

/* Undo bar after answering a decision (Gmail-style) */
.undo-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: var(--forest, #1f3d2b); color: #fff; border-radius: var(--r-lg, 14px); padding: 10px 12px 10px 16px;
  margin: 0 0 14px; box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.undo-bar .btn { background: #fff; color: var(--forest, #1f3d2b); border-color: #fff; min-height: 40px; font-weight: 700; }
.undo-bar.done { background: var(--leaf-soft); color: var(--ink); box-shadow: none; }

/* Decision at a glance: what changes, why, how sure, can it be undone */
.glance { display: grid; gap: 10px; }
.glance .impact { font-family: var(--f-display); font-size: 19px; font-weight: 650; line-height: 1.3; margin: 0; }
.glance .why { margin: 0; color: var(--ink-2); }
.glance .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.chip.risk-high { background: var(--pom-soft); color: var(--pom); }
.chip.risk-medium { background: var(--amber-soft); color: var(--amber); }
.chip.risk-low { background: var(--leaf-soft); color: var(--leaf); }
.chip.sure-unsure { background: var(--amber-soft); color: var(--amber); }
.desk-impact { font-size: 14px; color: var(--ink-2); }
.decide-row.equal { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 560px) { .decide-row.equal { grid-template-columns: 1.3fr 1fr 1fr; } }
.glance .chip { white-space: normal; }
.rule-hint { margin: 8px 0 0; font-size: 14px; }

/* Import container checklist */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.checklist li { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: start; padding: 8px 0;
  border-top: 1px solid var(--line); }
.checklist li:first-child { border-top: 0; }
.checklist p { margin: 2px 0 0; }
.checklist form { margin: 0; }
.tickbox { width: 34px; height: 34px; border-radius: 9px; border: 2px solid var(--line-2); background: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 18px; color: #fff; cursor: pointer; padding: 0; }
.checklist li.done .tickbox { background: var(--leaf); border-color: var(--leaf); }
.checklist li.done strong { color: var(--ink-2); }
.checklist li.late .tickbox { border-color: var(--pom); }
button.tickbox:hover { border-color: var(--leaf); }
.check-due { margin: 0; font-size: 14px; color: var(--amber); }

/* Late payment law panel (shop page, Armin only) */
details.latepay summary { cursor: pointer; list-style: none; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
details.latepay summary::-webkit-details-marker { display: none; }
details.latepay summary::before { content: "▸"; color: var(--ink-3); }
details.latepay[open] summary::before { content: "▾"; }
details.latepay p { margin: 10px 0 0; }

/* Today: calmer. Red is for the dots that need action, not every headline (Few: one red mark). */
.today-block.lvl-bad .today-headline { color: var(--ink); }
.today-context { display: block; font-size: 13.5px; color: var(--ink-3); margin-top: 3px; font-weight: 500; }
.today-sub { display: block; font-size: 13.5px; color: var(--ink-3); margin-top: 1px; }

/* Phone: a panel's title gets the full width; its side note goes underneath */
@media (max-width: 560px) {
  .panel-head { flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
  .panel-head > h2, .panel-head > h3 { flex: 1 1 100%; }
}

/* Supplier page: bank details guard (Armin only) */
.bankline { margin: 0 0 14px; padding: 10px 14px; border-radius: var(--r-md); background: var(--leaf-soft); color: var(--leaf); font-size: 14.5px; }
.bankline.unchecked { background: var(--amber-soft); color: var(--amber); }
.bankline span[aria-hidden] { font-weight: 800; margin-right: 4px; }

/* Phone: stage pills above the board (the board scrolls sideways; these show every stage at once) */
.stagejump { display: none; }
@media (max-width: 720px) {
  .stagejump { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 12px; padding-bottom: 4px; scrollbar-width: none; }
  .stagejump a { flex: none; display: inline-flex; gap: 6px; align-items: center; padding: 7px 11px; border-radius: 999px;
    background: #e9eee5; color: var(--forest); text-decoration: none; font-size: 14px; font-weight: 600; }
  .stagejump a b { background: #fff; border-radius: 999px; padding: 2px 7px; font-size: 13px; }
  .stagejump a em { font-style: normal; color: var(--pom); font-size: 13px; font-weight: 700; }
  .col { scroll-margin-left: 0; }
}
.today-context .fresh-old { color: var(--amber); font-weight: 700; }

/* Tab bar: a soft fade on the right while more tabs are hidden (phones) */
.tabs.more-right { -webkit-mask-image: linear-gradient(to right, #000 82%, transparent);
  mask-image: linear-gradient(to right, #000 82%, transparent); }

/* Phone: stuck purchases listed above the board (on a wide screen they're visible as red cards) */
.needs-chasing { display: none; }
@media (max-width: 720px) {
  .needs-chasing { display: block; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--pom);
    border-radius: var(--r-lg); padding: 12px 14px; margin: 0 0 12px; }
  .needs-chasing h2 { font-size: 17px; margin: 0 0 6px; }
  .needs-chasing ul { list-style: none; margin: 0; padding: 0; }
  .needs-chasing li a { display: grid; gap: 1px; padding: 8px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
  .needs-chasing li:first-child a { border-top: 0; }
  .needs-chasing li a span { font-size: 14px; color: var(--pom); }
}
.money-line { margin: -4px 0 14px; font-size: 16px; color: var(--ink-2); }
.money-line strong { color: var(--ink); }
.today-list li.today-more a { color: var(--leaf); font-weight: 600; font-size: 14px; min-height: 40px; padding-left: 18px; }
.stock-bad { color: var(--pom); font-weight: 600; }

/* "Ask Claude about this" on shop, purchase and supplier pages (Armin only) */
.ask-about { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; margin: 0 0 16px; padding: 10px;
  background: var(--forest); border-radius: var(--r-lg); }
.ask-about input[type=text] { min-height: 42px; background: #fff; }
.ask-about select { min-height: 42px; background: #fff; }
.ask-about .btn { background: var(--gold); border-color: var(--gold); color: var(--forest); font-weight: 700; }
@media (max-width: 560px) { .ask-about { grid-template-columns: 1fr auto; } .ask-about input[type=text] { grid-column: 1 / -1; } }

/* Today: the briefing's one suggestion, on its own line (one focus for the day) */
.one-thing { display: flex; gap: 10px; align-items: flex-start; padding: 12px 18px; border-top: 1px solid #eef1eb;
  background: var(--gold-soft); color: #4f3a08; text-decoration: none; font-size: 16px; }
.one-thing .star { color: var(--gold); font-size: 18px; line-height: 1.3; }
.one-thing strong { color: var(--forest); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--gold); color: var(--forest);
  padding: 10px 14px; border-radius: 10px; font-weight: 700; }
.skip:focus { top: 12px; }
.stock-warn { color: var(--amber); font-weight: 600; }
.stuck-banner { flex-wrap: wrap; }
.stuck-banner .btn-call { display: flex; justify-content: center; margin-top: 2px; flex-basis: 100%;
  background: var(--pom); border-color: var(--pom); color: #fff; font-weight: 700; }

/* Folded panels (long lists): the heading shows the count; tap to open */
details.fold > summary { cursor: pointer; list-style: none; margin-bottom: 0; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary h2::after { content: " ▸"; color: var(--ink-3); font-size: .8em; }
details.fold[open] > summary h2::after { content: " ▾"; }
details.fold[open] > summary { margin-bottom: 12px; }
.fold-count { font: 600 14px/1.2 var(--f-body); color: var(--ink-3); margin-left: 6px; }
.bad-text { color: var(--pom); }
@media (max-width: 560px) {
  .quickbar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .quickbar .btn { padding: 8px 6px; font-size: 14px; justify-content: center; text-align: center; }
}
@media (max-width: 560px) { .stuck-banner > span[aria-hidden] { display: none; } }

/* Help page */
.help-list { margin: 0; padding-left: 20px; display: grid; gap: 12px; font-size: 16px; line-height: 1.5; }
.help-list li::marker { color: var(--gold); }
.stuck-banner .chase-ask { flex-basis: 100%; margin: 0; }
.stuck-banner .chase-ask .btn { width: 100%; justify-content: center; background: #fff; color: var(--pom); border-color: #e7c2c5; }

/* Statement on demand (shop card -> new tab): waiting for the office PC */
.stmt-wait { max-width: 560px; padding: 20px 22px; }
.stmt-msg { font-size: 17px; font-weight: 600; color: var(--forest); margin: 0 0 14px; }
.stmt-bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; margin-bottom: 12px; }
.stmt-bar span { display: block; width: 35%; height: 100%; border-radius: 99px; background: var(--gold);
  animation: stmt-slide 1.4s ease-in-out infinite; }
@keyframes stmt-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(290%); } }
.stmt-stopped .stmt-bar { display: none; }
.stmt-stopped .stmt-msg { color: var(--pom); }
@media (prefers-reduced-motion: reduce) { .stmt-bar span { animation: none; width: 100%; opacity: .5; } }

/* Bot chats: what the bots asked each rep and what he answered */
.daynav { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chat-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.chat-head { margin-bottom: 12px; }
.chat-head p { margin: 4px 0 0; }
.chat { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.msg { max-width: 90%; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: #f4f6f2; }
.msg.bot { justify-self: start; border-bottom-left-radius: 4px; }
.msg.rep { justify-self: end; background: var(--leaf-soft); border-color: transparent; border-bottom-right-radius: 4px; }
.msg .meta { font-size: 12px; color: var(--ink-3); margin-bottom: 4px; }
.msg .body { font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.msg .chip { margin-top: 8px; display: inline-block; }
.msg details summary { cursor: pointer; font-size: 13px; color: var(--ink-2); }
.msg details .body { margin-top: 6px; }
.msg .body .gap { height: 8px; }
