/* ==========================================================================
   Point2Point New Zealand: "Object UI" design system
   Oat page, paper surfaces, moss for the brand. Soft rounded surfaces, no borders and no rules:
   things are separated by a change of surface colour and by space. Lists are slips (rounded rows
   6px apart). Fields are filled. Familjen Grotesk for words, Martian Mono for data only.
   A few flat parcel objects, used sparingly: the luggage tag, the docket, the tape.
   Documented in docs/DESIGN-SYSTEM.md and shown live at /_kit (development only).

   Contents
    1. Fonts                                   13. Slips, rate card, key-value, docket (order summary)
    2. Tokens                                  14. Objects: tape, tag, tag card, depot tag, cut-off strip
    3. Type roles                              15. Steps (pills) and progress (rounded bars)
    4. Base                                    16. Panels, empty states, stats
    5. Layout, bands, surfaces, page heads     17. Tracking log, confirm, secret, upload
    6. Utilities                               18. Site header
    7. Icons                                   19. Site footer
    8. Buttons and links                       20. Marketing pieces (photo, quotes, board, sheet, code, route …)
    9. Fields: tool fields, long-form fields   21. Console shell (staff areas and account), layout helpers
   10. Alerts, flash, error summary            22. Shipping label and print
   11. Status sticker, service chips, depots   23. Error pages
   12. Tables, filters, bulk bar, pager, tabs  24. Kit page (/_kit only)
   Breakpoints (use these three only): lg ≤ 1180px, md ≤ 960px, sm ≤ 640px.
   Within md, two refinements for foldables and wide phones (section 25): a two-column tier from 720px (main + a
   narrower side column; side blocks sit two-up from 600px) and short screens (max-height: 500px, phones held
   sideways), where sticky and fixed bars give the height back. Touch sizes (44px targets, 12px smallest type)
   apply to every screen ≤ 960px and to any coarse pointer.
   ========================================================================== */


/* ==========================================================================
   1. Fonts: Familjen Grotesk (400–700) and Martian Mono (400, 500), self-hosted from the npm packages
   by src/app.js at /fonts/familjen and /fonts/martian. The latin-ext files carry the macron vowels (Māngere).
   ========================================================================== */

@font-face { font-family: "Familjen Grotesk"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/familjen/familjen-grotesk-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Familjen Grotesk"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/familjen/familjen-grotesk-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Familjen Grotesk"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/familjen/familjen-grotesk-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Familjen Grotesk"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/familjen/familjen-grotesk-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Familjen Grotesk"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/familjen/familjen-grotesk-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Familjen Grotesk"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/familjen/familjen-grotesk-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Familjen Grotesk"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/familjen/familjen-grotesk-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Familjen Grotesk"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/familjen/familjen-grotesk-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Martian Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/martian/martian-mono-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Martian Mono"; font-style: normal; font-weight: 500 700; font-display: swap; src: url("/fonts/martian/martian-mono-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Martian Mono"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/fonts/martian/martian-mono-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }


/* ==========================================================================
   2. Tokens
   ========================================================================== */

:root {
  /* Palette (the only colours) */
  --oat: #EBE9DA;          /* page */
  --oat-deep: #DEDCC6;     /* bands, secondary buttons, todo steps, track of a bar */
  --slip: #FAF9F2;         /* "paper": surfaces, tags, dockets, slips, fields on oat */
  --lichen: #D4DFBE;       /* selected / current / result */
  --sprout: #BEE09E;       /* tape, hubs, latest */
  --moss: #3A6535;         /* brand, primary actions, done */
  --moss-deep: #243D21;    /* footer, dark bands, admin bar */
  --ink: #1C231E;          /* text */
  --ink-2: #565C53;        /* muted text (≥ 4.5:1 on oat, oat-deep, slip and lichen) */
  --tomato: #B23C25;       /* errors and failures only */
  --tomato-2: #F4DED6;     /* the rare error surface (a failed payment summary) */
  --on-dark: #EBE9DA;      /* text on moss-deep and ink */
  --on-dark-2: #C9D3B8;    /* muted text on moss-deep (7.9:1) */

  /* Surfaces. Components read these, never fixed colours, so they sit correctly on every surface:
     --surface  the surface they are on
     --inset    rows, slips, choices and alerts on that surface (slip on oat, oat on slip)
     --inset-2  hover on an inset row
     --field    a filled field on that surface (slip on oat, oat on slip, slip on dark) */
  --surface: var(--oat); --inset: var(--slip); --inset-2: #F3F2E7; --field: var(--slip);
  --fg: var(--ink); --fg-2: var(--ink-2);
  --link: var(--moss); --link-hover: var(--moss-deep);
  --focus: var(--moss);
  --focus-ring: rgba(58, 101, 53, .24);
  --field-line: #73786A;        /* every field's box line: 3:1 or better on slip, oat, oat-deep, lichen and sprout */
  --field-line-hover: var(--ink-2);
  --err-text: var(--tomato);
  --tbl-group: transparent; --tbl-hover: var(--inset-2); --tbl-selected: var(--lichen);

  /* Legacy names, kept so older area stylesheets keep working. New code uses the names above.
     There are no rules any more: every rule token draws nothing. */
  --paper: var(--oat); --paper-2: var(--oat-deep); --label: var(--slip);
  --green: var(--moss); --green-2: var(--moss-deep); --green-3: var(--lichen);
  --kraft: var(--sprout); --kraft-line: var(--sprout);
  --red: var(--tomato); --red-2: var(--tomato-2);
  --ochre: var(--ink-2); --ochre-2: var(--oat-deep); --ochre-line: var(--ink-2);
  --ink-3: var(--ink-2); --hair: rgba(28, 35, 30, .12); --hair-2: rgba(28, 35, 30, .07);
  --on-green-2: var(--on-dark-2); --on-dark-rule: rgba(235, 233, 218, .14); --on-dark-rule-2: rgba(235, 233, 218, .24);
  --line: transparent; --line-hair: transparent; --line-soft: rgba(28, 35, 30, .08);
  --rule-heavy: 0 solid transparent; --rule: 0 solid transparent; --rule-hair: 0 solid transparent; --rule-soft: 0 solid transparent;
  --box: 2px solid transparent;
  --tint: rgba(28, 35, 30, .04); --tint-2: rgba(28, 35, 30, .07);
  --on-fg: var(--slip);

  /* Families */
  --f-sans: "Familjen Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --f-cond: var(--f-sans);
  --f-mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Spacing */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;
  --band-y: clamp(64px, 8vw, 128px);
  --gutter: clamp(16px, 4.2vw, 72px);
  --col-gap: 24px;
  --maxw: 1296px;
  --slip-gap: 6px;          /* the gap between slips, table rows and step pills */

  /* Radii: soft, never pill-round except the status sticker and markers */
  --r-s: 8px; --r: 12px; --r-l: 16px; --r-xl: 20px;

  /* Layers */
  --z-sticky: 10; --z-header: 20; --z-menu: 30; --z-skip: 50;
}


/* ==========================================================================
   3. Type roles. One family for words (Familjen Grotesk), one for data (Martian Mono).
   Headings 600, tight but never touching (-0.03em). Sentence case everywhere: no uppercase captions.

   role      weight  size                           line-height  use
   display   600     clamp(52px, 7.2vw, 104px)      .92          one headline per page at most (home, tracking result)
   h1        600     clamp(40px, 5vw, 72px)         .98          page titles
   h2        600     clamp(28px, 2.8vw, 40px)       1.05         section titles
   h3        600     22px                           1.2          panel titles, list titles, docket titles
   ui        600     16px (ui-s 15px, ui-xs 14px)   1.25         buttons, labels, nav, tabs, status words
   body      400     17px (lede 20px, small 15px)   1.5          running text
   caption   600     14px, muted, sentence case     1.3          table headers, small group labels
   data      400     13 / 15 / 24 / 36px (mono)     1.35         tracking numbers, codes, prices, times
   ========================================================================== */

:root {
  --display-size: clamp(3.25rem, 7.2vw, 6.5rem); --display-weight: 600; --display-lh: .92; --display-track: -.045em;
  --h1-size: clamp(2.5rem, 5vw, 4.5rem); --h1-weight: 600; --h1-lh: .98; --h1-track: -.035em;
  --h2-size: clamp(1.75rem, 2.8vw, 2.5rem); --h2-weight: 600; --h2-lh: 1.05; --h2-track: -.025em;
  --h3-size: 1.375rem; --h3-weight: 600; --h3-lh: 1.2; --h3-track: -.015em;
  --ui-size: 1rem; --ui-size-s: .9375rem; --ui-size-xs: .875rem; --ui-weight: 600; --ui-lh: 1.25;
  --body-size: 1.0625rem; --lede-size: 1.25rem; --small-size: .9375rem; --xs-size: .8125rem;
  --body-weight: 400; --body-lh: 1.5; --small-lh: 1.45; --strong-weight: 600;
  --caption-size: .875rem; --caption-weight: 600; --caption-track: 0; --caption-lh: 1.3;
  --data-s: .8125rem; --data-m: .9375rem; --data-l: 1.5rem; --data-xl: 2.25rem;
  --data-weight: 400; --data-weight-strong: 500; --data-lh: 1.35;
  /* legacy width tokens (Familjen has one width) */
  --display-stretch: 100%; --h1-stretch: 100%; --h2-stretch: 100%; --h3-stretch: 100%; --ui-stretch: 100%;
}

.t-display, .err__code {
  font-family: var(--f-sans); font-size: var(--display-size); font-weight: var(--display-weight);
  line-height: var(--display-lh); letter-spacing: var(--display-track);
}
.t-h1, .page-title, .section-title, .err__title {
  font-family: var(--f-sans); font-size: var(--h1-size); font-weight: var(--h1-weight);
  line-height: var(--h1-lh); letter-spacing: var(--h1-track);
}
.t-h2, .band-title, .dep__svc, .stat__value, .contact__big, .kit-title, .admin-title, .shell__title, .price__title, .route__code {
  font-family: var(--f-sans); font-size: var(--h2-size); font-weight: var(--h2-weight);
  line-height: var(--h2-lh); letter-spacing: var(--h2-track);
}
.t-h3, .panel__title, .tag__title, .quote__name, .ratecard dt, .empty__title, .merge__title,
.summary__title, .errsum__title, .kit-sub, .confirm__title, .docket__title {
  font-family: var(--f-sans); font-size: var(--h3-size); font-weight: var(--h3-weight);
  line-height: var(--h3-lh); letter-spacing: var(--h3-track);
}
.t-ui, .btn, .nav__list a, .nav__acct a, .nav__acct button, .menu-btn, .hdr__login, .topics a, .field__label,
.tabs__link, .pager__list a, .pager__list span, .steps__i, .ftr__head, .alert__title,
.choice__title, .summary dt, .depot__city, .route__city, .table th[scope="row"], .tool__cap,
.stepm__now, .link-btn, .st, .log__title, .fchip, .live, .shell__count, .th-sort a, .link-go, .filters__label {
  font-family: var(--f-sans); font-size: var(--ui-size); font-weight: var(--ui-weight); line-height: var(--ui-lh);
}
.t-ui-s, .btn--sm, .pager__list a, .pager__list span, .tabs--s .tabs__link, .link-btn--s, .fchip, .shell__count,
.field__label, .tool__cap, .st, .steps__i {
  font-size: var(--ui-size-s);
}
.t-ui-xs, .st--s, .live, .filters__label { font-size: var(--ui-size-xs); font-variant-numeric: tabular-nums; }
.th-sort a { font: inherit; }
.t-body, body {
  font-family: var(--f-sans); font-size: var(--body-size); font-weight: var(--body-weight); line-height: var(--body-lh);
}
.t-lede, .lede { font-size: var(--lede-size); line-height: 1.45; color: var(--fg-2); }
.t-small, .small, .field__hint, .field__error, .photo__cap, .alert, .hint, .ftr, .empty__text,
.price__note, .sheet__foot, .kv dd, .kv dt, .route__site, .code__cap, .stat__label, .pager__info,
.log__desc, .log__where, .secret__note, .bulkbar__count, .upload-result__summary, .summary__note {
  font-size: var(--small-size); line-height: var(--small-lh);
}
.t-xs { font-size: var(--xs-size); line-height: 1.4; }
.t-strong, strong, b { font-weight: var(--strong-weight); }
/* caption: sentence case, muted, semibold. Never uppercase, never letterspaced. */
.t-caption, .table thead th, .dep thead th, .sheet__table th, .label__cap {
  font-family: var(--f-sans); font-size: var(--caption-size); font-weight: var(--caption-weight);
  line-height: var(--caption-lh); letter-spacing: 0; text-transform: none;
}
/* data: Martian Mono, only for data tokens. A price inside a sentence stays in the sans (use .tnum). */
.t-data, .mono, code, kbd, samp, pre, .svc, .depot__code, .tag__num, .quote__price, .dep__price,
.table .num, .table td.data, .sheet__table td, .code, .label__track, .label__sort, .stat__value--data, .log__time, .choice__price {
  font-family: var(--f-mono); font-weight: var(--data-weight); line-height: var(--data-lh);
  font-feature-settings: "zero" 1, "tnum" 1; font-variant-numeric: tabular-nums slashed-zero; letter-spacing: 0;
}
.t-data-s, .svc, .table .num, .table td.data, .sheet__table td, .code, .log__time { font-size: var(--data-s); }
.t-data-m, .tag__num, .choice__price { font-size: var(--data-m); }
.t-data-l, .quote__price { font-size: var(--data-l); }
.t-data-xl, .dep__price, .stat__value--data { font-size: var(--data-xl); }
.table td.data, .table .num { font-size: var(--data-s); }


/* ==========================================================================
   4. Base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 16px; }
body { margin: 0; background: var(--oat); color: var(--ink); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-kerning: normal; overflow-wrap: break-word; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1.5px; }
a:hover { color: var(--link-hover); }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-size: inherit; font-weight: inherit; }
/* No heading or short paragraph ends on one orphaned word */
h1, h2, h3 { text-wrap: balance; }
p, li, dd, figcaption { text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.prose ul, .prose ol { padding-left: 1.25em; margin: 0 0 1em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .35em; }
.prose h2 { margin: 1.6em 0 .5em; font-size: 1.75rem; font-weight: 600; line-height: 1.1; letter-spacing: -.02em; }
.prose h3 { margin: 1.4em 0 .4em; font-size: var(--h3-size); font-weight: 600; letter-spacing: -.01em; }
.prose > :first-child { margin-top: 0; }
.prose a { color: var(--link); }
dl, dd { margin: 0; }
figure { margin: 0; }
hr { border: 0; height: 0; margin: var(--s-7) 0; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
table { border-collapse: collapse; width: 100%; }
abbr[title] { text-decoration: none; }
[hidden] { display: none !important; }
::selection { background: var(--lichen); color: var(--ink); }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
:focus:not(:focus-visible) { outline: none; }

.skip {
  position: absolute; left: var(--s-2); top: -80px; z-index: var(--z-skip);
  background: var(--ink); color: var(--slip); padding: 10px 14px; border-radius: var(--r-s); text-decoration: none;
}
.skip:focus { top: var(--s-2); color: var(--slip); }

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


/* ==========================================================================
   5. Layout, bands, surfaces, page heads
   ========================================================================== */

.wrap { max-width: calc(var(--maxw) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: calc(820px + 2 * var(--gutter)); }

/* 12-column grid: children take .col-N (span) and optionally .start-N. Everything stacks at md. */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: var(--s-6); }
.grid > * { min-width: 0; grid-column: 1 / -1; }
.grid--top { align-items: start; }
.grid--end { align-items: end; }
.grid > .col-2 { grid-column: auto / span 2; } .grid > .col-3 { grid-column: auto / span 3; } .grid > .col-4 { grid-column: auto / span 4; }
.grid > .col-5 { grid-column: auto / span 5; } .grid > .col-6 { grid-column: auto / span 6; } .grid > .col-7 { grid-column: auto / span 7; }
.grid > .col-8 { grid-column: auto / span 8; } .grid > .col-9 { grid-column: auto / span 9; } .grid > .col-12 { grid-column: 1 / -1; }
.grid > .start-2 { grid-column-start: 2; } .grid > .start-3 { grid-column-start: 3; } .grid > .start-4 { grid-column-start: 4; }
.grid > .start-5 { grid-column-start: 5; } .grid > .start-6 { grid-column-start: 6; } .grid > .start-7 { grid-column-start: 7; }
.grid > .start-8 { grid-column-start: 8; } .grid > .start-9 { grid-column-start: 9; } .grid > .start-10 { grid-column-start: 10; }
@media (max-width: 960px) {
  .grid > [class*="col-"] { grid-column: 1 / -1 !important; }
  .grid > .md-col-6 { grid-column: span 6 !important; }
}

/* Two-column form grid */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid > * { min-width: 0; }
.form-grid > .span-2 { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid, .form-grid--3 { grid-template-columns: minmax(0, 1fr); } }

/* Bands: full-width sections with one background each. They separate by colour, never by a rule. */
.band { padding-block: var(--band-y); }
.band--tight { padding-block: var(--s-7); }
.band--flush-top { padding-top: 0; }
.band--paper { background: var(--oat); color: var(--ink); }
.band--paper-2, .band--deep { background: var(--oat-deep); color: var(--ink); }
.band--label { background: var(--slip); color: var(--ink); }
.band--lichen { background: var(--lichen); color: var(--ink); }
.band--green, .band--moss { background: var(--moss-deep); }
.band--ink { background: var(--ink); }
.band--rule { border-top: 0; }   /* kept for old markup: draws nothing */

/* Surface scopes. A surface sets what its children sit on: fields and rows flip between slip and oat. */
.band--paper-2, .band--deep, .band--lichen {
  --surface: var(--oat-deep); --inset: var(--slip); --inset-2: #F3F2E7; --field: var(--slip);
}
.band--lichen { --surface: var(--lichen); }
.band--label, .panel, .summary, .docket, .obj-docket__paper, .obj-tag, .obj-card, .tag, .tag-card, .confirm, .filters,
.sheet, .bulkbar, .kit-demo--label, .surface-slip {
  --surface: var(--slip); --inset: var(--oat); --inset-2: #E4E2CF; --field: var(--oat);
}
.panel--flat { --surface: inherit; }
/* Dark surfaces: moss-deep bands, ink bands, dark panels. Text is oat; fields stay light. */
.band--green, .band--moss, .band--ink, .panel--ink, .surface-dark {
  color: var(--on-dark);
  --surface: var(--moss-deep); --inset: rgba(235, 233, 218, .09); --inset-2: rgba(235, 233, 218, .14); --field: var(--slip);
  --fg: var(--on-dark); --fg-2: var(--on-dark-2); --link: var(--sprout); --link-hover: var(--slip);
  --focus: var(--sprout); --focus-ring: rgba(190, 224, 158, .5); --err-text: #F6B3A3; --on-fg: var(--ink);
  --tbl-hover: rgba(235, 233, 218, .14); --tbl-selected: rgba(212, 223, 190, .22);
}
.band--ink, .surface-dark.surface-ink { --surface: var(--ink); }
:is(.band--green, .band--moss, .band--ink, .panel--ink, .surface-dark) ::selection { background: var(--sprout); color: var(--ink); }
/* Light islands inside a dark surface go back to the light tokens */
:is(.band--green, .band--moss, .band--ink, .panel--ink, .surface-dark) :is(.panel:not(.panel--ink), .summary, .docket, .tag, .tag-card, .sheet,
.filters, .confirm, .alert, .errsum, .code, .bulkbar, .upload__box, .label, .obj-docket__paper, .obj-tag, .obj-card, .slip--light) {
  color: var(--ink);
  --fg: var(--ink); --fg-2: var(--ink-2); --link: var(--moss); --link-hover: var(--moss-deep); --focus: var(--moss); --focus-ring: rgba(58, 101, 53, .24);
  --err-text: var(--tomato); --on-fg: var(--slip); --tbl-hover: #E4E2CF; --tbl-selected: var(--lichen);
}

/* Section header: title + intro split across the grid, then space. */
.section-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: end; margin-bottom: var(--s-7); }
.section-head > * { min-width: 0; }
.section-head .section-title { grid-column: 1 / span 6; font-size: var(--h2-size); line-height: var(--h2-lh); }
.section-head__intro { grid-column: 7 / span 6; }
.section-head--ruled { margin-bottom: var(--s-7); }
@media (max-width: 960px) {
  .section-head .section-title, .section-head__intro { grid-column: 1 / -1; }
  .section-head__intro { margin-top: var(--s-4); }
}
.band-cap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-2) var(--s-5); margin-bottom: var(--s-4); }
.band-cap__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-1) var(--s-4); margin: 0; }
.band-cap__meta { margin: 0; color: var(--fg-2); font-size: var(--small-size); }
.inline-head { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); align-items: baseline; gap: var(--s-2) var(--s-6); margin-bottom: var(--s-6); }
.inline-head > * { min-width: 0; margin: 0; }
.inline-head__text { max-width: 44em; color: var(--fg-2); }
@media (max-width: 960px) { .inline-head { grid-template-columns: minmax(0, 1fr); } }
.photo-split { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: var(--s-5); align-items: center; }
.photo-split > * { min-width: 0; }
.photo-split > .photo { grid-column: 1 / span 6; }
.photo-split > .photo-split__text { grid-column: 8 / span 5; }
.photo-split--rev > .photo { grid-column: 7 / span 6; grid-row: 1; }
.photo-split--rev > .photo-split__text { grid-column: 1 / span 5; grid-row: 1; }
.photo-split__text > * + * { margin-top: var(--s-4); }
@media (max-width: 960px) {
  .photo-split > .photo, .photo-split > .photo-split__text,
  .photo-split--rev > .photo, .photo-split--rev > .photo-split__text { grid-column: 1 / -1; grid-row: auto; }
}

