/* The pipeline screen, lifted from the platform slide of the presentation.
   The tokens, the grid proportions, the pill and the waiting bar are the
   design's own values and are not to be reinterpreted here.

   Client names are serif and everything else is sans. That contrast is the
   character of the screen. One accent colour, gold, used only where something
   is waiting — if everything is gold, nothing is. */

:root{
  --paper:#fffdfa; --ink:#0a0a0a;
  --t1:rgba(0,0,0,.92); --t2:rgba(20,20,30,.55); --t3:rgba(20,20,30,.35);
  --line:rgba(0,0,0,.09); --sep:rgba(0,0,0,.07);
  --act:#17171a; --act2:rgba(0,0,0,.06);
  --gold:#CB9612; --g10:rgba(203,150,18,.1); --g16:rgba(203,150,18,.16); --g30:rgba(203,150,18,.3);
  /* The one colour outside the design's paper/ink/gold. It marks the action
     that ends the session and nothing else — a red that appears twice stops
     meaning anything, the same way gold would. */
  --red:#C0392B; --r08:rgba(192,57,43,.08);
  /* The second exception, and the last. Green marks one thing only: a check
     that came back clear. It is not a general "good" colour — see --red. */
  --grn:#1a7f4b; --gr10:rgba(26,127,75,.1); --gr30:rgba(26,127,75,.28);
  /* Surfaces, and what sits on them. A card is a control's own surface on
     the paper; --on-act is the text on an --act control; --knob is a
     switch's thumb; --edge a drawn line on the graph. Named so the dark
     palette below swaps every one without touching a rule. */
  --card:#fff; --wash:#f6f4f1; --on-act:#fff; --hover:rgba(0,0,0,.05);
  --knob:#fff; --swoff:rgba(0,0,0,.08); --edge:rgba(0,0,0,.16);
  /* The rule between two blocks, darker than a hairline: where one thing
     ends and the next begins has to be seen. */
  --rule:rgba(0,0,0,.11);
  color-scheme:light;
  --gut:16px;
  /* The height of a control in a screen header — the add button and the filter
     pills. Shared so the row cannot come apart by 4px again. */
  --ctl:30px;
  /* The width of the rail once it is folded to icons. One number, because the
     track and the rail inside it have to agree exactly or the icons sit off
     centre by however much they disagree. */
  --rail:58px;
  --serif:ui-serif,"New York","Iowan Old Style",Georgia,"Times New Roman",serif;
  --sans:-apple-system,BlinkMacSystemFont,"SF Pro Text","Helvetica Neue",Helvetica,Arial,sans-serif;
  --ease:cubic-bezier(.22,.61,.36,1);
}

/* The same page after dark, from the system setting. Ink on paper becomes
   paper on ink, and every control that was drawn in a literal white reads
   its surface from a token, so nothing stays a white rectangle on a black
   page. Gold stays gold; red and green stay what they mean. */
@media (prefers-color-scheme:dark){
  :root{
    --paper:#121214; --ink:#f3f1ec;
    --t1:rgba(255,255,255,.9); --t2:rgba(236,234,228,.6); --t3:rgba(236,234,228,.42);
    --line:rgba(255,255,255,.13); --sep:rgba(255,255,255,.1);
    --act:#ecebe6; --act2:rgba(255,255,255,.08);
    --gold:#D9A62A; --g10:rgba(217,166,42,.12); --g16:rgba(217,166,42,.2); --g30:rgba(217,166,42,.36);
    --red:#E4614F; --r08:rgba(228,97,79,.12);
    --grn:#3FAE72; --gr10:rgba(63,174,114,.12); --gr30:rgba(63,174,114,.32);
    --card:#1b1b1e; --wash:#1a1a1d; --on-act:#121214; --hover:rgba(255,255,255,.07);
    --knob:#121214; --swoff:rgba(255,255,255,.2); --edge:rgba(255,255,255,.22);
    --rule:rgba(255,255,255,.14);
    color-scheme:dark;
  }
}

*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html,body{height:100%;background:var(--paper);color:var(--t1);
  font-family:var(--sans);-webkit-font-smoothing:antialiased}
b,strong{font-weight:600;color:var(--ink)}
@media (prefers-reduced-motion:reduce){*{transition-duration:.01ms!important;animation-duration:.01ms!important}}

.ic{width:1em;height:1em;fill:currentColor;display:block;flex:0 0 auto}

/* ── the phone layout ─────────────────────────────────────────────────────
   Below the breakpoint the table becomes a list. A six-column grid does not
   survive on a phone, so it is not asked to. */
.mapp{display:flex;flex-direction:column;font-size:13.5px;height:100%}
.mhd{display:flex;align-items:center;gap:10px;
  padding:calc(10px + env(safe-area-inset-top)) var(--gut) 10px;
  border-bottom:.7px solid var(--sep)}
.mhd b{font:500 19px/1 var(--serif);color:var(--ink);margin-right:auto}
.seg{display:flex;align-items:center;height:var(--ctl);box-sizing:border-box;
  border:.7px solid var(--line);border-radius:999px;padding:2px}
/* justify-content, not just align-items. The label was centred vertically and
   left-aligned horizontally, which only showed once one tab grew a badge and
   the other did not. */
.seg span{display:flex;align-items:center;justify-content:center;height:100%;
  padding:0 10px;border-radius:999px;font-size:12px;color:var(--t2)}
.seg span.on{background:var(--act);color:var(--on-act)}
/* The attorney the list is narrowed to, a pill beside Mine and Whole firm,
   and full width in the phone's filter sheet. Madison, 15 October. */
.atty{height:var(--ctl);box-sizing:border-box;border:.7px solid var(--line);border-radius:999px;
  padding:0 28px 0 12px;font:400 12px/1 var(--sans);color:var(--t2);max-width:200px;
  background:var(--card) url(sf/chevron.down.svg) no-repeat right 11px center/9px 5px;
  -webkit-appearance:none;appearance:none;cursor:pointer}
.atty.on{border-color:var(--act);color:var(--ink)}
.atty.wide{width:100%;max-width:none;height:auto;padding:11px 32px 11px 14px;
  font-size:14px;border-radius:12px}

/* The count on "Waiting for approval".
   Gold, because gold already means "this needs a person" everywhere else on
   this screen. Red is spoken for: it means something is WRONG,
   which is what .chg says when a client is looking at a proposal the record
   has moved past. Work waiting is not a fault.
   A flex child of the tab rather than something absolutely positioned over
   it, so the pill grows to hold the number instead of the number sitting on
   top of the last letter of the label. */
.seg span .bdg{display:inline-flex;align-items:center;justify-content:center;
  min-width:15px;height:15px;margin-left:6px;padding:0 4px;box-sizing:border-box;
  border-radius:999px;background:var(--gold);color:#fff;
  font:600 9.5px/1 var(--sans);font-style:normal}
