/* Diligence Team Assistant — house look: white-leaning cream, logo black, logo gold. */
@font-face { font-family: Poppins; font-weight: 400; font-display: swap; src: url(fonts/poppins-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Poppins; font-weight: 500; font-display: swap; src: url(fonts/poppins-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: Poppins; font-weight: 600; font-display: swap; src: url(fonts/poppins-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: Poppins; font-weight: 700; font-display: swap; src: url(fonts/poppins-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: Lato; font-weight: 400; font-display: swap; src: url(fonts/lato-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Lato; font-weight: 400; font-style: italic; font-display: swap; src: url(fonts/lato-latin-400-italic.woff2) format('woff2'); }
@font-face { font-family: Lato; font-weight: 700; font-display: swap; src: url(fonts/lato-latin-700-normal.woff2) format('woff2'); }

:root {
  --paper: #FBFAF6;
  --card: #FFFFFF;
  --linen: #F2EEE4;
  --linen-2: #E9E3D4;
  --rule: #E4DCC8;
  --ink: #0E0F10;
  --ink-2: #2B2C2F;
  --stone: #6B675E;
  --stone-2: #8E897D;
  --gold: #CDBB81;
  --gold-soft: #F4EEDC;
  --gold-text: #8A7333;
  --ok: #3E6A4C;
  --ok-soft: #E7F0E8;
  --warn: #8F5F12;
  --warn-soft: #FBF1DD;
  --bad: #9A3A2C;
  --bad-soft: #F8E6E2;
  --display: Poppins, "Segoe UI", system-ui, sans-serif;
  --body: Lato, "Segoe UI", system-ui, sans-serif;
  --radius: 8px;
  --rail: 264px;
}

* { box-sizing: border-box; }
html, body, #root { height: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink-2);
  font: 16px/1.55 var(--body); -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--display); color: var(--ink); margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 31px; font-weight: 600; line-height: 1.2; }
h2 { font-size: 25px; font-weight: 600; line-height: 1.25; }
h3 { font-size: 20px; font-weight: 600; line-height: 1.3; }
h4 { font-size: 16px; font-weight: 600; }
p { margin: 0 0 12px; }
a { color: var(--ink); text-decoration-color: var(--gold); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--stone); }
.small { font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The brand mark: the logo's parallelogram */
.slash { display: inline-block; width: 10px; height: 18px; background: var(--gold); transform: skewX(-28deg); flex: none; }

/* ── Buttons & fields ───────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--ink); background: var(--ink); color: #fff;
  font-family: var(--display); font-weight: 500; font-size: 14px; letter-spacing: .01em;
  padding: 10px 18px; border-radius: 6px; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: #26272a; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn.ghost:hover { border-color: var(--ink); background: var(--card); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn.gold:hover { background: #c2ae6f; }
.btn.danger { background: transparent; color: var(--bad); border-color: #e6c9c2; }
.btn.danger:hover { background: var(--bad-soft); }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.block { width: 100%; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; cursor: pointer; font-size: inherit; }

label.field { display: block; margin-bottom: 16px; }
label.field > span { display: block; font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
label.field > small { display: block; color: var(--stone); font-size: 13px; margin-top: 6px; }
input[type=text], input[type=email], input[type=search], textarea, select {
  width: 100%; background: var(--card); border: 1px solid var(--rule); border-radius: 6px;
  padding: 10px 12px; line-height: 1.4; transition: border-color .15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--gold-soft); }
textarea { resize: vertical; min-height: 120px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--ink); width: 16px; height: 16px; }

.alert { border-radius: 6px; padding: 10px 14px; font-size: 14px; margin-bottom: 16px; border: 1px solid; }
.alert.err { background: var(--bad-soft); border-color: #ebcbc4; color: var(--bad); }
.alert.ok { background: var(--ok-soft); border-color: #cbdfce; color: var(--ok); }
.alert.info { background: var(--gold-soft); border-color: #e9dcb6; color: #5f5022; }

.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--linen); color: var(--stone); white-space: nowrap; }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.tag.gold { background: var(--gold-soft); color: var(--gold-text); }
.tag.dark { background: var(--ink); color: #fff; }

/* ── Sign-in ────────────────────────────────────────────────── */
.auth { min-height: 100%; display: grid; grid-template-columns: minmax(340px, 44%) 1fr; }
.auth-brand {
  position: relative; overflow: hidden; background: var(--linen);
  padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-brand::after {
  /* the oversized slash, bleeding off the bottom-right */
  content: ""; position: absolute; width: 46%; height: 135%; right: -6%; bottom: -24%;
  background: var(--gold); transform: skewX(-28deg); transform-origin: bottom;
}
.auth-brand .logo { width: 230px; position: relative; z-index: 1; }
.auth-brand .pitch { position: relative; z-index: 1; max-width: 440px; }
.auth-brand .pitch h1 { font-size: 39px; line-height: 1.12; font-weight: 600; max-width: 12ch; }
.auth-brand .pitch p { color: var(--stone); font-size: 17px; margin-top: 16px; max-width: 30ch; }
.auth-brand .mw { width: 120px; position: relative; z-index: 1; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 { margin-bottom: 8px; }
.auth-card .lead { color: var(--stone); margin-bottom: 28px; }
.code-input { font-family: var(--display); font-size: 26px !important; letter-spacing: 12px; text-align: center; font-weight: 600; }
.auth-foot { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--stone); }

/* ── App shell ──────────────────────────────────────────────── */
.app { display: grid; grid-template-columns: var(--rail) 1fr; grid-template-rows: minmax(0, 1fr); height: 100%; }
.rail {
  background: var(--linen); border-right: 1px solid var(--rule);
  display: flex; flex-direction: column; min-height: 0; overflow: hidden;
}
.rail-head { padding: 24px 22px 18px; }
.rail-head img { width: 148px; display: block; }
.rail-head .branch { margin-top: 10px; font-size: 13px; color: var(--stone); }
.nav { padding: 6px 12px; display: flex; flex-direction: column; gap: 2px; }
.nav-group { margin-top: 14px; padding: 6px 12px 4px; font-size: 12px; font-weight: 700; color: var(--stone-2); }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 6px;
  text-decoration: none; color: var(--ink-2); font-weight: 700; font-size: 15px; position: relative;
}
.nav a:hover { background: var(--linen-2); }
.nav a .marker { width: 7px; height: 15px; transform: skewX(-28deg); background: transparent; flex: none; }
.nav a.active { background: var(--card); color: var(--ink); box-shadow: 0 1px 0 var(--rule); }
.nav a.active .marker { background: var(--gold); }
.nav a .count { margin-left: auto; background: var(--ink); color: #fff; font-size: 12px; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }
.nav a .count.gold { background: var(--gold); color: var(--ink); }

.threads { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 12px 12px; }
.threads a {
  display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 6px;
  text-decoration: none; font-size: 14px; color: var(--ink-2);
}
.threads a span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.threads a:hover { background: var(--linen-2); }
.threads a.active { background: var(--card); }
.threads .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex: none; }
.threads .dot.new { background: var(--ink); }
.spacer { flex: 1; }

.rail-foot { border-top: 1px solid var(--rule); padding: 14px 18px 18px; }
.me { display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 600; font-size: 13px; flex: none; }
.avatar.gold { background: var(--gold); color: var(--ink); }
.me .who { min-width: 0; flex: 1; }
.me .who b { display: block; font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .who span { display: block; font-size: 12px; color: var(--stone); }
.rail-foot .mw { width: 92px; margin-top: 14px; opacity: .9; display: block; }

.content { display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100%; }
.main { flex: 1; min-width: 0; min-height: 0; overflow-y: auto; }
.page { max-width: 1080px; margin: 0 auto; padding: 36px 40px 64px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head p { margin: 6px 0 0; color: var(--stone); max-width: 60ch; }

.mobilebar { display: none; }

/* ── Ask / conversation ─────────────────────────────────────── */
.chat { display: flex; flex-direction: column; height: 100%; }
.chat-scroll { flex: 1; overflow-y: auto; }
.chat-inner { max-width: 760px; margin: 0 auto; padding: 36px 32px 24px; }
.welcome { padding-top: 7vh; }
.welcome h1 { font-size: 34px; max-width: 18ch; }
.welcome p.lead { color: var(--stone); font-size: 17px; max-width: 54ch; margin-top: 12px; }
.topics { margin-top: 28px; }
.topics h4 { font-size: 14px; color: var(--stone); font-weight: 500; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--rule); background: var(--card); border-radius: 999px; padding: 7px 14px; font-size: 14px; cursor: pointer; text-decoration: none; color: var(--ink-2); }
.chip:hover { border-color: var(--ink); }
.howit { margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; border-top: 1px solid var(--rule); padding-top: 22px; }
.howit div { font-size: 14px; color: var(--stone); }
.howit b { display: block; color: var(--ink); font-family: var(--display); font-weight: 600; font-size: 15px; margin-bottom: 4px; }

.turn { margin-bottom: 28px; }
.q { display: flex; justify-content: flex-end; margin-bottom: 14px; }
.q div { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 14px 14px 4px 14px; max-width: 78%; white-space: pre-wrap; word-wrap: break-word; }
.a { display: flex; gap: 14px; }
.a .who-mark { width: 30px; height: 30px; border-radius: 50%; background: var(--linen); border: 1px solid var(--rule); display: flex; align-items: center; justify-content: center; flex: none; margin-top: 2px; }
.a .who-mark .slash { width: 7px; height: 13px; }
.a .body { flex: 1; min-width: 0; }
.a .by { font-size: 13px; color: var(--stone); margin-bottom: 4px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.a .by b { color: var(--ink); }
.team-answer { margin-top: 14px; background: var(--card); border: 1px solid var(--rule); border-left: 4px solid var(--gold); border-radius: 0 var(--radius) var(--radius) 0; padding: 14px 18px; }
.team-answer .by { margin-bottom: 6px; }
.waiting { margin-top: 14px; background: var(--gold-soft); border-radius: var(--radius); padding: 12px 16px; font-size: 14px; color: #5f5022; display: flex; gap: 12px; align-items: flex-start; }
.waiting .slash { margin-top: 3px; }
.sources { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--stone); }
.sources a { font-size: 13px; background: var(--linen); padding: 2px 10px; border-radius: 999px; text-decoration: none; color: var(--ink-2); }
.sources a:hover { background: var(--linen-2); }
.turn-actions { margin-top: 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--stone); }
.iconbtn { border: 1px solid var(--rule); background: var(--card); border-radius: 6px; padding: 4px 10px; font-size: 13px; cursor: pointer; color: var(--ink-2); }
.iconbtn:hover { border-color: var(--ink); }
.iconbtn.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.escalate-box { margin-top: 10px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px; }
.escalate-box textarea { min-height: 70px; margin-bottom: 10px; }
.thinking { display: flex; gap: 6px; padding: 8px 0; }
.thinking i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); animation: pulse 1.1s infinite ease-in-out; }
.thinking i:nth-child(2) { animation-delay: .15s; } .thinking i:nth-child(3) { animation-delay: .3s; }
@keyframes pulse { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.composer-wrap { border-top: 1px solid var(--rule); background: var(--paper); padding: 14px 32px 18px; }
.composer { max-width: 760px; margin: 0 auto; }
.composer form { display: flex; gap: 10px; align-items: flex-end; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 8px 8px 8px 14px; }
.composer form:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px var(--gold-soft); }
.composer textarea { border: 0; box-shadow: none !important; min-height: 26px; max-height: 200px; padding: 6px 0; resize: none; background: transparent; }
.composer .note { font-size: 12px; color: var(--stone-2); margin-top: 8px; text-align: center; }

/* rendered markdown */
.md p { margin: 0 0 10px; }
.md p:last-child, .md ul:last-child, .md ol:last-child { margin-bottom: 0; }
.md ul, .md ol { margin: 0 0 10px; padding-left: 22px; }
.md li { margin-bottom: 4px; }
.md h3, .md h4 { font-size: 16px; margin: 14px 0 6px; }
.md code { background: var(--linen); padding: 1px 5px; border-radius: 4px; font-size: 14px; }
.md strong { color: var(--ink); }

/* ── Panels, lists, tables ──────────────────────────────────── */
.panel { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); }
.panel-pad { padding: 22px 24px; }
.panel h3 + p { margin-top: 4px; }
.empty { text-align: center; padding: 56px 24px; color: var(--stone); }
.empty h3 { margin-bottom: 8px; }
.empty .slash { width: 14px; height: 26px; margin-bottom: 16px; }

table.list { width: 100%; border-collapse: collapse; font-size: 15px; }
table.list th { text-align: left; font-size: 13px; color: var(--stone); font-weight: 700; padding: 12px 16px; border-bottom: 1px solid var(--rule); background: var(--paper); }
table.list td { padding: 13px 16px; border-bottom: 1px solid #F0EADB; vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list td.actions { text-align: right; white-space: nowrap; }
table.list td.actions .btn { margin-left: 6px; }
.person { display: flex; align-items: center; gap: 12px; }
.person b { display: block; color: var(--ink); }
.person span { font-size: 13px; color: var(--stone); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--rule); margin-bottom: 20px; flex-wrap: wrap; }
.tabs button { background: none; border: 0; padding: 10px 14px; font-weight: 700; color: var(--stone); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: 15px; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--gold); }
.tabs button .n { font-weight: 400; color: var(--stone-2); margin-left: 4px; }

