/* ============================================================
   The Kits workspace (owner, 1 October 2026).
   A fixed header with the Kits mark and its data streams, a fixed
   menu on the left that sorts the tools into libraries, and the
   card between them: the only part that scrolls or changes.
   Black, white and true greys; the product marks carry their own
   color in the menu.
   ============================================================ */
:root { --ws-h: 72px; --ws-rail: 264px; }
body.kit-ws { background: var(--paper); }

/* ---------- header: the mark in the middle, data drawn in from both sides ---------- */
.ws-head { position: fixed; top: 0; left: 0; right: 0; height: var(--ws-h); z-index: 60;
  background: var(--black); color: var(--white); display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; }
.ws-side { display: flex; align-items: center; min-width: 0; height: var(--ws-h); }
.ws-side--l { padding-left: 18px; }
.ws-side--r { padding-right: 20px; }
.ws-flow { flex: 1 1 auto; min-width: 0; height: var(--ws-h); overflow: hidden; display: flex; }
.ws-flow--l { justify-content: flex-end; }
.ws-flow--r { justify-content: flex-start; margin-right: 16px; }
.ws-flow img { display: block; height: var(--ws-h); width: auto; max-width: none; }
.ws-head[data-quiet] .ws-flow { visibility: hidden; }
/* KITS stands as tall as the key (cap height = the key's 44 px); "by TPO Stack" sits
   after it, low and slightly below its baseline. */
.ws-brand { display: flex; align-items: center; color: var(--white); text-decoration: none; height: var(--ws-h); padding: 0 2px; }
.ws-key { display: block; flex: none; width: 44px; height: 44px; }
.ws-word { display: block; font: 800 61px/61px var(--sans); letter-spacing: 0.05em; text-transform: uppercase; margin-left: 14px; margin-top: -1px; }
.ws-by { display: block; align-self: flex-end; font: 600 12px/1 var(--sans); letter-spacing: 0.04em; color: #CACACA; white-space: nowrap; margin: 0 0 13px 6px; }
.ws-top-btn, .ws-rail-btn { font: 600 14px/1 var(--sans); color: var(--white); background: transparent; border: 1.5px solid #5E5E5E;
  border-radius: 4px; padding: 11px 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; }
.ws-top-btn:hover, .ws-rail-btn:hover, .ws-top-btn[aria-expanded="true"] { border-color: var(--white); }
.ws-top-btn::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); }
.ws-rail-btn { display: none; }
.ws-burger, .ws-burger::before, .ws-burger::after { display: block; width: 16px; height: 2px; background: currentColor; position: relative; }
.ws-burger::before, .ws-burger::after { content: ""; position: absolute; left: 0; }
.ws-burger::before { top: -5px; } .ws-burger::after { top: 5px; }
.ws-top-menu { position: absolute; right: 0; top: calc(100% + 12px); width: 320px; background: var(--white); color: var(--black);
  border-radius: 8px; padding: 18px; box-shadow: 0 18px 48px -12px rgba(14,14,14,.45); border: 1px solid #DDDDDD; }
.ws-top-h { font-weight: 700; font-size: 14px; margin-bottom: 12px; }
.ws-fields { display: grid; gap: 6px; }
.ws-fields label { font-size: 13px; font-weight: 600; margin-top: 6px; }
.ws-fields input { font: 15px var(--sans); padding: 10px 12px; border: 1px solid var(--muted-on-white); border-radius: 4px; width: 100%; box-sizing: border-box; }
.ws-note { font-size: 12.5px; color: var(--muted-on-white); margin-top: 10px; line-height: 1.45; }
/* the menu: Settings (opens in place), TPO Stack Home, Early Access */
.ws-top-menu { padding: 8px; }
.ws-menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ws-mi { all: unset; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; padding: 10px 12px;
  border-radius: 6px; font: 700 13px/1.2 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--black); cursor: pointer; text-decoration: none; }
