/* База знаний Forward — внутренний инструмент: плотно, спокойно, статус виден сразу. */
:root {
  --ink: #17191c; --muted: #646b75; --faint: #8c939c; --line: #e2e5e9; --bg: #ffffff; --panel: #f6f7f9;
  --accent: #1d5bd6; --accent-ink: #ffffff;
  --green: #1f7a3a; --green-bg: #e9f6ed; --yellow: #8a5a00; --yellow-bg: #fff5dc;
  --grey: #59616b; --grey-bg: #eff1f4; --red: #a32222; --red-bg: #fdeeee;
  --radius: 6px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e7e9ec; --muted: #a0a8b2; --faint: #7d858f; --line: #2c3238; --bg: #121417; --panel: #1a1d21;
    --accent: #7ea6ff; --accent-ink: #0d1117;
    --green: #6fd38d; --green-bg: #13261a; --yellow: #f0c46a; --yellow-bg: #2a2212;
    --grey: #b3bac3; --grey-bg: #22262b; --red: #ff9b9b; --red-bg: #2c1515;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: var(--mono); font-size: .88em; }
code { background: var(--panel); padding: .05rem .3rem; border-radius: 4px; }
pre { background: var(--panel); padding: .8rem 1rem; border-radius: var(--radius); overflow-x: auto; font-size: .85rem; }

header.top { display: flex; align-items: center; gap: 1.2rem; padding: .6rem 1.2rem; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--bg); z-index: 5; flex-wrap: wrap; }
header.top .brand { font-weight: 650; color: var(--ink); letter-spacing: .01em; }
header.top .brand span { color: var(--faint); font-weight: 400; }
header.top nav { display: flex; gap: 1rem; flex-wrap: wrap; }
header.top nav a { color: var(--muted); }
header.top nav a.on { color: var(--ink); font-weight: 600; }
header.top .who { margin-left: auto; color: var(--muted); font-size: .85rem; }
.count { display: inline-block; min-width: 1.4rem; padding: 0 .35rem; border-radius: 999px; background: var(--accent);
  color: var(--accent-ink); font-size: .72rem; text-align: center; line-height: 1.25rem; margin-left: .2rem; }

main { max-width: 72rem; margin: 0 auto; padding: 1.4rem 1.2rem 5rem; }
main.narrow { max-width: 44rem; }
h1 { font-size: 1.45rem; margin: .2rem 0 1rem; line-height: 1.25; }
h2 { font-size: 1.12rem; margin: 2rem 0 .7rem; }
h3 { font-size: 1rem; margin: 1.4rem 0 .5rem; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: .84rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.6rem 0; }

.chip { display: inline-block; font-size: .75rem; line-height: 1.3; padding: .12rem .55rem; border-radius: 999px;
  white-space: nowrap; border: 1px solid transparent; vertical-align: 1px; }
.chip.green { color: var(--green); background: var(--green-bg); }
.chip.yellow { color: var(--yellow); background: var(--yellow-bg); }
.chip.grey { color: var(--grey); background: var(--grey-bg); }
.chip.red { color: var(--red); background: var(--red-bg); }
.chip.outline { border-color: var(--line); color: var(--muted); background: transparent; }

.notice { border-left: 3px solid var(--yellow); background: var(--yellow-bg); padding: .65rem 1rem; margin: 1rem 0;
  border-radius: 0 var(--radius) var(--radius) 0; }
.notice.bad { border-color: var(--red); background: var(--red-bg); }
.notice.good { border-color: var(--green); background: var(--green-bg); }

input[type=text], input[type=search], input[type=password], input[type=email], input[type=date], select, textarea {
  font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .5rem .65rem; width: 100%; }