/* Inner page head: crumbs or a back link, the title, a lede. Space below it, no rule. */
.page-head { padding: var(--s-6) 0 0; margin-bottom: var(--s-7); }
.page-head--actions { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-4) var(--s-6); }
.page-head--actions > :first-child { flex: 1 1 32em; min-width: 0; }
.page-head--actions > .page-actions { flex: none; }
@media (max-width: 640px) {
  .page-head { padding-top: var(--s-4); margin-bottom: var(--s-6); }
  .page-head--actions > .page-actions { flex: 1 1 100%; }
  .page-head--actions > .page-actions > .btn:not(.btn--text) { flex: 1 1 100%; }
}
.page-head .page-title { max-width: 18ch; }
.page-head .lede { margin-top: var(--s-4); max-width: 36em; }
.crumbs { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-4); font-size: var(--small-size); color: var(--fg-2); }
.crumbs li + li::before { content: "/"; margin-right: var(--s-2); color: var(--fg-2); }
.crumbs a { color: var(--fg-2); text-decoration: none; font-weight: 600; }
.crumbs a:hover { color: var(--fg); text-decoration: underline; }
.crumbs [aria-current] { color: var(--fg); }
/* "← Back to …" link above a title */
.back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-bottom: var(--s-2); font-weight: 600; font-size: var(--small-size); text-decoration: none; color: var(--fg); }
.back::before { content: ""; width: 16px; height: 16px; flex: none; background: currentColor; -webkit-mask: var(--arrow-l) center / contain no-repeat; mask: var(--arrow-l) center / contain no-repeat; }
.back:hover { text-decoration: underline; }
.eyebrow-step { display: block; margin-bottom: var(--s-2); color: var(--fg-2); font-size: var(--small-size); }

/* Stack and cluster */
.stack > * + * { margin-top: var(--s-4); }
.stack > input[type="hidden"]:first-child + * { margin-top: 0; }
.stack--s > * + * { margin-top: var(--s-2); }
.stack--l > * + * { margin-top: var(--s-6); }
.stack--xl > * + * { margin-top: var(--s-7); }
.list-spaced > * + * { margin-top: var(--s-5); }
/* .list-ruled (old name): now a list of slips */
.list-ruled { display: grid; gap: var(--slip-gap); }
.list-ruled > * { padding: 14px 18px; border-radius: var(--r); background: var(--inset); }
.list-ruled--l > * { padding: 18px 22px; }
.list-bullets { list-style: disc; padding-left: 1.25em; }
.list-bullets > li + li { margin-top: .35em; }
ol.list-bullets { list-style: decimal; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-4); }
.cluster--s { gap: var(--s-2); }
.cluster--between { justify-content: space-between; }
.cluster--end { justify-content: flex-end; }
.cluster--baseline { align-items: baseline; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-6); }
@media (max-width: 960px) { .split { grid-template-columns: minmax(0, 1fr); } }
.measure { max-width: 38em; }
/* Main column + side column (booking, tracking, account overview) */
.aside-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 44px; align-items: start; }
.aside-layout > * { min-width: 0; }
@media (max-width: 1180px) { .aside-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; } }
@media (max-width: 960px) { .aside-layout { grid-template-columns: minmax(0, 1fr); } }
/* Foldables and phones held sideways (720–960px): the side column stays beside the main one, a little narrower */
@media (min-width: 720px) and (max-width: 960px) { .aside-layout { grid-template-columns: minmax(0, 1fr) minmax(250px, 35%); gap: 24px; } }


/* ==========================================================================
   6. Utilities
   ========================================================================== */

.visually-hidden, .sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.text-left { text-align: left; } .text-right { text-align: right; } .text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.muted { color: var(--fg-2); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.tnum { font-variant-numeric: tabular-nums; }
.mt-0 { margin-top: 0 !important; } .mt-s { margin-top: var(--s-3) !important; } .mt-m { margin-top: var(--s-5) !important; }
.mt-l { margin-top: var(--s-7) !important; } .mb-0 { margin-bottom: 0 !important; } .mb-m { margin-bottom: var(--s-5) !important; }
.mb-l { margin-bottom: var(--s-7) !important; }
.rule-top { padding-top: var(--s-5); }         /* old name: space only */
.rule-soft-top { padding-top: var(--s-5); }
.surface-tint { background: var(--inset); border-radius: var(--r); padding: 4px 10px; }
.surface-label { background: var(--slip); color: var(--ink); border-radius: var(--r); padding: 4px 10px; }
:not(pre) > code { font-size: .82em; padding: .1em .4em; border-radius: 6px; background: var(--inset); overflow-wrap: anywhere; }
.table :not(pre) > code, .kv :not(pre) > code { background: none; padding: 0; font-size: var(--data-s); }
@media (max-width: 640px) { .hide-sm { display: none !important; } }
@media (min-width: 641px) { .show-sm { display: none !important; } }
@media (max-width: 960px) { .hide-md { display: none !important; } }
@media (min-width: 961px) { .show-md { display: none !important; } }


/* ==========================================================================
   7. Icons: <svg class="i" aria-hidden="true"><use href="#i-arrow"/></svg> (sprite in partials/head).
   Masks for arrows drawn by CSS (.btn--go, .back, .link-go without an svg).
   ========================================================================== */

:root {
  --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --arrow-l: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 12H5M11 6l-6 6 6 6' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 7.5 5 5 5-5' fill='none' stroke='%231C231E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3.5 8.5 3 3 6-7' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: -3px; }
.i--s { width: 14px; height: 14px; vertical-align: -2px; }
.i--l { width: 24px; height: 24px; }


/* ==========================================================================
   8. Buttons and links
   .btn + one of: --primary (moss, one per view) | --ink (header, dark CTA) | --outline / --secondary (oat-deep fill)
   | --lichen (a soft "find" or filter action) | --paper (slip, on dark bands) | --danger (tomato) | --text.
   Sizes: default 48px, --sm 40px, --lg 56px. --go adds the arrow after the label. --block fills the width.
   ========================================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 20px; margin: 0;
  border: 0; border-radius: var(--r); background: var(--oat-deep); color: var(--ink);
  text-decoration: none; white-space: nowrap; cursor: pointer; text-align: center;
  transition: background-color .12s, color .12s;
}
.btn:hover { color: var(--ink); }
/* Phones and foldables: a long label wraps onto a second line instead of pushing the page sideways */
@media (max-width: 960px) { .btn { white-space: normal; padding-block: 6px; } }
.btn--sm { min-height: 40px; padding: 0 16px; gap: 8px; border-radius: 10px; }
@media (max-width: 960px), (pointer: coarse) { .btn--sm { min-height: 44px; } }
.btn--lg { min-height: 56px; padding: 0 26px; font-size: 1.0625rem; }
.btn--block { display: flex; width: 100%; }
.btn--primary { background: var(--moss); color: var(--slip); }
.btn--ink { background: var(--ink); color: var(--slip); }
.btn--outline, .btn--secondary { background: var(--oat-deep); color: var(--ink); }
.btn--lichen { background: var(--lichen); color: var(--ink); }
.btn--paper { background: var(--slip); color: var(--ink); }
.btn--danger { background: var(--tomato); color: var(--slip); }
.panel .btn--outline, .summary .btn--outline, .docket .btn--outline, .band--label .btn--outline { background: var(--oat-deep); }
.band--paper-2 .btn--outline, .band--deep .btn--outline { background: var(--slip); }
:is(.band--green, .band--moss, .band--ink, .panel--ink, .surface-dark) .btn--outline { background: rgba(235, 233, 218, .14); color: var(--on-dark); }
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: var(--moss-deep); color: var(--slip); }
  .btn--ink:hover { background: var(--moss-deep); color: var(--slip); }
  .btn--outline:hover, .btn--secondary:hover, .btn:not([class*="btn--"]):hover { background: var(--lichen); color: var(--ink); }
  .btn--lichen:hover { background: var(--sprout); color: var(--ink); }
  .btn--paper:hover { background: var(--lichen); color: var(--ink); }
  .btn--danger:hover { background: #8F2F1C; color: var(--slip); }
  :is(.band--green, .band--moss, .band--ink, .panel--ink, .surface-dark) .btn--outline:hover { background: rgba(235, 233, 218, .24); color: var(--slip); }
}
.btn--primary:active { background: var(--moss-deep); }
.btn--go::after {
  content: ""; width: 18px; height: 18px; flex: none; background: currentColor;
  -webkit-mask: var(--arrow) center / contain no-repeat; mask: var(--arrow) center / contain no-repeat;
}
.btn--text {
  min-height: 44px; padding: 0; border-radius: 0; background: none; color: var(--link);
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 5px;
}
.btn--text:hover { background: none; color: var(--link-hover); text-decoration-thickness: 2px; }
.btn:disabled, .btn[aria-disabled="true"], .btn.is-disabled { background: var(--oat-deep); color: var(--ink-2); cursor: not-allowed; }
.btn--text:disabled { background: none; color: var(--ink-2); }
.btn.is-loading { cursor: progress; }
.btn.is-loading::after {
  content: ""; width: 14px; height: 14px; flex: none; border-radius: 50%; background: none; -webkit-mask: none; mask: none;
  border: 2px solid currentColor; border-right-color: transparent; animation: p2p-turn .7s linear infinite;
}
@keyframes p2p-turn { to { transform: rotate(360deg); } }
.btnrow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-4); }
.btnrow--between { justify-content: space-between; }
@media (max-width: 640px) { .btnrow--stack-sm > .btn:not(.btn--text) { flex: 1 1 100%; } }

/* Links */
.link { color: var(--link); text-decoration: underline; }
.link-btn {
  display: inline; padding: 0; margin: 0; border: 0; background: none; color: inherit; cursor: pointer;
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px;
}
.link-btn:hover { color: var(--link-hover); }
/* A text link that goes somewhere: moss, semibold, underlined, arrow after */
.link-go {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--link); font-weight: 600;
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 5px;
}
.link-go:hover { color: var(--link-hover); text-decoration-thickness: 2px; }
.link-go .i { transition: transform .12s; }
.link-go:hover .i { transform: translateX(3px); }


/* ==========================================================================
   9. Fields. Filled and boxed: every field has a visible 1.5px line (--field-line, 3:1 or better on slip, oat,
   oat-deep, lichen and sprout) as well as its fill, so it reads as a box on every panel colour, and a focus ring
   (moss line + a soft ring; sprout on dark surfaces). Error: tomato line.
   Labels sit above in sentence case; hints and error messages sit under the control.
   The field colour comes from the surface (--field): slip on oat, oat on slip.

   Tool fields (partials/tool-field): <div class="tool"><label class="tool__cap">…</label><input class="tool__input"></div>
     the same filled field, label above; .tool--xl is the tall tracking field; .toolrow puts cells and a
     button on one line (aligned to the field, not the label); .joined is the card number / expiry / CVC row.
   Long-form fields (partials/field): .field > .field__label, control, .field__hint, .field__error.
   ========================================================================== */

.tool { position: relative; display: flex; flex-direction: column; min-width: 0; color: var(--fg); }
.tool__cap { display: block; margin-bottom: 8px; color: var(--fg); cursor: default; }
.tool__unit { color: var(--fg-2); font-family: var(--f-mono); font-weight: var(--data-weight); font-size: var(--xs-size); }
.tool__input {
  display: block; width: 100%; min-width: 0; min-height: 50px; margin: 0; padding: 12px 16px;
  border: 1.5px solid var(--field-line); border-radius: var(--r); background: var(--field); color: var(--ink);
  font-size: var(--body-size); line-height: 1.3; outline: none; appearance: none; -webkit-appearance: none;
  transition: border-color .12s, box-shadow .12s;
}
.tool__input::placeholder { color: var(--ink-2); opacity: 1; }
.tool__input.mono { font-size: var(--data-m); }
.tool__input[type="number"] { -moz-appearance: textfield; }
.tool__input::-webkit-outer-spin-button, .tool__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tool__input:hover { border-color: var(--field-line-hover); }
.tool__input:focus-visible, .tool__input:focus { border-color: var(--focus); box-shadow: 0 0 0 3px var(--focus-ring); outline: none; }
select.tool__input { padding-right: 44px; cursor: pointer; text-overflow: ellipsis;
  background-image: var(--chev); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px 18px; }
.tool--xl .tool__input { min-height: 64px; padding-inline: 20px; font-size: 1.125rem; }
.tool--xl .tool__input.mono { font-size: 1.125rem; letter-spacing: .01em; }
.tool.is-error .tool__input { border-color: var(--tomato); }
.tool.is-error .tool__input:focus { box-shadow: 0 0 0 3px rgba(178, 60, 37, .22); }
.tool.is-error .tool__cap { color: var(--fg); }
.tool__err, .field__error {
  display: flex; align-items: flex-start; gap: 8px; margin: 8px 0 0; color: var(--err-text);
  font-weight: 600; font-size: var(--ui-size-xs); line-height: 1.35;
}
.tool__err::before, .field__error::before, .table .row-error::before {
  content: "!"; flex: none; display: inline-grid; place-items: center; width: 16px; height: 16px; margin-top: 1px;
  border-radius: 50%; background: var(--tomato); color: var(--slip); font-family: var(--f-sans); font-size: 11px; font-weight: 700; line-height: 1;
}
/* Fields on a dark band: light field, label in the band's text colour */
.tool--flat .tool__cap { color: var(--fg); }
.tool--flat .tool__input { background: var(--slip); }
.tool--flat .tool__input:focus-visible { border-color: var(--sprout); box-shadow: 0 0 0 3px rgba(190, 224, 158, .5); }

.toolrow { display: flex; align-items: flex-end; gap: 10px; }
.toolrow > .tool { flex: 1 1 auto; }
.toolrow > .btn { flex: none; min-height: 50px; }
.toolrow > .tool--xl ~ .btn, .toolrow > .btn.tag__go { min-height: 64px; padding-inline: 28px; }
.joined { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.joined--2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 640px) {
  .joined { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .joined > .tool:first-child { grid-column: 1 / -1; }
}

.field { min-width: 0; }
.field + .field, .field + .fieldset, .fieldset + .field, .fieldset + .fieldset { margin-top: 20px; }
.form-grid .field + .field, .form-grid > * + * { margin-top: 0; }
.form-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 20px 16px; }
.form-row > .field, .form-row > .fieldset { flex: 1 1 12em; margin-top: 0 !important; }
.form-row > .field--auto { flex: 0 1 auto; }
* + .form-row, .form-row + * { margin-top: 20px; }
.field__label { display: block; margin-bottom: 8px; color: var(--fg); }
.field__opt, .field__req { font-weight: var(--body-weight); color: var(--fg-2); }
.field__req { color: var(--fg); }
.field__hint { margin: 6px 0 0; color: var(--fg-2); max-width: 40em; font-size: var(--xs-size); }
.fieldset > .field__hint { margin: -2px 0 10px; }
.fieldset > .field__error { margin: 0 0 10px; }

