/* JIVA HQ: слева разделы компании, справа рабочая область; карточки — только для того, что открывается.
   Палитра — от знака JIVA (мята → небо на графитовой плитке), шрифты — те же, что у Атласа. */
@font-face { font-family: "Golos Text"; src: url("/fonts/golos-text-cyrillic-wght-normal.woff2") format("woff2"); font-weight: 400 900; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; src: url("/fonts/golos-text-latin-wght-normal.woff2") format("woff2"); font-weight: 400 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Unbounded"; src: url("/fonts/unbounded-cyrillic-wght-normal.woff2") format("woff2"); font-weight: 200 900; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; src: url("/fonts/unbounded-latin-wght-normal.woff2") format("woff2"); font-weight: 200 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono-cyrillic-wght-normal.woff2") format("woff2"); font-weight: 100 800; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 800; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #f3f6f5; --surface: #ffffff; --raised: #f8faf9; --ink: #111614; --soft: #47524e; --muted: #6c7773; --line: #dde4e1; --line-strong: #c9d2ce;
  --accent: #0a7f6e; --accent-ink: #ffffff; --accent-soft: #dcf4ec; --brand-a: #84fab0; --brand-b: #8fd3f4; --side: #ffffff;
  --ok: #157a52; --ok-soft: #dff3e8; --warn: #9a5a00; --warn-soft: #fbedd2; --bad: #bf3328; --bad-soft: #fbe2df; --none: #6c7773; --none-soft: #eceff0;
  --p-tri: #1b1b1b; --p-dive: #1670c4; --p-fit: #6a4de0; --p-sport: #dd5426; --p-service: #5c6863;
  --st-prod-bg: #d7f2ec; --st-prod-ink: #0b4f47; --st-prod-line: #9fdccf;
  --st-dev-bg: #fdecc8; --st-dev-ink: #6b4300; --st-dev-line: #f0cd85;
  --st-other-bg: #e9e3fc; --st-other-ink: #3f2a99; --st-other-line: #c9bbf5;
  --st-off-ink: #5d646e; --st-off-line: #a9b0b9;
  --col-bg: #12161b; --col-ink: #ffffff;
  --core-bg: #e3eefb; --core-ink: #12365f; --core-line: #b7d0ef; --core-soft: #f4f8fe;
  --shadow: 0 1px 2px rgba(17, 22, 20, .05), 0 6px 20px -12px rgba(17, 22, 20, .18);
  --font-display: "Unbounded", "Golos Text", system-ui, sans-serif;
  --font-body: "Golos Text", -apple-system, "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c100f; --surface: #141918; --raised: #181e1d; --ink: #e9efec; --soft: #b3beb9; --muted: #85908b; --line: #242c29; --line-strong: #323c38;
    --accent: #6fe0c2; --accent-ink: #0c100f; --accent-soft: #14302a; --side: #101413;
    --ok: #52d39b; --ok-soft: #13301f; --warn: #f0b456; --warn-soft: #36290f; --bad: #ff7d72; --bad-soft: #3a1714; --none: #8e9994; --none-soft: #1f2523;
    --p-tri: #e9efec; --p-dive: #5cb0f0; --p-fit: #a48cff; --p-sport: #ff8a5c; --p-service: #9aa6a1;
    --st-prod-bg: #123430; --st-prod-ink: #a6f0e1; --st-prod-line: #1f5a52;
    --st-dev-bg: #3a2d0e; --st-dev-ink: #ffd88a; --st-dev-line: #6b5216;
    --st-other-bg: #2a2342; --st-other-ink: #d6caff; --st-other-line: #4a3d78;
    --st-off-ink: #a3aab4; --st-off-line: #4b525c;
    --col-bg: #eef1f4; --col-ink: #111418;
    --core-bg: #14263d; --core-ink: #bcd8ff; --core-line: #2b4a73; --core-soft: #101e31;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -14px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.mono { font-family: var(--font-mono); font-size: .88em; letter-spacing: -.01em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.boot { position: fixed; inset: 0; display: grid; place-items: center; color: var(--muted); }

