/* Client Portal + E-sign — pack styles.
   Only what the engine primitives do not already cover, and everything below
   uses the engine's tokens so light, dark and the accent all follow along.

   The one token this pack overrides is --accent-on, the text colour that sits
   on the accent. The engine's default ink is a warm near black tuned for an
   amber pack; on this crimson it measures 2.6:1, where white measures 7.2:1.
   The dark theme lightens the accent to 58%, where white drops to 3.9:1 and a
   deep crimson ink measures 5.0:1, so each theme gets the one that wins.
*/

:root { --accent-on: #fff; }
[data-theme="dark"] { --accent-on: hsl(350 30% 6%); }

/* ---------------------------------------------------------- small bits -- */

/* The page title has to stay readable: the face toggle, the client picker and
   the primary action all live in the top bar, and the engine lets the titles
   shrink to nothing before it will wrap them. */
@media (min-width: 901px) { .top__titles { min-width: 150px; } }
@media (min-width: 1200px) { .top__titles { min-width: 190px; } }

.input--slim { height: 30px; font-size: 12.5px; padding: 0 24px 0 9px; width: auto; min-width: 132px; max-width: 208px; }

.kpis { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); }

.kvs { display: flex; flex-direction: column; }
.kvs .kv + .kv { border-top: 1px solid var(--line-2); }

.pill {
  display: inline-flex; align-items: center; gap: 4px;
  font: 700 10px var(--mono); letter-spacing: 0.01em;
  color: var(--ink-2); background: var(--surface-2);
  border-radius: 999px; padding: 2px 8px; white-space: nowrap;
}
.pill--warn { color: var(--warn); background: var(--warn-soft); }
.pill--ok { color: var(--ok); background: var(--ok-soft); }
.pill--bad { color: var(--bad); background: var(--bad-soft); }

.who { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-2); font-weight: 500; min-width: 0; }
.who span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who .avatar { font-weight: 700; }

.badge--stage::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--dot, var(--accent)); margin-right: 6px; flex: 0 0 auto;
}

.notecard {
  font-size: 12.5px; line-height: 1.55; color: var(--ink-2);
  background: var(--surface-2); border-radius: var(--radius-sm);
  padding: 10px 12px; border: 1px solid var(--line);
}
.notecard--warn { border-color: var(--warn); background: var(--warn-soft); color: var(--ink-2); }

.ministat { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; }
.ministat__l { font-size: 11px; color: var(--ink-mute); }
.ministat__v { font-size: 19px; font-weight: 700; color: var(--ink); margin-top: 2px; letter-spacing: -0.02em; }

.detail { display: flex; flex-direction: column; gap: 18px; }
.detail__top { display: flex; align-items: flex-start; gap: 12px; }
.detail__v { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; color: var(--ink); font-family: var(--display); }
.detail__vs { font-size: 12px; color: var(--ink-mute); margin-top: 4px; line-height: 1.5; }
.detail__sec { display: flex; flex-direction: column; gap: 9px; }