/* At zero it goes invisible rather than away. The two switches are a row
   pinned to the right edge, so a pill that narrows drags "Mine | Whole firm"
   sideways with it — and switching scope moved the control the thumb had just
   left. `visibility` keeps the width; `display:none` from the [hidden]
   default would give it back. */
.seg span .bdg[hidden]{display:inline-flex;visibility:hidden}
/* On the selected tab the background is already near-black, and gold on that
   is a smudge. The mark goes white and the tab's own colour comes through. */
.seg span.on .bdg{background:var(--on-act);color:var(--act)}
.mnav{display:flex;gap:4px;padding:0 var(--gut) 8px;overflow-x:auto;
  /* The row scrolls; the scrollbar itself is chrome on a screen this small
     and reads as a stray grey line under the tabs. */
  scrollbar-width:none;-ms-overflow-style:none}
.mnav::-webkit-scrollbar{display:none}
/* Tabs that navigate are anchors and tabs that do not are spans, but on the
   phone they sit in one row and must read as one row. Styling only the span
   left the single anchor rendering as a default blue underlined link. */
.mnav span,.mnav a{padding:5px 11px;border-radius:999px;font-size:12.5px;
  color:var(--t2);white-space:nowrap;text-decoration:none}
.mnav .on{background:var(--act2);color:var(--t1)}
.msec{font:600 11px/1 var(--sans);letter-spacing:.06em;text-transform:uppercase;
  color:var(--t3);padding:10px var(--gut) 6px}

.mrow{display:flex;align-items:center;gap:10px;padding:9px var(--gut);
  border-top:.7px solid var(--sep)}
.mrow.on{background:var(--act2)}
/* Same attribute as the click handler in pipeline.js, so a row cannot look
   openable without being openable. */
.mrow[data-m]{cursor:pointer}
.mrow .lf{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}
.mrow .nm{font:400 15px/1.2 var(--serif);color:var(--ink)}
.mrow .rt{display:flex;flex-direction:column;align-items:flex-end;gap:5px;flex:0 0 auto}

/* ── the pill ─────────────────────────────────────────────────────────────
   Plain is the normal case, gold means something is waiting, black means
   closed. Which status is which comes from the firm's configuration, never
   from a constant in here — a second firm's lifecycle is its own. */
.pl{display:inline-block;padding:2px 7px;border-radius:999px;font-size:11px;
  font-weight:500;white-space:nowrap;background:var(--act2);color:var(--t1)}
.pl.g{background:var(--g16);color:var(--gold)}
.pl.k{background:var(--act);color:var(--on-act)}

/* An email being read, before it is a matter. Plain rather than gold: gold
   says something waits on a person, and this waits on nobody. The dot
   breathes so the row reads as under way rather than stuck. */
.pl.rd{display:inline-flex;align-items:center;gap:6px}
.pl.rd i{width:6px;height:6px;border-radius:50%;background:var(--t2);
  animation:rd-breathe 1.4s var(--ease) infinite}
@keyframes rd-breathe{0%,100%{opacity:.25}50%{opacity:1}}
.li.rd .nm,.mrow.rd .nm{color:var(--t2)}
/* The status cell: the pill and whatever stands beside it, as one wrapping
   row with an even gap, so a badge that wraps lines up under the pill
   rather than hanging off its own left margin. Its column is never narrower
   than its widest badge, so on a narrow screen the client's name gives way
   instead of a badge running into the attorney. */
.li .st{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px}
.li .st > *{margin-left:0}

/* A question the client asked that nobody has answered. Gold, because the
   firm owes it, and gold is the one colour this screen keeps for work that
   is waiting on a person. */
.ask{display:inline-block;margin-left:8px;padding:3px 8px;border-radius:999px;
  border:.7px solid var(--g30);color:var(--gold);background:var(--g10);
  font:600 10.5px/1.35 var(--sans);letter-spacing:.02em;white-space:nowrap;
  vertical-align:middle}
.mrow .ask{margin:3px 0 0;align-self:flex-start}
.li.rd .sub{grid-column:3 / -1;overflow:hidden;text-overflow:ellipsis}
.mrow .sub{font-size:12px;color:var(--t3);white-space:nowrap;overflow:hidden;
  text-overflow:ellipsis}

/* ── the desktop table ────────────────────────────────────────────────────
   The header is the same grid with .h added, so the columns cannot drift
   apart. There is deliberately no <thead>. */
.app{display:none}

/* One set of columns for the whole list, which the header and every row take
   as a subgrid. Each row used to be a grid of its own, so a long attorney name
   widened its column in that row alone and pushed the rest of the row out of
   line with the header. Now a column is as wide as its widest cell anywhere. */
.list{display:grid;grid-template-columns:1.6fr 1.2fr 1.2fr .45fr .6fr .7fr 88px;
  column-gap:10px}
.list > .empty{grid-column:1 / -1}
.li{display:grid;grid-column:1 / -1;grid-template-columns:subgrid;
  gap:10px;align-items:center;padding:11px 10px;position:relative;
  color:var(--t1);border-radius:10px}
/* The rule between two rows is drawn on its own, straight across, rather
   than as the row's bottom border: a border follows the row's rounded
   corners, so every divider curled up at both ends. */
.li::after{content:"";position:absolute;left:0;right:0;bottom:0;height:.7px;
  background:var(--sep)}
.li:last-child::after{display:none}
.li.h{color:var(--t3);font-size:.85em}
/* The two headings that sort the list. The one in use is the darker, with a
   chevron, turned round when the order is. */
.li.h .srt{display:inline-flex;align-items:center;gap:5px;width:max-content;
  cursor:pointer;border-radius:6px}
.li.h .srt:hover,.li.h .srt.on{color:var(--t1)}
.li.h .srt.on::after{content:"";width:8px;height:8px;background:currentColor;
  -webkit-mask:url(sf/chevron.down.svg) center/contain no-repeat;
  mask:url(sf/chevron.down.svg) center/contain no-repeat}