/* ---------- вход ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px));
  background: radial-gradient(1200px 500px at 20% -10%, var(--accent-soft), transparent 60%), var(--bg); }
.login-card { width: min(360px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 28px 26px; display: grid; gap: 14px; box-shadow: var(--shadow); }
.login-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 6px; }
.login-brand img { border-radius: 12px; }
.login-brand b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 20px; line-height: 1.1; }
.login-brand span { color: var(--muted); font-size: 13px; }
.login-card label { display: grid; gap: 5px; font-size: 13px; color: var(--soft); font-weight: 500; }
.login-card input { font: inherit; font-size: 16px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--raised); color: var(--ink); }
.login-card input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.form-error { margin: 0; min-height: 1.2em; color: var(--bad); font-size: 13.5px; }
.btn { display: inline-block; text-decoration: none; font-weight: 600; padding: 11px 14px; border-radius: 10px; border: 0; background: var(--ink); color: var(--surface); cursor: pointer; }
.btn:disabled { opacity: .6; cursor: progress; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-size: 13px; }

/* ---------- оболочка ---------- */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--side); border-right: 1px solid var(--line);
  padding: 18px 12px 14px max(12px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 14px; }
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; padding: 2px 8px 6px; }
.brand img { border-radius: 9px; flex: none; }
.brand b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 15px; line-height: 1.15; }
.brand small { display: block; color: var(--muted); font-size: 12px; }
.nav { display: grid; gap: 1px; }
.nav .grp { font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); padding: 14px 10px 5px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; text-decoration: none; font-size: 14.5px; color: var(--soft); }
.nav a:hover { background: var(--raised); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.nav a .dot { margin-left: auto; }
.side-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 10px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

.sw { width: 12px; height: 12px; border-radius: 4px; flex: none; background: var(--p-service); }
.sw.home { background: linear-gradient(135deg, var(--brand-a), var(--brand-b)); }
.sw.tri { background: var(--p-tri); } .sw.dive { background: var(--p-dive); } .sw.fit { background: var(--p-fit); } .sw.sport { background: var(--p-sport); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--none); }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); }

.main { padding: 26px max(16px, env(safe-area-inset-right, 0px)) 64px 32px; min-width: 0; outline: none; }
.page { max-width: 1180px; display: grid; gap: 26px; }
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 24px; }
.head h1 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(24px, 3.2vw, 32px); line-height: 1.1; text-wrap: balance; display: flex; align-items: center; gap: 12px; }
.head h1 .sw { width: 22px; height: 22px; border-radius: 7px; }
.head p { margin: 6px 0 0; color: var(--soft); }
.stamp { font-size: 12.5px; color: var(--muted); text-align: right; align-self: flex-start; margin-left: auto; }
section.block { display: grid; gap: 12px; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.block-head h2 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.block-head a, .block-head span { font-size: 13px; color: var(--muted); }

.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; background: var(--none-soft); color: var(--none); }
.chip.ok { background: var(--ok-soft); color: var(--ok); } .chip.warn { background: var(--warn-soft); color: var(--warn); } .chip.bad { background: var(--bad-soft); color: var(--bad); }

/* внимание */
.attention { display: grid; gap: 8px; }
.alert { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; text-decoration: none; }
.alert:hover { border-color: var(--line-strong); }
.alert .dot { margin-top: 8px; }
.alert b { font-weight: 600; margin-right: 8px; }
.alert .issues { color: var(--soft); }
.calm { display: flex; gap: 10px; align-items: center; color: var(--soft); background: var(--surface); border: 1px dashed var(--line-strong); border-radius: 10px; padding: 10px 14px; }
.bad-text { color: var(--bad); font-weight: 600; }
.soft { margin: 0; }

