/* The site's style (docs/tasks/64-site/mockup.html): one ice accent on a near-black navy,
   everything else grayscale. This file holds the dark palette; light.css, which the page
   links by the visitor's theme or by the system's setting, overrides it. No inline
   styles and no scripts anywhere: the page's CSP is default-src 'self'. */
:root {
  --bg: #0a0f1a;
  --surface: #101726;
  --surface-2: #151e30;
  --line: #1f2a3f;
  --line-strong: #2c3a55;
  --text: #e8eef7;
  --muted: #8593aa;
  --faint: #56637a;
  --accent: #9cd8ff;
  --accent-ink: #06121f;
  --danger: #ff8a8a;
  --glow: rgba(156, 216, 255, .06);
  --noise-opacity: .06;
  --noise-filter: none;
  --radius: 10px;
  --radius-sm: 6px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "PT Sans", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg) radial-gradient(ellipse at 50% 0%, var(--glow), transparent 60%) no-repeat;
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
/* A faint grain over the background; the picture of the sign-in screen has none. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("noise.svg");
  opacity: var(--noise-opacity);
  filter: var(--noise-filter);
  pointer-events: none;
  z-index: 0;
}
body.picture::before { display: none; }
.screen { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }

.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: square; stroke-linejoin: miter; }
.icon.lg { width: 28px; height: 28px; stroke-width: 1.25; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* The sign-in screen: the photo behind a dimmed, translucent card. */
.screen.picture { background: #05080f url("frost.jpg") center 45% / cover no-repeat; }
.screen.picture::before { content: ""; position: absolute; inset: 0; background: rgba(5, 8, 15, .5); }
.screen.picture .auth { position: relative; }
.screen.picture .card { background: rgba(10, 15, 26, .78); border: 1px solid rgba(156, 216, 255, .14); border-radius: var(--radius); padding: 28px 24px 22px; backdrop-filter: blur(6px); color: #e8eef7; }
.screen.picture .card .input { background: rgba(16, 23, 38, .9); border-color: #2c3a55; color: #56637a; }
.screen.picture .card .input input { color: #e8eef7; }
.screen.picture .card .field label { color: #8593aa; }
.screen.picture .card .btn.primary { background: #9cd8ff; color: #06121f; }
.screen.picture .card a { color: #9cd8ff; }
.screen.picture .alert { color: #b7c3d6; border-color: #2c3a55; border-left-color: #9cd8ff; }
.screen.picture .alert .icon { color: #9cd8ff; }
.screen.picture .lang a { color: #8593aa; }
.screen.picture .lang a.on { color: #e8eef7; }

.auth { flex: 1; display: grid; place-items: center; padding: 40px 20px; }
.card { width: 100%; max-width: 340px; }
.card.plain { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px 22px; }
.card h3 { margin: 0 0 20px; text-align: center; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.logo-head { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 600; font-size: 16px; letter-spacing: 0.02em; margin-bottom: 24px; }
.mark { width: 26px; height: 26px; border: 1.5px solid var(--accent); border-radius: 5px; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--accent); letter-spacing: 0.02em; }
.screen.picture .mark { border-color: #9cd8ff; color: #9cd8ff; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.input { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); color: var(--faint); }
.input:focus-within { border-color: var(--accent); }
.input input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; }
.input input::placeholder { color: var(--faint); }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { text-decoration: none; }
.btn.primary { width: 100%; background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: none; border-color: var(--line-strong); color: var(--text); }
.links { display: flex; justify-content: space-between; margin-top: 18px; font-size: 13px; }
.alert { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); border: 1px solid var(--line-strong); border-left: 2px solid var(--accent); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 16px; }
.alert .icon { margin-top: 1px; color: var(--accent); }
.state { text-align: center; }
.state .badge { width: 56px; height: 56px; margin: 0 auto 20px; border: 1px solid var(--line-strong); border-radius: 50%; display: grid; place-items: center; color: var(--accent); }
.screen.picture .state p { color: #b7c3d6; }
.state h3 { margin-bottom: 8px; }
.state p { color: var(--muted); margin: 0 0 20px; }
.lang { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 20px; font-size: 12px; color: var(--faint); }
.lang .icon { width: 14px; height: 14px; }
.lang a { color: var(--faint); }
.lang a.on { color: var(--text); }
.lang .icon-btn { width: 26px; height: 26px; margin-left: 4px; }
.lang .icon-btn .icon { width: 16px; height: 16px; }

/* The bar of the pages after the sign-in. */
.topbar { display: flex; align-items: center; gap: 20px; padding: 0 20px; height: 52px; border-bottom: 1px solid var(--line); background: var(--surface); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: 0.01em; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: var(--radius-sm); color: var(--muted); }
.nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav a.on { color: var(--text); background: var(--surface-2); }
.spacer { flex: 1; }
.who { color: var(--muted); font-size: 13px; }
.topbar form { margin: 0; }
.icon-btn { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-sm); color: var(--muted); border: 1px solid transparent; background: none; cursor: pointer; }
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); text-decoration: none; }

.page { flex: 1; padding: 28px 28px 32px; }
.page h3 { margin: 0 0 4px; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.page .sub { margin: 0 0 24px; color: var(--muted); }
.rows { max-width: 560px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 900px; }
.two form { max-width: 360px; }
.rows + form { margin-top: 24px; }
.block-title { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); margin: 0 0 10px; }
.row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface); }
.row:first-child { border-top: 0; }
.row .k { width: 140px; color: var(--muted); font-size: 13px; }
.row .v { flex: 1; }
.nf { flex: 1; display: grid; place-items: center; text-align: center; padding: 40px; }
.nf .code { font: 600 56px/1 ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: -0.04em; color: var(--line-strong); }
.nf p { color: var(--muted); margin: 12px 0 20px; }

@media (max-width: 720px) {
  .two { grid-template-columns: 1fr; }
  .nav a span { display: none; }
  .page { padding: 20px 16px; }
  .row .k { width: 110px; }
  .who { display: none; }
}

/* Form hints, errors and the gate's state cards (registration, activation). */
.hint { font-size: 12px; color: var(--faint); margin-top: 6px; }
.hint.err { color: var(--danger); }
.input.err { border-color: var(--danger); }
.state { text-align: center; }
.state .badge { width: 56px; height: 56px; margin: 0 auto 20px; border: 1px solid var(--line-strong); border-radius: 50%; display: grid; place-items: center; color: var(--accent); }
.state h3 { margin-bottom: 8px; }
.state p { color: var(--muted); margin: 0 0 20px; }
.state b { color: var(--text); font-weight: 500; }
.state form { margin: 0; }
.screen.picture .state .badge { border-color: #2c3a55; color: #9cd8ff; }
.screen.picture .state p { color: #b7c3d6; }
.screen.picture .state b { color: #e8eef7; }
.screen.picture .hint { color: #8593aa; }
.screen.picture .hint.err { color: var(--danger); }
/* The bait of the forms that send mail: out of the page, so that a person never fills it. */
.bait { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* The «Доступ» page: the users' table and its boxes. */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
th, td { text-align: left; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 13px; }
th { color: var(--faint); font-weight: 500; font-size: 12px; border-top: 0; background: var(--surface-2); }
td.muted { color: var(--muted); }
td.c, th.c { text-align: center; width: 90px; }
.tick { position: relative; display: inline-block; width: 18px; height: 18px; vertical-align: middle; }
.tick input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tick input:disabled { cursor: not-allowed; }
.tick .box { display: grid; place-items: center; width: 18px; height: 18px; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--accent-ink); }
.tick .box .icon { display: none; width: 12px; height: 12px; stroke-width: 2.25; }
.tick input:checked + .box { background: var(--accent); border-color: var(--accent); }
.tick input:checked + .box .icon { display: block; }
.tick input:disabled + .box { opacity: .55; }
.tick input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }
.actions { margin-top: 16px; }
.btn.primary.fit { width: auto; }
.page .alert { max-width: 560px; margin-bottom: 16px; }

/* The KB: the reference's tabs, filters and cards (docs/tasks/64-site/mockup.html). */
.ksearch { margin-bottom: 16px; }
.ktabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.ktab { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 8px 12px; color: var(--muted); font: inherit; cursor: pointer; display: inline-flex; gap: 6px; align-items: baseline; }
.ktab span { font: 11px ui-monospace, "SFMono-Regular", Consolas, monospace; color: var(--faint); }
.ktab:hover { color: var(--text); }
.ktab.on { color: var(--text); border-bottom-color: var(--accent); }
.kfilters { display: grid; gap: 8px; margin-bottom: 14px; }
.krow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.krow:empty { display: none; }
.kcap { min-width: 96px; font-size: 12px; color: var(--faint); }
.kchip { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-strong); background: none; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.kchip:hover { color: var(--text); }
.kchip.on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.kchip img { width: 18px; height: 18px; object-fit: contain; }
.kintro { color: var(--muted); font-size: 13px; margin: 0 0 10px; overflow-wrap: anywhere; }
.krules { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); padding: 10px 14px; margin-bottom: 12px; font-size: 13px; }
.krules summary { cursor: pointer; font-weight: 500; }
.krules ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); }
.kcount { font-size: 12px; color: var(--faint); margin: 0 0 10px; }
.kgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.kcard { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 12px; align-content: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; cursor: pointer; }
.kcard:hover { border-color: var(--line-strong); }
.kcard:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.kpic { width: 54px; height: 54px; display: flex; align-items: center; justify-content: center; }
.kpic img { max-width: 54px; max-height: 54px; object-fit: contain; }
.kpic img.small, .kgallery img.small { width: 32px; height: 32px; image-rendering: pixelated; }
.kpic.empty { background: var(--surface-2); border-radius: var(--radius-sm); color: var(--faint); font-size: 11px; text-align: center; }
.kname { font-weight: 600; overflow-wrap: anywhere; }
.kmeta { font-size: 12px; color: var(--faint); margin-bottom: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.ktag { background: var(--surface-2); border-radius: var(--radius-sm); padding: 0 6px; }
.kbody p { margin: 0 0 8px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.kcard code, .krules code, .kintro code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; font-size: 12px; word-break: break-word; }
.kmore { display: none; grid-column: 1 / -1; border-top: 1px dashed var(--line); padding-top: 10px; font-size: 13px; color: var(--muted); }
.kcard.open .kmore { display: block; }
.kmore div { margin-bottom: 4px; overflow-wrap: anywhere; }
.klabel { color: var(--faint); }
.kgallery { display: flex; flex-wrap: wrap; gap: 6px; }
.kgallery img { height: 32px; }
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--faint); }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; background: var(--faint); }
.dot.done { background: var(--accent); }
.dot.guess { background: #d9b26a; }
.dot.partial { background: transparent; border: 1.5px solid var(--accent); }
.dot.missing { background: var(--danger); }
.dot.deferred { background: transparent; border: 1.5px solid var(--faint); }
@media (max-width: 720px) {
  .kgrid { grid-template-columns: 1fr; }
  .ktab { padding: 6px 9px; }
}
