:root {
  --ink: #17191C; --muted: #5C616B; --line: #E2E2DC; --soft: #EEEEEA; --page: #F6F6F3; --card: #FFFFFF;
  --accent: #2453C9; --side: #16181C; --side-ink: #C9CCD2;
  --o: #4D8EFF; --d: #A57BFF; --a: #F5A524; --off: #2F333B;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font: 14px/1.45 Inter, system-ui, -apple-system, sans-serif; }
a { color: var(--accent); }
a:hover { color: #1A3D96; }
h1 { margin: 0; font-size: 26px; font-weight: 650; letter-spacing: -0.01em; }
h2 { margin: 0; font-size: 19px; font-weight: 650; }
.muted { color: var(--muted); margin: 4px 0 0; }
.mono { font-family: ui-monospace, "JetBrains Mono", Menlo, monospace; }
.pad { padding: 16px; margin: 0; }

.frame { min-height: 100vh; display: flex; flex-wrap: wrap; }
.side { flex: 1 1 248px; max-width: 100%; background: var(--side); color: #E8E9EC; padding: 18px 14px 20px;
  display: flex; flex-direction: column; gap: 18px; }
.content { flex: 999 1 560px; min-width: 0; padding: 28px 32px 56px; display: flex; flex-direction: column; gap: 18px; }
@media (min-width: 900px) { .side { flex: 0 0 248px; } }
.top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fold { width: 36px; height: 36px; border: 0; border-radius: 8px; background: none; color: var(--side-ink); font: 18px/1 inherit;
  cursor: pointer; }
.fold:hover { background: #2A2E36; color: #FFF; }
/* Folded, the menu is a rail of role bars; the labels stay for screen readers and as tooltips. */
@media (min-width: 900px) {
  .rail .side { flex: 0 0 64px; padding: 18px 8px 20px; }
  .rail .top { flex-direction: column; }
  .rail .brand, .rail .menu a { justify-content: center; padding: 0; }
  .rail .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .rail .bars { padding: 12px 0; }
  .rail .foot { display: none; }
}

.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 8px; color: #FFF; text-decoration: none;
  font-weight: 700; font-size: 17px; margin: 0; }
.brand.dark { color: var(--ink); padding: 0; }
.mark { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 7px;
  background: var(--accent); color: #FFF; font-size: 16px; }
.menu { display: flex; flex-direction: column; gap: 2px; }
.menu a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 10px; border-radius: 8px;
  color: var(--side-ink); text-decoration: none; font-weight: 500; }
.menu a:hover { color: #FFF; }
.menu a.on { background: #2A2E36; color: #FFF; font-weight: 600; }
.bars { display: flex; gap: 3px; align-self: stretch; padding: 12px 0; }
.bar { display: inline-block; width: 4px; min-height: 12px; border-radius: 2px; vertical-align: middle; }
.bar.o { background: var(--o); } .bar.d { background: var(--d); } .bar.a { background: var(--a); } .bar.off { background: var(--off); }
.foot { margin-top: auto; border-top: 1px solid var(--off); padding: 14px 6px 0; display: flex; flex-direction: column; gap: 8px; }
.legend { margin: 0; font-size: 12px; color: #A3A8B2; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.legend .bar { height: 12px; }
.who { margin: 0; font-weight: 600; }
button.link { background: none; border: 0; padding: 0; min-height: 44px; color: var(--side-ink); font: inherit;
  text-decoration: underline; cursor: pointer; text-align: left; }

.head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 24px; }
.head .muted { max-width: 820px; }
.seenby { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; font-weight: 600; }
.chip::before { content: ""; width: 4px; height: 12px; border-radius: 2px; }
.chip.o { background: #E4EBFB; color: #1D46A8; } .chip.o::before { background: #2F6FE0; }
.chip.d { background: #EEE7FB; color: #4F2C9E; } .chip.d::before { background: #8B5CF6; }
.chip.a { background: #FBE9D7; color: #8A4300; } .chip.a::before { background: #E08A00; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.soon { padding: 18px 20px; color: #3A3E45; }
.primary { min-height: 44px; padding: 0 18px; border: 0; border-radius: 8px; background: var(--accent); color: #FFF;
  font: inherit; font-weight: 650; cursor: pointer; }
input[type=search], input[type=password] { min-height: 44px; padding: 0 12px; border: 1px solid #C9C9C1; border-radius: 8px;
  font: inherit; color: var(--ink); background: #FFF; width: 100%; }

.search { display: flex; flex-direction: column; gap: 6px; }
.search label { font-weight: 600; }
.search .row { display: flex; gap: 10px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid #D5D5CE;
  background: #FFF; color: #3A3E45; text-decoration: none; font-weight: 600; }
.pill.on { background: var(--ink); color: #FFF; border-color: var(--ink); }

.cols { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.tree { flex: 1 1 200px; max-width: 260px; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.tree a { display: flex; justify-content: space-between; align-items: center; min-height: 44px; padding: 0 10px; border-radius: 6px;
  color: var(--ink); text-decoration: none; }
.tree a.d0 { font-weight: 600; }
.tree a.d1 { padding-left: 26px; }
.tree a.warn { color: #8A4300; }
.tree a.on { background: #EEF3FD; box-shadow: inset 3px 0 0 var(--accent); }
.tree .n { font-size: 12px; color: #6A6F78; }
.list { flex: 2 1 340px; min-width: 0; overflow: hidden; }
.doc { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; border-bottom: 1px solid var(--soft); color: var(--ink);
  text-decoration: none; }
.doc .t { font-weight: 650; }
.doc .p { font: 12px ui-monospace, Menlo, monospace; color: var(--muted); overflow-wrap: anywhere; }
.doc .s { font-size: 13px; color: #3A3E45; }
.doc .s.warn { color: #8A4300; }
mark { background: #FFF1B8; color: inherit; }
.k { display: inline-flex; padding: 1px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; background: #ECECE8; color: #474C54; }
.k-faq { background: #E3F1E7; color: #1F6B3A; } .k-known-issue { background: #FBE9D7; color: #8A4300; }
.k-design, .k-decision { background: #E4EBFB; color: #1D46A8; } .k-plan { background: #EEE7FB; color: #4F2C9E; }
.k-, .k-.k { background: #FBE6E3; color: #A3261C; }
.k.safe { background: #E4EBFB; color: #1D46A8; }
.doc-page { max-width: 960px; padding: 24px 28px 32px; display: flex; flex-direction: column; gap: 14px; }
.doc-page .meta { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.doc-page .meta .mono { font-size: 12px; overflow-wrap: anywhere; }
.doc-page .md { font-size: 15px; line-height: 1.6; padding-top: 14px; border-top: 1px solid var(--soft); overflow-wrap: anywhere; }
@media (max-width: 899px) { .doc-page { padding: 18px 16px 24px; } }
.note { background: #FFF6E0; border: 1px solid #F0D48A; border-radius: 8px; padding: 6px 12px; color: #6B4800; font-size: 13px; }
.note p { margin: 4px 0; }

.signin { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 48px 16px; background: var(--side); }
.signin .card { width: 100%; max-width: 420px; padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.signin label { font-weight: 600; }
.error { margin: 0; color: #A3261C; }

.inline-form { padding: 14px 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.inline-form label { font-weight: 600; }
.inline-form input[type=text] { min-height: 44px; padding: 0 12px; border: 1px solid #C9C9C1; border-radius: 8px; font: inherit; width: 260px; max-width: 100%; }
.created { padding: 16px 18px; background: #EEF3FD; border-color: #CCD9F6; display: flex; flex-direction: column; gap: 10px; }
code.block { display: block; padding: 12px 14px; border-radius: 8px; background: var(--ink); color: #F1F2F4;
  font: 13px ui-monospace, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.table { overflow-x: auto; container-type: inline-size; }
.tr { display: grid; grid-template-columns: minmax(160px, 1fr) 150px 150px 120px; gap: 14px; padding: 10px 18px;
  border-bottom: 1px solid var(--soft); align-items: center; }
.tr.r5 { grid-template-columns: minmax(140px, 1fr) 110px 140px 140px 90px; }
.tr.c4 { grid-template-columns: minmax(150px, 1fr) minmax(200px, 2fr) 130px 120px; }
.tr.c5 { grid-template-columns: minmax(120px, 1fr) minmax(200px, 2fr) minmax(140px, 1.5fr) 90px 120px; }
.tr > * { min-width: 0; overflow-wrap: anywhere; } /* a long address breaks instead of running into the next column */
/* A narrow table stacks each row; a cell with a data-label says what it is, as the header row is hidden. */
@container (max-width: 719px) {
  .tr { display: flex; flex-wrap: wrap; gap: 6px 14px; }
  .tr > :first-child { flex-basis: 100%; }
  .tr [data-label]::before { content: attr(data-label) " "; color: var(--muted); }
  .tr [data-label]:empty { display: none; }
  .th { display: none; }
}
.th { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.strong { font-weight: 600; }
.danger { min-height: 40px; padding: 0 14px; border: 1px solid #E3B5AF; border-radius: 8px; background: #FFF; color: #A3261C;
  font: inherit; font-weight: 600; cursor: pointer; }
.k.bad { background: #FBE6E3; color: #A3261C; }

.small { font-size: 12px; }
.n { opacity: 0.75; font-variant-numeric: tabular-nums; }
.state { display: inline-flex; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #ECECE8; color: #474C54; vertical-align: middle; }
.s-new { background: #E3F1E7; color: #1F6B3A; } .s-drafting { background: #ECE7FA; color: #4F2C9E; }
.s-review { background: #E4EBFB; color: #1D46A8; } .s-failed { background: #FBE6E3; color: #A3261C; } .s-waiting_team { background: #FBE9D7; color: #8A4300; }
.test { padding: 14px 18px; }
.test summary { cursor: pointer; font-weight: 600; min-height: 28px; }
.grid-form { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px 14px; align-items: center; margin-top: 12px; }
.grid-form input, .grid-form textarea, select { min-height: 44px; padding: 8px 12px; border: 1px solid #C9C9C1; border-radius: 8px;
  font: inherit; color: var(--ink); background: #FFF; }
.grid-form label { font-weight: 600; }
.grid-form.wide { grid-template-columns: 130px minmax(0, 1fr); }
a.button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.secondary { min-height: 44px; padding: 0 16px; border: 1px solid #C9C9C1; border-radius: 8px; background: #FFF; color: var(--ink);
  font: inherit; font-weight: 600; cursor: pointer; }
.thread { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.msg { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.msg.out { background: #EEF3FD; border-color: #CCD9F6; }
.msg .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.side-col { flex: 1.3 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }

.pad-box { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.pad-box h2, .pad-box h3 { margin: 0; } .pad-box h3 { font-size: 15px; }
.row-between { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.verdict { display: flex; flex-wrap: wrap; gap: 12px 28px; padding: 12px 14px; border-radius: 8px; background: var(--page); }
.conf { flex: 1 1 260px; display: flex; flex-direction: column; gap: 6px; }
.meter { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.meter .fill { height: 100%; } .fill.hi { background: #2E9E50; } .fill.mid { background: #D08A00; } .fill.lo { background: #C2412D; }
.v-answer_is_clear { background: #E3F1E7; color: #1F6B3A; } .v-fix_needed { background: #FBE9D7; color: #8A4300; }
.v-more_from_customer { background: #E4EBFB; color: #1D46A8; }
.pad-box .body, .back { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.back { padding: 12px; border-radius: 8px; background: var(--page); border: 1px solid var(--line); color: #3A3E45; }
.two { display: flex; flex-wrap: wrap; gap: 16px; } .two > div { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.reply label, .label { font-weight: 600; }
.reply textarea { width: 100%; padding: 12px; border: 1px solid #C9C9C1; border-radius: 8px; font: inherit; line-height: 1.5; resize: vertical; }
form.inline { display: inline; }
button.link.small { min-height: 0; color: var(--accent); font-size: 12px; }

/* On a phone the side menu turns into a bar above the page: brand and who on one row, the menu scrolls sideways. */
@media (max-width: 899px) {
  .frame { align-content: flex-start; } /* a short page must not stretch the bar */
  .side { flex: 1 1 100%; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 8px 12px; }
  .menu { order: 3; flex: 1 1 100%; flex-direction: row; overflow-x: auto; }
  .menu a { flex: none; }
  .foot { margin: 0 0 0 auto; padding: 0; border: 0; flex-direction: row; align-items: center; gap: 14px; }
  .legend { display: none; }
  .content { padding: 20px 16px 48px; }
  .rail .menu { display: none; }
}