.minilist { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; list-style: none; margin: 0; padding: 0; }
.minilist li + li { border-top: 1px solid var(--line-2); }
.minilist__i, .minilist__plain {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 9px 12px;
  border: 0; background: none; text-align: left; font: inherit; color: var(--ink);
}
.minilist__i { cursor: pointer; }
.minilist__i:hover { background: var(--surface-2); }
.minilist__t { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.minilist__d { font-size: 11px; color: var(--ink-mute); white-space: nowrap; }
.minilist__v { font-size: 12px; font-weight: 600; white-space: nowrap; }

.switchrow { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.switchrow .switch__i { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switchrow .switch__t {
  width: 36px; height: 20px; border-radius: 999px; flex: 0 0 auto;
  background: var(--surface-3); border: 1px solid var(--line); position: relative; transition: background var(--t-fast) var(--ease);
}
.switchrow .switch__t::after {
  content: ""; position: absolute; top: 1px; left: 1px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-1);
  transition: transform var(--t-fast) var(--ease);
}
.switchrow .switch__i:checked + .switch__t { background: var(--accent); border-color: var(--accent); }
.switchrow .switch__i:checked + .switch__t::after { transform: translateX(16px); }
.switchrow .switch__i:focus-visible + .switch__t { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ------------------------------------------------------- the two faces -- */

.faceseg {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface-2); padding: 2px; gap: 2px; flex: 0 0 auto;
}
.faceseg__b {
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 11px; border: 0; border-radius: 999px;
  background: none; cursor: pointer;
  font: 600 12px var(--sans); color: var(--ink-mute);
}
.faceseg__b:hover { color: var(--ink); }
.faceseg__b.is-on { background: var(--accent); color: var(--accent-on); box-shadow: var(--shadow-1); }
.faceseg__b .ic { opacity: 0.72; }
.faceseg__b.is-on .ic { opacity: 1; }

/* -------------------------------------------------------- project board -- */

.boardbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.boardbar .tbl__search { flex: 1 1 240px; min-width: 0; }
.boardbar .input--slim { flex: 0 0 auto; }
.boardbar__hint { font-size: 11.5px; color: var(--ink-mute); flex: 1 1 260px; min-width: 0; }

.pc__top { display: flex; align-items: flex-start; gap: 8px; }
.pc__t { flex: 1; font-size: 12.5px; font-weight: 600; line-height: 1.34; color: var(--ink); }
.pc__v { font: 600 11.5px var(--mono); white-space: nowrap; color: var(--ink); }
.pc__client { font-size: 11.5px; color: var(--ink-2); margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc__m { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.pc__f { display: flex; align-items: center; gap: 7px; margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--line-2); }
.pc__age { font: 500 10.5px var(--mono); color: var(--ink-mute); white-space: nowrap; margin-left: auto; }
.pc__open {
  border: 0; background: none; padding: 2px; cursor: pointer;
  color: var(--ink-mute); border-radius: 5px; display: grid;
}
.pc__open:hover { background: var(--accent-soft); color: var(--accent-ink); }

.stagebar { display: flex; gap: 3px; flex-wrap: wrap; }
.stagebar__s {
  flex: 1 1 90px; min-width: 0;
  border: 0; border-radius: 4px; cursor: pointer;
  padding: 6px 4px 7px;
  background: var(--surface-2); color: var(--ink-mute);
  font: 600 10.5px var(--sans);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-bottom: 3px solid var(--line);
}
.stagebar__s:hover { color: var(--ink); }
.stagebar__s.is-done { color: var(--ink-2); border-bottom-color: var(--st-c, var(--accent)); }
.stagebar__s.is-on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; border-bottom-color: var(--st-c, var(--accent)); }

/* ------------------------------------------------------------ documents -- */

.docrow__ic {
  width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center;
  flex: 0 0 auto; background: var(--surface-2); color: var(--ink-mute);
}
.docrow__ic--sign { background: var(--accent-soft); color: var(--accent-ink); }
.docrow__ic--late { background: var(--bad-soft); color: var(--bad); }
.docrow__ic--ok { background: var(--ok-soft); color: var(--ok); }
.docrow__ic--shared { background: var(--info-soft); color: var(--info); }
.docrow__ic--grey { background: var(--surface-2); color: var(--ink-mute); }

.sheet { flex: 0 0 auto; line-height: 0; color: var(--ink-2); }
.sheet svg { max-width: 100%; height: auto; border-radius: 4px; box-shadow: var(--shadow-1); display: block; }
.sheet--big svg { box-shadow: var(--shadow-2); }

.revs { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; list-style: none; margin: 0; padding: 0; }
.revs__i { display: flex; align-items: center; gap: 11px; padding: 9px 12px; }
.revs__i + .revs__i { border-top: 1px solid var(--line-2); }
.revs__i.is-now { background: var(--surface-2); }
.revs__n {
  width: 26px; height: 26px; border-radius: 6px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line);
  font: 700 11px var(--mono); color: var(--ink-2);
}
.revs__i.is-now .revs__n { background: var(--accent); border-color: var(--accent); color: var(--accent-on); }
.revs__t { font-size: 12.5px; color: var(--ink); }
.revs__m { font: 500 10.5px var(--mono); color: var(--ink-mute); margin-top: 2px; }

/* ------------------------------------------------------------ signature -- */

.audit { display: flex; flex-direction: column; gap: 0; list-style: none; margin: 0; padding: 0; }
.audit__i { display: flex; gap: 11px; position: relative; padding-bottom: 14px; }
.audit__i:last-child { padding-bottom: 0; }
.audit__i:not(:last-child)::before { content: ""; position: absolute; left: 12px; top: 27px; bottom: 2px; width: 1.5px; background: var(--line); }
.audit__d {
  width: 25px; height: 25px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; background: var(--surface-2);
  border: 1px solid var(--line); color: var(--ink-2); z-index: 1;
}
.audit__d--ok { background: var(--ok-soft); border-color: var(--ok-soft); color: var(--ok); }
.audit__d--bad { background: var(--bad-soft); border-color: var(--bad-soft); color: var(--bad); }
.audit__d--warn { background: var(--warn-soft); border-color: var(--warn-soft); color: var(--warn); }
.audit__d--accent { background: var(--accent-soft); border-color: var(--accent-soft-2); color: var(--accent-ink); }
.audit__t { font-size: 12.5px; font-weight: 600; color: var(--ink); padding-top: 3px; }
.audit__x { font-size: 11.5px; color: var(--ink-2); margin-top: 2px; line-height: 1.45; overflow-wrap: anywhere; }
.audit__m { font-size: 10.5px; color: var(--ink-mute); margin-top: 3px; }

.signblock {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface-2); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 5px;
}
.signblock__l { font: 700 9.5px var(--sans); letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-mute); }
.signblock__v { font: 400 26px/1.3 var(--display); color: var(--ink); letter-spacing: 0.01em; }
.signblock__r { font-size: 11px; color: var(--ink-mute); border-top: 1px solid var(--line); padding-top: 8px; overflow-wrap: anywhere; }

