/* ============================================================
   Christ Kitchen OS — design system
   2410 N Monroe, Spokane WA

   Their mark is BLACK brush script on transparent, so the shell is light —
   the exact inverse of a white-knockout logo. The asset dictates the surface.
   Warm bone rail, white workspace, paprika for action, sage for advance,
   gold for hours. Inter for the interface, Source Serif 4 for the numbers
   that carry meaning.

   NAMING RULE: every component modifier is namespaced to its component
   (.mx-cell.is-full, never .full). Bare state words inherit global utilities.
   ============================================================ */

:root {
  --ink:      #221C15;
  --ink-2:    #3A3128;
  --paper:    #F8F5F0;
  --rail:     #EDE6DA;
  --rail-2:   #E4DBCB;
  --rail-3:   #DAD0BC;
  --surface:  #FFFFFF;
  --surface-2:#FCFAF7;
  --line:     #E2D9C9;
  --line-2:   #EDE7DC;
  --line-3:   #F4F0E8;

  --text:     #221C15;
  --text-2:   #635A4C;
  --text-3:   #8C8271;

  --paprika:    #B8482A;
  --paprika-hi: #CB5433;
  --paprika-dp: #93381F;
  --paprika-1:  #FBEFEA;
  --paprika-2:  #F4DACF;
  --paprika-3:  #E7B7A2;

  --sage:     #4F6B54;
  --sage-hi:  #5F7F65;
  --sage-1:   #EDF3EE;
  --sage-2:   #D7E4D9;

  --gold:     #8A6212;
  --gold-hi:  #A5761C;
  --gold-1:   #FAF3E2;
  --gold-2:   #EFE0BE;

  --ok:   #3A6E48;  --ok-1:   #EAF3EC;
  --warn: #97690C;  --warn-1: #FBF2DF;
  --bad:  #A93A22;  --bad-1:  #F9EAE5;
  --info: #3C5A80;  --info-1: #EBF0F7;

  --r-xs: 4px; --r-sm: 6px; --r: 9px; --r-lg: 13px; --r-xl: 18px;
  --sh-1: 0 1px 2px rgba(34,28,21,.05), 0 1px 1px rgba(34,28,21,.04);
  --sh-2: 0 2px 6px rgba(34,28,21,.06), 0 1px 2px rgba(34,28,21,.04);
  --sh-3: 0 14px 36px rgba(34,28,21,.13), 0 2px 8px rgba(34,28,21,.05);
  --rail-w: 15.5rem;
  --rail-w-c: 4.25rem;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 13.5px; line-height: 1.5;
  color: var(--text); background: var(--paper);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.016em; }
h1 { font-size: 21px; }
h3 { font-size: 14px; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 2px solid var(--paprika); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--paprika-2); }
.ic { width: 15px; height: 15px; flex: 0 0 auto; vertical-align: -2px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D8CFBE; border-radius: 8px; border: 3px solid transparent; background-clip: content-box; }

/* numbers that carry meaning get the serif */
.num { font-family: var(--serif); font-variant-numeric: tabular-nums lining-nums; letter-spacing: -.012em; }

/* ============================================================ demo banner */
.demo-flag {
  display: flex; align-items: center; gap: 9px; padding: 7px 16px;
  background: var(--ink); color: #C6BCAC; font-size: 11.5px; line-height: 1.45;
}
.demo-flag .ic { color: var(--gold-hi); }
.demo-flag b { color: #fff; font-weight: 600; }

/* ============================================================ shell */
.app { display: flex; height: calc(100vh - 32px); overflow: hidden; }
.rail {
  width: var(--rail-w); flex: 0 0 var(--rail-w); background: var(--rail);
  border-right: 1px solid var(--rail-3);
  display: flex; flex-direction: column; transition: width .18s ease, flex-basis .18s ease;
  position: relative; z-index: 40;
}
.app.rail-collapsed .rail { width: var(--rail-w-c); flex-basis: var(--rail-w-c); }

.rail-brand { display: flex; flex-direction: column; align-items: flex-start; padding: 16px 15px 12px; }
/* black artwork on a warm bone rail — no plate, no inversion */
.brand-lockup { width: 128px; height: auto; display: block; }
.brand-mark { width: 28px; height: auto; display: none; }
.brand-os {
  display: block; color: var(--text-3); font-size: 8.5px; letter-spacing: .18em;
  text-transform: uppercase; font-weight: 700; margin-top: 8px; padding-left: 2px;
}
.app.rail-collapsed .brand-lockup, .app.rail-collapsed .brand-os { display: none; }
.app.rail-collapsed .brand-mark { display: block; }
.app.rail-collapsed .rail-brand { align-items: center; padding-left: 0; padding-right: 0; }

.rail-nav { flex: 1; overflow-y: auto; padding: 2px 8px 12px; }
.rail-nav::-webkit-scrollbar-thumb { background: #CFC4AF; background-clip: content-box; border: 3px solid transparent; }
.nav-split {
  display: flex; align-items: center; gap: 9px; margin: 16px 10px 7px;
  color: var(--text-3); font-size: 9px; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; white-space: nowrap;
}
.nav-split::after { content: ""; flex: 1; height: 1px; background: var(--rail-3); }
.app.rail-collapsed .nav-split { margin: 12px 8px; }
.app.rail-collapsed .nav-split span { display: none; }

.nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 7.5px 10px; border-radius: var(--r-sm); color: var(--text-2);
  font-size: 13px; font-weight: 500; position: relative; margin-bottom: 1px;
  transition: background .12s ease, color .12s ease;
}
.nav-item .ic { width: 16px; height: 16px; opacity: .8; }
.nav-item:hover { background: var(--rail-2); color: var(--ink); }
.nav-item.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--sh-1); }
.nav-item.on .ic { opacity: 1; color: var(--paprika); }
.nav-item.on::before {
  content: ""; position: absolute; left: -8px; top: 7px; bottom: 7px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--paprika);
}
/* a parent group holding the current page — bolder, but NOT the selected slab,
   or the rail reads as two current rows at once */