.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar input[type=search] { max-width: 320px; }

/* inbox split */
.split { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; }
.qlist { display: flex; flex-direction: column; }
.qitem { text-align: left; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 16px; cursor: pointer; margin-bottom: 10px; display: block; width: 100%; }
.qitem:hover { border-color: var(--stone-2); }
.qitem.on { border-color: var(--ink); box-shadow: inset 4px 0 0 var(--gold); }
.qitem .meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--stone); margin-bottom: 4px; gap: 8px; }
.qitem .meta b { color: var(--ink); }
.qitem .txt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 15px; color: var(--ink-2); }
.detail .asked { font-size: 13px; color: var(--stone); margin-bottom: 8px; }
.detail blockquote { margin: 0 0 18px; padding: 14px 18px; background: var(--paper); border-left: 4px solid var(--gold); border-radius: 0 6px 6px 0; font-size: 17px; color: var(--ink); white-space: pre-wrap; }
.attempt { border: 1px dashed var(--rule); border-radius: 6px; padding: 12px 14px; margin-bottom: 18px; font-size: 14px; }
.attempt h4 { font-size: 13px; color: var(--stone); margin-bottom: 6px; font-weight: 600; }
.context { margin-bottom: 18px; font-size: 14px; }
.context details summary { cursor: pointer; color: var(--stone); }
.context .ctx { border-left: 2px solid var(--rule); padding: 6px 0 6px 12px; margin-top: 8px; }
.learn { background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; padding: 14px; margin: 14px 0 18px; }
.learn .row2 { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; margin-top: 12px; }
.learn .row2 label.field { margin-bottom: 0; }