.li.h .srt.rev::after{transform:rotate(180deg)}
.li.h .srt:focus-visible{outline:0;box-shadow:0 0 0 3px var(--g10)}
.li.on{background:var(--act2)}
.li[data-m]{cursor:pointer}
.li .nm{font-family:var(--serif);font-weight:400;color:var(--ink);font-size:1.05em;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* Moved since this person last opened it, or never opened: a dot before the
   name. Gold, because it waits on them to look. */
.nm .new{display:inline-block;width:7px;height:7px;margin:0 8px 2px 0;border-radius:50%;
  background:var(--gold);vertical-align:middle}
/* An email on this matter being read right now, turning at the row's right
   edge. */
.spin{position:absolute;right:12px;top:50%;width:14px;height:14px;margin-top:-7px;
  border:1.5px solid var(--line);border-top-color:var(--ink);border-radius:50%;
  animation:spin .8s linear infinite}
.mrow .spin{position:static;margin:0}
@keyframes spin{to{transform:rotate(360deg)}}
/* Archive, or Unarchive under the Archived filter, at the end of the row. A
   column of its own on a desktop, so the header and the rows stay one grid.
   Quiet until the pointer is on it, then the same gold the add button takes. */
.arch{height:26px;padding:0 10px;border-radius:13px;border:.7px solid var(--line);
  background:none;font:500 12px/1 var(--sans);color:var(--t2);cursor:pointer;
  white-space:nowrap;transition:border-color .18s var(--ease),background .18s var(--ease),
  color .18s var(--ease)}
.arch:hover{border-color:var(--gold);background:var(--g10);color:var(--ink)}
.arch:disabled{opacity:.55;cursor:default}
.li .arch{justify-self:end}
.mrow .arch{flex:0 0 auto;height:32px;padding:0 12px;border-radius:16px}
/* Only on the row under the pointer, wherever there is a pointer, and on the
   row keyboard focus is in. Faded rather than removed, so the row does not
   shift when it appears. A phone has nothing that hovers, so there it stays. */
@media (hover:hover){
  .li .arch,.mrow .arch{opacity:0;transition:opacity .18s var(--ease),
    border-color .18s var(--ease),background .18s var(--ease),color .18s var(--ease)}
  .li:hover .arch,.li:focus-within .arch,.mrow:hover .arch,.mrow:focus-within .arch{opacity:1}
}
.li .dim{color:var(--t2);font-size:.92em;white-space:nowrap}

/* ── the waiting bar ──────────────────────────────────────────────────────
   The API gives days; the screen decides the width. Where full is and where
   it turns gold are the firm's own tolerances, so both come from config. */
.age{height:4px;border-radius:99px;background:var(--sep);position:relative;overflow:hidden}
.age i{position:absolute;inset:0 auto 0 0;background:var(--t3);border-radius:99px;width:var(--v,40%)}
.age.hot i{background:var(--gold)}
.age-on{font:500 12.5px/1 var(--sans);color:var(--ink)}

/* ── the empty state ──────────────────────────────────────────────────────
   One quiet line. No illustration, no button, no border. It is a screen a
   lawyer sees once. Body font, not serif — serif is for client names. */
/* Centred in the space it has, not parked 38px from the top. On a tall phone
   an empty list is almost the whole screen, and a line stranded at the top of
   it reads as something that failed to load rather than as nothing to show. */
.empty{display:grid;place-items:center;text-align:center;
  min-height:min(46vh,340px);padding:24px 20px;
  color:var(--t2);font-size:.95em}

/* ── the account block ────────────────────────────────────────────────────
   The avatar sits at the bottom of the sidebar on a desktop and in the header
   on a phone — a way out has to be reachable on both. Tapping it opens one
   item. No gold: signing out is not something waiting on anyone. */
.acct{position:relative}
.me{display:flex;align-items:center;gap:10px;width:100%;padding:8px 10px;
  border:0;border-radius:14px;background:none;font:inherit;color:var(--t1);
  text-align:left;cursor:pointer}
.me:hover,.me[aria-expanded="true"]{background:var(--act2)}
/* Initials in serif, the way the presentation draws an avatar. There is no
   logo asset in the project yet — when one arrives this becomes an <img>. */
.av{width:30px;height:30px;border-radius:50%;background:var(--ink);color:var(--paper);
  display:grid;place-items:center;flex:0 0 auto;
  font:500 11px/1 var(--serif);letter-spacing:.02em}
.who{display:flex;flex-direction:column;line-height:1.3;min-width:0}
/* Ellipsis, because the name does not wrap in the rail any more — it is
   nowrap so the fold reveals it cleanly instead of reflowing it, and without
   this "Mattison (Mattie) Raiford Spaulding" was cut off mid-word with
   nothing to say it had been. Inert on a phone, where the name still wraps. */
.who b{font-weight:500;color:var(--t1);font-size:.95em;
  overflow:hidden;text-overflow:ellipsis}

.menu{position:absolute;left:0;min-width:100%;bottom:calc(100% + 6px);
  background:var(--paper);border:.7px solid var(--line);border-radius:14px;
  padding:4px;display:none;z-index:5}
.menu[data-open]{display:block}
/* The menu holds a link (Log out) and a button (Mailboxes). Styling only the
   link left the button rendering as a browser-default grey rectangle in the
   middle of the list, so both are shaped here and the button's own chrome is
   taken off. */
.menu a,.menu button{display:flex;align-items:center;gap:9px;padding:9px 12px;
  border-radius:10px;white-space:nowrap;color:var(--t1);text-decoration:none;
  font:inherit;font-size:.95em;width:100%;text-align:left;
  border:0;background:none;cursor:pointer}
.menu a:hover,.menu button:hover{background:var(--act2)}
/* The company switcher at the top of the menu: each company a row, the one
   this screen acts for marked with a gold bar and set in ink. */
.menu .cos{display:flex;flex-direction:column;padding-bottom:6px;margin-bottom:6px;
  border-bottom:.7px solid var(--sep)}
.menu .co{color:var(--t2);border-left:2px solid transparent;border-radius:0 8px 8px 0}
.menu .co.on{color:var(--ink);font-weight:600;border-left-color:var(--gold)}

/* Signing out is the one destructive thing on this screen, so it is the one
   red thing. The icon carries the colour with the word. */
.menu a.out{color:var(--red)}
.menu a.out:hover{background:var(--r08)}
.menu a.out .ic{font-size:1.15em;color:var(--red)}

/* On a phone the header has no room above it, so the one item drops down. */
.mhd .acct .menu{bottom:auto;top:calc(100% + 6px);left:auto;right:0}
.mhd .me{width:auto;padding:0}
.mhd .me .who{display:none}


/* ── the rail ─────────────────────────────────────────────────────────────
   One rail, two shapes. On a desktop it is a column beside the work and folds
   away when it is not wanted; on a phone it is a drawer that slides over.
   Same markup, same contents, same order — including the account block, which
   used to be copied into every phone header and now lives only here.

   These rules are deliberately OUTSIDE the desktop media query. They used to
   be inside it, which is exactly why the rail could not be shown on a phone
   at all: there was no way in, because there was nothing to let in. */
.side{border-right:.7px solid var(--sep);padding:16px 12px;
  display:flex;flex-direction:column;gap:2px;background:var(--paper)}
.side .wm{display:flex;align-items:center;gap:10px;
  font:500 1.35em/1.2 var(--serif);color:var(--ink);padding:4px 4px 16px 12px}
.side .wm span{flex:1;min-width:0}
.nav{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:14px;
  color:var(--t1);font-weight:500;font-size:1em;text-decoration:none}
.nav .ic{font-size:1.5em;color:var(--t2)}
.nav.on{background:var(--act2)}
a.nav{text-decoration:none}
a.nav:hover{background:var(--act2)}
/* The heading over the firm's own settings. It is what separates "a screen
   about matters" from "a screen about the firm", which is the whole reason
   Rate list and Terms came out of the main list. */
.navsec{padding:16px 12px 5px;font:600 10.5px/1 var(--sans);letter-spacing:.09em;
  text-transform:uppercase;color:var(--t3)}
/* Pinned to the foot of the rail in both shapes. It was only pinned on a
   desktop, so in the drawer it sat directly under the last link. */
.side .acct{margin-top:auto;padding-top:12px}
/* Upward, in both shapes. The avatar sits at the FOOT of the rail, so a menu
   that drops downward from it goes off the bottom of the screen — which is
   where Mailboxes and Log out were ending up on a phone. */

/* The control that takes the rail away. One button doing one thing in both
   shapes: closes the drawer on a phone, collapses the column on a desktop. */
.navx{display:grid;place-items:center;width:32px;height:32px;flex:0 0 32px;
  border:0;border-radius:50%;background:none;color:var(--t2);cursor:pointer}
.navx:hover{background:var(--act2);color:var(--ink)}
.navx .ic{width:17px;height:17px}
/* The firm's mark, for the one state that wears it: the folded rail on a
   desktop. Hidden everywhere else, and hidden HERE rather than inside that
   media query — below the breakpoint the query does not apply, and an
   unstyled 240px image was being drawn inside a 32px button in the drawer.
   26px and not the icons' 17: the mark is a drawing with its own margins
   inside the file, so matched to them by its box it reads smaller than all
   of them. */
.navx .mark{display:none;width:26px;height:26px;border-radius:6px}

/* The way in. There was none on a phone. */
.mmenu{display:grid;place-items:center;width:34px;height:34px;margin-left:-4px;
  border:0;border-radius:50%;background:none;color:var(--t1);cursor:pointer;
  flex:0 0 34px}
.mmenu:hover{background:var(--act2)}
.mmenu .ic{width:19px;height:19px}

/* ── the drawer, below the breakpoint ─────────────────────────────────────
   Off-canvas rather than display:none, so opening it is a slide rather than
   an appearance, and so the account block inside it is always in the page. */
@media (max-width:860px){
  .side{position:fixed;inset:0 auto 0 0;z-index:70;width:min(280px,82vw);
    padding-top:calc(16px + env(safe-area-inset-top));
    transform:translateX(-101%);transition:transform .28s var(--ease);
    box-shadow:0 0 40px rgba(0,0,0,.18);overflow-y:auto}
  .side[data-open]{transform:none}
  /* Tapping the scrim closes it, which is the gesture everybody already has. */
  .navscrim{position:fixed;inset:0;z-index:69;background:rgba(10,10,10,.28);
    -webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);
    opacity:0;pointer-events:none;transition:opacity .28s var(--ease)}
  .navscrim[data-open]{opacity:1;pointer-events:auto}
}