.input, .select, .textarea {
  display: block; width: 100%; min-width: 0; margin: 0;
  min-height: 50px; padding: 12px 16px; border: 1.5px solid var(--field-line); border-radius: var(--r); background-color: var(--field); color: var(--ink);
  font-size: var(--body-size); line-height: 1.35; appearance: none; -webkit-appearance: none; transition: border-color .12s, box-shadow .12s;
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--field-line-hover); }
.input::placeholder, .textarea::placeholder { color: var(--ink-2); opacity: 1; }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible, .input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px var(--focus-ring); }
.input:disabled, .select:disabled, .textarea:disabled { background-color: var(--oat-deep); border-color: #A9AC9D; border-style: dashed; color: var(--ink-2); cursor: not-allowed; }
.input[readonly] { background-color: var(--oat-deep); }
.input--w4 { max-width: calc(4ch + 2 * 16px + 4ch); }
.input--w6 { max-width: calc(6ch + 2 * 16px + 4ch); }
.input--w10 { max-width: 14em; }
.input--w20 { max-width: 24em; }
.input.mono, .input--data { font-family: var(--f-mono); font-weight: var(--data-weight); font-size: var(--data-m); font-feature-settings: "zero" 1; }
.select { padding-right: 44px; cursor: pointer; text-overflow: ellipsis;
  background-image: var(--chev); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px 18px; }
.select--auto { width: auto; max-width: 100%; }
.textarea { min-height: 120px; resize: vertical; }
.input-count { display: block; margin: 6px 0 0; color: var(--fg-2); font-size: var(--xs-size); font-variant-numeric: tabular-nums; }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea, .field.has-error .affix,
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--tomato); }
:is(.field.has-error, .tool.is-error) :is(.input, .select, .textarea):focus, :is(.input, .select, .textarea)[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(178, 60, 37, .22); }

/* Prefix / suffix inside the filled field: $ 120.00, 2 kg, 40 cm */
.affix { display: flex; align-items: center; width: 100%; border: 1.5px solid var(--field-line); border-radius: var(--r); background: var(--field); transition: border-color .12s, box-shadow .12s; }
.affix:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px var(--focus-ring); }
.affix .input, .affix .input:focus { border: 0; box-shadow: none; min-height: 47px; flex: 1 1 auto; background: transparent; }
.affix__pre, .affix__suf { flex: none; padding: 0 14px; color: var(--ink-2); font-family: var(--f-mono); font-size: var(--xs-size); }
.affix__pre { padding-right: 0; }
.affix--w6 { max-width: calc(6ch + 110px); }
.affix--w10 { max-width: 14em; }

/* Fieldset + legend. Groups ("Pickup from", "Deliver to") are separated by space, never a rule. */
.fieldset { margin-inline: 0; margin-bottom: 0; padding: 0; border: 0; min-width: 0; }
.fieldset__legend { display: block; float: none; padding: 0; margin-bottom: 10px; }
.fieldset__legend--h { margin-bottom: var(--s-4); font-size: var(--h3-size); font-weight: 600; letter-spacing: -.015em; }
.fieldset--group, .fieldset--ruled { position: relative; }
.fieldset--group > .fieldset__legend, .fieldset--ruled > .fieldset__legend { float: left; width: 100%; }
.fieldset--group > .fieldset__legend + *, .fieldset--ruled > .fieldset__legend + * { clear: both; }
* + .fieldset--group, * + .fieldset--ruled { margin-top: var(--s-7); }
.checks { display: grid; gap: 4px; }
.checks--inline { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-6); }
.checks--inline > .check + .check { margin-top: 0; }

/* Checkbox and radio: 22px, rounded box / round radio, moss when on */
.check { display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 12px; align-items: start; }
.check + .check { margin-top: var(--s-2); }
.check__input {
  width: 22px; height: 22px; margin: 1px 0 0; border: 1.6px solid var(--ink-2); border-radius: 6px; background: var(--slip);
  appearance: none; -webkit-appearance: none; cursor: pointer; display: grid; place-items: center;
}
.check__input::before { content: ""; width: 14px; height: 14px; background: var(--slip); -webkit-mask: var(--tick) center / contain no-repeat; mask: var(--tick) center / contain no-repeat; opacity: 0; }
.check__input:checked { background: var(--moss); border-color: var(--moss); }
.check__input:checked::before { opacity: 1; }
.check__input[type="radio"] { border-radius: 50%; }
.check__input[type="radio"]:checked { background: var(--slip); border: 2px solid var(--moss); }
.check__input[type="radio"]::before { width: 10px; height: 10px; border-radius: 50%; background: var(--moss); -webkit-mask: none; mask: none; }
.check__input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.check__input:disabled { background: var(--oat-deep); border-color: #B4B5A6; cursor: not-allowed; }
.check__label { padding-top: 1px; cursor: pointer; font-weight: var(--body-weight); }
.check__hint { grid-column: 2; margin: 2px 0 0; color: var(--fg-2); font-size: var(--xs-size); }
.has-error .check__input { border-color: var(--tomato); }
@media (max-width: 960px), (pointer: coarse) {
  .check { align-items: center; min-height: 44px; }
  .check + .check { margin-top: 0; }
  .check__label { padding-block: 10px; }
  .check__hint { margin-top: -6px; }
}

/* Choices (radio rows / cards): one pick. Round radio, the picked row turns lichen. */
.choices { display: grid; gap: var(--slip-gap); }
.choices--row { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.choices--row > .choice { display: flex; }
.choices--row .choice__body { flex: 1 1 auto; align-content: start; }
.choice { position: relative; display: block; cursor: pointer; font-weight: var(--body-weight); }
.choice__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice__body {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; column-gap: 12px; row-gap: 2px; align-items: center;
  min-height: 52px; padding: 12px 16px; border: 0; border-radius: var(--r); background: var(--inset); color: var(--ink);
  transition: background-color .12s;
}
.choice__body::before {
  content: ""; grid-row: 1; width: 22px; height: 22px; border-radius: 50%; background: var(--slip); box-shadow: inset 0 0 0 1.6px var(--ink-2);
}
.choice__head { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; }
.choice__title { font-size: 1.0625rem; }
.choice__price { justify-self: end; white-space: nowrap; }
.choice__meta { grid-column: 2 / -1; color: var(--ink-2); font-size: var(--small-size); }
@media (hover: hover) { .choice:hover .choice__input:not(:checked):not(:disabled) + .choice__body { background: var(--inset-2); } }
.choice__input:checked + .choice__body { background: var(--lichen); }
.choice__input:checked + .choice__body::before { background: var(--moss); box-shadow: inset 0 0 0 2px var(--moss), inset 0 0 0 6px var(--slip); }
.choice__input:checked + .choice__body .choice__meta { color: var(--ink); }
.choice__input:focus-visible + .choice__body { outline: 2px solid var(--focus); outline-offset: 2px; }
.choice__input:disabled + .choice__body { color: var(--ink-2); cursor: not-allowed; }
.choice__input:disabled + .choice__body::before { background: var(--oat-deep); box-shadow: inset 0 0 0 1.6px #B4B5A6; }
.choice__input:disabled + .choice__body .choice__price { font-family: var(--f-sans); font-size: var(--xs-size); font-weight: 600; }
.fieldset.has-error .choice__body { box-shadow: inset 0 0 0 2px var(--tomato); }
.fieldset.has-error .choice__input:checked + .choice__body { box-shadow: none; }
@media (max-width: 640px) {
  .choice__body { grid-template-columns: 22px minmax(0, 1fr); }
  .choice__price { grid-column: 2; justify-self: start; }
}


/* Address search (public/js/address-lookup.js, only when a look-up provider is set up): the first address line is a
   combobox; the list hangs under it on paper with the field's own edge, the active option on lichen. */
.addr-box { position: relative; }
.addr-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: var(--z-menu); max-height: min(340px, 55vh);
  overflow-y: auto; overscroll-behavior: contain; margin: 0; padding: 4px; list-style: none; border: 1.5px solid var(--field-line);
  border-radius: var(--r); background: var(--slip); box-shadow: 0 12px 28px rgba(28, 35, 30, .16); }
.addr-list[hidden] { display: none; }
.addr-opt { display: flex; align-items: center; min-height: 40px; padding: 8px 12px; border-radius: 8px; color: var(--ink); line-height: 1.35;
  cursor: pointer; overflow-wrap: anywhere; }
.addr-opt[aria-selected="true"] { background: var(--lichen); }
@media (hover: hover) { .addr-opt:hover { background: var(--oat); } .addr-opt[aria-selected="true"]:hover { background: var(--lichen); } }
.addr-opt--manual { margin-top: 2px; color: var(--moss); font-weight: 600; }
.addr-note { margin: 6px 0 0; color: var(--fg-2); font-size: var(--small-size); }
.addr-note[hidden] { display: none; }
@media (max-width: 960px), (pointer: coarse) { .addr-opt { min-height: 44px; } }

/* ==========================================================================
   10. Alerts, flash messages, error summary
   A rounded surface with a round glyph, no bar, no border.
   success: lichen + moss tick · info: inset + moss "i" · warning: oat-deep + ink "!" · error: inset + tomato "!"
   ========================================================================== */

.alert {
  position: relative; display: grid; grid-template-columns: 20px minmax(0, 1fr); column-gap: 12px; align-items: start;
  padding: 14px 18px; border: 0; border-radius: var(--r-l); background: var(--inset); color: var(--ink);
}
.alert > * { grid-column: 2; }
.alert::before {
  grid-column: 1; grid-row: 1 / span 3; width: 20px; height: 20px; margin-top: 1px; display: grid; place-items: center;
  border-radius: 50%; font-family: var(--f-sans); font-weight: 700; font-size: 12px; line-height: 1; content: "i";
  background: var(--moss); color: var(--slip);
}
.alert__title { margin: 0 0 2px; }
.alert p { margin: 0; }
.alert p + p { margin-top: 6px; }
.alert a { font-weight: 600; color: var(--moss); }
.alert--success { background: var(--lichen); }
.alert--success::before { content: "\2713"; background: var(--moss); }
.alert--warning { background: var(--oat-deep); }
.alert--warning::before { content: "!"; background: var(--ink); }
.alert--error::before { content: "!"; background: var(--tomato); }
.alert--error .alert__title, .alert--error > p:only-child { color: var(--tomato); }
.flashes { display: grid; gap: var(--s-2); padding-top: var(--s-4); }
.flashes .alert:focus { outline: none; }
.shell__main > .flashes, .admin__main > .flashes { padding-top: 0; margin-bottom: var(--s-5); }
/* Close button (site.js shows it); success and info messages then fade and collapse by themselves */
.alert.is-closable { padding-right: 52px; }
.alert__close {
  position: absolute; grid-column: auto; grid-row: auto; top: 7px; right: 8px; display: grid; place-items: center; width: 34px; height: 34px; padding: 0;
  border: 0; border-radius: 10px; background: none; color: var(--ink-2); cursor: pointer;
}
.alert__close:hover { background: rgba(28, 35, 30, .07); color: var(--ink); }
.alert__close:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; }
.alert__close .i { width: 16px; height: 16px; }
/* the button is a sibling, so a one-line error flash is no longer p:only-child: keep its tomato text */
.alert--error > p:first-child:has(+ .alert__close:last-child) { color: var(--tomato); }
.flashes.is-collapsing, .alert.is-collapsing { overflow: hidden; }
main[tabindex="-1"]:focus { outline: none; }
@media (max-width: 960px), (pointer: coarse) { .alert__close { top: 3px; right: 3px; width: 44px; height: 44px; } }

/* Error summary: at the top of a form after a failed submit. site.js focuses it on load. */
.errsum { padding: 16px 20px; border: 0; border-radius: var(--r-l); background: var(--inset); margin-bottom: var(--s-5); }
.errsum:focus { outline: 2px solid var(--focus); outline-offset: 3px; }
.errsum__title { display: flex; align-items: center; gap: 10px; margin-bottom: var(--s-2); color: var(--tomato); font-size: 1.0625rem; }
.errsum__title::before { content: "!"; flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--tomato); color: var(--slip); font-size: 12px; font-weight: 700; }
.errsum p { margin: 0 0 var(--s-2); }
.errsum ul { display: grid; gap: 4px; padding-left: 30px; }
.errsum a { color: var(--tomato); font-weight: 600; }
.errsum a:hover { color: var(--ink); }


/* ==========================================================================
   11. Status sticker, service chips, depot codes, route pairs
   Status (partials/status): ONE 18px sticker that fills up + the word in ink. Never a box, never a tint.
     ¼ booked · ½ in transit · ¾ out for delivery · full delivered · tomato with a bar: failed ·
     a clock hand: waiting (awaiting payment, held, pending) · a dash: inactive (cancelled, void, draft)
   The sticker is drawn with classes (.st__ring, .st__track, .st__fill, .st__bar) so print can make it black.
   ========================================================================== */