/* --------------------------------------------------------------- access -- */

.linkbox {
  display: flex; align-items: center; gap: 10px;
  border: 1px dashed var(--line); border-radius: var(--radius-sm);
  padding: 10px 12px; background: var(--surface-2);
}
.linkbox__l { font: 700 9.5px var(--sans); letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-mute); }
.linkbox__v { font-size: 12px; color: var(--ink); margin-top: 3px; overflow-wrap: anywhere; }

.email { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.email__head {
  display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 3px 10px;
  padding: 11px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.email__l { font: 700 9.5px var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-mute); padding-top: 2px; }
.email__v { font-size: 12px; color: var(--ink); overflow-wrap: anywhere; }
.email__body { padding: 14px; display: flex; flex-direction: column; gap: 9px; }
.email__body p { font-size: 12.5px; line-height: 1.6; color: var(--ink-2); }
.email__cta {
  align-self: flex-start; background: var(--accent); color: var(--accent-on);
  border-radius: var(--radius-sm); padding: 8px 14px; font-weight: 600; font-size: 12.5px;
}
.email__link { font-size: 11.5px; color: var(--accent-ink); overflow-wrap: anywhere; }

/* --------------------------------------------------------- staff cards -- */

.people { display: flex; flex-direction: column; gap: 10px; }
.person { display: flex; align-items: center; gap: 11px; }
.person__t { flex: 1; min-width: 0; }
.person__n { font-size: 13px; font-weight: 600; color: var(--ink); }
.person__r { font-size: 11.5px; color: var(--ink-mute); line-height: 1.4; overflow-wrap: anywhere; }
.person__a { display: flex; gap: 5px; flex: 0 0 auto; }

/* ------------------------------------------------------------- messages -- */

.grid--msg { grid-template-columns: minmax(0, 330px) minmax(0, 1fr); align-items: start; }

.threadlist { display: flex; flex-direction: column; max-height: 560px; overflow-y: auto; }
.threadlist__i {
  display: flex; align-items: flex-start; gap: 10px;
  width: 100%; padding: 11px 13px; border: 0; border-bottom: 1px solid var(--line-2);
  background: none; text-align: left; font: inherit; cursor: pointer;
}
.threadlist__i:last-child { border-bottom: 0; }
.threadlist__i:hover { background: var(--surface-2); }
.threadlist__i.is-on { background: var(--accent-soft); }
.threadlist__t { flex: 1; min-width: 0; }
.threadlist__n { font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.threadlist__p { font-size: 11px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.threadlist__s { font-size: 11px; color: var(--ink-mute); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.threadlist__r { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: 0 0 auto; }
.threadlist__d { font: 500 10px var(--mono); color: var(--ink-mute); white-space: nowrap; }

.thread { display: flex; flex-direction: column; gap: 12px; }
.thread--pane { max-height: 420px; overflow-y: auto; padding-right: 2px; }
.thread__i { display: flex; gap: 10px; }
.thread__i--me { flex-direction: row-reverse; }
.thread__b { max-width: 78%; min-width: 0; }
.thread__i--me .thread__b { text-align: right; }
.thread__m { font: 500 10.5px var(--mono); color: var(--ink-mute); margin-top: 4px; }

.msgbubble {
  padding: 10px 12px; border-radius: 3px 12px 12px 12px;
  background: var(--accent-soft); color: var(--accent-ink);
  font-size: 12.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere;
}
.msgbubble--in { border-radius: 12px 3px 12px 12px; background: var(--surface-2); color: var(--ink-2); }
.msgwho { display: block; font: 700 9.5px var(--sans); letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.72; margin-bottom: 4px; }

.reply { display: flex; flex-direction: column; gap: 8px; }
.reply__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.reply__hint { font-size: 11px; color: var(--ink-mute); }

/* ========================================================= client view == */

.portal { display: flex; flex-direction: column; gap: 18px; max-width: 1040px; }

.portal__band {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft-2);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
}
.portal__band--off { background: var(--surface-2); border-color: var(--line); }
.portal__who { flex: 1 1 260px; min-width: 0; }
.portal__h { font: 700 19px/1.2 var(--display); letter-spacing: -0.02em; color: var(--accent-ink); }
.portal__band--off .portal__h { color: var(--ink); }
.portal__s { font-size: 12.5px; color: var(--accent-ink); opacity: 0.88; margin-top: 4px; line-height: 1.5; }
.portal__band--off .portal__s { color: var(--ink-2); opacity: 1; }
/* One picker, two homes: the top bar on a desktop, the portal band on a phone
   where the top bar has room for the toggle and nothing else. */
.portal__pick { display: none; }
.portal__badge {
  font: 700 9.5px var(--sans); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent-ink); border: 1px solid var(--accent-soft-2);
  border-radius: 999px; padding: 4px 10px; background: var(--surface); white-space: nowrap;
}
.portal__band--off .portal__badge { color: var(--ink-2); border-color: var(--line); }

.portal__signed {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; color: var(--ink-mute); line-height: 1.5;
  margin-top: -8px;
}
.portal__signed .ic { flex: 0 0 auto; color: var(--accent-ink); }

.asks { display: flex; flex-direction: column; }
.ask { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.ask:last-child { border-bottom: 0; }
.ask__ic {
  width: 34px; height: 34px; border-radius: 9px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: var(--info-soft); color: var(--info);
}
.ask__ic--sign { background: var(--accent-soft); color: var(--accent-ink); }
.ask__t { flex: 1; min-width: 0; }
.ask__tt { display: block; font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.ask__ts { display: block; font-size: 12px; color: var(--ink-mute); margin-top: 3px; line-height: 1.45; }
.ask__a { flex: 0 0 auto; }

/* the client's own stage timeline */
.ptl { border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 16px; background: var(--surface); }
.ptl__h { display: flex; align-items: flex-start; gap: 10px; }
.ptl__t { font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.ptl__s { font-size: 11.5px; color: var(--ink-mute); margin-top: 3px; }
.ptl__now { font-size: 12.5px; color: var(--ink-2); line-height: 1.55; margin-top: 10px; }
.ptl__now strong { color: var(--ink); }
.ptl__next { display: flex; align-items: flex-start; gap: 7px; font-size: 12px; color: var(--ink-mute); margin-top: 10px; line-height: 1.45; }
.ptl__next .ic { flex: 0 0 auto; margin-top: 2px; color: var(--accent-ink); }
.ptl__ref { font-size: 10.5px; color: var(--ink-mute); margin-top: 7px; }

.ptrack { display: flex; gap: 4px; margin-top: 12px; list-style: none; padding: 0; }
.ptrack__s { flex: 1 1 0; min-width: 0; text-align: center; }
.ptrack__b { display: block; height: 5px; border-radius: 3px; background: var(--line); }
.ptrack__s.is-done .ptrack__b { background: var(--accent); }
.ptrack__s.is-on .ptrack__b { background: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft-2); }
.ptrack__l { display: block; font: 600 9.5px var(--sans); color: var(--ink-mute); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ptrack__s.is-on .ptrack__l { color: var(--accent-ink); }
.ptrack__d { display: block; font: 500 9px var(--mono); color: var(--ink-mute); margin-top: 2px; opacity: 0.75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.closed { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 12px 8px 6px; }
.closed__ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-mute); }
.closed__t { font: 700 15px var(--display); color: var(--ink); }
.closed__b { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; max-width: 56ch; }
.closed__a { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }

.reader { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }

/* the document a client reads before signing */
.doc {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); padding: 18px 20px;
  max-height: 264px; overflow: auto;
}
.doc__h { font: 700 13px var(--display); color: var(--ink); margin-bottom: 4px; }
.doc__m { font: 500 10.5px var(--mono); color: var(--ink-mute); margin-bottom: 12px; }
.doc p { font-size: 12.5px; line-height: 1.65; color: var(--ink-2); margin-bottom: 10px; }
.doc p:last-child { margin-bottom: 0; }

.signpad {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface-2); padding: 16px;
  display: flex; flex-direction: column; gap: 6px;
}
.signpad__l { font: 700 9.5px var(--sans); letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-mute); }
.signpad__v { font: 400 26px/1.3 var(--display); color: var(--ink); min-height: 34px; letter-spacing: 0.01em; overflow-wrap: anywhere; }
.signpad__v.is-empty { color: var(--ink-mute); font-size: 15px; }
.signpad__r { font-size: 11px; color: var(--ink-mute); border-top: 1px solid var(--line); padding-top: 8px; }

.drop {
  border: 1.5px dashed var(--line); border-radius: var(--radius);
  padding: 22px 18px; text-align: center; background: var(--surface-2);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.drop__ic { color: var(--ok); }
.drop__t { font-size: 13px; font-weight: 600; color: var(--ink); }
.drop__s { font-size: 12px; color: var(--ink-mute); max-width: 46ch; line-height: 1.55; }

.paynote { font-size: 11.5px; color: var(--ink-mute); line-height: 1.5; }

.steps { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.steps__s { display: flex; align-items: center; gap: 6px; font: 600 11px var(--sans); color: var(--ink-mute); }
.steps__n { width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); font: 700 10px var(--mono); }
.steps__s.is-on { color: var(--accent-ink); }
.steps__s.is-on .steps__n { background: var(--accent); border-color: var(--accent); color: var(--accent-on); }
.steps__s.is-done .steps__n { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps__line { flex: 1; height: 1px; background: var(--line); min-width: 12px; }

/* ---------------------------------------------------------- responsive -- */

@media (max-width: 1180px) {
  .grid--msg { grid-template-columns: minmax(0, 1fr); }
  .threadlist { max-height: 300px; }
}

@media (max-width: 900px) {
  /* The top actions scroll horizontally on a phone and the engine anchors them
     to the right, so the face toggle is ordered last: it is the one control
     that must never be the one hidden off the edge. */
  .top__titles { max-width: 42vw; }
  .top__a { min-width: 150px; }
  .top__a .faceseg { order: 8; }
  .top__a .faceseg__b { padding: 0 10px; font-size: 11.5px; }
  .top__a .faceseg .ic { display: none; }
  .top__a .js-toppick { display: none; }
  .top__a .btn, .top__a .btnbar { order: 9; }
  .portal__pick { display: block; flex: 1 1 100%; max-width: none; }

  .kpis { gap: 10px; }
  /* Two KPI tiles across a phone leaves no room for a nowrap label, and a
     truncated label is worse than a wrapped one. */
  .kpis .stat__l { white-space: normal; overflow: visible; line-height: 1.25; }
  .kpis .stat__top { align-items: flex-start; }
  .boardbar__hint { display: none; }
  .portal__band { padding: 14px 16px; }
  .portal__h { font-size: 17px; }
  .portal__signed { margin-top: -6px; }
  .ask { flex-wrap: wrap; gap: 10px; }
  .ask__a { width: 100%; }
  .ask__a .btn { width: 100%; }
  .ptrack__l { font-size: 8.5px; }
  .ptrack__d { display: none; }
  .thread__b { max-width: 88%; }
  .thread--pane { max-height: 340px; }
  .stagebar__s { flex: 1 1 30%; }
  .steps__s span:not(.steps__n) { display: none; }
  .email__head { grid-template-columns: 52px minmax(0, 1fr); }
  .detail__top { flex-wrap: wrap; }
  .reader { gap: 12px; }
}