/* карточки продуктов */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px; text-decoration: none;
  box-shadow: var(--shadow); transition: transform .15s ease, border-color .15s ease; align-content: start; }
.pcard:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.pcard-top { display: flex; align-items: center; gap: 10px; }
.pcard-top .tile { width: 34px; height: 34px; border-radius: 10px; flex: none; }
.pcard-top b { font-size: 16px; font-weight: 600; line-height: 1.2; }
.pcard-top small { display: block; color: var(--muted); font-size: 12.5px; }
.pcard-top .chip { margin-left: auto; white-space: normal; text-align: center; }
.tile { background: var(--p-service); } .tile.tri { background: var(--p-tri); } .tile.dive { background: var(--p-dive); } .tile.fit { background: var(--p-fit); } .tile.sport { background: var(--p-sport); }
.people { font-size: 13.5px; color: var(--soft); }
.strip { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--soft); border-top: 1px dashed var(--line); padding-top: 10px; }
.strip-part { display: inline-flex; align-items: center; gap: 6px; }
.strip-part i { width: 9px; height: 9px; border-radius: 3px; background: var(--st-prod-line); }
.strip-part.dev i { background: var(--st-dev-line); }

/* сервисы */
.services { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.scard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 6px; align-content: start; }
.scard h3 { margin: 0; font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.scard p { margin: 0; color: var(--soft); font-size: 13.5px; }
.scard a.out { font-size: 13px; color: var(--accent); text-decoration: none; font-weight: 600; }
.scard a.out:hover { text-decoration: underline; }

/* обзор продукта */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 9px 14px; text-decoration: none; color: var(--soft); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-size: 14.5px; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); font-weight: 600; border-color: var(--ink); }
.nowlist { display: grid; gap: 6px; }
.nowrow { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 9px 14px; }
.lag { margin: 0; font-weight: 600; color: var(--warn); }
.brief { margin: 0; color: var(--soft); max-width: 70ch; }
.legend { display: flex; flex-wrap: wrap; gap: 8px; }
.key { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums;
  background: var(--st-prod-bg); color: var(--st-prod-ink); border: 1px solid var(--st-prod-line); }
.key b { font-weight: 600; }
.key.dev { background: var(--st-dev-bg); color: var(--st-dev-ink); border-color: var(--st-dev-line); }
.key.other { background: var(--st-other-bg); color: var(--st-other-ink); border-color: var(--st-other-line); }
.key.off { background: var(--surface); color: var(--st-off-ink); border: 1.5px dashed var(--st-off-line); }