.st {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; vertical-align: middle;
  padding: 0; margin: 0; border: 0; background: none; color: var(--fg); line-height: 1.25;
}
.st__g { width: 18px; height: 18px; flex: none; }
.st--s { gap: 7px; }
.st--s .st__g { width: 16px; height: 16px; }
.st + .st { margin-left: var(--s-3); }
.st__ring { fill: var(--slip); stroke: var(--moss); }
.st__track { fill: var(--oat-deep); }
.st__fill { fill: var(--moss); }
.st__bar { stroke: var(--slip); }
.st__hand { stroke: var(--ink-2); fill: none; }
.st--bad .st__ring { stroke: var(--tomato); }
.st--bad .st__fill { fill: var(--tomato); }
.st--wait .st__ring, .st--off .st__ring { stroke: var(--ink-2); }
.st--off .st__bar { stroke: var(--ink-2); }
.st--off { color: var(--fg-2); }
.st--new { font-weight: 700; }
.st--print, .st--print[class] { color: #000; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.st--print .st__ring { fill: #fff; stroke: #000; }
.st--print .st__track { fill: #fff; }
.st--print .st__fill { fill: #000; }
.st--print .st__bar { stroke: #fff; }
.st--print .st__hand, .st--print.st--off .st__bar { stroke: #000; }

/* Service codes (ECO / OVN / SDY): a small mono chip on oat-deep */
.svc {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; vertical-align: 1px;
  padding: 3px 7px; border: 0; border-radius: 6px; color: var(--ink); background: var(--oat-deep);
  font-size: .75rem; font-weight: var(--data-weight-strong); line-height: 1.2;
}
.band--paper-2 .svc, .band--deep .svc { background: var(--slip); }
:is(.band--green, .band--moss, .band--ink, .panel--ink, .surface-dark) .svc { background: rgba(235, 233, 218, .14); color: var(--on-dark); }
.svc__name { font-family: var(--f-sans); font-weight: 600; }
.svc--l { font-size: var(--data-s); padding: 5px 10px; border-radius: 8px; }
/* Code tokens (event names, API fields): plain mono, no box */
.chip {
  display: inline; padding: 0; border: 0; color: inherit; background: none;
  font-family: var(--f-mono); font-size: var(--data-s); font-weight: var(--data-weight); line-height: 1.35; overflow-wrap: anywhere;
}
.chip--s { font-size: .75rem; }

/* Depot plates: code chip (hub on sprout) + the city in the UI face */
.depot { display: inline-flex; align-items: center; gap: 8px; vertical-align: middle; border: 0; }
.depot__code { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 6px; background: var(--oat-deep); color: var(--ink); font-size: .75rem; font-weight: var(--data-weight-strong); }
.depot__city { display: inline-flex; align-items: center; font-weight: 600; }
.depot--hub .depot__code { background: var(--sprout); }
.depot--l .depot__code { font-size: var(--data-m); padding: 6px 10px; border-radius: 8px; }
.depot--l .depot__city { font-size: 1.125rem; }
/* Route pair: origin ●—○ destination */
.od { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 600; }
.od__arrow { width: 34px; height: 10px; flex: none; }
.od__from { fill: var(--moss); }
.od__line { stroke: var(--moss); }
.od__to { fill: none; stroke: var(--moss); }
:is(.band--green, .band--moss, .band--ink, .panel--ink, .surface-dark) :is(.od__from) { fill: var(--sprout); }
:is(.band--green, .band--moss, .band--ink, .panel--ink, .surface-dark) :is(.od__line, .od__to) { stroke: var(--sprout); }
:is(.table, .log, .slip) .depot__code { background: none; padding: 0; font-size: var(--data-s); font-weight: var(--data-weight); }
:is(.table, .log, .slip) .depot--hub .depot__code { font-weight: var(--data-weight-strong); }
.table .od { gap: 8px; flex-wrap: nowrap; }
.table .od__arrow { width: 28px; }
/* The same route glyph for free text (obj-route on the home page) */
.obj-route { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.obj-route svg { flex: none; }


/* ==========================================================================
   12. Tables: calm slip rows. The header row is plain muted text, no rule; each body row is a rounded
   slip 6px from the next. Numbers: <td class="num">. Data values: <td class="data">.
   .table--dense (admin), .table--plain (explainer tables: no row fill), .table--stack-sm / --stack-md
   (rows become slip cards on narrow screens, cells need data-label="…"), .table-scroll wrapper.
   ========================================================================== */

.table { border-collapse: separate; border-spacing: 0 var(--slip-gap); margin-block: calc(-1 * var(--slip-gap)); background: transparent; }
.table caption { text-align: left; }
.table th, .table td { text-align: left; vertical-align: middle; border: 0; }
.table thead th { padding: 6px 16px 0; color: var(--fg-2); white-space: nowrap; vertical-align: bottom; font-weight: 600; }
.table thead th:first-child { padding-left: 20px; }
.table thead th:last-child { padding-right: 20px; }
.table td, .table tbody th { padding: 13px 16px; background: var(--inset); }
.table tbody tr > :first-child { padding-left: 20px; border-radius: var(--r) 0 0 var(--r); }
.table tbody tr > :last-child { padding-right: 20px; border-radius: 0 var(--r) var(--r) 0; }
.table tbody tr > :only-child { border-radius: var(--r); }
.table tbody th[scope="row"] { font-weight: 600; }
.table .num { text-align: right; white-space: nowrap; }
.table td.data { white-space: nowrap; }
.table a { color: var(--link); font-weight: 600; }
.table td.data a, .table .num a { font-weight: var(--data-weight-strong); }
.table a:hover { color: var(--link-hover); }
@media (hover: hover) { .table tbody tr:hover > * { background: var(--tbl-hover); } }
.table__group > th, .table__group > td {
  padding: 16px 20px 2px !important; background: none !important; color: var(--fg-2); border-radius: 0 !important;
  font-family: var(--f-sans); font-size: var(--small-size); font-weight: 600; text-align: left;
}
.table__sel { width: 48px; }
.table__sel .check__input { width: 20px; height: 20px; }
.table tr.is-selected > *, .table tr.is-selected:hover > * { background: var(--tbl-selected); }
.table tr.is-current > *, .table tr.is-current:hover > * { background: var(--lichen); }
.table tfoot td, .table tfoot th { padding: 12px 16px 0; background: none; font-weight: 600; }
.table tfoot tr > :first-child { padding-left: 20px; }
.table__actions { white-space: nowrap; text-align: right; }
.table__actions > * + * { margin-left: var(--s-4); }
.table__actions form { display: inline; }
.table__actions .link-btn { font-weight: 600; font-size: inherit; color: var(--link); }
.table__muted { color: var(--fg-2); }
.table td .sub { display: block; margin-top: 2px; color: var(--fg-2); font-family: var(--f-sans); font-size: var(--xs-size); white-space: normal; }
.table tr.is-error > * { background: var(--tomato-2); }
.table .row-error { display: flex; gap: 8px; margin-top: 4px; color: var(--tomato); font-family: var(--f-sans); font-size: var(--small-size); font-weight: 600; white-space: normal; }
/* Sortable headers (partials/sort-header) */
.th-sort a { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
.th-sort a:hover, .th-sort.is-sorted a { color: var(--fg); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.th-sort.num a { flex-direction: row-reverse; }
.th-sort__i { opacity: .7; }
.th-sort[aria-sort="ascending"] .th-sort__i { transform: rotate(180deg); opacity: 1; }
.th-sort[aria-sort="descending"] .th-sort__i { opacity: 1; }
/* Dense (admin) */
.table--dense { --slip-gap: 4px; }
.table--dense thead th { padding: 4px 12px 0; }
.table--dense td, .table--dense tbody th { padding: 9px 12px; font-size: var(--small-size); }
.table--dense tbody tr > :first-child, .table--dense thead th:first-child { padding-left: 16px; }
.table--dense tbody tr > :first-child { border-radius: 10px 0 0 10px; }
.table--dense tbody tr > :last-child { border-radius: 0 10px 10px 0; padding-right: 16px; }
.table--dense td.data, .table--dense .num { font-size: .75rem; }
/* Plain: explainer tables on marketing and help pages. No fill, space separates the rows. */
.table--plain td, .table--plain tbody th { background: none; padding-block: 10px; vertical-align: top; }
.table--plain tbody tr > :first-child { padding-left: 0; }
.table--plain thead th:first-child { padding-left: 0; }
@media (hover: hover) { .table--plain tbody tr:hover > * { background: none; } }
/* Boxed (old name): the same slip rows */
.table--boxed { background: transparent; border: 0; }
.table--sticky thead th { position: sticky; top: 0; z-index: var(--z-sticky); background: var(--surface); }

.table-scroll { position: relative; overflow-x: auto; overscroll-behavior-x: contain; max-width: 100%; padding-block: 2px; }
.table-scroll > .table { min-width: var(--table-min, 640px); }
.table-scroll--tall { max-height: 70vh; overflow-y: auto; }
.table-scroll--fit { --table-min: 0; }
.table-scroll.is-overflowing:not(.is-at-end) {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 56px), rgba(0, 0, 0, .15));
  mask-image: linear-gradient(to right, #000 calc(100% - 56px), rgba(0, 0, 0, .15));
}
.table-scroll:focus-visible { outline-offset: 4px; }
.table-cue { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin: 0 0 8px; color: var(--fg-2); font-size: var(--small-size); font-weight: 600; }
.table-cue .i { width: 16px; height: 16px; }

/* Stacked tables: every row becomes a slip card. Tables carry role="table" / "row" / "cell" (site.js adds any missing).
   --stack-sm and --stack-md both stack at ≤ 960px (phones, foldables, phones held sideways), where a wide table would
   only scroll sideways; from a 600px wide container the cards sit two to a row. */
@media (max-width: 960px) {
  .table-scroll:has(> .table--stack-sm, > .table--stack-md) { container: tbl / inline-size; }
  :is(.table--stack-sm, .table--stack-md) { min-width: 0 !important; margin: 0; }
  :is(.table--stack-sm, .table--stack-md) thead { display: none; }
  :is(.table--stack-sm, .table--stack-md), :is(.table--stack-sm, .table--stack-md) :is(tbody, tfoot, td), :is(.table--stack-sm, .table--stack-md) :is(tbody, tfoot) th { display: block; }
  :is(.table--stack-sm, .table--stack-md) tr { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-content: start; padding: 14px 16px; margin-bottom: var(--slip-gap); border-radius: var(--r); background: var(--inset); }
  :is(.table--stack-sm, .table--stack-md) tr.table__group { background: none; padding: 12px 0 0; }
  :is(.table--stack-sm, .table--stack-md) :is(tr.is-selected, tr.is-current) { background: var(--lichen); }
  :is(.table--stack-sm, .table--stack-md) tr > * { grid-column: 1 / -1; }
  :is(.table--stack-sm, .table--stack-md) td, :is(.table--stack-sm, .table--stack-md) :is(tbody th, tfoot td) { padding: 3px 0 !important; background: none !important; border-radius: 0 !important; text-align: left; white-space: normal; overflow-wrap: anywhere; }
  :is(.table--stack-sm, .table--stack-md) :is(td.data, .num, .data, .chip, .st) { white-space: normal; overflow-wrap: anywhere; }
  :is(.table--stack-sm, .table--stack-md) .od { flex-wrap: wrap; white-space: normal; }
  :is(.table--stack-sm, .table--stack-md) td[data-label] { position: relative; padding-left: calc(38% + 12px) !important; }
  :is(.table--stack-sm, .table--stack-md) td[data-label]::before { content: attr(data-label); position: absolute; left: 0; top: 4px; width: 38%; color: var(--fg-2); font-family: var(--f-sans); font-size: var(--xs-size); font-weight: 600; }
  :is(.table--stack-sm, .table--stack-md) .num { text-align: left; }
  :is(.table--stack-sm, .table--stack-md) td.table__sel { grid-column: 1; grid-row: 1; width: auto; }
  :is(.table--stack-sm, .table--stack-md) td.table__sel + * { grid-column: 2; grid-row: 1; }
  :is(.table--stack-sm, .table--stack-md) td.table__actions { display: flex; flex-wrap: wrap; gap: 0 var(--s-5); margin-top: 2px; text-align: left; }
  :is(.table--stack-sm, .table--stack-md) td.table__actions :is(a, .link-btn) { display: inline-flex; align-items: center; min-height: 44px; }
  :is(.table--stack-sm, .table--stack-md) td.table__actions > * + * { margin-left: 0; }
  :is(.table--stack-sm, .table--stack-md) tr.is-error { background: var(--tomato-2); }
}
/* The tbl container only exists at ≤ 960px (above), so this never reaches a desktop table */
@container tbl (min-width: 600px) {
  :is(.table--stack-sm, .table--stack-md) tbody { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--slip-gap); margin-bottom: var(--slip-gap); }
  :is(.table--stack-sm, .table--stack-md) tbody tr { margin-bottom: 0; }
  :is(.table--stack-sm, .table--stack-md) tbody tr.table__group { grid-column: 1 / -1; }
}

/* Filter bar: a slip surface with small filled controls */
.filters {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-3) var(--s-4);
  padding: 16px 18px; border: 0; border-radius: var(--r-l); background: var(--slip); margin-bottom: var(--s-5);
}
.band--label .filters, .panel .filters { background: var(--oat); --field: var(--slip); }
.filters-box { margin-bottom: var(--s-5); }
.filters-box > .filters { margin-bottom: 0; }
.filters-box__sum { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 var(--s-4); border-radius: var(--r); background: var(--slip); cursor: pointer; list-style: none; font-weight: 600; }
.filters-box__sum::-webkit-details-marker { display: none; }
.filters-box__sum::after { content: ""; width: 18px; height: 18px; margin-left: auto; background: var(--chev) center / contain no-repeat; }
.filters-box[open] > .filters-box__sum::after { transform: rotate(180deg); }
.filters-box[open] > .filters-box__sum { margin-bottom: var(--slip-gap); }
@media (min-width: 641px) { .filters-box > .filters-box__sum { display: none; } }
.filters__item { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 0 1 auto; }
.filters__item--grow { flex: 1 1 240px; }
.filters__label { color: var(--fg); }
.filters .input, .filters .select { min-height: 44px; padding-top: 8px; padding-bottom: 8px; font-size: var(--small-size); border-radius: 10px; }
@media (max-width: 960px), (pointer: coarse) { .filters .input, .filters .select, .bulkbar .select, .admin__search .input { font-size: max(1rem, 16px); } }
.filters .btnrow { margin-left: auto; }
.filters .btn { min-height: 44px; }
.filters__active { display: flex; flex-wrap: wrap; align-items: center; gap: 8px var(--s-3); margin: calc(-1 * var(--s-2)) 0 var(--s-5); }
.filters__activehead { margin: 0; color: var(--fg-2); font-size: var(--small-size); }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 12px; border: 0; border-radius: 10px; background: var(--lichen); color: var(--ink); text-decoration: none; }
.fchip__k { font-weight: var(--body-weight); color: var(--ink-2); }
@media (hover: hover) and (pointer: fine) { .fchip:hover { background: var(--sprout); color: var(--ink); } }
@media (max-width: 960px), (pointer: coarse) { .fchip, .fchips__clear { min-height: 44px; } }
.fchips__clear { min-height: 36px; }

/* Bulk selection bar */
.bulkbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3) var(--s-5); padding: 10px 12px 10px 18px; margin-bottom: var(--s-3); border-radius: var(--r-l); background: var(--slip); border: 0; }
.bulkbar__count { margin: 0; color: var(--ink-2); }
.bulkbar.has-selection { background: var(--lichen); --field: var(--slip); }
.bulkbar.has-selection .bulkbar__count { color: var(--ink); font-weight: 600; }
.bulkbar__do { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.bulkbar .select { min-height: 40px; padding-top: 6px; padding-bottom: 6px; font-size: var(--small-size); border-radius: 10px; }
@media (max-width: 960px), (pointer: coarse) { .bulkbar .select { min-height: 44px; } }
@media (max-width: 640px) {
  .filters__item, .filters__item--grow { flex: 1 1 100%; }
  .filters .btnrow { margin-left: 0; width: 100%; }
}

/* Pagination: rounded keys, the current page is moss */
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-3) var(--s-5); margin-top: var(--s-5); }
.pager__info { margin: 0; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.pager__list { display: flex; flex-wrap: wrap; gap: 4px; }
.pager__list a, .pager__list span {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 0 14px;
  border: 0; border-radius: var(--r); text-decoration: none;
}
.pager__list a:hover { background: var(--oat-deep); color: var(--ink); }
.pager [aria-current="page"] { background: var(--moss); color: var(--slip); }
.pager [aria-current="page"]:hover { background: var(--moss-deep); color: var(--slip); }
.pager .pager__gap { min-width: 24px; padding: 0 4px; }
.pager .is-disabled { color: var(--ink-2); opacity: .6; }
.pager .data { font-family: var(--f-mono); font-weight: var(--data-weight); font-size: var(--data-s); }

/* Tabs: server-side sub-navigation. Soft pills; the current one is lichen. No rail line. */
.tabs { margin-bottom: var(--s-5); border: 0; }
.tabs__list { display: flex; flex-wrap: wrap; gap: 4px; }
.tabs__link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: var(--r);
  text-decoration: none; color: var(--fg); font-weight: 500;
}
.tabs__link:hover { background: var(--oat-deep); color: var(--ink); }
.tabs__link[aria-current="page"], .tabs__link[aria-selected="true"] { background: var(--lichen); color: var(--ink); font-weight: 600; }
.tabs__count { font-family: var(--f-mono); font-weight: var(--data-weight); font-size: .75rem; }


/* ==========================================================================
   13. Slips, rate card, key-value, docket (order summary)
   Slips: <ul class="slips"><li class="slip">…</li></ul>, rounded rows 6px apart on the inset colour.
     .slip.is-current / .slip--current  lichen (the selected or current row)
     .slip.is-latest / .slip--latest    sprout (the newest scan)
     .slip__row (space-between line) · .slip__meta (muted line) · a.slip (the whole slip is a link)
   ========================================================================== */

.slips { display: grid; gap: var(--slip-gap); margin: 0; padding: 0; list-style: none; }
.slip { display: block; padding: 12px 18px 14px; border-radius: var(--r); background: var(--inset); color: var(--ink); min-width: 0; }
.slip.is-current, .slip--current, .slip[aria-current] { background: var(--lichen); }
.slip.is-latest, .slip--latest { background: var(--sprout); }
.slip__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 14px; }
.slip__row + .slip__row { margin-top: 6px; }
.slip__meta { color: var(--ink-2); font-size: var(--small-size); }
.slip__title { font-weight: 600; }
a.slip { text-decoration: none; transition: background-color .12s; }
@media (hover: hover) { a.slip:hover { background: var(--inset-2); color: var(--ink); } }
a.slip--go { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
a.slip--go::after { content: ""; width: 18px; height: 18px; flex: none; background: currentColor; -webkit-mask: var(--arrow) center / contain no-repeat; mask: var(--arrow) center / contain no-repeat; }

/* Rate card (dl of rows): each row a slip */
.ratecard { display: grid; gap: var(--slip-gap); border: 0; }
.ratecard__row { display: grid; grid-template-columns: minmax(120px, 180px) minmax(0, 1fr); gap: var(--s-4); padding: 16px 20px; border: 0; border-radius: var(--r); background: var(--inset); }
.ratecard dt { padding-top: 1px; font-size: 1.125rem; }
* + .ratecard { margin-top: var(--s-5); }
.ratecard dd { margin: 0; }
.ratecard dd .mono { white-space: nowrap; }
@media (max-width: 640px) { .ratecard__row { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* Key-value list: muted keys, plain values, space between rows */
.kv { display: grid; grid-template-columns: minmax(110px, max-content) minmax(0, 1fr); gap: 10px var(--s-5); }
.kv dt, .kv dd { padding: 0; border: 0; }
.kv dt { color: var(--fg-2); font-weight: 400; }
.kv dd { color: var(--fg); overflow-wrap: anywhere; }
.kv dd .st { white-space: normal; }
.kv--top { margin-top: var(--s-4); }
.kv--plain { gap: 6px var(--s-5); }
@media (max-width: 640px) {
  .kv { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .kv dd { margin-bottom: 10px; }
}

/* Docket: a rounded paper panel for price breakdowns, order summaries, receipts and quick prices.
   (Round 3: no tape strip and no torn zigzag edge any more; the owner read them as mistakes.)
   <div class="docket"> … </div>   .docket--plain is kept for old markup and looks the same.
   .summary is the order summary on the booking and checkout pages: a docket with lines and a total. */
.docket, .summary {
  position: relative; margin-top: 0; padding: 24px 26px 26px; border: 0; border-radius: var(--r-l); background: var(--slip); color: var(--ink);
}
.docket--plain, .summary--plain { margin-top: 0; padding-top: 24px; }
.docket__title, .summary__title { margin: 0 0 12px; }
.docket__head, .summary__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); margin-bottom: 12px; border: 0; padding: 0; }
.docket__head a, .summary__head a { color: var(--moss); font-weight: 600; font-size: var(--small-size); }
.summary__lines, .docket__lines { margin: 0; display: grid; gap: 6px; }
.summary__line, .docket__line { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4); padding: 0; border: 0; font-size: var(--small-size); }
.summary__line dt { font-weight: var(--body-weight); font-size: var(--small-size); }
.summary__line dd, .docket__line > :last-child { font-family: var(--f-mono); font-size: var(--data-s); white-space: nowrap; }
.summary__line--sub dt { color: var(--ink-2); }
.summary__line--sub dd { color: var(--ink-2); }
.summary__line--discount dd { color: var(--moss); }
.summary__total, .docket__total {
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4); margin: 16px 0 0;
  padding: 16px 18px; border: 0; border-radius: var(--r); background: var(--oat);
  font-size: 1.0625rem; font-weight: 600; letter-spacing: 0;
}
.summary__total .mono, .docket__total .mono { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: var(--data-weight); letter-spacing: -.02em; }
.summary__note, .docket__note { margin: 12px 0 0; color: var(--ink-2); font-size: var(--xs-size); }
/* The home page's docket markup (obj-docket > obj-docket__paper + obj-tape) */
.obj-docket { position: relative; margin-top: 14px; }
.obj-docket__paper { background: var(--slip); border-radius: 6px 6px 0 0; padding: 40px 30px 50px; clip-path: polygon(0 0, 100% 0, 100% 100%, 97.5% calc(100% - 9px), 95% 100%, 92.5% calc(100% - 9px), 90% 100%, 87.5% calc(100% - 9px), 85% 100%, 82.5% calc(100% - 9px), 80% 100%, 77.5% calc(100% - 9px), 75% 100%, 72.5% calc(100% - 9px), 70% 100%, 67.5% calc(100% - 9px), 65% 100%, 62.5% calc(100% - 9px), 60% 100%, 57.5% calc(100% - 9px), 55% 100%, 52.5% calc(100% - 9px), 50% 100%, 47.5% calc(100% - 9px), 45% 100%, 42.5% calc(100% - 9px), 40% 100%, 37.5% calc(100% - 9px), 35% 100%, 32.5% calc(100% - 9px), 30% 100%, 27.5% calc(100% - 9px), 25% 100%, 22.5% calc(100% - 9px), 20% 100%, 17.5% calc(100% - 9px), 15% 100%, 12.5% calc(100% - 9px), 10% 100%, 7.5% calc(100% - 9px), 5% 100%, 2.5% calc(100% - 9px), 0% 100%); }
.obj-tape, .tape { position: absolute; top: -13px; left: 50%; width: 120px; height: 28px; margin-left: -60px; background: var(--sprout); transform: rotate(-1deg); clip-path: polygon(5px 0, calc(100% - 5px) 0, 100% 12.5%, calc(100% - 5px) 25%, 100% 37.5%, calc(100% - 5px) 50%, 100% 62.5%, calc(100% - 5px) 75%, 100% 87.5%, calc(100% - 5px) 100%, 5px 100%, 0 87.5%, 5px 75%, 0 62.5%, 5px 50%, 0 37.5%, 5px 25%, 0 12.5%); }


/* ==========================================================================
   14. Objects: the luggage tag, tag cards, depot tags, the cut-off strip
   ========================================================================== */

/* Tracking box (.obj-tag): a plain rounded paper panel around the tracking field. Round 3: no chamfer and no
   punched hole (the owner read the notch and the "floating hole" as mistakes); .obj-tag__hole prints nothing. */
.obj-tag { position: relative; background: var(--slip); border-radius: var(--r-xl); }
.obj-tag__hole { display: none; }
.obj-tag__body { padding: 26px 28px 24px; }
@media (max-width: 640px) {
  .obj-tag__body { padding: 20px 18px 18px; }
}
/* Tag card (service cards, option cards): a rounded paper card. Round 3: no chamfer. .tag-card--lichen when picked. */
.obj-card, .tag-card { position: relative; background: var(--slip); border-radius: var(--r-l); }
.tag-card { padding: 24px 26px; }
.tag-card--lichen, .tag-card.is-current { background: var(--lichen); }
.tag-card--muted { background: var(--oat-deep); }
@media (max-width: 640px) { .tag-card { padding: 20px 18px; } }
/* Depot card (.depot-tag): a plain rounded paper card with the code on top; hubs on sprout. Round 3: no chamfered
   corners and no punched hole (the owner: staff screens need no luggage-tag shapes; only real labels keep them). */