.ws-mi:hover { background: var(--paper); }
.ws-mi:focus-visible { outline: 2px solid var(--black); outline-offset: -2px; }
.ws-mi--set::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.ws-mi--set[aria-expanded="true"]::after { transform: rotate(45deg); }
.ws-menu li + li { border-top: 1px solid #EEEEEE; }
.ws-settings { padding: 6px 12px 14px; }
.ws-acct { margin: 10px 0 0; font-weight: 600; font-size: 14px; }
.ws-acct a { color: var(--black); }
/* the account ask, in Settings and under "Add your name to shared results?" */
.acct-ask { margin-top: 14px; padding: 14px; border: 1px solid #DDDDDD; border-radius: 8px; background: var(--paper); font-size: 14px; line-height: 1.45; }
.acct-btns { display: flex; align-items: center; gap: 16px; margin-top: 10px; flex-wrap: wrap; }

/* ---------- the menu on the left ---------- */
.ws-rail { position: fixed; top: var(--ws-h); bottom: 0; left: 0; width: var(--ws-rail); z-index: 50; background: var(--white);
  border-right: 1px solid #DDDDDD; overflow-y: auto; padding: 18px 14px 20px; display: flex; flex-direction: column; gap: 6px; box-sizing: border-box; }
.ws-rail a { color: var(--black); text-decoration: none; }
.ws-all { display: block; font-weight: 700; font-size: 15px; padding: 10px 12px; border-radius: 6px; }
.ws-lib { border-top: 1px solid #DDDDDD; padding-top: 6px; }
.ws-lib-h { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; font: 700 12px/1.2 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-on-white); border-radius: 6px; min-height: 40px; }
.ws-lib-h:hover { color: var(--black); }
.ws-lib-h:focus-visible { outline: 2px solid var(--black); outline-offset: 2px; }
.ws-lib-h::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.ws-lib.open .ws-lib-h::after { transform: rotate(45deg); }
.ws-lib ul { list-style: none; margin: 0 0 6px; padding: 0; display: none; }
.ws-lib.open ul { display: block; }
.ws-lib li a { display: block; padding: 9px 12px; font-size: 15px; border-radius: 6px; line-height: 1.3; }
.ws-rail a:hover { background: var(--paper); }
.ws-rail a[aria-current="page"] { background: var(--black); color: var(--white); font-weight: 600; }
.ws-prod { margin-top: auto; padding: 14px 0 0; border-top: 1px solid #DDDDDD; display: grid; gap: 8px;
  background: var(--white); }
@media (min-height: 720px) { .ws-prod { position: sticky; bottom: -20px; padding-bottom: 20px; margin-bottom: -20px; } }
.ws-prod-h { font: 700 12px/1.2 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-on-white); padding: 4px 12px 6px; display: flex; align-items: center; gap: 8px; }
/* "TPO Stack" goes home: bold, and raised a little so it reads as a button (owner, 1 October 2026) */
.ws-rail .ws-home { display: inline-block; font-weight: 800; color: var(--black); padding: 6px 9px; margin-top: -4px; border: 1px solid #CACACA; border-radius: 5px; background: var(--white);
  box-shadow: 0 1px 0 #CACACA, 0 3px 8px -2px rgba(14,14,14,.18); transform: translateY(-1px); transition: box-shadow .12s, transform .12s; }
.ws-rail .ws-home:hover { background: var(--white); border-color: var(--black); box-shadow: 0 1px 0 var(--black), 0 5px 12px -3px rgba(14,14,14,.24); transform: translateY(-2px); }
.ws-rail .ws-home:active { transform: none; box-shadow: 0 1px 2px rgba(14,14,14,.15); }
.ws-rail .ws-home:focus-visible { outline: 2px solid var(--black); outline-offset: 2px; }
.ws-p { display: grid; gap: 4px; padding: 12px; border: 1px solid #DDDDDD; border-radius: 8px; }
.ws-p:hover { border-color: var(--black); background: var(--white) !important; }
.ws-pn { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; }
.ws-p--org .ws-pn { color: var(--clay); }
.ws-p--dec .ws-pn { color: var(--purple); }
.ws-pn::after { content: "\2197"; font-weight: 600; color: var(--muted-on-white); margin-left: auto; }
.ws-pl { font-size: 13px; color: var(--muted-on-white); line-height: 1.35; }

/* ---------- the card ---------- */
.ws-main { margin-left: var(--ws-rail); padding: calc(var(--ws-h) + 20px) 24px 28px; min-height: 100vh; box-sizing: border-box; }
.ws-card { background: var(--white); border-radius: 12px; overflow: hidden; max-width: 1240px; margin: 0 auto;
  box-shadow: 0 1px 2px rgba(14,14,14,.06), 0 22px 48px -30px rgba(14,14,14,.35); }
.ws-card.is-loading { opacity: .55; transition: opacity .12s; }
.ws-card .container { max-width: 1120px; padding: 0 32px; }
.ws-card .page-head { padding: 40px 0 36px; }
.ws-card .tool { padding-top: 36px; }
.kit-ws .results { top: calc(var(--ws-h) + 16px); }
.ws-foot { border-top: 1px solid #DDDDDD; padding: 18px 32px 22px; font-size: 13px; color: var(--muted-on-white); }
.ws-foot a { color: var(--muted-on-white); }

/* the library card */
.kits-hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.kits-hero-art img { display: block; width: 100%; max-width: 420px; height: auto; margin: -24px auto -36px; }
.lib-sec { padding: 36px 0 8px; }
.lib-sec:last-of-type { padding-bottom: 40px; }
.lib-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.lib-head h2 { font: 700 13px/1.2 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; }
.lib-head p { color: var(--muted-on-white); font-size: 15px; }

@media (max-width: 1180px) {
  .kit-ws .tool-grid { grid-template-columns: minmax(0, 1fr); }
  .kit-ws .results { position: static; }
}

/* ---------- phones and small tablets: the menu becomes a drawer ---------- */
@media (max-width: 900px) {
  :root { --ws-h: 64px; }
  .ws-side--l { padding-left: 10px; }
  .ws-side--r { padding-right: 10px; justify-content: flex-end; }
  .ws-rail-btn { display: inline-flex; padding: 10px 12px; }
  .ws-key { width: 34px; height: 34px; }
  .ws-word { font-size: 47px; line-height: 47px; margin-left: 10px; }
  .ws-by { font-size: 10px; margin: 0 0 12px 5px; }
  .ws-flow { display: none; }
  .ws-top-btn { padding: 10px 12px; }
  .ws-rail { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(14,14,14,.3); width: min(300px, 86vw); }
  body.ws-open .ws-rail { transform: none; }
  .ws-scrim { position: fixed; inset: var(--ws-h) 0 0 0; background: rgba(14,14,14,.35); z-index: 45; }
  .ws-main { margin-left: 0; padding: calc(var(--ws-h) + 12px) 10px 16px; }
  .ws-card { border-radius: 10px; }
  .ws-card .container { padding: 0 16px; }
  .kits-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .kits-hero-art { display: none; }
  .ws-foot { padding: 16px; }
}
@media (max-width: 420px) {
  .ws-by { display: none; }
  .ws-rail-btn { font-size: 0; gap: 0; }
  .ws-top-menu { width: calc(100vw - 24px); right: -2px; }
}
@media (prefers-reduced-motion: reduce) { .ws-rail { transition: none; } }

/* ---------- a borrower opening a shared result: the card alone, under a slim header ---------- */
body.is-shared .ws-rail, body.is-shared .ws-rail-btn, body.is-shared .ws-top, body.is-shared .ws-scrim { display: none !important; }
body.is-shared .ws-main { margin-left: 0; }
body.is-shared .ws-brand { pointer-events: none; }

/* ---------- print: the card only ---------- */
@media print {
  .ws-head, .ws-rail, .ws-scrim, .ws-foot { display: none !important; }
  .ws-main { margin: 0; padding: 0; min-height: 0; }
  .ws-card { box-shadow: none; border-radius: 0; max-width: none; }
  body.kit-ws { background: #fff; }
}
body.is-shared .crumbs { display: none; }

/* ---------- All Tools and TPO Today at the top of the menu (owner, 1 October 2026) ----------
   All Tools is the black button; TPO Today sits right under it in white, so the two read
   apart. On the library page TPO Today is the large link under the title instead. */
.ws-rail .ws-all { background: var(--black); color: var(--white); text-align: center; border: 1.5px solid var(--black); }
.ws-rail .ws-all:hover { background: #262626; }
.ws-rail .ws-all[aria-current="page"] { background: var(--black); }
.ws-rail .ws-today { display: block; text-align: center; font-weight: 800; font-size: 15px; letter-spacing: 0.02em; padding: 9px 12px; border-radius: 6px;
  border: 1.5px solid var(--black); background: var(--white); color: var(--black); }
.ws-rail .ws-today[hidden] { display: none; }
.ws-rail .ws-today:hover { background: var(--paper); }
.ws-rail .ws-today[aria-current="page"] { background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--black); }
.ws-rail .ws-all:focus-visible, .ws-rail .ws-today:focus-visible { outline: 2px solid var(--black); outline-offset: 2px; }

/* ---------- the library title, Did You Know? and TPO Today ---------- */
.kits-hero h1 { max-width: none; }
.dyk { margin-top: 22px; max-width: 560px; display: grid; grid-template-columns: 1fr auto; column-gap: 14px; align-items: start; }
.dyk-k { grid-column: 1 / -1; font: 700 12px/1.2 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-on-paper, #5E5E5E); margin: 0 0 6px; }
.dyk-f { margin: 0; font-size: 17px; line-height: 1.5; color: var(--black); min-height: 4.5em; transition: opacity .18s; }
.dyk-f.is-out { opacity: 0; }
.dyk-c { display: block; margin-top: 4px; font-size: 12.5px; color: var(--muted-on-paper, #5E5E5E); text-decoration: none; }
.dyk-c:hover { text-decoration: underline; }
.dyk-next { all: unset; cursor: pointer; font: 600 13px/1 var(--sans); color: var(--black); text-decoration: underline; text-underline-offset: 3px; padding: 4px 0; align-self: start; margin-top: 3px; }
.dyk-next:focus-visible { outline: 2px solid var(--black); outline-offset: 2px; }
.today-link { display: inline-flex; align-items: baseline; gap: 12px; margin-top: 30px; font: 800 34px/1.1 var(--sans); letter-spacing: 0.01em; color: var(--black); text-decoration: none;
  border-bottom: 3px solid var(--black); padding-bottom: 4px; }
.today-link span { transition: transform .15s; }
.today-link:hover span { transform: translateX(4px); }
@media (prefers-reduced-motion: reduce) { .dyk-f, .today-link span { transition: none; } }
@media (max-width: 900px) { .today-link { font-size: 28px; } .dyk-f { min-height: 0; } }

/* ---------- TPO Today ---------- */
.td-kicker { font: 800 13px/1.2 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 10px; }
.td-head .lede { max-width: 60ch; }
.td-body { padding: 8px 0 40px; }
.td-sec { padding-top: 28px; }
.td-sec h2 { font: 700 13px/1.2 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 4px; padding-bottom: 10px; border-bottom: 2px solid var(--black); }
.td-sec--worth h2, .td-sec--useful h2 { border-bottom-width: 1px; border-color: #CACACA; }
.td-item { padding: 20px 0; border-bottom: 1px solid #DDDDDD; max-width: 760px; }
.td-item h3 { font: 700 19px/1.35 var(--sans); margin: 0 0 6px; }
.td-sec--changed .td-item h3 { font-size: 21px; }
.td-sum { margin: 0 0 10px; font-size: 16px; line-height: 1.55; }
.td-aff, .td-src { margin: 0 0 4px; font-size: 13.5px; color: var(--muted-on-white); }
.td-aff span, .td-src span:not(.td-sep) { font-weight: 700; color: var(--black); }
.td-sep { margin: 0 4px; }
.td-more { display: inline-block; margin-top: 6px; font-weight: 700; font-size: 14px; color: var(--black); }
.td-note { margin: 24px 0 0; font-size: 13px; color: var(--muted-on-white); }
.td-past { margin-top: 28px; }
.td-past h2 { font: 700 12px/1.2 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; }
.td-past ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.td-past a { color: var(--black); }
