/* AI.COM.BY - дизайн-система.
   Референс: ChatGPT (Refero Styles, 52a007ed). Ахроматика, hairline вместо теней,
   плоские поверхности, радиус 10px, системный шрифт, ничего декоративного. */

:root {
  --ink: #0d0d0d;
  --ink-press: #000000;
  --mid: #5d5d5d;
  --hollow: #8f8f8f;
  --edge: #e6e6e6;
  --hairline: rgba(0, 0, 0, 0.1);
  --veil: rgba(0, 0, 0, 0.05);
  --mist: #f9f9f9;
  --white: #ffffff;
  --scrim: rgba(0, 0, 0, 0.5);
  --r: 10px;
  --gap: 6px;
  --section: 24px;
  --wrap: 1200px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--ink); color: var(--white); }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 720px; }
.wrap.mid { max-width: 900px; }

.muted { color: var(--mid); }
.hollow { color: var(--hollow); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

/* ---------- шапка ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--hairline);
}

.site-head .bar {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.logo .dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--ink);
  display: inline-block;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  padding: 8px 12px;
  border-radius: var(--r);
  font-size: 14px;
  font-weight: 500;
  color: var(--mid);
  transition: background 0.15s ease, color 0.15s ease;
}

.nav a:hover { background: var(--veil); color: var(--ink); }
.nav a.active { color: var(--ink); }

.nav-aside { display: flex; align-items: center; gap: 8px; }

/* ---------- кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: var(--r);
  border: 1px solid transparent;
  background: var(--ink);
  color: var(--white);
  font: 500 14px/1.2 var(--font);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  text-align: center;
}

.btn:hover { background: var(--ink-press); }

.btn.ghost {
  background: transparent;
  border-color: var(--hairline);
  color: var(--ink);
}

.btn.ghost:hover { background: var(--veil); border-color: var(--edge); }

.btn.quiet {
  background: transparent;
  color: var(--mid);
  border-color: transparent;
  padding: 8px 10px;
}

.btn.quiet:hover { background: var(--veil); color: var(--ink); }

.btn.sm { padding: 7px 12px; font-size: 13px; }
.btn.lg { padding: 14px 22px; font-size: 15px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: default; }

/* ---------- поверхности ---------- */

.card {
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  background: var(--white);
  padding: 18px;
}

.card.flat { background: var(--mist); border-color: transparent; }
.card.tight { padding: 14px; }

.hr { height: 1px; background: var(--hairline); border: 0; margin: 0; }

.label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hollow);
}

/* ---------- главная ---------- */

.hero {
  padding: 80px 0 64px;
  border-bottom: 1px solid var(--hairline);
}