.depot-tags { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.depot-tag { position: relative; display: flex; flex-direction: column; justify-content: flex-start; gap: 2px; min-height: 0; padding: 14px 16px 16px;
  border-radius: var(--r-l); background: var(--slip); color: var(--ink); }
.depot-tag--hub, .depot-tag.is-hub { background: var(--sprout); }
.depot-tag__code { font-family: var(--f-mono); font-size: clamp(1.5rem, 2.2vw, 2rem); font-weight: 500; letter-spacing: -.02em; line-height: 1.1; }
.depot-tag__city { margin-top: 6px; font-weight: 600; }
a.depot-tag__city { color: inherit; text-underline-offset: 3px; }
.depot-tag__area { color: var(--ink-2); font-size: var(--small-size); }
.depot-tag--hub .depot-tag__area { color: var(--ink); }

/* Cut-off strip (partials/cutoff): today's time and the two cut-offs, with an hour bar */
.cutoff { padding: 14px 18px 12px; border-radius: 14px; background: var(--inset); color: var(--ink); }
.cutoff__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; margin: 0; font-size: var(--ui-size-xs); }
.cutoff__day { font-weight: 600; }
.cutoff__rules { color: var(--ink-2); }
.cutoff .mono { font-size: .75rem; }
.cutoff__day .mono { font-weight: 500; }
.cutoff__bars, .cutoff__hours { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 4px; margin: 12px 0 0; padding: 0; list-style: none; }
.cutoff__bars span { height: 10px; border-radius: 3px; background: var(--oat-deep); }
.cutoff__bars .is-past { background: var(--moss); }
.cutoff__bars .is-now { background: var(--sprout); }
.cutoff__hours { margin-top: 6px; font-family: var(--f-mono); font-size: .6875rem; color: var(--ink-2); }
@media (max-width: 960px), (pointer: coarse) { .cutoff__hours { font-size: .75rem; } }
.cutoff__hours .is-cut { color: var(--ink); font-weight: 500; }
.panel .cutoff, .docket .cutoff { background: var(--oat); }


/* ==========================================================================
   15. Steps (booking flow): pills. Done lichen with a tick, current moss, to-do oat-deep.
   partials/steps prints the row (≥ 641px) and a compact "Step 2 of 4" for phones.
   Progress (partials/progress): rounded bars. Done moss, current sprout, problem tomato.
   ========================================================================== */

.steps--3 { --steps: 3; } .steps--4 { --steps: 4; } .steps--5 { --steps: 5; } .steps--6 { --steps: 6; }
.steps { display: grid; grid-template-columns: repeat(var(--steps, 4), minmax(0, 1fr)); gap: var(--slip-gap); margin: 0 0 var(--s-6); max-width: 860px; }
.steps__i { display: flex; align-items: center; gap: 8px; min-height: 44px; min-width: 0; padding: 0 12px; border-radius: var(--r); background: var(--oat-deep); color: var(--ink-2); }
.steps__i a { display: flex; align-items: center; gap: 8px; min-height: 44px; width: 100%; color: inherit; text-decoration: none; }
.steps__i a:hover .steps__t { text-decoration: underline; }
.steps__n { font-family: var(--f-mono); font-size: .75rem; font-weight: 500; }
.steps__t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Foldables: four pills share ~600px, so a long step name takes two lines instead of an ellipsis */
@media (min-width: 641px) and (max-width: 960px) {
  .steps__i { padding-block: 5px; }
  .steps__t { overflow: visible; white-space: normal; line-height: 1.15; }
}
.steps__tick { width: 16px; height: 16px; flex: none; background: var(--moss); -webkit-mask: var(--tick) center / contain no-repeat; mask: var(--tick) center / contain no-repeat; }
.steps__i.is-done { background: var(--lichen); color: var(--ink); }
.steps__i.is-done .steps__n { display: none; }
.steps__i.is-now { background: var(--moss); color: var(--slip); }
.prog { display: grid; grid-template-columns: repeat(var(--prog, 5), minmax(0, 1fr)); gap: var(--slip-gap); margin: 0 0 var(--s-6); padding: 0; }
.prog--2 { --prog: 2; } .prog--3 { --prog: 3; } .prog--4 { --prog: 4; } .prog--5 { --prog: 5; } .prog--6 { --prog: 6; } .prog--7 { --prog: 7; } .prog--8 { --prog: 8; }
.prog__i { position: relative; min-width: 0; padding-top: 18px; color: var(--fg-2); }
.prog__i::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; border-radius: 4px; background: var(--oat-deep); }
.prog__t { display: block; overflow-wrap: anywhere; font-size: var(--xs-size); font-weight: 600; line-height: 1.3; }
.prog__i.is-done { color: var(--fg); }
.prog__i.is-done::before { background: var(--moss); }
.prog__i.is-now { color: var(--fg); }
.prog__i.is-now::before { background: var(--sprout); }
.prog__i.is-problem::before { background: var(--tomato); }
.prog__i.is-problem .prog__t { color: var(--err-text); }
.band--paper-2 .prog__i::before, .panel .prog__i::before { background: var(--oat-deep); }
@media (max-width: 640px) {
  .prog { gap: 4px; }
  .prog__i:not(.is-here) .prog__t { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
}
@media (forced-colors: active) {
  .prog__i.is-now::before, .prog__i.is-done::before { background: Highlight; forced-color-adjust: none; }
  .prog__i::before { background: GrayText; forced-color-adjust: none; }
}
.stepm { display: none; margin: 0 0 var(--s-5); }
.stepm__bar { display: grid; grid-template-columns: repeat(var(--steps, 4), minmax(0, 1fr)); gap: 4px; margin-bottom: 10px; }
.stepm__bar span { height: 6px; border-radius: 3px; background: var(--oat-deep); }
.stepm__bar .is-done { background: var(--lichen); }
.stepm__bar .is-now { background: var(--moss); }
.stepm__of { display: block; color: var(--ink-2); font-size: var(--small-size); }
.stepm__now { display: block; font-size: var(--h3-size); letter-spacing: -.015em; }
.stepm__back { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--small-size); font-weight: 600; color: var(--link); }
@media (max-width: 640px) {
  .steps { display: none; }
  .stepm { display: block; }
}


/* ==========================================================================
   16. Panels, empty states, stats
   A panel is a slip surface on oat: 20px corners, generous padding, no border, no rule.
   ========================================================================== */

.panel { background: var(--slip); color: var(--ink); border: 0; border-radius: var(--r-xl); min-width: 0; }
.panel__head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: var(--s-2) var(--s-4); padding: 26px 28px 0; border: 0; }
.panel__head .muted, .panel__head .t-small { font-size: var(--small-size); }
.panel__body { padding: 18px 28px 28px; }
.panel__foot { padding: 0 28px 24px; border: 0; font-size: var(--small-size); }
.panel--flat { background: none; border-radius: 0; }
.panel--flat > .panel__head { padding: 0 0 var(--s-2); }
.panel--flat > .panel__body { padding: var(--s-4) 0 0; }
.panel--flat > .panel__foot { padding: var(--s-4) 0 0; margin-top: var(--s-4); }
* + .panel--flat { margin-top: var(--s-7); }
.panel--deep { background: var(--oat-deep); --inset: var(--slip); --field: var(--slip); }
.panel--lichen { background: var(--lichen); --inset: var(--slip); --field: var(--slip); }
.panel--ink { background: var(--moss-deep); }
.panels { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
@media (max-width: 640px) {
  .panel__head { padding: 20px 18px 0; }
  .panel__body { padding: 14px 18px 20px; }
  .panel__foot { padding: 0 18px 18px; }
}

.empty { padding: var(--s-6) var(--s-6); border: 0; border-radius: var(--r-l); background: var(--inset); text-align: left; }
.empty__title { margin-bottom: var(--s-2); }
.empty__text { color: var(--fg-2); max-width: 36em; margin: 0 0 var(--s-4); }
.empty--compact { padding: var(--s-5); }

/* Stats: figure tiles */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: var(--slip-gap); margin: 0; }
.stat { padding: 16px 20px 18px; border: 0; border-radius: var(--r-l); background: var(--inset); min-width: 0; }
.stat__label { display: block; color: var(--fg-2); margin-bottom: 6px; }
.stat__value { display: block; font-variant-numeric: tabular-nums; }
.stat__meta { display: block; margin-top: 6px; color: var(--fg-2); font-size: var(--small-size); }
.stat__meta .mono { font-size: var(--data-s); }
.stat--alert .stat__value { color: var(--tomato); }
.stat a { text-decoration: none; }
.stat a:hover .stat__value { text-decoration: underline; }


/* ==========================================================================
   17. Tracking log, confirmation, one-time secret, file upload
   Tracking log (partials/tracking-log): scans as slips, newest first. The latest is sprout with a filled
   round marker; the rest carry a hollow marker. Time in mono, the location code at the end.
   ========================================================================== */

.log { position: relative; display: grid; gap: var(--slip-gap); margin: 0; }
.log__item {
  position: relative; display: grid; grid-template-columns: 11.5em minmax(0, 1fr); column-gap: var(--s-5); align-items: start;
  padding: 13px 20px 13px 40px; border-radius: var(--r); background: var(--inset);
}
.log__item::before { content: ""; position: absolute; left: 17px; top: 19px; width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--moss); }
.log__item.is-latest { background: var(--sprout); }
.log__item.is-latest::before { background: var(--moss); }
.log__time { padding-top: 3px; color: var(--ink-2); white-space: nowrap; }
.log__item.is-latest .log__time { color: var(--ink); }
.log__body { min-width: 0; }
.log__head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0; }
.log__head .st { order: 2; margin-left: auto; }
.log__title { font-size: var(--ui-size); }
.log__item:not(.is-latest) .log__title { font-weight: 500; }
.log__desc { margin: 4px 0 0; color: var(--ink); }
.log__where { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 4px 0 0; color: var(--ink-2); }
.log__empty { color: var(--fg-2); }
.log--compact .log__item { grid-template-columns: minmax(0, 1fr); row-gap: 2px; padding: 12px 16px 12px 36px; }
.log--compact .log__item::before { left: 14px; top: 17px; }
/* In a narrow column (the admin shipment page beside its side panel, the care panel) the time sits above the text. */
.log { container-type: inline-size; }
@container (max-width: 520px) { .log__item { grid-template-columns: minmax(0, 1fr); row-gap: 2px; } }
/* Staff view of the log (tracking-log showSource: admin shipment page, care panel): the source chip and the internal flag. */
.log__who { gap: 4px 8px; font-size: var(--xs-size); }
.log__src { font-weight: 600; color: var(--ink); }
.log__flag { padding: 1px 7px; border-radius: 5px; background: var(--oat-deep); color: var(--ink); font-weight: 600; }
.log__item.is-internal { background: var(--oat-deep); }
.log--compact .log__time { padding-top: 0; font-size: .75rem; }
.log--compact .log__head .st { margin-left: 0; order: 0; }
@media (max-width: 640px) {
  .log__item { grid-template-columns: minmax(0, 1fr); row-gap: 2px; padding: 12px 16px 12px 36px; }
  .log__item::before { left: 14px; top: 17px; }
  .log__time { padding-top: 0; font-size: .75rem; }
  .log__head .st { margin-left: 0; order: 0; }
}

/* Destructive-action confirmation (partials/confirm): a slip panel; the danger button is the tomato */
.confirm { max-width: 40em; padding: 26px 28px 28px; border: 0; border-radius: var(--r-xl); background: var(--slip); }
.confirm__field { margin-top: var(--s-5); }
.confirm__title { margin: 0 0 var(--s-2); }
.confirm__text { max-width: 36em; color: var(--ink-2); }
.confirm__details { margin: var(--s-4) 0 0; padding: 16px 18px; border-radius: var(--r); background: var(--oat); }
.confirm__actions { margin-top: var(--s-5); }

/* One-time secret (partials/secret): a readonly mono field + Copy (site.js [data-copy]) */
.secret { max-width: 44em; }
.secret .toolrow { align-items: flex-end; }
.secret .tool { flex: 1 1 auto; }
.secret__value { display: block; width: 100%; min-height: 50px; resize: none; overflow-y: auto; field-sizing: content; overflow-wrap: anywhere; word-break: break-all; font-size: var(--data-s); }
.secret__value[readonly] { cursor: text; }
.secret__copy { min-height: 50px; }
.secret__note { margin: var(--s-2) 0 0; color: var(--fg-2); }
.secret__status { margin: 4px 0 0; min-height: 1.4em; color: var(--moss); font-weight: 600; font-size: var(--small-size); }
.secret__status:empty { min-height: 0; }
@media (max-width: 640px) {
  .secret .toolrow { flex-direction: column; align-items: stretch; }
  .secret .toolrow > .secret__copy { min-height: 48px; }
}

/* Parcel code for the sender (partials/parcel-code): a sprout box (the thing to act on), the code big in mono beside the one instruction. */
.pcode { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 2px var(--s-5); padding: 16px 20px; border-radius: var(--r-l); background: var(--sprout); color: var(--ink); }
.pcode__cap { grid-column: 1; margin: 0; font-size: var(--small-size); font-weight: 600; }
.pcode__code { grid-column: 1; margin: 0; font-family: var(--f-mono); font-size: 1.875rem; font-weight: 500; line-height: 1.15; letter-spacing: .06em; white-space: nowrap; font-feature-settings: "zero" 1; }
.pcode__text { grid-column: 2; grid-row: 1 / span 2; margin: 0; font-weight: 600; }
.pcode__meta { grid-column: 1 / -1; margin: 6px 0 0; color: var(--ink-2); font-size: var(--small-size); }
@media (max-width: 640px) {
  .pcode { grid-template-columns: minmax(0, 1fr); }
  .pcode__text { grid-column: 1; grid-row: auto; margin-top: 6px; }
}

/* File upload (partials/upload) */
.upload__box { display: flex; align-items: center; gap: var(--s-3); padding: 14px 16px; border: 2px dashed rgba(28, 35, 30, .16); border-radius: var(--r-l); background: var(--field); color: var(--ink); max-width: 40em; }
.upload__icon { color: var(--ink-2); }
.upload__input { min-width: 0; flex: 1 1 auto; font-size: var(--small-size); color: var(--ink-2); }
.upload__input::file-selector-button {
  margin-right: var(--s-3); min-height: 44px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--ink); color: var(--slip);
  font-family: var(--f-sans); font-weight: 600; font-size: var(--ui-size-s); cursor: pointer;
}
.upload__input::file-selector-button:hover { background: var(--moss); }
.upload__input:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.upload.has-error .upload__box { border: 2px solid var(--tomato); }
@media (max-width: 640px) { .upload__icon { display: none; } }
.upload-result { display: grid; gap: var(--s-4); }
.upload-result__summary { display: flex; flex-wrap: wrap; gap: 6px var(--s-5); margin: 0; }


/* ==========================================================================
   18. Site header (partials/header): oat, the tag logo, the nav with tape on the current link,
   account or log in, and one ink button. ≤ 960px: logo · Log in / Account · Menu (opens the panel).
   Tape: sprout strip with zigzag ends, tilted 1°. Only the current header link and dockets use it.
   ========================================================================== */

.hdr { position: relative; z-index: var(--z-header); background: var(--oat); border: 0; }
.hdr__in { display: flex; align-items: center; gap: 48px; min-height: 96px; }
.hdr__mob { display: none; }
.hdr--minimal .hdr__in { justify-content: space-between; gap: var(--s-4); min-height: 80px; }
.hdr__note { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 8px; margin: 0; color: var(--ink-2); font-size: var(--small-size); text-align: right; }
.hdr__note > span:first-of-type { font-weight: 600; color: var(--ink); }
.hdr__phone { flex-basis: 100%; }
.hdr__phone a { color: var(--ink); font-family: var(--f-mono); font-size: var(--data-s); }

