/* Fabricaide Mill — the whole set.
 *
 * Generated from library/design-systems/mill/src in Patterns by scripts/mill_publish.py. Do not
 * edit this file; edit the sheet the rule belongs to and publish again.
 *
 * To adopt it in a tool:
 *   <link rel="stylesheet" href="https://tools.fabricaide.nl/mill/mill.css">
 *   <script src="https://tools.fabricaide.nl/mill/mill.js" defer></script>
 * Then put class="mill" on the container you are converting — NOT on <body>
 * until the whole tool is converted. The base rules (the button reset, the
 * transition contract, the focus ring) only reach what sits inside .mill, so
 * loading the file on its own changes nothing.
 */

/* ===== 00-tokens.css =================================================== */
/* Fabricaide Mill — foundations.
   The contract: a Mill component may read ONLY these tokens, variables it
   declares itself, or its own --mill-<component>-* variables. Never a raw hex,
   never another component's variable. Same rule as Patterns' library/tokens.json.
   Richard, 29-oct-2026. */


  :root {
    /* a page overlay sits above the shared nav (z 2147483000): overlay-top, FMIL-155 */
    --mill-overlay-z: 2147483003;
    /* colour — roles, not names */
    --mill-ground:        #F6F7F9;
    --mill-surface:       #FFFFFF;
    --mill-surface-sunk:  #EEF0F5;
    --mill-hairline:      #E3E5ED;
    --mill-hairline-soft: #EEF0F5;
    --mill-nav:           #1F2539;
    --mill-heading:       #1B2546;
    --mill-text:          #3C4153;
    --mill-secondary:     #616675;
    --mill-muted:         #6B7285;   /* 4.8:1 on white; was #9AA0B1 at 2.6:1 (Richard, 25-nov-2026, FMIL-360) */
    /* On the dark bar, muted and faint are their own values: --mill-muted is for a
       light ground and goes muddy on navy. Named 3-nov-2026, after a check of
       the set against itself found them written as raw hex in three places. */
    --mill-nav-muted:     #9AA3B2;
    --mill-nav-faint:     #C9C9D4;
    /* The green as INK on white. --mill-ok is the fill; as text it is too pale. */
    --mill-ok-ink:        #17693F;
    /* an amber that can carry words. --mill-warn is a mark colour and
       reads 3.4 to 1 on white; every tool had invented its own.
       (3-nov-2026, found by the gate on Bale and Spindle.) */
    --mill-warn-ink:      #8A5600;
    /* red as INK: words in red, and any red fill that carries white words.
       White on --mill-bad is 4.35 to 1; this is 5.4 (4.7 on the pale red).
       --mill-bad stays for marks, edges, dots and icons. 6-nov-2026. */
    --mill-bad-ink:       #CC2634;
    /* the set had no link colour and no rule for <a>, so six tools each
       picked one. This is what the gallery pages already draw. */
    --mill-link:          #1B2546;
    /* code keeps its own dark ground (45-content); its inks are named here.
       On --mill-code-ground: ink 11.8, add 8.1, del 6.2 to 1. 6-nov-2026. */
    --mill-code-ground:   #1D2130;
    --mill-code-head:     #272C40;
    --mill-code-edge:     #3A3A52;
    --mill-code-ink:      #D8DEE9;
    --mill-code-add:      #7CC98F;
    --mill-code-del:      #E08A8A;
    --mill-primary:       #FFA028;
    --mill-active-ground: #FFF4E5;
    /* 6-nov-2026 (Richard, FMIL-021): warnings take the brand orange, alarm
       and ok a step brighter. As TEXT, ok and warn use their -ink; white on
       --mill-ok measures 2.6 to 1, so a filled green carries --mill-ok-ink. */
    --mill-ok:            #22B85A;
    --mill-warn:          #FFA028;   /* the brand orange, the same value as --mill-primary */
    --mill-bad:           #E5303F;

    /* the four card kinds — the only place colour carries meaning */
    --mill-kind-client:   #FFA726;
    --mill-kind-venture:  #FF6B6B;
    --mill-kind-internal: #9575CD;
    --mill-kind-standing: #4DB6AC;

    /* key / value: one key column on a desk, so lists one under the other line up
       (Richard, 7-nov-2026, New proposed kv-key-width) */
    --mill-kv-key: 120px;

    /* type */
    --mill-display: "Kufam", system-ui, sans-serif;
    --mill-sans:    "Roboto", system-ui, sans-serif;
    --mill-mono:    "Roboto Mono", ui-monospace, Menlo, monospace;

    --mill-text-2xs:  10px;
    --mill-text-xs:   10.5px;
    --mill-text-sm:   11.5px;
    --mill-text-base: 13px;
    --mill-text-lg:   15px;
    --mill-text-xl:   19px;

    --mill-leading-2xs: 12px;
    --mill-leading-xs:  14px;
    --mill-leading-sm:  16px;
    --mill-leading-md:  18px;
    --mill-leading-lg:  20px;
    --mill-leading-xl:  24px;

    --mill-weight:        400;
    --mill-weight-medium: 500;
    --mill-weight-strong: 600;

    --mill-track-wide:  0.06em;
    --mill-track-wider: 0.08em;

    /* shape — one radius, one accent width, no exceptions */
    --mill-radius: 3px;
    --mill-dot-radius: 2px;   /* 8px square: 3 would read as a circle */
    --mill-accent: 5px;
    --mill-hair:   1px;

    /* spacing */
    --mill-space-2: 2px;   --mill-space-4: 4px;   --mill-space-6: 6px;
    --mill-space-8: 8px;   --mill-space-10: 10px; --mill-space-12: 12px;
    --mill-space-14: 14px; --mill-space-16: 16px; --mill-space-20: 20px;
    --mill-space-24: 24px; --mill-space-28: 28px; --mill-space-48: 48px;

    /* spacing by role (Richard, 6-nov-2026, the Proposals tab, FMIL-113..120):
       a part that plays one of these roles reads the role, never a step, so
       the role can move without hunting for every part that plays it. */
    --mill-pad-page:       var(--mill-space-24);  /* where the work starts, from the edge of the work area */
    --mill-pad-panel:      var(--mill-space-24);  /* inside a side panel, drawer or dialog; 20 until 8-nov-2026 */
    --mill-pad-card:       var(--mill-space-12);  /* inside a card */
    --mill-gap-card:       var(--mill-space-12);  /* between two cards of one kind */
    --mill-gap-section:    var(--mill-space-20);  /* between the stacked blocks of a page */
    --mill-gap-form:       var(--mill-space-20);  /* between two stacked field rows */
    --mill-pad-control:    var(--mill-space-12);  /* left and right inside a button, field or select */
    --mill-pad-rail:       var(--mill-space-24);  /* rail entry, sub-entry and group label, from the panel edge; 20 until 8-nov-2026 */
    --mill-pad-select-end: var(--mill-space-20);  /* a native select's right padding; the chevron sits in it */

    /* the shell */
    --mill-bar-h:       70px;
    --mill-strip-h:     10px;   /* the brand hairline at the top of the bar */
    --mill-toolbar-h:   48px;   /* the row of actions under it - its own number
                                   since the toolbar borrowed the strip's and
                                   came out 10px tall (3-nov-2026) */
    --mill-panel-open:  240px;
    --mill-panel-fold:  70px;
    --mill-group-label: 30px;
    --mill-entry:       36px;
    --mill-icon-inset:  var(--mill-pad-rail);   /* 27 until 6-nov-2026 */
    --mill-icon-gap:    10px;
    --mill-control-h:   34px;
    --mill-area-h:      76px;   /* the area field's least height */
    --mill-crumbs-h:    38px;   /* the breadcrumb under the bar */
    --mill-tabbar-h:    64px;   /* the button bar at the foot of a phone tool */
    /* the icon standard (Richard, 2-nov-2026): an icon is never drawn below
       24px, and an icon that can be clicked on its own sits in a box with
       12px around it, so the smallest icon button in the Mill is 48 x 48. */
    --mill-icon:     24px;
    /* ...but an icon that stands BESIDE its own words (a rail entry, a
       labelled button, a menu item, a tab, a tool in the bar) is 16: the
       words are the target, the icon only marks them (Richard, 6-nov-2026).
       24 in a 48 box stays for an icon that is a button on its own.
       The icon files are drawn on a 24 grid with a 1 stroke; at 16 they
       take a 1.5 stroke so the line still lands on one pixel. */
    --mill-icon-label: 16px;
    --mill-icon-label-stroke: 1.5;
    --mill-icon-pad: 12px;
    --mill-icon-btn: 48px;

    /* the old six-slot chart palette (mill-chart 1 to 6) is retired, 6-nov-2026
       (FMIL-015): it failed colour-vision checks on non-adjacent pairs. A chart
       reads the category colours in the rule's order: 1, 4, 6, 7, 11, 12. */
    --mill-grid:    #EEF0F5;

    /* the twelve category colours (Richard, 6-nov-2026, FMIL-015): one rainbow,
       yellow to pink, stepping over red, orange and green so a category never
       reads as an alarm, a warning or a success. The rules:
       1. charts and groupings use slots 1, 4, 6, 7, 11 and 12;
       2. favourites may use all twelve, in random order;
       3. a colour is used a second time only after all twelve were used once;
       4. every next set of twelve is again twelve different colours, shuffled;
       5. the same colour never sits next to itself, also not across the seam
          where one set of twelve ends and the next begins. */
    --mill-cat-1: #F5CE05;  /* yellow */
    --mill-cat-2: #B4CC01;  /* lime */
    --mill-cat-3: #0DC09B;  /* mint */
    --mill-cat-4: #08BCBC;  /* teal */
    --mill-cat-5: #01AACA;  /* cyan */
    --mill-cat-6: #0689C8;  /* azure */
    --mill-cat-7: #005BFC;  /* blue */
    --mill-cat-8: #684CFF;  /* indigo */
    --mill-cat-9: #993EF1;  /* violet */
    --mill-cat-10: #C739DC;  /* purple */
    --mill-cat-11: #EB32B9;  /* magenta */
    --mill-cat-12: #FE2992;  /* pink */

    /* state — what a part does under the pointer, the finger and the keyboard.
       One answer for the whole set: a tint that darkens the ground it sits on,
       twice as strong when pressed, and the warm tint where the thing is
       already selected. A part never invents its own hover colour. */
    --mill-hover:        rgba(31, 37, 57, 0.045);
    --mill-pressed:      rgba(31, 37, 57, 0.085);
    --mill-hover-accent: #FFF4E5;
    --mill-disabled:     0.45;

    /* motion — two durations and one curve, and nothing else. Quick is for a
       colour or a tint; move is for something that travels. Both stop dead
       under prefers-reduced-motion, which the set honours globally. */
    --mill-quick: 90ms;
    --mill-move:  180ms;
    --mill-ease:  cubic-bezier(0.2, 0.6, 0.2, 1);

    /* depth — one scrim, one shadow, one ring */
    --mill-scrim:  rgba(31, 37, 57, 0.45);
    --mill-shadow: 0 8px 24px rgba(31, 37, 57, 0.18);
    --mill-ring:   0 0 0 2px #FFFFFF, 0 0 0 4px var(--mill-primary);

    /* one breakpoint. 820 is where the rail folds; everything else was noise. */
    --mill-phone: 820px;
  }



  .mill { font-family: var(--mill-sans); font-size: var(--mill-text-base);
          line-height: var(--mill-leading-sm); color: var(--mill-text);
          background: var(--mill-ground); }
  .mill *, .mill *::before, .mill *::after { box-sizing: border-box; }

  /* [hidden] means hidden. A part that declares a display - the field, the
     select, the seg, the chip - outranked the browser's own [hidden] rule, so
     a hidden picker still drew its box (3-nov-2026). The notice and the toast
     each said this for themselves; it is said once here. */
  .mill [hidden], [hidden].mill { display: none; }
  /* a body that wears the set has no browser margin round the shell */
  body.mill { margin: 0; }
  .mill :focus-visible { outline: none; box-shadow: var(--mill-ring); }

  /* any part may be a button: strip the user agent's button paint so what you
     see is the part's own rules. In mill.base, so the parts override it. */
  :where(.mill) button, :where(.mill) [type="button"],
  :where(.mill) [type="submit"], :where(.mill) [type="reset"] {
        appearance: none; -webkit-appearance: none; margin: 0;
        border: 0; background: none; color: inherit; font: inherit;
        text-align: inherit; cursor: pointer; }
  .mill button:disabled, .mill [aria-disabled="true"] { cursor: default; }

  /* a control is never the browser's Arial. An input, a select and a textarea
     do not inherit the face the way everything else does, so every tool that
     drew its own field got Arial for free - four on the board, nine in Bale
     (3-nov-2026). The parts say it one by one; this says it for the rest. */
  .mill input, .mill select, .mill textarea { font-family: inherit; }

  /* A part never loses to the reset. The reset exists for the buttons that are
     NOT parts; a .mill-btn inside .mill states itself again, one step louder. */
  .mill .mill-btn { border: var(--mill-hair) solid var(--mill-btn-edge);
              background: var(--mill-btn-bg); color: var(--mill-btn-ink);
              font: var(--mill-weight-medium) var(--mill-text-base)/var(--mill-leading-sm) var(--mill-sans);
              text-align: center; }

  /* anything that changes under the pointer says so at one speed */
  .mill a, .mill button, .mill summary, .mill [role="button"],
  .mill input, .mill select, .mill textarea,
  .mill .mill-card, .mill .mill-rowcard, .mill .mill-list__row,
  .mill .mill-menu__item, .mill .mill-rail__entry, .mill .mill-seg__item,
  .mill .mill-thumb, .mill .mill-chip {
        transition: background-color var(--mill-quick) var(--mill-ease),
                    border-color var(--mill-quick) var(--mill-ease),
                    color var(--mill-quick) var(--mill-ease),
                    opacity var(--mill-quick) var(--mill-ease); }

  @media (prefers-reduced-motion: reduce) {
    .mill *, .mill *::before, .mill *::after {
        transition-duration: 1ms !important; animation-duration: 1ms !important;
        animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  }


/* Phone sizes (Richard, 4-nov-2026): a thumb needs 48, the same number as the
   icon button, and an iPhone zooms the page into any field set below 16px. */

  @media (max-width: 820px) {
    :root {
      --mill-control-h: 48px;
      --mill-entry:     48px;
      --mill-text-base: 16px;
      --mill-text-lg:   16px;   /* headings: md (16 here) retired into lg, 6-nov-2026 */
      --mill-text-sm:   13px;
      --mill-leading-sm: 22px;
      --mill-leading-xs: 16px;
    }
  }


/* ===== 10-controls.css ================================================= */
/* Mill · CONTROLS — button, segmented, switch, checkbox, field, select,
   field group, action row, sticky footer. Nine components, one height. */


  /* --- a link ------------------------------------------------------------
     Heading ink and a hairline underline that takes the accent on hover.
     Not a new idea: it is how every Mill gallery page already draws one. */
  /* A link that wears a part takes the part's look, not the browser's
     underline. Only a bare link gets the set's hairline (3-nov-2026). */
  :where(.mill) a { color: inherit; text-decoration: none; }
  .mill a:not([class]), a.mill-link {
              color: var(--mill-link); text-decoration: none;
              border-bottom: var(--mill-hair) solid var(--mill-hairline); }
  .mill a:not([class]):hover, a.mill-link:hover {
              border-bottom-color: var(--mill-primary); }


  /* --- button ------------------------------------------------------------
     The default button is a navy outline: white ground, navy edge, navy label
     at medium weight. With the field's grey hairline and dark text it read as
     the field beside it (Richard, 7-nov-2026, New proposed "button-b", B).
     Every modifier still sets its own ink and edge, so primary, quiet, link,
     danger, ok and warn are untouched; small and icon are this look. */
  .mill-btn {
    --mill-btn-bg: var(--mill-surface);
    --mill-btn-ink: var(--mill-nav);
    --mill-btn-edge: var(--mill-nav);
    --mill-btn-h: var(--mill-control-h);
    /* a full-size button keeps 20 either side of its words (Richard, 10-nov-2026, btn-pad-20) */
    --mill-btn-pad: 0 var(--mill-space-20);
    display: inline-flex; align-items: center; justify-content: center; gap: var(--mill-space-8);
    height: var(--mill-btn-h); padding: var(--mill-btn-pad);
    font: var(--mill-weight-medium) var(--mill-text-base)/var(--mill-leading-sm) var(--mill-sans);
    color: var(--mill-btn-ink); background: var(--mill-btn-bg);
    border: var(--mill-hair) solid var(--mill-btn-edge); border-radius: var(--mill-radius);
    cursor: pointer; white-space: nowrap; text-decoration: none;
  }
  .mill-btn--primary { --mill-btn-bg: var(--mill-nav); --mill-btn-ink: #FFFFFF; --mill-btn-edge: var(--mill-nav); }
  .mill-btn--danger  { --mill-btn-bg: var(--mill-bad-ink); --mill-btn-ink: #FFFFFF; --mill-btn-edge: var(--mill-bad-ink); }
  .mill-btn--quiet   { --mill-btn-bg: transparent; --mill-btn-edge: transparent; --mill-btn-ink: var(--mill-secondary); --mill-btn-pad: 0 var(--mill-pad-control); }
  .mill-btn--small   { --mill-btn-h: 26px; --mill-btn-pad: 0 var(--mill-pad-control); font-size: var(--mill-text-sm); }
  .mill-btn--icon    { --mill-btn-pad: 0; width: var(--mill-btn-h); }
  /* an icon inside a labelled button still draws at 24; the button keeps the
     control height, because its hit area is the whole button, not the icon */
  .mill-btn svg      { width: var(--mill-icon-label); height: var(--mill-icon-label); flex: none; display: block;
                       stroke-width: var(--mill-icon-label-stroke); }
  .mill-btn--icon svg { width: var(--mill-icon); height: var(--mill-icon); stroke-width: 1; }
  .mill-btn[disabled], .mill-btn--disabled { opacity: .45; cursor: default; }

  /* --- the icon ------------------------------------------------------------
     An icon is the PAIR: a 48 box with 12 around a 24 mark. Never the mark on
     its own, and never a mark drawn below 24. (Richard, 2-nov-2026) */
  .mill-icon { display: inline-flex; align-items: center; justify-content: center;
              width: var(--mill-icon-btn); height: var(--mill-icon-btn); flex: none;
              padding: var(--mill-icon-pad); color: inherit; }
  .mill-icon svg { width: var(--mill-icon); height: var(--mill-icon); display: block;
              fill: none; stroke: currentColor; stroke-width: 1; }
  /* the More dots are the one icon without an outline: three solid dots in the text colour
     (Richard, 14-nov-2026, icon-dots-solid, THRE-067) */
  .mill-icon--dots svg { fill: var(--mill-text); stroke: none; }
  .mill-icon--button { border: 0; background: transparent; cursor: pointer;
              border-radius: var(--mill-radius); }
  .mill-icon--button:hover { background: var(--mill-active-ground); }

  /* --- segmented control -------------------------------------------------- */
  .mill-seg { display: inline-flex; flex: none; align-self: flex-start;
              border: var(--mill-hair) solid var(--mill-hairline);
              border-radius: var(--mill-radius); overflow: hidden; background: var(--mill-surface); }
  /* a count beside the label is a second flex item, and the space between two
     flex items is dropped: "To-dos(10)". The gap puts it back. */
  .mill-seg__item { display: inline-flex; align-items: center; gap: var(--mill-space-4);
              height: var(--mill-control-h);
              padding: 0 var(--mill-space-12); font: var(--mill-weight) var(--mill-text-base)/var(--mill-leading-sm) var(--mill-sans);
              color: var(--mill-secondary); background: transparent; border: 0; text-decoration: none;
              border-right: var(--mill-hair) solid var(--mill-hairline); cursor: pointer; }
  .mill-seg__item:last-child { border-right: 0; }
  /* wider than the room it has: it scrolls rather than hiding the far end.
     Two of five stages were unreachable on a phone (3-nov-2026). */
  .mill-seg { max-width: 100%; overflow-x: auto; scrollbar-width: thin; }
  .mill-seg__item { flex: none; }
  .mill-seg__item--on,
  .mill-seg__item[aria-selected="true"],
  .mill-seg__item[aria-pressed="true"] { background: var(--mill-active-ground); color: var(--mill-heading); font-weight: var(--mill-weight-medium); }

  /* --- toggle switch ------------------------------------------------------
     Fully rounded, Richard 29-oct-2026. The rounded square stays for
     indicators and bullets; a switch is a control, not an indicator.
     The knob is a flex child, never absolutely positioned, so it is centred
     by the layout rather than by arithmetic that drifts with the border. */
  .mill-switch { display: inline-flex; align-items: center; gap: var(--mill-space-8); cursor: pointer; }
  /* the one exception to "no corner larger than 3" (Richard, 2-nov-2026): the
     switch is a circle, and that round shape is what makes it read as a switch
     rather than as a small box. Stated as an exception on the foundations page. */
  .mill-switch__track { display: flex; align-items: center; justify-content: flex-start;
              width: 34px; height: 20px; padding: 3px; flex: none;
              background: var(--mill-surface-sunk); border: var(--mill-hair) solid var(--mill-hairline);
              border-radius: 999px; }
  .mill-switch__knob { width: 12px; height: 12px; flex: none;
              border-radius: 999px; background: var(--mill-muted); }
  .mill-switch--on .mill-switch__track { justify-content: flex-end;
              background: var(--mill-active-ground); border-color: var(--mill-primary); }
  .mill-switch--on .mill-switch__knob { background: var(--mill-primary); }

  /* --- checkbox / radio row ----------------------------------------------- */
  /* the box stands on the first line of its label, however many lines it
     runs to (Richard, 12-nov-2026, check-first-line, BACK-039) */
  .mill-check { display: flex; align-items: flex-start; gap: var(--mill-space-8); }
  .mill-check > :is(.mill-check__box, input[type="checkbox"], input[type="radio"]) { margin-top: calc((1lh - 14px) / 2); }
  .mill-check__box { width: 14px; height: 14px; flex: none; border-radius: var(--mill-radius);
              border: var(--mill-hair) solid var(--mill-hairline); background: var(--mill-surface); }
  /* checked: navy fill with a white line inside it, so the box still reads as a
     box rather than a solid lump. Richard, 29-oct-2026. */
  .mill-check--on .mill-check__box { background: var(--mill-nav); border-color: var(--mill-nav);
              box-shadow: inset 0 0 0 2px var(--mill-surface); }
  .mill-check--radio .mill-check__box { border-radius: var(--mill-radius); }

  /* --- field --------------------------------------------------------------- */
  .mill-field, .mill-select,
  .mill-fieldgroup > input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
  .mill-fieldgroup > textarea,
  .mill-fieldgroup > select {
    --mill-field-h: var(--mill-control-h);
    display: flex; align-items: center; width: 100%;
    height: var(--mill-field-h); padding: 0 var(--mill-pad-control);
    font: var(--mill-weight) var(--mill-text-base)/var(--mill-leading-sm) var(--mill-sans);
    color: var(--mill-text); background: var(--mill-surface);
    border: var(--mill-hair) solid var(--mill-hairline); border-radius: var(--mill-radius);
  }
  .mill-field::placeholder { color: var(--mill-muted); }
  .mill-field--area { --mill-field-h: auto; min-height: var(--mill-area-h); padding: var(--mill-space-8) var(--mill-pad-control); align-items: start; }
  .mill-field--short { width: 120px; }
  .mill-field--inline { height: 26px; border-color: transparent; background: transparent; padding: 0; }

  /* --- select -------------------------------------------------------------- */
  .mill-select { display: flex; align-items: center; justify-content: space-between;
              gap: var(--mill-space-8); appearance: none; background-image: none; }
  /* a bare textarea in a group is the area field: it grows, it does not centre */
  .mill-fieldgroup > textarea { --mill-field-h: auto; min-height: var(--mill-area-h);
              padding: var(--mill-space-8) var(--mill-pad-control); align-items: start; }
  /* A NATIVE select wears the part too. appearance:none takes its arrow
     away and the set drew the replacement only for the custom control, so
     every native select in the fleet lost its chevron (3-nov-2026).
     EVERY one-line select inside the Mill wears the same arrow, in the same place:
     inset from the right by the field's own text inset (--mill-select-inset), so a
     field, a compact field, a table cell, the phone dropdown under a seg and a bare
     select in a tool all draw it alike (Richard, 16-nov-2026, FMIL-348: "This should
     be fixed everywhere"). It replaces the export strip's 4px arrow (exportstrip-select-tight). */
  .mill select:not([multiple]):not([size]) { appearance: none; -webkit-appearance: none;
     background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7285' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
     background-repeat: no-repeat; background-size: 14px 14px;
     background-position: right var(--mill-select-inset, var(--mill-pad-control)) center;
     padding-right: calc(var(--mill-select-inset, var(--mill-pad-control)) + 14px + var(--mill-space-8)); }
  .mill-select__chev { display: flex; flex: none; color: var(--mill-muted); }
  .mill-select__chev svg { width: var(--mill-icon-label); height: var(--mill-icon-label); display: block;
              stroke-width: var(--mill-icon-label-stroke); }
  /* icons beside words: a menu item, a chip, a tab */
  .mill-menu__item svg, .mill-chip > svg, .mill-seg__item svg {
              width: var(--mill-icon-label); height: var(--mill-icon-label); flex: none; display: block;
              stroke-width: var(--mill-icon-label-stroke); }

  /* --- field group ---------------------------------------------------------- */
  .mill-fieldgroup { display: flex; flex-direction: column; gap: var(--mill-space-4); }
  .mill-fieldgroup__label { font: var(--mill-weight-medium) var(--mill-text-base)/var(--mill-leading-sm) var(--mill-sans); color: var(--mill-heading); }
  .mill-fieldgroup__hint  { font-size: var(--mill-text-sm); line-height: var(--mill-leading-xs); color: var(--mill-secondary); }
  /* help text stands 8px under its input: the group gap plus 4; letters and
     line spacing as they were (Richard, 14-nov-2026, hint-gap-8, BACK-039) */
  .mill-fieldgroup > :is(input, select, textarea, .mill-field, .mill-select) + .mill-fieldgroup__hint { margin-top: var(--mill-space-4); }
  .mill-fieldgroup__error { font-size: var(--mill-text-sm); line-height: var(--mill-leading-xs); color: var(--mill-bad-ink); }
  .mill-fieldgroup--bad .mill-field { border-color: var(--mill-bad); }

  /* two field groups on one line. Collapses to one column on a phone. */
  .mill-fieldrow { display: grid; grid-template-columns: 1fr 1fr; gap: var(--mill-space-12); }
  /* --pair: two short controls that belong together (a day and a time) stay on
     one line on a phone too; 64-phone.css keeps them side by side there
     (Richard, 7-nov-2026, New proposed "slots-phone"). On a desk it is the row. */
  .mill-fieldrow--pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

  /* --- action row ----------------------------------------------------------- */
  .mill-actions { display: flex; align-items: center; gap: var(--mill-space-8); }
  .mill-actions--end { justify-content: flex-end; }

  /* --- sticky action footer -------------------------------------------------- */
  .mill-footbar { position: sticky; bottom: 0; display: flex; align-items: center; gap: var(--mill-space-12);
              padding: var(--mill-space-10) var(--mill-space-16); background: var(--mill-surface);
              border-top: var(--mill-hair) solid var(--mill-hairline); }
  .mill-footbar__spacer { flex: 1 1 auto; }

  /* --- state: controls. One hover for the whole set, from the tokens. ------ */
  .mill-btn:hover            { background-image: linear-gradient(var(--mill-hover), var(--mill-hover)); }
  .mill-btn:active           { background-image: linear-gradient(var(--mill-pressed), var(--mill-pressed)); }
  .mill-btn--primary:hover   { filter: brightness(1.08); }
  .mill-btn--primary:active  { filter: brightness(0.94); }
  .mill-btn--danger:hover    { background: var(--mill-bad-ink); color: #fff; }
  .mill-btn--disabled, .mill-btn:disabled,
  .mill-btn[aria-disabled="true"] { opacity: var(--mill-disabled); pointer-events: none; }
  .mill-btn[data-busy]       { pointer-events: none; opacity: var(--mill-disabled); }

  .mill-seg__item:hover      { background: var(--mill-hover); }
  .mill-seg__item--on:hover  { background: var(--mill-hover-accent); }
  .mill-check:hover .mill-check__box { border-color: var(--mill-primary); }
  .mill-switch:hover .mill-switch__track { background: var(--mill-pressed); }
  .mill-switch--on:hover .mill-switch__track { filter: brightness(1.08); }
  .mill-field:hover, .mill-select:hover { border-color: var(--mill-secondary); }
  .mill-field[readonly] { background: var(--mill-surface-sunk); color: var(--mill-secondary); }

  /* the field group never had a way to say a field must be filled */
  .mill-fieldgroup--required > .mill-fieldgroup__label::after {
              content: "*"; margin-left: 3px; color: var(--mill-bad-ink);
              font-weight: var(--mill-weight-medium); }
  .mill-field:user-invalid, .mill-select:user-invalid {
              border-color: var(--mill-bad); }

  /* a second, smaller size for a packed form. The button and the inline field
     already had one; the field and the select did not. */
  .mill-field--compact, .mill-select--compact {
              --mill-field-h: 26px; height: var(--mill-field-h); padding: 0 var(--mill-pad-control);
              font-size: var(--mill-text-sm); }


  /* --- behaviour: drop, grip, and the states mill.js writes ---------------- */
  .mill-drop { display: flex; align-items: center; justify-content: center;
              gap: var(--mill-space-8); min-height: 84px; padding: var(--mill-space-16);
              border: 1px dashed var(--mill-hairline); border-radius: var(--mill-radius);
              background: var(--mill-surface); color: var(--mill-secondary);
              font-size: var(--mill-text-sm); cursor: pointer; }
  .mill-drop[data-over] { border-color: var(--mill-primary);
              background: var(--mill-hover-accent); color: var(--mill-heading); }
  .mill-drop input[type="file"] { display: none; }

  .mill-grip { flex: none; width: 5px; cursor: col-resize; align-self: stretch;
              background: transparent; border: 0; padding: 0; }
  .mill-grip:hover, .mill-grip:active { background: var(--mill-primary); }

  .mill-btn[data-copied] { color: var(--mill-ok-ink); }
  .mill-btn[data-armed]  { background: var(--mill-bad-ink); color: #fff; border-color: var(--mill-bad-ink); }



/* re-opened: the components layer, not whatever this file ends with. */

  /* --- modifiers, 2-nov-2026 --------------------------------------------- */

  /* a toggle group with no track: the live one is weight and colour only */
  .mill-seg--quiet { background: none; border: 0; gap: var(--mill-space-14); height: auto; }
  /* tabs never hide behind a sideways swipe: a quiet strip wider than its room wraps
     onto a second line, so every tab stays in sight (Richard, 9-nov-2026) */
  .mill-seg--quiet { flex-wrap: wrap; overflow-x: visible; row-gap: var(--mill-space-8); }
  .mill-seg--quiet .mill-seg__item { --mill-seg-line: transparent; border: 0; padding: 0 0 var(--mill-space-6);
              background: linear-gradient(var(--mill-seg-line), var(--mill-seg-line)) left bottom / 100% 2px no-repeat;
              color: var(--mill-muted); }
  .mill-seg--quiet .mill-seg__item:hover { background-color: transparent; color: var(--mill-secondary); }
  .mill-seg--quiet .mill-seg__item[aria-selected="true"],
  .mill-seg--quiet .mill-seg__item--on { color: var(--mill-heading);
              font-weight: var(--mill-weight-medium); --mill-seg-line: var(--mill-primary); }


/* re-opened: the components layer, not whatever this file ends with. */

  /* --- the last of the layer rows, 2-nov-2026 ---------------------------- */

  /* two more button variants. The board drew a green confirm three times and
     an amber hold once, each by hand, because the set had primary, quiet and
     danger and nothing that says yes or wait. */
  /* the fill is the INK green: white on --mill-ok measured 2.8 to 1, and the
     tokens already say that green is a mark, not a carrier of text
     (Richard, 4-nov-2026, seen on Bale's Advance button). */
  .mill-btn--ok   { --mill-btn-bg: var(--mill-ok-ink); --mill-btn-edge: var(--mill-ok-ink);
              --mill-btn-ink: #FFFFFF; }
  .mill-btn--ok:hover   { filter: brightness(1.08); }
  .mill-btn--warn { --mill-btn-bg: transparent; --mill-btn-edge: var(--mill-warn);
              --mill-btn-ink: var(--mill-warn-ink);
              color: #8A5A10; }
  .mill-btn--warn:hover { background: var(--mill-warn-ink); color: #fff; }

  /* a button that fills its box, which is what a sign-in form needs */
  .mill-btn--full { display: flex; width: 100%; justify-content: center; }
  /* a button that is a toggle. The chip and the segmented item each had a
     pressed state; the button did not, so four tools drew their own live
     outline (3-nov-2026). */
  .mill-btn[aria-pressed="true"] { background: var(--mill-active-ground);
              border-color: var(--mill-primary); color: var(--mill-heading); }
  /* An ICON button that is on colours its mark; it does not fill its box.
     A filled box reads as held down, and a favourite is a state, not a
     control you are pressing (Richard, 3-nov-2026). */
  .mill-btn--icon[aria-pressed="true"] { background: none; border-color: transparent;
              color: var(--mill-primary); }

  /* a borderless button in the link colour. Spindle uses this shape 33 times
     as its main inline action; --quiet is a quiet button, not a link. */
  /* it sets the variables, because `.mill .mill-btn` (0,2,0) paints the
     edge and the ground from them and beat a plain border-color here */
  .mill-btn--link { --mill-btn-bg: transparent; --mill-btn-edge: transparent; --mill-btn-ink: var(--mill-primary);
              background: none; border-color: transparent;
              color: var(--mill-primary); padding: 0; height: auto; }
  .mill-btn--link:hover { background: none; text-decoration: underline; }
  /* text that is also a control: the words in the text's own grey and weight, no box, no padding,
     the mark at the label size beside them. A row id that copies itself (Richard, 10-nov-2026).
     .mill .mill-btn sets the medium weight one step louder, so this states itself at that step. */
  .mill .mill-btn--text { --mill-btn-bg: transparent; --mill-btn-edge: transparent; --mill-btn-ink: var(--mill-text);
              background: none; border-color: transparent;
              color: var(--mill-text); font-weight: var(--mill-weight); padding: 0; height: auto; }
  .mill .mill-btn--text:hover { background: none; text-decoration: underline; }

  /* the native pickers, on the set's own height. About 28 of them across the
     fleet and not one was styled. */
  .mill-field[type="date"], .mill-field[type="time"],
  .mill-field[type="datetime-local"], .mill-field[type="month"] {
              padding-right: var(--mill-space-6); }
  .mill-field[type="date"]::-webkit-calendar-picker-indicator,
  .mill-field[type="time"]::-webkit-calendar-picker-indicator,
  .mill-field[type="datetime-local"]::-webkit-calendar-picker-indicator,
  .mill-field[type="month"]::-webkit-calendar-picker-indicator {
              opacity: .45; cursor: pointer; }
  .mill-field[type="date"]:hover::-webkit-calendar-picker-indicator,
  .mill-field[type="time"]:hover::-webkit-calendar-picker-indicator,
  .mill-field[type="datetime-local"]:hover::-webkit-calendar-picker-indicator,
  .mill-field[type="month"]:hover::-webkit-calendar-picker-indicator { opacity: 1; }


/* A small control is small on a desk. On a phone there is one thumb, so every
   control takes the phone height (Richard, 4-nov-2026). */

  @media (max-width: 820px) {
    .mill-btn--small { --mill-btn-h: var(--mill-control-h); }
    .mill-field--compact, .mill-select--compact { --mill-field-h: var(--mill-control-h); }
  }


/* The colour control (REFE-141, 6-nov-2026): a native colour picker drawn as
   the set's large swatch, the chosen colour filling it. As a field it came
   out a thin bar of colour inside 12px of padding. */

  .mill-colour { -webkit-appearance: none; appearance: none; flex: none;
              width: 28px; height: 28px; padding: 0; cursor: pointer; background: none;
              border: var(--mill-hair) solid var(--mill-hairline); border-radius: var(--mill-radius); }
  .mill-colour::-webkit-color-swatch-wrapper { padding: 0; }
  .mill-colour::-webkit-color-swatch { border: 0; border-radius: calc(var(--mill-radius) - 1px); }
  .mill-colour::-moz-color-swatch { border: 0; border-radius: calc(var(--mill-radius) - 1px); }
  .mill-colour:hover { border-color: var(--mill-secondary); }
  .mill-colour:disabled { opacity: var(--mill-disabled); cursor: default; }
  /* one thumb on a phone: the control's own height, like every other control */
  @media (max-width: 820px) { .mill-colour { width: var(--mill-control-h); height: var(--mill-control-h); } }


/* Taken in from the Proposals tab as suggested (Richard, 6-nov-2026). */

  /* --- export strip (C63): compact labelled fields in one row, download last */
  .mill-exportstrip { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--mill-space-12); }
  .mill-exportstrip > .mill-fieldgroup { width: auto; }
  .mill-exportstrip__check { display: inline-flex; align-items: center; gap: var(--mill-space-6);
              height: var(--mill-control-h); cursor: pointer; }
  .mill-exportstrip__check > input { margin: 0; accent-color: var(--mill-primary); }
  /* the download is a full button, the height of the fields beside it (FMIL-351) */
  .mill-exportstrip__go { margin-left: auto; --mill-btn-h: var(--mill-control-h);
              --mill-btn-pad: 0 var(--mill-space-20); font-size: var(--mill-text-base); }


/* ===== 20-bands.css ==================================================== */
/* Mill · BANDS — notice, empty state, error state, toast. Four components.
   A band carries the accent on ONE edge, 5px, over the hairline on the corner. */
/* The accent is ONE element, 5px, laid over the host's own border on the edge it
   owns: it reaches 1px past the host's box on three sides so the hairline cannot
   cap it at the corners, and it is square where the host is round. Before this
   the accent was 1px of recoloured border plus a 4px child inside the padding
   box, which left a grey nick across the accent at both corners (Richard,
   2-nov-2026). The host keeps its hairline on all four edges; the accent hides
   the one it covers. */


  /* --- the accent ----------------------------------------------------------
     5px on the edge it owns, and no grey anywhere near it. Two parts, because
     Paper will not draw a child outside its parent's box: the host's hairline
     on that edge is recoloured to the accent, and a 4px element sits inside it.
     1 + 4 = 5, the corner comes from the host's own radius, the host keeps its
     border so nothing moves, and nothing is positioned outside its frame. */
  .mill-accent { --mill-accent-out: calc(-1 * var(--mill-hair));
              position: absolute; z-index: 1;
              top: var(--mill-accent-out); bottom: var(--mill-accent-out);
              left: var(--mill-accent-out);
              width: var(--mill-accent);
              background: var(--mill-primary);
              /* the accent's outer edge IS the host's outer edge, so it carries the
                 host's own corner on the edge it owns (Richard, 2-nov-2026) */
              border-radius: var(--mill-radius) 0 0 var(--mill-radius); }
  .mill-accent--right { left: auto; right: var(--mill-accent-out);
              border-radius: 0 var(--mill-radius) var(--mill-radius) 0; }
  .mill-accent--top { bottom: auto; right: var(--mill-accent-out); width: auto;
              height: var(--mill-accent);
              border-radius: var(--mill-radius) var(--mill-radius) 0 0; }
  .mill-accent--bad { background: var(--mill-bad); }
  /* a host with no border of its own has nothing to reach over */
  .mill-accent--flush { --mill-accent-out: 0px; }

  /* a host that carries the accent without an element of its own still shows it */
  .mill-error.mill-error, .mill-confirm.mill-confirm,
  .mill-rowcard--blocked.mill-rowcard--blocked { border-left-color: var(--mill-bad); }
  .mill-col--needs-you.mill-col--needs-you { border-top-color: var(--mill-primary); }
  .mill-notice .mill-accent { background: var(--mill-notice-edge); }


  .mill-notice {
    --mill-notice-edge: var(--mill-primary);
    --mill-notice-bg: var(--mill-active-ground);
    display: flex; align-items: flex-start; gap: var(--mill-space-14);
    padding: var(--mill-space-10) var(--mill-space-12);
    background: var(--mill-notice-bg);
    border: var(--mill-hair) solid var(--mill-hairline);
    border-radius: var(--mill-radius);
    position: relative;
  }
  .mill-notice__label { flex: none; font: var(--mill-weight-medium) var(--mill-text-2xs)/var(--mill-leading-2xs) var(--mill-mono);
              letter-spacing: var(--mill-track-wider); text-transform: uppercase; color: var(--mill-warn-ink); padding-top: 2px; }
  .mill-notice--warn { --mill-notice-edge: var(--mill-warn); }
  .mill-notice--stop { --mill-notice-edge: var(--mill-bad); --mill-notice-bg: #FDECEC; }
  .mill-notice--stop .mill-notice__label { color: var(--mill-bad-ink); }
  .mill-notice--ok   { --mill-notice-edge: var(--mill-ok); --mill-notice-bg: #F1F9F4; }
  .mill-notice--ok .mill-notice__label { color: var(--mill-ok-ink); }
  /* the one notice that survives printing: an incomplete invoice cannot be sent quietly */
  .mill-notice--blocker { --mill-notice-edge: var(--mill-bad); }
  @media print { .mill-notice { display: none; } .mill-notice--blocker { display: flex; } }

  .mill-empty { display: flex; flex-direction: column; align-items: center; gap: var(--mill-space-6);
              padding: var(--mill-space-28); text-align: center; color: var(--mill-secondary);
              background: var(--mill-surface); border: var(--mill-hair) dashed var(--mill-hairline);
              border-radius: var(--mill-radius); }
  .mill-empty__title { font-weight: var(--mill-weight-medium); color: var(--mill-heading); }

  .mill-error { display: flex; flex-direction: column; align-items: center; gap: var(--mill-space-6);
              padding: var(--mill-space-28); text-align: center;
              background: var(--mill-surface); border: var(--mill-hair) solid var(--mill-hairline);
              border-radius: var(--mill-radius); position: relative; }
  .mill-error__title { font-weight: var(--mill-weight-medium); color: var(--mill-bad-ink); }

  /* a toast is a message, not a button: a light note with its tone on the
     left edge (Richard, 9-nov-2026, toast-note-b, FMIL-138) */
  .mill-toast { --mill-toast-edge: var(--mill-primary);
              display: inline-flex; align-items: center; justify-content: space-between;
              gap: var(--mill-space-12); min-width: 280px; text-align: left;
              padding: var(--mill-space-10) var(--mill-space-14);
              color: var(--mill-heading); background: var(--mill-surface);
              border: var(--mill-hair) solid var(--mill-hairline);
              border-left: var(--mill-accent) solid var(--mill-toast-edge);
              border-radius: var(--mill-radius); box-shadow: var(--mill-shadow); }
  .mill-toast--ok   { --mill-toast-edge: var(--mill-ok); }
  .mill-toast--warn { --mill-toast-edge: var(--mill-warn); }
  .mill-toast--bad  { --mill-toast-edge: var(--mill-bad); color: var(--mill-bad-ink); }
  .mill-toast__undo { color: var(--mill-primary); font-weight: var(--mill-weight-medium); cursor: pointer; }


/* re-opened: the components layer, not whatever this file ends with. */

  /* --- modifiers, 2-nov-2026 --------------------------------------------- */

  /* the accent in the other two tones, and on a row that has no border of its
     own: a message that wants an answer, recoloured by how urgent it is */
  .mill-accent--warn { background: var(--mill-warn); }
  .mill-accent--info { background: var(--mill-primary); }
  .mill-edge { position: relative; padding-left: var(--mill-space-12); }
  .mill-edge::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0;
              width: 3px; border-radius: var(--mill-radius) 0 0 var(--mill-radius);
              background: var(--mill-primary); }
  .mill-edge--warn::before { background: var(--mill-warn); }
  .mill-edge--bad::before  { background: var(--mill-bad); }
  .mill-edge--tint { background: var(--mill-hover-accent); }


/* re-opened: the components layer, not whatever this file ends with. */

  /* A surface with room in it. .mill-surface is the bare plane - ground,
     hairline, radius - and most of the time what a tool actually wants is
     that plane with padding, which every tool was writing for itself. */
  .mill-surface--pad { padding: var(--mill-space-16); }
  .mill-surface--roomy { padding: var(--mill-space-20); }


/* ===== 30-navigation.css =============================================== */
/* Mill · NAVIGATION — the bar and the rail.
   These two are the core of the Mill: one bar across every tool, one rail
   inside each. Everything else hangs off them. Both are written here once;
   nav.js and theme.css are what they replace.

   The bar is three bands:
     the strip   10 tall, the brand ramp, left to right
     the sign    70 x 70 at 0,0 — it covers the strip, never sits under it
     the row     60 tall, navy, tools on the left, controls on the right
   At 820 and below the tool row is replaced by the name of the tool you are
   in and a menu toggle; the tools move into a sheet. */



  /* --- the bar ------------------------------------------------------------ */
  /* The bar's ground for tools that read the old contract variable. html:root (0,1,1)
     outranks the shared theme's :root declaration whatever the load order. */
  html:root { --fab-nav-bg: var(--mill-nav); }

  .mill-bar { position: relative; width: 100%; height: var(--mill-bar-h); flex: none; }

  .mill-bar__strip { position: absolute; left: var(--mill-panel-fold); right: 0; top: 0;
              height: var(--mill-strip-h);
              background-image: linear-gradient(to right,
                #1F2539 0%, #2F4B6E 22%, #2F8FC2 42%, #7C5CBF 58%, #C2572F 78%, #FFA028 100%); }

  .mill-bar__sign { position: absolute; left: 0; top: 0; z-index: 3;
              width: var(--mill-panel-fold); height: var(--mill-bar-h);
              display: flex; align-items: center; justify-content: center;
              background: var(--mill-primary); }
  .mill-bar__sign svg { width: 31px; height: 30px; display: block; }

  .mill-bar__row { position: absolute; left: var(--mill-panel-fold); right: 0; top: var(--mill-strip-h);
              height: calc(var(--mill-bar-h) - var(--mill-strip-h));
              display: flex; align-items: center;
              padding-left: 0; padding-right: var(--mill-space-16);
              background: var(--mill-nav);
              font: var(--mill-weight-medium) var(--mill-text-base)/var(--mill-leading-sm) var(--mill-sans); }

  .mill-bar__tools { display: flex; align-items: center; flex: 1 1 auto; min-width: 0; overflow: hidden; }
  .mill-bar__tool { display: flex; align-items: center; gap: var(--mill-space-8);
              height: 100%; padding: 0 var(--mill-space-12); flex: none;
              color: var(--mill-nav-link, var(--mill-nav-muted)); text-decoration: none; }
  .mill-bar__tool svg { width: var(--mill-icon-label); height: var(--mill-icon-label); flex: none; display: block;
              fill: none; stroke: currentColor; stroke-width: var(--mill-icon-label-stroke); }
  .mill-bar__tool--on { color: var(--mill-surface); font-weight: var(--mill-weight-strong); }

  /* the marker for the tool you are in: a pill lying ON the bar's edge,
     measured from the live link, not from a hardcoded offset */
  .mill-bar__pill { position: absolute; top: calc(var(--mill-bar-h) - 8px);
              height: 8px; border-radius: var(--mill-radius); background: var(--mill-primary); }

  .mill-bar__controls { display: flex; align-items: center; gap: var(--mill-space-12); flex: none; }
  .mill-bar__who { display: flex; align-items: center; gap: var(--mill-space-8); color: var(--mill-surface); }
  .mill-bar__lens { width: 10px; height: 10px; flex: none; border-radius: var(--mill-radius);
              background: var(--mill-ok); }
  .mill-bar__rec { display: flex; align-items: center; gap: var(--mill-space-6); color: var(--mill-nav-faint); }
  .mill-bar__rec .mill-bar__lens { background: var(--mill-nav-faint); }
  .mill-bar__help { display: flex; align-items: center; justify-content: center;
              width: var(--mill-icon-btn); height: var(--mill-icon-btn); flex: none;
              border: var(--mill-hair) solid #3A3A52; border-radius: var(--mill-radius);
              color: var(--mill-nav-faint); font-size: var(--mill-text-xs); }

  /* phone only: the tool you are in, and the way to the others */
  .mill-bar__here { display: none; align-items: center; flex: 1 1 auto; min-width: 0;
              padding-left: var(--mill-space-16);
              font-family: var(--mill-display); font-size: var(--mill-text-xl);
              font-weight: var(--mill-weight-medium); line-height: var(--mill-leading-xl);
              color: var(--mill-surface); }
  .mill-bar__burger { display: none; }
  .mill-bar__spacer { flex: 1 1 auto; }

  /* --- the rail ------------------------------------------------------------ */
  /* min-height 0: a long rail gives its height back to the shell and its
     entries scroll (.mill-rail__scroll) instead of making the page as tall */
  .mill-rail { width: var(--mill-panel-open); flex: none; min-height: 0;
              display: flex; flex-direction: column;
              background: var(--mill-surface);
              border-right: var(--mill-hair) solid var(--mill-hairline); }

  /* the head holds the 48 fold button, so it is at least that tall */
  /* the fold button sits right; with the tool's name in the head, the name
     sits on the rail's own left edge and the button stays right. It said
     space-between and then flex-end, so the name hugged the button. */
  .mill-rail__head { height: var(--mill-panel-head, var(--mill-icon-btn)); flex: none;
              display: flex; align-items: center; justify-content: flex-end;
              padding-right: var(--mill-space-4); }
  .mill-rail__head:has(> .mill-rail__title) { justify-content: space-between; }
  .mill-rail__fold { display: flex; align-items: center; justify-content: center;
              width: var(--mill-icon-btn); height: var(--mill-icon-btn); flex: none;
              padding: var(--mill-icon-pad); color: var(--mill-muted); cursor: pointer; }
    /* folded, the control opens rather than closes, so it points the other way */
  .mill-rail--folded .mill-rail__fold svg,
  .mill-rail--phone .mill-rail__fold svg { transform: scaleX(-1); }
  .mill-rail__fold svg { width: var(--mill-icon); height: var(--mill-icon); flex: none;
              fill: none; stroke: currentColor; stroke-width: 1; }

  .mill-rail__group { height: var(--mill-group-label); flex: none;
              display: flex; align-items: flex-end; padding: 0 0 var(--mill-space-4) var(--mill-pad-rail);
              font: var(--mill-weight) var(--mill-text-2xs)/var(--mill-leading-2xs) var(--mill-mono);
              letter-spacing: var(--mill-track-wider); text-transform: uppercase; color: var(--mill-muted); }
  .mill-rail__rule { height: var(--mill-hair); flex: none; margin-left: var(--mill-icon-inset);
              background: var(--mill-hairline); }

  .mill-rail__entry { height: var(--mill-entry); flex: none;
              display: flex; align-items: center; gap: var(--mill-icon-gap);
              padding: 0 0 0 var(--mill-icon-inset);   /* a button entry lost the browser's 1px top and bottom */
              font-size: var(--mill-text-lg); line-height: var(--mill-leading-xs);
              /* a label is a bare text node in all three tools, so no rule can
                 hide it; folded, the entry clips it instead of letting it
                 paint over the page. */
              overflow: hidden; white-space: nowrap;
              color: var(--mill-text); text-decoration: none; }
  .mill-rail__entry svg { width: var(--mill-icon-label); height: var(--mill-icon-label); flex: none; display: block;
              fill: none; stroke: currentColor; stroke-width: var(--mill-icon-label-stroke); }
  /* the active entry: the ground plus a 5px bar on the edge the content is on.
     The bar lies ON the hairline and owns the corner. */
  .mill-rail__entry--on { position: relative; background: var(--mill-active-ground);
              color: var(--mill-heading); font-weight: var(--mill-weight-medium); }
  /* the rail keeps its pad on the right too: a long group label wraps and a
     long entry ends in an ellipsis that far from the hairline, so no chip
     touches it. The folded rail does not change (Richard, 14-nov-2026,
     THRE-068, entry rail-pad-right). */
  .mill-rail__group { padding-right: var(--mill-pad-rail); }
  .mill-rail:not(.mill-rail--folded, .mill-rail--phone:not(.mill-rail--over)) .mill-rail__entry { padding-right: var(--mill-pad-rail); }
  .mill-rail:not(.mill-rail--folded, .mill-rail--phone:not(.mill-rail--over)) .mill-rail__entry > .mill-rail__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

  /* --- a section's own views, listed under it ---------------------------
     Fabriboard, Bale and Spindle all draw this and all three indented it
     themselves. The indent is computed from the rail's own measures, so a
     sub-entry's label begins exactly under its parent's label. (3-nov-2026) */
  .mill-rail__sub { display: flex; flex-direction: column; }
  /* 20 from the panel edge like every other entry (Richard, 6-nov-2026,
     FMIL-119); it was the inset plus the icon gap, 37. */
  .mill-rail__sub .mill-rail__entry { padding-left: var(--mill-pad-rail); }
  /* a sub-entry reads "- Mill": a dash and one space before the word
     (Richard, 9-nov-2026). The label is a bare text node, so the dash is the
     entry's own first item and gives back the icon gap. */
  /* only on a sub-list under its own entry: Threads wraps its whole channel
     list in mill-rail__sub, and its top-level channels read "- # General"
     (Richard, 10-nov-2026, rail-sub-dash-after-entry, THRE-022) */
  .mill-rail__entry + .mill-rail__sub .mill-rail__entry::before { content: "-"; flex: none;
              margin-right: calc(0.3em - var(--mill-icon-gap)); }
  /* in the open rail a sub-entry carries no icon: its dash stands in the icon
     column, so the word starts under its parent's word. Folded and on a phone
     the rail is icons only, so there it keeps its icon (Richard, 10-nov-2026,
     rail-sub-no-icon, FMIL-239) */
  .mill-rail:not(.mill-rail--folded, .mill-rail--phone) .mill-rail__entry + .mill-rail__sub .mill-rail__entry > svg { display: none; }
  .mill-rail:not(.mill-rail--folded, .mill-rail--phone) .mill-rail__entry + .mill-rail__sub .mill-rail__entry::before {
              width: var(--mill-icon-label); text-align: right; margin-right: 0; }

  /* The tools mark the open entry with a bare .on from their own script.
     Accepting it here keeps their handle and takes their drawing away. */
  .mill-rail__entry.on { position: relative; background: var(--mill-active-ground);
              color: var(--mill-heading); font-weight: var(--mill-weight-medium); }
  /* 2px, which is what Fabriboard draws. It was 5 here and 0 on the set's
     own page: three answers to one question (3-nov-2026). */
  .mill-rail__entry.on::after,
  .mill-rail__entry--on::after { content: ""; position: absolute; top: 0; bottom: 0; right: 0;
              width: 5px; background: var(--mill-primary); }

  /* folded: 70 wide, labels gone, every icon on the SAME x as when open,
     so nothing jumps when it folds */
  .mill-rail--folded { width: var(--mill-panel-fold); }
  /* The group block KEEPS its height when folded: only its word goes. If the
     block went too, every icon below it would sit higher than in the open rail
     and the whole column would jump on fold. (Richard, said three times.) */
  .mill-rail--folded .mill-rail__label,
  .mill-rail--folded .mill-rail__group > span { display: none; }
  .mill-rail--folded .mill-rail__rule { margin-left: 16px; margin-right: 16px; }
  .mill-rail--folded .mill-rail__head { justify-content: center; padding-right: 0; }

  /* --- the shell the two make together --------------------------------------- */
  .mill-shell { display: flex; flex-direction: column; min-height: 100%; background: var(--mill-ground); }
  .mill-shell__body { display: flex; flex: 1 1 auto; min-height: 0; }
  .mill-shell__work { flex: 1 1 auto; min-width: 0;
              padding: 22px var(--mill-pad-page) var(--mill-space-48); }

  /* --- phone -------------------------------------------------------------
     The phone rules live on modifiers, and the media query only switches the
     modifiers on. That way one sheet can show both states side by side, and
     the gallery is not a second description of the breakpoint. */
  .mill-bar--phone .mill-bar__tools,
  .mill-bar--phone .mill-bar__pill,
  .mill-bar--phone .mill-bar__who,
  .mill-bar--phone .mill-bar__rec,
  .mill-bar--phone .mill-bar__help { display: none; }
  .mill-bar--phone .mill-bar__here { display: flex; }
  .mill-bar--phone .mill-bar__burger { display: flex; align-items: center; justify-content: center;
              width: var(--mill-icon-btn); height: var(--mill-icon-btn); flex: none;
              padding: var(--mill-icon-pad); color: var(--mill-surface); }
  .mill-bar--phone .mill-bar__burger svg { width: var(--mill-icon); height: var(--mill-icon); flex: none;
              fill: none; stroke: currentColor; stroke-width: 1; }

  /* the rail folds to 70 and stays: a phone still needs the way out */
  .mill-rail--phone { width: var(--mill-panel-fold); }
  .mill-rail--phone .mill-rail__label,
  .mill-rail--phone .mill-rail__group { display: none; }
  /* folded or on a phone there is no label to line up with, so the sub-entry
     gives its indent back and every icon stays on the same x. */
  .mill-rail--folded .mill-rail__sub .mill-rail__entry,
  .mill-rail--phone  .mill-rail__sub .mill-rail__entry { padding-left: var(--mill-icon-inset); }
  .mill-rail--folded .mill-rail__sub .mill-rail__entry::before,
  .mill-rail--phone  .mill-rail__sub .mill-rail__entry::before { content: none; }

  /* folded on a phone a group label keeps its 30 and hides only its word, so
     no entry moves when the rail opens (Richard, 12-nov-2026,
     rail-group-keep-phone, BACK-045) */
  .mill-rail--phone:not(.mill-rail--over) .mill-rail__group { display: flex; }
  .mill-rail--phone:not(.mill-rail--over) .mill-rail__group > span { display: none; }
  /* folded on a phone only the main entries show; a sub-list under its own
     entry appears when the rail opens, dash in the icon column, no icon, the
     word under its parent's word. Threads' channel list (a sub-list not under
     an entry) is not touched (Richard, 12-nov-2026, rail-sub-folded-phone,
     REFE-167) */
  .mill-rail--phone:not(.mill-rail--over) .mill-rail__entry + .mill-rail__sub { display: none; }
  .mill-rail--phone.mill-rail--over .mill-rail__entry + .mill-rail__sub .mill-rail__entry { padding-left: var(--mill-pad-rail); }
  .mill-rail--phone.mill-rail--over .mill-rail__entry + .mill-rail__sub .mill-rail__entry > svg { display: none; }
  .mill-rail--phone.mill-rail--over .mill-rail__entry + .mill-rail__sub .mill-rail__entry::before { content: "-"; flex: none;
              width: var(--mill-icon-label); text-align: right; margin-right: 0; }
  /* under an entry with a fold chevron the dash column is the chevron width,
     so the sub-entry word starts under its parent word, open rail on a desk
     and on a phone (Richard, 15-nov-2026, rail-sub-under-fold-phone, THRE-034) */
  .mill-rail:not(.mill-rail--folded) .mill-rail__entry:has(> .mill-table__toggle) + .mill-rail__sub .mill-rail__entry::before { width: 8px; }
  .mill-rail--phone .mill-rail__rule { margin-left: 16px; margin-right: 16px; }
  .mill-rail--phone .mill-rail__head { justify-content: center; padding-right: 0; }

  /* the nav opened over the page: 240 of the 390, with a scrim behind it */
  /* under the bar: the shared bar publishes its height as --fab-nav-h (66 on a
     phone); the set's own 70 is the fallback where there is no shared bar */
  .mill-rail--over { position: absolute; left: 0; top: var(--fab-nav-h, var(--mill-bar-h)); bottom: 0; z-index: 20;
              width: var(--mill-panel-open); }
  .mill-rail--over .mill-rail__label,
  .mill-rail--over .mill-rail__group { display: flex; }
  .mill-rail--over .mill-rail__rule { margin-left: var(--mill-icon-inset); margin-right: 0; }
  .mill-rail--over .mill-rail__head { justify-content: flex-end; padding-right: var(--mill-space-14); }
  .mill-scrim { position: absolute; left: 0; right: 0; top: var(--fab-nav-h, var(--mill-bar-h)); bottom: 0; z-index: 10;
              background: var(--mill-scrim); }
  /* on a phone the icon rail keeps its expander: pressed, the rail opens over
     the page as the rail-over, the expander points back, and a keeper holds
     the 70 so the page behind does not move (Richard, 10-nov-2026,
     rail-fold-phone, FMIL-240) */
  .mill-rail--phone.mill-rail--over { position: fixed; }
  /* opened, it starts where the folded rail starts: under the shared bar when there is one, else at
     the top, never the set's 70 fallback, so the icons stay where they were (Richard, 15-nov-2026, REFE-195:
     "the open panel drops down at least 40 px. Icons should stay on the same place") */
  .mill-rail--phone.mill-rail--over, .mill-scrim--rail { top: var(--fab-nav-h, 0px); }
  .mill-rail--phone.mill-rail--over .mill-rail__fold svg { transform: none; }
  .mill-scrim--rail { position: fixed; }
  .mill-rail__keep { width: var(--mill-panel-fold); flex: none; }

  .mill-shell--phone .mill-shell__work { padding: 22px var(--mill-space-20) var(--mill-space-28); }

  @media (max-width: 820px) {
    .mill-bar  { }
    .mill-bar  .mill-bar__tools, .mill-bar .mill-bar__pill,
    .mill-bar  .mill-bar__who,
    .mill-bar  .mill-bar__rec, .mill-bar .mill-bar__help { display: none; }
    .mill-bar  .mill-bar__here { display: flex; }
    .mill-bar  .mill-bar__burger { display: flex; align-items: center; justify-content: center;
              width: var(--mill-icon-btn); height: var(--mill-icon-btn); flex: none;
              padding: var(--mill-icon-pad); color: var(--mill-surface); }
    .mill-rail { width: var(--mill-panel-fold); }
    .mill-rail .mill-rail__label, .mill-rail .mill-rail__group { display: none; }
    /* rail-group-keep-phone: folded, the label keeps its height */
    .mill-rail:not(.mill-rail--over) .mill-rail__group { display: flex; }
    .mill-rail:not(.mill-rail--over) .mill-rail__group > span { display: none; }
    .mill-rail .mill-rail__rule { margin-left: 16px; margin-right: 16px; }
    .mill-rail .mill-rail__head { justify-content: center; padding-right: 0; }
    .mill-shell__work { padding: 22px var(--mill-space-20) var(--mill-space-28); }
  }


/* re-opened: these belong to the components layer, not to the
   phone block this file ends with. */

  /* --- state: navigation --------------------------------------------------- */
  /* a full-bleed entry wears its focus INSIDE its box: the double ring lay
     over the hairline and the neighbours and read as a stuck orange frame
     (Richard, 4-nov-2026). */
  .mill-rail__entry:focus-visible, .mill-seg__item:focus-visible,
  .mill-bar__tool:focus-visible, .mill-list__row:focus-visible {
              outline: none; box-shadow: inset 0 0 0 2px var(--mill-primary); }
  .mill-rail__entry:hover    { background: var(--mill-hover); }
  /* the open entry keeps its ground under the pointer: the plain hover tint
     was winning and the mark half-disappeared on mouseover. */
  .mill-rail__entry--on:hover,
  .mill-rail__entry.on:hover { background: var(--mill-hover-accent); }
  .mill-bar__tool:hover      { color: var(--mill-surface); }
  .mill-bar__help:hover, .mill-bar__burger:hover {
              background: rgba(255,255,255,.08); }


/* re-opened: the components layer, not whatever this file ends with. */

  /* --- modifiers, 2-nov-2026 --------------------------------------------- */

  /* the rail says which tool this is and where it lives. Three tools drew it,
     two of them under a mill- name that was never ours. */
  .mill-rail__name { font-family: var(--mill-display); font-size: var(--mill-text-lg);
              line-height: var(--mill-leading-sm); color: var(--mill-heading); }
  .mill-rail__host { font-family: var(--mill-mono); font-size: var(--mill-text-2xs);
              line-height: var(--mill-leading-2xs); color: var(--mill-muted); }
  .mill-rail__title { display: flex; flex-direction: column; gap: 2px;
              padding: var(--mill-space-14) var(--mill-space-16) var(--mill-space-12) var(--mill-pad-rail); }
    /* display, not visibility: hidden still holds its width, which pushed
     the fold control out of the 70px rail and onto the page, where it
     could not be clicked at all (3-nov-2026). */
  .mill-rail--folded .mill-rail__title,
  .mill-rail--phone .mill-rail__title { display: none; }

  /* a foot that stays while the entries scroll */
  .mill-rail__foot { margin-top: auto; flex: none;
              border-top: var(--mill-hair) solid var(--mill-hairline);
              padding: var(--mill-space-8) 0; }
  /* the scrolling middle of a long rail: the head and the foot stay, the
     entries scroll between them (the Ledger's Finance group is 14 pages). */
  .mill-rail__scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto;
              display: flex; flex-direction: column; }
  /* a soft 12px shade where more is hidden, gone at that end; no script
     (Richard, 9-nov-2026, rail-scroll-cue, THRE-052) */
  .mill-rail__scroll { background:
    linear-gradient(var(--mill-surface) 30%, transparent) center top / 100% 32px no-repeat local,
    linear-gradient(transparent, var(--mill-surface) 70%) center bottom / 100% 32px no-repeat local,
    linear-gradient(color-mix(in srgb, var(--mill-heading) 16%, transparent), transparent) center top / 100% 12px no-repeat scroll,
    linear-gradient(transparent, color-mix(in srgb, var(--mill-heading) 16%, transparent)) center bottom / 100% 12px no-repeat scroll,
    var(--mill-surface); }
  .mill-rail__meta { padding: var(--mill-space-6) var(--mill-space-16) var(--mill-space-6) var(--mill-pad-rail);
              font-family: var(--mill-mono); font-size: var(--mill-text-2xs);
              color: var(--mill-muted); }
  /* a meta row with a button keeps one line; a long name ends in an ellipsis (Richard, 10-nov-2026, rail-meta-one-line) */
  .mill-rail__meta.mill-row { flex-wrap: nowrap; }
  .mill-rail__meta.mill-row > :first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* the third bar: a sticky row of actions between the suite bar and the work */
  .mill-toolbar { position: sticky; top: var(--mill-bar-h); z-index: 4;
              display: flex; align-items: center; gap: var(--mill-space-10);
              height: var(--mill-toolbar-h); padding: 0 var(--mill-space-20);
              background: var(--mill-surface);
              border-bottom: var(--mill-hair) solid var(--mill-hairline); }
  /* in the work area, which scrolls and pads its top, a sticky toolbar sticks
     flush to the top edge: nothing scrolls by above it (toolbar-sticks-flush,
     Richard 15-nov-2026, REFE-224). Flow and bulk bars do not stick. */
  .mill-shell__main:not(.mill-shell__main--nested) .mill-toolbar:not(.mill-toolbar--flow, .mill-toolbar--bulk) { top: calc(-1 * var(--mill-space-20)); }
  /* a toolbar standing in the flow rather than stuck under the bar: it keeps
     the row's look, gives up the sticky and the fixed height, and wraps. */
  /* flex: none - a toolbar in a flex column must not be shrunk to its
     children's overflow, which is what Bale's Clients screen did. */
  .mill-toolbar--flow { position: static; height: auto; flex: none;
              min-height: var(--mill-toolbar-h);
              flex-wrap: wrap; row-gap: var(--mill-space-8);
              padding-top: var(--mill-space-8); padding-bottom: var(--mill-space-8); }
  /* a toolbar inside a panel body lines up with the fields above it: the
     panel already pads its sides (toolbar-in-panel, Richard 8-nov-2026). */
  .mill-panel__body .mill-toolbar { padding-left: 0; padding-right: 0; }
  /* a flow toolbar standing in the page (a search, a select, Filter) has no box on a desk
     either: page ground, no hairline, its edge on the page edge; inside a panel or a white
     surface it keeps that ground (Richard, 15-nov-2026, toolbar-flat-desk, BACK-090: "should not
     be within a container and not on white background", as toolbar-flat-phone) */
  .mill-toolbar--flow:not(.mill-toolbar--bulk):not(.mill-panel__body .mill-toolbar--flow):not(.mill-surface .mill-toolbar--flow) {
              background: var(--mill-ground); border-bottom: 0; padding-left: 0; padding-right: 0; }
  /* a toolbar carrying a quiet tab strip grows with it when the tabs wrap (9-nov-2026) */
  .mill-toolbar:has(> .mill-seg--quiet) { height: auto; min-height: var(--mill-toolbar-h);
              padding-top: var(--mill-space-8); padding-bottom: var(--mill-space-8); }
  /* tabs alone need no box (Richard, 9-nov-2026): the bar takes the page's ground and the
     tabs line up with the page edge; it still sticks, so the ground covers what scrolls under */
  /* the phone dropdown mill.js puts beside the tabs (seg-select-phone-b) does not count, so the
     strip keeps no box on a desk (REFE-175, REFE-177, 15-nov-2026), nor on a phone where the
     tabs fold into it (Richard, 15-nov-2026, REFE-175: "Not on white background and remove parent container") */
  .mill-toolbar:has(> .mill-seg--quiet:only-child),
  .mill-toolbar:has(> .mill-seg--quiet:first-child + .mill-seg__select:last-child) { background: var(--mill-ground);
              padding-left: 0; padding-right: 0; }
  /* a toolbar of only a search (a field and its buttons) needs no box either (Richard, 10-nov-2026,
     search-inline, BACK-040): page ground, no hairline, its edge on the page edge. Only a search: a toolbar that also carries a spacer or a row (Bale Clients: + Deal, search, totals) keeps its box and wraps (OPPO-041) */
  .mill-toolbar--flow:has(> .mill-field):not(:has(> .mill-select, > .mill-switch, > .mill-seg, > .mill-row, > .mill-toolbar__spacer)) {
              background: var(--mill-ground); border-bottom: 0; padding-left: 0; padding-right: 0; }
  /* a flow toolbar in the page has no box on a desk either: page ground, no hairline, its
     controls on the page edge, as on a phone (Richard, 15-nov-2026, toolbar-flat-desk, BACK-090:
     "these input fields should not be within a container and not on white background") */
  .mill-toolbar--flow:not(.mill-toolbar--bulk):not(.mill-panel__body .mill-toolbar--flow):not(.mill-surface .mill-toolbar--flow) {
              background: var(--mill-ground); border-bottom: 0; padding-left: 0; padding-right: 0; }
  .mill-toolbar__spacer { flex: 1 1 auto; }
  /* the bulk bar (C67, 6-nov-2026): while rows are ticked the toolbar says how
     many and offers what can be done to all of them, the primary one filled */
  .mill-toolbar--bulk { position: static; background: var(--mill-active-ground); }
  .mill-toolbar__count { color: var(--mill-heading); font-weight: var(--mill-weight-medium); }

  /* the foot bar carries a state and a message field, not only buttons */
  .mill-footbar__state { display: inline-flex; align-items: center;
              gap: var(--mill-space-8); color: var(--mill-secondary);
              font-size: var(--mill-text-sm); }
  .mill-footbar .mill-field { max-width: 420px; }
  /* a field standing in a toolbar is a search box, not the width of the row:
     the field is width:100%, which in a flex row is never what is wanted. */
  .mill-toolbar .mill-field, .mill-toolbar .mill-select { flex: none; width: 240px; }

  /* the stage bar as a belt: every step is a link and carries its count */
  .mill-stages--belt .mill-stages__step { cursor: pointer; }
  .mill-stages__count { margin-left: var(--mill-space-8);
              font-family: var(--mill-mono); font-size: var(--mill-text-xs);
              color: var(--mill-muted); }
  .mill-stages--belt .mill-stages__step--on .mill-stages__count { color: var(--mill-heading); }


/* Breadcrumb and button bar (Richard, 4-nov-2026, first drawn for Cupro).
   The breadcrumb says where you are; the bar is the tool's few top places, always
   in reach of the thumb. A phone tool with a button bar does not also carry the rail. */

  .mill-crumbs { display: flex; align-items: center; gap: var(--mill-space-6); flex: none;
                 height: var(--mill-crumbs-h); padding: 0 var(--mill-space-16);
                 overflow: hidden; white-space: nowrap;
                 font-size: var(--mill-text-sm); line-height: var(--mill-leading-xs);
                 background: var(--mill-surface);
                 border-bottom: var(--mill-hair) solid var(--mill-hairline); }
  .mill-crumbs__link { color: var(--mill-secondary); text-decoration: none; }
  .mill-crumbs__sep  { color: var(--mill-muted); }
  .mill-crumbs__here { color: var(--mill-heading); font-weight: var(--mill-weight-medium); }

  .mill-tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; flex: none;
                 height: var(--mill-tabbar-h); background: var(--mill-surface);
                 border-top: var(--mill-hair) solid var(--mill-hairline); }
  .mill-tabbar__item { display: flex; flex-direction: column; align-items: center;
                 justify-content: center; gap: var(--mill-space-2); min-width: 0;
                 font-size: var(--mill-text-xs); line-height: var(--mill-leading-xs);
                 color: var(--mill-secondary); text-decoration: none; }
  .mill-tabbar__item svg { width: var(--mill-icon-label); height: var(--mill-icon-label); flex: none;
              stroke-width: var(--mill-icon-label-stroke); }
  .mill-tabbar__item--on { color: var(--mill-heading); font-weight: var(--mill-weight-medium);
                 background: var(--mill-active-ground);
                 box-shadow: inset 0 var(--mill-accent) 0 var(--mill-primary); }


/* The phone rule folds every rail to 70 and hides its words; an opened menu must win
   over that, or the burger opens a column of icons (found 4-nov-2026 drawing Cupro). */

  .mill-rail.mill-rail--over { width: var(--mill-panel-open); }
  .mill-rail.mill-rail--over .mill-rail__label,
  .mill-rail.mill-rail--over .mill-rail__group { display: flex; }
  .mill-rail.mill-rail--over .mill-rail__rule { margin-left: var(--mill-icon-inset); margin-right: 0; }
  /* on a phone the open rail keeps its own head: the dots 14 from the right edge, the name beside
     them, not the folded rail's centring (Richard, 10-nov-2026, rail-over-head-phone, THRE-034) */
  @media (max-width: 820px) { .mill-rail.mill-rail--over .mill-rail__head { justify-content: flex-end; padding-right: var(--mill-space-14); } }


/* --- the bar as every tool wears it (FMIL-020, 6-nov-2026) ------------------
   nav.js draws the bar above every internal tool, live and dev, with these
   parts; until today it painted itself with inline styles. --pinned is that
   bar: fixed to the top of a page the set does not own. Every rule below is
   anchored on the bar or one of its panels, and the block is written outside
   any layer: an unlayered page rule (a bare button{}, a{} or svg{}) beats every
   layered rule whatever its specificity, so inside mill.components a tool's
   own reset would restyle the bar. Unlayered, two classes outrank a page's
   element and element:hover rules the way the old inline styles did. (The
   published mill.css unwraps every layer anyway; this keeps the source true
   for anyone who loads the sheets as written.)

   Where these numbers differ from the drawn part above, the bar keeps what it
   shipped (the pill at 5px and 4px below the row, 1.4 icon strokes, the round
   18px ?, the 24px phone controls). Reconciling the two is a design call.
   Colours with no token of their own are declared once, here, as the bar's
   own variables. */
  .mill-bar--pinned, .mill-bar__sheet, .mill-bar__shelf, .mill-bar__menu,
  .mill-bar__scrim, .mill-bar__finder {
              --mill-bar-on:        var(--mill-surface);        /* white words on the navy */
              --mill-bar-tint:      rgba(255, 255, 255, .08);   /* a control under the pointer */
              --mill-bar-rule:      rgba(255, 255, 255, .14);   /* the line over the sheet's foot */
              --mill-bar-help-edge: #3A3A52;
              --mill-bar-help-hot:  #4D9DE0;
              --mill-bar-rec:       #E94560;                    /* the dot while it tapes */
              --mill-bar-x-hot:     #FC346A;
              /* the favourites' bullets: the twelve category colours (Richard,
                 6-nov-2026, FMIL-015). nav.js gives every bullet its colour from
                 a shuffled run of all twelve; these seven are the fallback by
                 position and follow the first run's order. */
              --mill-bar-fav-1: var(--mill-cat-9);  --mill-bar-fav-2: var(--mill-cat-6);
              --mill-bar-fav-3: var(--mill-cat-1);  --mill-bar-fav-4: var(--mill-cat-3);
              --mill-bar-fav-5: var(--mill-cat-12); --mill-bar-fav-6: var(--mill-cat-8);
              --mill-bar-fav-7: var(--mill-cat-10);
              /* the stack every overlay of the bar sits in, above any page */
              --mill-bar-z: 2147483000; }

  /* the bar itself: 70 tall, 66 on a phone (the phone block below); nav.js
     measures it and moves the page whenever it changes */
  .mill-bar.mill-bar--pinned { position: fixed; top: 0; left: 0; right: 0; width: auto;
              height: var(--mill-bar-h); z-index: var(--mill-bar-z); box-sizing: border-box;
              font: var(--mill-weight-medium) 13px/16px var(--mill-sans); white-space: nowrap; }
  /* the bar's text keeps the bar's face and leading under a page's own span{}
     or div{} rule; a part that sets its own still wins on specificity */
  :is(.mill-bar--pinned, .mill-bar__sheet, .mill-bar__shelf, .mill-bar__menu) :is(span, div) {
              font-family: inherit; line-height: inherit; }
  .mill-bar--pinned .mill-bar__sign { z-index: 2; text-decoration: none; }
  .mill-bar--pinned .mill-bar__row { font: inherit; box-sizing: border-box; }

  /* the tools scroll sideways when they do not fit; the scrollbar would be
     laid out inside the row, so it is hidden and the scrolling kept */
  .mill-bar--pinned .mill-bar__tools { height: 100%; overflow: auto; white-space: nowrap;
              scrollbar-width: none; -ms-overflow-style: none; }
  .mill-bar--pinned .mill-bar__tools::-webkit-scrollbar { display: none; }
  .mill-bar--pinned .mill-bar__tool { display: inline-flex; align-items: center; gap: var(--mill-space-8);
              height: 100%; padding: 0 var(--mill-space-12); flex: none; text-decoration: none;
              color: var(--mill-nav-muted); font-weight: var(--mill-weight-medium); }
  .mill-bar--pinned .mill-bar__tool:hover,
  .mill-bar--pinned .mill-bar__tool--on { color: var(--mill-bar-on); }
  .mill-bar--pinned .mill-bar__tool--on { font-weight: var(--mill-weight-strong); }
  .mill-bar--pinned .mill-bar__tool svg,
  .mill-bar__sheet .mill-bar__sheet-tool svg,
  .mill-bar--pinned .mill-bar__here-mark svg { width: var(--mill-icon-label); height: var(--mill-icon-label);
              flex: none; display: block; fill: none; stroke: currentColor; stroke-width: calc(1.4 * var(--mill-icon-label-stroke)); }
  .mill-bar--pinned .mill-bar__spacer { flex: 1 1 0; min-width: 0; }

  .mill-bar--pinned .mill-bar__pill { top: calc(var(--mill-bar-h) - 4px); height: 8px;
              border-radius: 5px; background: var(--mill-primary); pointer-events: none; }

  /* phone only: the tool you are in, and the way to the others */
  .mill-bar--pinned .mill-bar__here { display: none; align-items: center; gap: var(--mill-space-8);
              flex: 1 1 auto; min-width: 0; overflow: hidden; padding-left: var(--mill-space-14);
              font: inherit; font-weight: var(--mill-weight-strong); line-height: inherit;
              color: var(--mill-bar-on); }
  .mill-bar--pinned .mill-bar__here-mark { display: flex; flex: none; }
  .mill-bar--pinned .mill-bar__here-name { overflow: hidden; text-overflow: ellipsis; }
  .mill-bar--pinned .mill-bar__burger,
  .mill-bar--pinned .mill-bar__star { display: none; align-items: center; justify-content: center;
              width: var(--mill-icon); height: 44px; padding: 0; flex: none;
              color: var(--mill-bar-on); text-decoration: none; background: none;
              border: 0; margin: 0; cursor: pointer; font: inherit;
              -webkit-appearance: none; appearance: none; }
  .mill-bar--pinned .mill-bar__burger:hover { background: none; }
  .mill-bar--pinned .mill-bar__star { display: inline-flex; color: var(--mill-nav-muted); }
  .mill-bar--pinned .mill-bar__star[aria-expanded="true"] { color: var(--mill-bar-on); }
  .mill-bar--pinned .mill-bar__star svg,
  .mill-bar--pinned .mill-bar__burger svg { width: 20px; height: 20px; flex: none; display: block; }
  .mill-bar--pinned .mill-bar__star svg { fill: none; }
  .mill-bar--pinned .mill-bar__star[aria-expanded="true"] svg { fill: currentColor; }

  /* the controls: pinned at the right of the row, in the sheet's foot on a phone */
  :is(.mill-bar--pinned, .mill-bar__sheet) .mill-bar__controls {
              display: flex; align-items: center; gap: var(--mill-space-12);
              flex: none; padding-left: var(--mill-space-12); }
  .mill-bar__sheet .mill-bar__controls { flex: 0 1 auto; flex-wrap: wrap;
              gap: var(--mill-space-16); padding-left: 0; }
  :is(.mill-bar--pinned, .mill-bar__sheet) [hidden][hidden] { display: none; }

  /* a word in the bar, as a link or as a button (the Bobbin's launcher is a
     button): the bar sits outside .mill, so the set's button reset never
     reached it and the browser drew its 2px edge and 1px padding. */
  :is(.mill-bar--pinned, .mill-bar__sheet) .mill-bar__textbtn { flex: none; white-space: nowrap;
              margin: 0; padding: 0; border: 0; background: none; font: inherit; cursor: pointer;
              color: var(--mill-nav-muted); text-decoration: none; }

  :is(.mill-bar--pinned, .mill-bar__sheet) .mill-bar__rec { display: inline-flex; align-items: center;
              gap: var(--mill-space-6); flex: none; text-decoration: none; color: var(--mill-nav-faint); }
  :is(.mill-bar--pinned, .mill-bar__sheet) .mill-bar__rec--idle { opacity: var(--mill-disabled); }
  :is(.mill-bar--pinned, .mill-bar__sheet) .mill-bar__rec--on { color: var(--mill-bar-on); }
  .mill-bar__rec-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block;
              background: currentColor; }
  .mill-bar__rec--live .mill-bar__rec-dot { background: var(--mill-bar-rec);
              box-shadow: 0 0 0 1.5px var(--mill-bar-on); animation: millBarRecPulse 1.2s infinite; }
  @keyframes millBarRecPulse { 50% { opacity: .2; } }

  :is(.mill-bar--pinned, .mill-bar__sheet) .mill-bar__help { display: inline-flex; flex: none;
              align-items: center; justify-content: center; width: 18px; height: 18px; padding: 0;
              border: var(--mill-hair) solid var(--mill-bar-help-edge); border-radius: 50%;
              background: none; color: var(--mill-nav-faint); text-decoration: none;
              font-size: inherit; font-weight: var(--mill-weight-medium); }
  :is(.mill-bar--pinned, .mill-bar__sheet) .mill-bar__help:hover {
              color: var(--mill-bar-help-hot); border-color: var(--mill-bar-help-hot); background: none; }

  /* the person: a lens, a first name and the way to their menu */
  :is(.mill-bar--pinned, .mill-bar__sheet) .mill-bar__who { display: inline-flex; align-items: center;
              gap: var(--mill-space-8); flex: none; height: 30px; padding: 0 6px 0 8px; margin: 0;
              border: 0; border-radius: var(--mill-radius); background: transparent;
              cursor: pointer; font: inherit; color: var(--mill-bar-on); }
  :is(.mill-bar--pinned, .mill-bar__sheet) .mill-bar__who:hover,
  :is(.mill-bar--pinned, .mill-bar__sheet) .mill-bar__who[aria-expanded="true"] { background: var(--mill-bar-tint); }
  :is(.mill-bar--pinned, .mill-bar__sheet) .mill-bar__who[hidden] { display: none; }
  :is(.mill-bar--pinned, .mill-bar__sheet) .mill-bar__who .mill-bar__lens { width: 10px; height: 10px; flex: none;
              border-radius: var(--mill-radius); background: var(--mill-ok); }
  .mill-bar__who .mill-bar__chev { display: flex; color: var(--mill-nav-muted); }
  .mill-bar__who .mill-bar__chev svg { width: 16px; height: 16px; flex: none; }

  /* the sheet: the same tools, stacked, for a phone */
  .mill-bar__sheet { position: fixed; left: 0; right: 0; z-index: calc(var(--mill-bar-z) - 1);
              display: none; flex-direction: column; padding: var(--mill-space-8) 0 var(--mill-space-12);
              overflow-y: auto; background: var(--mill-nav); }
  .mill-bar__sheet.mill-bar__sheet--open { display: flex; }
  .mill-bar__sheet .mill-bar__sheet-tool { display: flex; align-items: center; gap: var(--mill-space-12);
              height: 48px; padding: 0 24px; text-decoration: none;
              color: var(--mill-nav-muted); font-weight: var(--mill-weight-medium); }
  .mill-bar__sheet .mill-bar__sheet-tool--on { color: var(--mill-bar-on); font-weight: var(--mill-weight-strong);
              box-shadow: inset 3px 0 0 var(--mill-primary); }
  .mill-bar__sheet .mill-bar__sheet-foot { display: flex; align-items: center; flex-wrap: wrap;
              gap: var(--mill-space-16); padding: var(--mill-space-14) 24px var(--mill-space-2);
              margin-top: var(--mill-space-8); border-top: var(--mill-hair) solid var(--mill-bar-rule); }

  /* the favourites shelf, under the bar */
  .mill-bar__shelf { position: fixed; left: 0; right: 0; z-index: calc(var(--mill-bar-z) - 2);
              box-sizing: border-box; display: none; align-items: center; flex-wrap: wrap;
              gap: 0 22px; padding: 11px var(--mill-space-20) 11px 24px;
              background: var(--mill-surface); border-bottom: var(--mill-hair) solid var(--mill-hairline);
              font: var(--mill-weight-medium) 13px/16px var(--mill-sans); color: var(--mill-heading); }
  .mill-bar__shelf.mill-bar__shelf--open { display: flex; }
  .mill-bar__shelf .mill-bar__fav { display: inline-flex; align-items: center; gap: var(--mill-space-8);
              padding: 5px 0; text-decoration: none; color: var(--mill-heading); }
  .mill-bar__shelf .mill-bar__fav:hover { color: var(--mill-primary); }
  .mill-bar__shelf .mill-bar__fav-dot { width: 10px; height: 10px; flex: none;
              border-radius: var(--mill-radius); background: var(--mill-bar-fav-1); }
  .mill-bar__fav:nth-of-type(7n+2) .mill-bar__fav-dot { background: var(--mill-bar-fav-2); }
  .mill-bar__fav:nth-of-type(7n+3) .mill-bar__fav-dot { background: var(--mill-bar-fav-3); }
  .mill-bar__fav:nth-of-type(7n+4) .mill-bar__fav-dot { background: var(--mill-bar-fav-4); }
  .mill-bar__fav:nth-of-type(7n+5) .mill-bar__fav-dot { background: var(--mill-bar-fav-5); }
  .mill-bar__fav:nth-of-type(7n+6) .mill-bar__fav-dot { background: var(--mill-bar-fav-6); }
  .mill-bar__fav:nth-of-type(7n+7) .mill-bar__fav-dot { background: var(--mill-bar-fav-7); }
  .mill-bar__shelf .mill-bar__fav-label { flex: none;
              font: var(--mill-weight-medium) var(--mill-text-2xs)/var(--mill-leading-2xs) var(--mill-mono);
              letter-spacing: var(--mill-track-wider); color: var(--mill-muted); }
  .mill-bar__shelf .mill-bar__fav-act { margin: 0 0 0 auto; padding: 5px 0; border: 0; background: none;
              cursor: pointer; font-family: inherit; font-size: 13px; color: var(--mill-muted); }
  .mill-bar__shelf .mill-bar__fav-act--keep { margin-left: 0; }
  .mill-bar__shelf .mill-bar__fav-act:hover { color: var(--mill-heading); }
  .mill-bar__shelf .mill-bar__fav-act[aria-pressed="true"] { color: var(--mill-heading);
              font-weight: var(--mill-weight-strong); }
  .mill-bar__shelf .mill-bar__fav-right { margin-left: auto; display: flex; align-items: center;
              gap: var(--mill-space-16); }
  .mill-bar__shelf .mill-bar__fav-right .mill-bar__fav-act { margin-left: 0; }
  .mill-bar__shelf .mill-bar__fav-x { padding: 0 0 0 2px; border: 0; background: none; cursor: pointer;
              color: var(--mill-muted); font-family: inherit;
              font-size: 14px; font-weight: var(--mill-weight-strong); line-height: 1; }
  .mill-bar__shelf .mill-bar__fav-x:hover { color: var(--mill-bar-x-hot); }
  .mill-bar__shelf .mill-bar__fav-empty { color: var(--mill-muted); }

  /* the person's menu */
  .mill-bar__menu { position: fixed; right: var(--mill-space-16); z-index: calc(var(--mill-bar-z) + 1);
              display: none; box-sizing: border-box; min-width: 180px; margin-top: var(--mill-space-6);
              padding: var(--mill-space-4); background: var(--mill-surface);
              border: var(--mill-hair) solid var(--mill-hairline); border-radius: var(--mill-radius);
              box-shadow: var(--mill-shadow);
              font: var(--mill-weight-medium) 13px/16px var(--mill-sans); }
  .mill-bar__menu.mill-bar__menu--open { display: block; }
  .mill-bar__menu .mill-bar__menu-item { display: flex; align-items: center; height: var(--mill-control-h);
              padding: 0 var(--mill-space-10); border-radius: var(--mill-radius);
              color: var(--mill-nav); text-decoration: none; }
  .mill-bar__menu .mill-bar__menu-item:hover { background: var(--mill-hover); }

  /* the bar's one phone block: --mill-phone, 820 */
  @media (max-width: 820px) {
    .mill-bar.mill-bar--pinned { --mill-bar-h: calc(var(--mill-strip-h) + 56px); }
    .mill-bar--pinned .mill-bar__tools,
    .mill-bar--pinned .mill-bar__pill { display: none; }
    .mill-bar--pinned .mill-bar__here,
    .mill-bar--pinned .mill-bar__burger { display: inline-flex; }
    .mill-bar--pinned .mill-bar__here-mark { display: none; }
    .mill-bar--pinned .mill-bar__here-name { font-size: var(--mill-text-xl); line-height: var(--mill-leading-xl);
              font-weight: 700; letter-spacing: -.01em; }
    .mill-bar__sheet .mill-bar__rec { display: none; }
    /* every control in the foot takes a 44px touch */
    :is(.mill-bar--pinned, .mill-bar__sheet) .mill-bar__controls > * { position: relative; }
    :is(.mill-bar--pinned, .mill-bar__sheet) .mill-bar__controls > *::after { content: ""; position: absolute;
              top: 50%; left: 50%; width: calc(100% + 14px); min-width: 44px; height: 44px;
              transform: translate(-50%, -50%); }
    /* a phone has no room for a row: the shelf stacks */
    .mill-bar__shelf.mill-bar__shelf--open { flex-direction: column; align-items: stretch; gap: 0;
              padding: var(--mill-space-8) 0 var(--mill-space-10); }
    .mill-bar__shelf .mill-bar__fav { height: 44px; padding: 0 24px; }
    .mill-bar__shelf .mill-bar__fav-label { padding: var(--mill-space-10) 24px var(--mill-space-6); }
    .mill-bar__shelf .mill-bar__fav-act { margin: 0; padding: var(--mill-space-10) 24px 0; text-align: left;
              border-top: var(--mill-hair) solid var(--mill-hairline-soft); }
    .mill-bar__shelf .mill-bar__fav-right { margin: 0; padding: var(--mill-space-4) 24px 0; gap: 18px;
              border-top: var(--mill-hair) solid var(--mill-hairline-soft); }
    .mill-bar__shelf .mill-bar__fav-right .mill-bar__fav-act { border-top: 0; padding: var(--mill-space-8) 0; }
    .mill-bar__shelf .mill-bar__fav-empty { padding: var(--mill-space-8) 24px; }
  }
  /* paper never carries the bar */
  @media print { .mill-bar--pinned, .mill-bar__sheet, .mill-bar__shelf { display: none; } }

  /* --- the bar's overlays: the recorder, the ? panel and the artifacts finder.
     Mill surfaces now: one radius, the set's hairline and ink. */
  .mill-bar__scrim { position: fixed; inset: 0; z-index: calc(var(--mill-bar-z) + 2);
              display: flex; align-items: flex-start; justify-content: center;
              padding: 70px var(--mill-space-16) var(--mill-space-16); background: var(--mill-scrim);
              font: var(--mill-weight) var(--mill-text-lg)/1.5 var(--mill-sans); }
  .mill-bar__scrim--help { z-index: calc(var(--mill-bar-z) + 1); padding-top: 60px; }
  .mill-bar__scrim[hidden] { display: none; }
  .mill-bar__scrim .mill-bar__dialog [hidden] { display: none; }
  .mill-bar__dialog { box-sizing: border-box; width: 100%; max-width: 440px; padding: var(--mill-space-20);
              background: var(--mill-surface); border: var(--mill-hair) solid var(--mill-hairline);
              border-radius: var(--mill-radius); color: var(--mill-heading); }
  .mill-bar__dialog--help { max-width: 560px; max-height: 80vh; overflow-y: auto; line-height: 1.6; }
  .mill-bar__scrim .mill-bar__dialog p { margin: 0 0 var(--mill-space-8); }
  .mill-bar__scrim .mill-bar__dialog code { padding: 0 var(--mill-space-4); background: var(--mill-surface);
              border: var(--mill-hair) solid var(--mill-hairline); border-radius: var(--mill-radius);
              color: var(--mill-heading); font-size: var(--mill-text-sm); }
  .mill-bar__scrim .mill-bar__dialog-head { display: flex; justify-content: space-between; align-items: center;
              margin-bottom: var(--mill-space-10); }
  .mill-bar__scrim .mill-bar__dialog-title { margin-bottom: var(--mill-space-2); font-size: var(--mill-text-xl);
              font-weight: var(--mill-weight-medium); line-height: 1.3; color: var(--mill-heading); }
  .mill-bar__scrim .mill-bar__dialog-close { padding: 0 var(--mill-space-4); color: var(--mill-secondary);
              text-decoration: none; font-size: var(--mill-text-xl); }
  .mill-bar__scrim .mill-bar__dim { color: var(--mill-secondary); }
  .mill-bar__scrim .mill-bar__small { font-size: var(--mill-text-sm); }
  .mill-bar__scrim .mill-bar__gap { margin-bottom: var(--mill-space-14); }
  .mill-bar__scrim .mill-bar__gap-s { margin-bottom: var(--mill-space-12); }
  .mill-bar__scrim .mill-bar__label { display: block; margin: 0 0 var(--mill-space-4); color: var(--mill-secondary);
              font-size: var(--mill-text-sm); }
  .mill-bar__scrim .mill-bar__label--next { margin-top: var(--mill-space-10); }
  .mill-bar__scrim .mill-bar__check { display: flex; align-items: center; gap: var(--mill-space-8);
              margin-top: var(--mill-space-12); color: var(--mill-heading); cursor: pointer; }
  .mill-bar__scrim .mill-bar__check input { width: 16px; height: 16px; margin: 0; accent-color: var(--mill-nav); }
  .mill-bar__scrim .mill-bar__field { box-sizing: border-box; width: 100%; padding: var(--mill-space-8) var(--mill-space-10);
              background: var(--mill-surface); border: var(--mill-hair) solid var(--mill-hairline);
              border-radius: var(--mill-radius); color: var(--mill-heading);
              font: var(--mill-weight) var(--mill-text-lg)/1.5 var(--mill-sans); }
  .mill-bar__scrim .mill-bar__field--area { display: block; resize: vertical; }
  .mill-bar__scrim .mill-bar__field:focus { outline: 2px solid var(--mill-primary); outline-offset: -1px; border-color: transparent; }
  .mill-bar__scrim .mill-bar__kinds { display: flex; gap: var(--mill-space-8); margin-bottom: var(--mill-space-14); }
  .mill-bar__scrim .mill-bar__kind { flex: 1; padding: 7px 0; text-align: center; text-decoration: none;
              border: var(--mill-hair) solid var(--mill-hairline); border-radius: var(--mill-radius);
              background: var(--mill-surface); color: var(--mill-secondary); }
  .mill-bar__scrim .mill-bar__kind--on { color: var(--mill-heading); font-weight: var(--mill-weight-medium);
              background: var(--mill-active-ground); }
  .mill-bar__scrim .mill-bar__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center;
              gap: var(--mill-space-8); margin-top: var(--mill-space-10); }
  .mill-bar__scrim .mill-bar__actions--start { gap: var(--mill-space-12); margin-top: 18px; }
  .mill-bar__scrim .mill-bar__btn { display: inline-block; padding: 7px 14px; white-space: nowrap; text-decoration: none;
              background: var(--mill-surface); border: var(--mill-hair) solid var(--mill-hairline);
              border-radius: var(--mill-radius); color: var(--mill-heading); }
  .mill-bar__scrim .mill-bar__btn--go { background: var(--mill-nav); border-color: var(--mill-nav); color: var(--mill-surface); }
  .mill-bar__scrim .mill-bar__btn--quiet { padding: 7px var(--mill-space-4); background: none; border-color: transparent;
              color: var(--mill-secondary); }
  .mill-bar__scrim .mill-bar__btn--busy { opacity: var(--mill-disabled); }
  .mill-bar__scrim .mill-bar__recstate { display: inline-block; position: relative; top: -1px; width: 8px; height: 8px;
              margin-right: var(--mill-space-8); vertical-align: middle; border-radius: 50%;
              background: var(--mill-bar-rec); animation: millBarRecPulse 1.2s infinite; }
  .mill-bar__scrim .mill-bar__recstate--paused { background: var(--mill-warn-ink); animation: none; }
  .mill-bar__scrim .mill-bar__note { min-height: 18px; margin-top: var(--mill-space-6); font-size: var(--mill-text-sm);
              color: var(--mill-secondary); }
  .mill-bar__scrim .mill-bar__note--bad { color: var(--mill-bad); }
  .mill-bar__scrim .mill-bar__what { margin: var(--mill-space-2) 0 var(--mill-space-6); }

  .mill-bar__scrim .mill-bar__fold { margin: var(--mill-space-8) 0; border: var(--mill-hair) solid var(--mill-hairline);
              border-radius: var(--mill-radius); background: var(--mill-ground); }
  .mill-bar__scrim .mill-bar__fold summary { padding: var(--mill-space-8) var(--mill-space-12); cursor: pointer;
              font-weight: var(--mill-weight-medium); color: var(--mill-heading); }
  .mill-bar__scrim .mill-bar__fold-body { padding: 0 var(--mill-space-12) var(--mill-space-4); color: var(--mill-secondary); }

  /* the artifacts finder, hanging from the bar's right */
  .mill-bar__finder { position: fixed; right: var(--mill-space-8); z-index: calc(var(--mill-bar-z) + 1);
              display: flex; flex-direction: column; width: min(440px, calc(100vw - 16px)); max-height: 70vh;
              background: var(--mill-surface); border: var(--mill-hair) solid var(--mill-hairline);
              border-radius: var(--mill-radius); box-shadow: var(--mill-shadow);
              font: var(--mill-weight) var(--mill-text-lg)/1.4 var(--mill-sans); color: var(--mill-heading); }
  .mill-bar__finder[hidden] { display: none; }
  .mill-bar__finder .mill-bar__finder-search { display: flex; gap: var(--mill-space-8); align-items: center; padding: var(--mill-space-8);
              border-bottom: var(--mill-hair) solid var(--mill-hairline); }
  .mill-bar__finder .mill-bar__finder-q { flex: 1; min-width: 0; padding: var(--mill-space-6) var(--mill-space-8); font-size: 16px;
              border: var(--mill-hair) solid var(--mill-hairline); border-radius: var(--mill-radius); }
  .mill-bar__finder .mill-bar__finder-count { white-space: nowrap; font-size: var(--mill-text-sm); color: var(--mill-secondary); }
  .mill-bar__finder .mill-bar__finder-list { overflow-y: auto; padding: var(--mill-space-4); }
  .mill-bar__finder .mill-bar__finder-foot { padding: var(--mill-space-8) var(--mill-space-10); text-decoration: none;
              border-top: var(--mill-hair) solid var(--mill-hairline);
              font-size: var(--mill-text-sm); color: var(--mill-secondary); }
  .mill-bar__finder .mill-bar__finder-group { padding: var(--mill-space-8) var(--mill-space-10) var(--mill-space-2);
              font-size: var(--mill-text-sm); letter-spacing: var(--mill-track-wide); color: var(--mill-secondary); }
  .mill-bar__finder .mill-bar__finder-row { display: block; padding: var(--mill-space-6) var(--mill-space-10);
              border-radius: var(--mill-radius); text-decoration: none; color: var(--mill-heading); }
  .mill-bar__finder .mill-bar__finder-row:hover { background: var(--mill-hover); }
  .mill-bar__finder .mill-bar__finder-row--here { font-weight: var(--mill-weight-medium); background: var(--mill-active-ground); }
  .mill-bar__finder .mill-bar__finder-row--old { opacity: .6; }
  .mill-bar__finder .mill-bar__finder-meta { overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
              font-size: var(--mill-text-sm); color: var(--mill-secondary); }

/* the keyboard, on every control the bar owns: the set's ring, and on the
   full-bleed rows the set's inset ring, as on the rail */
:is(.mill-bar--pinned, .mill-bar__sheet, .mill-bar__shelf, .mill-bar__menu, .mill-bar__scrim, .mill-bar__finder)
  :is(a, button, summary, [tabindex]):focus-visible { outline: none; box-shadow: var(--mill-ring); }
:is(.mill-bar--pinned, .mill-bar__sheet, .mill-bar__shelf, .mill-bar__menu, .mill-bar__scrim, .mill-bar__finder)
  :is(.mill-bar__tool, .mill-bar__sheet-tool, .mill-bar__menu-item, .mill-bar__finder-row):focus-visible {
              box-shadow: inset 0 0 0 2px var(--mill-primary); }

/* ===== 35-bobbin.css =================================================== */
/* Mill · BOBBIN — the card block that floats over every tool (COMP-108,
   6-nov-2026). fabricaide-bobbin.js used to carry 51 rules of its own and add
   them to every page; it now draws with the set's panel, chips, fields,
   buttons, stacked rows, thumbs and drop zone, and this sheet holds only what
   none of those says: where the block floats, the grip, the filter band. */


  .mill-bob { position: fixed; z-index: 2147483010;
              width: 390px; max-width: calc(100vw - 2 * var(--mill-space-12));
              max-height: min(72vh, 660px); min-height: 0; overflow: hidden;
              border: var(--mill-hair) solid var(--mill-hairline);
              border-radius: var(--mill-radius); box-shadow: var(--mill-shadow); }
  .mill-bob[hidden] { display: none; }

  /* the head is the handle: it moves the block */
  .mill-bob > .mill-panel__head { cursor: grab; touch-action: none; white-space: nowrap; }
  .mill-bob--dragging > .mill-panel__head { cursor: grabbing; }
  .mill-bob__grip { flex: none; color: var(--mill-muted); }
  .mill-bob__sub { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

  /* the filter band between the head and the list */
  .mill-bob__filters { flex: none; display: flex; flex-direction: column; gap: var(--mill-space-8);
              padding: var(--mill-space-10) var(--mill-space-16);
              border-bottom: var(--mill-hair) solid var(--mill-hairline); }
  .mill-bob__verbs { margin-top: var(--mill-space-8); }

  /* the launcher in the bar says when the block is open */
  .mill-bob__launch[aria-expanded="true"] { color: var(--mill-surface); }


/* ===== 40-display.css ================================================== */
/* Mill · DISPLAY — the things that show something: card, grid, tile, table,
   list, chip, indicator, meter, avatar, timeline, thumb, chart frame.
   Sixteen components. Everything here sits on a surface with one radius and
   one hairline; nothing invents a second corner. */


  /* --- surface, the base every box shares ---------------------------------- */
  .mill-surface { background: var(--mill-surface);
              border: var(--mill-hair) solid var(--mill-hairline);
              border-radius: var(--mill-radius); }

  /* --- card ---------------------------------------------------------------- */
  .mill-card { --mill-card-pad: var(--mill-pad-card);
              position: relative; display: flex; flex-direction: column; gap: var(--mill-space-4);
              padding: var(--mill-card-pad); overflow: hidden;
              background: var(--mill-surface);
              border: var(--mill-hair) solid var(--mill-hairline);
              border-radius: var(--mill-radius); }
  .mill-card--roomy { --mill-card-pad: var(--mill-space-20); }
  /* a card you pick from a set of them. The board's answer options and three
     other places each drew their own live border (3-nov-2026). */
  .mill-card--on { border-color: var(--mill-primary);
              background: var(--mill-active-ground); }
  /* centred, like .mill-state: flex-start hung the 8px dot 4px above the
     middle of the 16px name (Richard, 2-nov-2026) */
  .mill-card__top { display: flex; align-items: center; gap: var(--mill-space-8); }
  /* room for the launch mark's 24, only on a card that carries one */
  .mill-card:has(> .mill-card__launch) > .mill-card__top { padding-right: var(--mill-space-28); }
  .mill-card__name { font-weight: var(--mill-weight-medium); color: var(--mill-heading);
              white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .mill-card__prefix { margin-left: var(--mill-space-6);
              font: var(--mill-weight-medium) var(--mill-text-xs)/var(--mill-leading-xs) var(--mill-mono);
              letter-spacing: var(--mill-track-wide); color: var(--mill-muted); }
  .mill-card__sub { font-size: var(--mill-text-sm); line-height: var(--mill-leading-xs); color: var(--mill-secondary); }
  .mill-card__foot { margin-top: auto; padding-top: var(--mill-space-8);
              display: flex; justify-content: flex-end;
              font-size: var(--mill-text-sm); line-height: var(--mill-leading-xs); color: var(--mill-muted); }
  /* clickable, so it carries the icon standard: 24 in a 48 box. The box is
     pulled onto the card's own padding so the mark stays on its corner. */
  .mill-card__launch { position: absolute; right: -1px; top: -4px;
              display: flex; align-items: center; justify-content: center;
              width: var(--mill-icon-btn); height: var(--mill-icon-btn);
              padding: var(--mill-icon-pad);
              color: var(--mill-secondary); font-variant-emoji: text; }
  /* a card's own actions (favourite, shortlist, remove) are its first line: the icons at
     the right, pulled onto the card's corner like the launch mark, a hairline under them
     (Richard, 10-nov-2026, accepted New proposed card-actions-top, FMIL-242) */
  .mill-card__actions { display: flex; justify-content: flex-end; gap: var(--mill-space-4);
              margin: calc(-1 * var(--mill-icon-pad)) calc(-1 * var(--mill-icon-pad)) calc(-1 * var(--mill-icon-pad)) 0; }
  /* under the actions line everything starts on the 16 line under the hairline: the name is
     not centred in the score 24, which put it 20 down on a desk (FMIL-242 criterion 2) */
  .mill-card__actions ~ .mill-card__top { align-items: flex-start; }
  .mill-card__launch svg { width: var(--mill-icon); height: var(--mill-icon); display: block; }
  .mill-cardgrid { display: grid; gap: var(--mill-gap-card);
              grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

  /* --- indicator: a rounded square, never a circle --------------------------- */
  .mill-dot { width: 10px; height: 10px; flex: none; border-radius: var(--mill-dot-radius);
              background: var(--mill-muted); }
  .mill-dot--sm       { width: 8px; height: 8px; }
  .mill-dot--client   { background: var(--mill-kind-client); }
  .mill-dot--venture  { background: var(--mill-kind-venture); }
  .mill-dot--internal { background: var(--mill-kind-internal); }
  .mill-dot--standing { background: var(--mill-kind-standing); }
  .mill-dot--ok       { background: var(--mill-ok); }
  .mill-dot--bad      { background: var(--mill-bad); }
  /* the dot sits in the middle of the FIRST line, so a name that wraps keeps it
     on its first line; on a phone a wrapped name runs 20 apart (Richard,
     10-nov-2026, state-dot-first-line, REFE-222) */
  .mill-state { display: inline-flex; align-items: flex-start; gap: var(--mill-space-8); }
  .mill-state > .mill-dot { margin-top: calc((1lh - 10px) / 2); }
  .mill-state > .mill-dot--sm { margin-top: calc((1lh - 8px) / 2); }
  @media (max-width: 820px) { .mill-state { line-height: var(--mill-leading-lg); } }

  /* --- chip / badge ----------------------------------------------------------- */
  .mill-chip { display: inline-flex; align-items: center; gap: var(--mill-space-6); white-space: nowrap;
              height: 20px; padding: 0 var(--mill-space-8);
              background: var(--mill-surface-sunk); border-radius: var(--mill-radius);
              font-size: var(--mill-text-sm); color: var(--mill-secondary); }
  .mill-chip--word { background: transparent; padding: 0; height: auto;
              font: var(--mill-weight-medium) var(--mill-text-xs)/var(--mill-leading-xs) var(--mill-mono);
              letter-spacing: var(--mill-track-wide); text-transform: uppercase; color: var(--mill-muted); }
  .mill-chip--ok  { background: #F1F9F4; color: var(--mill-ok-ink); }
  .mill-chip--bad { background: #FDECEC; color: var(--mill-bad-ink); }

  /* --- stat tile and strip ------------------------------------------------------ */
  .mill-stat { display: flex; flex-direction: column; gap: 2px; padding: var(--mill-space-14);
              background: var(--mill-surface);
              border: var(--mill-hair) solid var(--mill-hairline);
              border-radius: var(--mill-radius); }
  .mill-stat__value { font-family: var(--mill-display); font-size: var(--mill-text-xl);
              font-weight: var(--mill-weight-strong); line-height: var(--mill-leading-xl); color: var(--mill-nav); }
  .mill-stat__label { font-size: var(--mill-text-sm); line-height: var(--mill-leading-xs); color: var(--mill-secondary); }
  .mill-statstrip { display: grid; gap: var(--mill-space-12);
              grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

  /* --- meter ---------------------------------------------------------------------- */
  /* inline-block, not inline: an inline box gives the fill no width to take a
     percentage of, and the bar silently renders empty */
  .mill-meter { display: inline-block; width: 180px; height: 8px; flex: none; overflow: hidden;
              background: var(--mill-surface-sunk); border-radius: var(--mill-radius); }
  .mill-meter__fill { display: block; height: 100%; background: var(--mill-nav); }
  .mill-meter--ok .mill-meter__fill { background: var(--mill-ok); }
  .mill-meter--bad .mill-meter__fill { background: var(--mill-bad); }   /* over its limit: red, like the number above it */

  /* --- table ------------------------------------------------------------------------ */
  /* the table is a plane of its own: white, one hairline round it, radius 3, so it never sits
     on the grey ground with a white head over grey rows (Richard, 10-nov-2026, Canvas mill-table, A) */
  .mill-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--mill-surface);
              border: var(--mill-hair) solid var(--mill-hairline); border-radius: var(--mill-radius); }
  .mill-table > thead > tr > th:first-child { border-top-left-radius: var(--mill-radius); }
  .mill-table > thead > tr > th:last-child { border-top-right-radius: var(--mill-radius); }
  .mill-table > tbody > tr:last-child > td:first-child { border-bottom-left-radius: var(--mill-radius); }
  .mill-table > tbody > tr:last-child > td:last-child { border-bottom-right-radius: var(--mill-radius); }
  /* the head stays while the body scrolls: 800px down a 505-row table you
     were looking at six unlabelled columns (3-nov-2026) */
  .mill-table thead th { position: sticky; top: 0; z-index: 2;
              background: var(--mill-surface); }
  /* in a page's work area the head sticks at the area's top edge, not under its padding, where the rows
     showed through above it; under a sticky toolbar it sits below the bar (Richard, 24-nov-2026) */
  .mill-shell__main:not(.mill-shell__main--nested) .mill-table thead th { top: calc(-1 * var(--mill-space-20)); }
  .mill-shell__main:not(.mill-shell__main--nested):has(.mill-toolbar:not(.mill-toolbar--flow, .mill-toolbar--bulk)) .mill-table thead th {
              top: calc(var(--mill-toolbar-h) - var(--mill-space-20)); }
  .mill-table th { padding: var(--mill-space-10) var(--mill-space-12);
              text-align: left; border-bottom: var(--mill-hair) solid var(--mill-hairline);
              font: var(--mill-weight) var(--mill-text-2xs)/var(--mill-leading-2xs) var(--mill-mono);
              letter-spacing: var(--mill-track-wider); text-transform: uppercase; color: var(--mill-muted); }
  /* cells align to their top: a cell that wraps never pushes its neighbours to the middle (Richard, 9-nov-2026) */
  .mill-table td, .mill-table th { vertical-align: top; }
  /* a row that holds an input or a select reads on one line: its cells line up on their first line
     of text, not on their top (Richard, 13-nov-2026, table-row-control-line, REFE-199) */
  .mill-table tr:has(> td > :is(input, select, textarea, .mill-input, .mill-select)) > td { vertical-align: baseline; }
  .mill-table td { padding: var(--mill-space-8) var(--mill-space-12);
              border-bottom: var(--mill-hair) solid var(--mill-hairline-soft); font-size: var(--mill-text-base); }
  .mill-table tr:last-child td { border-bottom: 0; }
  .mill-table--compact td, .mill-table--compact th { padding-top: var(--mill-space-6); padding-bottom: var(--mill-space-6); }
  /* the picture cell: the file on the transparency chequer, a column of its own
     (Patterns Essentials' The files; Richard, 7-nov-2026, "table-lines") */
  .mill-table__media { width: 112px; }
  .mill-table__media .mill-chequer { display: flex; align-items: center; justify-content: center;
              width: 96px; height: 56px; border-radius: var(--mill-radius); }
  .mill-table__media img { display: block; max-width: 80px; max-height: 44px; }

  /* --- list: a bordered container of divided rows -------------------------------------- */
  .mill-list { background: var(--mill-surface);
              border: var(--mill-hair) solid var(--mill-hairline);
              border-radius: var(--mill-radius); overflow: hidden; }
  .mill-list__row { display: flex; align-items: center; gap: var(--mill-space-10);
              padding: var(--mill-space-10) var(--mill-space-12);
              border-bottom: var(--mill-hair) solid var(--mill-hairline-soft); }
  .mill-list__row:last-child { border-bottom: 0; }
  .mill-list__spacer { flex: 1 1 auto; }


  /* --- prose -------------------------------------------------------------
     Rendered text: a digest, a help body, a message. The tool does not write
     the tags, so it cannot class them - markdown hands back bare h2, p and ul
     and every tool styled them again (3-nov-2026). */
  .mill-prose { color: var(--mill-secondary); line-height: var(--mill-leading-md); }
  .mill-prose h2, .mill-prose h3, .mill-prose h4 {
              font: var(--mill-weight-medium) var(--mill-text-lg)/var(--mill-leading-md) var(--mill-sans);
              color: var(--mill-heading); margin: var(--mill-space-20) 0 var(--mill-space-6); }
  .mill-prose > :first-child { margin-top: 0; }
  .mill-prose p { margin: 0 0 var(--mill-space-8); }
  .mill-prose strong, .mill-prose b { color: var(--mill-text); font-weight: var(--mill-weight-medium); }
  .mill-prose ul, .mill-prose ol { margin: 0 0 var(--mill-space-8); padding-left: var(--mill-space-20); }
  .mill-prose li { margin-bottom: var(--mill-space-4); }
  .mill-prose code, .mill code { font-family: var(--mill-mono); font-size: var(--mill-text-sm);
              background: var(--mill-surface-sunk); border-radius: var(--mill-radius);
              padding: 0 var(--mill-space-4); }
  .mill-prose a { color: var(--mill-link);
              border-bottom: var(--mill-hair) solid var(--mill-hairline); }

  /* --- a line between two things ------------------------------------------
     A hairline separating one block from the next inside a card or a panel.
     The rail had one; everywhere else each tool wrote its own border-top
     (3-nov-2026). */
  .mill-rule { height: var(--mill-hair); flex: none; background: var(--mill-hairline);
              border: 0; margin: var(--mill-space-12) 0; }
  .mill-rule--soft { background: var(--mill-hairline-soft); }

  /* --- key / value list ------------------------------------------------------------------ */
  .mill-kv { display: grid; grid-template-columns: var(--mill-kv-key) minmax(0, 1fr); gap: var(--mill-space-4) var(--mill-space-14); }
  .mill-kv__k { font: var(--mill-weight) var(--mill-text-2xs)/var(--mill-leading-sm) var(--mill-mono);
              letter-spacing: var(--mill-track-wider); text-transform: uppercase; color: var(--mill-muted); overflow-wrap: anywhere; }
  .mill-kv__v { margin: 0; }

  /* --- avatar ------------------------------------------------------------------------------ */
  .mill-avatar { display: flex; align-items: center; justify-content: center;
              width: 24px; height: 24px; flex: none; border-radius: var(--mill-radius);
              background: var(--mill-surface-sunk); color: var(--mill-secondary);
              font-size: var(--mill-text-sm); font-weight: var(--mill-weight-medium); }

  /* --- timeline ------------------------------------------------------------------------------ */
  .mill-timeline { display: flex; flex-direction: column; }
  .mill-timeline__item { display: flex; gap: var(--mill-space-12); padding-bottom: var(--mill-space-12); }
  .mill-timeline__mark { display: flex; flex-direction: column; align-items: center; flex: none; }
  .mill-timeline__line { width: var(--mill-hair); flex: 1 1 auto; background: var(--mill-hairline); margin-top: 4px; }
  .mill-timeline__body { display: flex; flex-direction: column; gap: 2px; }
  .mill-timeline__when { font-size: var(--mill-text-sm); line-height: 14px; color: var(--mill-muted); }
  .mill-timeline__what { line-height: var(--mill-leading); }

  /* --- screenshot thumb -------------------------------------------------------------------- */
  /* padding 0: a thumb is often a button, and the browser pads a button 1 and 6 */
  .mill-thumb { width: 120px; height: 80px; flex: none; overflow: hidden; padding: 0;
              background: var(--mill-surface-sunk);
              border: var(--mill-hair) solid var(--mill-hairline);
              border-radius: var(--mill-radius); }
  .mill-thumb > img { display: block; width: 100%; height: 100%;
              object-fit: cover; object-position: top left; }
  .mill-thumbs { display: flex; gap: var(--mill-space-8); flex-wrap: wrap; }

  /* --- chart frame ------------------------------------------------------------------------- */
  .mill-chart { display: flex; flex-direction: column; gap: var(--mill-space-10);
              padding: var(--mill-space-20);
              background: var(--mill-surface);
              border: var(--mill-hair) solid var(--mill-hairline);
              border-radius: var(--mill-radius); }
  .mill-chart__head { display: flex; align-items: center; justify-content: space-between;
              font: var(--mill-weight) var(--mill-text-2xs)/var(--mill-leading-2xs) var(--mill-mono);
              letter-spacing: var(--mill-track-wider); text-transform: uppercase; color: var(--mill-muted); }
  .mill-chart__plot { height: 120px; background: var(--mill-surface-sunk); border-radius: var(--mill-radius); }
  /* --- the plot itself ------------------------------------------------
     Thin marks, recessive grid, a 1px gap taken off the TOP of each stacked
     segment so every bar still starts on its true value, and a 4px rounded
     end on the bar that touches the top of its stack.
     Every series takes a slot from the chart palette, in order. */
  .mill-plot { display: block; width: 100%; overflow: visible; }
  .mill-plot .grid { stroke: var(--mill-grid); stroke-width: 1; shape-rendering: crispEdges; }
  .mill-plot .axis { fill: var(--mill-muted);
              font: var(--mill-weight) var(--mill-text-2xs)/var(--mill-leading-2xs) var(--mill-mono); }
  .mill-plot .val  { fill: var(--mill-secondary);
              font: var(--mill-weight-medium) var(--mill-text-2xs)/var(--mill-leading-2xs) var(--mill-mono); }
  .mill-plot .line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .mill-plot .dot  { stroke: var(--mill-surface); stroke-width: 2; }
  /* no stroke on a bar: the 1px gap is taken off the top of each segment,
     so nothing else may eat into the height (Richard, 2-nov-2026) */
  .mill-plot .bar  { stroke: none; }
  .mill-plot .hit  { fill: transparent; cursor: pointer; }
  .mill-plot .hit:hover ~ .band, .mill-plot .band--on { opacity: 1; }
  .mill-plot .band { fill: var(--mill-active-ground); opacity: 0; }
  .mill-s1 { fill: var(--mill-cat-1); stroke: var(--mill-cat-1); }
  .mill-s2 { fill: var(--mill-cat-4); stroke: var(--mill-cat-4); }
  .mill-s3 { fill: var(--mill-cat-6); stroke: var(--mill-cat-6); }
  .mill-s4 { fill: var(--mill-cat-7); stroke: var(--mill-cat-7); }
  .mill-s5 { fill: var(--mill-cat-11); stroke: var(--mill-cat-11); }
  .mill-s6 { fill: var(--mill-cat-12); stroke: var(--mill-cat-12); }
  .mill-key { display: inline-flex; align-items: center; gap: var(--mill-space-6); }
  .mill-key__swatch { width: 10px; height: 10px; flex: none; border-radius: var(--mill-dot-radius); }
  .mill-key__swatch.mill-s1 { background: var(--mill-cat-1); }
  .mill-key__swatch.mill-s2 { background: var(--mill-cat-4); }
  .mill-key__swatch.mill-s3 { background: var(--mill-cat-6); }
  .mill-key__swatch.mill-s4 { background: var(--mill-cat-7); }
  .mill-key__swatch.mill-s5 { background: var(--mill-cat-11); }
  .mill-key__swatch.mill-s6 { background: var(--mill-cat-12); }
  .mill-chart__legend { display: flex; gap: var(--mill-space-14); font-size: var(--mill-text-sm); color: var(--mill-secondary); }

  /* --- state: display ------------------------------------------------------ */
  .mill-card:hover           { border-color: var(--mill-secondary); }
  .mill-card[data-dead]      { opacity: var(--mill-disabled); }
  .mill-rowcard:hover        { background: var(--mill-hover); }
  .mill-list__row:hover      { background: var(--mill-hover); }
  .mill-table tbody tr:hover { background: var(--mill-hover); }
  /* a row that opens something is clicked as a whole: data-href on the row (Richard, 9-nov-2026) */
  .mill-table tbody tr[data-href] { cursor: pointer; }
  .mill-thumb:hover          { border-color: var(--mill-primary); }
  .mill-chip[data-mill-press]:hover { background: var(--mill-hover); }
  .mill-chip[aria-pressed="true"] {
              background: var(--mill-hover-accent); color: var(--mill-heading);
              box-shadow: inset 0 0 0 var(--mill-hair) var(--mill-primary); }

  /* numbers line up under each other or they are not numbers */
  .mill-table .num, .mill-table th.num,
  .mill-kv__v--num, .mill-stat__value {
              font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
  .mill-table .num, .mill-table th.num { text-align: right; }
  .mill-table tr.total td { border-top: var(--mill-hair) solid var(--mill-text);
              font-weight: var(--mill-weight-medium); }

  /* the dot gains the two states every dashboard drew by hand */
  .mill-dot--warn  { background: var(--mill-warn); }
  .mill-dot--blind { background: transparent;
              box-shadow: inset 0 0 0 var(--mill-hair) var(--mill-muted); }
  .mill-dot--work  { background: var(--mill-ok); animation: mill-pulse 1.6s ease-in-out infinite; }
  @keyframes mill-pulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }



/* re-opened so the fold sits in the components layer, whatever this file
   happens to end with. */

  /* --- the fold ----------------------------------------------------------- */
  .mill-fold { border: var(--mill-hair) solid var(--mill-hairline);
              border-radius: var(--mill-radius); background: var(--mill-surface); }
  /* folds one under the other sit 12px apart (Richard, 9-nov-2026, fold-gap-12, THRE-043) */
  .mill-fold + .mill-fold { margin-top: var(--mill-space-12); }
  .mill-panel__body > .mill-fold + .mill-fold { margin-top: calc(var(--mill-space-12) - var(--mill-space-14)); }
  .mill-fold > summary { display: flex; align-items: center; gap: var(--mill-space-10);
              padding: var(--mill-space-10) var(--mill-space-14);
              font-size: var(--mill-text-base); font-weight: var(--mill-weight-medium);
              color: var(--mill-heading); cursor: pointer; list-style: none; }
  .mill-fold > summary::-webkit-details-marker { display: none; }
  .mill-fold > summary::before { content: ""; flex: none; width: 8px; height: 8px;
              border-right: 1.5px solid var(--mill-secondary);
              border-bottom: 1.5px solid var(--mill-secondary);
              transform: rotate(-45deg); margin-left: 2px;
              transition: transform var(--mill-quick) var(--mill-ease); }
  .mill-fold[open] > summary::before { transform: rotate(45deg); }
  .mill-fold > summary:hover { background: var(--mill-hover); }
  .mill-fold__count { margin-left: auto; font-family: var(--mill-mono);
              font-size: var(--mill-text-xs); color: var(--mill-muted); }
  .mill-fold__peek { font-weight: var(--mill-weight); color: var(--mill-secondary);
              overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mill-fold[open] > summary .mill-fold__peek { display: none; }
  .mill-fold__body { padding: 0 var(--mill-space-14) var(--mill-space-12);
              border-top: var(--mill-hair) solid var(--mill-hairline-soft);
              padding-top: var(--mill-space-12); }
  .mill-fold--flush { border: 0; border-radius: 0; background: none; }
  .mill-fold--flush > summary { padding-left: 0; padding-right: 0; }
  /* fold-flush-body (Richard, 10-nov-2026): the body takes the host edge too. */
  .mill-fold--flush > .mill-fold__body { padding: var(--mill-space-4) 0 0; border-top: 0; }


/* re-opened: the components layer, not whatever this file ends with. */

  /* --- modifiers, 2-nov-2026 --------------------------------------------- */

  /* the status word. A state said in its own colour, never a filled pill.
     Five invoice states, four organisation kinds, seven deal stages all drew
     their own; these are the named meanings. */
  .mill-status { font-weight: var(--mill-weight-medium); color: var(--mill-secondary); }
  .mill-status--ok   { color: var(--mill-ok-ink); }
  .mill-status--warn { color: var(--mill-warn-ink); }
  .mill-status--bad  { color: var(--mill-bad-ink); }
  .mill-status--new  { color: var(--mill-warn-ink); }
  .mill-status--off  { color: var(--mill-muted); }

  /* the chip, as an outline rather than a fill, in a state colour */
  .mill-chip--outline { background: transparent;
              box-shadow: inset 0 0 0 var(--mill-hair) currentColor; }
  .mill-chip--outline.mill-chip--ok  { color: var(--mill-ok-ink); }
  .mill-chip--outline.mill-chip--bad { color: var(--mill-bad-ink); }

  /* table: a header you press, a row that names a band, a control in a cell */
  .mill-table th[aria-sort] { cursor: pointer; user-select: none; }
  .mill-table th[aria-sort]:hover { color: var(--mill-heading); }
  .mill-table th[aria-sort]::after { content: ""; display: inline-block;
              width: 7px; height: 7px; margin-left: var(--mill-space-6);
              border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
              transform: rotate(45deg) translateY(-1px); opacity: 0; }
  .mill-table th[aria-sort="ascending"]::after  { opacity: 1; transform: rotate(-135deg) translateY(-1px); }
  .mill-table th[aria-sort="descending"]::after { opacity: 1; }
  .mill-table tr.group td, .mill-table tr.group th {
              background: var(--mill-surface-sunk); color: var(--mill-heading);
              font-weight: var(--mill-weight-medium); }
  .mill-table tr.group .mill-fold__count { margin-left: var(--mill-space-8); }
  .mill-select--cell, .mill-field--cell {
              height: 26px; border-color: transparent; background-color: transparent;
              padding: 0 var(--mill-space-6); --mill-select-inset: var(--mill-space-6); }
  .mill-select--cell:hover, .mill-select--cell:focus,
  .mill-field--cell:hover, .mill-field--cell:focus {
              border-color: var(--mill-hairline); background: var(--mill-surface); }
  .mill-select--unset, .mill-field--unset {
              border-style: dashed; border-color: var(--mill-primary); color: var(--mill-primary); }

  /* a heading that names a band and counts it */
  .mill-bandhead { display: flex; align-items: baseline; gap: var(--mill-space-10);
              padding-bottom: var(--mill-space-8);
              border-bottom: var(--mill-hair) solid var(--mill-hairline); }
  .mill-bandhead__name { font-size: var(--mill-text-lg); font-weight: var(--mill-weight-medium);
              color: var(--mill-heading); }
  /* a head title written as an h2 keeps no margin of its own, so a button beside it centres on it */
  .mill-bandhead > .mill-bandhead__name { margin: 0; }
  .mill-bandhead__count { font-family: var(--mill-mono); font-size: var(--mill-text-xs);
              color: var(--mill-muted); }
  .mill-bandhead__spacer { flex: 1 1 auto; }
  /* a switch in a band head is the small one, so the head line sits close under its title
     (Richard, 9-nov-2026, Perch proposal bandhead-cards-b, COMP-149) */
  .mill-bandhead > .mill-seg { align-self: center; }
  /* the switch hangs over the head, so the head is as tall as its title and its line comes up
     close under it (Richard, 10-nov-2026, Perch proposal bandhead-seg-hangs, COMP-149) */
  .mill-bandhead > .mill-seg { margin-block: -6px; }
  .mill-bandhead > .mill-seg .mill-seg__item { height: 26px; font-size: var(--mill-text-sm); }
  /* a button in a band head is the small secondary one at the right end of the head, centred on
     the title; it hangs over the head like the switch, so the head line stays close under the title
     (Richard, 16-nov-2026, Ledger dashboard, BACK-099/100) */
  .mill-bandhead > .mill-btn { align-self: center; margin-block: -5px; }
  .mill-bandhead > :not(.mill-btn, .mill-bandhead__spacer) + .mill-btn { margin-left: auto; }
  .mill-bandhead:has(> .mill-btn) > .mill-bandhead__name { align-self: center; }

  /* the column head gains the line that says what the column means */
  /* the sub line is a sentence, not a label: it drops the head's mono caps */
  .mill-col__sub { font-family: var(--mill-sans); font-size: var(--mill-text-sm);
              line-height: var(--mill-leading-xs); letter-spacing: 0; text-transform: none;
              color: var(--mill-muted); }

  /* the meter: smaller, and split into parts */
  .mill-meter--small { width: 40px; height: 6px; }
  .mill-meter--parts { display: inline-flex; gap: 0; }
  .mill-meter__part { display: block; height: 100%; }
  .mill-meter__part--done  { background: var(--mill-ok); }
  .mill-meter__part--doing { background: var(--mill-nav); }
  .mill-meter__part--wait  { background: var(--mill-warn); }
  .mill-meter__part--off   { background: transparent;
              box-shadow: inset 0 0 0 var(--mill-hair) var(--mill-muted); }

  /* a one to five score, as dots */
  .mill-dots { display: inline-flex; gap: 3px; align-items: center; }
  .mill-dots__dot { width: 6px; height: 6px; flex: none;
              border-radius: var(--mill-dot-radius); background: var(--mill-hairline); }
  .mill-dots__dot[data-on] { background: var(--mill-primary); }

  /* the stat: in alarm, and not measured at all, which is not zero */
  .mill-stat--bad .mill-stat__value   { color: var(--mill-bad-ink); }
  .mill-stat--blind { border-style: dashed; background: none; }
  .mill-stat--blind .mill-stat__value { color: var(--mill-muted); }
  .mill-statstrip--joined { gap: var(--mill-space-12) 0; }
  /* one wrapping label must not drop its neighbours' baselines */
  .mill-statstrip--joined { align-items: stretch; }
  .mill-statstrip--joined .mill-stat { display: flex; flex-direction: column;
              justify-content: flex-start; gap: var(--mill-space-4); }
  /* room for two lines whether it needs them or not, so every bar in the row
     starts on the same line even when one label wraps */
  .mill-statstrip--joined .mill-stat__label { min-height: calc(2 * var(--mill-leading-xs)); }
  .mill-statstrip--joined .mill-stat { border-radius: 0; margin-left: calc(-1 * var(--mill-hair)); }
  .mill-statstrip--joined .mill-stat:first-child {
              border-radius: var(--mill-radius) 0 0 var(--mill-radius); margin-left: 0; }
  .mill-statstrip--joined .mill-stat:last-child {
              border-radius: 0 var(--mill-radius) var(--mill-radius) 0; }

  /* the card: paused, and the date it dies */
  .mill-card--paused { border-style: dashed; opacity: 0.62; }
  .mill-card__due { font-family: var(--mill-mono); font-size: var(--mill-text-xs);
              color: var(--mill-muted); }
  .mill-card__due--late { color: var(--mill-bad-ink); }

  /* the legend key says what it means and how many */
  .mill-key__what  { color: var(--mill-secondary); }
  .mill-key__count { margin-left: auto; font-family: var(--mill-mono);
              font-size: var(--mill-text-xs); color: var(--mill-muted); }
  .mill-key--row { display: flex; width: 100%; gap: var(--mill-space-8); }

  /* the timeline: a glyph per kind of event, and a box to add one */
  .mill-timeline__mark--icon { width: 22px; height: 22px; display: flex;
              align-items: center; justify-content: center;
              background: var(--mill-surface-sunk); border-radius: var(--mill-radius); }
  .mill-timeline__mark--icon svg { width: 14px; height: 14px; stroke: currentColor; fill: none; }
  .mill-timeline__add { display: flex; gap: var(--mill-space-8);
              padding-bottom: var(--mill-space-12); }

  /* the thumb: picked, and removable */
  .mill-thumb--on { border-color: var(--mill-primary);
              box-shadow: inset 0 0 0 var(--mill-hair) var(--mill-primary); }
  .mill-thumb--drop { position: relative; }
  .mill-thumb__x { position: absolute; top: 2px; right: 2px;
              width: 18px; height: 18px; display: flex; align-items: center; justify-content: center;
              background: var(--mill-surface); border-radius: var(--mill-radius);
              box-shadow: 0 1px 3px rgba(31,37,57,.2);
              font-size: var(--mill-text-xs); color: var(--mill-secondary); }
  .mill-thumb__x:hover { color: var(--mill-bad); }

  /* one bar in a plot carries the accent because it is the one that matters */
  .mill-plot .bar--peak { fill: var(--mill-primary); }


/* re-opened: the components layer. */

  /* --- the last two modifiers --------------------------------------------- */

  /* an empty ITEM, in its place in a list or a day column, offering to start
     the thing that is missing. The empty state is for a whole page. */
  .mill-empty--slot { display: flex; align-items: center; gap: var(--mill-space-8);
              min-height: 34px; padding: var(--mill-space-8) var(--mill-space-10);
              border: 1px dashed var(--mill-hairline); border-radius: var(--mill-radius);
              background: none; color: var(--mill-muted);
              font-size: var(--mill-text-sm); text-align: left; }
  .mill-empty--slot:hover { border-color: var(--mill-primary); color: var(--mill-secondary); }

  /* a fold whose summary carries the health of what is inside it */
  .mill-fold--status > summary { gap: var(--mill-space-8); }
  .mill-fold--status .mill-dot { margin-left: 2px; }
  .mill-fold--status .mill-fold__peek { color: var(--mill-secondary); }


/* re-opened: the components layer, not whatever this file ends with. */

  /* --- clamped cell ------------------------------------------------------- */
  /* long text cut to a fixed number of lines, so a dense row keeps its height */
  .mill-table .clamp, .mill-clamp {
              display: -webkit-box; -webkit-box-orient: vertical;
              -webkit-line-clamp: var(--mill-clamp, 2); line-clamp: var(--mill-clamp, 2);
              overflow: hidden; }
  .mill-clamp--1 { --mill-clamp: 1; }
  .mill-clamp--3 { --mill-clamp: 3; }


/* re-opened: the components layer, not whatever this file ends with. */

  /* a notice is hidden by the attribute, not by a rule in the tool */
  .mill-notice[hidden], .mill-toast[hidden] { display: none; }


/* re-opened: the components layer, not whatever this file ends with. */

  /* A state said with a dot in front of it. Three tools drew their own
     (Spindle, the board, the Ledger) and all three drew it differently. */
  /* the dot sits in the middle of the FIRST line, so a status that wraps keeps it on its
     first line; on a phone a wrapped status runs 20 apart (Richard, 14-nov-2026,
     status-dot-first-line, FMIL-241) */
  .mill-status--dot { display: inline-flex; align-items: flex-start; gap: var(--mill-space-6); }
  .mill-status--dot::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: calc((1lh - 7px) / 2);
              border-radius: var(--mill-dot-radius); background: currentColor; }
  @media (max-width: 820px) { .mill-status--dot { line-height: var(--mill-leading-lg); } }

  /* The two text utilities every tool had already invented under its own name
     (.dim and .sm in Spindle, .dim in the board, .muted in the Ledger). */
  .mill-dim { color: var(--mill-secondary); }
  .mill-sm  { font-size: var(--mill-text-sm); line-height: var(--mill-leading-xs); }


/* re-opened: the components layer, not whatever this file ends with. */

  /* --- the tick mark ------------------------------------------------------
     A state shown as four cells that fill as the thing moves, instead of a
     badge on every row: new 1, in progress 2, review 3, done 4. Paused is
     outlined, denied is struck through. Came out of the to-do row, which four
     tools draw, and it belongs here rather than in any one of them. */
  /* four was hard-coded; Bale scores out of five and the part could not say
     so, so the column came out empty (3-nov-2026). */
  .mill-ticks { --mill-ticks-n: 4; display: inline-grid;
              grid-template-columns: repeat(var(--mill-ticks-n), 8px);
              gap: 2px; align-items: center; }
  .mill-ticks i { height: 8px; border-radius: var(--mill-dot-radius);
              background: currentColor; opacity: .22; }
  .mill-ticks[data-at="1"] i:nth-child(-n+1),
  .mill-ticks[data-at="2"] i:nth-child(-n+2),
  .mill-ticks[data-at="3"] i:nth-child(-n+3),
  .mill-ticks[data-at="4"] i:nth-child(-n+4),
  .mill-ticks[data-at="5"] i:nth-child(-n+5),
  .mill-ticks[data-at="6"] i:nth-child(-n+6) { opacity: 1; }
  .mill-ticks--outline i { opacity: 1; background: transparent;
              box-shadow: inset 0 0 0 1px currentColor; }
  .mill-ticks--struck { position: relative; }
  /* the strike runs 3px past the first and last tick (Richard, 7-nov-2026, ticks-struck) */
  .mill-ticks--struck::after { content: ""; position: absolute; left: -3px; right: -3px;
              top: 50%; height: 1px; background: currentColor; }

  /* the state word beside it, in the state's own colour */
  .mill-mark { display: inline-flex; align-items: center; gap: var(--mill-space-6);
              font-size: var(--mill-text-sm); line-height: var(--mill-leading-xs);
              white-space: nowrap; color: var(--mill-secondary); }
  .mill-mark--ok   { color: var(--mill-ok-ink); }
  .mill-mark--work { color: var(--mill-warn-ink); }
  .mill-mark--wait { color: var(--mill-warn-ink); }
  .mill-mark--bad  { color: var(--mill-bad-ink); }
  .mill-mark__word { font-weight: var(--mill-weight-medium); }

  /* --- a row in a list of work -------------------------------------------
     An id, a title with a line of facts under it, and the verbs on the right.
     The to-do row, the roadmap row and the deal row are all this. */
  .mill-workrow { display: grid; grid-template-columns: 78px minmax(0, 1fr) auto;
              gap: var(--mill-space-4) var(--mill-space-14); align-items: start;
              padding: var(--mill-space-10) var(--mill-space-14);
              border-bottom: var(--mill-hair) solid var(--mill-hairline-soft); }
  .mill-workrow:last-child { border-bottom: 0; }
  .mill-workrow:hover { background: var(--mill-hover); }
  .mill-workrow__id { font-family: var(--mill-mono); font-size: var(--mill-text-xs);
              color: var(--mill-secondary); padding-top: 2px; }
  .mill-workrow__title { grid-column: 2; font-weight: var(--mill-weight-medium);
              color: var(--mill-heading); overflow-wrap: anywhere; }
  .mill-workrow__facts { grid-column: 2; display: flex; flex-wrap: wrap;
              align-items: center; gap: var(--mill-space-4) var(--mill-space-14);
              font-size: var(--mill-text-sm); color: var(--mill-secondary); }
  .mill-workrow__acts { grid-column: 3; grid-row: 1 / span 2; display: flex;
              gap: var(--mill-space-6); align-self: center; flex-wrap: wrap;
              justify-content: flex-end; }
  .mill-workrow--blocked .mill-workrow__title,
  .mill-workrow--blocked .mill-workrow__id { opacity: var(--mill-disabled); }
  .mill-workrow--on { background: var(--mill-active-ground); }
  /* on a phone: id, title, facts and verbs under each other. The three
     columns left the title one letter wide at 390 beside the verbs. */
  @media (max-width: 820px) {
    .mill-workrow { grid-template-columns: minmax(0, 1fr); }
    .mill-workrow > * { grid-column: 1; grid-row: auto; }
    .mill-workrow__acts { justify-content: flex-start; }
  }


/* --- on a phone -----------------------------------------------------------
   A row of items laid across overlaps when the room runs out: on Bale's
   Artefacts the title ran underneath the V/S/C group and three elements sat
   past the screen edge (Richard, 3-nov-2026). It wraps instead. */
@media (max-width: 820px) {
  .mill-list__row { flex-wrap: wrap; }
  .mill-list__row > * { min-width: 0; }
  /* what follows the spacer keeps the right edge on its own line (Richard, 10-nov-2026,
     accepted list-row-end-phone, REFE-181) */
  .mill-list__spacer + * { margin-left: auto; }
  /* a name truncates when it has a width to truncate against; on a phone it
     has none, so it wraps rather than running off the edge. */
  .mill-card__name, .mill-rowcard__title { white-space: normal; overflow-wrap: anywhere; }
}

/* Taken in from the Proposals tab as suggested (Richard, 6-nov-2026).
   Each is drawn on the Display page. */

  /* --- stacked row: the phone fallback for a wide table (C01) -------------
     Below phone width the table gives way to one stacked row per item: the
     id and the state on one line, the title in heading ink, a line of facts.
     .mill-swap holds both and shows the one that fits. */
  .mill-stackrow { display: block; padding: var(--mill-space-10) var(--mill-space-12);
              border-bottom: var(--mill-hair) solid var(--mill-hairline-soft); }
  .mill-stackrow:last-child { border-bottom: 0; }
  .mill-stackrow__top { display: flex; align-items: center; justify-content: space-between;
              gap: var(--mill-space-8); }
  .mill-stackrow__id { font: var(--mill-weight) var(--mill-text-sm)/var(--mill-leading-xs) var(--mill-mono);
              color: var(--mill-secondary); }
  .mill-stackrow__title { margin: var(--mill-space-4) 0; color: var(--mill-heading);
              font-weight: var(--mill-weight-medium); overflow-wrap: anywhere; }
  .mill-stackrow__facts { font-size: var(--mill-text-sm); line-height: var(--mill-leading-xs);
              color: var(--mill-secondary); }
  .mill-swap__phone { display: none; }
  @media (max-width: 820px) {
    .mill-swap__wide  { display: none; }
    .mill-swap__phone { display: block; }
  }

  /* --- expandable table row (C24): the fold's chevron in the first cell ---- */
  .mill-table__toggle { display: inline-flex; align-items: center; gap: var(--mill-space-8);
              min-height: 26px; cursor: pointer; color: inherit; }
  .mill-table__toggle::before { content: ""; flex: none; width: 8px; height: 8px;
              border-right: 1.5px solid var(--mill-secondary);
              border-bottom: 1.5px solid var(--mill-secondary);
              transform: rotate(-45deg);
              transition: transform var(--mill-quick) var(--mill-ease); }
  .mill-table__toggle[aria-expanded="true"]::before { transform: rotate(45deg); margin-top: calc(-1 * var(--mill-space-4)); }
  .mill-table .mill-table__detail > td { background: var(--mill-surface-sunk); padding: var(--mill-space-12); }   /* FMIL-193 */
  .mill-table .mill-table__detail[hidden] { display: none; }

  /* --- matrix (C25): rows by name, a version and a state dot per cell ------ */
  .mill-table--matrix th + th, .mill-table--matrix td + td { white-space: nowrap; }

  /* --- quadrant (C42): four cards in two columns, a small-caps label each -- */
  .mill-quad { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--mill-gap-card); }
  .mill-quad__cell { padding: var(--mill-pad-card); background: var(--mill-surface);
              border: var(--mill-hair) solid var(--mill-hairline); border-radius: var(--mill-radius); }
  .mill-quad__label { display: flex; align-items: center; height: var(--mill-group-label);
              font: var(--mill-weight) var(--mill-text-2xs)/var(--mill-leading-2xs) var(--mill-mono);
              letter-spacing: var(--mill-track-wider); text-transform: uppercase; color: var(--mill-muted); }

  /* --- the card's picture (C62 plates, C65 portraits) ----------------------
     A sunken ground across the top of a card holding a mark or a photo.
     Square corners of the set: the Mill has no round images. */
  .mill-card__media { display: flex; align-items: center; justify-content: center;
              height: 96px; margin-bottom: var(--mill-space-10); overflow: hidden;
              background: var(--mill-surface-sunk);
              border: var(--mill-hair) solid var(--mill-hairline); border-radius: var(--mill-radius); }
  .mill-card__media--nav { background: var(--mill-nav); border-color: var(--mill-nav); }
  .mill-card__media--portrait { height: 168px; }
  .mill-card__media > img, .mill-card__media > svg { display: block; max-width: 100%; max-height: 100%; }
  .mill-card__media--portrait > img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; }
  .mill-portraits { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--mill-gap-card); }
  .mill-portraits > .mill-card { width: 200px; }

  /* --- icon specimen grid (C64): small square tiles, the download on hover -- */
  .mill-icongrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
              gap: var(--mill-gap-card); }
  .mill-icongrid__tile { display: flex; flex-direction: column; align-items: center; gap: var(--mill-space-6);
              padding: var(--mill-pad-card) var(--mill-space-4);
              background: var(--mill-surface);
              border: var(--mill-hair) solid var(--mill-hairline); border-radius: var(--mill-radius); }
  .mill-icongrid__tile > svg { width: var(--mill-icon); height: var(--mill-icon); display: block; flex: none; }
  .mill-icongrid__name { font-size: var(--mill-text-sm); line-height: var(--mill-leading-xs);
              color: var(--mill-secondary); text-align: center; overflow-wrap: anywhere; }
  .mill-icongrid__get { opacity: 0; }
  .mill-icongrid__tile:hover .mill-icongrid__get,
  .mill-icongrid__tile:focus-within .mill-icongrid__get { opacity: 1; }
  @media (hover: none) { .mill-icongrid__get { opacity: 1; } }

  /* --- scrollbar (C83): a thin bar on any scroller -------------------------
     A 6px track in the soft hairline with a hairline thumb and the set's
     corners. Browsers that read scrollbar-color draw their own thin bar in
     these two colours; the -webkit- rules are for the ones that do not.
     A Mac set to show scroll bars only while scrolling hides it until then. */
  .mill-scrollbar { scrollbar-width: thin; scrollbar-color: var(--mill-hairline) var(--mill-hairline-soft); }
  .mill-scrollbar::-webkit-scrollbar { width: 6px; height: 6px; }
  .mill-scrollbar::-webkit-scrollbar-track { background: var(--mill-hairline-soft);
              border-radius: var(--mill-radius); margin: var(--mill-space-4); }
  .mill-scrollbar::-webkit-scrollbar-thumb { background: var(--mill-hairline); border-radius: var(--mill-radius); }

  /* --- relation map (C66): the chart language for a graph ------------------ */
  .mill-relmap { display: block; width: 100%; height: auto; }
  .mill-relmap__edge { fill: none; stroke: var(--mill-hairline); stroke-width: var(--mill-hair); }
  .mill-relmap__edge--weak { stroke-dasharray: 3 3; }
  .mill-relmap__node { fill: var(--mill-cat-1); }
  .mill-relmap__node--2 { fill: var(--mill-cat-4); }
  .mill-relmap__node--3 { fill: var(--mill-cat-6); }
  .mill-relmap__label { font-family: var(--mill-sans); font-size: var(--mill-text-2xs);
              fill: var(--mill-secondary); }


/* A table on a phone stacks each row: its cells one under the other, full width,
   the row closed by its hairline. Three columns squeezed into 360px wrapped a date
   over four lines and a status over three (Richard, 7-nov-2026, on Spindle's posted
   list). The column heads go, unless a head sorts: then the heads stand as one
   wrapping line of labels, so sorting stays in reach. The matrix stays a grid. */

  @media (max-width: 820px) {
    .mill-table:not(.mill-table--matrix),
    .mill-table:not(.mill-table--matrix) > tbody,
    .mill-table:not(.mill-table--matrix) > tfoot,
    .mill-table:not(.mill-table--matrix) > tbody > tr,
    .mill-table:not(.mill-table--matrix) > tfoot > tr,
    .mill-table:not(.mill-table--matrix) > tbody > tr > td,
    .mill-table:not(.mill-table--matrix) > tbody > tr > th,
    .mill-table:not(.mill-table--matrix) > tfoot > tr > td { display: block; width: auto; }
    .mill-table:not(.mill-table--matrix) > tbody > tr,
    .mill-table:not(.mill-table--matrix) > tfoot > tr { padding: var(--mill-space-10) var(--mill-space-12);
              border-bottom: var(--mill-hair) solid var(--mill-hairline-soft); }
    .mill-table:not(.mill-table--matrix) > tbody > tr:last-child,
    .mill-table:not(.mill-table--matrix) > tfoot > tr:last-child { border-bottom: 0; }
    .mill-table:not(.mill-table--matrix) > tbody > tr > td,
    .mill-table:not(.mill-table--matrix) > tbody > tr > th,
    .mill-table:not(.mill-table--matrix) > tfoot > tr > td { padding: var(--mill-space-2) 0; border: 0; text-align: left; }
    .mill-table:not(.mill-table--matrix) > tbody > tr > td:empty { display: none; }
    /* an opened row's detail keeps its padding on the sunken ground (FMIL-193) */
    .mill-table:not(.mill-table--matrix) > tbody > tr.mill-table__detail > td { padding: var(--mill-space-12); }
    .mill-table:not(.mill-table--matrix) tr[hidden] { display: none; }
    .mill-table:not(.mill-table--matrix) > thead:not(:has(th[aria-sort])) { display: none; }
    .mill-table:not(.mill-table--matrix) > thead:has(th[aria-sort]) { display: block; }
    .mill-table:not(.mill-table--matrix) > thead:has(th[aria-sort]) > tr { display: flex; flex-wrap: wrap;
              column-gap: var(--mill-space-12); border-bottom: var(--mill-hair) solid var(--mill-hairline); }
    .mill-table:not(.mill-table--matrix) > thead:has(th[aria-sort]) > tr > th { border: 0; padding: var(--mill-space-8) 0; }
    .mill-table:not(.mill-table--matrix) > thead:has(th[aria-sort]) > tr > th:empty { display: none; }
  }


/* A plain table on a phone, whatever its number of columns: the first value is the row's
   title, every other value has its column name before it, so no value reads loose (Richard,
   10-nov-2026, table-phone-cards FMIL-190, widened to every table by table-labels-always
   FMIL-208). mill.js writes the names from the head; a column with no head shows none. */

  @media (max-width: 820px) {
    .mill-table:not(.mill-table--matrix, .mill-table--cards, .mill-table--lines, .mill-table--stacked) > tbody > tr > td:first-child {
              font-weight: var(--mill-weight-medium); color: var(--mill-heading); padding-bottom: var(--mill-space-4); }
    .mill-table:not(.mill-table--matrix, .mill-table--cards, .mill-table--lines, .mill-table--stacked) > tbody > tr > td[data-label]:not(:first-child, [data-label=""], [data-mill-acts]) {
              display: flex; flex-direction: column; gap: var(--mill-space-4); overflow-wrap: anywhere; }
    .mill-table:not(.mill-table--matrix, .mill-table--cards, .mill-table--lines, .mill-table--stacked) > tbody > tr > td[data-label]:not(:first-child, [data-label=""], [data-mill-acts])::before {
              content: attr(data-label); flex: none; font-family: var(--mill-mono); font-size: var(--mill-text-2xs);
              letter-spacing: var(--mill-track-wider); text-transform: uppercase; color: var(--mill-muted); }
    /* the column name stands above its value (Richard, 10-nov-2026, cards-label-above-phone FMIL-261,
       taking in table-detail-stack-phone FMIL-259); a field in an open row fills the width */
    .mill-table__detail .mill-table:not(.mill-table--matrix, .mill-table--cards, .mill-table--lines, .mill-table--stacked) > tbody > tr > td[data-label]:not(:first-child, [data-label=""], [data-mill-acts]) > .mill-field { width: 100%; }
    .mill-table:not(.mill-table--matrix, .mill-table--cards, .mill-table--lines, .mill-table--stacked) > tbody > tr > td.num { text-align: left; }
    /* an empty cell leaves the row, its column name with it (Richard, 14-nov-2026, accepted
       table-blank-cell-leaves-phone, Ledger /finance/deadlines and /finance/reminders, BACK-065/066) */
    .mill-table:not(.mill-table--matrix, .mill-table--cards, .mill-table--lines, .mill-table--stacked) > tbody > tr > td[data-label][data-mill-blank] { display: none; }
    /* every column name short (mill.js: data-mill-short-labels): the name stands beside its value in a
       60px column (Richard, 14-nov-2026, accepted table-short-labels-beside-phone, Ledger /finance/tax, BACK-068) */
    .mill-table[data-mill-short-labels]:not(.mill-table--matrix, .mill-table--cards, .mill-table--lines, .mill-table--stacked) > tbody > tr > td[data-label]:not(:first-child, [data-label=""], [data-mill-acts]) {
              flex-direction: row; align-items: baseline; gap: var(--mill-space-12); }
    .mill-table[data-mill-short-labels]:not(.mill-table--matrix, .mill-table--cards, .mill-table--lines, .mill-table--stacked) > tbody > tr > td[data-label]:not(:first-child, [data-label=""], [data-mill-acts])::before {
              flex: 0 0 60px; }
  }


/* Three columns or fewer stay a table on a phone: head and columns as on a desk, the desk's
   12 inside the left and right edge, no value labels (Richard, 10-nov-2026, table-phone-three-b
   FMIL-190). Four columns or more stack with labels as above. The class is doubled so it
   outranks the labelled-stack rules above once mill.js writes data-label (publish takes the layers off). */

  @media (max-width: 820px) {
    .mill-table.mill-table:not(.mill-table--matrix, .mill-table--cards, .mill-table--lines, .mill-table--stacked):not(:has(tr > :nth-child(4))) { display: table; width: 100%; }
    .mill-table.mill-table:not(.mill-table--matrix, .mill-table--cards, .mill-table--lines, .mill-table--stacked):not(:has(tr > :nth-child(4))) > thead, .mill-table.mill-table:not(.mill-table--matrix, .mill-table--cards, .mill-table--lines, .mill-table--stacked):not(:has(tr > :nth-child(4))) > thead:has(th[aria-sort]) { display: table-header-group; }
    .mill-table.mill-table:not(.mill-table--matrix, .mill-table--cards, .mill-table--lines, .mill-table--stacked):not(:has(tr > :nth-child(4))) > thead > tr, .mill-table.mill-table:not(.mill-table--matrix, .mill-table--cards, .mill-table--lines, .mill-table--stacked):not(:has(tr > :nth-child(4))) > thead:has(th[aria-sort]) > tr { display: table-row; }
    .mill-table.mill-table:not(.mill-table--matrix, .mill-table--cards, .mill-table--lines, .mill-table--stacked):not(:has(tr > :nth-child(4))) > thead > tr > th, .mill-table.mill-table:not(.mill-table--matrix, .mill-table--cards, .mill-table--lines, .mill-table--stacked):not(:has(tr > :nth-child(4))) > thead:has(th[aria-sort]) > tr > th { display: table-cell; padding: var(--mill-space-10) var(--mill-space-12); border-bottom: var(--mill-hair) solid var(--mill-hairline); }
    .mill-table.mill-table:not(.mill-table--matrix, .mill-table--cards, .mill-table--lines, .mill-table--stacked):not(:has(tr > :nth-child(4))) > tbody { display: table-row-group; }
    .mill-table.mill-table:not(.mill-table--matrix, .mill-table--cards, .mill-table--lines, .mill-table--stacked):not(:has(tr > :nth-child(4))) > tbody > tr { display: table-row; padding: 0; }
    .mill-table.mill-table:not(.mill-table--matrix, .mill-table--cards, .mill-table--lines, .mill-table--stacked):not(:has(tr > :nth-child(4))) > tbody > tr > td, .mill-table.mill-table:not(.mill-table--matrix, .mill-table--cards, .mill-table--lines, .mill-table--stacked):not(:has(tr > :nth-child(4))) > tbody > tr > td:first-child { display: table-cell; padding: var(--mill-space-8) var(--mill-space-12); border-bottom: var(--mill-hair) solid var(--mill-hairline-soft); font-weight: inherit; color: inherit; }
    .mill-table.mill-table:not(.mill-table--matrix, .mill-table--cards, .mill-table--lines, .mill-table--stacked):not(:has(tr > :nth-child(4))) > tbody > tr > td::before { content: none; }
    .mill-table.mill-table:not(.mill-table--matrix, .mill-table--cards, .mill-table--lines, .mill-table--stacked):not(:has(tr > :nth-child(4))) > tbody > tr > td:empty { display: table-cell; }
    .mill-table.mill-table:not(.mill-table--matrix, .mill-table--cards, .mill-table--lines, .mill-table--stacked):not(:has(tr > :nth-child(4))) > tbody > tr.group > td { font-weight: var(--mill-weight-medium); color: var(--mill-heading); }
    .mill-table.mill-table:not(.mill-table--matrix, .mill-table--cards, .mill-table--lines, .mill-table--stacked):not(:has(tr > :nth-child(4))) > tbody > tr.total > td { border-top: var(--mill-hair) solid var(--mill-text); font-weight: var(--mill-weight-medium); }
    .mill-table.mill-table:not(.mill-table--matrix, .mill-table--cards, .mill-table--lines, .mill-table--stacked):not(:has(tr > :nth-child(4))) :is(td, th).num { text-align: right; }
    .mill-table.mill-table:not(.mill-table--matrix, .mill-table--cards, .mill-table--lines, .mill-table--stacked):not(:has(tr > :nth-child(4))) > tbody > tr:last-child > td { border-bottom: 0; }
    .mill-table.mill-table:not(.mill-table--matrix, .mill-table--cards, .mill-table--lines, .mill-table--stacked):not(:has(tr > :nth-child(4))) :is(td, th).num { white-space: nowrap; }
  }


/* --stacked: on a phone a row becomes the set's stacked row (Richard, 10-nov-2026, Canvas
   mill-table, "a phone stacked"). The tool marks each cell with data-stack: id and state share
   the top line, title is the row's name in heading ink, facts follow on one wrapping line with a
   dot between. A cell without data-stack stays off the phone. On a desk it is the plain table.
   The plain stacking above stays the default; --stacked is the second phone form. */

  @media (max-width: 820px) {
    .mill-table.mill-table--stacked:not(.mill-table--matrix) > thead { display: none; }
    .mill-table.mill-table--stacked:not(.mill-table--matrix) > tbody > tr { display: flex; flex-wrap: wrap; align-items: baseline;
              padding: var(--mill-space-10) var(--mill-space-12); }
    .mill-table.mill-table--stacked:not(.mill-table--matrix) > tbody > tr > td { padding: 0; }
    .mill-table.mill-table--stacked:not(.mill-table--matrix) > tbody > tr > td:not([data-stack]) { display: none; }
    .mill-table.mill-table--stacked:not(.mill-table--matrix) td[data-stack="id"] { order: 1; flex: 1 1 auto;
              font: var(--mill-weight) var(--mill-text-sm)/var(--mill-leading-xs) var(--mill-mono); color: var(--mill-secondary); }
    .mill-table.mill-table--stacked:not(.mill-table--matrix) td[data-stack="state"] { order: 2; flex: none; }
    .mill-table.mill-table--stacked:not(.mill-table--matrix) td[data-stack="title"] { order: 3; flex: 0 0 100%; margin: var(--mill-space-4) 0;
              color: var(--mill-heading); font-weight: var(--mill-weight-medium); overflow-wrap: anywhere; }
    .mill-table.mill-table--stacked:not(.mill-table--matrix) td[data-stack="facts"] { order: 4; font-size: var(--mill-text-sm);
              line-height: var(--mill-leading-xs); color: var(--mill-secondary); }
    .mill-table.mill-table--stacked:not(.mill-table--matrix) td[data-stack="facts"]:not(:empty) ~ td[data-stack="facts"]:not(:empty)::before {
              content: "\00B7"; margin: 0 var(--mill-space-6); }
  }


/* --cards: on a phone each row is a small card (Richard, 7-nov-2026, New proposed
   "table-cards", A; he took it instead of B, "each row two lines", the same day).
   A picture cell (mill-table__media) leads the card on the transparency chequer;
   the cell with no data-label is its title; every labelled cell is its label
   in front of its value. On a desk it is the plain table. A tool writes only the class: mill.js gives
   every cell after the title its column's head as data-label, unless the tool
   labelled it. --lines is the same part under B's name, kept so markup written
   for B still draws. */

  @media (max-width: 820px) {
    /* the cards sit inside the table's own white plane, 16 inside its hairline (Richard accepted
       cards-in-plane-phone, 14-nov-2026, SPIN-040; replaces "the table gives up its plane") */
    .mill-table:is(.mill-table--cards, .mill-table--lines) { display: block; background: var(--mill-surface);
              border: var(--mill-hair) solid var(--mill-hairline); border-radius: var(--mill-radius); padding: var(--mill-space-16); }
    /* one box: inside that plane a row has no frame of its own; rows are parted by a soft hairline
       (Richard, 15-nov-2026, answer "One box" on SPIN-042 and "unnecessary double nesting" on SPIN-044) */
    .mill-table:is(.mill-table--cards, .mill-table--lines) > tbody { display: flex; flex-direction: column; gap: 0; }
    .mill-table:is(.mill-table--cards, .mill-table--lines) > tbody > tr { padding: var(--mill-space-12) 0; background: none;
              border: 0; border-radius: 0; }
    .mill-table:is(.mill-table--cards, .mill-table--lines) > tbody > tr + tr { border-top: var(--mill-hair) solid var(--mill-hairline-soft); }
    .mill-table:is(.mill-table--cards, .mill-table--lines) > tbody > tr:last-child { border-bottom: 0; }
    .mill-table:is(.mill-table--cards, .mill-table--lines) > tbody > tr > td.mill-table__media { width: auto; padding: 0 0 var(--mill-space-10); }
    .mill-table:is(.mill-table--cards, .mill-table--lines) > tbody > tr > td.mill-table__media .mill-chequer { width: 100%; height: 96px; }
    .mill-table:is(.mill-table--cards, .mill-table--lines) > tbody > tr > td.mill-table__media img { max-width: 70%; max-height: 64px; }
    .mill-table:is(.mill-table--cards, .mill-table--lines) > tbody > tr > td:not([data-label]):not(.mill-table__media) { padding-bottom: var(--mill-space-6);
              color: var(--mill-heading); font-weight: var(--mill-weight-medium); }
    .mill-table:is(.mill-table--cards, .mill-table--lines) > tbody > tr > td:not([data-label]) .mill-dim { font-weight: var(--mill-weight); }
    /* the column name on its own line above the value; the value takes the card's full width
       and a long one breaks inside the card (Richard, 10-nov-2026, cards-label-above-phone
       FMIL-261, replacing the 120px column of table-label-third). A long column name wraps onto
       a second line, never an ellipsis (Richard, 12-nov-2026, card-label-wraps-phone OPPO-083) */
    .mill-table:is(.mill-table--cards, .mill-table--lines) > tbody > tr > td[data-label] { display: block; padding: 0 0 var(--mill-space-10); }
    .mill-table:is(.mill-table--cards, .mill-table--lines) > tbody > tr > td[data-label]:not([data-label=""]):not([data-mill-acts]) { overflow-wrap: anywhere; }
    .mill-table:is(.mill-table--cards, .mill-table--lines) > tbody > tr > td[data-label]:last-child { padding-bottom: 0; }
    /* a value in code letters (a path, a script) keeps one line and ends in an ellipsis at the
       card edge; ordinary text still breaks (Richard, 10-nov-2026, cards-mono-ellipsis-phone BACK-053) */
    .mill-table:is(.mill-table--cards, .mill-table--lines) > tbody > tr > td[data-label].mill-mono:not([data-label=""]):not([data-mill-acts]) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
    /* the column name runs in front of its value in plain grey, Client: Blue Accountants, and a
       long name or value wraps inside the card (Richard accepted cards-label-beside-phone,
       14-nov-2026, BACK-089/090/091, replacing the label-above look of cards-label-above-phone) */
    /* a named line stands 4px above the next, like the other lines (Richard accepted
       card-labelled-lines-4-phone, 15-nov-2026, SPIN-040, BACK-089/090; was 6) */
    .mill-table:is(.mill-table--cards, .mill-table--lines) > tbody > tr > td[data-label]:not([data-mill-acts]) { padding-bottom: var(--mill-space-4); }
    .mill-table:is(.mill-table--cards, .mill-table--lines) > tbody > tr > td[data-label]:not([data-mill-acts]):last-child { padding-bottom: 0; }
    /* a card's lines without a column name stand 4px apart, and the card keeps 14 under the last one
       (Richard accepted card-lines-4-phone, 15-nov-2026, SPIN-043/044) */
    .mill-table:is(.mill-table--cards, .mill-table--lines) > tbody > tr > td[data-label=""]:not([data-mill-acts]) { padding-bottom: var(--mill-space-4); }
    .mill-table:is(.mill-table--cards, .mill-table--lines) > tbody > tr > td[data-label=""]:not([data-mill-acts]):last-child { padding-bottom: 0; }
    .mill-table:is(.mill-table--cards, .mill-table--lines) > tbody > tr:has(> td[data-label=""]:not([data-mill-acts]):last-child) { padding-bottom: var(--mill-space-14); }
    .mill-table:is(.mill-table--cards, .mill-table--lines) > tbody > tr > td[data-label]::before { content: attr(data-label) ": "; display: inline;
              margin: 0; font-family: inherit; font-size: inherit;
              letter-spacing: normal; text-transform: none; color: var(--mill-muted); }
    /* what mill.js marks: a cell with nothing to say leaves the card, a column with
       no head shows no "label:", and a cell of controls (Edit, Delete) is a row of
       buttons at the foot of the card */
    .mill-table:is(.mill-table--cards, .mill-table--lines) > tbody > tr > td[data-label][data-mill-blank] { display: none; }
    .mill-table:is(.mill-table--cards, .mill-table--lines) > tbody > tr > td[data-label=""]::before,
    .mill-table:is(.mill-table--cards, .mill-table--lines) > tbody > tr > td[data-label][data-mill-acts]::before { content: none; }
    .mill-table:is(.mill-table--cards, .mill-table--lines) > tbody > tr > td[data-label][data-mill-acts] { display: flex; flex-wrap: wrap;
              align-items: center; gap: var(--mill-space-8); padding-top: 3px; }
    /* (padding-top 3px: the button line stands 3px under the line above it, Richard,
       15-nov-2026, accepted card-acts-gap-phone, SPIN-040; was 6px) */
    /* the card's controls line up at its right edge (Richard, 10-nov-2026,
       cards-open-button-phone, SPIN-039) */
    .mill-table:is(.mill-table--cards, .mill-table--lines) > tbody > tr > td[data-label][data-mill-acts] { justify-content: flex-end; }
  }


/* A row's actions (three or more) are icon buttons of the set on one line that never
   wraps, the name as tooltip and screen-reader label; on a phone they sit at the foot
   of the card as before (Richard, 9-nov-2026, accepted New proposed table-acts-icons,
   Threads Admin > Channels, THRE-056). */

  @media (min-width: 821px) {
    .mill-table > tbody > tr > td[data-mill-acts] > .mill-row { flex-wrap: nowrap; gap: var(--mill-space-6); }
  }


/* On a desk the buttons at the end of a table row stand on one line, 6px apart: a button
   that posts lives in its own small form, which otherwise falls under the link. Inline boxes, not floats: a
   narrow cell (Perch's 1200 view) wrapped floated buttons; mill.js drops the space between them (Richard,
   13-nov-2026, accepted New proposed acts-one-line-desk, Ledger /contacts, BACK-041). */

  @media (min-width: 821px) {
    .mill-table > tbody > tr > td[data-mill-acts] { white-space: nowrap; }
    .mill-table > tbody > tr > td[data-mill-acts] > :is(.mill-btn, form) { display: inline-flex; vertical-align: top; margin: 0; }
    /* in a row that holds an input its buttons read on the input text line too (table-row-control-line, Richard 14-nov-2026, REFE-199) */
    .mill-table > tbody > tr:has(> td > :is(input, select, textarea, .mill-input, .mill-select)) > td[data-mill-acts] > :is(.mill-btn, form) { vertical-align: baseline; }
    .mill-table > tbody > tr > td[data-mill-acts] > :is(.mill-btn, form) + :is(.mill-btn, form) { margin-left: var(--mill-space-6); }
  }


/* On a desk the buttons at the end of a table row end at the row's right edge (Richard,
   17-nov-2026, accepted New proposed acts-end-desk, Ledger /contacts, BACK-103). */

  @media (min-width: 821px) {
    .mill-table > tbody > tr > td[data-mill-acts] { text-align: right; }
  }


/* An icon button in a table row sits on the row's first line: on a desk the icon cell
   loses its padding and the text cells start their first line half the difference
   between the 48 box and the text line down, so every mark and first line share one
   middle (Richard, 10-nov-2026, accepted New proposed table-icon-first-line, OPPO-052). */

  @media (min-width: 821px) {
    .mill-table > tbody > tr:has(> td > .mill-btn--icon) > td:not(:has(> .mill-btn--icon)) { padding-top: calc((var(--mill-icon-btn) - 1lh) / 2); }
    .mill-table > tbody > tr > td:has(> .mill-btn--icon) { padding-block: 0; line-height: 0; }
  }

/* A small button in a table row sits on the row's first line: on a desk the text cells of a row that
   holds a small button start their first line so it shares one middle with the 26 button; the row keeps
   its height and a wrapping cell grows downward. Phone cards unchanged (Richard, 14-nov-2026, accepted
   New proposed table-small-btn-first-line, SPIN-030). */

  @media (min-width: 821px) {
    .mill-table > tbody > tr:has(> td > .mill-btn--small) > td:not(:has(> .mill-btn--small)) { padding-top: calc(var(--mill-space-8) + (26px - 1lh) / 2); }
  }


/* a table inside a panel has no frame of its own: the panel is its plane, and its first and last
   columns line up with the panel's title. A table on the ground keeps its plane (Richard, 15-nov-2026,
   accepted table-in-panel-no-plane, Ledger /finance/deadlines and /finance/reminders, BACK-065/066) */

  .mill-surface .mill-table:not(.mill-table--cards, .mill-table--lines) { border: 0; border-radius: 0; background: transparent; }
  .mill-surface .mill-table:not(.mill-table--cards, .mill-table--lines) > :is(thead, tbody) > tr > :first-child { padding-left: 0; }
  .mill-surface .mill-table:not(.mill-table--cards, .mill-table--lines) > :is(thead, tbody) > tr > :last-child { padding-right: 0; }
  /* an opened row's detail is one cell across the table, not a column: it keeps its inset on the
     sunken ground, and a table inside it takes that ground for its head and the plain hairline for
     its rows, which the soft one vanishes on (Richard, 23-nov-2026, Perch's folds) */
  .mill-surface .mill-table > tbody > tr.mill-table__detail > td:first-child:last-child { padding: var(--mill-space-12); }
  .mill-table__detail .mill-table thead th { background: var(--mill-surface-sunk); }
  .mill-table__detail .mill-table tr:not(:last-child) > td { border-bottom: var(--mill-hair) solid var(--mill-hairline); }   /* the outer last row is not the inner one */
  /* on a desk a card table is the plain table, so in a panel it drops its frame too
     (Richard, 16-nov-2026, Ledger dashboard Active deals, BACK-097) */
  @media (min-width: 821px) {
    .mill-surface .mill-table:is(.mill-table--cards, .mill-table--lines) { border: 0; border-radius: 0; background: transparent; }
    .mill-surface .mill-table:is(.mill-table--cards, .mill-table--lines) > :is(thead, tbody) > tr > :first-child { padding-left: 0; }
    .mill-surface .mill-table:is(.mill-table--cards, .mill-table--lines) > :is(thead, tbody) > tr > :last-child { padding-right: 0; }
  }
  @media (max-width: 820px) {
    .mill-surface .mill-table:not(.mill-table--cards, .mill-table--lines) > tbody > tr { padding-left: 0; padding-right: 0; }
    /* phone cards inside a panel drop their own box too: the panel is their plane and the cards line
       up with its title; cards on the grey ground keep theirs (Richard accepted
       cards-in-panel-no-plane-phone, 15-nov-2026, BACK-091/092) */
    .mill-surface .mill-table:is(.mill-table--cards, .mill-table--lines) { border: 0; border-radius: 0; background: transparent; padding: 0; }
  }


/* ===== 45-content.css ================================================== */
/* Mill · CONTENT — parts for rendered content the tools were each drawing
   alone: code, quotes, option cards, swatches, tints, headings on a surface.
   Added 3-nov-2026 under the corrected assignment (Richard): every leftover
   either uses a part, merges into one, or becomes one — redrawn to the
   language, never lifted as-is. */


  /* --- code: one dark surface for every tool that shows code -------------
     Merged from Threads' .code-block/.inline-code and Patterns' .bx-code/
     .sv-lines. Dark on purpose: code is the one content kind that keeps its
     own ground, and both tools had independently chosen a dark one. */
  .mill-code { background: var(--mill-code-ground); border: var(--mill-hair) solid var(--mill-hairline);
              border-radius: var(--mill-radius); overflow: hidden; }
  .mill-code__head { display: flex; justify-content: space-between; align-items: center;
              gap: var(--mill-space-8); padding: var(--mill-space-4) var(--mill-space-10);
              background: var(--mill-code-head); color: var(--mill-nav-faint);
              font-size: var(--mill-text-sm);
              border-bottom: var(--mill-hair) solid var(--mill-code-edge); }
  .mill-code pre, .mill-code__body { margin: 0; padding: var(--mill-space-10) var(--mill-space-12);
              overflow: auto; font-family: var(--mill-mono); font-size: var(--mill-text-sm);
              line-height: 1.5; color: var(--mill-code-ink); white-space: pre; }
  .mill-code--light { background: var(--mill-ground); }
  .mill-code--light pre, .mill-code--light .mill-code__body { color: var(--mill-text); }
  .mill-code--wrap pre, .mill-code--wrap .mill-code__body { white-space: pre-wrap; word-break: break-word; }
  .mill-code__add { display: block; color: var(--mill-code-add); }
  .mill-code__del { display: block; color: var(--mill-code-del); }
  .mill-code--light .mill-code__add { color: var(--mill-ok-ink); background: #F1F9F4; }
  .mill-code--light .mill-code__del { color: var(--mill-bad-ink); background: #FDECEC; }
  .mill-codespan { font-family: var(--mill-mono); font-size: var(--mill-text-sm);
              background: var(--mill-surface-sunk); border-radius: var(--mill-radius);
              padding: 0 var(--mill-space-4); }

  /* --- quote: cited text behind a left rule --------------------------------
     Four tools drew it (.premise, .quote, .ess-quote, .feat-brief). */
  .mill-quote { border-left: var(--mill-hair) solid var(--mill-hairline);
              padding-left: var(--mill-space-14); margin: 0 0 var(--mill-space-14);
              color: var(--mill-text); line-height: 1.55; max-width: 72ch; }
  .mill-quote .mill-dim, .mill-quote cite { color: var(--mill-muted); font-style: normal; }
  /* the accent quote: a 3px orange rule, 10 in, full width (Richard, 12-nov-2026, accepted
     quote-accent, COMP-130) */
  .mill-quote--accent { border-left: 3px solid var(--mill-primary); padding-left: var(--mill-space-10); margin: 0; max-width: none; line-height: inherit; }

  /* --- option: a choice as a boxed card (radio/checkbox + title + line) ----
     Merged from the board's label.feat-opt, Patterns' .rm-mode-opt and the
     Ledger's framed choices. */
  .mill-option { margin: 0;   /* a host's label margin never spaces the options: the list's gap does (9-nov-2026) */
              display: grid; grid-template-columns: auto 1fr; gap: 2px var(--mill-space-10);
              align-items: baseline; padding: var(--mill-space-8) var(--mill-space-12);
              border: var(--mill-hair) solid var(--mill-hairline);
              border-radius: var(--mill-radius); cursor: pointer;
              font-weight: var(--mill-weight); background: var(--mill-surface); }
  .mill-option input { margin: 0; accent-color: var(--mill-primary); }
  .mill-option__title { grid-column: 2; grid-row: 1; font-size: var(--mill-text-lg);
              font-weight: var(--mill-weight-medium); color: var(--mill-heading); }
  .mill-option__line { grid-column: 2; grid-row: 2; font-size: var(--mill-text-sm);
              color: var(--mill-secondary); }
  .mill-option--on, .mill-option:has(input:checked) { border-color: var(--mill-primary);
              background: var(--mill-active-ground); }
  .mill-options { display: grid; gap: var(--mill-space-8);   /* FMIL-199 */ border: 0; margin: 0; padding: 0; }

  /* --- swatch: a colour shown honestly (checkerboard behind translucency) -- */
  .mill-swatch { position: relative; width: 16px; height: 16px; flex: none;
              border-radius: var(--mill-radius);
              border: var(--mill-hair) solid var(--mill-hairline); overflow: hidden;
              background: repeating-conic-gradient(var(--mill-chequer-ink, var(--mill-hairline)) 0% 25%, var(--mill-surface) 0% 50%)
                          0 0 / var(--mill-chequer-size, 8px) var(--mill-chequer-size, 8px); }
  .mill-swatch i, .mill-swatch > span { display: block; width: 100%; height: 100%; }
  .mill-swatch--lg { width: 28px; height: 28px; }

  /* --- transparency ground: the swatch's chequer as a ground of its own -----
     Behind any picture that may be transparent (a lock-up's plate, a thumb, a
     stage page), so an empty part reads as empty and a white backing shows as
     white. One ground only: 7px squares in the soft hairline, the plate's, the
     one Patterns' Essentials drew before the set had it (Richard, REFE-141,
     6-nov-2026: a transparent PNG on a flat ground looks like a white one;
     FMIL-346, 16-nov-2026: "we only need one, Plate, large"). --large is kept
     so markup written for it still draws; it adds nothing. */
  .mill-chequer { background: repeating-conic-gradient(var(--mill-chequer-ink, var(--mill-hairline-soft)) 0% 25%, var(--mill-surface) 0% 50%)
                          0 0 / var(--mill-chequer-size, 14px) var(--mill-chequer-size, 14px); }

  /* --- categorical tint: a mark filled from the category colours ----------
     For data categories (sources, layers, kinds) that need more than ok/warn/
     bad. A FILL only: six of the twelve read under 3 to 1 on white and the
     yellow 1.5, so a category colour is never text (6-nov-2026). Put it on a
     dot, a bar or a swatch; the word beside it stays in the text colours. */
  .mill-tint-1 { background-color: var(--mill-cat-1); }  .mill-tint-2 { background-color: var(--mill-cat-4); }
  .mill-tint-3 { background-color: var(--mill-cat-6); }  .mill-tint-4 { background-color: var(--mill-cat-7); }
  .mill-tint-5 { background-color: var(--mill-cat-11); } .mill-tint-6 { background-color: var(--mill-cat-12); }

  /* --- the working dot: a state that is in motion -------------------------- */
  .mill-status--working { color: var(--mill-ok-ink); }
  .mill-status--working::before { animation: mill-pulse 1.6s ease-in-out infinite; }

  /* --- a heading written bare inside a surface or panel --------------------
     Every tool writes <h2> inside its cards; the set owns what it looks like. */
  .mill-surface > h2, .mill-card > h2, .mill-panel__body > h2,
  .mill-surface > h3, .mill-panel__body > h3 {
              font: var(--mill-weight-medium) var(--mill-text-lg)/var(--mill-leading-md) var(--mill-sans);
              color: var(--mill-heading); margin: 0 0 var(--mill-space-12); }

  /* --- totals: the money block under a table of lines ---------------------- */
  .mill-totals { margin-top: var(--mill-space-16); max-width: 360px; margin-left: auto;
              border-top: var(--mill-hair) solid var(--mill-hairline);
              padding-top: var(--mill-space-12); }
  .mill-totals__row { display: flex; justify-content: space-between;
              padding: var(--mill-space-4) 0; font-variant-numeric: tabular-nums; }
  .mill-totals__row--grand { border-top: var(--mill-hair) solid var(--mill-text);
              margin-top: var(--mill-space-4); padding-top: var(--mill-space-8);
              font-weight: var(--mill-weight-medium); font-size: var(--mill-text-lg); }

  /* --- form rhythm: the set owns the space between fields ------------------
     Field groups and field rows stacked in any wrapper keep their distance;
     two groups standing side by side INSIDE a row keep their line
     (Richard, 4-nov-2026, the Ledger settings page). */
  :where(:not(.mill-fieldrow):not(.mill-cols):not(.mill-row):not(.mill-actions):not(.mill-exportstrip)) >
    .mill-fieldgroup + .mill-fieldgroup { margin-top: var(--mill-gap-form); }
  .mill-fieldrow + .mill-fieldrow, .mill-fieldrow + .mill-fieldgroup,
  .mill-fieldgroup + .mill-fieldrow { margin-top: var(--mill-gap-form); }
  .mill-fieldgroup + .mill-actions, .mill-fieldrow + .mill-actions,
  .mill-options + .mill-actions { margin-top: var(--mill-gap-form); }
  /* in a panel body (flex, gap 14) every field stands 20px from the next
     (Richard, 9-nov-2026, form-gap-20, COMP-137) */
  .mill-panel__body > :is(.mill-fieldgroup, .mill-fieldrow) + :is(.mill-fieldgroup, .mill-fieldrow, .mill-actions) {
              margin-top: calc(var(--mill-gap-form) - var(--mill-space-14)); }

  /* --- bare markup inside parts: the set owns what it looks like ----------- */
  .mill-fieldgroup > label, .mill-fieldgroup > legend { display: block;
              font: var(--mill-weight) var(--mill-text-sm)/var(--mill-leading-xs) var(--mill-sans);
              color: var(--mill-secondary); margin-bottom: var(--mill-space-4); padding: 0; }
  /* check-first-line: a checkbox row in a field group stays a row */
  .mill-fieldgroup > label.mill-check { display: flex; }
  .mill-kv > dt { font: var(--mill-weight) var(--mill-text-sm)/var(--mill-leading-sm) var(--mill-sans);
              color: var(--mill-secondary); padding-top: 2px; }
  .mill-kv > dd { margin: 0; overflow-wrap: anywhere; }
  dl.mill-kv, .mill-kv dl, .mill-kv dd { margin: 0; }
  .mill h2 { font: var(--mill-weight-medium) var(--mill-text-lg)/var(--mill-leading-md) var(--mill-sans);
              color: var(--mill-heading); margin: 0 0 var(--mill-space-12); }
  .mill h3 { font: var(--mill-weight-medium) var(--mill-text-base)/var(--mill-leading-sm) var(--mill-sans);
              color: var(--mill-heading); margin: 0 0 var(--mill-space-8); }
  /* the page scripts across the fleet mark an open seg item with .active or
     .on; the set accepts both, the same grace the rail already gives. */
  .mill-seg__item.active, .mill-seg__item.on { background: var(--mill-active-ground);
              color: var(--mill-heading); font-weight: var(--mill-weight-medium); }
  .mill-seg--quiet .mill-seg__item.active, .mill-seg--quiet .mill-seg__item.on {
              --mill-seg-line: var(--mill-primary);
              background: linear-gradient(var(--mill-seg-line), var(--mill-seg-line)) left bottom / 100% 2px no-repeat; }
  /* the switch works from a real checkbox, no script needed */
  .mill-switch > input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
  .mill-switch:has(> input:checked) .mill-switch__track { justify-content: flex-end;
              background: var(--mill-active-ground); border-color: var(--mill-primary); }
  .mill-switch:has(> input:checked) .mill-switch__knob { background: var(--mill-primary); }
  /* emphasis and wrapping, said once */
  .mill-strong { font-weight: var(--mill-weight-medium); color: var(--mill-heading); }
  .mill-nowrap { white-space: nowrap; }
  /* a card whose first child is a lead column (an icon, a score): row, not stack */
  .mill-card--row { flex-direction: row; align-items: flex-start; gap: var(--mill-space-14); }

  /* a rowcard that is the open one (a deal, a message, a pick) */
  .mill-rowcard--on { background: var(--mill-active-ground); border-color: var(--mill-primary); }
  /* a bare input or select inside a table takes the cell-field look */
  .mill-table input:not([type="checkbox"]):not([type="radio"]):not([class]),
  .mill-table select:not([class]) { font: inherit; height: 26px;
              padding: 0 var(--mill-space-6);
              border: var(--mill-hair) solid var(--mill-hairline);
              border-radius: var(--mill-radius);
              background-color: var(--mill-surface); color: var(--mill-text);
              --mill-select-inset: var(--mill-space-6); }

  /* the one-line empty state inside a card or lane; the boxed one is .mill-empty */
  .mill-empty--line { padding: var(--mill-space-16) 0; color: var(--mill-secondary); }
  .mill-fieldgroup--short { max-width: 200px; }
  .mill-page__head h1 { font: var(--mill-weight-strong) var(--mill-text-xl)/var(--mill-leading-xl) var(--mill-display);
              color: var(--mill-heading); margin: 0; }
  .mill-stack > h2 { font: var(--mill-weight-medium) var(--mill-text-lg)/var(--mill-leading-md) var(--mill-sans);
              color: var(--mill-heading); margin: 0; }
  .mill-mono { font-family: var(--mill-mono); }

  /* --- chip gains its remove control (keyword lists, filters) --------------
     An icon on its own, so the icon rule: a 24 mark in a 48 hit area (Richard,
     7-nov-2026, on Spindle's posting slots). The mark is drawn by the set, so a
     tool's own character (&times;) stays in the markup for a screen reader and is
     not painted; the 24 box sits on the 20 chip by giving 2px back above and
     below, and the 48 hit area reaches past the chip's edge without growing it. */
  .mill-chip__x { position: relative; display: inline-flex; flex: none;
              width: var(--mill-icon); height: var(--mill-icon);
              margin: calc(-1 * var(--mill-space-2)) calc(-1 * var(--mill-space-6)) calc(-1 * var(--mill-space-2)) 0;
              padding: 0; border: 0; background: none; cursor: pointer;
              color: var(--mill-muted); font-size: var(--mill-text-sm); line-height: 1;
              -webkit-text-fill-color: transparent; overflow: visible; }
  .mill-chip__x::before { content: ""; position: absolute; inset: 0; background: currentColor;
              -webkit-mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M8 8l8 8M16 8l-8 8'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
                      mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M8 8l8 8M16 8l-8 8'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
  .mill-chip__x::after { content: ""; position: absolute; left: 50%; top: 50%;
              width: var(--mill-icon-btn); height: var(--mill-icon-btn); transform: translate(-50%, -50%); }
  .mill-chip__x:hover { color: var(--mill-bad); }
  /* a chip that is a control (an added keyword): control corners, hairline */
  .mill-chip--control { background: var(--mill-surface);
              border: var(--mill-hair) solid var(--mill-hairline); height: 24px; }


/* Taken in from the Proposals tab as suggested (Richard, 6-nov-2026).
   Each is drawn on the Display page. */

  /* --- message (C03): initials, name and time on one line, the text under -- */
  .mill-msg { display: flex; align-items: flex-start; gap: var(--mill-space-12);
              padding: var(--mill-space-12);   /* 12 between the items, Richard 9-nov-2026, FMIL-196 */
              border-bottom: var(--mill-hair) solid var(--mill-hairline-soft); }
  .mill-msg:last-child { border-bottom: 0; }
  /* a decision or a needs-you message carries the amber edge */
  .mill-msg.mill-edge { padding-left: calc(var(--mill-space-12) + 3px); }   /* 12 from the 3px edge, FMIL-196 */
  .mill-msg__body { flex: 1 1 auto; min-width: 0; }
  .mill-msg__head { display: flex; align-items: center; flex-wrap: wrap; gap: var(--mill-space-8); }
  .mill-msg__name { color: var(--mill-heading); font-weight: var(--mill-weight-medium); }
  .mill-msg__time { font: var(--mill-weight) var(--mill-text-sm)/var(--mill-leading-xs) var(--mill-mono);
              color: var(--mill-secondary); }
  .mill-msg__text { margin-top: var(--mill-space-2); overflow-wrap: anywhere; }
  /* messages in a list are boxes of their own, 12px apart: they never touch
     (Richard, 10-nov-2026, FMIL-196) */
  .mill-list:has(> .mill-msg) { display: flex; flex-direction: column; gap: var(--mill-space-12);
              background: none; border: 0; border-radius: 0; overflow: visible; }
  .mill-list > .mill-msg { background: var(--mill-surface); overflow: hidden;
              border: var(--mill-hair) solid var(--mill-hairline); border-radius: var(--mill-radius); }
  /* a tinted message keeps its tint inside its box (Richard, 12-nov-2026, accepted
     msg-box-keeps-tint, THRE-023) */
  .mill-list > .mill-msg.mill-edge--tint { background: var(--mill-hover-accent); }

  /* --- day divider (C04): the day in small capitals on the hairline -------- */
  .mill-daydiv { display: flex; align-items: center; gap: var(--mill-space-12);
              font: var(--mill-weight) var(--mill-text-2xs)/var(--mill-leading-2xs) var(--mill-mono);
              letter-spacing: var(--mill-track-wider); text-transform: uppercase; color: var(--mill-muted); }
  .mill-daydiv::before, .mill-daydiv::after { content: ""; flex: 1 1 auto;
              height: var(--mill-hair); background: var(--mill-hairline); }

  /* --- key cap (C81): inline code with a hairline, so it reads as a key ----
     .mill-keycap, not .mill-key: that name is the chart legend's. */
  .mill-keycap { display: inline-block; padding: 0 var(--mill-space-4);
              font: var(--mill-weight) var(--mill-text-sm)/var(--mill-leading-xs) var(--mill-mono);
              color: var(--mill-text); background: var(--mill-surface-sunk);
              border: var(--mill-hair) solid var(--mill-hairline); border-bottom-width: 2px;
              border-radius: var(--mill-radius); }

  /* --- code editor (C11): the code frame, light, with a file head ----------- */
  .mill-code__name { font-family: var(--mill-mono); }
  .mill-code__ln { color: var(--mill-muted); user-select: none; }
  /* buttons on a dark ground (.mill-dark, the code head): primary white, default
     outlined in white, danger red, disabled faded; quiet is text on a desk and
     gets the white outline on a phone, where no hover shows it is a button
     (Richard accepted buttons-on-dark, 9-nov-2026, FMIL-198) */
  .mill-dark, .mill-code__head { --mill-btn-focus: #FFFFFF; }
  :is(.mill-dark, .mill-code__head) .mill-btn { --mill-btn-bg: transparent; --mill-btn-edge: rgba(255,255,255,.55); --mill-btn-ink: #FFFFFF; }
  :is(.mill-dark, .mill-code__head) .mill-btn--primary { --mill-btn-bg: #FFFFFF; --mill-btn-edge: #FFFFFF; --mill-btn-ink: var(--mill-nav); }
  :is(.mill-dark, .mill-code__head) .mill-btn--danger { --mill-btn-bg: var(--mill-bad-ink); --mill-btn-edge: var(--mill-bad-ink); --mill-btn-ink: #FFFFFF; }
  :is(.mill-dark, .mill-code__head) .mill-btn--quiet { --mill-btn-bg: transparent; --mill-btn-edge: transparent; --mill-btn-ink: rgba(255,255,255,.8); }
  :is(.mill-dark, .mill-code__head) .mill-btn:disabled { --mill-btn-edge: rgba(255,255,255,.25); --mill-btn-ink: rgba(255,255,255,.4); }
  @media (max-width: 820px) {
    :is(.mill-dark, .mill-code__head) .mill-btn--quiet { --mill-btn-edge: rgba(255,255,255,.55); --mill-btn-ink: #FFFFFF; }
  }
  /* in a narrow column the name wraps, the actions stay on its first line (code-head-name-wraps) */
  .mill-code__head { min-width: 0; }
  .mill-code__head > :first-child { min-width: 0; overflow-wrap: anywhere; }
  .mill-code__head > :not(:first-child) { flex: none; }

  /* --- question and answer (C44) ------------------------------------------- */
  .mill-qa { display: flex; flex-direction: column; gap: var(--mill-space-8); }
  .mill-qa__q { color: var(--mill-heading); font-weight: var(--mill-weight-medium); }
  .mill-qa__a { margin-top: var(--mill-space-4); color: var(--mill-secondary); }
  .mill-qa__rule { height: var(--mill-hair); border: 0; margin: var(--mill-space-4) 0;
              background: var(--mill-hairline-soft); }
  .mill-qa__ask { display: flex; align-items: center; gap: var(--mill-space-8); }
  .mill-qa__ask > .mill-field { flex: 1 1 auto; width: auto; min-width: 0; }

  /* --- decision (C28): needs-you on top, the question, answers, the why ---- */
  .mill-decision { padding: var(--mill-space-16); background: var(--mill-surface);
              border: var(--mill-hair) solid var(--mill-hairline); border-radius: var(--mill-radius); }
  .mill-decision > * + * { margin-top: var(--mill-space-12); }
  .mill-decision > .mill-fold { margin-top: var(--mill-space-8); }


/* ===== 50-overlays.css ================================================= */
/* Fabricaide Mill — overlays.
   Everything that sits above the page: the panel (one head/body/foot used by
   both the modal and the drawer), the menu, the tooltip, the confirm and the
   command palette. The scrim lives in 30-navigation; it is the same scrim.
   One shadow, one radius, one hairline — an overlay is a surface that floats,
   not a second visual language. */


  /* --- the panel: shared structure, two outer shapes ------------------------ */
  .mill-panel { display: flex; flex-direction: column;
              background: var(--mill-surface); }
  .mill-panel__head { display: flex; align-items: center; gap: var(--mill-space-10);
              height: 48px; flex: none; padding: 0 var(--mill-pad-panel);
              border-bottom: var(--mill-hair) solid var(--mill-hairline); }
  .mill-panel__title { font-family: var(--mill-display); font-size: var(--mill-text-lg);
              line-height: var(--mill-leading-lg); font-weight: var(--mill-weight-strong);
              color: var(--mill-heading); }
  .mill-panel__kicker { font-family: var(--mill-mono); font-size: var(--mill-text-2xs);
              line-height: var(--mill-leading-2xs); letter-spacing: var(--mill-track-wider);
              text-transform: uppercase; color: var(--mill-muted); }
  .mill-panel__spacer { flex: 1 1 auto; }
  /* an icon button that starts or ends a head pulls out by its 12 padding and the
     marks own 5 of air, so the ink of the X sits on the heads 24 line, not its box;
     the 48 hover square is unchanged (head-icon-optical, Richard, 9-nov-2026, FMIL-153) */
  .mill-panel__head > :is(.mill-icon--button, .mill-btn--icon):last-child { margin-right: calc(-1 * var(--mill-icon-pad, 12px) - 5px); }
  .mill-panel__head > :is(.mill-icon--button, .mill-btn--icon):first-child { margin-left: calc(-1 * var(--mill-icon-pad, 12px) - 5px); }
  /* a button's air is half its box less the mark, not the 12 of a 48 icon: on a desk the 34 close
     pulled out 17 and its X sat 18 from the edge, not on the 24 line (REFE-231) */
  .mill-panel__head > .mill-btn--icon:last-child { margin-right: calc((var(--mill-btn-h) - var(--mill-icon)) / -2 - 5px); }
  .mill-panel__head > .mill-btn--icon:first-child { margin-left: calc((var(--mill-btn-h) - var(--mill-icon)) / -2 - 5px); }
  /* the line under a dialog title: small, muted, no height of its own (panel-intro, COMP-139) */
  .mill-panel__intro { font-size: var(--mill-text-sm); line-height: var(--mill-leading-xs); color: var(--mill-muted); }
  /* the body is given the focus so the keyboard can scroll it; it is a
     viewport, not a control, so it does not wear the ring - the same call
     the shell's main pane already makes (3-nov-2026). */
  .mill-panel__body:focus, .mill-panel__body:focus-visible { outline: none; box-shadow: none; }
  .mill-panel__body { flex: 1 1 auto; padding: var(--mill-space-16) var(--mill-pad-panel); overflow: auto;
              overscroll-behavior: contain;
              display: flex; flex-direction: column; gap: var(--mill-space-14); }
  .mill-panel__foot { display: flex; align-items: center; gap: var(--mill-space-8);
              height: 56px; flex: none; padding: 0 var(--mill-pad-panel);
              border-top: var(--mill-hair) solid var(--mill-hairline);
              background: var(--mill-ground); }

  /* --- modal: a panel centred on the scrim --------------------------------- */
  .mill-modal { width: 480px; max-width: calc(100vw - var(--mill-space-28));
              max-height: calc(100vh - var(--mill-space-48));
              border: var(--mill-hair) solid var(--mill-hairline);
              border-radius: var(--mill-radius);
              box-shadow: var(--mill-shadow); overflow: hidden; }
  .mill-modal--wide { width: 720px; }
  /* A wide dialog that holds a table is 840 on a desk, so the table keeps one line per row
     (Richard, 12-nov-2026, modal-wide-table, THRE-044). A phone is unchanged. */
  @media (min-width: 821px) {
    .mill-modal--wide:has(.mill-table) { width: 840px; }
  }

  /* --- drawer: a panel pinned to one edge, no radius on the sealed side ---- */
  .mill-drawer { width: 400px; max-width: 100%;
              border-left: var(--mill-hair) solid var(--mill-hairline);
              box-shadow: var(--mill-shadow); }
  .mill-drawer--left { border-left: none;
              border-right: var(--mill-hair) solid var(--mill-hairline); }

  /* --- confirm: the modal that bites. The accent names the consequence. ---- */
  .mill-confirm { width: 400px; position: relative; }
  .mill-confirm__text { color: var(--mill-secondary); }

  /* --- menu: a list that floats -------------------------------------------- */
  /* the anchor: a menu that opens under its own button, over the flow, its
     right edge on the button's. Fabriboard and Threads each drew it; the old
     names are accepted until their markup says .mill-anchor (6-nov-2026). */
  .mill-anchor, .fb-anchor, .th-anchor { position: relative; display: inline-flex; }
  :is(.mill-anchor, .fb-anchor, .th-anchor) > .mill-menu { position: absolute; right: 0; top: 100%; z-index: 40; }
  .mill-menu { min-width: 200px; padding: var(--mill-space-4) 0;
              background: var(--mill-surface);
              border: var(--mill-hair) solid var(--mill-hairline);
              border-radius: var(--mill-radius);
              box-shadow: var(--mill-shadow); }
  .mill-menu__item { display: flex; align-items: center; gap: var(--mill-space-10);
              height: 30px; padding: 0 var(--mill-space-12);
              font-size: var(--mill-text-base); color: var(--mill-text); }
  .mill-menu__item--on { background: var(--mill-active-ground); }
  .mill-menu__item--bad { color: var(--mill-bad-ink); }
  .mill-menu__item--off { color: var(--mill-muted); }
  .mill-menu__key { margin-left: auto; font-family: var(--mill-mono);
              font-size: var(--mill-text-xs); color: var(--mill-muted); }
  .mill-menu__rule { height: var(--mill-hair); margin: var(--mill-space-4) 0;
              background: var(--mill-hairline-soft); }
  .mill-menu__label { height: var(--mill-group-label); display: flex; align-items: center;
              padding: 0 var(--mill-space-12);
              font-family: var(--mill-mono); font-size: var(--mill-text-2xs);
              letter-spacing: var(--mill-track-wider); text-transform: uppercase;
              color: var(--mill-muted); }

  /* --- tooltip: ink, never a surface. No tail; a second shape is a second
         language, and the thing it points at is already under the cursor. --- */
  .mill-tooltip { display: inline-flex; align-items: center;
              height: 22px; padding: 0 var(--mill-space-8);
              background: var(--mill-nav); border-radius: var(--mill-radius);
              font-size: var(--mill-text-sm); line-height: var(--mill-leading-xs);
              color: var(--mill-surface); white-space: nowrap; }

  /* --- command palette ------------------------------------------------------ */
  .mill-palette { width: 560px; background: var(--mill-surface);
              border: var(--mill-hair) solid var(--mill-hairline);
              border-radius: var(--mill-radius);
              box-shadow: var(--mill-shadow); overflow: hidden; }
  .mill-palette__search { display: flex; align-items: center; gap: var(--mill-space-10);
              height: var(--mill-icon-btn); padding: 0 var(--mill-space-14);
              border-bottom: var(--mill-hair) solid var(--mill-hairline); }
  /* the search field is a control: the control height in a 48 row (it was 44 with a short field) */
  .mill-palette__input { flex: 1 1 auto; height: var(--mill-control-h); border: none; background: none; padding: 0;
              font-family: var(--mill-sans); font-size: var(--mill-text-lg);
              color: var(--mill-text); }
  .mill-palette__input::placeholder { color: var(--mill-muted); }
  .mill-palette__list { padding: var(--mill-space-4) 0; max-height: 280px; overflow: auto; }
  .mill-palette__item { display: flex; align-items: center; gap: var(--mill-space-10);
              height: 34px; padding: 0 var(--mill-space-14); }
  .mill-palette__item--on { background: var(--mill-active-ground); position: relative; }
  .mill-palette__where { margin-left: auto; font-family: var(--mill-mono);
              font-size: var(--mill-text-xs); color: var(--mill-muted); }
  .mill-palette__foot { display: flex; align-items: center; gap: var(--mill-space-16);
              height: 32px; padding: 0 var(--mill-space-14);
              border-top: var(--mill-hair) solid var(--mill-hairline);
              background: var(--mill-ground);
              font-family: var(--mill-mono); font-size: var(--mill-text-xs);
              color: var(--mill-muted); }

  /* --- the stage an overlay sits on, for the board only --------------------- */
  .mill-scrimstage { position: relative; display: flex; align-items: center;
              justify-content: center; background: var(--mill-scrim);
              border-radius: var(--mill-radius); }


@media (max-width: 820px) {
  .mill-modal, .mill-confirm, .mill-palette { width: 100%; }
  .mill-drawer { width: 100%; border-left: none; }
  /* a phone control is 48, the head was 48: it grows to hold one with 8 round it */
  .mill-panel__head { height: auto; min-height: var(--mill-icon-btn);
              padding-top: var(--mill-space-8); padding-bottom: var(--mill-space-8); }
  /* a head that keeps one line stays 48, as on a desk: a title and one close (head-48-phone), or any head
     with fewer than four shown children (head-48-one-line), Richard, 10-nov-2026; its controls are 34 */
  .mill-panel__head:has(> .mill-panel__title + .mill-panel__spacer + :is(.mill-icon--button, .mill-btn--icon):last-child),
  .mill-panel__head:not(:has(> :nth-child(4 of :not([hidden], .mill-panel__spacer)))) { min-height: 48px; padding-top: 0; padding-bottom: 0; }
  .mill-panel__foot { height: auto; padding: var(--mill-space-12) var(--mill-pad-panel);
              flex-wrap: wrap; row-gap: var(--mill-space-8); }   /* a 48 button never runs off the panel (REFE-172) */
  /* a field in a panel foot takes the room beside its buttons and never wraps: upload, field and
     Send on one line (Richard, 10-nov-2026, Perch proposal foot-field-phone, THRE-022) */
  .mill-panel__foot > .mill-field { flex: 1 1 0; width: auto; min-width: 0; }
}

/* re-opened: these belong to the components layer, not to the
   phone block this file ends with. */

  /* --- state: overlays ----------------------------------------------------- */
  .mill-menu__item:hover     { background: var(--mill-hover); }
  .mill-menu__item--bad:hover{ background: var(--mill-bad-ink); color: #fff; }
  .mill-palette__item:hover  { background: var(--mill-hover); }
  .mill-drawer, .mill-modal  { transition: transform var(--mill-move) var(--mill-ease),
                                           opacity var(--mill-move) var(--mill-ease); }


  /* --- behaviour: the lightbox. Built by mill.js, styled here. ------------- */
  .mill-lightbox { position: fixed; inset: 0; z-index: 70;
              display: flex; align-items: center; justify-content: center;
              padding: var(--mill-space-48); }
  .mill-lightbox[hidden] { display: none; }
  .mill-lightbox__scrim { position: absolute; inset: 0; background: var(--mill-scrim); }
  .mill-lightbox__box { position: relative; margin: 0; max-width: 1200px; max-height: 100%;
              display: flex; flex-direction: column; overflow: hidden;
              background: var(--mill-surface); border-radius: var(--mill-radius);
              box-shadow: var(--mill-shadow); }
  .mill-lightbox__img { display: block; max-width: 100%;
              max-height: calc(100vh - 200px); object-fit: contain;
              background: var(--mill-surface-sunk); }
  .mill-lightbox__foot { display: flex; align-items: center; gap: var(--mill-space-12);
              padding: var(--mill-space-12) var(--mill-space-16);
              border-top: var(--mill-hair) solid var(--mill-hairline); }
  .mill-lightbox__cap { flex: 1 1 auto; font-size: var(--mill-text-base);
              color: var(--mill-heading); }
  .mill-lightbox__count { font-family: var(--mill-mono);
              font-size: var(--mill-text-xs); color: var(--mill-muted); }


/* re-opened: the components layer, not whatever this file ends with. */

  /* --- modifiers, 2-nov-2026 --------------------------------------------- */

  /* a band that is fixed over the app and can be dismissed, as against the
     notice that sits in the flow and cannot */
  .mill-notice--banner { position: fixed; left: 0; right: 0; top: 0; z-index: 65;
              border-radius: 0; border-left: 0; border-right: 0; border-top: 0;
              transform: translateY(-100%);
              transition: transform var(--mill-move) var(--mill-ease); }
  .mill-notice--banner[data-on] { transform: none; }
  .mill-notice__dismiss { margin-left: auto; }
  /* on a desk label, message and Dismiss share one centre line
     (Richard, 9-nov-2026, THRE-038, banner-centred) */
  @media (min-width: 821px) {
    .mill-notice--banner { align-items: center; }
    .mill-notice--banner .mill-notice__label { padding-top: 0; }
  }

  /* a menu item that is not a command but a setting, saying what it is now */
  .mill-menu__item--control { cursor: default; }
  .mill-menu__item--control:hover { background: none; }
  .mill-menu__now { font-family: var(--mill-mono); font-size: var(--mill-text-2xs);
              color: var(--mill-muted); }
  .mill-menu__item--control .mill-select { margin-left: auto; }

  /* the confirm, opened in place inside the thing it is about */
  .mill-confirm--inline { position: static; transform: none; width: auto;
              box-shadow: none; border-radius: var(--mill-radius);
              border: var(--mill-hair) solid var(--mill-hairline);
              margin-top: var(--mill-space-10); }

  /* the question mark menu every tool is meant to ship. Three built three. */
  .mill-help { width: min(620px, 92vw); max-height: 80vh; overflow: auto; }
  .mill-help__lead { color: var(--mill-secondary); margin: 0 0 var(--mill-space-16); }
  .mill-help__group { margin: 0 0 var(--mill-space-8); }
  .mill-help__who { font-family: var(--mill-mono); font-size: var(--mill-text-2xs);
              letter-spacing: var(--mill-track-wide); text-transform: uppercase;
              color: var(--mill-muted); }


/* re-opened so these land in the components layer, not in the phone query
   this file happens to end with. */


  /* --- an overlay on a plain page ---------------------------------------- */
  /* under the shared nav, which stays on top and in reach: the nav publishes its height as --fab-nav-h,
     0 on a page without it (Richard, 10-nov-2026, FMIL-274; replaces overlay-top, FMIL-155) */
  .mill-scrim--page > .mill-modal { max-height: 100%; }
  .mill-scrim--page { position: fixed; inset: 0; top: var(--fab-nav-h, 0px); z-index: var(--mill-overlay-z);
              display: none; padding: var(--mill-space-16); }
  .mill-scrim--page.is-open { display: flex; align-items: center; justify-content: center; }
  /* a page that is only a sign-in card starts under the bar, so the card centres in the space you see
     (Richard, 10-nov-2026, sign-in-page, THRE-054) */
  .mill-scrim--signin { top: var(--fab-nav-h, var(--mill-bar-h)); }

  .mill-drawer--page { position: fixed; top: var(--fab-nav-h, 0px); right: 0; bottom: 0; z-index: var(--mill-overlay-z);
              display: flex; transform: translateX(100%); }
  .mill-drawer--page.is-open { transform: none; }
  .mill-drawer--page:not(.is-open) { box-shadow: none; }
  .mill-drawer--page.mill-drawer--left { left: 0; right: auto; transform: translateX(-100%); }
  .mill-drawer--page.mill-drawer--left.is-open { transform: none; }

  /* two widths the set did not have: a drawer that holds a form and a table
     side by side, and a modal that holds one field. */
  .mill-drawer--wide   { width: 820px; max-width: 100vw; }
  .mill-modal--narrow  { width: 320px; }

  .mill-toast--page { position: fixed; right: var(--mill-space-28); bottom: var(--mill-space-28); z-index: calc(var(--mill-overlay-z) + 1);
              transform: translate(0, 8px); opacity: 0; pointer-events: none;
              transition: transform var(--mill-move) var(--mill-ease), opacity var(--mill-move) var(--mill-ease); }
  .mill-toast--page.is-on { transform: none; opacity: 1; pointer-events: auto; }


/* ===== 60-shell.css ==================================================== */
/* Fabricaide Mill — the shell and the board.
   The shell is what every tool is: the bar across the top, the rail down the
   left, one scrolling main. The page head is the only thing a tool writes into
   the top of that main. The board (columns and their cards) is Fabriboard's
   shape, but the stage bar is the Ledger's and Bale's too, so it lives here. */


  /* --- shell ---------------------------------------------------------------- */
  /* The shell fills the window. height:100% only worked if html and body
     were also 100%, which is a contract no tool knew about: Bale's shell
     stopped at 490px (3-nov-2026). Where a host bar sits above the shell the
     shared nav publishes its height as --fab-nav-h; with no bar it is 0. */
  .mill-shell { display: grid; grid-template-rows: var(--mill-bar-h) 1fr;
              height: calc(100vh - var(--fab-nav-h, 0px)); background: var(--mill-ground); }
  /* A shell with no bar of its own - every tool that wears the shared one -
     gives the first row back rather than leaving 70px of empty ground. */
  .mill-shell:not(:has(> .mill-bar)) { grid-template-rows: 1fr; }
  .mill-shell__body { display: grid; grid-template-columns: var(--mill-panel-open) 1fr;
              min-height: 0; }
  .mill-shell--fold .mill-shell__body { grid-template-columns: var(--mill-panel-fold) 1fr; }
    /* The main pane is the scroller now, and a div cannot take the keyboard
     without a tabindex: Page Down, End, Home and the arrows did nothing on a
     57,000px page (3-nov-2026). The markup carries tabindex="0"; the ring is
     suppressed because the pane is not a control, only a viewport. */
  .mill-shell__main:focus { outline: none; }
  .mill-shell__main { min-width: 0; overflow: auto;
              padding: var(--mill-space-20) var(--mill-pad-page) var(--mill-space-28); }
  /* A tool page shown inside another tool (Perch shows each tool's screens page in a frame) is
     not a page of its own: it takes no edge, the host's work area already gave one. It keeps
     the set's rhythm between its parts. Richard, 8-nov-2026: a nested page never gets this
     padding, only a stand-alone one. */
  .mill-shell__main--nested { padding: 0; overflow: visible; }

  /* --- page head: the one thing a tool writes at the top of main ------------ */
  .mill-page__head { display: flex; align-items: flex-end; gap: var(--mill-space-14);
              padding-bottom: var(--mill-space-14); margin-bottom: var(--mill-space-20);
              border-bottom: var(--mill-hair) solid var(--mill-hairline); }
  .mill-page__titles { display: flex; flex-direction: column; gap: var(--mill-space-2);
              min-width: 0; }
  .mill-page__kicker { font-family: var(--mill-mono); font-size: var(--mill-text-2xs);
              line-height: var(--mill-leading-2xs); letter-spacing: var(--mill-track-wider);
              text-transform: uppercase; color: var(--mill-muted); }
  .mill-page__title { font-family: var(--mill-display); font-size: var(--mill-text-xl);
              line-height: var(--mill-leading-xl); font-weight: var(--mill-weight-strong);
              color: var(--mill-heading); }
  /* the sentence under the title saying what the screen is for. Four tools
     wrote their own and all four looked different; it belongs to the head
     (3-nov-2026). */
  .mill-page__lead { font-size: var(--mill-text-base); line-height: var(--mill-leading-sm);
              color: var(--mill-secondary); max-width: 76ch; }
  /* a head never shrinks: in a filling screen it is the fixed part and the
     board below it takes what is left. */
  .mill-page__head { flex: none; }
  .mill-page__spacer { flex: 1 1 auto; }
  /* the meta line is as tall as a control, so its text sits on the buttons' centre line
     beside it (Richard, 9-nov-2026, FMIL-203) */
  .mill-page__meta { display: flex; align-items: center; gap: var(--mill-space-16);
              min-height: var(--mill-control-h);
              font-size: var(--mill-text-sm); color: var(--mill-muted); }

  /* --- board: columns ------------------------------------------------------- */
  .mill-board { display: flex; gap: var(--mill-gap-card); align-items: flex-start; }
  .mill-col { display: flex; flex-direction: column; width: 296px; flex: none;
              background: var(--mill-surface);
              border: var(--mill-hair) solid var(--mill-hairline);
              border-radius: var(--mill-radius); }
  .mill-col__head { display: flex; align-items: center; gap: var(--mill-space-8);
              height: var(--mill-group-label); flex: none;
              padding: 0 var(--mill-space-12);
              border-bottom: var(--mill-hair) solid var(--mill-hairline);
              font-family: var(--mill-mono); font-size: var(--mill-text-2xs);
              letter-spacing: var(--mill-track-wider); text-transform: uppercase;
              color: var(--mill-muted); }
  /* a head that carries a second line: name and count on one row, what the
     column means under it. Lives here, after the head it varies. */
  /* A board that fits the width it is given. Without this the columns keep
     their 296px and the last one runs off the right edge, which is what the
     board did with five phases on a laptop (Richard, 2-nov-2026). The columns
     share the room and shrink together; below the floor the board scrolls. */
  .mill-board--fit { width: 100%; }
  .mill-board--fit .mill-col { flex: 1 1 0; width: auto; min-width: 170px; }
  .mill-board--fit .mill-col__head { padding-left: var(--mill-space-10); padding-right: var(--mill-space-10); }

  /* An open lane. The boxed column reads heavier than the work standing in
     it, so a board may drop the box: no surface, no border, a rule between
     one lane and the next, and a head that is a heading rather than a label
     (Richard, 2-nov-2026). The cards keep their own edges; they are the
     things, the lane is only where they stand. */
  /* A board of open lanes. The lanes are stretched to one height and the
     board keeps a floor, so the rule between two lanes runs all the way down
     and an empty lane is still a lane you can drop a card into
     (Richard, 2-nov-2026). */
  .mill-board--open { align-items: stretch; min-height: 70vh; gap: 0; }
  /* On a desk a board of open lanes stands on one white plane: hairline round it, radius 3,
     like the table; on a phone no box (Richard, 10-nov-2026, board-plane-b, FMIL-244). */
  @media (min-width: 821px) {
    .mill-board--open { background: var(--mill-surface);
              border: var(--mill-hair) solid var(--mill-hairline); border-radius: var(--mill-radius); }
  }

  .mill-col--open { background: none; border: 0; border-radius: 0;
              padding: 0 var(--mill-space-12) var(--mill-space-12); }
  .mill-col--open + .mill-col--open { border-left: var(--mill-hair) solid var(--mill-hairline); }
  .mill-col--open > .mill-col__head { padding-left: 0; padding-right: 0;
              font-family: var(--mill-sans); font-size: var(--mill-text-base);
              line-height: var(--mill-leading-sm); letter-spacing: 0; text-transform: none;
              font-weight: var(--mill-weight-medium); color: var(--mill-heading); }
  .mill-col--open > .mill-col__head .mill-col__count { font-weight: var(--mill-weight);
              color: var(--mill-secondary); }
  .mill-col--open > .mill-col__body { padding-left: 0; padding-right: 0; }

  .mill-col__head--stack { height: auto; flex-direction: column; align-items: stretch;
              gap: 2px; padding-top: var(--mill-space-8); padding-bottom: var(--mill-space-8); }
  .mill-col__headline { display: flex; align-items: center; gap: var(--mill-space-8); }
  .mill-col__headline .mill-col__count { margin-left: auto; }
  .mill-col__count { margin-left: auto; }
  .mill-col__body { display: flex; flex-direction: column; gap: var(--mill-gap-card);
              padding: var(--mill-space-8); }
  /* the column a human must act on carries the accent, on top of the hairline */
  /* the accent lies ON TOP of the hairline and owns the corner: the column
     keeps its geometry, the bar grows upward instead of pushing the head down. */
  .mill-col--needs-you { position: relative; }

  /* --- board: the card a column holds (not the project card of 40-display) -- */
  .mill-rowcard { display: flex; flex-direction: column; gap: var(--mill-space-4);
              padding: var(--mill-pad-card);
              background: var(--mill-surface);
              border: var(--mill-hair) solid var(--mill-hairline);
              border-radius: var(--mill-radius); }
  .mill-rowcard__top { display: flex; align-items: center; gap: var(--mill-space-8); }
  .mill-rowcard__id { font-family: var(--mill-mono); font-size: var(--mill-text-xs);
              font-weight: var(--mill-weight-medium); letter-spacing: var(--mill-track-wide);
              color: var(--mill-muted); }
  .mill-rowcard__title { color: var(--mill-heading); line-height: var(--mill-leading-sm); }
  .mill-rowcard__foot { display: flex; align-items: center; gap: var(--mill-space-8);
              font-size: var(--mill-text-sm); color: var(--mill-muted); }
  .mill-rowcard--blocked { position: relative; }

  /* --- stage bar: the one horizontal progress the tools share --------------- */
  .mill-stages { display: flex; align-items: stretch;
              border: var(--mill-hair) solid var(--mill-hairline);
              border-radius: var(--mill-radius); overflow: hidden;
              background: var(--mill-surface); }
  .mill-stages__step { display: flex; align-items: center; gap: var(--mill-space-8);
              padding: 0 var(--mill-space-14); height: var(--mill-control-h); flex: 1 1 0; min-width: 0;
              border-right: var(--mill-hair) solid var(--mill-hairline);
              font-size: var(--mill-text-sm); color: var(--mill-secondary); }
  .mill-stages__step:last-child { border-right: 0; }
  .mill-stages__step--done { color: var(--mill-secondary); }
  .mill-stages__step--on { background: var(--mill-active-ground);
              color: var(--mill-heading); font-weight: var(--mill-weight-medium); }
  .mill-stages__step--todo { color: var(--mill-muted); }
  .mill-stages__chev { margin-left: auto; color: var(--mill-muted); }
  /* a step you may move to is a button, and a native button brings its own
     ground, border and font - none of them the set's. Bale drew five of them
     with clip-path chevrons and an 8px corner instead (3-nov-2026). Every step
     is the control height, 34 and 48 on a phone, so a step you may move to is
     a real button at a height the set accepts (it was 38, 6-nov-2026). */
  button.mill-stages__step { background: none; cursor: pointer; font: inherit;
              font-size: var(--mill-text-sm); border: 0;
              border-right: var(--mill-hair) solid var(--mill-hairline); }
  button.mill-stages__step:last-child { border-right: 0; }
  button.mill-stages__step:hover { background: var(--mill-hover); }
  button.mill-stages__step--on { background: var(--mill-active-ground); }

  /* --- drop target ---------------------------------------------------------
     Somewhere a dragged card may be let go. Bale drew two filled slabs in
     #B3243D and #17693F - the second an ink used as a fill - and the board
     drew something else again (3-nov-2026). It is the dashed language of the
     empty slot, in the colour of what letting go would mean. */
  .mill-drop { display: flex; align-items: center; justify-content: center;
              min-width: 170px; padding: var(--mill-space-16);
              border: var(--mill-hair) dashed var(--mill-hairline);
              border-radius: var(--mill-radius); background: var(--mill-surface);
              color: var(--mill-secondary); text-align: center;
              font-size: var(--mill-text-base); }
  .mill-drop--ok  { border-color: var(--mill-ok);  color: var(--mill-ok-ink); }
  .mill-drop--bad { border-color: var(--mill-bad); color: var(--mill-bad-ink); }
  .mill-drop.is-over { background: var(--mill-hover-accent); border-style: solid;
              border-color: var(--mill-primary); color: var(--mill-heading); }
  /* the cover: a file dragged over a whole chat (THRE-041, Richard accepted
     drop-cover-desk-c, 9-nov-2026). See-through over the thread, so the
     messages stay faintly visible; the line in heading ink on a white plate.
     A desk only: a phone cannot drag a file onto a page. The host is
     positioned. */
  @media (min-width: 821px) {
    .mill-drop--cover { position: absolute; inset: var(--mill-space-12); z-index: 20; min-height: 0;
              background: rgb(255 255 255 / 0.78); border: var(--mill-hair) dashed var(--mill-primary);
              color: var(--mill-heading); font-size: var(--mill-text-base); }
    .mill-drop--cover .mill-drop__plate { padding: var(--mill-space-12) var(--mill-space-20); background: var(--mill-surface);
              border: var(--mill-hair) solid var(--mill-hairline); border-radius: var(--mill-radius);
              font-weight: var(--mill-weight-medium); }
  }


@media (max-width: 820px) {
  .mill-shell__body { grid-template-columns: 1fr; }
  .mill-shell__main { padding: var(--mill-space-14) var(--mill-space-14) var(--mill-space-20); }
  .mill-shell__main--nested { padding: 0; }   /* the phone edge is the host's too */
  .mill-page__head { flex-direction: column; align-items: stretch; gap: var(--mill-space-10); }
  .mill-board { flex-direction: column; align-items: stretch; }
  .mill-col { width: 100%; }
  .mill-stages { flex-direction: column; }
  .mill-stages__step { flex: none; border-right: 0;
              border-bottom: var(--mill-hair) solid var(--mill-hairline); }
  .mill-stages__step:last-child { border-bottom: 0; }
}

/* re-opened: the components layer, not whatever this file ends with. */

  /* --- screens inside one page --------------------------------------------
     Bale, the Ledger and the ecosystem map are one document holding several
     screens. Each wrote the same two lines for itself; the set owns them now,
     so a screen that must fill the window can say so without fighting a
     local display rule (3-nov-2026). */
  .mill-screen { display: none; }
  .mill-screen--on { display: block; }

  /* --- a pane that passes the window's height down ------------------------
     A board must not make the page taller than the window. Bale's Clients
     board was one 24,564px scroll because the lane grew to its cards instead
     of scrolling inside the screen (Richard, 3-nov-2026). Height only passes
     through an element that both takes it and gives it, so every pane between
     the main and the board wears .mill-fill and the main holding them wears
     --fill. The lane's body is then the scroller and the head stays put. */
  .mill-shell__main--fill { display: flex; flex-direction: column;
              overflow: hidden; min-height: 0; }
  .mill-fill { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column;
              gap: var(--mill-space-12); }
  .mill-screen.mill-fill { display: none; }
  .mill-screen--on.mill-fill { display: flex; }
  .mill-board--fill { flex: 1 1 auto; min-height: 0; align-items: stretch;
              overflow-x: auto; }
  .mill-board--fill > .mill-col { min-height: 0; }
  .mill-board--fill > .mill-col > .mill-col__body { flex: 1 1 auto; min-height: 0;
              overflow-y: auto; }

  /* --- modifiers, 2-nov-2026 --------------------------------------------- */

  /* a third column. The shell was bar, rail and work; an inspector that
     collapses to nothing is what the ecosystem map had to build itself. */
  .mill-shell__side { flex: none; width: var(--mill-side-w, 320px); overflow: auto;
              background: var(--mill-surface);
              border-left: var(--mill-hair) solid var(--mill-hairline);
              transition: width var(--mill-move) var(--mill-ease); }
  .mill-shell--inspect .mill-shell__work { min-width: 0; }
  .mill-shell__side[hidden], .mill-shell__side--shut { width: 0; border-left: 0; overflow: hidden; }
  @media (max-width: 820px) { .mill-shell__side { position: fixed; inset: var(--mill-bar-h) 0 0;
              width: auto; z-index: 40; }
    /* with the shared bar on the page (it writes --fab-nav-h on <html>), the bar
       itself pushes every fixed element down by its own height, so the sheet
       states 0 and lands right under it, not 70 plus the bar */
    html[style*="--fab-nav-h"] .mill-shell__side { top: 0; } }


/* --- on paper ------------------------------------------------------------
   Every tool that prints wrote its own rules, and the set had one line (the
   blocker notice). The chrome goes, the work gets the page, and nothing is
   cut in half across a break. */
@media print {
  .mill-bar, .mill-rail, .mill-footbar, .mill-toolbar, .mill-drawer,
  .mill-scrim, .mill-lightbox, .mill-notice--banner, .mill-print-hide { display: none !important; }
  .mill-shell, .mill-shell__body, .mill-shell__work, .mill-shell__main {
        display: block !important; height: auto !important; overflow: visible !important; }
  .mill { background: #fff; }
  .mill-card, .mill-panel, .mill-rowcard, .mill-fold, .mill-table tr,
  .mill-timeline__item { break-inside: avoid; }
  .mill-page__head, .mill-bandhead { break-after: avoid; }
  .mill-fold { border: 0; }
  .mill-fold > summary::before { display: none; }
  .mill-fold > summary { padding-left: 0; }
  details.mill-fold:not([open]) > .mill-fold__body { display: block; }
  a[href^="http"]::after { content: " (" attr(href) ")";
        font-family: var(--mill-mono); font-size: var(--mill-text-2xs); color: var(--mill-muted); }
}

/* Taken in from the Proposals tab as suggested (Richard, 6-nov-2026).
   Each is drawn on the Shell page. */

  /* --- card drag between lanes (C48) ----------------------------------------
     The card being dragged at reduced strength, the lane under the pointer on
     the hover ground, the place it lands as a drop zone (.mill-drop.is-over). */
  .mill-rowcard--dragging, .mill-rowcard[data-dragging] { opacity: var(--mill-disabled); }
  .mill-col--over { background-image: linear-gradient(var(--mill-hover), var(--mill-hover)); }

  /* --- preview stage (C54): a page shown at its proportions, scaled -------
     A white frame at the page's shape with 12 around the page inside it, and
     a caption under it saying what is shown. The iframe is drawn at
     --mill-stage-zoom times the room it has and scaled back down, so a 480
     frame at zoom 3 shows the page as it renders at about 1360. */
  .mill-stage { display: flex; flex-direction: column; gap: var(--mill-space-8); }
  .mill-stage__head { display: flex; align-items: center; gap: var(--mill-space-8); }
  .mill-stage__pager { margin-left: auto;
              font: var(--mill-weight) var(--mill-text-sm)/var(--mill-leading-xs) var(--mill-mono);
              color: var(--mill-secondary); }
  .mill-stage__frame { --mill-stage-zoom: 3;
              width: 100%; aspect-ratio: 16 / 9; padding: var(--mill-space-12);
              background: var(--mill-surface);
              border: var(--mill-hair) solid var(--mill-hairline); border-radius: var(--mill-radius); }
  .mill-stage__frame--phone { --mill-stage-zoom: 2; aspect-ratio: 390 / 844; width: 219px; }
  .mill-stage__page { position: relative; width: 100%; height: 100%; overflow: hidden;
              background: var(--mill-surface-sunk); border-radius: var(--mill-radius); }
  .mill-stage__page > iframe { position: absolute; left: 0; top: 0; border: 0;
              width: calc(100% * var(--mill-stage-zoom)); height: calc(100% * var(--mill-stage-zoom));
              transform: scale(calc(1 / var(--mill-stage-zoom))); transform-origin: 0 0;
              pointer-events: none; background: var(--mill-surface); }
  .mill-stage__caption { font-size: var(--mill-text-sm); line-height: var(--mill-leading-xs);
              color: var(--mill-secondary); }


/* ===== 62-layout.css =================================================== */
/* Mill · LAYOUT — the shared layout vocabulary (3-nov-2026, Richard: the
   verticals run in the same browser on the same system, so alignments,
   paddings, margins and column widths are shared language too, not per-tool
   glue). A tool arranges a screen with these; it does not write its own grid. */


  /* --- columns: the one way to put things side by side ---------------------
     Equal columns that collapse on a phone. Replaces .dashboard-columns,
     .detail-grid, .fin-grid, .listener-grid, .bx-site-cols, .cols, ... */
  .mill-cols { display: grid; gap: var(--mill-gap-section); align-items: start;
              grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
  .mill-cols--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mill-cols--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mill-cols--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  /* a side column of fixed width beside the work (settings, status, filters) */
  .mill-cols--side  { grid-template-columns: minmax(0, 1fr) 340px; }
  .mill-cols--aside { grid-template-columns: 340px minmax(0, 1fr); }
  .mill-cols > * { min-width: 0; }
  .mill-cols--tight { gap: var(--mill-gap-card); }

  /* --- rhythm: nothing touches ------------------------------------------
     Parts carry no outer margins, so a page that stacks them straight in the
     main pane gets the set's spacing here (Richard, 4-nov-2026: "stuff
     touching each other"). A main that manages its own height chain (--fill)
     spaces with gaps instead and is left alone. */
  .mill-shell__main:not(.mill-shell__main--fill) > * + *:not(.mill-screen):not(script):not(style) {
              margin-top: var(--mill-gap-section); }

  /* parts stacked in a BARE unclassed wrapper never touch either (the stage bar too:
     Richard accepted stages-block-gap, 14-nov-2026, BACK-078): an
     anonymous div has no layout of its own, so the set spaces its parts
     (Bale's desk cards, 4-nov-2026). A wrapper with a class is assumed to
     manage its own spacing. */
  :where(div:not([class]):not([style*="display:flex"]):not([style*="display: flex"]):not([style*="display:grid"]), section:not([class])) >
    :is(.mill-card, .mill-surface, .mill-list, .mill-notice, .mill-stat, .mill-table, .mill-statstrip, .mill-cols, .mill-stack, .mill-kv, .mill-chart, .mill-code, .mill-board, .mill-empty, .mill-seg, .mill-bandhead, .mill-prose, .mill-quote, .mill-totals, .mill-timeline, .mill-cardgrid, .mill-scroll, .mill-fold, .mill-drop, .mill-stages) +
    :is(.mill-card, .mill-surface, .mill-list, .mill-notice, .mill-stat, .mill-table, .mill-statstrip, .mill-cols, .mill-stack, .mill-kv, .mill-chart, .mill-code, .mill-board, .mill-empty, .mill-seg, .mill-bandhead, .mill-prose, .mill-quote, .mill-totals, .mill-timeline, .mill-cardgrid, .mill-scroll, .mill-fold, .mill-drop, .mill-stages) {
              margin-top: var(--mill-gap-card); }

  /* two blocks with an edge, one under the other, sit 20px apart on a phone
     and a desk, so each reads as its own block (Richard, 8-nov-2026, FMIL-137;
     20, not 24: his accept of edge-gap-20 B, 9-nov-2026). */
  :where(div:not([class]):not([style*="display:flex"]):not([style*="display: flex"]):not([style*="display:grid"]), section:not([class])) > .mill-edge + .mill-edge {
              margin-top: var(--mill-space-20); }
  .mill-stack > .mill-edge + .mill-edge {
              margin-top: calc(var(--mill-space-20) - var(--mill-gap-section)); }

  /* a quiet tab strip and the content block it switches sit 20px apart, always
     (Richard, 9-nov-2026). The space is the strip's: on the strip itself, or on
     the row or toolbar that carries it beside its controls. */
  .mill-seg--quiet,
  :is(.mill-row, .mill-toolbar):has(> .mill-seg--quiet) { margin-bottom: var(--mill-space-20); }
  :is(.mill-row, .mill-toolbar) > .mill-seg--quiet { margin-bottom: 0; }
  /* a strip standing straight in the page leaves the 20 to the page rhythm, so its content
     sits 20 under it, not 20 + 20 (Richard accepted tabs-gap-in-page, 13-nov-2026, SPIN-015) */
  .mill-shell__main:not(.mill-shell__main--fill) > .mill-seg--quiet,
  .mill-shell__main:not(.mill-shell__main--fill) > .mill-stack > .mill-seg--quiet { margin-bottom: 0; }
  /* a filter for the content under a tab strip sits on its own line below the strip, at the
     content's left edge, never on the strip's line; 12px to the content (Richard, 9-nov-2026,
     Perch Issues and Proposals) */
  :is(.mill-seg--quiet, :is(.mill-row, .mill-toolbar):has(> .mill-seg--quiet)) + .mill-seg:not(.mill-seg--quiet) {
              margin-bottom: var(--mill-gap-card); }

  /* --- a stack with the set's rhythm -------------------------------------- */
  .mill-stack { display: flex; flex-direction: column; gap: var(--mill-gap-section); }
  .mill-stack--tight { gap: var(--mill-space-8); }

  /* --- a wide thing scrolls inside this, never the page -------------------- */
  .mill-scroll { overflow-x: auto; overflow-y: hidden; min-width: 0; }   /* sideways only, FMIL-197 */

  /* --- the list container without its box: divided rows flush in a card ---- */
  .mill-list--flush { background: none; border: 0; border-radius: 0; overflow: visible; }
  .mill-list--flush > .mill-list__row { padding-left: 0; padding-right: 0; }

  /* --- one row of things with space between ------------------------------- */
  .mill-row { display: flex; align-items: center; gap: var(--mill-space-8);
              flex-wrap: wrap; min-width: 0; }
  .mill-row__spacer { flex: 1 1 auto; }
  .mill-row > .mill-actions:last-child { margin-left: auto; }

  /* a flush list written as bare <li> rows (activity lists, to-do lists) */
  .mill-list--flush > li { display: flex; justify-content: space-between;
              align-items: center; gap: var(--mill-space-16);
              padding: var(--mill-space-10) 0;
              border-top: var(--mill-hair) solid var(--mill-hairline-soft); }
  .mill-list--flush > li:first-child { border-top: 0; padding-top: 0; }
  .mill-list--flush { list-style: none; margin: 0; padding: 0; }

  @media (max-width: 820px) {
    .mill-cols--2, .mill-cols--3, .mill-cols--4,
    .mill-cols--side, .mill-cols--aside { grid-template-columns: minmax(0, 1fr); }
  }


/* ===== 64-phone.css ==================================================== */
/* Mill · ON A PHONE — what the shared parts do at 390, gathered in one place.

   Richard, 7-nov-2026, looking at the five converted tools on his phone: "I see
   a lot of screens which can be improved usability wise." His rule for the set:
   on a phone a label sits ABOVE its content, and what does not fit stacks.
   Only that goes in here; a new look for a part (a stage bar that wraps, a
   one-line stat, a button on a sunk ground, a labelled stacked table) is a
   proposal in Perch > Mill > Proposals until he takes it. Every rule here
   answers a screen that was shot at 390 and looked at; the before and after
   sit under "Phone usability" on the tool's review page. */

  @media (max-width: 820px) {

    /* --- stat tile: one line, label left and value right; the strip one tile a row ---
       (Richard, 7-nov-2026, accepted stat-line FMIL-133; asked again on Ledger /tokens,
       "items should go full width", BACK-054). A tile with a meter keeps its stack. */
    .mill-statstrip { grid-template-columns: minmax(0, 1fr); gap: var(--mill-space-8); }
    .mill-stat:not(:has(.mill-meter)) { display: grid; grid-template-columns: minmax(0, 1fr) auto;
              column-gap: var(--mill-space-12); align-items: baseline; padding: var(--mill-space-10) var(--mill-space-12); }
    .mill-stat:not(:has(.mill-meter)) > * { grid-column: 1 / -1; }
    .mill-stat:not(:has(.mill-meter)) > .mill-stat__label { grid-column: 1; grid-row: 1; }
    .mill-stat:not(:has(.mill-meter)) > .mill-stat__value { grid-column: 2; grid-row: 1; text-align: right; }

    /* --- key / value: the key above its value --------------------------------
       Beside it, a 120px key column left a long value 170px to wrap in, a
       sentence one or two words a line (Bale's lead panel, the Ledger's deal,
       the board's Referenced by). */
    .mill-kv { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
    .mill-kv > .mill-kv__v, .mill-kv > dd { margin: var(--mill-space-2) 0 var(--mill-space-10); }
    .mill-kv > :last-child { margin-bottom: 0; }

    /* --- a panel head with more than a title: title and meta stack, only the
       close button stays to the side (Richard, 9-nov-2026, head-stack-phone, FMIL-157); hidden children and the spacer do not count (head-stack-visible-b, 10-nov-2026); a head of only a title
       and icon buttons keeps its desk line (head-acts-phone, COMP-130/131) */
    .mill-panel__head:has(> :nth-child(4 of :not([hidden], .mill-panel__spacer))):has(> :not(.mill-panel__title, .mill-panel__spacer, .mill-btn--icon, .mill-icon--button)) { display: grid; grid-template-columns: minmax(0, 1fr) auto;
              column-gap: var(--mill-space-10); row-gap: 0; align-items: center; }
    .mill-panel__head:has(> :nth-child(4 of :not([hidden], .mill-panel__spacer))):has(> :not(.mill-panel__title, .mill-panel__spacer, .mill-btn--icon, .mill-icon--button)) > * { grid-column: 1; justify-self: start; }
    .mill-panel__head:has(> :nth-child(4 of :not([hidden], .mill-panel__spacer))):has(> :not(.mill-panel__title, .mill-panel__spacer, .mill-btn--icon, .mill-icon--button)) > .mill-panel__spacer { display: none; }
    .mill-panel__head:has(> :nth-child(4 of :not([hidden], .mill-panel__spacer))):has(> :not(.mill-panel__title, .mill-panel__spacer, .mill-btn--icon, .mill-icon--button)) > :is(.mill-icon--button, .mill-btn--icon):last-child { grid-column: 2; grid-row: 1; align-self: center; }   /* on the title's line (FMIL-157) */

    /* --- a chart's legend stacks, one key to a line, never a word broken
       (Richard, 9-nov-2026, REFE-176) */
    .mill-chart__legend { flex-direction: column; align-items: flex-start; gap: var(--mill-space-4); }

    /* --- a short field takes the full width; its 200px cap is for a desk
       (Richard, 10-nov-2026, field-short-full-phone, FMIL-207) */
    .mill-fieldgroup--short { max-width: none; }

    /* --- exactly two buttons share the line, half each (Richard, 10-nov-2026,
       actions-two-inline-phone, FMIL-209); when the two do not fit with their 20 padding,
       each takes the full line (Richard, 10-nov-2026, btn-pad-20, BACK-049) */
    .mill-actions:has(> :nth-child(2):last-child) { display: flex; flex-direction: row; flex-wrap: wrap; align-items: stretch; }
    .mill-actions:has(> :nth-child(2):last-child) > * { flex: 1 1 calc(50% - var(--mill-space-4)); min-width: max-content; width: auto; margin: 0; }
    .mill-table > tbody > tr > td[data-mill-acts]:has(> :nth-child(2):last-child) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
    .mill-table > tbody > tr > td[data-mill-acts]:has(> :nth-child(2):last-child) > * { min-width: 0; width: auto; margin: 0; }
    .mill-actions:has(> :nth-child(2):last-child) > form,
    .mill-table > tbody > tr > td[data-mill-acts]:has(> :nth-child(2):last-child) > form { display: flex; }
    .mill-actions:has(> :nth-child(2):last-child) > form > .mill-btn,
    .mill-table > tbody > tr > td[data-mill-acts]:has(> :nth-child(2):last-child) > form > .mill-btn { flex: 1 1 auto; }

    /* --- portraits take the full width (FMIL-194) ------------------------- */
    .mill-portraits > .mill-card { width: 100%; }

    /* --- a panel head with a kicker: kicker over title, the buttons right (FMIL-201) */
    .mill-panel__head:has(> .mill-panel__kicker) { display: grid; grid-template-columns: minmax(0, 1fr) auto;
              column-gap: var(--mill-space-10); row-gap: var(--mill-space-2); align-items: center; }
    .mill-panel__head:has(> .mill-panel__kicker) > .mill-panel__kicker { grid-column: 1; grid-row: 1; }
    .mill-panel__head:has(> .mill-panel__kicker) > .mill-panel__title { grid-column: 1; grid-row: 2; }
    .mill-panel__head:has(> .mill-panel__kicker) > .mill-panel__spacer { display: none; }
    .mill-panel__head:has(> .mill-panel__kicker) > :not(.mill-panel__kicker):not(.mill-panel__title):not(.mill-panel__spacer) {
              grid-column: 2; grid-row: 1 / span 2; justify-self: end; }

    /* --- open lanes stand under each other: no side rule, no side room ----
       the cards line up with the lane switch and the page edge
       (Richard, 10-nov-2026, open-lanes-phone-b, OPPO-040; replaces the 9-nov 12px) */
    .mill-col--open + .mill-col--open { border-left: 0; }
    .mill-col--open { padding-left: 0; padding-right: 0; }

    /* --- a card name on two lines: the dot on the first, tighter lines -----
       (Richard, 7-nov-2026, card-name-wrap) */
    .mill-card__top { align-items: baseline; }
    .mill-card__name { line-height: var(--mill-leading-md); }
    /* a one-line name keeps its height: 2px above and below the 18px lines
       (Richard, 10-nov-2026, card-name-one-line, COMP-120/147) */
    .mill-card__name { padding-block: calc((var(--mill-leading-sm) - var(--mill-leading-md)) / 2); }
    .mill-card__top > .mill-dot { align-self: flex-start; margin-top: calc((var(--mill-leading-sm) - 10px) / 2); }
    .mill-card__top > .mill-dot--sm { margin-top: calc((var(--mill-leading-sm) - 8px) / 2); }

    /* --- inside a panel head and a dialog, controls keep their desk height --
       (Richard, 10-nov-2026, panel-controls-phone, COMP-130/131/139) */
    .mill-panel__head, .mill-modal { --mill-control-h: 34px; --mill-icon-btn: 34px; --mill-icon-pad: 5px; }   /* 5 keeps the mark 24 in a 34 box (10-nov-2026) */
    /* a sign-in card is the page, not a dialog over one: thumb-size fields and buttons
       (Richard, 10-nov-2026, sign-in-page, THRE-054) */
    .mill-scrim--signin .mill-modal { --mill-control-h: 48px; }
    /* the company theme floors every field at 44 on a phone (fabricaide-theme.css, a touch
       minimum); there the accepted desk height lost and dialog fields drew 44 (OPPO-051) */
    :is(.mill-panel__head, .mill-modal) :is(input.mill-field:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]), select.mill-select) { min-height: var(--mill-field-h); }

    /* --- two fields on a line: one under the other -------------------------
       The part always said it collapses on a phone; it never did, and the
       board's Kind and Stage cut "Project (client work)" in half. */
    .mill-fieldrow { grid-template-columns: minmax(0, 1fr); }
    /* stacked, its fields keep the form rhythm (form-gap-20, COMP-137) */
    .mill-fieldrow:not(.mill-fieldrow--pair) { row-gap: var(--mill-gap-form); }
    /* except a pair: a day and a time are two short controls read as one value,
       so they keep one line (Richard, 7-nov-2026, posting slots) */
    .mill-fieldrow.mill-fieldrow--pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

    /* --- a menu on a phone: thumb-high items, a setting's label above it ----
       A 30px item holding a 48px select: the board's row menu drew its eight
       selects on top of each other, each label wrapped beside one. */
    .mill-menu__item { height: auto; min-height: var(--mill-control-h); }
    .mill-menu__item--control { flex-direction: column; align-items: stretch;
              gap: var(--mill-space-4); padding-top: var(--mill-space-8); padding-bottom: var(--mill-space-8); }
    .mill-menu__item--control .mill-select { margin-left: 0; width: 100%; }

    /* --- a field in a toolbar takes the row --------------------------------
       240px is a desk's search box; at 280 it was a field that stopped short of
       the edge for no reason (the board's to-do filters, Bale's search). */
    .mill-toolbar .mill-field, .mill-toolbar .mill-select { flex: 1 1 100%; width: auto; min-width: 0; }
    /* the phone work area pads 14 on top: the sticky toolbar sticks flush (toolbar-sticks-flush) */
    .mill-shell__main:not(.mill-shell__main--nested) .mill-toolbar:not(.mill-toolbar--flow, .mill-toolbar--bulk) { top: calc(-1 * var(--mill-space-14)); }
    .mill-shell__main:not(.mill-shell__main--nested) .mill-table thead th { top: calc(-1 * var(--mill-space-14)); }
    .mill-shell__main:not(.mill-shell__main--nested):has(.mill-toolbar:not(.mill-toolbar--flow, .mill-toolbar--bulk)) .mill-table thead th {
                top: calc(var(--mill-toolbar-h) - var(--mill-space-14)); }
    /* each switch in a toolbar its own row (Richard, 9-nov-2026, toolbar-switch-row-b) */
    .mill-toolbar > .mill-switch { flex: 1 1 100%; }
    /* tabs folded into their dropdown: no box round it, no hairline under it, the dropdown the full
       width of the page (Richard, 15-nov-2026, REFE-175: "Dropdown should go full width") */
    .mill-toolbar:has(> .mill-seg--quiet.mill-seg--folds:first-child + .mill-seg__select:last-child) { border-bottom: 0; }
    /* a toolbar of only a search keeps field and Search on one line: the field takes what
       is left (Richard, 10-nov-2026, search-inline, BACK-040) */
    .mill-toolbar--flow:has(> .mill-field):not(:has(> .mill-select, > .mill-switch, > .mill-seg, > .mill-row, > .mill-toolbar__spacer)) { flex-wrap: nowrap; }
    .mill-toolbar--flow:has(> .mill-field):not(:has(> .mill-select, > .mill-switch, > .mill-seg, > .mill-row, > .mill-toolbar__spacer)) > .mill-field { flex: 1 1 auto; width: auto; min-width: 0; }
    .mill-toolbar--flow:has(> .mill-field):not(:has(> .mill-select, > .mill-switch, > .mill-seg, > .mill-row, > .mill-toolbar__spacer)) > .mill-btn { flex: none; }
    /* the primary button that opens a flow toolbar takes the full line, as wide as the
       search under it (Richard, 10-nov-2026, toolbar-lead-btn-phone, OPPO-042) */
    .mill-toolbar--flow:not(.mill-toolbar--bulk) > .mill-btn--primary:first-child { flex: 1 1 100%; }
    /* a flow toolbar in the page has no box: page ground, no hairline, its controls on the
       page edge like the title (Richard, 10-nov-2026, toolbar-flat-phone, FMIL-210) */
    .mill-toolbar--flow:not(.mill-toolbar--bulk):not(.mill-panel__body .mill-toolbar--flow) {
              background: var(--mill-ground); border-bottom: 0; padding-left: 0; padding-right: 0; }
    /* a flow toolbar inside a white panel keeps the panel white, no grey band (Richard accepted
       toolbar-in-panel-white-phone, 15-nov-2026, BACK-092) */
    .mill-surface .mill-toolbar--flow:not(.mill-toolbar--bulk):not(.mill-panel__body .mill-toolbar--flow) { background: transparent; }
    /* a toolbar spacer takes no line of its own: on a phone the field takes the line, so the
       spacer would wrap onto an empty line and add the 8 gap twice (Richard, 10-nov-2026,
       toolbar-spacer-phone, OPPO-044) */
    .mill-toolbar__spacer { display: none; }

    /* --- a page head's buttons wrap onto as many lines as they need, 8 apart, instead of
       running off the screen (Richard, 10-nov-2026, head-actions-wrap-phone, FMIL-211) */
    .mill-page__head > .mill-actions { flex-direction: row; flex-wrap: wrap; align-items: center; row-gap: var(--mill-space-8); }
    .mill-page__head > .mill-actions > .mill-btn, .mill-page__head > .mill-actions > form:has(> .mill-btn), .mill-page__head > .mill-actions > form > .mill-btn { width: auto; }

    /* --- a quiet button that starts a stacked page head takes the title edge:
       its padding showed as an indent (Richard, 10-nov-2026, head-quiet-edge-phone, BACK-047) */
    .mill-page__head > .mill-actions > .mill-btn--quiet:first-child { margin-left: calc(-1 * (var(--mill-pad-control) + var(--mill-hair))); }

    /* --- a toast takes the full width -------------------------------------
       a short Saved and a long error line the same width; on the page it spans
       the bottom, 16px from both sides (Richard, 9-nov-2026, toast-note-b) */
    .mill-toast { width: 100%; min-width: 0; box-sizing: border-box; }
    .mill-toast--page { left: var(--mill-space-16); right: var(--mill-space-16);
              bottom: var(--mill-space-16); width: auto; }

    /* --- a code block: name above, outlined verbs, a held height ----------
       the name was squeezed to two letters beside its verbs and an open block
       ran off the page (Richard, 9-nov-2026, code-head-phone, THRE-025) */
    .mill-code__head { flex-direction: column; align-items: stretch; white-space: normal;
              gap: var(--mill-space-8); padding: var(--mill-space-8) var(--mill-space-10); }
    .mill-code__head > :first-child { overflow: visible; }
    .mill-code__head .mill-actions > .mill-btn { flex: 1 1 0; }
    .mill-code__body { max-height: 320px; overflow: auto;
              scrollbar-width: thin; scrollbar-color: var(--mill-code-edge) var(--mill-code-head); }
    .mill-code__body::-webkit-scrollbar { width: 6px; height: 6px; }
    .mill-code__body::-webkit-scrollbar-track { background: var(--mill-code-head); border-radius: var(--mill-radius); }
    .mill-code__body::-webkit-scrollbar-thumb { background: var(--mill-code-edge); border-radius: var(--mill-radius); }

    /* --- foot bar: it stacks instead of running off the screen ------------
       Patterns' block foot put "commit" one letter a line and Save past the
       edge. The state stands alone, then the message's label above it, then
       the buttons (Richard's phone sweep rule, 7-nov-2026, aff5a51: what does
       not fit stacks). */
    .mill-footbar { flex-wrap: wrap; row-gap: var(--mill-space-8);
              padding-left: var(--mill-space-14); padding-right: var(--mill-space-14); }
    .mill-footbar__spacer { flex: 1 1 100%; height: 0; }
    .mill-footbar .mill-field { flex: 1 1 100%; max-width: none; }
    /* Cancel and Save stand on the right under the field (Richard, 14-nov-2026,
       footbar-btns-right-phone). */
    .mill-footbar .mill-field + .mill-btn { margin-left: auto; }

    /* --- a heading row: what does not fit goes under, not beside ----------
       "Needs you 16" with its note squeezed to four lines beside it (the
       board's to-dos), "By project" next to its sub line and the table toggle
       (Tokens). */
    .mill-bandhead, .mill-chart__head { flex-wrap: wrap; row-gap: var(--mill-space-4); }

    /* --- the matrix scrolls in its box --------------------------------------
       Its version columns never wrap, so the name column was squeezed to a
       syllable a line ("Bas e", "Afs pra ak", Patterns' matrix). The name keeps
       9em and the grid scrolls sideways inside its own scroller. */
    .mill-table--matrix > * > tr > :first-child { min-width: 9em; }

    /* --- a list row is pressed with a thumb ---------------------------------
       Threads' members and files rows were 43px; on a phone a row is at least
       the control height, the 48 every phone control already has. */
    /* a row grows for a thumb only when it can be pressed (list-row-thumb-only) */
    .mill-list__row:is(a, button, :has(> a, > button, > input, > select)) { min-height: var(--mill-control-h); }

    /* --- a screenshot thumb takes its column and shows the whole picture ----
       Richard, 9-nov-2026, Threads chat at 390 (FMIL-152, thumb-phone-width-b):
       a tall phone screenshot was cut to a 120 by 80 strip of its corner. */
    .mill-thumb { display: block; width: 100%; height: auto; max-height: 320px; }
    .mill-thumb > img { height: auto; max-height: 318px; object-fit: contain; object-position: center; }
    .mill-thumbs > .mill-thumb { flex: 1 1 calc(50% - 4px); width: auto; }

    /* --- a switch sits on its label's first line ----------------------------
       Richard, 9-nov-2026, Threads settings at 390 (THRE-033, switch-first-line). */
    .mill-switch { align-items: flex-start; line-height: 20px; }

    /* --- a row of actions stacks: the switch first, on its own thumb-size line, then one
       button per line at the full width (Richard, 10-nov-2026, accepted actions-stack-phone-b,
       FMIL-160). Two buttons keep sharing the line (actions-two-inline-phone, above). */
    .mill-actions { flex-direction: column; align-items: stretch; }
    .mill-actions > .mill-btn, .mill-actions > form:has(> .mill-btn), .mill-actions > form > .mill-btn { width: 100%; }
    .mill-actions > form { display: flex; margin: 0; }
    .mill-actions > form:has(> .mill-switch), .mill-actions > .mill-switch { align-self: flex-start; }
    /* a row of quiet verbs only stays one row, equal parts (Richard, 12-nov-2026, accepted
       verbs-row-phone, THRE-023/024) */
    .mill-actions:not(:has(> :not(.mill-btn--quiet))) { flex-direction: row; align-items: center; }
    .mill-actions:not(:has(> :not(.mill-btn--quiet))) > .mill-btn { width: auto; flex: 1 1 0; }
    .mill-switch { min-height: 48px; align-items: center; }
    .mill-switch__track { width: 44px; height: 26px; padding: 3px; }
    .mill-switch__knob { width: 18px; height: 18px; }
  }


/* --- a notice: its label above the text whenever the text runs short of room ---
   Richard, 7-nov-2026, on Patterns' roadmap at 390: the opened row's FOR HUMANS
   note drew its label as a column and the note beside it two or three words a
   line; it used to stack, and he wants that back. The body takes the row only
   while it has 20em; narrower, at any width, it wraps under the label. On a
   phone the label is always above, and a long path breaks instead of running
   past the screen. */

  .mill-notice { flex-wrap: wrap; row-gap: var(--mill-space-4); }
  .mill-notice > .mill-notice__label + * { flex: 1 1 20em; min-width: 0; }
  @media (max-width: 820px) {
    .mill-notice:has(> .mill-notice__label) { flex-direction: column; align-items: stretch; }
    .mill-notice > .mill-notice__label + * { flex: none; width: 100%; }
    .mill-notice { overflow-wrap: anywhere; }
  }


/* --- a long switch in a dialog: stacked on a phone -------------------------------
   Richard, 9-nov-2026, on Threads admin at 390 (FMIL-156, seg-stack-phone): the tabs
   ran out of the dialog, and wrapping them did not work: "Items should be stacked".
   Five or more tabs in a dialog or drawer stand as a list, one full-width 48 row a
   tab, hairlines between; the live one has the active ground and the orange edge.
   Rows are the rail entry height (48), not the dialog control height panel-controls-phone
   sets to 34 (THRE-050, 12-nov-2026). */

  @media (max-width: 820px) {
    :is(.mill-modal, .mill-drawer) .mill-seg:has(> .mill-seg__item:nth-child(5)) { display: flex; flex-direction: column; align-items: stretch; flex-wrap: nowrap;
      width: 100%; height: auto; gap: 0; overflow: visible; border: var(--mill-hair) solid var(--mill-hairline); border-radius: var(--mill-radius); background: var(--mill-surface); }
    :is(.mill-modal, .mill-drawer) .mill-seg:has(> .mill-seg__item:nth-child(5)) > .mill-seg__item { justify-content: flex-start; width: 100%; height: var(--mill-entry);
      padding: 0 var(--mill-space-16); border: 0; border-top: var(--mill-hair) solid var(--mill-hairline); border-radius: 0; position: relative; color: var(--mill-text); }
    :is(.mill-modal, .mill-drawer) .mill-seg:has(> .mill-seg__item:nth-child(5)) > .mill-seg__item:first-child { border-top: 0; }
    :is(.mill-modal, .mill-drawer) .mill-seg:has(> .mill-seg__item:nth-child(5)) > :is(.mill-seg__item--on, [aria-selected="true"]) { background: var(--mill-active-ground); color: var(--mill-heading); font-weight: var(--mill-weight-medium); }
    :is(.mill-modal, .mill-drawer) .mill-seg:has(> .mill-seg__item:nth-child(5)) > :is(.mill-seg__item--on, [aria-selected="true"])::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; height: auto; background: var(--mill-primary); }
  }


/* --- no hover ground on a row on a phone ------------------------------------------
   Richard, 10-nov-2026, accepted row-hover-phone (REFE-189): a tap left one row grey.
   Under 820 a list row, a row card and a table row draw no hover ground; desk unchanged. */

  @media (max-width: 820px) {
    .mill-list__row:hover, .mill-rowcard:hover, .mill-table tbody tr:hover { background: transparent; }
  }


/* --- a filter wider than a phone: a dropdown --------------------------------------
   Richard, 10-nov-2026, accepted seg-select-phone-b (FMIL-258; REFE-182, SPIN-013):
   "Nav items should never run out the screens." A seg in the page with four choices
   or more, or wider than its row, is marked by mill.js and gives way to its select at
   the full row on a phone; Grid / List keeps its row; a dialog's seg still stacks. */

  .mill-seg__select { display: none; }
  @media (max-width: 820px) {
    .mill-seg.mill-seg--folds { display: none; }
    .mill-seg--folds + .mill-seg__select { display: flex; width: 100%; }
  }


/* ===== 80-ledger.css =================================================== */
/* Mill · LEDGER — the Ledger's own labelled glue (3-nov-2026). Lives in the
   set so the tool ships no CSS of its own. Two kinds of line are allowed here:
   layout no second tool draws yet, and maps from the backend's DYNAMIC class
   names (status-{{...}}, stage-{{...}}) onto the set's tokens. Nothing else. */


  /* the client document (invoice/proposal paper) embedded in its record */
  .lg-docframe { display: block; width: 100%; height: 1240px; border: 0; background: transparent; }

  /* a deal's line in a pipeline card: name ellipsised left, number right */
  .lg-line { display: flex; justify-content: space-between; gap: var(--mill-space-8);
             font-variant-numeric: tabular-nums; }
  .lg-line > :first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .lg-line > span:last-child, .lg-line > em:last-child { flex: none; white-space: nowrap; font-style: normal; }

  /* backend-rendered state names -> set tokens (the template writes
     status-{{ invoice.status }}, so the map lives here, not in markup) */
  .status { text-transform: capitalize; }
  .status-draft, .status-cancelled, .type-supplier { color: var(--mill-muted); }
  .status-cancelled { text-decoration: line-through; }
  .status-sent, .type-prospect { color: var(--mill-warn-ink); }
  .status-paid, .status-accepted, .type-partner { color: var(--mill-ok-ink); }
  .status-overdue, .status-rejected { color: var(--mill-bad-ink); }
  .deal-stage, .layer-badge { display: inline-flex; align-items: center; gap: var(--mill-space-8);
             white-space: nowrap; }
  .deal-stage::before, .layer-badge::before { content: ''; width: 8px; height: 8px;
             border-radius: var(--mill-dot-radius); flex: none; background: var(--mill-muted); }
  .deal-stage-qualified::before { background: var(--mill-cat-1); }
  .deal-stage-proposal_sent::before { background: var(--mill-cat-4); }
  .deal-stage-negotiating::before { background: var(--mill-warn); }
  .deal-stage-won::before { background: var(--mill-ok); }
  .deal-stage-lost::before { background: var(--mill-bad); }
  .layer-badge-trend::before { background: var(--mill-cat-7); }
  .layer-badge-industry::before { background: var(--mill-cat-12); }
  .layer-badge-sales::before { background: var(--mill-cat-1); }

  /* the deal detail's stage strip states, in the set's own vocabulary */
  .stage-step { color: var(--mill-muted); }
  .stage-step.stage-done { color: var(--mill-secondary); }
  .stage-step.stage-current { background: var(--mill-active-ground);
             color: var(--mill-heading); font-weight: var(--mill-weight-medium); }
  .stage-step.stage-won { color: var(--mill-ok-ink); font-weight: var(--mill-weight-medium); }
  .stage-step.stage-lost { color: var(--mill-bad-ink); font-weight: var(--mill-weight-medium); }

  /* the pipeline script marks the open deal with .on */
  .pipe-deal.on { background: var(--mill-active-ground); border-color: var(--mill-primary); }

  /* milestone rows on the dashboard: goal | detail | meter | percent */
  .ms-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) minmax(80px, 180px) 48px;
             gap: var(--mill-space-16); align-items: center; padding: var(--mill-space-10) 0;
             border-top: var(--mill-hair) solid var(--mill-hairline-soft); }
  .ms-row:first-of-type { border-top: 0; }
  .ms-pct { text-align: right; font-weight: var(--mill-weight-medium); }
  .ms-more { display: block; }
  @media (max-width: 820px) { .ms-row { grid-template-columns: minmax(0, 1fr) 48px; }
             .ms-goal, .ms-now { grid-column: 1 / -1; } }

  /* listener source rows: a switch per source, divided */
  .listener-toggle { display: flex; align-items: center; gap: var(--mill-space-12);
             padding: var(--mill-space-10) 0;
             border-top: var(--mill-hair) solid var(--mill-hairline-soft); }
  .listener-toggle:first-child { border-top: 0; }
  .listener-toggle .toggle-label { flex: 1; }
  .listener-toggle .toggle-label strong { display: block; }

  /* knowledge: the ask field takes the row, the reader keeps the window's height */
  .kn-form .mill-field { flex: 1 1 auto; width: auto; }
  .kn-list, .kn-file { max-height: 64vh; overflow: auto; }
  .kn-answer-body, .kn-item-s { white-space: pre-wrap; }
  .kn-split { display: grid; grid-template-columns: minmax(240px, 1fr) 2fr;
             gap: var(--mill-space-16); align-items: start; }
  @media (max-width: 900px) { .kn-split { grid-template-columns: 1fr; } }

  /* market watch: the signal card's three columns */
  .signal-card-left { display: flex; flex-direction: column; align-items: center;
             gap: var(--mill-space-6); flex: none; }
  .signal-card-body { flex: 1 1 auto; min-width: 0; }
  .signal-card-actions { flex-direction: column; align-items: flex-start; flex: none; }
  .signal-card-header { display: flex; align-items: center; gap: var(--mill-space-10); flex-wrap: wrap; }
  .signal-date { margin-left: auto; }
  .signal-status-dismissed { opacity: 0.6; }
  .signal-summary { font-weight: var(--mill-weight-medium); color: var(--mill-heading); }

  /* scanner: a switched-off row dims, a long source path clips */
  .row-off td { color: var(--mill-muted); }
  .scanner-table .src { display: inline-block; max-width: 220px; overflow: hidden;
             text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

  /* finance pages: dynamic class names rendered by the backend */
  .fin-kv .v { text-align: right; font-variant-numeric: tabular-nums; }
  /* the total line is ink, as the set draws a grand total (mill-totals__row--grand), not a grey
     hairline (Richard, 17-nov-2026, BACK-104: "this hr is light grey, this is not Mill") */
  .fin-strong { font-weight: var(--mill-weight-medium);
             border-top: var(--mill-hair) solid var(--mill-text); padding-top: var(--mill-space-6);
             margin-top: var(--mill-space-4); }
  /* the kv grid's column gap cut the rule in two; the label cell bridges it */
  .fin-kv > .fin-strong:nth-child(odd) { margin-right: calc(-1 * var(--mill-space-14));
             padding-right: var(--mill-space-14); }
  .fin-muted { color: var(--mill-muted); }
  .fin-answer { font-size: var(--mill-text-lg); line-height: var(--mill-leading-lg); margin-bottom: var(--mill-space-6); }
  .fin-table tr.fin-total td { border-top: var(--mill-hair) solid var(--mill-text);
             border-bottom: 0; font-weight: var(--mill-weight-medium); }
  .fin-table tr.fin-add td { border-bottom: 0; padding-top: var(--mill-space-14); }
  .fin-table input.fin-num { width: 92px; text-align: right; }
  .fin-table tr:target { background: var(--mill-active-ground); scroll-margin-top: 120px; }
  .fin-wait, .fin-busy .fin-idle { display: none; }
  .fin-busy .fin-wait { display: inline; }
  .fin-busy .mill-btn { opacity: 0.5; pointer-events: none; }
  .fin-link { background: none; border: 0; padding: 0; color: var(--mill-link); cursor: pointer; font: inherit; }
  .fin-link:hover { text-decoration: underline; }
  .fin-set label { display: grid; grid-template-columns: minmax(0, 1fr) minmax(80px, 130px);
             gap: var(--mill-space-10); align-items: center; padding: 5px 0; }
  .fin-set input { width: 100%; text-align: right; }
  .fin-addbar { display: flex; gap: var(--mill-space-12); align-items: center; margin-top: var(--mill-space-10); }

  /* filters sit tight over their table */
  .filters { margin-bottom: var(--mill-space-12); }
  /* mill.js puts its phone select right after the strip, so a sibling, not the next one */
  .mill-seg ~ .filters { margin-top: var(--mill-space-8); }
  /* a desk's widths; on a phone the toolbar's own rule lets field and select take the row,
     280 ran 4px past the page edge at 390 (FMIL-210, 12-nov-2026) */
  @media (min-width: 821px) {
    .filter-form .mill-field { width: 280px; flex: none; }
    .filter-form .mill-select { width: auto; flex: none; }
  }

  /* --- out of the templates' style attributes (FMIL-286, 12-nov-2026) -------- */
  /* a tool page held in a frame (tokens, security) fills the window under the bar */
  .lg-fillframe { display: block; width: 100%; height: calc(100vh - 140px); border: 0; background: transparent; }
  /* the invoice's line editor: fixed column shares, amounts right */
  .lg-lines th:nth-child(1) { width: 40%; }
  .lg-lines th:nth-child(2), .lg-lines th:nth-child(4) { width: 12%; }
  .lg-lines th:nth-child(3), .lg-lines th:nth-child(5) { width: 15%; }
  .lg-lines th:nth-child(6) { width: 6%; }
  .lg-lines input[type="number"], .lg-lines .line-total { text-align: right; }
  /* a play's step, done: struck through (the step state the backend decides) */
  .lg-step--done { color: var(--mill-secondary); text-decoration: line-through; }
  /* a divider between two groups of filter buttons in a flow toolbar */
  .lg-vsep { flex: none; width: var(--mill-hair); height: 20px; background: var(--mill-hairline);
             margin: 0 var(--mill-space-4); }
  /* text a person typed (notes, a proposal's description) keeps its line breaks */
  .lg-keeplines { white-space: pre-wrap; }
  /* a text cell of a list is a textarea (Richard, 14-nov-2026, FMIL-247): one line on a desk, as
     the input was, its text centred in the box; on a phone it grows to hold the whole text */
  .fin-table textarea.fin-text { display: block; resize: none; overflow: hidden; white-space: pre;
             padding-block: calc((var(--mill-field-h) - var(--mill-leading-sm) - 2 * var(--mill-hair)) / 2); }
  @media (max-width: 820px) {
    .fin-table textarea.fin-text { field-sizing: content; height: auto; min-height: var(--mill-field-h); max-width: 100%;
             white-space: pre-wrap; }
  }
  /* a field that takes the rest of its row beside its button, until the set's
     inline field row (FMIL-251, accepted 11-nov) is built; then this goes */
  .mill-row > .lg-grow { flex: 1 1 12em; width: auto; min-width: 0; }

  /* on a phone (7-nov-2026): a money line keeps its amount beside its name
     (the set stacks a kv; a sum under its label read as two rows), the receipt
     scan's note goes under its button instead of one letter a line beside it,
     and a setting's label sits above its field */
  @media (max-width: 820px) {
    .mill-kv.fin-kv { grid-template-columns: minmax(0, 1fr) auto; row-gap: var(--mill-space-4); }
    .mill-kv.fin-kv > * { margin: 0; }
    .fin-addbar { flex-wrap: wrap; }
    .fin-addbar > .mill-dim { flex: 1 1 100%; }
    .fin-set label { grid-template-columns: minmax(0, 1fr); gap: var(--mill-space-4); }
    .fin-set input { text-align: left; }
  }

  /* the Ledger's body does not wear .mill, so the browser's 8px margin sat round the shell and
     the phone rail opened 8px higher than it sat folded: the entries moved on open (Richard,
     10-nov-2026, BACK-045). On a phone the shell starts at the window's edge; the desk is unchanged. */
  @media (max-width: 820px) {
    body:has(> .mill-shell) { margin: 0; }
  }
  /* Market watch's source select beside the status control, 180 wide on a desk as drawn in
     ledger-signals-table-b (BACK-048); on a phone it takes the row */
  @media (min-width: 821px) {
    .lg-source { width: 180px; flex: none; }
  }


/* The client sheet inside its record (html.lg-docsheet, the frame on /invoices/<id>): no ground of
   its own, the Mill's hairline and corner round the sheet. Outside the layer because the sheet's own
   stylesheet is unlayered; screen only, the PDF never changes (Richard, 14-nov-2026, accepted
   ledger-invoice-fits, BACK-076). On a phone the record zooms the sheet to the column. */
@media screen {
  html.lg-docsheet, html.lg-docsheet body { background: transparent; }
  html.lg-docsheet .sheet { margin: 0 auto; border: var(--mill-hair) solid var(--mill-hairline);
                            border-radius: var(--mill-radius); overflow: hidden; }
}

/* ===== 81-board.css ==================================================== */
/* Mill · FABRIBOARD — the board's own labelled glue (COMP-108, 6-nov-2026).
   Lives in the set so the board ships no CSS of its own. Only layout no other
   tool draws yet; every value is a token. Two of these (the anchored menu and
   the field that takes the rest of its line) are candidates for the set
   itself the day a second tool needs them. */


  /* a field that takes the rest of its line beside fixed controls:
     a card's link rows, a gate answer (state + note) */
  .fb-line { display: flex; align-items: center; gap: var(--mill-space-8); min-width: 0; }
  .fb-line > .mill-field { flex: 1 1 auto; width: auto; min-width: 0; }
  .fb-line > .mill-field--short { flex: none; width: 120px; }
  .fb-line > .mill-select { flex: none; width: auto; }
  .fb-line + .fb-line { margin-top: var(--mill-space-8); }
  /* a field's own verbs (Open, Remove) take the field's height and edge: a
     square as tall as the field, its grey hairline and radius, a line icon
     (Richard, 8-nov-2026, field-line-verbs, COMP-138) */
  .fb-line > .mill-btn--icon { --mill-btn-edge: var(--mill-hairline); --mill-btn-bg: var(--mill-surface);
              --mill-btn-ink: var(--mill-secondary); flex: none; }

  /* the search in a page head: it may shrink, it never takes the whole head */
  .fb-search { flex: 0 1 auto; width: min(420px, 100%); min-width: 0; }
  .fb-search > .mill-field { flex: 1 1 auto; width: auto; min-width: 0; }
  /* the page name never wraps to make room: the find field gives way, the
     plan picker keeps its width (Richard, 24-nov-2026, COMP-178: To-dos wrapped at 1200) */
  .mill-page__head:has(.fb-search) > .mill-page__titles { flex: none; white-space: nowrap; }
  select.fb-search { flex-shrink: 0; }

  /* the row's three-dot menu (the set's anchor) is the board's width */
  .fb-anchor > .mill-menu { width: 280px; }

  /* a card in a filling lane keeps its height; the lane scrolls instead of
     squeezing the cards until their foot is cut off */
  .mill-col__body > .board-card { flex: none; }

  /* the to-dos table: the two text columns give way first, so twelve columns
     fit the work area and a long next action never sets its row's height */
  .fb-todos td:nth-child(2), .fb-todos td:nth-child(12) { min-width: 200px; max-width: 360px; }

  /* on a phone (7-nov-2026): a link row's label takes its own line and the
     address the next, with its two verbs; side by side both were cut to a
     dozen letters. A gate answer (state + note) keeps its line. */
  @media (max-width: 820px) {
    .fb-line { flex-wrap: wrap; row-gap: var(--mill-space-8); }
    .fb-line > .mill-field--short { flex: 1 1 100%; width: auto; }
    .fb-line:has(> .mill-field--short) + .fb-line { margin-top: var(--mill-space-16); }
  }


/* ===== 82-patterns.css ================================================= */
/* Mill · PATTERNS — Patterns' own labelled glue (REFE-141, 6-nov-2026).
   Lives in the set so Patterns ships no CSS of its own. Only what no other
   tool draws, every value a token or a size the part already uses. The stage at
   the page's own size is a candidate for the set the day a second tool
   needs it; the body margin, the thumb picture and the phone work row moved
   into the set on 6-nov-2026. */


  /* the stage at the page's own size: a block or a Kit draft is judged at
     the width it renders at, and can be scrolled inside its frame */
  .pt-stage-1:not(.mill-stage__frame--phone) { --mill-stage-zoom: 1; }
  .pt-stage-1 .mill-stage__page > iframe { pointer-events: auto; }

  /* the code editor: CodeMirror (backend-rendered class names) inside the
     set's light code frame, in the frame's own type and grounds */
  .pt-editor .CodeMirror { height: auto; background: transparent; color: var(--mill-text);
              font-family: var(--mill-mono); font-size: var(--mill-text-sm); line-height: 1.5; }
  .pt-editor .CodeMirror-scroll { min-height: 180px; }
  .pt-editor .CodeMirror-gutters { background: var(--mill-surface-sunk);
              border-right: var(--mill-hair) solid var(--mill-hairline); }
  .pt-editor .CodeMirror-linenumber { color: var(--mill-muted); padding: 0 var(--mill-space-8); }
  .pt-editor .CodeMirror-lines { padding: var(--mill-space-10) 0; }
  .pt-editor .CodeMirror pre.CodeMirror-line,
  .pt-editor .CodeMirror pre.CodeMirror-line-like { padding: 0 var(--mill-space-12); }
  .pt-editor .CodeMirror-cursor { border-left: 2px solid var(--mill-primary); }
  .pt-editor .CodeMirror-selected { background: var(--mill-active-ground); }
  /* Patterns at a short window or a narrow phone (REFE-141, the user walk at
     606 x 330 and 360). Candidates for the set: none is Patterns' own idea. */
  /* an address or an id in mono has nowhere to break; on a phone it breaks
     anywhere rather than run past the edge */
  .pt .mill-shell__main .mill-mono, .pt .mill-shell__main .mill-link { overflow-wrap: anywhere; }
  /* a timeline entry gives way to its box, so a long note folds instead of
     pushing the row wider than the screen */
  .pt .mill-timeline__body, .pt .mill-notice > div, .pt .mill-notice > span,
  .pt .mill-row > span { min-width: 0; }
  /* a band head with a control at its end wraps rather than push it off */
  .pt .mill-bandhead { flex-wrap: wrap; }
  /* a row with a flush fold (Block Box, Sites: the site override) keeps the fold's own height and
     its cells read on the fold's text line, as the accepted Block Box Sites picture draws it (REFE-197) */
  .pt .mill-table tr:has(> td > .mill-fold--flush) > td { vertical-align: baseline; }


/* ===== 83-threads.css ================================================== */
/* Mill · THREADS — Threads' own labelled glue (THRE-021, 6-nov-2026).
   Lives in the set so Threads ships no CSS of its own. Only what no other tool
   draws, every value a token. The anchored menu, the rail's min-height and
   the bar height under the over-rail, scrim and side sheet moved into the set
   on 6-nov-2026. */


  /* the work beside the rail: the chat and the side panels open next to it in
     one row (the shell's body has two columns; this is the second) */
  .th-work { display: flex; min-width: 0; min-height: 0; overflow: hidden; }
  .th-chat { flex: 1 1 auto; min-width: 0; min-height: 0; position: relative; }   /* holds the drop cover */
  /* the channel sits on the page, as every other tool works on the page grey; its messages stay
     white boxes (Richard, 10-nov-2026: Threads white, Patterns light grey) */
  .th-chat { background: none; }
  /* a message's own verbs (Thread, Context, Decision, Pin) show on hover or
     keyboard focus, top right of the message, so a stream of fifty messages
     does not carry two hundred buttons */
  .th .mill-msg { position: relative; }
  .th-acts { position: absolute; top: var(--mill-space-6); right: var(--mill-space-8);
              visibility: hidden; }
  .th .mill-msg:hover > .th-acts, .th-acts:focus-within { visibility: visible; }
  /* a touch screen has no hover: the verbs stay in view */
  @media (hover: none) { .th-acts { visibility: visible; } }

  /* the slash-command list opens above the message field, not in the flow */
  /* while an agent works, the channel head keeps one line on a phone, as in the accepted typing
     picture (THRE-027): the name and the working status do not wrap, a long name ends in an
     ellipsis (12-nov-2026). Without a status the name keeps one line too and ends in an ellipsis
     when it does not fit (Richard, 14-nov-2026, THRE-037: "# Blue accountants on one line"). */
  .th-chat > .mill-panel__head > .mill-panel__title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .th-chat > .mill-panel__head:has(> :not([hidden]) > .mill-status) > .mill-panel__title { flex-shrink: 0; max-width: 60%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .th-chat > .mill-panel__head > :not([hidden]):has(> .mill-status) { min-width: 0; flex-shrink: 10; display: flex; }   /* the status gives way before the name */
  .th-chat > .mill-panel__head .mill-status { white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  /* on a phone the status pushes itself right, so the spacer and its gap leave the head and the
     whole of "Opus is thinking..." fits beside the name (THRE-027, 12-nov-2026) */
  @media (max-width: 820px) {
    .th-chat > .mill-panel__head:has(> :not([hidden]) > .mill-status) > .mill-panel__spacer { display: none; }
    .th-chat > .mill-panel__head > :not([hidden]):has(> .mill-status) { margin-left: auto; }
  }
  .th-chat > .mill-panel__foot { position: relative; }
  /* the message field takes what is left of its line, so +, field and Send
     stay one row on a phone as on a desk (accepted pictures, THRE-023 to 028;
     the phone foot still wraps for any other panel, REFE-172) */
  .th-work .mill-panel__foot > .mill-field { flex: 1 1 0; width: auto; min-width: 0; }   /* basis 0, as foot-field-phone: with auto the field claims its own width first and Send wraps (12-nov-2026) */
  .th-above { position: absolute; left: var(--mill-pad-panel);
              bottom: calc(100% + var(--mill-space-8)); z-index: 30;
              max-width: calc(100% - 2 * var(--mill-pad-panel)); }

  /* a mention of you sits on the open-row ground */
  .th-me { background: var(--mill-active-ground); color: var(--mill-heading);
              border-radius: var(--mill-radius); padding: 0 var(--mill-space-2); }

  /* the whiteboard frame takes the drawer under its head */
  .th-frame { flex: 1 1 auto; min-height: 0; width: 100%; border: 0; display: block; }

  /* the whiteboard page (wb/index.html): Excalidraw takes the window under the
     board's bar. Opened by itself the shared bar pads the body by its own
     height, so the body counts that padding inside the 100%. */
  html:has(> body.th-wb), body.th-wb, body.th-wb > #root { height: 100%; margin: 0; overflow: hidden; }
  body.th-wb { box-sizing: border-box; }
  .th-wb-board { height: 100%; }
  .th-wb-canvas { flex: 1 1 auto; min-height: 0; }

  /* on a phone the channel list has no icons to fold to: it leaves the screen
     and comes back over the chat (.mill-rail--over) from the Channels button */
  @media (max-width: 820px) {
    .th .mill-rail:not(.mill-rail--over) { display: none; }
  }


/* ===== 84-bale.css ===================================================== */
/* Mill · BALE — Bale's and the sales tool's own labelled glue (OPPO-038, 6-nov-2026).
   Lives in the set so neither page ships CSS of its own. Only what no other tool
   draws, every value a token. Scoped to body.bl, which only Bale's two pages carry. */


  /* Bale scores every niche dimension out of five: its tick rows are five long */
  .bl .mill-ticks { --mill-ticks-n: 5; }

  /* a whole card, row or stat that opens something on a click says so under the pointer */
  .bl [onclick]:not(button):not(a) { cursor: pointer; }

  /* the parked niches under the pipeline scroll inside a third of the window, so the
     board above them keeps its height */
  .bl-cap { max-height: 30vh; overflow-y: auto; }

  /* while a deal is dragged, Lost and Won stand at the foot of the window */
  .bl-dropbar { position: fixed; left: 50%; bottom: var(--mill-space-20); z-index: 30;
              transform: translateX(-50%); display: flex; gap: var(--mill-space-10); }

  /* the sales tool: the lead list takes the page, a lead opens in the set's wide page
     drawer (Richard, 10-nov-2026, bale-lead-drawer, OPPO-057) */
  .bl-leads { container-type: inline-size; }
  /* a narrow list keeps the name and the signal: the tick, the initials and the buttons go */
  @container (max-width: 420px) {
    .bl-leads .mill-workrow { grid-template-columns: max-content minmax(0, 1fr); }
    .bl-leads .mill-workrow > * { grid-column: auto; grid-row: auto; }
    .bl-leads .bl-lead-mark .mill-avatar, .bl-leads .mill-workrow__acts { display: none; }
  }
  /* a long text field is as tall as its text: one scroll, the pane's, never a second inside it */
  .bl textarea.bl-grow { field-sizing: content; }
  @media (max-width: 820px) {
    .bl-leads { container-type: normal; }
  }


/* ===== 85-spindle.css ================================================== */
/* Mill · SPINDLE — Spindle's own labelled glue (SPIN-007, 6-nov-2026).
   Lives in the set so spindle.html ships no CSS of its own. Only what no other
   tool draws, every value a token. Scoped to .sp, which only Spindle's shell carries. */


  /* the project switcher is a rail entry with the set's menu beside it. The entry
     takes the rail's width; the menu opens at the rail's right edge, level with the
     entry, over the page: the same from the open rail, the 70px folded one and on a
     phone, and it never covers the rail's own entries. */
  .sp .sp-proj { display: flex; }
  .sp .sp-proj > .mill-rail__entry { flex: 1 1 auto; min-width: 0; }
  .sp .sp-proj > .mill-menu { left: 100%; right: auto; top: 0; width: 260px; }

  /* the signed-in name under the rail's title goes with the title when the rail
     folds, as the title does; it spilled over the page from the 70px rail */
  .sp .mill-rail--phone .mill-rail__meta { display: none; }
  /* folded on a desk it keeps its one line, unseen, so no entry below it moves up
     when the rail folds or opens (Richard, 14-nov-2026, SPIN-016) */
  .sp .mill-rail--folded .mill-rail__meta { visibility: hidden; white-space: nowrap; overflow: hidden; }
  /* the name keeps exactly one line at every moment: empty while the page loads, and a
     long name in the open rail, both moved every entry below it (Richard, 14-nov-2026, SPIN-016) */
  .sp .mill-rail__meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sp .mill-rail__meta:empty::before { content: "\00a0"; }

  /* a post's three numbers (replies, visits, leads) stand side by side at every width:
     three short numbers, each under its label */
  .sp .sp-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
              gap: var(--mill-space-8); max-width: 360px; }
  /* side by side, the form's rhythm between stacked field groups does not apply */
  .sp .sp-nums > .mill-fieldgroup { margin-top: 0; }

  /* one picture cut for every channel: the thumb at the channel's own proportion,
     on the thumb's height (1.91:1, 1:1, 9:16) */
  .sp .sp-crops { align-items: flex-end; }
  .sp .sp-crop { height: 80px; }
  .sp .sp-crop--wide   { width: 153px; }
  .sp .sp-crop--square { width: 80px; }
  .sp .sp-crop--story  { width: 45px; }
  .sp .sp-crop > img { object-position: center; }
  @media (max-width: 820px) {
    /* on a phone the three stand on one line, 60 high */
    .sp .sp-crop { height: 60px; }
    .sp .sp-crop--wide   { width: 115px; }
    .sp .sp-crop--square { width: 60px; }
    .sp .sp-crop--story  { width: 34px; }
  }

