:root {
  --bg: #f7f5f2;
  --panel: #ffffff;
  --ink: #1d1b19;
  --ink-2: #56504a;
  --muted: #8a827a;
  --line: #e3ded7;
  --accent: #8c5a3c;
  --accent-soft: #f3e9e2;
  --ok-soft: #e1f5ee; --ok-ink: #04342c;
  --warn-soft: #fcebeb; --warn-ink: #501313;
  --ok: #2f7a55;
  --warn: #a8761b;
  --danger: #b3403a;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(29,27,25,.05), 0 8px 24px rgba(29,27,25,.05);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17161a; --panel: #201f24; --ink: #ece9e5; --ink-2: #bdb7b0;
    --muted: #8e877f; --line: #33313a; --accent: #d59b74; --accent-soft: #2c2620;
    --ok-soft: #08504122; --ok-ink: #9fe1cb;
    --warn-soft: #791f1f22; --warn-ink: #f7c1c1;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 28px rgba(0,0,0,.28);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, Arial, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 32px; line-height: 1.2; margin: 0 0 12px; letter-spacing: -.02em; }
h2 { font-size: 22px; margin: 40px 0 14px; letter-spacing: -.01em; }
h3 { font-size: 18px; margin: 30px 0 10px; }
h4 { font-size: 16px; margin: 0 0 6px; }
p { margin: 0 0 14px; }
.muted { color: var(--muted); }
.lead { color: var(--ink-2); font-size: 17px; max-width: 70ch; }
.mini { color: var(--muted); font-size: 13px; }

/* ---------------- шапка ---------------- */
.top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 12px 24px; background: color-mix(in srgb, var(--panel) 92%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: baseline; gap: 9px; color: var(--ink); }
.brand b { font-size: 19px; letter-spacing: .16em; }
.brand span { color: var(--muted); font-size: 13px; }
.brand:hover { text-decoration: none; }
.topnav { display: flex; align-items: center; gap: 16px; margin-left: auto; flex-wrap: wrap; }
.topnav a { color: var(--ink-2); font-size: 14px; }

/* ---------------- поиск ---------------- */
.search { position: relative; display: flex; gap: 8px; flex: 1 1 320px; max-width: 520px; }
.search input {
  flex: 1; min-width: 0; padding: 9px 13px; font-size: 15px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 9px;
}
.search input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.search button {
  padding: 9px 15px; font-size: 14px; cursor: pointer; color: var(--panel);
  background: var(--accent); border: 0; border-radius: 9px;
}
.search.big { max-width: 100%; margin: 18px 0 24px; }
.search.big input { padding: 14px 16px; font-size: 17px; }
.suggest {
  position: absolute; top: 46px; left: 0; right: 0; display: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: 11px;
  box-shadow: var(--shadow); overflow: hidden;
}
.suggest.open { display: block; }
.suggest a { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--ink); }
.suggest a:last-child { border-bottom: 0; }
.suggest a:hover, .suggest a.on { background: var(--accent-soft); text-decoration: none; }
.suggest b { display: block; font-size: 15px; }
.suggest s { display: block; color: var(--muted); font-size: 12.5px; text-decoration: none; }

/* ---------------- каркас ---------------- */
main { max-width: 900px; margin: 0 auto; padding: 28px 24px 80px; }
main.wide { max-width: 1180px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 7px; font-size: 13.5px; color: var(--muted); margin-bottom: 18px; }
.crumbs i { font-style: normal; opacity: .5; }
.foot { border-top: 1px solid var(--line); padding: 20px 24px; color: var(--muted); font-size: 13px; text-align: center; }

.hero { padding: 8px 0 26px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.hero h1 { font-size: 38px; }
.hero p { max-width: 68ch; color: var(--ink-2); }
.page-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 8px; }
.emo { font-size: 22px; }
.emo.big { font-size: 38px; line-height: 1; }