/* Logo (partials/logo): the luggage-tag mark + the wordmark */
.logo { display: inline-flex; align-items: center; gap: 10px; flex: none; min-height: 44px; text-decoration: none; line-height: 1; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo__mark { width: 34px; height: 24px; flex: none; }
.logo__tagshape { fill: var(--moss); }
.logo__taghole { fill: var(--oat); }
.logo__text { display: flex; flex-direction: column; }
.logo__word { font-family: var(--f-sans); font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.logo__sub { margin-top: 3px; font-size: .75rem; font-weight: 500; color: var(--ink-2); letter-spacing: 0; }
.logo--rev, .logo--rev:hover { color: var(--on-dark); }
.logo--rev .logo__sub { color: var(--on-dark-2); }
.logo--rev .logo__tagshape { fill: var(--sprout); }
.logo--rev .logo__taghole { fill: var(--moss-deep); }
.logo--s .logo__mark { width: 28px; height: 20px; }
.logo--s .logo__word { font-size: 1.125rem; }
.logo--print { color: #000; gap: 2mm; min-height: 0; }
.logo--print .logo__mark { width: 8mm; height: 5.6mm; }
.logo--print .logo__tagshape { fill: #000; }
.logo--print .logo__taghole { fill: #fff; }
.logo--print .logo__word { font-size: 15pt; }
.logo--print, .logo--print * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

.nav { flex: 1 1 auto; display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); min-width: 0; }
.nav__list { display: flex; align-items: center; gap: 4px; }
.nav__list a, .nav__link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: var(--r); color: var(--ink); text-decoration: none; font-size: 1.0625rem; font-weight: 500; }
@media (hover: hover) and (pointer: fine) { .nav__list a:not([aria-current]):hover, .nav__link:not([aria-current]):hover { background: var(--oat-deep); color: var(--ink); } }
/* The current header link: a plain lichen pill (round 3: no tilted tape, the owner read it as a mistake) */
.nav__list a[aria-current], .nav__link[aria-current], .tape-link {
  background: var(--lichen); color: var(--ink); font-weight: 600;
}
.nav__acct { display: flex; align-items: center; gap: var(--s-2); }
.nav__acct form { margin: 0; }
.nav__acct .link-btn { min-height: 44px; padding: 0 12px; text-decoration: none; font-weight: 500; }
.nav__acct .link-btn:hover { text-decoration: underline; }
.nav__reg { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; font-size: var(--ui-size-s) !important; white-space: nowrap; color: var(--ink-2); }
.nav__only-menu { display: none !important; }
.hdr__end { display: flex; align-items: center; gap: var(--s-4); flex: none; }
.hdr__cta { min-height: 48px; padding: 0 22px; border-radius: var(--r); font-size: var(--ui-size); }

@media (max-width: 1180px) {
  .hdr__in { gap: var(--s-5); }
  .nav__list a { padding: 0 11px; }
  .nav__reg { display: none; }
}
@media (max-width: 960px) {
  .hdr__in { min-height: 72px; gap: var(--s-3); justify-content: space-between; }
  .hdr__end { display: none; }
  .hdr__mob { display: flex; align-items: center; gap: var(--s-2); margin-left: auto; flex: none; }
  .hdr__login { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; text-decoration: none; }
  .hdr__login[aria-current] { background: var(--lichen); border-radius: var(--r); padding: 0 14px; font-weight: 600; }
  .menu-btn {
    display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px;
    border: 0; border-radius: var(--r); background: var(--oat-deep); color: var(--ink); text-decoration: none;
  }
  .menu-btn__bars { position: relative; width: 16px; height: 12px; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; }
  .menu-btn__bars::before { content: ""; position: absolute; left: 0; right: 0; top: 3px; border-top: 2px solid currentColor; }
  .menu-btn[aria-expanded="true"] { background: var(--ink); color: var(--slip); }
  .menu-btn[aria-expanded="true"] .menu-btn__bars { border-color: transparent; }
  .menu-btn[aria-expanded="true"] .menu-btn__bars::before { top: 3px; transform: rotate(45deg); }
  .menu-btn[aria-expanded="true"] .menu-btn__bars::after { content: ""; position: absolute; left: 0; right: 0; top: 3px; border-top: 2px solid currentColor; transform: rotate(-45deg); }
  /* The menu panel: an oat sheet under the header with big slip links */
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: var(--z-menu);
    flex-direction: column; align-items: stretch; gap: 0; padding: var(--s-2) var(--gutter) var(--s-6);
    background: var(--oat); box-shadow: 0 24px 32px -24px rgba(28, 35, 30, .25);
  }
  .nav.is-open { display: flex; }
  .nav__list { flex-direction: column; align-items: stretch; gap: var(--slip-gap); }
  .nav__list a, .nav__list a[aria-current] { display: flex; min-height: 56px; padding: 0 18px; border-radius: var(--r); background: var(--slip); font-size: 1.25rem; font-weight: 600; clip-path: none; transform: none; }
  .nav__list a[aria-current] { background: var(--lichen); }
  .nav__only-bar { display: none !important; }
  .nav__acct { flex-direction: column; align-items: stretch; gap: var(--s-2); padding-top: var(--s-4); }
  .nav__acct .btn, .nav__acct .nav__link { width: 100%; justify-content: center; }
  .nav__acct .nav__link[aria-current] { clip-path: none; transform: none; border-radius: var(--r); background: var(--lichen); }
  .nav__reg { display: inline-flex; justify-content: center; }
  .nav__only-menu { display: flex !important; }
  .nav__acct form .btn { width: 100%; }
}
@media (max-width: 640px) {
  .hdr__in { min-height: 64px; }
  .logo__word { font-size: 1.3125rem; }
  .hdr__note { font-size: var(--xs-size); }
}
@media (max-width: 400px) {
  .hdr__in, .hdr__mob { gap: 4px; }
  .logo { gap: 7px; min-width: 0; }
  .logo__mark { width: 28px; height: 20px; }
  .logo__word { font-size: 1.125rem; }
  .hdr__login { padding: 0 6px; }
  .menu-btn { gap: 7px; padding: 0 10px; }
}
/* 320–360px and signed in ("Account", "Operations", "Driver app"): the Menu button keeps its bars and its name
   for screen readers, and drops the word so the row fits beside the logo. */
@media (max-width: 360px) {
  .hdr__login[aria-current] { padding: 0 10px; }
  .hdr__mob:has(.hdr__login:not([href="/login"])) .menu-btn { justify-content: center; min-width: 44px; gap: 0; padding: 0 12px; font-size: 0; }
}


/* ==========================================================================
   19. Site footer: a moss-deep band. Lichen column heads, oat links, contact in mono.
   ========================================================================== */

.ftr { background: var(--moss-deep); color: var(--on-dark); border: 0; --focus: var(--sprout); --fg: var(--on-dark); --fg-2: var(--on-dark-2); }
.ftr a { color: var(--on-dark); text-decoration: none; }
.ftr a:hover { color: var(--slip); text-decoration: underline; text-decoration-thickness: 1.5px; }
.ftr__grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); column-gap: 64px; padding-top: 80px; padding-bottom: 56px; }
.ftr__grid > * { min-width: 0; }
.ftr__brand p { margin: 18px 0 0; max-width: 24em; font-size: var(--ui-size); line-height: 1.5; }
.ftr__contact { display: grid; gap: 2px; margin-top: 18px; }
.ftr__contact a { font-family: var(--f-mono); font-size: var(--data-s); line-height: 1.9; }
.ftr__contact span { color: var(--on-dark-2); font-size: var(--small-size); }
.ftr__nav { display: grid; grid-template-columns: repeat(5, max-content); justify-content: space-between; gap: var(--s-6); }
.ftr__head { color: var(--lichen); margin-bottom: 10px; font-size: var(--ui-size-s); }
.ftr__nav a { display: flex; align-items: center; min-height: 32px; font-size: var(--ui-size); }
.ftr__base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s-3) var(--s-5); padding-top: 0; padding-bottom: 40px; border: 0; color: var(--on-dark-2); font-size: var(--xs-size); }
.ftr__base ul { display: flex; flex-wrap: wrap; gap: 0 var(--s-4); }
.ftr__base a { color: var(--on-dark); text-decoration: underline; text-underline-offset: 3px; }
.ftr__head--next { margin-top: var(--s-5); }
.ftr__langs { padding-bottom: var(--s-4); }
.ftr__langs ul { display: flex; flex-wrap: wrap; gap: 2px var(--s-4); margin: 0; padding: 0; list-style: none; font-size: var(--xs-size); }
.ftr__langs a { color: var(--on-dark-2); }
.ftr__langs span { color: var(--on-dark); }
@media (max-width: 1180px) {
  .ftr__grid { grid-template-columns: minmax(0, 1fr); row-gap: var(--s-7); }
}
@media (max-width: 1180px) { .ftr__nav { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 641px) and (max-width: 960px) { .ftr__nav { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: var(--s-6); } }
@media (min-width: 961px) { body:has(.cw:not([hidden])) .ftr__base { padding-right: calc(var(--gutter) + 72px); } }
/* The help chat's round launcher sits bottom-right: the last footer line scrolls clear of it */
@media (max-width: 960px) { body:has(.cw:not([hidden])) .ftr__base { padding-bottom: 96px; } }
@media (max-width: 640px) {
  .ftr__grid { padding-top: var(--s-7); padding-bottom: var(--s-6); }
  .ftr__nav { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--s-6); column-gap: var(--s-4); }
  .ftr__base { flex-direction: column; }
}
@media (max-width: 960px), (pointer: coarse) {
  .ftr__nav a, .ftr__base a, .ftr__contact a, .ftr__langs a, .ftr__langs span { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
  .ftr__langs a, .ftr__langs span { min-width: 0; }
}


/* ==========================================================================
   20. Marketing pieces kept from earlier pages (restyled): photo, hero + tracking tag, price band quotes,
       departure board, sheet, merge diagram, code block (/developers only), route line, contact, topics.
   ========================================================================== */

/* Photo: soft corners (round 3: no chamfer). Captions say only what is in the frame. */
.photo img { width: 100%; object-fit: cover; border-radius: var(--r-xl); }
.photo__cap { padding-top: 10px; color: var(--fg-2); }
.photo--4x3 img { aspect-ratio: 4 / 3; }
.photo--wide img { aspect-ratio: 16 / 9; }

/* Hero (older pages) */
.hero { padding: var(--s-6) 0 var(--s-8); }
.hero__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: start; }
.hero__grid > * { min-width: 0; }
.hero__title { grid-column: 1 / span 7; max-width: 11ch; font-size: var(--display-size); font-weight: 600; line-height: var(--display-lh); letter-spacing: var(--display-track); }
.hero__body { grid-column: 1 / span 7; margin-top: var(--s-5); }
.hero__lede { font-size: var(--lede-size); line-height: 1.45; max-width: 31em; margin: 0; color: var(--fg-2); }
.hero__actions { margin-top: var(--s-6); }
@media (max-width: 960px) {
  .hero__title, .hero__body { grid-column: 1 / -1; grid-row: auto; }
}

/* The big Track button beside a tracking field (round 3: the old .tag luggage-tag block was unused and is gone) */
.tag__go { min-height: 64px; padding: 0 28px; }
.barcode { display: block; color: var(--ink); }
.barcode rect:first-child { fill: transparent; }
.barcode g { fill: currentColor; }
@media (max-width: 640px) {
  .tag__go { min-height: 52px; }
}

/* Price band results (site.js renders .quotes > .quote): slips */
.price { padding-block: 40px 44px; }
.price__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
.price__grid > * { min-width: 0; }
.price__head { grid-column: 1 / span 3; grid-row: 1 / span 3; padding-right: var(--s-3); }
.price__note { color: var(--fg-2); margin: 14px 0 0; max-width: 17em; }
.price__form { grid-column: 4 / span 9; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.25fr) minmax(0, 1.15fr) minmax(0, .7fr) auto; gap: 10px; align-items: end; }
.price__go { min-height: 50px; }
.price__errs { grid-column: 4 / span 9; }
.price__errs:empty { display: none; }
.price__out { grid-column: 4 / span 9; margin-top: 22px; }
.price__meta { margin: 0 0 10px; color: var(--fg-2); font-size: var(--small-size); }
.price__meta.price__meta--empty { margin: 0; padding: 4px 0 0; font-size: var(--body-size); }
.quotes { display: grid; gap: var(--slip-gap); border: 0; }
.quote { display: grid; grid-template-columns: 64px minmax(120px, 170px) minmax(0, 1fr) auto; align-items: center; column-gap: var(--s-4); padding: 12px 18px; border: 0; border-radius: var(--r); background: var(--inset); }
.quote--book { grid-template-columns: 64px minmax(120px, 170px) minmax(0, 1fr) auto 88px; }
.quote .svc { justify-self: start; }
.quote__name { font-size: 1.125rem; }
.quote__eta { color: var(--fg-2); }
.quote__eta b { color: var(--fg); font-weight: 600; }
.quote__price { text-align: right; white-space: nowrap; font-size: var(--data-m); }
.quote.is-na .quote__name, .quote.is-na .svc, .quote.is-na .quote__price { color: var(--fg-2); }
.quote .btn { min-height: 40px; }
@media (max-width: 1180px) {
  .price__head { grid-column: 1 / -1; grid-row: auto; margin-bottom: 22px; padding-right: 0; }
  .price__form, .price__errs, .price__out { grid-column: 1 / -1; }
}
@media (max-width: 960px) {
  .price__form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .price__go { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .price__form [data-cell="from"], .price__form [data-cell="to"] { grid-column: 1 / -1; }
  .quote, .quote--book { grid-template-columns: 58px minmax(0, 1fr) auto; row-gap: 2px; }
  .quote .svc { grid-row: 1; }
  .quote__eta { grid-column: 2 / -1; grid-row: 2; }
  .quote .btn { grid-column: 2 / -1; grid-row: 3; justify-self: start; margin-top: 8px; }
}

/* Services board (.dep): slip rows, no rules. Live chip: sprout while a cut-off is still ahead. */
.board__clock { margin: 0; }
.board__time { font-size: var(--data-s); margin-inline: 4px; }
.board__status { display: flex; flex-wrap: wrap; gap: 8px var(--s-6); margin-bottom: var(--s-5); }
.board__status li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: var(--small-size); }
.board__left { color: var(--fg-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.live { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; margin-right: 2px; border: 0; border-radius: 8px; background: var(--inset); color: var(--fg); line-height: 1.35; white-space: nowrap; vertical-align: 1px; }
.live.is-live { background: var(--sprout); color: var(--ink); }
.dep { border-collapse: separate; border-spacing: 0 var(--slip-gap); color: var(--fg); }
.dep thead th { color: var(--fg-2); text-align: left; padding: 0 16px 0; white-space: nowrap; }
.dep td, .dep tbody th { padding: 18px 16px; background: var(--inset); vertical-align: middle; text-align: left; color: var(--fg-2); border: 0; }
.dep tbody tr > :first-child { border-radius: var(--r) 0 0 var(--r); padding-left: 20px; }
.dep tbody tr > :last-child { border-radius: 0 var(--r) var(--r) 0; padding-right: 20px; }
.dep .num, .dep thead th.num { text-align: right; }
.dep__code { width: 88px; }
.dep__svc { color: var(--fg) !important; white-space: nowrap; font-size: 1.5rem !important; }
.dep__time { white-space: nowrap; }
.dep__time .mono { color: var(--fg); font-size: var(--data-s); }
.dep__price { color: var(--fg) !important; white-space: nowrap; font-size: var(--data-l) !important; }
.board__foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--s-5) 40px; margin-top: 24px; }
.board__foot p { margin: 0; color: var(--fg-2); max-width: 46em; }
@media (max-width: 960px) {
  .dep thead { display: none; }
  .dep, .dep tbody { display: block; }
  .dep tr { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 16px; padding: 16px 18px; margin-bottom: var(--slip-gap); border-radius: var(--r); background: var(--inset); }
  .dep td, .dep tbody th { display: block; padding: 0 !important; background: none; border-radius: 0 !important; }
  .dep td.dep__code { grid-row: 1; grid-column: 1; align-self: center; width: auto; }
  .dep tbody th.dep__svc { grid-row: 1; grid-column: 2; align-self: center; }
  .dep td[data-label] { grid-column: 1 / -1; display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding-top: 8px !important; }
  .dep td[data-label]::before { content: attr(data-label); color: var(--fg-2); font-family: var(--f-sans); font-size: var(--small-size); }
  .dep .num { text-align: left; }
  .board__status { flex-direction: column; gap: 10px; }
}

.biz__grid { align-items: start; }
.biz__photo img { aspect-ratio: 4 / 3; object-position: 35% 50%; }

/* Sheet: a CSV sample on a slip surface */
.sheet { border: 0; border-radius: var(--r-l); background: var(--slip); min-width: 0; overflow: hidden; }
.sheet__bar { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; padding: 12px 18px; background: var(--oat-deep); border: 0; }
.sheet__file { font-family: var(--f-mono); font-size: var(--data-s); }
.sheet__meta { color: var(--ink-2); font-size: var(--small-size); }
.sheet .table-scroll { --table-min: 0; padding: 6px 8px; }
.sheet__table { border-collapse: separate; border-spacing: 0 3px; }
.sheet__table th { text-align: left; color: var(--ink-2); padding: 8px 10px 4px; white-space: nowrap; font-family: var(--f-mono); font-weight: 500; font-size: .75rem; }
.sheet__table td { padding: 8px 10px; white-space: nowrap; font-size: .75rem; background: var(--oat); border: 0; }
.sheet__table td:first-child { border-radius: 8px 0 0 8px; }
.sheet__table td:last-child { border-radius: 0 8px 8px 0; }
.sheet__table .num { text-align: right; }
.sheet__foot { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 18px 14px; color: var(--moss); font-weight: 600; }
@media (max-width: 640px) { .sheet__table .sheet__opt { display: none; } }

.intl__actions { margin-top: var(--s-6); }

/* Merge diagram: sources → broker → hub → depots. Rounded nodes on soft connectors. */
.merge { margin: 0; }
.merge__cap { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; margin-bottom: var(--s-5); color: var(--fg-2); }
.merge__flow { --gap: 56px; display: grid; grid-template-columns: minmax(0, 1.15fr) repeat(3, minmax(0, 1fr)); column-gap: var(--gap); align-items: center; }
.merge__step { position: relative; min-width: 0; }
.merge__node { position: relative; padding: 14px 16px 16px; border: 0; border-radius: var(--r-l); background: var(--slip); color: var(--ink); }
.merge__node--hub { background: var(--sprout); color: var(--ink); }
.merge__node--hub .muted { color: var(--ink-2); }
.merge__kind { display: block; margin-bottom: 4px; font-weight: 600; }
.merge__where { display: block; color: var(--ink-2); font-size: var(--small-size); }
.merge__codes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.merge__step:not(:last-child)::after { content: ""; position: absolute; top: 50%; right: calc(-1 * var(--gap) + 8px); width: calc(var(--gap) - 16px); height: 2px; border-radius: 1px; background: var(--moss); }
.merge__step + .merge__step::before { content: ""; position: absolute; top: 50%; left: -14px; width: 8px; height: 8px; margin-top: -3px; border-radius: 50%; background: var(--moss); }
.merge__step--sources { display: grid; gap: var(--s-3); }
.merge__bracket { display: none; }
@media (max-width: 960px) {
  .merge__flow { --gap: 36px; grid-template-columns: minmax(0, 1fr); row-gap: var(--gap); }
  .merge__step:not(:last-child)::after { top: auto; bottom: calc(-1 * var(--gap) + 8px); right: auto; left: 50%; width: 2px; height: calc(var(--gap) - 16px); }
  .merge__step + .merge__step::before { top: -14px; left: 50%; margin: 0 0 0 -3px; }
  .merge__step--sources { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* Code block: /developers only. A caption says what the sample is; no window chrome, no filename bar. */
.code-block { margin: 0; min-width: 0; border-radius: var(--r-l); overflow: hidden; background: var(--slip); }
.code__cap { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; padding: 10px 18px; background: var(--oat-deep); border: 0; }
.code__cap .mono { font-size: var(--data-s); }
.code { position: relative; display: block; margin: 0; padding: 16px 18px; overflow-x: auto; background: var(--slip); border: 0; border-radius: var(--r-l); color: var(--ink); white-space: pre; tab-size: 2; line-height: 1.6; }
.code-block .code { border-radius: 0; }
@media (max-width: 640px) { .code { white-space: pre-wrap; overflow-wrap: anywhere; } }
.code .k { color: var(--ink); }
.code .s { color: var(--moss); }
.code .c { color: var(--ink-2); }
:is(.band--green, .band--moss, .band--ink) .code { background: rgba(235, 233, 218, .08); color: var(--on-dark); }

/* Route line: the depot network. Round nodes on a soft line. */
.route { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); padding-top: 34px; }
.route__stop { position: relative; display: flex; flex-direction: column; padding: 40px 16px 0 0; min-width: 0; }
.route__stop::before { content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 3px; border-radius: 2px; background: var(--fg-2); opacity: .5; }
.route__stop::after { content: ""; position: absolute; left: 0; top: 3px; width: 19px; height: 19px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 3px var(--fg); }
.route__stop--hub::after { background: var(--sprout); box-shadow: none; }
.route__stop:last-child::before { right: auto; width: 19px; }
.route__stop--strait::before { left: 19px; opacity: .25; }
.route__island { position: absolute; top: -24px; left: 0; color: var(--fg-2); font-size: var(--small-size); white-space: nowrap; }
.route__gap { position: absolute; top: 20px; right: 18px; color: var(--fg-2); font-size: var(--xs-size); white-space: nowrap; }
.route__code { font-family: var(--f-mono); font-weight: 500; font-size: clamp(1.75rem, 2.6vw, 2.5rem); letter-spacing: -.02em; }
.route__city { margin-top: 10px; }
.route__site { margin-top: 2px; color: var(--fg-2); }
.route__marks { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 12px; align-items: center; }
.route__role { font-size: var(--small-size); font-weight: 600; }
.depots__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-4) var(--s-6); margin: 48px 0 0; padding-top: 0; border: 0; color: var(--fg-2); }
.depots .band-cap { margin-bottom: var(--s-6); }
.depots__foot p { margin: 0; }
@media (max-width: 960px) {
  .route { grid-template-columns: minmax(0, 1fr); padding-top: 0; }
  .route__stop { display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: 12px; align-items: start; padding: 0 0 28px 44px; }
  .route__stop > * { grid-column: 2; }
  .route__stop::before { left: 8px; right: auto; top: 0; bottom: 0; width: 3px; height: auto; }
  .route__stop:first-child::before { top: 10px; }
  .route__stop::after { top: 6px; }
  .route__stop:last-child::before { bottom: auto; height: 10px; }
  .route__stop--strait { padding-bottom: 68px; }
  .route__stop--strait::before { left: 8px; }
  .route__gap { grid-column: auto; top: auto; bottom: 26px; right: auto; left: 44px; }
  .route__code { grid-column: 1; grid-row: 1 / span 5; line-height: 1; }
  .route__island { position: static; margin: 0 0 4px; }
  .route__city { margin-top: 0; }
  .route__marks { margin-top: 8px; }
}