.hero h1 {
  font-size: clamp(26px, 3.1vw, 34px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.03em;
  max-width: 26ch;
}

.hero .lede {
  margin-top: 14px;
  font-size: 16px;
  color: var(--mid);
  max-width: 56ch;
}

.hero .ops {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mark {
  font-size: clamp(28px, 4.4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.mark .thin { color: var(--hollow); font-weight: 400; }

/* три палочки */

.sticks { padding: 8px 0 0; }

.stick {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
  padding: 32px 0;
  border-bottom: 1px solid var(--hairline);
  transition: padding 0.2s ease;
}

.stick:first-child { border-top: 1px solid var(--hairline); }

.stick .num {
  font-size: 13px;
  font-weight: 500;
  color: var(--hollow);
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}

.stick h2 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.33;
}

.stick p {
  margin-top: 8px;
  color: var(--mid);
  font-size: 15px;
  max-width: 62ch;
}

.stick .go {
  align-self: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  display: grid;
  place-items: center;
  color: var(--mid);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.stick:hover .go { background: var(--ink); border-color: var(--ink); color: var(--white); }
.stick:hover h2 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* логотипы моделей */

.logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.chipmodel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 9px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  background: var(--white);
}

.chipmodel svg { width: 16px; height: 16px; }

/* ---------- секции ---------- */

.section { padding: 64px 0; border-bottom: 1px solid var(--hairline); }
.section:last-child { border-bottom: 0; }
.section h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.section .sub { margin-top: 8px; color: var(--mid); max-width: 62ch; }

.grid { display: grid; gap: var(--section); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- страница внедрения ---------- */

.pitch {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--hairline);
}

.pitch h1 {
  font-size: clamp(26px, 3.1vw, 34px);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.03em;
  max-width: 24ch;
}

.pitch .lede {
  margin-top: 16px;
  font-size: 17px;
  color: var(--mid);
  max-width: 60ch;
}

.facts {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}

.facts span { display: inline-flex; align-items: center; }
.facts span + span::before {
  content: "";
  width: 1px;
  height: 12px;
  background: var(--edge);
  margin: 0 14px;
}

.pitch .ops { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; }

/* список сотрудников */

.staff { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--section); }

.staff .row {
  padding: 22px 0;
  border-bottom: 1px solid var(--hairline);
}

.staff .row h3 { font-size: 16px; font-weight: 600; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.staff .row h3 .pay { font-size: 13px; font-weight: 500; color: var(--hollow); white-space: nowrap; }
.staff .row p { margin-top: 6px; color: var(--mid); font-size: 14px; }

/* риски */

.risks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.risk {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  font-size: 14px;
  color: var(--ink);
  background: var(--white);
}

.risk .x {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid var(--edge);
  display: grid;
  place-items: center;
  color: var(--hollow);
  font-size: 12px;
  margin-top: 1px;
}

/* ---------- кабинет ---------- */

.dash {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: calc(100vh - 60px);
}

.side {
  border-right: 1px solid var(--hairline);
  padding: 20px 14px;
  background: var(--mist);
}

.side .group { margin-bottom: 18px; }
.side .group .label { padding: 0 10px 8px; }

.side a.item, .side .item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--r);
  font-size: 14px;
  color: var(--mid);
  transition: background 0.15s ease, color 0.15s ease;
}

.side a.item:hover { background: var(--veil); color: var(--ink); }
.side a.item.active { background: var(--white); color: var(--ink); border: 1px solid var(--hairline); padding: 8px 9px; }
.side .item svg { width: 16px; height: 16px; flex: none; }

.main { padding: 28px; position: relative; }

.locked { position: relative; }
.locked .blurred {
  filter: blur(7px) saturate(0.9);
  opacity: 0.55;
  pointer-events: none;
  user-select: none;
  user-selects: none;
}

.locked .veil {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 8vh 16px 40px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.86) 22%, rgba(255, 255, 255, 0.94) 100%);
  overflow: auto;
}

.notice {
  max-width: 560px;
  width: 100%;
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  background: var(--white);
  padding: 24px;
}

.notice h2 { font-size: 20px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.notice p { margin-top: 10px; color: var(--mid); font-size: 14.5px; }
.notice .ops { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }

.chatbox {
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--hollow);
  font-size: 14px;
}

.chatstream { display: grid; gap: 14px; margin-top: 18px; }

.bubble {
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  padding: 14px 16px;
  font-size: 14px;
  max-width: 78%;
  background: var(--white);
}

.bubble.me { margin-left: auto; background: var(--mist); border-color: transparent; }
.bubble .who { font-size: 12px; color: var(--hollow); margin-bottom: 6px; }

.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.kpi { border: 1px solid var(--hairline); border-radius: var(--r); padding: 16px; }
.kpi .n { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi .t { font-size: 13px; color: var(--mid); margin-top: 2px; }

/* ---------- формы ---------- */

.auth {
  min-height: calc(100vh - 60px);
  display: grid;
  place-items: center;
  padding: 56px 24px;
}

.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.auth-card .sub { margin-top: 8px; color: var(--mid); font-size: 14px; }

.field { margin-top: 14px; }
.field label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }

.input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  background: var(--white);
  color: var(--ink);
  font: 400 15px var(--font);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px var(--veil); }
textarea.input { min-height: 220px; resize: vertical; line-height: 1.55; }

.form-note { margin-top: 14px; font-size: 13px; color: var(--mid); }
.alert {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid var(--edge);
  border-radius: var(--r);
  background: var(--mist);
  font-size: 13.5px;
  color: var(--ink);
}

.auth-foot { margin-top: 18px; font-size: 14px; color: var(--mid); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.auth-foot a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }

.seg {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  gap: 2px;
  background: var(--mist);
}