/* ── collapsed, on a desktop ─────────────────────────────────────────────── */
/* IT FOLDS TO ICONS. IT DOES NOT LEAVE.
   It used to ride off the left edge and take the whole track with it, which
   had two faults. The small one: a rail that is gone tells you nothing, so
   moving between screens meant opening it, reading it, and closing it again.
   The large one: THERE WAS NO WAY BACK. The button that reopened it lived in
   `.mhd`, the phone header, which is display:none at this width — so the rule
   under it set a button to display:grid inside a parent that was not
   displayed. Only Pipeline worked, because Pipeline alone carried a second
   copy in its desktop header.

   A sixty-pixel rail of icons cannot have that bug: the way back is IN the
   rail, on every screen, because the rail is still there. The pattern is the
   one Cem asked for and the one ChatGPT and the Heyno web app both use. */
@media (min-width:861px){
  .mmenu{display:none}
  .navscrim{display:none}

  /* The track animates — grid-template-columns interpolates between two
     lengths — and the rail's contents are clipped by their own rows while it
     moves. EACH ROW clips, not the rail: the account menu is positioned out
     of the rail and an overflow on the column itself would cut it off.

     Every label is nowrap, so nothing ever reflows. Folding takes the words
     out in one frame and the icons are already centred while the track is
     still shutting; unfolding puts them back and the rail's own edge reveals
     them as it widens, which is the movement rather than a fault in it. */
  .app,.rshell{transition:grid-template-columns .28s var(--ease)}
  .nav,.wm,.me{overflow:hidden}
  .nav span,.wm span,.who{white-space:nowrap}
  body[data-rail="off"] .app,
  body[data-rail="off"] .rshell{grid-template-columns:var(--rail) 1fr}
  body[data-rail="off"] .side{padding:16px 9px;align-items:center}

  /* The words go, rather than being squeezed. A bare text node cannot be
     hidden, which is why every label is in a span. */
  body[data-rail="off"] .nav span,
  body[data-rail="off"] .wm span,
  body[data-rail="off"] .who{display:none}

  /* An icon in the middle of its own square, and the square is the hit area.
     Nothing is a sliver of a row that used to be wide. */
  body[data-rail="off"] .nav{width:40px;padding:0;height:40px;
    justify-content:center;gap:0}
  body[data-rail="off"] .wm{padding:0 0 12px;justify-content:center}
  body[data-rail="off"] .me{width:40px;padding:0;justify-content:center}

  /* "Firm" has no room in sixty pixels, and the group still needs separating
     from the three entries above it. It becomes the rule it was always doing
     the work of. */
  body[data-rail="off"] .navsec{width:26px;height:1px;padding:0;
    margin:13px auto 11px;background:var(--sep)}
  body[data-rail="off"] .navsec span{display:none}

  /* A menu anchored to the left edge of a sixty-pixel rail is a sixty-pixel
     menu. It opens out into the work instead, the same override the phone
     header already makes for the same reason. */
  body[data-rail="off"] .acct .menu{left:0;right:auto;min-width:190px}

  /* The mark, and the control under the cursor. Both children are in the
     button; which one shows is a :hover rule rather than a script, so it
     cannot disagree with the state the rail is actually in. */
  body[data-rail="off"] .navx{width:40px;height:40px;flex:0 0 40px}
  body[data-rail="off"] .navx .mark{display:block}
  body[data-rail="off"] .navx .ic{display:none}
  body[data-rail="off"] .navx:hover .mark{display:none}
  body[data-rail="off"] .navx:hover .ic{display:block}
  body[data-rail="off"] .navx:focus-visible .mark{display:none}
  body[data-rail="off"] .navx:focus-visible .ic{display:block}
}