/* Help: contact cells + question slips */
.help__side .t-h2 { margin-bottom: var(--s-4); }
.help__side p { color: var(--fg-2); max-width: 24em; }
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--slip-gap); border: 0; }
.contact__cell { padding: 22px 24px; min-width: 0; border-radius: var(--r-l); background: var(--inset); }
.contact__label { display: block; color: var(--ink-2); font-size: var(--small-size); font-weight: 600; }
.contact__big { display: block; margin: 8px 0; text-decoration: none; overflow-wrap: anywhere; font-family: var(--f-mono); font-weight: 400; font-size: clamp(1.5rem, 2.4vw, 2.125rem); }
.contact__big--mail { font-size: clamp(1.125rem, 1.8vw, 1.5rem); }
.contact__big:hover { color: var(--moss); text-decoration: underline; }
.contact__cell p { margin: 0; color: var(--ink-2); font-size: var(--small-size); }
.topics { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--slip-gap); margin-top: var(--s-6); }
.topics > li { margin: 0; }
.topics a { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 56px; padding: 12px 18px; border-radius: var(--r); background: var(--inset); text-decoration: none; }
.topics a::after { content: ""; flex: none; width: 18px; height: 18px; background: currentColor; -webkit-mask: var(--arrow) center / contain no-repeat; mask: var(--arrow) center / contain no-repeat; }
@media (hover: hover) { .topics a:hover { background: var(--lichen); color: var(--ink); } }
@media (max-width: 640px) {
  .contact, .topics { grid-template-columns: minmax(0, 1fr); }
}


/* ==========================================================================
   21. The console shell (partials/console-start): every staff area (Operations, Customer care, Depot, Mail) and
   the account area share one frame.
     .console            the frame: sidebar + content (a grid). Legacy classes stay on it for old area CSS:
                         .admin (ops, care, mail), .care / .care--desk (care), .console--account (account).
     .console__side      from 1024px a fixed left sidebar (sticky, 100dvh) that scrolls on its own, never with the
                         page; below 1024px a drawer opened by Menu (.console.is-open, or :target without JS)
     .console__bar       below 1024px only: the slim top bar (Menu, logo, area or depot code)
     .console__main      the content: left-aligned, one padding, max-width 1360px (.console--wide: no cap)
     .console__head      the page header: title left, actions right (partials/console-head). No intro paragraphs.
   The page scrolls in the document. .console--desk (desk: true) turns it into a viewport-high desk from 1024px.
   ========================================================================== */

:root { --side-w: 248px; --console-maxw: 1360px; --console-pad: 32px; }
.console { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); grid-template-areas: "side main"; min-height: 100vh; min-height: 100dvh; background: var(--oat); }
.console__bar { display: none; grid-area: bar; }
.console__side {
  grid-area: side; position: sticky; top: 0; align-self: start; z-index: var(--z-header);
  display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain;
  padding: 10px 12px 16px; background: var(--oat-deep); color: var(--ink); outline: none;
  scrollbar-width: thin; scrollbar-color: rgba(28, 35, 30, .22) transparent;
}
.console__main { grid-area: main; min-width: 0; width: 100%; max-width: calc(var(--console-maxw) + 2 * var(--console-pad)); padding: 22px var(--console-pad) 64px; }
.console--wide .console__main { max-width: none; }
.console__scrim { display: none; }