.seg a {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--mid);
}

.seg a.on { background: var(--white); color: var(--ink); border: 1px solid var(--hairline); }

/* ---------- журнал ---------- */

.jhead { padding: 64px 0 32px; border-bottom: 1px solid var(--hairline); }
.jhead h1 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.jhead p { margin-top: 8px; color: var(--mid); max-width: 56ch; }

.jlist { padding: 8px 0 64px; }

.jitem {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 24px;
  gap: 24px;
  align-items: baseline;
  padding: 26px 0;
  border-bottom: 1px solid var(--hairline);
}

.jitem .date { font-size: 13px; color: var(--hollow); font-variant-numeric: tabular-nums; }
.jitem h2 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.jitem p { margin-top: 6px; color: var(--mid); font-size: 14.5px; max-width: 68ch; }
.jitem .arrow { color: var(--hollow); transition: transform 0.15s ease, color 0.15s ease; }
.jitem:hover .arrow { color: var(--ink); transform: translateX(3px); }

.article { padding: 56px 0 80px; }
.article .meta { display: flex; gap: 12px; align-items: center; font-size: 13px; color: var(--hollow); }
.article h1 { margin-top: 16px; font-size: clamp(24px, 2.9vw, 32px); line-height: 1.2; letter-spacing: -0.025em; font-weight: 600; }
.article .lead { margin-top: 14px; font-size: 17px; color: var(--mid); }
.article .body { margin-top: 28px; }
.article .body p { margin-top: 18px; font-size: 16.5px; line-height: 1.65; }
.article .body p:first-child { margin-top: 0; }

.tagpill { display: inline-flex; padding: 3px 9px; border: 1px solid var(--hairline); border-radius: 999px; font-size: 12px; color: var(--mid); }

/* ---------- админка ---------- */

.admin-head { padding: 32px 0 20px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.admin-head h1 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }

.statrow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 16px 0 24px; }

.tablewrap { border: 1px solid var(--hairline); border-radius: var(--r); overflow: hidden; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tbl th {
  text-align: left;
  padding: 10px 14px;
  background: var(--mist);
  border-bottom: 1px solid var(--hairline);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hollow);
  white-space: nowrap;
}
table.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover { background: var(--veil); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font-size: 12px;
  color: var(--mid);
  white-space: nowrap;
}

.pill.on { background: var(--ink); color: var(--white); border-color: var(--ink); }
.pill.off { background: var(--white); }

.inline { display: inline-flex; gap: 6px; align-items: center; }

/* ---------- подвал ---------- */

.foot { border-top: 1px solid var(--hairline); padding: 40px 0 48px; margin-top: 0; }
.foot .row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.foot a { color: var(--mid); font-size: 14px; display: inline-block; padding: 2px 0; }
.foot a:hover { color: var(--ink); }
.foot .col { display: grid; gap: 8px; }
.foot .copy { margin-top: 28px; font-size: 12.5px; color: var(--hollow); }

/* ---------- адаптив ---------- */

@media (max-width: 900px) {
  .grid.three, .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash { grid-template-columns: 1fr; }
  .side { border-right: 0; border-bottom: 1px solid var(--hairline); display: flex; gap: 6px; overflow-x: auto; padding: 10px 14px; }
  .side .group { margin: 0; display: flex; gap: 6px; }
  .side .group .label { display: none; }
  .side a.item { white-space: nowrap; }
  .statrow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .staff { grid-template-columns: 1fr; }
  .risks { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .wrap { padding: 0 18px; }
  .hero { padding: 64px 0 48px; }
  .section { padding: 48px 0; }
  .stick { grid-template-columns: 34px minmax(0, 1fr) 30px; gap: 14px; padding: 24px 0; }
  .grid.two, .grid.three, .grid.four { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr; }
  .jitem { grid-template-columns: 1fr; gap: 8px; }
  .jitem .arrow { display: none; }
  .main { padding: 20px 18px; }
  .nav a { padding: 8px 9px; }
  .nav .hide-sm { display: none; }
  .facts span + span::before { margin: 0 9px; }
  .bubble { max-width: 88%; }
  .article .body p { font-size: 16px; }
  .locked .veil { padding-top: 4vh; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}