textarea { min-height: 7rem; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); border-color: var(--accent); }
button, .button { font: inherit; padding: .5rem .95rem; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); cursor: pointer; display: inline-block; white-space: nowrap; }
button.primary, .button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
button.danger { color: var(--red); }
button.link { background: none; border: 0; padding: 0; color: var(--accent); }
button:disabled { opacity: .5; cursor: default; }
label { display: block; font-size: .85rem; color: var(--muted); margin: .7rem 0 .25rem; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1; min-width: 12rem; }
form.inline { display: inline; }

table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { border-bottom: 1px solid var(--line); padding: .5rem .5rem; text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: .8rem; }

.results { list-style: none; margin: 0; padding: 0; }
.results li { padding: .75rem 0; border-bottom: 1px solid var(--line); }
.results .meta { font-size: .8rem; color: var(--faint); margin-top: .2rem; }
.results .text { margin: .15rem 0; }

.layout { display: grid; grid-template-columns: 15rem 1fr; gap: 1.6rem; }
.side { position: sticky; top: 4rem; align-self: start; }
.side a.group { display: flex; justify-content: space-between; padding: .4rem .6rem; border-radius: var(--radius); color: var(--ink); }
.side a.group:hover { background: var(--panel); text-decoration: none; }
.side a.group.on { background: var(--panel); font-weight: 600; }
.side a.group .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.side .title { font-size: .78rem; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; margin: 1rem .6rem .3rem; }

.statement { position: sticky; top: 3.4rem; background: var(--bg); padding: .6rem 0 .8rem; z-index: 3; border-bottom: 1px solid var(--line); }
.cap { margin: 1.4rem 0 .3rem; font-weight: 600; }
.cap .faint { font-weight: 400; }
.claim { display: grid; grid-template-columns: 1.6rem 1fr; gap: .3rem .6rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.claim .body .text { margin-bottom: .3rem; }
.claim .controls { display: grid; grid-template-columns: 9rem 1fr auto; gap: .4rem; margin-top: .4rem; }
.claim .controls.hidden { display: none; }
.claim .why { font-size: .78rem; color: var(--faint); }
.claim .pr { font-variant-numeric: tabular-nums; font-size: .75rem; color: var(--muted); }

.card { border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; margin: .8rem 0; }
.card h3 { margin-top: 0; }
.quote { border-left: 3px solid var(--line); padding: .1rem 0 .1rem .8rem; color: var(--muted); margin: .4rem 0; }
.kv { display: grid; grid-template-columns: 11rem 1fr; gap: .25rem 1rem; font-size: .9rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.diff .old { color: var(--red); text-decoration: line-through; }
.diff .new { color: var(--green); }
.key { font-family: var(--mono); font-size: 1rem; padding: .7rem .9rem; background: var(--panel); border-radius: var(--radius);
  word-break: break-all; user-select: all; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .8rem; margin: 1rem 0; }
.stats .card { margin: 0; } .stats .n { font-size: 1.5rem; font-weight: 600; font-variant-numeric: tabular-nums; }

footer.bottom { border-top: 1px solid var(--line); padding: 1rem 1.2rem; color: var(--faint); font-size: .8rem; }

@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; }
  .claim .controls { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
  header.top { position: static; gap: .5rem 1rem; }
  header.top .who { margin-left: 0; width: 100%; }
  .statement { top: 0; }
}

/* Вики: текст страницы */
.prose { min-width: 0; }
.prose h1 { font-size: 1.5rem; }
.prose table { margin: .8rem 0; display: block; overflow-x: auto; }
.prose li { margin: .15rem 0; }
.prose blockquote { border-left: 3px solid var(--line); margin: .6rem 0; padding: .1rem 0 .1rem .9rem; color: var(--muted); }
.prose del { color: var(--red); }
.layout:has(.prose) { grid-template-columns: 1fr 16rem; }
pre.diff { white-space: pre-wrap; word-break: break-word; font-size: .8rem; }
pre.diff .new { color: var(--green); }
pre.diff .old { color: var(--red); }
.nowrap { white-space: nowrap; }
@media (max-width: 760px) { .layout:has(.prose) { grid-template-columns: 1fr; } }