/* knowledge */
.kgrid { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
.kitem { padding: 16px 20px; border-bottom: 1px solid #F0EADB; display: flex; gap: 16px; align-items: flex-start; cursor: pointer; }
.kitem:last-child { border-bottom: 0; }
.kitem:hover { background: var(--paper); }
.kitem .k-main { flex: 1; min-width: 0; }
.kitem h4 { font-size: 16px; margin-bottom: 3px; }
.kitem .k-meta { font-size: 13px; color: var(--stone); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.kitem .k-snip { font-size: 14px; color: var(--stone); margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kitem.off { opacity: .55; }
.meter { height: 8px; background: var(--linen); border-radius: 4px; overflow: hidden; margin: 10px 0 6px; }
.meter i { display: block; height: 100%; background: var(--gold); }
.side-card + .side-card { margin-top: 16px; }
.side-card h4 { margin-bottom: 6px; }
.side-card p { font-size: 14px; color: var(--stone); }
.dropzone { border: 1.5px dashed var(--gold); background: var(--gold-soft); border-radius: var(--radius); padding: 18px; text-align: center; font-size: 14px; color: #5f5022; cursor: pointer; }
.dropzone.drag { background: #ece0bb; }
.test-result { margin-top: 12px; font-size: 14px; border-top: 1px solid var(--rule); padding-top: 12px; }

/* drawer editor */
.drawer-bg { position: fixed; inset: 0; background: rgba(14, 15, 16, .32); z-index: 40; display: flex; justify-content: flex-end; }
.drawer { width: min(640px, 100%); height: 100%; background: var(--paper); display: flex; flex-direction: column; box-shadow: -10px 0 40px rgba(14, 15, 16, .12); animation: slidein .2s ease-out; }
@keyframes slidein { from { transform: translateX(24px); opacity: .6; } }
.drawer-head { padding: 22px 28px; border-bottom: 1px solid var(--rule); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.drawer-body { padding: 24px 28px; overflow-y: auto; flex: 1; }
.drawer-body textarea.big { min-height: 340px; font-size: 15px; }
.drawer-foot { padding: 16px 28px; border-top: 1px solid var(--rule); display: flex; gap: 10px; justify-content: space-between; align-items: center; background: var(--card); }
.closex { background: none; border: 0; font-size: 26px; line-height: 1; cursor: pointer; color: var(--stone); padding: 4px 8px; }

/* library */
.lib { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; }
.lib-nav { position: sticky; top: 20px; }
.lib-nav .cat { font-size: 13px; color: var(--stone); font-weight: 700; margin: 16px 0 6px; }
.lib-nav a { display: block; padding: 6px 10px; border-radius: 6px; text-decoration: none; font-size: 14px; color: var(--ink-2); }
.lib-nav a:hover { background: var(--linen); }
.lib-nav a.on { background: var(--card); box-shadow: inset 3px 0 0 var(--gold); color: var(--ink); font-weight: 700; }
.lib-doc { padding: 28px 32px; }
.lib-doc h2 { margin-bottom: 6px; }
.lib-doc .doc-meta { font-size: 13px; color: var(--stone); margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.lib-doc .md { max-width: 70ch; }

/* overview */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat { padding: 18px 20px; }
.stat .v { font-family: var(--display); font-size: 31px; font-weight: 600; color: var(--ink); line-height: 1.1; }
.stat .l { font-size: 14px; color: var(--stone); margin-top: 4px; }
.stat.hl { background: var(--ink); border-color: var(--ink); }
.stat.hl .v { color: #fff; } .stat.hl .l { color: #c9c4b6; }
.stat.hl a { color: var(--gold); }
.two { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--stone); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart text { font-family: var(--body); font-size: 11px; fill: var(--stone); }
.setup-list { list-style: none; padding: 0; margin: 14px 0 0; }
.setup-list li { margin-bottom: 12px; font-size: 15px; }

/* toast */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 8px; font-size: 14px; z-index: 60; box-shadow: 0 8px 24px rgba(0,0,0,.18); display: flex; gap: 10px; align-items: center; }
.toast .slash { width: 7px; height: 13px; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .two, .kgrid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .split, .lib { grid-template-columns: 1fr; }
  .lib-nav { position: static; }
}
@media (max-width: 760px) {
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth-brand { padding: 22px 24px; min-height: 0; }
  .auth-brand .pitch, .auth-brand .mw { display: none; }
  .auth-brand::after { width: 56px; height: 100%; right: 36px; bottom: 0; }
  .auth-main { align-items: flex-start; padding-top: 40px; }
  .auth-brand .logo { width: 160px; }
  .app { grid-template-columns: 1fr; }
  .rail { position: fixed; inset: 0 auto 0 0; width: 86%; max-width: 320px; z-index: 50; transform: translateX(-102%); transition: transform .2s; }
  .app.nav-open .rail { transform: none; box-shadow: 0 0 0 100vmax rgba(14,15,16,.3); }
  .mobilebar { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid var(--rule); background: var(--linen); position: sticky; top: 0; z-index: 10; }
  .mobilebar img { width: 110px; }
  .page { padding: 24px 16px 48px; }
  .chat-inner { padding: 24px 16px; }
  .composer-wrap { padding: 10px 12px 12px; }
  .howit { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  table.list .hide-sm { display: none; }
  .learn .row2 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* additions */
.lg-ink { background: var(--ink); } .lg-gold { background: var(--gold); }
.invite-form { margin-top: 16px; }
.invite-grid { display: grid; grid-template-columns: 2fr 1.5fr 1fr auto; gap: 12px; align-items: end; }
.invite-grid .field { margin-bottom: 0; }
.doc-ask { margin-top: 20px; }
.chart .page-head { margin-bottom: 12px; align-items: center; }
@media (max-width: 900px) { .invite-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .invite-grid { grid-template-columns: 1fr; } }
.drawer-form { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.steps { padding-left: 20px; margin: 0 0 8px; } .steps li { margin-bottom: 10px; }
.devcode { background: var(--gold-soft); border: 1px solid #e9dcb6; border-radius: 8px; padding: 14px 16px; margin-bottom: 20px; text-align: center; }
.devcode span { display: block; font-size: 13px; color: #5f5022; margin-bottom: 4px; }
.devcode b { font-family: var(--display); font-size: 30px; letter-spacing: 10px; color: var(--ink); }
/* teach the assistant */
.teach-box { padding: 18px 20px 14px; }
.teach-box textarea { border: 0; box-shadow: none !important; padding: 4px 0; min-height: 140px; font-size: 17px; background: transparent; }
.teach-box:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px var(--gold-soft); }
.teach-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--rule); padding-top: 12px; margin-top: 6px; }
.teach-bar select { width: auto; padding: 7px 10px; font-size: 14px; }
.teach-note { font-size: 12px; color: var(--stone-2); margin-top: 10px; }
.mic { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--rule); background: var(--card); border-radius: 999px; padding: 7px 16px 7px 12px; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--ink); }
.mic:hover { border-color: var(--ink); }
.mic .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); }
.mic.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.mic.on .dot { background: #E0574A; animation: rec 1.2s infinite ease-in-out; }
@keyframes rec { 50% { opacity: .35; } }
.busy { display: flex; align-items: center; gap: 14px; margin-top: 16px; color: var(--stone); font-size: 15px; }
.teach .alert { margin-top: 16px; }
.draft { margin-top: 18px; border-left: 4px solid var(--gold); }
.draft-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.draft-head b { font-family: var(--display); font-weight: 600; color: var(--ink); font-size: 17px; }
.draft-sum { color: var(--stone); margin: 8px 0 14px; }
.saved-note { display: flex; gap: 12px; align-items: flex-start; background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; padding: 10px 14px; font-size: 14px; color: var(--stone); margin-bottom: 16px; }
.saved-note .slash { margin-top: 3px; width: 7px; height: 13px; }
.row2b { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.draft-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.recent-h { margin: 32px 0 12px; font-size: 17px; }
a.kitem { text-decoration: none; color: inherit; }
.linkbox { background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; padding: 12px 14px; margin-bottom: 18px; display: grid; gap: 6px; }
.archive-text { white-space: pre-wrap; font-size: 15px; line-height: 1.6; max-width: 70ch; }
@media (max-width: 760px) { .row2b { grid-template-columns: 1fr; } }
/* resources */
.sec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.sec-tile { display: block; padding: 22px 22px 18px; text-decoration: none; color: inherit; position: relative; transition: border-color .15s; }
.sec-tile:hover { border-color: var(--ink); }
.sec-tile .slash { width: 9px; height: 17px; margin-bottom: 14px; }
.sec-tile h3 { font-size: 19px; margin-bottom: 6px; }
.sec-tile p { color: var(--stone); font-size: 14px; margin-bottom: 12px; }
.sec-tile.is-draft { border-style: dashed; }
.sec-meta { font-size: 13px; color: var(--stone); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.back { display: inline-block; margin-bottom: 14px; color: var(--stone); }
.sec-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.add-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 16px 18px; margin-bottom: 20px; background: var(--linen); }
.add-label { font-weight: 700; color: var(--ink); margin-right: 4px; }
.add-hint { flex-basis: 100%; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #E0574A; display: inline-block; }
.res-list { display: grid; gap: 16px; }
.res-item { padding: 20px 22px; }
.res-item.is-draft { border-style: dashed; background: #FDFCF9; }
.res-item.flash { box-shadow: 0 0 0 3px var(--gold); }
.res-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.res-head h3 { font-size: 18px; }
.res-item audio { width: 100%; margin: 2px 0 10px; }
.res-item video { width: 100%; max-height: 480px; border-radius: 6px; background: var(--ink); margin-bottom: 10px; }
.res-img { max-width: 100%; border-radius: 6px; border: 1px solid var(--rule); margin-bottom: 10px; display: block; }
.res-file { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.yt { position: relative; aspect-ratio: 16 / 9; width: 100%; max-width: 760px; border-radius: 6px; overflow: hidden; background: var(--ink); margin-bottom: 8px; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.res-saved { margin-bottom: 10px; }
.res-body { max-width: 72ch; }
.res-transcript { margin-top: 10px; font-size: 14px; }
.res-transcript summary { cursor: pointer; color: var(--stone); }
.transcript-text { white-space: pre-wrap; margin-top: 8px; max-width: 72ch; }
.res-admin { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--rule); margin-top: 14px; padding-top: 12px; }
.res-admin .check { margin-left: 6px; }
.progress { height: 30px; position: relative; background: var(--linen); border-radius: 6px; overflow: hidden; margin-top: 8px; }
.progress i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--gold); transition: width .2s; }
.progress span { position: relative; display: block; text-align: center; line-height: 30px; font-size: 13px; font-weight: 700; color: var(--ink); }
/* recorder */
.recorder { display: flex; gap: 20px; align-items: center; background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 18px 20px; margin-bottom: 14px; }
.rec-btn { width: 64px; height: 64px; border-radius: 50%; border: 3px solid var(--gold); background: var(--card); display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.rec-btn span { width: 26px; height: 26px; border-radius: 50%; background: #E0574A; transition: border-radius .15s, transform .15s; }
.rec-btn.on { border-color: var(--ink); }
.rec-btn.on span { border-radius: 4px; transform: scale(.85); animation: rec 1.2s infinite ease-in-out; }
.rec-btn:disabled { opacity: .4; cursor: default; }
.rec-info { flex: 1; min-width: 0; }
.rec-time { font-family: var(--display); font-size: 28px; font-weight: 600; color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.rec-level { height: 6px; background: var(--linen); border-radius: 3px; overflow: hidden; margin-top: 10px; }
.rec-level i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .08s; }
#recPreview { width: 100%; margin-bottom: 14px; }
.rec-opts { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; }
.rec-opts select { width: auto; padding: 6px 10px; font-size: 14px; }

/* ── Admin console: its own look (dark rail, gold accents) ───── */
.admin-rail { background: #141518; border-right: 0; color: #D9D4C7; }
.admin-rail .rail-head img { width: 140px; }
.admin-rail .console-name { margin-top: 14px; font-family: var(--display); font-weight: 600; font-size: 15px; color: var(--gold); letter-spacing: .01em; }
.admin-rail .branch { color: #8F8A7E; margin-top: 2px; }
.admin-rail .nav { padding-top: 10px; }
.admin-rail .nav a { color: #D9D4C7; font-weight: 500; }
.admin-rail .nav a:hover { background: #22242A; color: #fff; }
.admin-rail .nav a.active { background: #26282E; color: #fff; box-shadow: none; }
.admin-rail .nav a.active .marker { background: var(--gold); }
.admin-rail .nav a .count { background: var(--gold); color: var(--ink); }
.admin-rail .rail-switch { padding: 0 18px 18px; }
.admin-rail .rail-switch small { display: block; color: #8F8A7E; font-size: 12px; margin-top: 8px; line-height: 1.45; }
.switch-btn { background: transparent; border: 1px solid var(--gold); color: var(--gold); }
.switch-btn:hover { background: var(--gold); color: var(--ink); }
.admin-rail .rail-foot { border-top-color: #2A2C31; }
.admin-rail .me .who b { color: #fff; }
.admin-rail .me .who span { color: #8F8A7E; }
.admin-rail .linkbtn { color: #D9D4C7; }
.admin-app .main { background: #F7F5EF; }
.admin-mobilebar { background: #141518; border-bottom-color: #2A2C31; }
.admin-mobilebar .btn.ghost { color: #fff; border-color: #3A3C42; }

/* Admin previewing the team view */
.preview-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #141518; color: #E9E5DA; padding: 10px 20px; font-size: 14px; }
.preview-bar .slash { width: 7px; height: 13px; }
.preview-bar span:nth-child(2) { flex: 1; }
.preview-bar .btn { background: var(--gold); border-color: var(--gold); color: var(--ink); }

/* New question: just the question field */
.ask-only { min-height: 100%; display: flex; flex-direction: column; justify-content: center; padding: 32px; max-width: 760px; margin: 0 auto; }
.ask-big { display: flex; gap: 10px; align-items: flex-end; background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 12px 12px 12px 18px; box-shadow: 0 6px 24px rgba(14, 15, 16, .05); }
.ask-big:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px var(--gold-soft); }
.ask-big textarea { border: 0; box-shadow: none !important; background: transparent; font-size: 18px; min-height: 84px; max-height: 260px; resize: none; padding: 6px 0; }
.ask-only .note { text-align: center; font-size: 12px; color: var(--stone-2); margin-top: 10px; }

/* Procedures: comments, recordings and documents */
.att-h { font-size: 16px; margin: 28px 0 12px; padding-top: 18px; border-top: 1px solid var(--rule); }
.comments { display: grid; gap: 10px; }
.comment { background: var(--gold-soft); border-radius: 8px; padding: 12px 16px; }
.comment .by { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--stone); margin-bottom: 6px; }
.comment .by b { color: var(--ink); }
.avatar.sm { width: 22px; height: 22px; font-size: 10px; }
.pis { display: grid; gap: 12px; }
.pi { border: 1px solid var(--rule); border-radius: 8px; padding: 14px 16px; background: var(--card); }
.pi-head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.pi-head b { font-family: var(--display); font-weight: 600; color: var(--ink); }
.pi audio { width: 100%; }
.pi video { width: 100%; max-height: 420px; border-radius: 6px; background: var(--ink); }
.pi-admin { display: flex; gap: 8px; margin-top: 10px; }
.src-ref { font-size: 13px; background: var(--linen); padding: 2px 10px; border-radius: 999px; color: var(--stone); }
.proc-form .big { min-height: 300px; }
.proc-save { display: flex; gap: 12px; align-items: center; }
.attach-panel { margin-top: 18px; }
.attach-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.attach-head h3 { font-size: 18px; }
.attach-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.comment-form { display: grid; gap: 10px; margin-top: 12px; justify-items: start; }
.comment-form textarea { min-height: 80px; }
.page-head p .tag { margin-right: 6px; }
.idle-warning { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 70; display: flex; align-items: center; gap: 14px; background: var(--ink); color: #fff; padding: 12px 14px 12px 18px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.25); font-size: 14px; max-width: calc(100% - 32px); }
.idle-warning .slash { width: 7px; height: 13px; }
.q-actions { display: flex; justify-content: flex-end; gap: 14px; margin: -8px 2px 12px; opacity: .75; }
.turn:hover .q-actions, .q-actions:focus-within { opacity: 1; }
.q-actions .linkbtn { font-size: 12px; color: var(--stone); text-decoration-color: var(--rule); }
.q-edit { margin: 0 0 14px auto; max-width: 78%; display: grid; gap: 8px; }
.q-edit textarea { min-height: 80px; }
.q-edit-actions { display: flex; gap: 8px; justify-content: flex-end; }
.answer-actions { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
/* writing tools */
.fmt-bar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 2px 0 8px; }
.fmt-btn { border: 1px solid var(--rule); background: var(--card); border-radius: 6px; padding: 5px 11px; font-size: 13px; cursor: pointer; color: var(--ink); }
.fmt-btn:hover { border-color: var(--ink); }
.fmt-hint { margin-left: 6px; }
/* files on answers */
.ans-attach { border: 1px dashed var(--rule); border-radius: 8px; padding: 12px 14px; margin: 4px 0 14px; }
.ans-attach-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ans-files { display: grid; gap: 10px; margin-top: 10px; }
.ans-file img { display: block; max-width: 100%; max-height: 320px; border-radius: 6px; border: 1px solid var(--rule); margin-bottom: 6px; }
.ans-file-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.team-answer .ans-files { margin-top: 14px; }
.sources a + a, .sources .src-ref + a { margin-left: 0; }
.teach-team { margin: 0 0 14px; }
/* trash */
.trash-link { display: flex; align-items: center; gap: 8px; margin: 0 12px; padding: 10px 12px; border-top: 1px solid var(--rule); font-size: 14px; color: var(--stone); text-decoration: none; }
.trash-link:hover { color: var(--ink); }
.trash-link.active { color: var(--ink); font-weight: 700; }
.trash-n { margin-left: auto; background: var(--linen-2); color: var(--stone); font-size: 12px; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }
.trash-list { display: grid; gap: 10px; }
.trash-item { display: flex; gap: 16px; align-items: center; padding: 14px 18px; }
.trash-main { flex: 1; min-width: 0; }
.trash-q { color: var(--ink); font-weight: 700; margin-bottom: 4px; }
.trash-a { margin-bottom: 6px; }
.trash-meta { color: var(--stone-2); }
.trash-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.toast-btn { background: transparent; border: 1px solid var(--gold); color: var(--gold); border-radius: 6px; padding: 3px 10px; font-size: 13px; font-weight: 700; cursor: pointer; margin-left: 4px; }
.toast-btn:hover { background: var(--gold); color: var(--ink); }
@media (max-width: 760px) { .trash-item { flex-direction: column; align-items: stretch; } .trash-actions { justify-content: flex-start; } }

/* Team: invitations waiting to be accepted */
.pending-panel { margin-top: 18px; }
.pending-list { margin-top: 14px; border-top: 1px solid var(--rule); }
.pending-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.6fr) auto; gap: 18px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.pending-row:last-child { border-bottom: 0; padding-bottom: 2px; }
.pending-row .person > div { min-width: 0; }
.pending-row .person b, .pending-row .person span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pending-when { font-size: 13px; color: var(--stone); line-height: 1.5; }
.pending-row .btn { white-space: nowrap; }
@media (max-width: 720px) {
  .pending-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .pending-row .btn { justify-self: start; }
}

/* Several files at once: the panel while they go up, drop targets, and what came of them. */
.uptray { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 61; width: min(440px, calc(100vw - 32px)); background: var(--card); border: 1px solid var(--rule); border-radius: 10px; box-shadow: 0 10px 28px rgba(0,0,0,.16); padding: 12px 16px 14px; font-size: 13.5px; color: var(--ink); }
.uptray-t { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uptray-bar { height: 6px; margin-top: 9px; background: var(--linen); border-radius: 4px; overflow: hidden; }
.uptray-bar i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .2s; }
.panel.drag, .drawer.drag, .teach-files.drag { outline: 2px dashed var(--gold); outline-offset: -4px; background: var(--gold-soft); }
.teach-files { margin-top: 14px; }
.teach-files-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; }
.teach-files-head h3 { margin: 0 0 4px; }
.teach-files-head p { margin: 0; max-width: 62ch; }
.teach-files-head .btn { flex: none; }
.teach-files-done { border-top: 1px solid var(--rule); margin-top: 14px; padding-top: 10px; }
.up-list { margin: 4px 0 12px; padding-left: 18px; font-size: 14px; }
.up-list li { margin: 3px 0; overflow-wrap: anywhere; }
.up-list.bad li { color: var(--bad); }
@media (max-width: 760px) { .teach-files-head { flex-direction: column; } }

/* ── Playbook Builder ───────────────────────────────────────── */
.pb .pb-list { display: grid; gap: 12px; }
.pb-card { display: flex; align-items: center; gap: 16px; padding: 18px 20px; text-decoration: none; color: inherit; }
.pb-card:hover { border-color: var(--gold); }
.pb-card.done { background: var(--paper); }
.pb-card-main { flex: 1; min-width: 0; }
.pb-card-main h3 { font-size: 18px; margin-bottom: 4px; }
.pb-card-main p { margin: 0 0 8px; font-size: 14px; }
.pb-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.pb-settings { padding: 18px 22px; margin-bottom: 20px; }
.pb-settings > summary { cursor: pointer; font-family: var(--display); font-weight: 600; color: var(--ink); }
.pb-settings[open] > summary { margin-bottom: 8px; }
.pb-set-row { display: flex; gap: 20px; justify-content: space-between; align-items: flex-start; padding: 14px 0; border-top: 1px solid #F0EADB; }
.pb-settings.open .pb-set-row:first-child, .pb-settings > summary + .pb-set-row { border-top: 0; }
.pb-set-row > div:first-child { max-width: 60ch; }
.pb-set-row p { margin: 4px 0 0; }
.pb-radio { display: grid; gap: 8px; min-width: 260px; }
.pb-next { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; margin-bottom: 24px; border-left: 3px solid var(--gold); }
.pb-next > div { flex: 1 1 320px; }
.pb-cols { display: grid; grid-template-columns: 1fr 1.25fr; gap: 24px; align-items: start; }
.pb-cols h3 { margin-bottom: 12px; }
.pb-h-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.pb-h-row h3 { margin: 0; }
.pb-person { align-items: center; cursor: default; }
.pb-contrib { margin-bottom: 12px; }
.pb-contrib details { margin-top: 8px; }
.pb-contrib summary, .pb-past summary, .pb-edited + details summary { cursor: pointer; color: var(--stone); font-size: 14px; }
.pb-h { margin: 26px 0 12px; }
.pb-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; padding: 1px 7px; border-radius: 999px; background: var(--ink); color: #fff; font: 600 11px/1.6 var(--display); text-decoration: none; letter-spacing: .02em; }
a.pb-chip:hover { background: var(--gold); color: var(--ink); }
.pb-chips { display: inline-flex; gap: 4px; margin-left: 4px; vertical-align: middle; flex-wrap: wrap; }
.pb-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin-bottom: 18px; }
.pb-src { display: inline-flex; gap: 6px; align-items: center; text-decoration: none; font-size: 14px; }
.pb-sec { padding: 20px 22px; margin-bottom: 14px; border-left: 3px solid var(--rule); }
.pb-sec.is-approved { border-left-color: var(--ok); }
.pb-sec.is-rejected { border-left-color: var(--bad); opacity: .8; }
.pb-sec-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.pb-sec-head h3 { font-size: 18px; }
.pb-items { margin: 0 0 6px; padding-left: 22px; }
.pb-items li { margin-bottom: 8px; }
.pb-items li .tag { margin-left: 6px; vertical-align: middle; }
.pb-items ul { margin-top: 6px; padding-left: 18px; }
.pb-quotes q { font-style: italic; }
.pb-styles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.pb-style { background: var(--paper); border: 1px solid #F0EADB; border-radius: var(--radius); padding: 14px 16px; }
.pb-style h4 { margin-bottom: 6px; }
.pb-style p { margin: 0 0 6px; }
.pb-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.pb-edited { background: var(--gold-soft); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 8px; }
.pb-comments { margin-top: 12px; border-top: 1px solid #F0EADB; padding-top: 10px; display: grid; gap: 10px; }
.pb-comment p { margin: 2px 0 0; }
.pb-comments textarea { min-height: 64px; }
.pb-publish-bar { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; position: sticky; bottom: 12px; box-shadow: 0 8px 30px rgba(14,15,16,.08); }
.pb-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pb-label { display: block; font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.pb-pick { margin: 10px 0 4px; display: grid; gap: 6px; }
.pb-shelf { display: grid; gap: 10px; margin-bottom: 18px; }
.pb-book { display: flex; align-items: center; gap: 16px; padding: 16px 20px; text-decoration: none; color: inherit; border-left: 3px solid var(--gold); }
.pb-book > div { flex: 1; min-width: 0; }
.pb-book h3 { font-size: 18px; margin: 6px 0 2px; }
.pb-book p { margin: 0; }
.pb-doc h4 { margin: 18px 0 8px; font-size: 18px; }
.pb-doc .md > h4:first-child { margin-top: 0; }

/* the interview, made for the phone */
.pb-interview { max-width: 720px; }
.pb-ihead { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 10px; }
.pb-ihead h1 { font-size: 27px; margin-top: 8px; }
.pb-lang { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; padding: 3px; background: var(--card); flex: none; }
.pb-lang button { border: 0; background: none; padding: 6px 12px; border-radius: 999px; font: 600 12px/1 var(--display); letter-spacing: .06em; cursor: pointer; color: var(--stone); min-height: 32px; }
.pb-lang button.on { background: var(--ink); color: #fff; }
.pb-progress { margin: 8px 0 6px; }
.pb-angles { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.pb-angles span { font-size: 12px; padding: 2px 9px; border-radius: 999px; background: var(--linen); color: var(--stone-2); }
.pb-angles span.on { background: var(--ok-soft); color: var(--ok); }
.pb-q { display: flex; gap: 14px; padding: 20px 22px; margin-bottom: 14px; align-items: flex-start; }
.pb-q .slash { margin-top: 6px; }
.pb-q p { margin: 0; font: 500 19px/1.45 var(--display); color: var(--ink); }
.pb-wrap { background: var(--gold-soft); color: var(--gold-text); padding: 8px 12px; border-radius: 6px; }
.pb-mode { display: inline-flex; gap: 4px; background: var(--linen); padding: 4px; border-radius: 999px; margin: 4px 0 14px; }
.pb-mode button { border: 0; background: none; padding: 8px 18px; border-radius: 999px; font: 500 14px/1 var(--display); cursor: pointer; color: var(--stone); min-height: 38px; }
.pb-mode button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(14,15,16,.12); }
.pb-talk { display: flex; align-items: center; gap: 16px; margin: 6px 0 14px; min-height: 92px; }
.pb-mic { width: 84px; height: 84px; border-radius: 50%; border: 0; background: var(--gold); display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; box-shadow: 0 6px 18px rgba(138,115,51,.28); }
.pb-mic span { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); transition: border-radius .15s, transform .15s; }
.pb-mic.on { background: var(--ink); }
.pb-mic.on span { background: #E0574A; border-radius: 6px; animation: rec 1.2s infinite ease-in-out; }
.pb-mic:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.pb-mic-label { display: grid; gap: 2px; }
.pb-mic-label b { font-family: var(--display); font-weight: 600; color: var(--ink); font-size: 17px; }
.pb-reading { display: grid; gap: 8px; width: 100%; max-width: 420px; color: var(--stone); }
.pb-prog { height: 6px; background: var(--linen); border-radius: 99px; overflow: hidden; }
.pb-prog i { display: block; height: 100%; background: var(--gold); transition: width .2s; }
.pb-answer textarea { font-size: 16px; line-height: 1.5; }
.pb-send { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.pb-send .btn { min-height: 44px; }
.pb-nonames { color: var(--stone); margin: 12px 0 0; }
.pb-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 22px 0 6px; padding-top: 14px; border-top: 1px solid var(--rule); flex-wrap: wrap; }
.pb-foot .btn { min-height: 40px; }
.pb-past { margin-top: 18px; }
.pb-turn { padding: 14px 16px; margin-bottom: 10px; }
.pb-turn p { margin: 0 0 6px; }
.pb-turn audio { width: 100%; margin: 4px 0 6px; }
.pb-tq { color: var(--stone); font-size: 14px; }
.pb-turn-edit textarea { margin: 6px 0 10px; }
.pb-flags { background: var(--warn-soft); border: 1px solid #EBD6AE; border-radius: var(--radius); padding: 14px 16px; margin: 4px 0 14px; color: var(--ink-2); }
.pb-flags > b { color: var(--warn); }
.pb-flags p { margin: 4px 0 10px; }
.pb-flag { display: grid; gap: 4px; padding: 10px 0; border-top: 1px solid #EFE0C0; }
.pb-found { font-weight: 700; color: var(--ink); }
.pb-flag-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pb-flag-acts input { flex: 1 1 160px; min-width: 0; }
.pb-step h3 { margin-bottom: 6px; }
.pb-how { padding-left: 20px; margin: 10px 0 16px; }
.pb-how li { margin-bottom: 6px; }
.pb-confidential { display: flex; gap: 12px; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.pb-confidential .slash { margin-top: 4px; }
.pb-confidential p { margin: 4px 0 0; font-size: 14px; }
.pb-start { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.pb-start .btn { min-height: 46px; min-width: 120px; }
.pb-thanks { text-align: center; margin-bottom: 14px; }
.pb-thanks .slash { width: 14px; height: 26px; margin-bottom: 10px; }
.pb-ok { margin: 6px 0 12px; }
@media (max-width: 900px) { .pb-cols, .pb-two { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .pb-set-row { flex-direction: column; gap: 10px; }
  .pb-radio { min-width: 0; }
  .pb-card, .pb-book { flex-wrap: wrap; }
  .pb-ihead h1 { font-size: 23px; }
  .pb-q { padding: 16px; }
  .pb-q p { font-size: 18px; }
  .pb-mic { width: 76px; height: 76px; }
  .pb-publish-bar { position: static; }
}
.pb-fu { margin-bottom: 10px; }
.pb-fu form textarea { margin: 6px 0 8px; }
.pb-fb, .pb-fbsum { margin-top: 14px; }
.pb-fb textarea { margin: 10px 0 8px; }
.pb-fbsum p { margin: 4px 0 8px; }
.pb-versions { margin-top: 20px; }
.pb-versions > summary { cursor: pointer; font-family: var(--display); font-weight: 600; color: var(--ink); }
.pb-versions .kitem { cursor: default; padding: 12px 0; }

/* Playbook Builder: who to interview, by level or one by one */
.pb-levels { display: grid; gap: 8px; margin: 8px 0 4px; }
.pb-level { border: 1px solid var(--rule); border-radius: 10px; padding: 8px 12px; background: var(--card); }
.pb-level > label.check { font-size: 14px; }
.pb-level summary { cursor: pointer; color: var(--gold-text); font-weight: 600; width: max-content; margin: 2px 0 0 26px; }
.pb-level .pb-pick { margin: 8px 0 2px 26px; }
.pb-emails { margin-top: 12px; }
.pb-who-count { color: var(--stone); margin: 4px 0 0; }
.tag.pb-ai { background: var(--linen-2); color: var(--ink-2); }
.pb-made-line { margin: 6px 0 0; }
/* How this playbook was made: experts, admins, AI */
.pb-made h3 { margin: 0 0 12px; }
.pb-bar { display: flex; gap: 2px; height: 10px; border-radius: 999px; overflow: hidden; background: var(--linen); }
.pb-bar i { display: block; height: 100%; min-width: 3px; }
.pb-bar .ex, .pb-made .dot.ex { background: #A68F4E; }
.pb-bar .ad, .pb-made .dot.ad { background: #3A3B40; }
.pb-bar .ai, .pb-made .dot.ai { background: #B5AE9F; }
.pb-made-key { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 12px 0 8px; font-size: 14px; color: var(--ink-2); }
.pb-made-key span { display: inline-flex; align-items: center; gap: 7px; }
.pb-made-key b { color: var(--ink); }
.pb-made .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.pb-made p { margin: 0; }

/* “‹ Diligence” (dl-home.css) in the rail and the phone's bar */
.rail-head .dl-home { margin-top: -10px; margin-bottom: -6px; }
.mb-acts { display: inline-flex; align-items: center; gap: 8px; }
