/* Open Sans (OFL-1.1), self-hosted variable font; see static/vendor/README.md */
@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 300 800; font-stretch: 75% 100%; font-display: swap;
  src: url(/static/fonts/opensans-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 300 800; font-stretch: 75% 100%; font-display: swap;
  src: url(/static/fonts/opensans-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 300 800; font-stretch: 75% 100%; font-display: swap;
  src: url(/static/fonts/opensans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 300 800; font-stretch: 75% 100%; font-display: swap;
  src: url(/static/fonts/opensans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --ground: #f3f6f7; --surface: #ffffff; --border: #dfe5e8; --divider: #edf1f3;
  --ink: #2c2c30; --muted: #5e6168; --meta: #666a70;
  --yellow: #ffde03; --on-yellow: #2c2c30;
  --link: #14709f; --link-hover: #0d5578; --sky: #31ace5;
  --tint: #edf6fb; --tint-border: #cfe6f3;
  --warn: #8a6a00; --warn-bg: #fff6c2;
  --ok: #1d7a43; --ok-bg: #e3f3e9;
  --bad: #b42318; --bad-bg: #fdebe9;
  --neutral-bg: #edf1f3;
  --code-bg: #e7edee; --input-border: #c9ced3;
  --summary-bg: #fffbe0; --summary-border: #f3e38a;
  --header: #2c2c30; --on-header: #ffffff; --on-header-muted: #c9ced3; --header-line: #55555c; --avatar: #4a4a50;
  --bar: #2c2c30; --on-bar-muted: #c9ced3; --bar-line: #6b6b72;
  --focus: #14709f; --focus-dark: #ffde03;
  --g-page: #14709f; --g-section: #9aa3a9; --g-ref: #31ace5; --g-contains: #cfd8dd; --g-brand: #ffde03; --g-brand-line: #2c2c30;
  --legend-bg: rgba(255,255,255,.92);
  --radius: 12px; --radius-lg: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #1c1c1f; --surface: #26262a; --border: #3a3a40; --divider: #323237;
    --ink: #ececee; --muted: #a9aeb4; --meta: #a0a5ab;
    --link: #6fc3ec; --link-hover: #9ad6f3; --sky: #5bbcec;
    --tint: #1f3441; --tint-border: #2f5063;
    --warn: #f5d76e; --warn-bg: #3d3300;
    --ok: #7fd9a1; --ok-bg: #16331f;
    --bad: #ff9d94; --bad-bg: #44201d;
    --neutral-bg: #34343a;
    --code-bg: #323237; --input-border: #55555c;
    --summary-bg: #34300f; --summary-border: #6b5f1d;
    --header: #161618; --avatar: #3a3a40; --header-line: #4a4a50;
    --bar: #161618; --bar-line: #55555c;
    --focus: #6fc3ec;
    --g-page: #6fc3ec; --g-section: #6b7178; --g-ref: #5bbcec; --g-contains: #46464d; --g-brand-line: #161618;
    --legend-bg: rgba(38,38,42,.92);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 15px/1.6 'Open Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
a { color: var(--link); }
a:hover { color: var(--link-hover); }
a.blocked { color: var(--muted); text-decoration: line-through; pointer-events: none; }
code { background: var(--code-bg); padding: 1px 6px; border-radius: 5px; font-size: .88em; }
h1, h2, h3 { line-height: 1.25; margin: 0; }
h1 { font-size: 32px; font-weight: 700; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .4px; text-transform: uppercase; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted, .sub { color: var(--muted); }
.sub { font-size: 13px; }
.pad { padding: 18px 20px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.top :focus-visible, .decbar :focus-visible, .page-dark :focus-visible, .panel.dark :focus-visible { outline-color: var(--focus-dark); }
.page-dark .authcard :focus-visible { outline-color: var(--focus); }

/* page chrome */
main { max-width: 1200px; margin: 0 auto; padding: 28px 24px 56px; }
.top { background: var(--header); color: var(--on-header); }
.top-in { max-width: 1200px; margin: 0 auto; padding: 14px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--on-header); text-decoration: none; }
.brand:hover { color: var(--on-header); }
.badge-logo { flex: none; width: 40px; height: 40px; border-radius: 9px; background: var(--yellow); display: flex; align-items: center; justify-content: center; }
.badge-logo .crown { width: 26px; height: 26px; }
.badge-logo.big { width: 64px; height: 64px; border-radius: 14px; }
.badge-logo.big .crown { width: 42px; height: 42px; }
.wordmark { display: flex; align-items: baseline; gap: 8px; }
.wm-name { font-size: 19px; font-weight: 700; letter-spacing: -.2px; }
.wm-tag { font-size: 12px; font-weight: 700; color: var(--on-yellow); background: var(--yellow); padding: 1px 7px; border-radius: 5px; letter-spacing: .6px; }
.mainnav { display: flex; gap: 4px; flex: 1 1 auto; }
.mainnav a { color: var(--on-header-muted); text-decoration: none; font-weight: 600; padding: 10px 12px; border-bottom: 3px solid transparent; min-height: 44px; }
.mainnav a:hover { color: #fff; }
.mainnav a[aria-current="page"] { color: #fff; border-bottom-color: var(--yellow); }
.who { display: flex; align-items: center; gap: 12px; margin: 0; }
.who-name { font-weight: 600; }
.avatar { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--avatar); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.avatar.sm { width: 28px; height: 28px; font-size: 12px; }
.avatar.a-alex { background: #2c2c30; color: #fff; }
.avatar.a-ksen { background: var(--yellow); color: var(--on-yellow); }
@media (prefers-color-scheme: dark) { .avatar.a-alex { background: #4a4a50; } }
.signout { background: transparent; color: var(--on-header-muted); border: 1px solid var(--header-line); border-radius: 8px; padding: 8px 12px; font: inherit; font-size: 13px; min-height: 44px; cursor: pointer; }
.signout:hover { color: #fff; border-color: #8a8a92; }

/* page header blocks */
.pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.eyebrow { margin: 0 0 4px; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; }
.lede { margin: 8px 0 0; color: var(--muted); max-width: 640px; }
.pagetitle { font-size: 30px; margin: 10px 0 18px; }
.crumbs { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; overflow-wrap: anywhere; }

/* surfaces */
.card, .panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.card { padding: 6px 20px 16px; margin: 14px 0; }
.card.flush { padding: 0; overflow: hidden; }
.card.narrow { max-width: 440px; margin: 32px auto; padding: 24px; }
.panel { margin: 0; }
.panel p { margin: 0; }
.panel.pad h2 { font-size: 16px; margin: 0 0 8px; }
.panel.dark { background: var(--bar); color: #fff; border-color: var(--bar); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 10px 0; border-top: 1px solid var(--divider); }
.list li:first-child { border-top: 0; }
.card.flush .list li { padding: 12px 22px; }
.tree .dir { font-weight: 700; }
.snip { font-size: 14px; margin-top: 2px; }

/* badges / messages */
.badge { display: inline-block; font-size: 12px; font-weight: 600; line-height: 1.4; padding: 2px 9px; border-radius: 999px; vertical-align: middle; background: var(--neutral-bg); color: var(--muted); }
.badge.ok { color: var(--ok); background: var(--ok-bg); }
.badge.warn { color: var(--warn); background: var(--warn-bg); }
.badge.bad { color: var(--bad); background: var(--bad-bg); }
.badge.muted { color: var(--muted); background: var(--neutral-bg); }
.msg { padding: 10px 14px; border-radius: 10px; margin: 12px 0; }
.msg.ok { color: var(--ok); background: var(--ok-bg); }
.msg.warn { color: var(--warn); background: var(--warn-bg); }
.msg.bad { color: var(--bad); background: var(--bad-bg); }

/* forms and buttons */
.stack { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
input, textarea, select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--input-border); border-radius: 10px; padding: 11px 14px; width: 100%; }
select { width: auto; max-width: 100%; }
input[type=checkbox] { width: 18px; height: 18px; padding: 0; accent-color: var(--ink); margin: 0; }
textarea { resize: vertical; min-height: 5em; font-size: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; padding: 11px 18px; min-height: 44px; border-radius: 10px; border: 1px solid var(--input-border); background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none; }
.btn:hover { color: var(--ink); }
.btn.primary { background: var(--yellow); color: var(--on-yellow); border-color: var(--yellow); font-weight: 700; }
.btn.primary:hover { color: var(--on-yellow); filter: brightness(.96); }
.btn.dark { background: #2c2c30; color: #fff; border-color: #2c2c30; }
.btn.dark:hover { color: #fff; }
@media (prefers-color-scheme: dark) { .btn.dark { background: #ececee; color: #1c1c1f; border-color: #ececee; } .btn.dark:hover { color: #1c1c1f; } }
.btn.outline { background: transparent; color: var(--ink); }
.btn.block { width: 100%; min-height: 48px; }
.pagehead .cta { min-height: 48px; }

/* home */
.stats { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.stat { flex: 1 1 160px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.stat .num { font-size: 28px; font-weight: 700; line-height: 1.1; }
.stat .num.small { font-size: 15px; line-height: 1.85; }
.stat .lbl { color: var(--muted); font-size: 13px; }
.cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.main-col { flex: 999 1 560px; min-width: 0; overflow: hidden; }
.side-col { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.prio { list-style: none; margin: 0; padding: 0; }
.prio li { border-bottom: 1px solid var(--divider); }
.prio li:last-child { border-bottom: 0; }
.prio a { display: flex; gap: 16px; padding: 16px 22px; text-decoration: none; color: var(--ink); }
.prio a:hover { background: var(--ground); }
.prio .num { flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--neutral-bg); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.prio .num.first { background: var(--yellow); color: var(--on-yellow); }
.prio .body { flex: 1 1 auto; min-width: 0; }
.prio .line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.prio .ttl { font-weight: 700; color: var(--link); }
.prio a:hover .ttl { color: var(--link-hover); text-decoration: underline; }
.prio .summ { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.prio .path { display: block; color: var(--meta); font-size: 12px; margin-top: 4px; overflow-wrap: anywhere; }
.steps { margin: 12px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.steps li { display: flex; gap: 10px; }
.panel.dark h2 { margin: 0; }
.steps .num { flex: none; width: 22px; height: 22px; border-radius: 6px; background: var(--yellow); color: var(--on-yellow); font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; }

/* document page */
.doctitle { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0 20px; }
.doctitle h1 { font-size: 30px; }
.doccols { display: flex; flex-direction: column; gap: 18px; }
.doc-main { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.doc-side { min-width: 0; }
.decbar { background: var(--bar); color: #fff; border-radius: var(--radius-lg); padding: 18px 20px; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px 24px; }
.dmsg { flex: 1 1 260px; }
.decbar .msg { margin: 0; padding: 0; background: none; font-weight: 700; font-size: 16px; display: flex; gap: 10px; align-items: baseline; color: #fff; }
.decbar .msg::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--yellow); transform: translateY(-1px); }
.decbar .msg.ok::before { background: #7fd9a1; }
.decbar .msg.bad::before { background: #ff9d94; }
.decbar .ver { margin: 4px 0 0 20px; color: var(--on-bar-muted); font-size: 13px; }
.decbar code { background: #3c3c42; color: #fff; }
.dform { flex: 0 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.dbtns { display: flex; flex-wrap: wrap; gap: 10px; }
.decbar .btn.outline { color: #fff; border-color: var(--bar-line); }
.note summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--on-bar-muted); padding: 6px 0; min-height: 32px; }
.note textarea { margin-top: 6px; background: #fff; color: #2c2c30; border-color: #fff; min-width: 280px; }
.fmcard { padding: 12px 18px; }
.fmcard summary, .reply summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); min-height: 24px; }
.fmcard dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 10px 0 0; font-size: 14px; }
.fmcard dt { color: var(--muted); }
.fmcard dd { margin: 0; overflow-wrap: anywhere; }
.reply summary { color: var(--link); padding: 8px 0; }
.toc { padding: 18px 20px; }
.toc summary { list-style: none; cursor: pointer; font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .4px; text-transform: uppercase; min-height: 24px; }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.toc a { display: flex; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); min-height: 36px; }
.toc a:hover { background: var(--ground); }
.toc a.has { background: var(--warn-bg); font-weight: 600; }
.toc .cnt { color: var(--link); font-weight: 700; }
.toc-note { border-top: 1px solid var(--divider); margin: 14px 0 0; padding-top: 14px; font-size: 13px; color: var(--muted); }
.stickybar { display: none; }

/* rendered markdown */
.md { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 8px 28px 24px; overflow-wrap: anywhere; }
.md > h1:first-of-type { display: none; }
.md h1 { font-size: 24px; margin: 1em 0 .4em; }
.md h2 { font-size: 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--divider); padding: 22px 0 8px; margin: 0 0 12px; }
.md > h2:first-child, .md > h1:first-child + h2 { padding-top: 16px; }
.md h3 { font-size: 16px; margin: 1.4em 0 .4em; color: var(--ink); text-transform: none; letter-spacing: 0; }
.md h3, .md h4 { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.md p, .md li { margin-top: .6em; margin-bottom: .6em; }
.md pre { background: var(--code-bg); padding: 12px; border-radius: 10px; overflow-x: auto; }
.md pre code { background: none; padding: 0; }
.md blockquote { margin: 1em 0; padding: .1em 1em; border-left: 4px solid var(--border); color: var(--muted); }
.md blockquote.summary { position: relative; margin: 18px 0 8px; padding: 44px 22px 14px; border: 1px solid var(--summary-border); border-radius: var(--radius-lg); background: var(--summary-bg); color: var(--ink); }
.md blockquote.summary::before { content: "КРАТКО"; position: absolute; top: 14px; left: 22px; font-size: 12px; font-weight: 700; background: var(--yellow); color: var(--on-yellow); padding: 2px 9px; border-radius: 6px; letter-spacing: .4px; line-height: 1.5; }
.md blockquote.summary > :first-child { margin-top: 0; }
.md blockquote.summary > :last-child { margin-bottom: 0; }
.md img { max-width: 100%; }
.tablewrap { overflow-x: auto; margin: 1em 0; }
.md table { border-collapse: collapse; min-width: 100%; font-size: 14px; }
.md th, .md td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; vertical-align: top; }
.md th { background: var(--ground); }
.cbtn { flex: none; display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; padding: 6px 12px; min-height: 44px; border: 1px solid var(--border); border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; }
.cbtn:hover { border-color: var(--tint-border); color: var(--link); }
.cbtn[aria-expanded="true"] { background: var(--tint); border-color: var(--tint-border); color: var(--link); }

/* threads */
.slot { margin: 6px 0 14px; }
.thread { background: var(--ground); border-radius: var(--radius); padding: 14px 16px; margin: 12px 0; display: flex; flex-direction: column; gap: 12px; }
.thread.resolved { opacity: .75; }
.msg-item { display: flex; gap: 10px; }
.msg-item .meta { font-size: 13px; }
.msg-item .meta span { color: var(--muted); }
.msg-item .text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.msg-body { min-width: 0; }
.thread .reply { margin: 0; }
.thread .reply summary { padding: 4px 0; }
.cform[hidden] { display: none; }
.cform { background: var(--ground); border-radius: var(--radius); padding: 14px 16px; }

/* graph */
.graphbar { margin: 0; }
.graphbar .check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; min-height: 44px; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 18px 0; }
.chip { display: inline-flex; align-items: center; font: inherit; font-size: 14px; font-weight: 600; padding: 8px 14px; min-height: 44px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); text-decoration: none; cursor: pointer; }
.chip:hover { color: var(--ink); border-color: var(--input-border); }
.chip[aria-current] { background: var(--bar); color: #fff; border-color: var(--bar); }
.chip.all { background: transparent; color: var(--link); border-style: dashed; border-color: var(--tint-border); }
.chip.all[aria-current] { background: var(--bar); color: #fff; border-style: solid; border-color: var(--bar); }
.morebar { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.morebar select { border-radius: 999px; padding: 8px 14px; min-height: 44px; font-size: 14px; font-weight: 600; background: var(--surface); border-color: var(--border); }
.gwrap { display: flex; flex-wrap: wrap; gap: 16px; align-items: stretch; margin-bottom: 24px; }
.gcanvas { flex: 999 1 560px; min-width: 0; position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.graph { height: 560px; }
.graph > p { padding: 20px; }
.legend { position: absolute; left: 14px; bottom: 12px; display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); background: var(--legend-bg); padding: 6px 10px; border-radius: 8px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend .dot { display: inline-block; border-radius: 50%; width: 10px; height: 10px; background: var(--g-page); }
.legend .dot.sec { width: 8px; height: 8px; background: var(--g-section); }
.legend .ln { display: inline-block; width: 16px; border-top: 2px solid var(--g-contains); }
.legend .ln.ref { border-top: 2px dashed var(--g-ref); }
.gpanel { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 10px; overflow-wrap: anywhere; max-height: 560px; overflow-y: auto; }
.gpanel h2 { font-size: 17px; margin: 0; }
.gpanel h3 { margin: 6px 0 0; }
.gp-head { display: flex; align-items: center; gap: 10px; }
.gp-head .badge-logo { width: 34px; height: 34px; border-radius: 9px; }
.gp-head .badge-logo .crown { width: 20px; height: 20px; }
.gp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gp-chips .badge.first { background: var(--tint); color: var(--link); }
.gpanel .list { font-size: 14px; }
.gpanel .list li { padding: 0; }
.gpanel .list a { display: block; padding: 8px 0; }
.gpanel .btn { margin-top: auto; }
.gdocs h2 { margin-bottom: 4px; }

/* sign-in and plain full-page layout */
.page-dark { background: var(--bar); color: #fff; min-height: 100vh; }
.page-dark main { padding: 40px 16px; display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.authwrap { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 20px; margin: 0 auto; }
.authbrand { display: flex; flex-direction: column; align-items: center; gap: 14px; color: #fff; }
.authbrand .wm-name { font-size: 26px; }
.authbrand .wm-tag { font-size: 14px; padding: 1px 8px; border-radius: 6px; letter-spacing: .7px; }
.authcard { background: var(--surface); color: var(--ink); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 16px; margin: 0; }
.authcard h1 { font-size: 22px; }
.authcard .sub { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.authcard > .sub { margin: 0; font-size: 13px; }
.authcard .msg { margin: 0; }
.authcard input { min-height: 46px; font-weight: 400; }
.authfoot { margin: 0; text-align: center; color: #a9aeb4; font-size: 12px; }
.errorcard { text-align: center; }
.errorcard h1 { font-size: 40px; }
.page-dark .errorcard { background: var(--surface); color: var(--ink); border-radius: 16px; margin: 0; }

/* wide screens: document and contents side by side */
@media (min-width: 900px) {
  .doccols { flex-direction: row; align-items: flex-start; gap: 28px; }
  .doc-main { flex: 1 1 0; }
  .doc-side { order: 2; flex: 0 0 280px; position: sticky; top: 16px; }
  .toc summary { pointer-events: none; }
  .toc .toc-n { display: none; }
}

/* phones */
@media (max-width: 759px) {
  main { padding: 18px 16px 40px; }
  h1, .doctitle h1 { font-size: 24px; }
  .top-in { padding: 10px 16px; gap: 4px 12px; }
  .badge-logo { width: 34px; height: 34px; }
  .badge-logo .crown { width: 22px; height: 22px; }
  .wm-name { font-size: 17px; }
  .mainnav { order: 3; flex: 1 0 100%; }
  .mainnav a { padding: 10px 12px; }
  .who { margin-left: auto; gap: 8px; }
  .who-name { display: none; }
  .md { padding: 4px 16px 18px; }
  .md h2 { font-size: 17px; padding-top: 14px; }
  .md blockquote.summary { padding: 42px 16px 12px; }
  .md blockquote.summary::before { left: 16px; }
  .panel-head, .prio a { padding-left: 16px; padding-right: 16px; }
  .pagehead .cta { width: 100%; }
  .cbtn { padding: 6px 12px; }
  .decbar { padding: 16px; }
  .decbar .dbtns { display: none; }
  .stickybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; gap: 10px; background: var(--surface); border-top: 1px solid var(--border); padding: 12px 16px 16px; }
  .stickybar .btn { flex: 1 1 0; min-height: 48px; font-size: 14px; }
  .stickybar .btn.primary { font-size: 15px; }
  body:has(.stickybar) main { padding-bottom: 110px; }
  .fmcard dl { grid-template-columns: 1fr; }
  .fmcard dt { margin-top: 6px; }
  .graph { height: 420px; }
  .gpanel { max-height: none; }
  .card.narrow { margin: 16px auto; }
}
@media (max-width: 759px) { .md table { min-width: 560px; } }

/* Graph chips on phones: one swipeable row instead of a wall of pills; the "More" select stays inside it. */
@media (max-width: 760px) {
  .chips { position: relative; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px;
    scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
  .chips .chip { flex: none; white-space: nowrap; }
  .chips .morebar { flex: none; }
  .chips .morebar select { max-width: 62vw; }
}
@media (prefers-color-scheme: dark) {
  .chip[aria-current], .chip.all[aria-current] { background: var(--yellow, #ffde03); color: #2c2c30; border-color: transparent; }
}
/* No page scrolls sideways; wide content (tables, chip rows) scrolls in its own box. */
html, body { overflow-x: clip; }

/* Key results (h4, "#### P-KR1 — …" in okrs.md): real headings with their own Comment button and an id chip. */
.md h4 { font-size: 15px; font-weight: 600; line-height: 1.45; margin: 1.1em 0 .3em; padding-top: 10px; border-top: 1px dashed var(--divider); }
.md h3 + h4, .md h3 + .slot + h4 { border-top: 0; padding-top: 0; }
.kr-id { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .3px; color: var(--on-yellow, #2c2c30); background: var(--yellow, #ffde03); padding: 1px 7px; border-radius: 6px; margin-right: 4px; vertical-align: 1px; white-space: nowrap; }
.toc li.lvl-3 a { padding-left: 20px; font-size: 13.5px; }
.toc li.lvl-4 a { padding-left: 30px; font-size: 13px; color: var(--muted); min-height: 32px; }
.toc li.lvl-4 a .kr-id { font-size: 11px; }
/* Headings flow as text (a flex heading splits mixed content — text, `code`, the KR chip — into spread-out items);
   the Comment button floats right instead. */
.md h2, .md h3, .md h4 { display: flow-root; }
.md h2 .cbtn, .md h3 .cbtn, .md h4 .cbtn { float: right; margin: -6px 0 4px 12px; }
/* One line of source = one paragraph (render.py _split_lines), 6pt apart; the last line keeps the normal gap. */
.md p.ln { margin: 0 0 6pt; }
.md p.ln-last { margin-bottom: 1em; }
/* After a decision: the opposite one sits behind a quiet "Change your decision" disclosure. */
.decbar .note.change .dbtns { margin: 10px 0 8px; }
/* Home › Recent comments: avatar + who/when, the doc and section, a snippet. */
.rcomments li { display: flex; gap: 10px; align-items: flex-start; }
.rcomments .rc-body { min-width: 0; overflow-wrap: anywhere; }
.rcomments .avatar { flex: none; margin-top: 2px; }