/* Sidebar pieces */
.console__brand { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 0 6px; margin-bottom: 4px; }
.console__brand .logo { min-height: 40px; }
.console .logo__taghole { fill: var(--oat-deep); }
.console__close { display: none; }
.console__search { display: flex; gap: 4px; margin: 0 0 10px; }
.console__search .input { min-height: 38px; padding: 6px 10px; border-radius: 9px; background-color: var(--slip); font-size: var(--ui-size-xs); }
.console__search .btn { flex: none; min-height: 38px; min-width: 38px; padding: 0 10px; background: var(--slip); }
.console__areas { margin: 0 0 8px; }
.console__areas ul, .console__nav ul { display: grid; gap: 1px; }
.console__area, .console__link {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 31px; padding: 3px 10px;
  border-radius: 9px; color: var(--ink); text-decoration: none; font-size: var(--ui-size-s); line-height: 1.2;
}
.console__area { font-weight: 600; }
.console__link { font-weight: 500; }
.console__area:hover, .console__link:hover { background: rgba(250, 249, 242, .7); color: var(--ink); }
.console__area[aria-current] { background: var(--moss-deep); color: var(--on-dark); }
.console__link[aria-current] { background: var(--lichen); color: var(--ink); font-weight: 600; }
.console__counts { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.console__counts:empty { display: none; }
.console .count { display: inline-block; min-width: 22px; padding: 2px 6px; border-radius: 6px; background: var(--sprout); color: var(--ink); text-align: center; font-family: var(--f-mono); font-size: .6875rem; font-weight: var(--data-weight-strong); line-height: 1.35; }
.console .count[hidden] { display: none; }
.console .count--alert, .console .count--late { background: var(--tomato); color: var(--slip); }
.console__ctx { margin: -4px 0 10px; }
.console__plate { display: flex; align-items: baseline; gap: 8px; min-height: 40px; padding: 8px 10px; border-radius: 10px; background: var(--slip); color: var(--ink); text-decoration: none; }
.console__plate:hover { background: var(--lichen); color: var(--ink); }
.console__plate.is-hub .console__platecode { padding: 1px 6px; border-radius: 5px; background: var(--sprout); }
.console__platecode { font-size: var(--data-m); font-weight: var(--data-weight-strong); }
.console__platecity { flex: 1 1 auto; min-width: 0; font-weight: 600; font-size: var(--ui-size-s); }
.console__platechange { color: var(--moss); font-size: var(--xs-size); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.console__plate.is-none { align-items: center; }
.console__plate.is-none .console__platecity { color: var(--moss); text-decoration: underline; text-underline-offset: 3px; }
.console__hours { display: flex; align-items: center; gap: 8px; margin: 0; padding: 0 10px; color: var(--ink-2); font-size: var(--xs-size); font-weight: 600; }
.console__hoursdot { flex: none; width: 8px; height: 8px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--ink-2); }
.console__hours.is-open { color: var(--ink); }
.console__hours.is-open .console__hoursdot { background: var(--moss); box-shadow: none; }
.console__nav { margin-bottom: 8px; }
.console__navhead { margin: 10px 0 2px; padding: 0 10px; color: var(--ink-2); font-size: var(--xs-size); font-weight: 600; }
.console__nav > .console__navhead:first-child { margin-top: 0; }
.console__note { margin: 4px 0 0; padding: 0 10px; color: var(--ink-2); font-size: var(--xs-size); line-height: 1.45; }
.console__foot { margin-top: auto; padding: 12px 4px 0; display: grid; gap: 2px; }
.console__who { display: grid; gap: 1px; padding: 6px 6px; border-radius: 9px; color: var(--ink); text-decoration: none; min-width: 0; }
.console__who:hover, .console__who[aria-current] { background: rgba(250, 249, 242, .7); color: var(--ink); }
.console__name { font-weight: 600; font-size: var(--ui-size-s); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.console__role { color: var(--ink-2); font-size: var(--xs-size); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.console__footlinks { display: flex; flex-wrap: wrap; gap: 2px 14px; padding: 0 6px; font-size: var(--xs-size); }
.console__footlinks a, .console__footlinks .link-btn { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; color: var(--ink); font-size: var(--xs-size); font-weight: 600; text-decoration: none; }
.console__footlinks a:hover, .console__footlinks .link-btn:hover { color: var(--moss); text-decoration: underline; }
.console__footlinks form { margin: 0; }
.console__footlinks .i { width: 13px; height: 13px; vertical-align: 0; }

/* The page header: title left, actions right */
.console__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px var(--s-5); margin: 0 0 20px; border: 0; }
.console__headtext { flex: 1 1 280px; min-width: 0; }
.console__head .crumbs { margin-bottom: 6px; }
.console__title, .console__head .admin-title, .console__head .shell__title {
  margin: 0; font-size: 1.75rem; font-weight: 600; line-height: 1.12; letter-spacing: -.025em; overflow-wrap: anywhere;
}
.console__meta { margin: 4px 0 0; color: var(--fg-2); font-size: var(--small-size); }
.console__head .page-actions { flex: none; max-width: 100%; }
/* Account and business pages: the title sits on the same line with or without buttons beside it */
.shell__main > .console__head { align-items: center; min-height: 40px; }
.console__main > .flashes { padding-top: 0; margin-bottom: var(--s-4); }

/* Legacy: old area CSS keeps working inside the new frame */
.admin .stats { margin-bottom: var(--s-5); }
.admin .panel + .panel, .admin .panels + .panel, .admin .panel + .panels { margin-top: var(--s-4); }
.shell__main { min-width: 0; }
.shell__count { color: var(--fg-2); }
.page-actions { flex: none; max-width: 100%; }
.navbox__sum { display: none; }

/* Narrow screens (below 1024px): the slim top bar, and the sidebar becomes a drawer */
@media (max-width: 1023.98px) {
  :root { --console-pad: 24px; }
  .console { grid-template-columns: minmax(0, 1fr); grid-template-areas: "bar" "main"; grid-template-rows: auto minmax(0, 1fr); }
  .console__bar {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: var(--z-header);
    min-height: 52px; padding: 4px var(--console-pad) 4px calc(var(--console-pad) - 8px); background: var(--oat-deep);
  }
  .console__bar .logo { min-height: 44px; }
  .console__menu { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px 0 10px; border-radius: 10px; color: var(--ink); font-weight: 600; font-size: var(--ui-size-s); text-decoration: none; }
  .console__menu:hover { background: rgba(250, 249, 242, .7); color: var(--ink); }
  .console__bars { position: relative; width: 16px; height: 12px; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; }
  .console__bars::before { content: ""; position: absolute; left: 0; right: 0; top: 3px; border-top: 2px solid currentColor; }
  .console__where { margin-left: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); font-size: var(--ui-size-xs); font-weight: 600; }
  .console__chip { display: inline-flex; align-items: center; min-height: 36px; margin-left: auto; padding: 0 10px; border-radius: 8px; background: var(--slip); color: var(--ink); font-size: var(--data-s); font-weight: var(--data-weight-strong); text-decoration: none; }
  .console__side {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: calc(var(--z-menu) + 5); width: min(320px, 88vw); height: auto;
    padding-top: 6px; box-shadow: 0 0 44px rgba(28, 35, 30, .28);
    transform: translateX(-104%); visibility: hidden; transition: transform .18s ease-out, visibility 0s linear .18s;
  }
  .console.is-open .console__side, .console__side:target { transform: none; visibility: visible; transition: transform .18s ease-out; }
  .console__scrim { position: fixed; inset: 0; z-index: calc(var(--z-menu) + 4); background: rgba(28, 35, 30, .38); }
  .console.is-open .console__scrim, .console__side:target ~ .console__scrim { display: block; }
  .console__close { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; color: var(--ink); }
  .console__close:hover { background: rgba(250, 249, 242, .7); color: var(--ink); }
  .console__area, .console__link { min-height: 44px; font-size: var(--ui-size); }
  .console__search .input, .console__search .btn { min-height: 44px; font-size: max(1rem, 16px); }
  .console__footlinks a, .console__footlinks .link-btn { min-height: 44px; font-size: var(--ui-size-xs); }
  .console__main { padding: 18px var(--console-pad) 56px; }
  html.console-locked, html.console-locked body { overflow: hidden; }
}
@media (max-width: 640px) {
  :root { --console-pad: 16px; }
  .console__title, .console__head .admin-title, .console__head .shell__title { font-size: 1.5rem; }
  .console__head { margin-bottom: 16px; }
  .console__head .page-actions { width: 100%; }
}
@media (max-width: 360px) {
  .console__menutext { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .console__menu { padding: 0 12px; }
  .console__where { display: none; }
}
/* Phones held sideways: the top bar stops sticking, so the page gets the height back */
@media (max-height: 500px) { .console__bar { position: static; } }
@media (prefers-reduced-motion: reduce) { .console__side { transition: none !important; } }
@media (max-width: 960px), (pointer: coarse) { .console .count { font-size: .75rem; } }

/* Desk (desk: true): from 1024px and 600px tall the frame is exactly the viewport; the page header stays, and
   .panes--desk fills the rest with every .pane scrolling on its own. Shorter or narrower: the normal page. */
@media (min-width: 1024px) and (min-height: 600px) {
  .console--desk { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; grid-template-rows: minmax(0, 1fr); }
  .console--desk .console__main { display: flex; flex-direction: column; min-height: 0; overflow: hidden; padding-bottom: 16px; }
  .console--desk .console__main > * { flex: none; }
  .console--desk .console__main > :is(.panes--desk, .desk-fill) { flex: 1 1 auto; min-height: 0; }
  .console--desk .panes--desk { grid-template-rows: minmax(0, 1fr); align-items: stretch; }
  .console--desk .panes--desk > .pane { min-height: 0; max-height: none; overflow-y: auto; overscroll-behavior: contain; position: relative; }
}


/* ==========================================================================
   21b. Layout helpers for console pages (documented in ~/.p2p/work/round3/shell.md)
     .panes            two panes: <div class="pane"> (flows with the page) + <aside class="pane pane--side"> (sticky,
                       scrolls on its own). From 1180px side by side, below that stacked in source order.
                       --pane-side (380px) · .panes--half (1fr 1fr) · .panes--list (a fixed list column first,
                       --pane-list 360px) · .panes--desk (inside desk: true, every pane scrolls on its own)
     .cards            a row of equal-height cards (--card-min 260px); a .panel__foot sits at the bottom
     .tiles > .tile    uniform number tiles: .tile__n, .tile__label (two lines reserved), .tile__meta;
                       a whole tile can be a link (.tile > a.tile__link). .tile--alert .tile--quiet .tile--on
     .form-compact     compact form: 40px fields, 14px labels, 12px between fields; .form-compact__row = two up
     .table--fit       a table that fits its column (no min-width, cells wrap); .col-xl hides a column below 1440px
   ========================================================================== */

.panes { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-5); align-items: start; }
.panes > * { min-width: 0; }
.pane { min-width: 0; }
@media (min-width: 1180px) {
  .panes { grid-template-columns: minmax(0, 1fr) var(--pane-side, 380px); }
  .panes--half { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .panes--list { grid-template-columns: var(--pane-list, 360px) minmax(0, 1fr); }
  .pane--side {
    position: sticky; top: 16px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto;
    overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(28, 35, 30, .22) transparent;
  }
}

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--card-min, 260px)), 1fr)); gap: var(--s-4); align-items: stretch; }
.cards > * { min-width: 0; margin: 0 !important; }
.cards > .panel, .cards > .card { display: flex; flex-direction: column; }
.cards > .panel > .panel__body { flex: 1 1 auto; }
.cards > .panel > .panel__foot { margin-top: auto; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--tile-min, 160px)), 1fr)); grid-auto-rows: 1fr; gap: var(--slip-gap); margin: 0; padding: 0; list-style: none; }
.tile { display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 100%; padding: 14px 16px; border-radius: var(--r); background: var(--inset); color: var(--ink); }
.tile:has(> .tile__link) { padding: 0; }
.tile__link { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 14px 16px; border-radius: var(--r); color: var(--ink); text-decoration: none; transition: background-color .12s; }
@media (hover: hover) { .tile__link:hover { background: var(--lichen); color: var(--ink); } }
/* number on top, the label right under it (every label starts on the same line), the meta pinned to the bottom */
.tile__n { display: block; height: 30px; font-size: 1.75rem; font-weight: 600; line-height: 30px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tile__n.mono { font-size: 1.375rem; letter-spacing: 0; }
.tile__label { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; min-height: calc(2 * 1.25em); font-weight: 600; font-size: var(--ui-size-s); line-height: 1.25; }
.tile__meta { display: block; margin-top: auto; color: var(--fg-2); font-size: var(--xs-size); line-height: 1.35; overflow-wrap: anywhere; }
.tile--alert .tile__n { color: var(--tomato); }
.tile--quiet .tile__n { color: var(--ink-2); }
.tile--on, .tile--on .tile__link { background: var(--lichen); }

.form-compact .field + .field, .form-compact .field + .fieldset, .form-compact .fieldset + .field, .form-compact .fieldset + .fieldset { margin-top: 12px; }
.form-compact .field__label, .form-compact .fieldset__legend { margin-bottom: 5px; font-size: var(--ui-size-xs); }
.form-compact .field__hint { margin-top: 4px; }
.form-compact :is(.input, .select) { min-height: 40px; padding: 7px 12px; border-radius: 10px; font-size: var(--small-size); }
.form-compact .select { padding-right: 38px; background-position: right 10px center; }
.form-compact .textarea { min-height: 88px; padding: 8px 12px; border-radius: 10px; font-size: var(--small-size); }
.form-compact .check + .check { margin-top: 4px; }
.form-compact .checks--inline .check + .check { margin-top: 0; }
.form-compact .choices { gap: 4px; }
.form-compact .choice__body { min-height: 40px; padding: 8px 12px; }
.form-compact .btnrow { margin-top: 16px; }
.form-compact__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-compact__row > .field + .field { margin-top: 0; }
* + .form-compact__row, .form-compact__row + * { margin-top: 12px; }
@media (max-width: 960px), (pointer: coarse) { .form-compact :is(.input, .select) { min-height: 44px; font-size: max(1rem, 16px); } }
@media (max-width: 400px) { .form-compact__row { grid-template-columns: minmax(0, 1fr); } }

.table--fit { min-width: 0 !important; }
.table-scroll > .table--fit { --table-min: 0; min-width: 0; }
/* break-word (not anywhere): a column is never squeezed narrower than its longest word, so ids and links stay whole */
.table--fit td, .table--fit th { white-space: normal; overflow-wrap: break-word; }
.table--fit td.data, .table--fit .num, .table--fit .nowrap, .table--fit .st, .table--fit .table__actions, .table--fit .mono { white-space: nowrap; overflow-wrap: normal; }
.table--fit .sub { white-space: normal; }
@media (max-width: 1439.98px) { .col-xl { display: none !important; } }


/* ==========================================================================
   22. Shipping label (100 × 150 mm, BLACK ONLY) and print rules
   The label keeps its black cell rules: it is printed on thermal stock and scanned, so it is exempt from
   the no-rules language. print-color-adjust: exact keeps the black service cell when "Background graphics" is off.
   ========================================================================== */

.label {
  page: label;
  width: 100mm; height: 150mm; max-width: 100%;
  display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto 36mm auto;
  background: #fff; color: #000; border: 2px solid #000; border-radius: 0;
  font-family: var(--f-sans); font-size: 11pt; line-height: 1.25; overflow: hidden;
  --focus: #000;
}
.label, .label * { color: #000; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.label__cell { padding: 2.2mm 3mm; border-bottom: 1.5px solid #000; min-width: 0; }
.label__row { display: grid; border-bottom: 1.5px solid #000; min-height: 0; }
.label__row > .label__cell { border-bottom: 0; }
.label__row > .label__cell + .label__cell { border-left: 1.5px solid #000; }
.label__row--top { grid-template-columns: minmax(0, 1fr) auto; }
.label__row--top .label__small { margin-top: 1.2mm; }
.label__row--2 { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
/* From | Sort | QR (labelData gives qrSvg): the QR cell is 20 mm wide and no taller than the From cell */
.label__row--qr { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 20mm; }
.label__sortdepot { display: block; font-size: 22pt; font-weight: 600; line-height: 1; letter-spacing: -.01em; }
.label__sortpc { display: block; margin-top: .8mm; font-size: 12pt; font-weight: 500; line-height: 1.1; }
.label__qr { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: .4mm .75mm; min-width: 0; border-left: 1.5px solid #000; }
.label__qr svg { display: block; width: 18.5mm; height: 18.5mm; flex: none; }
.label__qrcap { display: block; margin-top: .2mm; font-size: 6.5pt; font-weight: 600; line-height: 1; white-space: nowrap; }
.label__row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.label__cap { display: block; margin-bottom: .8mm; font-size: 12px; font-weight: 700; }
.label__svc { display: grid; place-items: center; align-content: center; padding: 1.5mm 3mm; background: #000; min-width: 24mm; }
.label__svc, .label__svc * { color: #fff; }
.label__svccode { font-family: var(--f-mono); font-weight: 600; font-size: 18pt; line-height: 1; }
.label__svcname { font-size: 10pt; font-weight: 600; }
.label__sort { display: block; font-size: 15pt; font-weight: 600; white-space: nowrap; }
.label__from { overflow-wrap: anywhere; }
.label__to { padding-top: 2.5mm; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.label__tohead { display: flex; justify-content: space-between; align-items: flex-start; gap: 2mm; flex: none; }
.label__flags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 1mm; }
.label__flag { display: inline-block; padding: .3mm 1.5mm; border: 2px solid #000; font-weight: 700; font-size: 10pt; line-height: 1.2; white-space: nowrap; }
/* A coded parcel: the driver and the counter need the receiver's parcel code (never printed). Black, like the service cell. */
.label__flag--code { background: #000; letter-spacing: .02em; }
.label__flag--code, .label .label__flag--code { color: #fff; }
.label__toname, .label__co, .label__addr, .label__sub, .label__note { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; overflow-wrap: anywhere; flex: none; }
.label__co { font-size: 12pt; line-height: 1.3; margin: 1mm 0 0; -webkit-line-clamp: 1; line-clamp: 1; }
.label__co + .label__addr { margin-top: 0; }
.label__sub { font-size: 12pt; line-height: 1.3; margin: 0; -webkit-line-clamp: 1; line-clamp: 1; }
.label__toname { font-family: var(--f-sans); font-weight: 700; letter-spacing: -.01em; font-size: 17pt; line-height: 1.1; margin: .5mm 0 0; -webkit-line-clamp: 2; line-clamp: 2; }
.label__addr { font-size: 12pt; line-height: 1.3; margin: 1mm 0 0; -webkit-line-clamp: 2; line-clamp: 2; }
.label__city { flex: none; margin: .5mm 0 0; font-size: 13pt; font-weight: 700; line-height: 1.25; }
.label__note { margin-top: 1.2mm !important; -webkit-line-clamp: 2; line-clamp: 2; }
.label__note--1 { -webkit-line-clamp: 1; line-clamp: 1; }
.label__to--dense .label__toname { font-size: 15pt; -webkit-line-clamp: 1; line-clamp: 1; }
.label__to--dense .label__co, .label__to--dense .label__addr, .label__to--dense .label__sub { font-size: 10.5pt; line-height: 1.2; }
.label__to--dense .label__city { font-size: 12pt; }
.label__to--dense .label__note { margin-top: .6mm !important; }
.label__small { font-size: 9.5pt; line-height: 1.3; margin: 0; }
.label__val { font-family: var(--f-mono); font-weight: 500; font-size: 10pt; }
.label__barcode { display: flex; flex-direction: column; justify-content: center; padding: 2mm 4mm 1.5mm; border-bottom: 1.5px solid #000; text-align: center; min-height: 0; overflow: hidden; }
.label__barcode svg { width: 100%; height: 25mm; flex: none; }
.label__barcode svg text { display: none; }
.label__track { display: block; margin-top: 1mm; font-size: 12pt; font-weight: 500; letter-spacing: .06em; }
.label__foot { padding: 1.5mm 3mm; font-size: 9pt; display: flex; justify-content: space-between; gap: 2mm; flex-wrap: wrap; }
.label-sheet { display: flex; justify-content: center; padding: var(--s-6) 0; border-radius: var(--r-xl); background: var(--oat-deep); border: 0; }
.label-sheet--many { flex-wrap: wrap; gap: var(--s-6); padding-inline: var(--s-4); }
@media screen and (max-width: 440px) {
  .label-sheet { overflow: hidden; }
  .label-sheet .label { max-width: none; zoom: .86; }
}
@media screen and (max-width: 360px) { .label-sheet .label { zoom: .74; } }
@page label { size: 100mm 150mm; margin: 0; }

@media print {
  :root { --oat: #fff; --oat-deep: #fff; --slip: #fff; --lichen: #fff; --sprout: #fff; --inset: #fff; --field: #fff; --surface: #fff; }
  body { background: #fff; color: #000; }
  .util, .hdr, .ftr, .skip, .no-print, .console__side, .console__bar, .console__scrim, .menu-btn, .btn, .table-cue, .flashes, .kit-nav, .bulkbar, .secret__copy { display: none !important; }
  .band--green, .band--moss, .band--ink, .panel--ink, .surface-dark { background: #fff !important; color: #000 !important; }
  .obj-docket__paper { clip-path: none !important; }
  .obj-tape { display: none; }
  .console { display: block; min-height: 0; }
  .console__main { padding: 0; max-width: none; }
  a { color: #000; text-decoration: none; }
  .st { color: #000 !important; }
  .st .st__ring { fill: #fff; stroke: #000; }
  .st .st__track { fill: #fff; }
  .st .st__fill { fill: #000; }
  .st .st__bar { stroke: #fff; }
  .st .st__hand, .st.st--off .st__bar { stroke: #000; }
  .st, .depot--hub .depot__code { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .table-scroll { overflow: visible; -webkit-mask-image: none !important; mask-image: none !important; }
  .table-scroll > .table { min-width: 0 !important; }
  /* Label pages (head({ bodyClass: 'is-label' })): the label alone, edge to edge, one per page */
  .label-sheet { padding: 0; background: none; border: 0; border-radius: 0; display: block; margin-inline: calc(-1 * var(--gutter)); }
  .label { border: 0; margin: 0; max-width: none; break-after: page; zoom: 1 !important; }
  .label-sheet--many { gap: 0; padding: 0; }
  .label-sheet .label:last-child { break-after: auto; }
  .is-label .wrap { max-width: none; padding-inline: 0; }
  .is-label .label-sheet { margin-inline: 0; }
  .is-label main > :not(.label-sheet), .is-label .sprite { display: none !important; }
}

/* Windows Contrast themes: states drawn with backgrounds get a system-colour mark */
@media (forced-colors: active) {
  .check__input[type="radio"]:checked::before { background: CanvasText; forced-color-adjust: none; }
  .check__input:checked { background: Highlight; border-color: Highlight; }
  .choice__input:checked + .choice__body { outline: 3px solid Highlight; outline-offset: -3px; }
  .choice__body, .input, .select, .textarea, .tool__input, .affix { border: 1px solid CanvasText; }
  .steps__i.is-now, .tabs__link[aria-current="page"], .console__link[aria-current], .console__area[aria-current], .nav__list a[aria-current] { outline: 2px solid Highlight; }
  .stepm__bar span { forced-color-adjust: none; background: GrayText; }
  .stepm__bar .is-now, .stepm__bar .is-done { background: Highlight; }
  .pager [aria-current="page"] { border: 2px solid CanvasText; }
  .slip, .table td, .panel, .alert, .errsum { border: 1px solid CanvasText; }
}


/* ==========================================================================
   23. Error pages (404 / 500): a big status code, the message, a tracking tag
   ========================================================================== */

.err { padding-block: var(--s-7) var(--s-9); }
.err__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: var(--s-6); align-items: start; }
.err__grid > * { min-width: 0; }
.err__code { grid-column: 1 / span 4; color: var(--moss); font-family: var(--f-mono); font-weight: 500; letter-spacing: -.04em; }
.err__code .mono { display: block; margin-top: var(--s-3); font-size: var(--data-s); color: var(--ink-2); letter-spacing: 0; }
.err__main { grid-column: 6 / span 7; }
.err__title { margin-bottom: var(--s-4); font-size: clamp(2.25rem, 4vw, 3.5rem); }
.err__main .lede { max-width: 30em; }
.err__track { display: flex; align-items: flex-end; gap: 10px; margin-top: var(--s-6); }
.err__track .tool { flex: 1 1 auto; }
.err__track .btn { min-height: 50px; }
.err__trackform { margin-top: var(--s-6); padding: 24px 26px; border-radius: var(--r-xl); background: var(--slip); --field: var(--oat); --inset: var(--oat); }
.err__trackform .err__track { margin-top: 0; }
.err__ref { margin-top: var(--s-6); color: var(--fg-2); font-size: var(--small-size); }
.err__tel { white-space: nowrap; }
.err__links { margin-top: var(--s-6); }
@media (max-width: 960px) {
  .err { padding-block: var(--s-5) var(--s-8); }
  .err__code, .err__main { grid-column: 1 / -1; }
}
@media (max-width: 640px) { .err__track { flex-direction: column; align-items: stretch; } }


/* ==========================================================================
   24. Kit page (/_kit, development only)
   ========================================================================== */

.kit { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--s-7); padding-top: var(--s-5); padding-bottom: var(--s-9); align-items: start; }
.kit-nav { position: sticky; top: var(--s-4); max-height: calc(100vh - 32px); overflow-y: auto; font-size: var(--small-size); }
.kit-nav ul { display: grid; gap: 2px; }
.kit-nav a { display: block; padding: 5px 10px; border-radius: 8px; text-decoration: none; }
.kit-nav a:hover { background: var(--oat-deep); }
.kit-main { min-width: 0; }
.kit-section { padding-top: var(--s-8); scroll-margin-top: 16px; }
.kit-section:first-child { padding-top: 0; }
.kit-main > .page-head { margin-bottom: 0; padding-bottom: var(--s-5); }
.kit-section > .kit-title { margin-bottom: var(--s-3); }
.kit-section > p { max-width: 46em; color: var(--ink-2); }
.kit-sub { margin: var(--s-6) 0 var(--s-3); }
.kit-demo { padding: var(--s-6); border: 0; border-radius: var(--r-xl) var(--r-xl) 0 0; background: var(--oat); box-shadow: inset 0 0 0 2px var(--oat-deep); min-width: 0; }
.kit-demo--label { background: var(--slip); box-shadow: none; }
.kit-demo--deep { background: var(--oat-deep); box-shadow: none; --surface: var(--oat-deep); --inset: var(--slip); --field: var(--slip); }
.kit-demo--green, .kit-demo--ink { background: var(--moss-deep); color: var(--on-dark); box-shadow: none; }
.kit-demo--flush { padding: 0; overflow: hidden; }
.kit-code { margin: 0 0 var(--s-5); border-radius: 0 0 var(--r-xl) var(--r-xl); }
.kit-code .code { max-height: 320px; font-size: .75rem; background: var(--oat-deep); border-radius: 0 0 var(--r-xl) var(--r-xl); }
.kit-row { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-4); align-items: center; }
.kit-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.kit-swatch { border-radius: var(--r-l); background: var(--slip); padding: 10px; }
.kit-swatch__chip { height: 52px; border-radius: 10px; }
.kit-swatch__meta { padding: 8px 2px 0; font-size: var(--xs-size); line-height: 1.4; }
.kit-swatch__meta .mono { font-size: .6875rem; }
.kit-types { display: grid; gap: var(--s-5); }
.kit-types .muted { display: block; margin-top: 4px; font-size: .75rem; font-family: var(--f-mono); }
.kit-frame { border-radius: var(--r-xl); overflow: hidden; box-shadow: inset 0 0 0 2px var(--oat-deep); }
.kit-frame .shell { padding-top: var(--s-5); padding-bottom: var(--s-6); }
.kit-frame .admin { min-height: 0; }
.kit-dont, .kit-do { padding: 18px 22px; border-radius: var(--r-l); }
.kit-do { background: var(--lichen); }
.kit-dont { background: var(--slip); }
.kit-check { list-style: decimal; padding-left: 1.4em; max-width: 52em; }
.kit-check li + li { margin-top: 6px; }
.kit-swatch__chip--oat { background: var(--oat); box-shadow: inset 0 0 0 1px rgba(28, 35, 30, .1); } .kit-swatch__chip--oat-deep { background: var(--oat-deep); }
.kit-swatch__chip--slip { background: var(--slip); box-shadow: inset 0 0 0 1px rgba(28, 35, 30, .1); } .kit-swatch__chip--lichen { background: var(--lichen); }
.kit-swatch__chip--sprout { background: var(--sprout); } .kit-swatch__chip--moss { background: var(--moss); }
.kit-swatch__chip--moss-deep { background: var(--moss-deep); } .kit-swatch__chip--ink { background: var(--ink); }
.kit-swatch__chip--ink-2 { background: var(--ink-2); } .kit-swatch__chip--tomato { background: var(--tomato); }
@media (max-width: 960px) {
  .kit { grid-template-columns: minmax(0, 1fr); gap: var(--s-5); }
  .kit-nav { position: static; max-height: none; columns: 2; }
}
.kit-wide { padding: var(--s-8) 0; scroll-margin-top: 16px; }
.kit-wide__intro { margin-bottom: var(--s-4); }
.kit-wide__intro p { max-width: 46em; color: var(--ink-2); }
.kit-wide .kit-frame { margin-top: var(--s-2); }


/* ==========================================================================
   25. Foldables, wide phones and phones held sideways
   Everything here sits inside the md breakpoint (≤ 960px); desktop is untouched.
     600–960px   wide phones and unfolded foldables (Z Fold inner 673 / 841, Pixel Fold, 884): side-by-side
                 blocks two-up (stat tiles, panels, stacked table cards, see section 12) instead of one long column
     720–960px   main + side layouts keep their side column (.aside-layout, section 5; area sheets do the same)
     ≤ 500px tall  phones on their side: sticky and fixed bars stop sticking or get shorter (area sheets)
   ========================================================================== */

@media (min-width: 600px) and (max-width: 960px) {
  .stats:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panels { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
}

/* Touch (≤ 960px or a finger): links that stand on their own (a number in a table card, "Change", "13 shipments",
   a big phone number) get a 44px tall tap area. The extra height is transparent and taken back with negative
   margins, so the line it sits on keeps its height. Row checkboxes keep their 20px box inside a 44px target. */
@media (max-width: 960px), (pointer: coarse) {
  :is(.table--stack-sm, .table--stack-md) :is(td, th) a:not(.btn), .kv dd > a, .panel__head > a:not(.btn), .crumbs a, .slip__title > a,
  :is(.docket__head, .summary__head) > a {
    display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; margin-block: -12px;
  }
  .stat__value > a { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; margin-block: -6px; }
  /* short text buttons ("Help", "Open"): an invisible 44px wide hit area, so the label never has to shrink */
  .btn--text, .link-go { position: relative; }
  .btn--text::before, .link-go::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: max(100%, 44px); transform: translateX(-50%); }
  :is(.table--stack-sm, .table--stack-md) td.table__actions :is(a, .link-btn) { min-width: 44px; }
  .contact__big { display: flex; align-items: center; min-height: 44px; margin-block: 0; }
  .table__sel .check__input {
    width: 44px; height: 44px; margin: -12px; border: 12px solid transparent !important; background-clip: padding-box;
    border-radius: 18px; box-shadow: inset 0 0 0 1.6px var(--ink-2);
  }
  .table__sel .check__input:checked { box-shadow: none; }
  .table__sel .check__input:focus-visible { outline-offset: -10px; }
}

/* Service alert: one line above the header on public pages (Operations → Network settings) */
.service-alert { margin: 0; padding: 8px var(--gutter, 16px); background: var(--oat-deep, #DEDCC6); color: var(--ink, #1C231E); text-align: center; font-size: var(--small-size, 14px); }