/* стикеры и доска */
.sticker { border-radius: 8px; padding: 10px 12px; display: grid; gap: 2px; background: var(--st-prod-bg); color: var(--st-prod-ink); border: 1px solid var(--st-prod-line); }
.sticker b { font-weight: 600; font-size: 14.5px; }
.sticker span { font-size: 13px; opacity: .85; }
.sticker.dev { background: var(--st-dev-bg); color: var(--st-dev-ink); border-color: var(--st-dev-line); }
.sticker.other { background: var(--st-other-bg); color: var(--st-other-ink); border-color: var(--st-other-line); }
.sticker.off { background: var(--surface); color: var(--st-off-ink); border: 1.5px dashed var(--st-off-line); }
.sticker .tag { font-style: normal; font-size: 11px; font-weight: 600; letter-spacing: .04em; margin-left: 6px; padding: 1px 6px; border-radius: 4px; border: 1px solid currentColor; vertical-align: 1px; white-space: nowrap; }
.stickers { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.stickers .more { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: 8px; }
.more { display: block; width: 100%; padding: 10px 14px; background: var(--raised); color: var(--soft); cursor: pointer; font-size: 13.5px; border: 0; }
.more:hover { color: var(--ink); }
.page.wide { max-width: 1400px; }
.mapview, .archview { display: grid; gap: 22px; }
.mapbar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.mapbar h2 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 20px; }
.mapbar p { margin: 4px 0 0; color: var(--soft); }
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px 14px; align-items: start; }
.bcol { display: grid; gap: 8px; min-width: 0; }
.bcol h3 { margin: 0 0 4px; background: var(--col-bg); color: var(--col-ink); font-family: var(--font-display); font-weight: 500; font-size: 14.5px; padding: 11px 14px; border-radius: 10px;
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.bcol h3 small { font-family: var(--font-body); font-size: 12px; opacity: .7; font-variant-numeric: tabular-nums; }
.core { background: var(--core-bg); color: var(--core-ink); border: 1px solid var(--core-line); border-radius: 14px; padding: 18px 20px; display: grid; gap: 14px; }
.core h3 { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 16px; }
.core-sum { margin: 0; font-size: 16px; line-height: 1.45; max-width: 80ch; }
.core-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.core-item { background: var(--core-soft); border: 1px solid var(--core-line); border-radius: 8px; padding: 9px 12px; display: grid; gap: 2px; }
.core-item b { font-weight: 600; font-size: 14.5px; }
.core-item span { font-size: 13px; opacity: .85; }
.core-rules { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.core-rules li { border: 1px solid var(--core-line); border-radius: 999px; padding: 5px 12px; font-size: 13.5px; font-weight: 500; }
.base { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: grid; gap: 12px; align-content: start; }
.base h3 { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 14px; background: var(--bg); }
.chips span em { font-style: normal; color: var(--muted); }
.two { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.fine { margin: 0; color: var(--muted); font-size: 12.5px; }

/* архитектура */
.summary { margin: 0; font-size: 18px; line-height: 1.5; max-width: 80ch; }
.layers { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 26px; }
.layer { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 10px; align-content: start; }
.layer:not(:last-child)::after { content: "→"; position: absolute; right: -22px; top: 14px; width: 18px; text-align: center; color: var(--muted); font-size: 18px; }
.layer h3 { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 14px; }
.layer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.layer li { display: grid; gap: 1px; padding-top: 8px; border-top: 1px solid var(--line); }
.layer li b { font-weight: 600; font-size: 14px; }
.layer li span, .none { font-size: 12.5px; color: var(--muted); }
.gaps { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.gaps li { display: flex; gap: 10px; align-items: baseline; }
.gaps i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.gaps li.warn i { background: var(--warn); }
.stage { background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 26px 22px; display: grid; gap: 10px; max-width: 720px; }
.stage h3 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.stage p { margin: 0; color: var(--soft); }
h1.plain { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 24px; }

/* техника */
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 13.5px; color: var(--soft); }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 720px; }
table.t th { text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--raised); position: sticky; top: 0; }
table.t td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
table.t td.prod { white-space: nowrap; }
table.t td.prod span { display: inline-flex; align-items: center; gap: 8px; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: sticky; top: 0; z-index: 5; height: auto; flex-direction: row; align-items: center; gap: 8px; overflow-x: auto; overflow-y: hidden;
    padding: calc(8px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px));
    border-right: 0; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .brand { padding: 0; } .brand small { display: none; }
  .nav { display: flex; gap: 2px; } .nav .grp { display: none; }
  .nav a { white-space: nowrap; }
  .side-foot { margin: 0 0 0 auto; border: 0; padding: 0; white-space: nowrap; }
  .side-foot #whoami { display: none; }
  .main { padding: 20px max(16px, env(safe-area-inset-right, 0px)) 48px max(16px, env(safe-area-inset-left, 0px)); }
  .stamp { text-align: left; margin-left: 0; }
  .two { grid-template-columns: minmax(0, 1fr); }
  .head h1 { flex-wrap: wrap; }
}
@media (max-width: 1100px) {
  .layers { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .layer:not(:last-child)::after { content: "↓"; right: auto; left: 50%; top: auto; bottom: -26px; margin-left: -9px; }
}
@media (prefers-reduced-motion: reduce) { .pcard { transition: none; } .pcard:hover { transform: none; } }