/* ---------------- плитки и карточки ---------------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 14px; }
.tile {
  display: block; padding: 18px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--ink); box-shadow: var(--shadow);
  transition: transform .12s ease, border-color .12s ease;
}
.tile:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--accent); }
.tile h3 { margin: 8px 0 6px; font-size: 17px; }
.tile p { color: var(--ink-2); font-size: 14px; margin-bottom: 10px; }
.tile em { color: var(--muted); font-size: 12.5px; font-style: normal; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.card {
  display: block; padding: 15px 16px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--ink);
}
.card:hover { text-decoration: none; border-color: var(--accent); }
.card.draft { border-style: dashed; }
.card p { font-size: 14px; color: var(--ink-2); margin-bottom: 10px; }
.card-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-dept { color: var(--muted); font-size: 12.5px; }

.pills { display: flex; flex-wrap: wrap; gap: 9px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; font-size: 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px; color: var(--ink);
}
.pill:hover { text-decoration: none; border-color: var(--accent); }
.pill b { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.side-box { margin: 14px 0 24px; }
.side-box h4 { color: var(--muted); font-weight: 500; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.side-box .pill { margin: 0 6px 6px 0; }

/* ---------------- списки ---------------- */
.clist { list-style: none; margin: 0 0 10px; padding: 0; }
.clist li { padding: 7px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.clist li:last-child { border-bottom: 0; }
.route { list-style: none; counter-reset: r; margin: 0; padding: 0; }
.route li {
  display: grid; grid-template-columns: 34px 1fr; gap: 4px 12px; align-items: baseline;
  padding: 11px 0; border-bottom: 1px solid var(--line);
}
.route .num {
  grid-row: span 2; display: grid; place-items: center; width: 28px; height: 28px;
  background: var(--accent-soft); color: var(--accent); border-radius: 50%; font-size: 13px;
}
.route a { font-size: 16px; }
.procs { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.proc { padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.proc h3 { margin: 0 0 8px; font-size: 16px; }
.proc h3 em { color: var(--muted); font-style: normal; font-size: 13px; }

/* ---------------- чипы ---------------- */
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.chip {
  display: inline-block; padding: 3px 10px; font-size: 12.5px; border-radius: 999px;
  background: var(--accent-soft); color: var(--ink-2); border: 1px solid transparent;
}
a.chip:hover { text-decoration: none; border-color: var(--accent); }
.chip-pos { background: transparent; border: 1px solid var(--line); }
.st-ready { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.st-draft { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.st-check { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.tag { display: inline-block; margin-right: 6px; font-size: 13px; }

/* ---------------- статья ---------------- */
.doc { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 30px 34px; box-shadow: var(--shadow); }
.meta { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0 0 22px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.meta div { display: flex; gap: 8px; align-items: baseline; }
.meta dt { color: var(--muted); font-size: 12.5px; }
.meta dd { margin: 0; font-size: 13.5px; }
.toc { margin: 0 0 24px; padding: 14px 18px; background: var(--bg); border-radius: 10px; }
.toc h4 { color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li { padding: 2px 0; font-size: 14px; }
.toc li.l3 { padding-left: 16px; font-size: 13.5px; }

.prose { font-size: 16.5px; }
.prose h2 { font-size: 21px; margin: 34px 0 12px; padding-top: 6px; }
.prose h3 { font-size: 17px; margin: 26px 0 8px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 16px; }
.prose li { margin: 5px 0; }
.prose li.task { list-style: none; margin-left: -22px; }
.prose blockquote {
  margin: 16px 0; padding: 12px 18px; background: var(--bg);
  border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; color: var(--ink-2);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose code { padding: 1px 5px; background: var(--bg); border: 1px solid var(--line); border-radius: 5px; font-size: 90%; }
.prose pre { padding: 14px 16px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; }
.prose pre code { padding: 0; background: none; border: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.tw { overflow-x: auto; margin: 0 0 18px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.prose th, .prose td { padding: 9px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--bg); font-weight: 600; }

a.wl { border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
a.wl:hover { text-decoration: none; border-bottom-color: var(--accent); }
a.wl-missing { color: var(--danger); border-bottom: 1px dashed var(--danger); }

.related { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); }
.related h3 { margin-top: 18px; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.doc-actions { display: flex; gap: 10px; margin-top: 28px; }

/* ---------------- поиск: выдача ---------------- */
.hits { display: grid; gap: 10px; }
.hit { display: block; padding: 15px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); }
.hit:hover { text-decoration: none; border-color: var(--accent); }
.hit p { font-size: 14px; color: var(--ink-2); margin: 4px 0 6px; }
.hit em { color: var(--muted); font-size: 12.5px; font-style: normal; }

/* ---------------- кнопки и формы ---------------- */
.btn {
  display: inline-block; padding: 9px 16px; font-size: 14px; cursor: pointer;
  background: var(--accent); color: #fff; border: 0; border-radius: 9px;
}
.btn:hover { text-decoration: none; opacity: .9; }
.btn.big { padding: 12px 22px; font-size: 15px; margin-top: 8px; }
.btn.ghost { background: transparent; color: var(--ink-2); border: 1px solid var(--line); }
.btn.danger { background: var(--danger); }
.row { display: flex; gap: 10px; align-items: center; margin-top: 18px; }

.editor { display: grid; gap: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.editor label { display: grid; gap: 6px; font-size: 13.5px; color: var(--muted); }
.editor input, .editor select, .editor textarea {
  padding: 9px 12px; font-size: 15px; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 9px; font-family: inherit;
}
.editor textarea { font: 14px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; resize: vertical; }
.editor fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.editor legend { color: var(--muted); font-size: 12.5px; padding: 0 6px; }
.cbxs { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; }
.cbx { display: flex !important; flex-direction: row; align-items: center; gap: 7px; color: var(--ink) !important; font-size: 14px !important; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.hint { font-size: 13px; color: var(--muted); }

@media (max-width: 720px) {
  main { padding: 20px 16px 60px; }
  .doc { padding: 22px 18px; border-radius: 12px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .top { padding: 10px 14px; }
  .topnav { width: 100%; margin-left: 0; }
  h1 { font-size: 26px; }
  .hero h1 { font-size: 30px; }
}

/* ---------------- пробелы ---------------- */
.statbar { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 20px 0 30px; }
.statbar div { padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.statbar b { display: block; font-size: 26px; line-height: 1.1; letter-spacing: -.02em; }
.statbar span { color: var(--muted); font-size: 12.5px; }
.gapblock { margin: 26px 0; padding: 18px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.gapblock h3 { margin: 0 0 2px; font-size: 17px; }
.gapblock h3 em { color: var(--muted); font-style: normal; font-size: 13px; }
.gapblock > .mini { margin-bottom: 12px; }
ul.gaps { list-style: none; margin: 0; padding: 0; }
ul.gaps li { padding: 9px 0; border-bottom: 1px solid var(--line); display: grid; gap: 2px; }
ul.gaps li:last-child { border-bottom: 0; }
ul.gaps b { font-weight: 600; }


/* ---------------- документы Word рядом со статьями ---------------- */
.dochead { margin: 1.4rem 0 .2rem; }
.dochint { color: var(--muted); margin: 0 0 .6rem; }
ul.docs { list-style: none; margin: 0 0 1.2rem; padding: 0; }
.docrow { display: flex; align-items: baseline; gap: .6rem;
          padding: .5rem .2rem; border-bottom: 1px solid var(--line); }
.docrow .code { flex: 0 0 auto; font-size: .78rem; font-weight: 600;
                color: var(--muted); min-width: 3.4rem; }
.docrow > a:first-of-type { font-weight: 500; }
.docrow .mini { flex: 1 1 auto; color: var(--muted); font-size: .85rem; }
.docrow .dl { flex: 0 0 auto; font-size: .75rem; padding: .1rem .5rem;
              border: 1px solid var(--line); border-radius: 5px; color: var(--muted); }
.docrow .dl:hover { border-color: var(--accent); color: var(--accent); }
.docrow.missing { opacity: .55; }
.note { border-left: 3px solid var(--line); background: var(--panel, #fafafa);
        padding: .7rem .9rem; margin: .6rem 0 1rem; border-radius: 0 6px 6px 0;
        font-size: .9rem; }
.note-di { border-left-color: #0f6e56; background: var(--ok-soft, #e1f5ee);
           color: var(--ok-ink, #04342c); }
.note-gap { border-left-color: #a32d2d; background: var(--warn-soft, #fcebeb);
            color: var(--warn-ink, #501313); }
.docmeta { color: var(--muted); font-size: .85rem; margin: -.4rem 0 1rem; }
.docmeta .code { font-weight: 600; }
article.doc p.docstep { font-weight: 600; margin: 1.1rem 0 .2rem; }
article.doc p.doccallout { background: var(--panel, #fafafa); border-left: 3px solid var(--line);
                           padding: .55rem .8rem; border-radius: 0 6px 6px 0; }
.hit .src { display: inline-block; font-size: .7rem; padding: .05rem .4rem;
            border-radius: 4px; margin-right: .4rem; }
.src-a { background: var(--accent-soft); color: var(--muted); }
.src-d { background: #e6f1fb; color: #185fa5; }
article.doc table tr.deflike td:first-child { width: 20%; font-weight: 600;
    color: var(--muted); vertical-align: top; }
.whoami { margin-left: auto; padding-left: 1rem; color: var(--muted); font-size: .82rem;
          white-space: nowrap; }
@media (max-width: 760px) { .whoami { width: 100%; padding: .3rem 0 0; } }

/* плашка режима «посмотреть глазами должности» */
.kak {
  background: #fff4d6;
  border-bottom: 1px solid #e8d9a8;
  padding: .6rem 1.2rem;
  font-size: .92rem;
  color: #6b5518;
}
.kak a { color: #6b5518; text-decoration: underline; margin-left: .4rem; }
ul.plain { list-style: none; padding: 0; }
ul.plain li { padding: .35rem 0; border-bottom: 1px solid #efece6; }

/* Разделы слева — устройство как в Platrum: раздел, внутри папки */
.shell { display: flex; align-items: flex-start; gap: 0; }
.side {
  width: 260px; flex: 0 0 260px; padding: 1.2rem .8rem 2rem;
  border-right: 1px solid #ece8e1; min-height: 70vh; background: #fcfbf9;
}
.sidet {
  font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  color: #9a9287; padding: 0 .6rem .6rem;
}
.sp { margin-bottom: .15rem; }
.sph {
  display: flex; justify-content: space-between; align-items: center; gap: .5rem;
  padding: .45rem .6rem; border-radius: 7px; text-decoration: none;
  color: #3d3732; font-size: .93rem;
}
.sph:hover { background: #f2efe9; }
.sp.open > .sph { background: #efe9df; font-weight: 600; }
.sph i, .fold i { font-style: normal; font-size: .76rem; color: #a49b8e; }
.fold {
  display: flex; justify-content: space-between; align-items: center; gap: .5rem;
  padding: .35rem .6rem .35rem 1.4rem; margin-left: .2rem;
  border-left: 1px solid #e6e0d6; text-decoration: none;
  color: #5d564e; font-size: .88rem;
}
.fold:hover { color: #2e2a26; background: #f5f2ec; }
.fold.on { color: #8a6a2f; border-left-color: #c9a35a; font-weight: 600; }
.shell > main { flex: 1; min-width: 0; }

/* плитки папок внутри раздела */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .8rem; }
.card {
  display: block; padding: .9rem 1rem; border: 1px solid #e8e3da; border-radius: 10px;
  text-decoration: none; background: #fff;
}
.card:hover { border-color: #c9a35a; }
.card b { display: block; color: #2e2a26; margin-bottom: .25rem; }
.card span { font-size: .82rem; color: #948b7e; }

/* список статей в папке */
ul.arts { list-style: none; padding: 0; }
ul.arts li { padding: .5rem 0; border-bottom: 1px solid #efece6; }
ul.arts li a { font-weight: 600; }
ul.arts li span { display: block; font-size: .85rem; color: #8d857a; margin-top: .15rem; }

@media (max-width: 860px) {
  .shell { display: block; }
  .side { width: auto; border-right: 0; border-bottom: 1px solid #ece8e1; min-height: 0; }
}

/* настройка доступа к статье */
.chip-set { border-style: dashed; }
.dostup h2 { font-size: .95rem; margin: 1.2rem 0 .5rem; }
.dostup select { padding: .45rem .6rem; border: 1px solid #ddd6ca; border-radius: 7px; }
.chks { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .4rem; }
.chk {
  display: flex; align-items: center; gap: .5rem; padding: .45rem .6rem;
  border: 1px solid #ece7de; border-radius: 8px; font-size: .9rem; cursor: pointer;
}
.chk:hover { border-color: #c9a35a; }
.chk span { margin-left: auto; font-size: .76rem; color: #a2998c; }

/* Рельс модулей слева — как в Platrum */
.rail {
  width: 64px; flex: 0 0 64px; background: #fff; border-right: 1px solid #ece8e1;
  padding: .6rem 0; display: flex; flex-direction: column; gap: .15rem; min-height: 80vh;
}
.rail .rl {
  display: flex; flex-direction: column; align-items: center; gap: .15rem;
  padding: .5rem .2rem; text-decoration: none; color: #8d857a; border-radius: 8px;
  margin: 0 .35rem;
}
.rail .rl span { font-size: 1.05rem; line-height: 1; }
.rail .rl b { font-size: .56rem; font-weight: 500; text-align: center; line-height: 1.15; }
.rail .rl:hover { background: #f4f1eb; color: #3d3732; }
.rail .rl.on { background: #efe7d8; color: #8a6a2f; }
.rail .rl.soon { opacity: .45; }

/* вкладки раздела сверху */
.tabs { display: flex; gap: 1.1rem; border-bottom: 1px solid #ece8e1; margin: -.4rem 0 1.2rem; }
.tabs a {
  padding: .55rem 0; text-decoration: none; color: #7d7568; font-size: .9rem;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a:hover { color: #3d3732; }
.tabs a.on { color: #8a6a2f; border-bottom-color: #c9a35a; font-weight: 600; }

@media (max-width: 860px) {
  .rail { width: auto; flex: none; flex-direction: row; overflow-x: auto; min-height: 0;
          border-right: 0; border-bottom: 1px solid #ece8e1; }
  .tabs { overflow-x: auto; }
}

.whoami a { color: inherit; text-decoration: none; border-bottom: 1px dotted #c3bbae; }
.whoami a:hover { color: #8a6a2f; }
.vyhod { font-size: .78rem; opacity: .65; margin-left: .5rem; }
.err { color: #a4392f; }
.wide-in { width: 100%; padding: .5rem .6rem; border: 1px solid #ddd6ca; border-radius: 7px; }
.teamq { display: flex; gap: .5rem; margin: .6rem 0 1rem; }
.teamq input { flex: 1; padding: .45rem .6rem; border: 1px solid #ddd6ca; border-radius: 7px; }
.card-table th { text-align: left; padding: .4rem .8rem .4rem 0; color: #8d857a; font-weight: 500; }
.card-table td { padding: .4rem 0; }
ul.plan li.st-done b { color: #6f7a63; }
ul.plan li.st-skip b { color: #a2998c; text-decoration: line-through; }
form.inline { display: inline; margin-left: .6rem; }
form.inline button { font-size: .8rem; padding: .2rem .6rem; }

/* Таблица сотрудников — как в Platrum: колонки, аватар, статус в строке */
.tabrow { display: flex; align-items: center; gap: 1rem; margin: 0 0 1rem; }
.tabrow .teamq { flex: 1; margin: 0; max-width: 420px; }
.plus {
  margin-left: auto; width: 34px; height: 34px; border-radius: 8px;
  background: #8a6a2f; color: #fff; text-decoration: none; font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.plus:hover { background: #6f5526; }
.tabwrap { overflow-x: auto; border: 1px solid #ece8e1; border-radius: 10px; background: #fff; }
table.people-t { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.people-t th {
  text-align: left; padding: .7rem .8rem; color: #8d857a; font-weight: 500;
  border-bottom: 1px solid #ece8e1; white-space: nowrap; font-size: .8rem;
}
table.people-t td { padding: .6rem .8rem; border-bottom: 1px solid #f3f0ea; vertical-align: middle; }
table.people-t tr:last-child td { border-bottom: 0; }
table.people-t tr:hover td { background: #faf8f5; }
table.people-t td.nm { display: flex; align-items: center; gap: .6rem; white-space: nowrap; }
table.people-t tr.fired td { opacity: .55; }
.ava {
  width: 28px; height: 28px; border-radius: 50%; background: #efe7d8; color: #8a6a2f;
  display: inline-flex; align-items: center; justify-content: center;
  font-style: normal; font-size: .78rem; font-weight: 600; flex: 0 0 28px;
}
.tgl {
  border: 1px solid #cfe0c4; background: #f2f8ee; color: #5d7a4a;
  border-radius: 20px; padding: .15rem .6rem; font-size: .76rem; cursor: pointer;
}
.tgl.off { border-color: #e4d6d4; background: #faf4f3; color: #9c7b76; }
.itogo { color: #8d857a; font-size: .85rem; margin-top: .8rem; }

/* колонки таблицы сотрудников: имя и должность пошире, даты в одну строку */
table.people-t th:nth-child(1), table.people-t td:nth-child(1) { min-width: 210px; }
table.people-t th:nth-child(2), table.people-t td:nth-child(2) { min-width: 240px; }
table.people-t th:nth-child(5), table.people-t td:nth-child(5),
table.people-t th:nth-child(6), table.people-t td:nth-child(6),
table.people-t th:nth-child(7), table.people-t td:nth-child(7) { white-space: nowrap; }

img.ava { object-fit: cover; }

/* Страницы-таблицы занимают всю ширину окна — как в Platrum, где список
   сотрудников тянется от рельса модулей до правого края. */
main.full { max-width: none; padding: 20px 24px 60px; }
main.full .tabwrap { border-radius: 10px; }
main.full table.people-t { font-size: .86rem; }

/* Панель над таблицей сотрудников: поиск, фильтры, уволенные, колонки */
.panel { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-bottom: 1rem; }
.panel .q {
  flex: 1 1 320px; max-width: 420px; padding: .5rem .7rem;
  border: 1px solid #ddd6ca; border-radius: 8px;
}
.filt summary {
  cursor: pointer; padding: .45rem .8rem; border: 1px solid #ddd6ca;
  border-radius: 8px; font-size: .88rem; list-style: none; user-select: none;
}
.filt summary::-webkit-details-marker { display: none; }
.filt summary::before { content: "⚲ "; opacity: .6; }
.filt[open] summary { background: #efe7d8; border-color: #c9a35a; }
.filtbox {
  position: absolute; z-index: 20; margin-top: .4rem; padding: 1rem;
  background: #fff; border: 1px solid #e4ded3; border-radius: 10px;
  box-shadow: 0 8px 24px rgba(60,50,35,.12); display: flex; gap: 1rem;
  align-items: flex-end; flex-wrap: wrap;
}
.filtbox label { font-size: .82rem; color: #8d857a; }
.filtbox select { padding: .45rem .6rem; border: 1px solid #ddd6ca; border-radius: 7px; min-width: 190px; }
.fired-sw { font-size: .86rem; color: #6b6459; display: flex; align-items: center; gap: .35rem; }
.gear {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid #ddd6ca;
  display: flex; align-items: center; justify-content: center; text-decoration: none;
  color: #8d857a; font-size: 1rem;
}
.gear:hover { border-color: #c9a35a; color: #8a6a2f; }
ul.cols { list-style: none; padding: 0; max-width: 520px; }
ul.cols li {
  display: flex; align-items: center; gap: .6rem; padding: .45rem .6rem;
  border: 1px solid #ece7de; border-radius: 8px; margin-bottom: .4rem;
}
ul.cols li.off { opacity: .55; }
ul.cols .chk { border: 0; flex: 1; padding: 0; }
ul.cols .mv { display: flex; gap: .25rem; }
ul.cols .mv button {
  width: 28px; height: 28px; border: 1px solid #ddd6ca; background: #fff;
  border-radius: 6px; cursor: pointer; color: #6b6459;
}
ul.cols .mv button:hover { border-color: #c9a35a; color: #8a6a2f; }
td.seen { color: #8d857a; font-size: .82rem; white-space: nowrap; }

/* Второй ряд вкладок внутри раздела */
.subtabs { display: flex; gap: 1.2rem; margin: 0 0 1.2rem; }
.subtabs a {
  text-decoration: none; color: #7d7568; font-size: .9rem; padding: .3rem 0;
  border-bottom: 2px solid transparent;
}
.subtabs a:hover { color: #3d3732; }
.subtabs a.on { color: #8a6a2f; border-bottom-color: #c9a35a; font-weight: 600; }
.panel select { padding: .45rem .6rem; border: 1px solid #ddd6ca; border-radius: 7px; }
.panel label { font-size: .85rem; color: #6b6459; display: flex; align-items: center; gap: .4rem; }
.bar {
  display: inline-block; width: 90px; height: 6px; background: #efe9df;
  border-radius: 4px; overflow: hidden; vertical-align: middle; margin-right: .4rem;
}
.bar i { display: block; height: 100%; background: #c9a35a; }

/* Оргсхема — по модели Platrum: блок это колонка, его ширина равна сумме
   детей, карточка стоит по центру колонки, линии идут по ширине блока.
   Поэтому схема не разъезжается ни при каком размере экрана. */
.orgschema { padding: 1rem 0 2rem; overflow-x: auto; }
.orgschema > .ob { margin: 0 auto; }

.ob { display: inline-block; vertical-align: top; text-align: center; }
.ob > .bcard, .vetka > summary > .bcard { margin: 0 auto; }

.bcard {
  position: relative; width: 236px; box-sizing: border-box; text-align: left;
  background: #fff; border: 1px solid #e4ded3; border-radius: 10px; padding: .7rem .9rem;
  display: inline-block;
}
.bnum {
  display: inline-block; background: #efe7d8; color: #8a6a2f; border-radius: 5px;
  padding: 0 .4rem; font-size: .72rem; margin-bottom: .25rem;
}
.bcard b { display: block; font-size: .9rem; line-height: 1.25; }
.bcard b a { color: inherit; text-decoration: none; }
.bcard b a:hover { color: #8a6a2f; }
.bpos { display: block; color: #8d857a; font-size: .77rem; margin-top: .15rem; }
.brez {
  margin: .45rem 0 0; font-size: .74rem; color: #6f6557; background: #faf8f5;
  border-left: 2px solid #c9a35a; padding: .3rem .5rem; border-radius: 0 5px 5px 0;
}
.bcount { display: block; margin-top: .4rem; font-size: .72rem; color: #a49b8e; }
.bpeople { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .5rem; }
.bpeople a {
  width: 26px; height: 26px; border-radius: 50%; background: #efe7d8; color: #8a6a2f;
  display: flex; align-items: center; justify-content: center; font-size: .72rem;
  font-weight: 600; text-decoration: none; overflow: hidden;
}
.bpeople a img { width: 100%; height: 100%; object-fit: cover; }
.bedit { position: absolute; top: .4rem; right: .5rem; text-decoration: none;
         color: #c3bbae; font-size: .8rem; }
.bedit:hover { color: #8a6a2f; }
.bcard.small { padding: .5rem .7rem; width: 212px; }
.bcard.small b { font-size: .84rem; }
.bcard.small .bpos { font-size: .72rem; }
.bcard.small .bcount { font-size: .68rem; margin-top: .25rem; }
.bcard.small .bpeople a { width: 22px; height: 22px; font-size: .66rem; }

/* ряд детей: дети идут подряд, линии рисуются по их колонкам */
.bkids { display: flex; align-items: flex-start; justify-content: center;
         position: relative; padding-top: 26px; }
.bkids::before {                 /* линия вниз от карточки родителя */
  content: ""; position: absolute; top: 0; left: 50%; width: 2px; height: 26px;
  background: #ddd6ca; transform: translateX(-50%); z-index: 0;
}
.bkids > .ob { position: relative; padding: 26px 8px 0; }
.bkids > .ob::before {           /* горизонтальная линия над колонкой ребёнка */
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: #ddd6ca;
}
.bkids > .ob:first-child::before { left: 50%; }
.bkids > .ob:last-child::before { right: 50%; }
.bkids > .ob:only-child::before { left: 50%; right: 50%; }
.bkids > .ob::after {            /* вертикальная линия к карточке ребёнка */
  content: ""; position: absolute; top: 0; left: 50%; width: 2px; height: 26px;
  background: #ddd6ca; transform: translateX(-50%);
}

/* глубокие ветки — вертикальным списком, чтобы схема не росла вширь */
.bkids.flat { display: block; padding: 14px 0 0 28px; text-align: left; }
.bkids.flat::before { left: 14px; top: 0; height: 100%; transform: none; }
.bkids.flat > .ob { display: block; padding: 10px 0 0; text-align: left; }
.bkids.flat > .ob::before { left: -14px; right: auto; width: 14px; top: 30px; }
.bkids.flat > .ob:first-child::before,
.bkids.flat > .ob:last-child::before,
.bkids.flat > .ob:only-child::before { left: -14px; right: auto; }
.bkids.flat > .ob::after { display: none; }
.bkids.flat .bcard { margin: 0; }

/* сворачивание веток */
.vetka > summary { list-style: none; cursor: pointer; position: relative; display: block; }
.vetka > summary::-webkit-details-marker { display: none; }
.svernut {
  position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%);
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  border: 1px solid #ddd6ca; z-index: 3;
}
.svernut::before {
  content: "−"; position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; font-size: .8rem; color: #8d857a; line-height: 1;
}
.vetka:not([open]) > summary .svernut::before { content: "+"; color: #8a6a2f; }
.vetka:not([open]) > summary .svernut { border-color: #c9a35a; }
.bkids.flat .vetka > summary .svernut { left: 0; bottom: auto; top: 50%;
                                        transform: translate(-50%, -50%); }
.probation { font-size: .74rem; color: #a4392f; background: #fdf3f1;
             border-radius: 4px; padding: 0 .4rem; }

/* Снимки экрана в статьях */
figure.snimok { margin: 1.2rem 0; }
figure.snimok img {
  max-width: 100%; border: 1px solid #e8e2d8; border-radius: 8px; display: block;
}
figure.snimok figcaption {
  font-size: .82rem; color: #8d857a; margin-top: .4rem;
}