.nav-item.has-on { color: var(--ink); font-weight: 650; }
.nav-item.has-on .ic { opacity: 1; color: var(--paprika); }
.nav-item .nav-label { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; }
.nav-count {
  font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 9px;
  background: var(--paprika); color: #fff;
}
.nav-count.q { background: var(--rail-3); color: var(--text-2); }
.app.rail-collapsed .nav-label, .app.rail-collapsed .nav-count { display: none; }
.app.rail-collapsed .nav-item { justify-content: center; padding-left: 0; padding-right: 0; }

.nav-kids { position: relative; margin: 1px 0 3px; }
.nav-kids::before { content: ""; position: absolute; left: 18px; top: 2px; bottom: 6px; width: 1px; background: var(--rail-3); }
.nav-item.is-child { padding-left: 10px; font-size: 12.5px; color: var(--text-3); }
.nav-item.is-child .nav-tick { width: 16px; height: 16px; flex: 0 0 16px; position: relative; }
.nav-item.is-child .nav-tick::after {
  content: ""; position: absolute; left: 8px; top: 50%; width: 7px; height: 1px;
  background: var(--rail-3); transform: translateY(-50%);
}
.nav-item.is-child:hover { color: var(--ink); }
.nav-item.is-child.on { color: var(--ink); font-weight: 600; }
.nav-item.is-child.on .nav-tick::after { background: var(--paprika); width: 9px; }
.app.rail-collapsed .nav-kids::before { display: none; }
.app.rail-collapsed .nav-item.is-child { display: none; }

.rail-foot { padding: 10px 12px 13px; border-top: 1px solid var(--rail-3); }
.rail-user { display: flex; align-items: center; gap: 10px; width: 100%; }
.ru-t { display: flex; flex-direction: column; text-align: left; min-width: 0; }
.ru-1 { color: var(--ink); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.ru-2 { color: var(--text-3); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app.rail-collapsed .ru-t { display: none; }
.app.rail-collapsed .rail-user { justify-content: center; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.topbar {
  height: 54px; flex: 0 0 54px; background: var(--surface); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px; padding: 0 16px;
}
.icon-btn {
  width: 32px; height: 32px; border-radius: var(--r-sm); display: grid; place-items: center;
  color: var(--text-2); position: relative; flex: 0 0 auto;
}
.icon-btn:hover { background: var(--line-3); color: var(--ink); }
.icon-btn .ic, .icon-btn svg { width: 17px; height: 17px; }
.icon-btn .dot { position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--paprika); }
.rail-toggle { display: none; }
.search {
  display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2);
  color: var(--text-3); font-size: 12.5px; min-width: 250px; cursor: text;
}
.search svg { width: 14px; height: 14px; }
.search .kbd {
  margin-left: auto; font-size: 10.5px; padding: 1px 5px; border-radius: 4px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text-3);
}
.sp { flex: 1; }
.lens-btn {
  display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface);
  font-size: 12.5px; font-weight: 600; color: var(--ink);
}
.lens-btn:hover { border-color: var(--paprika-3); }
.lens-btn .lens-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--paprika); }
.lens-btn .lens-sub { color: var(--text-3); font-weight: 500; }