@media (min-width:861px){
  .mapp{display:none}
  .app{display:grid;grid-template-columns:clamp(200px,17vw,250px) 1fr;
    position:absolute;inset:0;background:var(--paper);font-size:14.5px}
  /* Two filters sit together on the pipeline header, and they wrap rather than
     squeeze on a narrow window. */
  .segs{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
  .seg span{cursor:pointer;user-select:none}
  .main{padding:16px 18px;display:flex;flex-direction:column;gap:12px;min-width:0}
  .mh{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
  /* The filters keep the right edge; New matter sits beside the heading,
     because it acts on this screen rather than filtering it. */
  .mh .segs{margin-left:auto}
  .mh h3{font:500 1.6em/1.1 var(--serif);color:var(--ink)}
  .app .pl{padding:3px 9px;font-size:.9em}

}

/* ── the tutorial card ──────────────────────────────────────────────────────
   What a screen is for, the first time somebody opens it.

   FIXED SIZE. It used to grow and shrink as the text changed, which moved the
   buttons out from under a thumb that had already gone for them. The steps
   live inside a card of one shape.

   The block at the top is where the firm's own illustration goes. Reserving
   the space now means the card does not resize on the day they arrive. */
/* Removed by tour.js rather than hidden today, but it is a fixed z-90
   layer over everything and an author `display` beats [hidden]. Guarded
   so a later refactor to hidden cannot trap the page. */
.tour[hidden]{display:none}
.tour{position:fixed;inset:0;z-index:90;display:grid;place-items:center;
  padding:var(--gut);background:rgba(10,10,10,.30);
  -webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}
.tour-card{width:min(400px,100%);height:440px;display:flex;flex-direction:column;
  background:var(--paper);border-radius:20px;border:.7px solid var(--line);
  padding:18px 20px 16px;box-shadow:0 24px 70px rgba(0,0,0,.20)}

/* The illustration. A plain block until the drawings arrive. */
.tour-art{flex:0 0 168px;border-radius:14px;background:var(--act2);
  border:.7px solid var(--line)}

.tour-of{margin-top:16px;font:600 10.5px/1 var(--sans);letter-spacing:.11em;
  text-transform:uppercase;color:var(--gold)}
.tour-card h4{margin-top:9px;font:500 20px/1.25 var(--serif);color:var(--ink)}
/* Fixed room for the body, so three lines and two lines occupy the same box. */
.tour-card p{margin-top:8px;flex:1;font:400 14.5px/1.55 var(--sans);color:var(--t2)}

.tour-go{display:flex;align-items:center;gap:8px;padding-top:6px}
.tour-dots{flex:1;display:flex;gap:6px;justify-content:center}
.tour-dot{width:7px;height:7px;padding:0;border:0;border-radius:50%;
  background:var(--line);cursor:pointer}
.tour-dot.on{background:var(--gold)}

/* Arrows, because the dots alone gave no way back. */
.tour-arrow{display:grid;place-items:center;width:40px;height:40px;flex:0 0 40px;
  border:.7px solid var(--line);border-radius:50%;background:none;color:var(--t2);
  cursor:pointer}
.tour-arrow .ic{width:17px;height:17px}
.tour-arrow:hover:not([disabled]){border-color:var(--g30);color:var(--ink)}
.tour-arrow[disabled]{opacity:.3;cursor:default}
.tour-arrow.next{background:var(--act);border-color:var(--act);color:var(--on-act)}
.tour-arrow.next.last{background:var(--gold);border-color:var(--gold)}

.tour-skip{border:0;background:none;font:500 13px/1 var(--sans);color:var(--t3);
  cursor:pointer;padding:12px 8px}
.tour-skip:hover{color:var(--ink)}

/* The rail's own New matter button used to be defined here, from back when
   this action lived in the navigation. It was moved onto the Pipeline and no
   template has used the rail version since — but the rule stayed, and the
   `margin:0 0 14px` on it went on applying to all three buttons that DO
   exist. In a flex row with align-items:center it is the margin box that gets
   centred, so a 14px bottom margin lifts the button 7px above the title it is
   meant to sit beside. That is the "not aligned" on the desktop header, and
   it is the second time this exact rule has caused it. Deleted, not
   overridden, so there is no third time. */

/* A rail entry for something that does not exist yet. It says so rather than
   looking like a link that is broken — the first reads as a bug, this reads
   as a roadmap. It is not tappable, so it cannot fail. */
.nav.soon{opacity:.45;cursor:default}
.nav.soon:hover{background:none;color:inherit}
.nav.soon i{margin-left:auto;font-style:normal;font-size:10px;font-weight:600;
  letter-spacing:.06em;text-transform:uppercase;color:var(--t3)}

/* ── New matter ──────────────────────────────────────────────────────────── */

/* On the Pipeline, not in the rail. It is an action of this screen — the rail
   is for going places, and opening a matter is not a place. */
/* --ctl is the height every control in a screen header shares: this button and
   the filter pills beside it. They were 32px and ~28px, which is not a
   difference anybody names but is the reason the row looked unsettled. One
   token, so they cannot drift apart again. */
.newm{display:inline-flex;align-items:center;gap:7px;flex:0 0 auto;
  height:var(--ctl);margin:0;
  padding:0 13px;border-radius:calc(var(--ctl) / 2);
  /* Dashed and unfilled: it is something to do, not something that has
     happened. The same reading as every other add box in the product. */
  border:1px dashed var(--g30);background:none;
  font:500 13px/1 var(--sans);color:var(--gold);text-decoration:none;cursor:pointer;
  white-space:nowrap;transition:border-color .18s var(--ease),background .18s var(--ease)}
/* The fill arrives on hover only. */
.newm:hover{border-color:var(--gold);background:var(--g10)}
.newm .ic{width:14px;height:14px}
/* On a phone it is the plus alone: the header has a name and an avatar in it
   already, and a third label is what makes a header stop being one. */


/* ── a sheet ─────────────────────────────────────────────────────────────── */

.sheet{position:fixed;inset:0;z-index:40;background:rgba(10,10,10,.28);
  -webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);
  display:flex;align-items:flex-end;justify-content:center}
/* An author `display` beats the browser's own [hidden] rule, so the line above
   kept this sheet on screen no matter what the `hidden` attribute said — a
   fixed, full-screen, z-index-40 layer over the whole Pipeline that swallowed
   every click. The overlay below carries the identical fix for .ov; the lesson did
   not travel with the pattern. Any element styled with `display` and toggled
   by `hidden` needs this line. */
.sheet[hidden]{display:none}

/* ── the overlay ─────────────────────────────────────────────────────────── */
/* Here rather than in terms.css, because every screen with the rail can
   open one: the mailbox sheet sits behind the avatar everywhere, and the
   record page never loaded terms.css, so on a matter it opened unstyled. */
/* A plain dim behind the sheet, the same everywhere: the page stays there,
   quieter, and the sheet is the one thing lit. */
.ov{position:fixed;inset:0;z-index:80;display:grid;place-items:end center;
  background:rgba(10,10,12,.36)}
/* The JavaScript closes this by setting the `hidden` property, but a class
   rule beats the browser's own [hidden] default, so `display:grid` above kept
   winning and the sheet sat open and empty over Terms and Routing on load.
   Closed has to be said in the same voice as open. */
.ov[hidden]{display:none}
.ov-sheet{width:min(560px,100%);max-height:88vh;overflow-y:auto;
  background:var(--card);
  border:.7px solid var(--line);border-radius:20px 20px 0 0;
  box-shadow:0 -10px 50px rgba(0,0,0,.14);
  padding:18px var(--gut) calc(20px + env(safe-area-inset-bottom))}
@media (min-width:600px){
  .ov{place-items:center}
  .ov-sheet{border-radius:18px;max-height:82vh;padding:20px 22px 22px}
}
.ov-hd{display:flex;align-items:flex-start;gap:12px}
.ov-hd h4{flex:1;font:400 20px/1.2 var(--serif);color:var(--ink)}
.ov-hd h4 .ic{width:22px;height:22px;vertical-align:-4px;margin-right:9px}
.ov-x{flex:0 0 30px;width:30px;height:30px;border:0;border-radius:50%;background:none;
  font-size:0;color:var(--t3);cursor:pointer;position:relative}
/* SF's xmark, as a mask so it wears the button's colour. */
.ov-x::before,.sheet-x::before{content:"";position:absolute;left:50%;top:50%;
  width:12px;height:12px;transform:translate(-50%,-50%);background:currentColor;
  -webkit-mask:url(sf/xmark.svg) center/contain no-repeat;
  mask:url(sf/xmark.svg) center/contain no-repeat}
.ov-x:hover{background:var(--act2);color:var(--ink)}

.ov-l{display:block;margin-top:16px;font:500 11px/1 var(--sans);letter-spacing:.06em;
  text-transform:uppercase;color:var(--t3)}
.ov-body textarea,.ov-body input{display:block;width:100%;margin-top:7px;
  border:.7px solid var(--line);border-radius:11px;background:var(--card);padding:12px 13px;
  /* 16px exactly. Anything smaller and iOS zooms the page on focus, which
     drags the field out from under the thumb that just tapped it. */
  font:400 16px/1.55 var(--sans);color:var(--ink);resize:vertical}
.ov-body textarea{min-height:130px}
.ov-body textarea[hidden],.ov-body input[hidden]{display:none}
.ov-body textarea:focus,.ov-body input:focus{outline:0;border-color:var(--gold);
  box-shadow:0 0 0 3px var(--g10)}

.ov-meta{margin-top:10px;font-size:12.5px;line-height:1.5;color:var(--t3)}
/* What a delete does, said before the box the attorney writes in. */
.ov-warn{margin:12px 0 0;padding:10px 12px;border-radius:9px;background:var(--r08);
  color:var(--red);font-size:13.5px;line-height:1.5}

.ov-go{display:flex;gap:10px;margin-top:18px}
.ov-go button{flex:1;height:46px;border:0;border-radius:14px;font:500 15px/1 var(--sans);
  cursor:pointer;background:var(--act2);color:var(--t1)}
.ov-go button.f{background:var(--act);color:var(--on-act)}
.ov-go button[disabled]{opacity:.35;cursor:default}

/* The account sheet's cards: mailboxes and Slack. Here and not in terms.css,
   because the sheet opens from every screen and the record page never loaded
   terms.css: there the cards drew as bare text and the buttons as plain
   links. */
/* Who is signed in, at the top of the sheet. It opened straight onto a bare
   address with nothing saying whose account it was. */
/* One card per mailbox, and that is the whole sheet. It used to be a header
   for whoever was signed in and then a row per mailbox, which with one
   connected box — the ordinary case — was the same person twice and the same
   address twice, with two rules four pixels apart between them: the header
   drew a border under itself and the row drew one over itself, and
   `.mb-row:first-child` could never match with the header in front of it. */
.mb-card{border:.7px solid var(--line);border-radius:15px;background:var(--card);
  padding:14px 15px;margin-top:10px}
.mb-card:first-child{margin-top:2px}
.mb-top{display:flex;align-items:center;gap:11px}
.mb-av{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;
  background:var(--act);color:var(--on-act);font:600 13px/1 var(--sans);flex:0 0 38px}
.mb-t{flex:1;min-width:0}
.mb-t b{display:block;font:500 14.5px/1.3 var(--sans);color:var(--ink)}
.mb-t span{display:block;margin-top:1px;font-size:12.5px;color:var(--t3);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* What was granted, in the words Google used when it asked. */
.mb-g{display:flex;flex-wrap:wrap;gap:5px;margin-top:11px}
/* What Google actually granted, as pills. `.tag` was only ever styled inside
   the roster table on Routing, so here the labels were rendering as four bare
   words in a row — which reads as a sentence that lost its punctuation
   rather than as a list of permissions. */
.mb-g .tag{background:var(--act2);border-radius:999px;padding:3px 9px;
  font:500 11.5px/1.4 var(--sans);color:var(--t2)}
.mb-m{margin-top:4px;font-size:12.5px;color:var(--t3)}
/* The one line that must not read like a date. */
.mb-e{margin-top:6px;font-size:12.5px;line-height:1.45;color:var(--red);
  background:var(--r08);border-radius:8px;padding:6px 9px}
.mb-fix,.mb-add{display:inline-flex;align-items:center;justify-content:center;
  margin-top:9px;height:38px;padding:0 16px;border-radius:999px;
  font:500 13.5px/1 var(--sans);text-decoration:none}
.mb-fix{background:var(--r08);color:var(--red)}
.mb-add{display:flex;margin-top:16px;height:46px;border-radius:14px;
  background:var(--act);color:var(--on-act);font-size:15px}


/* ── the form, full screen on a phone ─────────────────────────────────────
   It was a sheet floating over the Pipeline, and on a phone that is the wrong
   shape: the keyboard comes up, the sheet is squeezed between it and the
   scrim, and the description box ends up in a few scrollable pixels that
   fight the page behind it. Full screen means the form owns the viewport, the
   close button is where a close button goes, and there is only one thing that
   scrolls. */
.sheet-c{display:flex;flex-direction:column;width:100%;height:100%;
  background:var(--paper);border-radius:0;
  padding:calc(14px + env(safe-area-inset-top)) var(--gut)
          calc(16px + env(safe-area-inset-bottom))}
.sheet-h{display:flex;align-items:center;justify-content:space-between;
  gap:12px;flex:0 0 auto;padding-bottom:16px}
.sheet-h b{font:500 21px/1 var(--serif);color:var(--ink)}
.sheet-x{display:grid;place-items:center;width:34px;height:34px;flex:0 0 34px;
  border:0;border-radius:50%;background:var(--act2);position:relative;
  font-size:0;color:var(--t2);cursor:pointer}
.sheet-x:hover{color:var(--ink)}

/* The middle scrolls; the heading and the buttons do not. That is what keeps
   the two actions reachable with the keyboard up. */
.sheet-b{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch}

.sheet-l{display:block;font:500 11px/1 var(--sans);letter-spacing:.07em;
  text-transform:uppercase;color:var(--t3);margin:0 0 7px}
.sheet-i,.sheet-t{width:100%;border:.7px solid var(--line);border-radius:12px;
  background:var(--card);padding:12px 13px;color:var(--ink);margin-bottom:16px;
  /* 16px exactly, or iOS zooms the page on focus and the form jumps. */
  font:400 16px/1.5 var(--sans);resize:vertical}
.sheet-t{font-family:var(--serif);line-height:1.6;min-height:38vh}
.sheet-i:focus,.sheet-t:focus{outline:0;border-color:var(--gold);
  box-shadow:0 0 0 3px var(--g10)}
.sheet-i::placeholder,.sheet-t::placeholder{color:var(--t3)}
.sheet-hint{margin:-10px 0 16px;font:400 12.5px/1.5 var(--sans);color:var(--t3)}

.sheet-e{margin:0 0 14px;padding:10px 12px;border-radius:10px;
  background:var(--r08);font:400 13px/1.5 var(--sans);color:var(--red)}
/* Stated even though nothing here sets display, because this element is now
   the only way dictation can report a problem, and an author display rule
   added above it would silence every one of them. Three sheets in this file
   have already been broken that way. */
.sheet-e[hidden]{display:none}
/* Same line, saying which engine is listening rather than what went wrong.
   Grey because nothing is broken — but still shown, because the one rule
   dictation keeps is that it never changes engine without saying so. */
.sheet-e.quiet{background:var(--wash);color:var(--t2)}

/* Pinned to the bottom, above the keyboard, always reachable. */
.sheet-f{flex:0 0 auto;padding-top:14px;border-top:.7px solid var(--line)}
.sheet-go{display:grid;gap:10px}
.sheet-go .btn{border-radius:13px;padding:15px;text-align:center;cursor:pointer;
  border:.7px solid var(--line);background:var(--card);color:var(--t1);
  font:500 15px var(--sans)}
.sheet-go .btn.f{background:var(--act);color:var(--on-act);border-color:var(--act)}
.sheet-go .btn[aria-disabled="true"]{opacity:.32;cursor:default}
.sheet-go .btn:not([aria-disabled="true"]):hover{opacity:.88}
.sheet-n{margin-top:12px;font:400 12.5px/1.55 var(--sans);color:var(--t3);
  text-align:center}

/* On anything with room it goes back to being a panel. */
@media (min-width:640px){
  .sheet{align-items:center}
  .sheet-c{width:min(560px,100%);height:auto;max-height:90vh;
    border:.7px solid var(--line);border-radius:20px;padding:22px 24px 24px}
  .sheet-t{min-height:150px}
  .sheet-go{grid-template-columns:1fr 1fr}
}

/* ── clients ─────────────────────────────────────────────────────────────── */

/* The promise, on the screen. Not a footnote in a document nobody opens. */
.cnote{margin:26px var(--gut) 34px;
  font:400 13px/1.65 var(--sans);color:var(--t3);max-width:60ch}

/* ── a client row ────────────────────────────────────────────────────────── */
/* Its own shape rather than Documents' four-column grid, which stacks into
   four loose lines on a phone. A name, one line under it, and when they
   became a client — the same reading at every width. */
.clis{padding:0 var(--gut) 34px}
/* Under the title on a desktop, as Documents is, so the names and the
   highlight start where the heading does. */
@media (min-width:861px){ .clis{padding:0 0 40px} }
/* A line under every client, the last one included, so one client already
   reads as the start of a list. */
.cli{display:flex;align-items:baseline;gap:12px;width:100%;text-align:left;
  border:0;background:none;font:inherit;color:inherit;cursor:pointer;
  padding:14px 0;border-bottom:.7px solid var(--sep)}
.cli:hover{background:var(--hover)}
.cli-l{flex:1;min-width:0}
.cli-n{font:400 16px/1.3 var(--serif);color:var(--ink)}
.cli-m{margin-top:3px;font:400 12.5px/1.5 var(--sans);color:var(--t2)}
.cli-w{flex:0 0 auto;font:400 12px/1 var(--sans);color:var(--t3);white-space:nowrap}
.ov-body .cnote{margin-top:18px;border-top:0;padding-top:0}

.cgrp{font:500 11px/1 var(--sans);letter-spacing:.07em;text-transform:uppercase;
  color:var(--t3);margin:22px 0 4px}
.crow{display:flex;flex-direction:column;gap:2px;padding:11px 0;
  border-bottom:.5px solid var(--sep);text-decoration:none;color:inherit}
.crow:last-of-type{border-bottom:0}
.crow b{font:600 14.5px/1.3 var(--sans);color:var(--ink)}
.crow span{font:400 12.5px/1.4 var(--sans);color:var(--t2)}
.crow.go{cursor:pointer}
.crow.go:hover b{color:var(--gold)}
/* Deleting a client, at the foot of their sheet, in the colour the design
   keeps for acts that cannot be taken back from here. */
.cdel{display:block;width:100%;margin-top:18px;padding:13px 0 2px;border:0;
  border-top:.7px solid var(--sep);background:none;text-align:left;
  font:500 13.5px/1.35 var(--sans);color:var(--red);cursor:pointer}
.cdel:disabled{opacity:.42;cursor:default}
.cdel-no{margin-top:14px;font:400 12.5px/1.5 var(--sans);color:var(--t2)}
.sheet-hint{margin:-10px 0 16px;font:400 12.5px/1.5 var(--sans);color:var(--t3)}
.sheet-go .btn[aria-disabled="true"]{opacity:.32;cursor:default}

/* Two switches on one line on a phone: whose matters, and which are waiting.
   They scroll rather than wrap, because a filter row that becomes two rows
   pushes the list itself below the fold on a small screen. */
/* It used to carry .mnav as well, which is where its flex came from; on its
   own the switches stretched to the full width. */
.mfil{display:flex;gap:8px;align-items:center;overflow-x:auto;
  scrollbar-width:none;-ms-overflow-style:none}
.mfil::-webkit-scrollbar{display:none}
.mfil .seg{flex:0 0 auto}

/* ── the pipeline, on the shared shell ───────────────────────────────────── */
/* The list has two renderings and the width picks one. This used to be done by
   showing a whole second layout; now it is only the list, which is the only
   part that genuinely differs. */
#pipe-desktop{display:none}
.mhd b{font:500 19px/1 var(--serif);color:var(--ink);flex:1;min-width:0}
.mhd .newm{flex:0 0 34px;width:34px;height:34px;padding:0;margin:0;
  justify-content:center;align-self:center}
/* The plus, the filter and the menu are three controls on one line, so they
   are one size and one baseline. The plus was sitting seven pixels high
   because it is an inline-flex pill and the others are grids. */
.mhd .mmenu,.mhd .mfilt,.mhd .rost-add{align-self:center}
/* The plus and the filter sit side by side in the header, so they are one
   size. The plus carries a dashed ring and the filter does not, which is the
   only difference between them — one is an action, the other a state. */
.mhd .newm .ic,.mfilt .ic{width:18px;height:18px}
.rmain > .mfil{padding:2px var(--gut) 10px}
/* Below the breakpoint the phone header already carries the New matter
   button and .mfil carries the switches, so the desktop header keeps only
   the title or the screen says everything twice.
   `.mh .mmenu` used to be in this list. There is no menu button in a desktop
   header any more — the rail folds to icons rather than leaving, so the way
   back is in the rail on every screen instead of in a duplicate control that
   only Pipeline ever had. */
@media (max-width:860px){
  .rmain .mh .newm,
  .rmain .mh .segs{display:none}
}

@media (min-width:861px){
  #pipe-phone{display:none}
  #pipe-desktop{display:block}
  /* The two switches belong in the header at this width, where there is room
     for their full labels. */
  .rmain > .mfil{display:none}
  .rmain .mh{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
  .rmain .mh .segs{margin-left:auto}
}

/* ── the filter, on a phone ──────────────────────────────────────────────── */
/* A button in the header rather than a row of switches on top of the list.
   The list is the screen; the controls are not. */
.mfilt{position:relative;display:grid;place-items:center;width:34px;height:34px;
  flex:0 0 34px;border:0;border-radius:50%;background:none;color:var(--t1);
  cursor:pointer}
.mfilt:hover{background:var(--act2)}
.mfilt.on{color:var(--gold)}
.mfilt .ic{width:19px;height:19px}
/* A dot, not a number. It says "this list is not showing everything", which is
   the only thing somebody needs to know before they go looking. */
.mfilt i{position:absolute;top:5px;right:5px;width:7px;height:7px;
  border-radius:50%;background:var(--gold)}

/* The switches inside the sheet, where there is room for full labels. */
.fgrp{margin-bottom:22px}
.fgrp .sheet-l{margin-bottom:9px}
.seg.wide{display:flex;width:100%}
.seg.wide span{flex:1;text-align:center;padding:10px 12px;font-size:14px}

@media (min-width:861px){ .mfilt{display:none} }

/* ── reachable, on a touch screen ────────────────────────────────────────── */
/*
   Two things this needed and did not have.

   A tap target you can actually hit. Apple's own floor is 44 by 44 points and
   several controls here were 30 to 34 — fine under a mouse, a miss under a
   thumb on a moving train. The visible shape stays the size it was; the
   target grows around it with a pseudo-element, so nothing is redrawn.

   And a visible focus ring. Somebody navigating by keyboard, or with a
   switch, had no idea where they were: the browser's default outline was
   being suppressed by the reset at the top of this file and never replaced.
*/
@media (max-width:860px){
  .mmenu,.mfilt,.navx,.sheet-x,.ov-x,.me,.mback,.newm,.sw{position:relative}
  .mmenu::after,.mfilt::after,.navx::after,.sheet-x::after,.ov-x::after,
  .sw::after,
  .mback::after,.newm::after{
    content:'';position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);
    width:max(100%,44px);height:max(100%,44px)}
}

/* One ring, everywhere something can be focused. Gold, because that is the
   colour this design already uses for "here is the thing". */
a:focus-visible,button:focus-visible,input:focus-visible,
textarea:focus-visible,select:focus-visible,[tabindex]:focus-visible{
  outline:2px solid var(--gold);outline-offset:2px;border-radius:8px}

/* A drawer, a sheet and an overlay are all modal. Saying so lets a screen
   reader announce them as such rather than reading the page behind. */
.side[data-open],.sheet:not([hidden]),.ov:not([hidden]){isolation:isolate}

/* A count beside a title in the page header. Same pill the roster used. */
.hcount{flex:0 0 auto;font:500 12px/1 var(--sans);color:var(--t3);
  background:var(--act2);border-radius:999px;padding:5px 9px}
@media (min-width:861px){ .hcount{display:none} }

/* ── dictating ───────────────────────────────────────────────────────────── */
/* The microphone sits on the label's line, next to the box it writes into.
   Hidden until the browser says it can do this — see dictation() in
   pipeline.js; a mic that does nothing when pressed is worse than none. */
.sheet-lr{display:flex;align-items:center;justify-content:space-between;
  gap:12px;margin-bottom:7px}
.sheet-lr .sheet-l{margin:0}
.mic{display:inline-flex;align-items:center;gap:6px;flex:0 0 auto;
  height:30px;padding:0 11px;border-radius:15px;cursor:pointer;
  border:1px dashed var(--g30);background:none;color:var(--gold);
  font:500 12.5px/1 var(--sans);
  transition:background .18s var(--ease),border-color .18s var(--ease)}
.mic:hover{border-color:var(--gold);background:var(--g10)}
.mic .ic{width:15px;height:15px}
/* Listening. Solid, and breathing, so there is no doubt it is on — a live
   microphone that looks idle is the one nobody turns off. */
.mic.on{border-style:solid;border-color:var(--gold);background:var(--gold);
  color:var(--paper);animation:mic-live 1.6s var(--ease) infinite}
@keyframes mic-live{
  0%{box-shadow:0 0 0 0 rgba(203,150,18,.45)}
  70%{box-shadow:0 0 0 9px rgba(203,150,18,0)}
  100%{box-shadow:0 0 0 0 rgba(203,150,18,0)}
}

/* Beside a status, never instead of one. The firm's vocabulary has no word
   for "sent, and the record has moved since" — so this is a fact about the
   matter rather than a status, and it must not look like one. */
.chg{display:inline-block;margin-left:8px;padding:3px 8px;border-radius:999px;
  border:1px dashed var(--red);color:var(--red);background:var(--r08);
  font:600 10.5px/1.35 var(--sans);letter-spacing:.02em;white-space:nowrap;
  vertical-align:middle}

/* REQ-8.1.4 — a lead from somebody the firm already acts for. Green, which in
   this palette means one thing only: a check that came back clear. This is
   the good kind of surprise, and it must not read like the red one beside it. */
/* Held open by an attorney, so the lapse never voids it. Plain rather than
   gold or red: it is neither a warning nor something waiting on anybody. It
   is a decision somebody made, and the row says so. */
.held{display:inline-block;margin-left:8px;padding:3px 8px;border-radius:999px;
  border:.7px solid var(--line);color:var(--t2);background:var(--act2);
  font:600 10.5px/1.35 var(--sans);letter-spacing:.02em;white-space:nowrap;
  vertical-align:middle}

.known{display:inline-block;margin-left:8px;padding:3px 8px;border-radius:999px;
  border:.7px solid var(--gr30);color:var(--grn);background:var(--gr10);
  font:600 10.5px/1.35 var(--sans);letter-spacing:.02em;white-space:nowrap;
  vertical-align:middle}