.avatar {
  width: 28px; height: 28px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 10.5px; font-weight: 700; color: #fff;
  letter-spacing: .02em;
}
.avatar.sm { width: 22px; height: 22px; font-size: 8.5px; }
.avatar.lg { width: 42px; height: 42px; font-size: 14px; }
.av-k  { background: #4A3F33; }
.av-1  { background: #7A5A3C; } .av-2  { background: #8C5A46; } .av-3  { background: #5B6E56; }
.av-4  { background: #6B5878; } .av-5  { background: #47607A; } .av-6  { background: #8A6A2E; }
.av-7  { background: #5E7A70; } .av-8  { background: #7E4F55; } .av-9  { background: #4F5F72; }
.av-10 { background: #75664A; } .av-11 { background: #63524A; } .av-12 { background: #556B62; }
.av-13 { background: #6E5B7B; } .av-14 { background: #3F5B55; }

.page { flex: 1; overflow-y: auto; padding: 22px 26px 60px; }
.page-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; }
.page-head .ph-t { flex: 1; min-width: 0; }
.page-head h1 { margin-bottom: 3px; }
.page-sub { color: var(--text-2); font-size: 12.5px; max-width: 74ch; }

/* ============================================================ atoms */
.btn {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px;
  border-radius: var(--r-sm); font-size: 12.5px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--surface-2); border-color: var(--rail-3); }
.btn.primary { background: var(--paprika); border-color: var(--paprika); color: #fff; }
.btn.primary:hover { background: var(--paprika-hi); border-color: var(--paprika-hi); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--line-3); color: var(--ink); }
.btn.sm { height: 27px; padding: 0 10px; font-size: 11.5px; }
.btn .ic { width: 14px; height: 14px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 600; background: var(--line-3); color: var(--text-2);
  border: 1px solid var(--line-2); white-space: nowrap;
}
.chip.ok   { background: var(--ok-1);   color: var(--ok);   border-color: #CFE3D5; }
.chip.warn { background: var(--warn-1); color: var(--warn); border-color: #EEDDB6; }
.chip.bad  { background: var(--bad-1);  color: var(--bad);  border-color: #EDC9BE; }
.chip.info { background: var(--info-1); color: var(--info); border-color: #CBD8EA; }
.chip.gold { background: var(--gold-1); color: var(--gold); border-color: var(--gold-2); }
.chip.sage { background: var(--sage-1); color: var(--sage); border-color: var(--sage-2); }
.chip.pap  { background: var(--paprika-1); color: var(--paprika); border-color: var(--paprika-2); }
.chip .ic { width: 11px; height: 11px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.panel-h {
  display: flex; align-items: center; gap: 10px; padding: 13px 16px;
  border-bottom: 1px solid var(--line-2);
}
.panel-h h3 { flex: 1; }
.panel-h .ph-note { color: var(--text-3); font-size: 11.5px; font-weight: 500; }
.panel-b { padding: 16px; }
.panel-b.flush { padding: 0; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.wrapr { display: flex; flex-wrap: wrap; gap: 8px; }

.mute  { color: var(--text-3); }
.mute2 { color: var(--text-2); }
.tiny  { font-size: 11px; }
.small { font-size: 12px; }
.b     { font-weight: 650; }
.sec-label {
  font-size: 9.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-3);
}
.empty { padding: 34px 20px; text-align: center; color: var(--text-3); font-size: 12.5px; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tab {
  padding: 9px 13px; font-size: 13px; font-weight: 550; color: var(--text-2);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.on { color: var(--paprika); border-bottom-color: var(--paprika); font-weight: 650; }

table.tbl th {
  text-align: left; font-size: 10px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-3); padding: 9px 14px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line-3); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover { background: var(--surface-2); }
.ta-r { text-align: right; }

/* ============================================================ COMPONENT 1
   The dual-unit band. Every figure reads in two units, because at Christ
   Kitchen the dollar and the hour are the same event from two sides. */
.duo {
  display: flex; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); overflow: hidden;
}
.duo-c { flex: 1; padding: 13px 17px; border-right: 1px solid var(--line-2); min-width: 0; }
.duo-c:last-child { border-right: 0; }
.duo-l { font-size: 10px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; color: var(--text-3); }
.duo-v { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.duo-d { font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--ink); letter-spacing: -.02em; }
.duo-h {
  font-family: var(--serif); font-size: 13.5px; font-weight: 600; color: var(--gold);
  padding: 1px 7px; border-radius: 20px; background: var(--gold-1); border: 1px solid var(--gold-2);
}
.duo-s { margin-top: 5px; font-size: 11.5px; color: var(--text-3); }
.duo-c.is-lead { background: linear-gradient(180deg, var(--paprika-1), var(--surface) 70%); }

/* ============================================================ COMPONENT 2
   The nine-matrix board. Nine training tracks, four competency pips each.
   Compact strip in a list row, full board in the detail pane. */
.mx {
  display: grid; grid-template-columns: repeat(9, 1fr); gap: 3px;
}
.mx-cell {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 4px 0 3px; border-radius: var(--r-xs); background: var(--surface-2);
  border: 1px solid var(--line-3);
}
.mx-pips { display: flex; flex-direction: column-reverse; gap: 1.5px; }
.mx-pip { width: 12px; height: 3px; border-radius: 1px; background: var(--line); }
.mx-pip.is-lit { background: var(--sage); }
.mx-cell.is-full { background: var(--sage-1); border-color: var(--sage-2); }
.mx-cell.is-full .mx-pip.is-lit { background: var(--sage-hi); }
.mx-cell.is-none { opacity: .55; }
.mx-cell.is-next { background: var(--gold-1); border-color: var(--gold-2); }
.mx-cell.is-next .mx-pip.is-lit { background: var(--gold-hi); }
.mx-k { font-size: 8px; font-weight: 700; letter-spacing: .04em; color: var(--text-3); text-transform: uppercase; }
.mx-cell.is-full .mx-k { color: var(--sage); }
.mx-cell.is-next .mx-k { color: var(--gold); }

/* full board in the detail pane */
.mxb { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mxb-c {
  border: 1px solid var(--line-2); border-radius: var(--r); padding: 10px 11px; background: var(--surface);
}
.mxb-c.is-full { background: var(--sage-1); border-color: var(--sage-2); }
.mxb-c.is-next { background: var(--gold-1); border-color: var(--gold-2); }
.mxb-t { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 650; }
.mxb-t .ic { width: 13px; height: 13px; color: var(--text-3); }
.mxb-c.is-full .mxb-t .ic { color: var(--sage); }
.mxb-c.is-next .mxb-t .ic { color: var(--gold); }
.mxb-bars { display: flex; gap: 3px; margin-top: 8px; }
.mxb-bar { flex: 1; height: 5px; border-radius: 2px; background: var(--line); }
.mxb-bar.is-lit { background: var(--sage); }
.mxb-c.is-next .mxb-bar.is-lit { background: var(--gold-hi); }
.mxb-s { margin-top: 7px; font-size: 10.5px; color: var(--text-3); font-weight: 600; }

/* ============================================================ COMPONENT 3
   The graduation ladder. Where a woman sits in the arc of the programme,
   drawn as rungs rather than a status chip. */
.ldr { display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding-bottom: 2px; }
.ldr-r {
  flex: 1 0 0; min-width: 74px; position: relative; padding: 9px 8px 10px;
  border-top: 3px solid var(--line); text-align: left;
}
.ldr-r.is-done { border-top-color: var(--sage); }
.ldr-r.is-here { border-top-color: var(--paprika); }
.ldr-n { font-size: 11.5px; font-weight: 650; color: var(--text-3); }
.ldr-r.is-done .ldr-n { color: var(--sage); }
.ldr-r.is-here .ldr-n { color: var(--paprika); }
.ldr-b { font-size: 10.5px; color: var(--text-3); margin-top: 3px; line-height: 1.35; }
.ldr-r.is-here .ldr-b { color: var(--text-2); }
.ldr-dot {
  position: absolute; top: -6.5px; left: 8px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--line);
}
.ldr-r.is-done .ldr-dot { border-color: var(--sage); background: var(--sage); }
.ldr-r.is-here .ldr-dot { border-color: var(--paprika); background: var(--paprika); box-shadow: 0 0 0 4px var(--paprika-1); }

/* compact ladder for a list row */
.ldr-mini { display: flex; gap: 2px; align-items: center; }
.ldr-mini i { display: block; width: 9px; height: 4px; border-radius: 1px; background: var(--line); }
.ldr-mini i.is-done { background: var(--sage); }
.ldr-mini i.is-here { background: var(--paprika); width: 13px; }

/* ============================================================ COMPONENT 4
   The week board. Stations down, days across. Two lenses — does this cover
   demand, does this advance a matrix — and the conflicts where they disagree. */
.wk { overflow-x: auto; }
.wk table { table-layout: fixed; width: 100%; min-width: 720px; }
.wk th {
  font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--text-3); padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: center;
}
.wk th.wk-rowh { text-align: left; width: 132px; padding-left: 14px; }
.wk td { padding: 3px; border-bottom: 1px solid var(--line-3); vertical-align: top; }
.wk td.wk-rowh {
  padding: 8px 6px 8px 14px; font-size: 11.5px; font-weight: 600; vertical-align: middle;
  border-right: 1px solid var(--line-2);
}
.wk td.wk-rowh .ic { width: 13px; height: 13px; color: var(--text-3); margin-right: 6px; }
.wk-cell {
  width: 100%; min-height: 46px; height: 100%; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--surface-2); padding: 5px;
  display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left;
  transition: border-color .12s, background .12s;
}
.wk-cell:hover { border-color: var(--rail-3); }
.wk-cell.is-vacant { background: repeating-linear-gradient(45deg, #FBF8F3, #FBF8F3 5px, #F2EDE4 5px, #F2EDE4 10px); border-color: var(--line-3); }
.wk-cell.is-short { border-color: var(--paprika-3); background: var(--paprika-1); }
.wk-cell.is-picked { outline: 2px solid var(--paprika); outline-offset: -1px; }
.wk-who { display: flex; flex-wrap: wrap; gap: 2px; }
.wk-i {
  font-size: 8.5px; font-weight: 700; letter-spacing: .02em; color: #fff;
  padding: 2px 4px; border-radius: 3px; line-height: 1.1;
}
.wk-tag { font-size: 9px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.wk-tag.t-adv { color: var(--sage); }
.wk-tag.t-short { color: var(--paprika); }
.wk-tag.t-flat { color: var(--text-3); }
/* lens overlays */
.wk.lens-demand .wk-cell.is-ok { background: var(--sage-1); border-color: var(--sage-2); }
.wk.lens-demand .wk-cell.is-short { background: var(--paprika-1); border-color: var(--paprika-3); }
.wk.lens-advance .wk-cell.is-adv { background: var(--sage-1); border-color: var(--sage-2); }
.wk.lens-advance .wk-cell.is-flat { background: var(--gold-1); border-color: var(--gold-2); }
.wk-conflict {
  position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--paprika); box-shadow: 0 0 0 2px var(--surface);
}
.wk-cellwrap { position: relative; height: 100%; }

.lens-seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: var(--surface); }
.lens-seg button { padding: 5px 11px; font-size: 11.5px; font-weight: 600; color: var(--text-2); border-right: 1px solid var(--line-2); }
.lens-seg button:last-child { border-right: 0; }
.lens-seg button.on { background: var(--ink); color: #fff; }

/* the trade card — a decision with a price on it */
.trade { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.trade + .trade { margin-top: 12px; }
.trade-h { padding: 11px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line-2); }
.trade-h h4 { font-size: 13px; }
.trade-b { padding: 13px 14px; display: flex; flex-direction: column; gap: 10px; }
.trade-side { display: flex; gap: 10px; align-items: flex-start; }
.trade-key {
  flex: 0 0 78px; font-size: 9.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding-top: 2px;
}
.trade-key.k-demand { color: var(--paprika); }
.trade-key.k-advance { color: var(--sage); }
.trade-key.k-prop { color: var(--ink); }
.trade-txt { flex: 1; font-size: 12.5px; color: var(--text-2); }
.trade-txt.is-prop { color: var(--ink); font-weight: 500; }
.trade-costs { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 2px; }
.trade-cost { border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 6px 10px; background: var(--surface-2); }
.trade-cost .tc-l { font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.trade-cost .tc-v { font-family: var(--serif); font-size: 14px; font-weight: 600; margin-top: 2px; }
.trade-cost.c-ok .tc-v { color: var(--ok); }
.trade-cost.c-warn .tc-v { color: var(--warn); }
.trade-cost.c-bad .tc-v { color: var(--bad); }
.trade-f {
  padding: 10px 14px; border-top: 1px solid var(--line-2); background: var(--sage-1);
  display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--sage);
}
.trade-f .ic { color: var(--sage); }
.trade-f .sp { flex: 1; }

/* ============================================================ COMPONENT 5
   The partition. Participant-private data and the public surface, drawn as
   a physical wall with the crossings named. */
.part { display: grid; grid-template-columns: 1fr 78px 1fr; align-items: stretch; }
.part-side { padding: 4px 0; }
.part-t { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; }
.part-t .ic { width: 15px; height: 15px; }
.part-t h4 { font-size: 12.5px; }
.part-side.s-private .part-t { color: var(--paprika); }
.part-side.s-public .part-t { color: var(--sage); }
.part-list li {
  font-size: 12px; padding: 6px 11px; border-radius: var(--r-sm); margin-bottom: 5px;
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text-2);
}
.part-side.s-private .part-list li { border-left: 3px solid var(--paprika-3); }
.part-side.s-public .part-list li { border-left: 3px solid var(--sage-2); }
.part-wall {
  position: relative; margin: 0 12px;
  background: repeating-linear-gradient(45deg, #E9E0D0, #E9E0D0 4px, #DED2BD 4px, #DED2BD 8px);
  border-left: 2px solid var(--rail-3); border-right: 2px solid var(--rail-3);
  border-radius: 3px;
}
.part-wall span {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-90deg);
  font-size: 9px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--text-2); white-space: nowrap;
}
.part-cross {
  margin-top: 14px; border-top: 1px dashed var(--rail-3); padding-top: 13px;
  display: flex; flex-direction: column; gap: 9px;
}
.part-door {
  display: flex; gap: 11px; align-items: flex-start; padding: 10px 12px;
  border: 1px solid var(--gold-2); background: var(--gold-1); border-radius: var(--r-sm);
}
.part-door .ic { color: var(--gold); margin-top: 1px; }
.part-door b { font-size: 12px; }
.part-door p { font-size: 11.5px; color: var(--text-2); margin-top: 2px; }

/* ============================================================ COMPONENT 6
   The agent bench. The path work travels, running into a wall it cannot
   cross. One agent's wall is on the INPUT side. (skill §7e) */
.agb { display: flex; flex-direction: column; gap: 12px; }
.agx {
  display: grid; grid-template-columns: 190px 1fr 216px; gap: 0;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden;
}
.agx-id { padding: 14px 15px; border-right: 1px solid var(--line-2); background: var(--surface-2); }
.agx-nm { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 650; }
.agx-live { width: 6px; height: 6px; border-radius: 50%; background: var(--sage); flex: 0 0 auto; }
.agx-cad { font-size: 11px; color: var(--text-3); margin-top: 5px; }
.agx-load { margin-top: 10px; font-size: 11px; color: var(--text-3); }
.agx-load b { font-family: var(--serif); font-size: 15px; color: var(--ink); display: block; }

.agx-path { display: flex; align-items: stretch; padding: 12px 6px; gap: 0; min-width: 0; }
.agx-st { flex: 1; min-width: 0; padding: 0 10px; display: flex; flex-direction: column; }
.agx-sl { font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 6px; }
.agx-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.agx-tag {
  font-size: 10.5px; padding: 2px 7px; border-radius: 4px;
  background: var(--line-3); border: 1px solid var(--line-2); color: var(--text-2);
}
.agx-tag.t-out { background: var(--paprika-1); border-color: var(--paprika-2); color: var(--paprika-dp); }
.agx-does { font-size: 11.5px; color: var(--text-2); line-height: 1.42; }
.agx-arrow {
  flex: 0 0 22px; display: grid; place-items: center; color: var(--rail-3);
}
.agx-arrow svg { width: 16px; height: 16px; }

.agx-wall {
  position: relative; padding: 13px 15px 13px 20px;
  background: repeating-linear-gradient(45deg, #FAF4EF, #FAF4EF 5px, #F3E7DF 5px, #F3E7DF 10px);
  border-left: 3px solid var(--paprika);
}
.agx-wt { display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--paprika); }
.agx-wl { margin-top: 8px; display: flex; flex-direction: column; gap: 5px; }
.agx-wl li { font-size: 11px; color: var(--text-2); padding-left: 13px; position: relative; line-height: 1.4; }
.agx-wl li::before { content: ""; position: absolute; left: 0; top: 6px; width: 7px; height: 1.5px; background: var(--paprika-3); }
.agx-wait {
  margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; font-size: 11px;
  font-weight: 650; color: var(--gold); background: var(--gold-1);
  border: 1px solid var(--gold-2); padding: 3px 9px; border-radius: 20px;
}
/* the one agent whose wall is on the input side */
.agx.is-inblocked { grid-template-columns: 190px 1fr 216px; }
.agx-inwall {
  display: flex; align-items: center; gap: 6px; margin-bottom: 8px;
  font-size: 10.5px; font-weight: 650; color: var(--paprika);
  background: repeating-linear-gradient(45deg, #FAF4EF, #FAF4EF 5px, #F3E7DF 5px, #F3E7DF 10px);
  border: 1px solid var(--paprika-2); border-radius: var(--r-sm); padding: 5px 8px;
}
.agx-inwall .ic { width: 12px; height: 12px; }

/* ============================================================ master / detail */
.md { display: grid; grid-template-columns: 372px 1fr; gap: 16px; align-items: start; }
.md-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.md-lh { padding: 11px 14px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 8px; }
.md-lh .sec-label { flex: 1; }
.md-rows { max-height: calc(100vh - 300px); overflow-y: auto; }
.md-row {
  width: 100%; text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line-3);
  display: flex; flex-direction: column; gap: 7px; position: relative;
}
.md-row:hover { background: var(--surface-2); }
.md-row.is-on { background: var(--paprika-1); }
.md-row.is-on::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--paprika); }
.md-r1 { display: flex; align-items: center; gap: 9px; }
.md-nm { font-size: 13px; font-weight: 650; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-r2 { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-3); }
.md-pane { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.md-ph { padding: 16px 18px; border-bottom: 1px solid var(--line-2); display: flex; gap: 13px; align-items: flex-start; }
.md-pb { padding: 18px; display: flex; flex-direction: column; gap: 18px; }
.md-sec { display: flex; flex-direction: column; gap: 9px; }

/* evidence / reason block — why the system stopped */
.ev { border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface-2); padding: 13px 15px; }
.ev-t { display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 650; color: var(--paprika); }
.ev-b { font-size: 12.5px; color: var(--text-2); margin-top: 7px; line-height: 1.5; }
.ev.is-warn { background: var(--gold-1); border-color: var(--gold-2); }
.ev.is-warn .ev-t { color: var(--gold); }

.draftbox { border: 1px dashed var(--rail-3); border-radius: var(--r); background: var(--surface-2); padding: 13px 15px; }
.draftbox .db-t { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 650; color: var(--text-3); }
.draftbox .db-b { font-size: 12.5px; color: var(--text); margin-top: 8px; line-height: 1.55; }
.draftbox .db-n { font-size: 11px; color: var(--text-3); margin-top: 8px; font-style: italic; }
.draftbox .db-a { display: flex; gap: 8px; margin-top: 11px; }

/* private / restricted data */
.priv {
  border: 1px solid var(--paprika-2); border-radius: var(--r); background: var(--paprika-1); padding: 12px 14px;
}
.priv-t { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--paprika); }
.priv-t .sp { flex: 1; }
.priv-l { margin-top: 9px; display: flex; flex-direction: column; gap: 5px; }
.priv-l li { font-size: 12px; color: var(--text-2); }
.priv.is-hidden .priv-l li { color: transparent; text-shadow: 0 0 7px rgba(34,28,21,.5); user-select: none; }

/* ============================================================ pipeline */
.kb { display: grid; grid-template-columns: repeat(5, minmax(190px, 1fr)); gap: 12px; overflow-x: auto; }
.kb-col { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r); min-width: 190px; }
.kb-h { padding: 10px 12px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 7px; }
.kb-h .kb-n { font-size: 12px; font-weight: 650; flex: 1; }
.kb-h .kb-c { font-size: 11px; color: var(--text-3); font-family: var(--serif); }
.kb-bolt { width: 22px; height: 22px; border-radius: 5px; display: grid; place-items: center; color: var(--gold); }
.kb-bolt:hover { background: var(--gold-1); }
.kb-bolt .ic { width: 13px; height: 13px; }
.kb-b { padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.kb-card {
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  padding: 10px 11px; text-align: left; width: 100%;
}
.kb-card:hover { border-color: var(--paprika-3); box-shadow: var(--sh-1); }
.kb-cl { font-size: 12px; font-weight: 650; }
.kb-t { font-size: 11.5px; color: var(--text-2); margin-top: 3px; }
.kb-m { display: flex; align-items: center; gap: 7px; margin-top: 8px; }
.kb-v { font-family: var(--serif); font-size: 13px; font-weight: 600; }
.kb-hh { font-family: var(--serif); font-size: 11.5px; font-weight: 600; color: var(--gold); }

/* ============================================================ misc rows */
.lrow {
  display: flex; align-items: center; gap: 12px; padding: 12px 15px;
  border-bottom: 1px solid var(--line-3);
}
.lrow:last-child { border-bottom: 0; }
.lrow:hover { background: var(--surface-2); }
.lrow .lr-t { flex: 1; min-width: 0; }
.lrow .lr-1 { font-size: 12.5px; font-weight: 600; }
.lrow .lr-2 { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

/* need-you rows on Today — ranked, not listed */
.need { display: flex; flex-direction: column; }
.need-r {
  display: flex; gap: 14px; align-items: flex-start; padding: 15px 17px;
  border-bottom: 1px solid var(--line-3); width: 100%; text-align: left;
}
.need-r:last-child { border-bottom: 0; }
.need-r:hover { background: var(--surface-2); }
.need-rank {
  flex: 0 0 68px; text-align: right; font-family: var(--serif); font-size: 12.5px;
  font-weight: 650; color: var(--paprika); padding-top: 1px; line-height: 1.35;
}
.need-t { flex: 1; min-width: 0; }
.need-1 { font-size: 13.5px; font-weight: 650; }
.need-2 { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.need-3 { font-size: 12.5px; color: var(--text-2); margin-top: 7px; line-height: 1.5; }
.need-cta { flex: 0 0 auto; align-self: center; }

/* the one to call first */
.first { display: flex; gap: 16px; align-items: flex-start; }
.first-t { flex: 1; }

/* trend — dollars in bars, training hours as one connected line over the top */
.trend { display: flex; align-items: flex-end; gap: 6px; height: 148px; padding-top: 6px; position: relative; }
.trend-svg {
  position: absolute; left: 0; right: 0; top: 6px; height: 128px; width: 100%;
  pointer-events: none; overflow: visible;
}
.trend-svg polyline {
  fill: none; stroke: var(--gold); stroke-width: 2.5; vector-effect: non-scaling-stroke;
  stroke-linejoin: round; stroke-linecap: round;
}
.trend-m { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; justify-content: flex-end; }
.trend-bars { display: flex; align-items: flex-end; gap: 2px; width: 100%; justify-content: center; height: 128px; position: relative; }
.trend-b { width: 9px; border-radius: 2px 2px 0 0; }
.trend-b.b-e { background: var(--paprika); }
.trend-b.b-g { background: var(--paprika-3); }
.trend-k { font-size: 9.5px; color: var(--text-3); }

/* funder cards — each one a different definition of the same word */
.fnd { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.fnd + .fnd { margin-top: 12px; }
.fnd-h { padding: 12px 15px; display: flex; align-items: flex-start; gap: 12px; border-bottom: 1px solid var(--line-2); }
.fnd-h .fh-t { flex: 1; }
.fnd-n { font-size: 13.5px; font-weight: 650; }
.fnd-u { font-size: 11.5px; color: var(--paprika); margin-top: 3px; font-weight: 550; }
.fnd-b { padding: 0; }
.fnd-rows { display: grid; grid-template-columns: 1fr 1fr; }
.fnd-row { padding: 10px 15px; border-bottom: 1px solid var(--line-3); border-right: 1px solid var(--line-3); }
.fnd-row:nth-child(2n) { border-right: 0; }
.fnd-rl { font-size: 10.5px; color: var(--text-3); font-weight: 600; }
.fnd-rv { font-family: var(--serif); font-size: 14px; font-weight: 600; margin-top: 2px; }
.fnd-rv.v-ok { color: var(--ok); } .fnd-rv.v-warn { color: var(--warn); }
.fnd-note { padding: 12px 15px; font-size: 12px; color: var(--text-2); background: var(--surface-2); line-height: 1.5; }

/* progress meter */
.meter { height: 5px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--sage); border-radius: 3px; }
.meter.m-warn > i { background: var(--warn); }
.meter.m-pap > i { background: var(--paprika); }

/* store */
.prod { display: flex; align-items: center; gap: 13px; padding: 13px 15px; border-bottom: 1px solid var(--line-3); }
.prod:last-child { border-bottom: 0; }
.prod-sq {
  width: 40px; height: 40px; border-radius: var(--r-sm); flex: 0 0 auto; display: grid; place-items: center;
  background: var(--paprika-1); color: var(--paprika); font-family: var(--serif); font-weight: 700; font-size: 12px;
}
.prod-t { flex: 1; min-width: 0; }
/* stock against par, drawn */
.par { width: 108px; flex: 0 0 108px; }
.par-bar { height: 6px; border-radius: 3px; background: var(--line-2); position: relative; overflow: visible; }
.par-fill { height: 100%; border-radius: 3px; background: var(--sage); }
.par-fill.is-under { background: var(--paprika); }
.par-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); border-radius: 1px; }
.par-k { font-size: 10px; color: var(--text-3); margin-top: 4px; }

/* portal preview */
.portal-frame {
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface);
}
.portal-top {
  padding: 14px 18px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 12px;
  background: var(--rail);
}
.portal-top img { width: 104px; height: auto; }
.portal-b { padding: 20px; display: flex; flex-direction: column; gap: 16px; }

/* replaces list */
.repl li {
  display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; color: var(--text-2);
  padding: 7px 0; border-bottom: 1px solid var(--line-3);
}
.repl li:last-child { border-bottom: 0; }
.repl .ic { color: var(--paprika); width: 13px; height: 13px; margin-top: 3px; }

/* ============================================================ modal / toast */
.scrim {
  position: fixed; inset: 0; background: rgba(34,28,21,.34); opacity: 0; pointer-events: none;
  transition: opacity .16s ease; z-index: 60;
}
.scrim.on { opacity: 1; pointer-events: auto; }
.modal {
  position: fixed; inset: 0; display: grid; place-items: center; padding: 24px;
  z-index: 70; pointer-events: none;
}
.modal.on { pointer-events: auto; }
.modal-in {
  width: min(620px, 100%); max-height: 84vh; overflow-y: auto; background: var(--surface);
  border-radius: var(--r-xl); box-shadow: var(--sh-3); opacity: 0; transform: translateY(10px) scale(.985);
  transition: opacity .16s ease, transform .16s ease;
}
.modal.on .modal-in { opacity: 1; transform: none; }
.modal-h { padding: 18px 20px 14px; border-bottom: 1px solid var(--line-2); display: flex; align-items: flex-start; gap: 12px; }
.modal-h h3 { flex: 1; font-size: 15px; }
.modal-b { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.modal-f { padding: 14px 20px; border-top: 1px solid var(--line-2); display: flex; gap: 9px; justify-content: flex-end; background: var(--surface-2); border-radius: 0 0 var(--r-xl) var(--r-xl); }

#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; flex-direction: column; gap: 9px; }
.toast {
  background: var(--ink); color: #F3EDE3; padding: 11px 15px; border-radius: var(--r);
  font-size: 12.5px; box-shadow: var(--sh-3); display: flex; align-items: center; gap: 9px;
  max-width: 380px;
}
.toast .ic { color: var(--sage-hi); }

/* flow diagram for automations */
.flow { display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding: 4px 0 8px; }
.flow-n {
  flex: 0 0 auto; min-width: 132px; max-width: 168px; border: 1px solid var(--line);
  border-radius: var(--r); padding: 10px 12px; background: var(--surface); position: relative;
}
.flow-n .fn-k { font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.flow-n .fn-t { font-size: 12px; font-weight: 600; margin-top: 4px; line-height: 1.35; }
.flow-n.n-gateway { background: repeating-linear-gradient(45deg, #FAF4EF, #FAF4EF 5px, #F3E7DF 5px, #F3E7DF 10px); border-color: var(--paprika-2); }
.flow-n.n-gateway .fn-k { color: var(--paprika); }
.flow-arrow { flex: 0 0 20px; display: grid; place-items: center; color: var(--rail-3); }
.flow-arrow svg { width: 15px; height: 15px; }

/* ============================================================ responsive */
@media (max-width: 1180px) {
  .md { grid-template-columns: 320px 1fr; }
  .agx { grid-template-columns: 168px 1fr 200px; }
}
@media (max-width: 1000px) {
  .grid3 { grid-template-columns: 1fr; }
  .md { grid-template-columns: 1fr; }
  .md-rows { max-height: 340px; }
  .agx { grid-template-columns: 1fr; }
  .agx-id { border-right: 0; border-bottom: 1px solid var(--line-2); }
  .agx-path { flex-direction: column; padding: 12px 15px; gap: 10px; }
  .agx-st { padding: 0; }
  .agx-arrow { flex: 0 0 20px; }
  .agx-arrow svg { transform: rotate(90deg); }
  .agx-wall { border-left: 0; border-top: 3px solid var(--paprika); }
  .part { grid-template-columns: 1fr; }
  .part-wall { height: 34px; margin: 12px 0; }
  .part-wall span { transform: translate(-50%, -50%); }
  .mxb { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 880px) {
  .grid2 { grid-template-columns: 1fr; }
  .duo { flex-wrap: wrap; }
  .duo-c { flex: 1 1 46%; border-bottom: 1px solid var(--line-2); }
}
@media (max-width: 760px) {
  .app { height: calc(100vh - 52px); }
  .rail {
    position: fixed; top: 0; left: 0; bottom: 0; transform: translateX(-100%);
    transition: transform .2s ease; box-shadow: var(--sh-3);
  }
  .app.nav-open .rail { transform: none; }
  .rail-toggle { display: grid; }
  #collapse-btn { display: none; }
  .search { min-width: 0; flex: 1; }
  .search span:not(.kbd) { display: none; }
  .search .kbd { display: none; }
  .page { padding: 16px 14px 60px; }
  /* a 40px empty bordered box is worse than no search box */
  .search { display: none; }
  /* a note beside a heading squeezes the heading into a 2-word column */
  .panel-h { flex-wrap: wrap; }
  .panel-h h3 { flex: 1 1 100%; }
  .panel-h .ph-note { flex: 1 1 100%; }
  .page-head { flex-wrap: wrap; }
  .page-head .ph-t { flex: 1 1 100%; }
  .page-head > *:not(.ph-t) { flex: 1 1 100%; }
  .lens-btn .lens-sub { display: none; }
  .duo-c { flex: 1 1 100%; }
  .mxb { grid-template-columns: 1fr; }
  .fnd-rows { grid-template-columns: 1fr; }
  .fnd-row { border-right: 0; }
  .need-r { flex-wrap: wrap; }
  .need-cta { width: 100%; }
  .trade-side { flex-direction: column; gap: 4px; }
  .trade-key { flex: 0 0 auto; }
}
