/* Auyl Bilim Talks — чек-лист подготовки.
   Дизайн-система проекта Aul Bilim: «Steppe Sunrise» (Raleway/Inter, синий + солнечный, кремовый фон). */

:root {
  --primary: #1b4f8a;
  --primary-dark: #143a6e;
  --primary-light: #2d6ab4;
  --accent: #f2a413;
  --accent-deep: #e8820a;
  --accent-soft: #ffd27a;
  --cream: #fbf5e9;
  --cream-deep: #f4e8d2;
  --ink: #21232e;
  --body: #4a4a5e;
  --muted: #8a8a9c;
  --surface: #ffffff;
  --line: rgba(180, 140, 60, .22);
  --line-soft: rgba(180, 140, 60, .12);
  --grass: #2f8f63;
  --fh: 'Raleway', sans-serif;
  --fb: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(33, 35, 46, .04), 0 14px 34px -18px rgba(20, 58, 110, .28);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--fb);
  background: var(--cream);
  color: var(--body);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--fh); color: var(--ink); line-height: 1.1; font-weight: 800; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
code { font-size: .92em; background: var(--cream-deep); padding: 1px 5px; border-radius: 5px; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 28px; }
main.wrap { padding-bottom: 90px; }

/* зернистость фона — как на сайте проекта */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: .4;
  background-image: radial-gradient(circle at 1px 1px, rgba(180, 140, 60, .10) 1px, transparent 0);
  background-size: 22px 22px;
}

/* ---------- Верхняя панель ---------- */
nav.bar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 245, 233, .88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.bar-in { display: flex; align-items: center; gap: 18px; min-height: 78px; }
.brand { flex: none; display: flex; align-items: center; }
.brand__logo { height: 46px; width: auto; }
.bar__title { flex: 1; min-width: 0; line-height: 1.25; padding-left: 18px; border-left: 1px solid var(--line); }
.bar__title b { display: block; font-family: var(--fh); font-weight: 900; font-size: 16px; color: var(--ink); letter-spacing: -.01em; }
.bar__title span { font-size: 12px; color: var(--muted); }
.bar__right { flex: none; display: flex; align-items: center; gap: 10px; }
.bar__count { font-family: var(--fh); font-weight: 800; font-size: 13px; color: var(--primary); }

.chip {
  font-family: var(--fh); font-weight: 800; font-size: 12.5px;
  background: var(--accent); color: var(--ink);
  padding: 7px 15px; border-radius: 100px; white-space: nowrap;
  box-shadow: 0 10px 22px -12px rgba(242, 164, 19, .9);
}
.chip--calm { background: rgba(27, 79, 138, .08); color: var(--primary); box-shadow: none; }

/* ---------- Hero ---------- */
.hero { position: relative; z-index: 2; overflow: hidden; background: var(--primary-dark); }
.hero__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .95; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to bottom,
    rgba(10, 30, 65, .30) 0%, rgba(14, 42, 82, .55) 45%,
    rgba(14, 42, 82, .88) 78%, rgba(10, 30, 65, .98) 100%);
}
.hero__in { position: relative; z-index: 2; padding: 74px 0 0; }
.hero__kicker {
  font-family: var(--fh); font-weight: 800; font-size: 13px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent-soft); margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 900; letter-spacing: -.03em;
  color: #fff; margin-bottom: 16px; text-wrap: balance;
  text-shadow: 0 2px 16px rgba(10, 30, 65, .55);
}
.hero__sub { color: rgba(255, 255, 255, .82); max-width: 62ch; font-size: 15.5px; margin-bottom: 22px; }
.hero__sub b { color: #fff; font-weight: 600; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 9px; padding-bottom: 34px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255, 255, 255, .10); border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 100px; padding: 7px 15px; font-size: 13px; color: #eaf1f7;
}
.pill a { border-bottom: 1px solid rgba(255, 255, 255, .4); }
.pill--sun { background: rgba(242, 164, 19, .22); border-color: rgba(255, 210, 122, .5); color: #ffd27a; font-weight: 600; }

/* полоса цифр проекта */
.stat-strip { position: relative; z-index: 2; border-top: 1px solid rgba(255, 255, 255, .14); background: rgba(10, 30, 65, .35); }
.stat-strip__in { display: flex; }
.stat-strip .ss { flex: 1; padding: 20px 22px 52px; border-right: 1px solid rgba(255, 255, 255, .12); }
.stat-strip .ss:first-child { padding-left: 0; }
.stat-strip .ss:last-child { border-right: 0; }
.stat-strip .n { font-family: var(--fh); font-weight: 900; font-size: 30px; color: var(--accent-soft); line-height: 1; }
.stat-strip .l { font-size: 12.5px; color: rgba(255, 255, 255, .62); margin-top: 4px; }

/* ---------- Готовность ---------- */
.summary {
  position: relative; z-index: 2; margin: -34px 0 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px 24px;
}
.summary__top { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.summary__title { font-family: var(--fh); font-weight: 800; font-size: 17px; color: var(--ink); }
.summary__num { font-size: 13px; color: var(--muted); }
.summary__num b { color: var(--ink); font-family: var(--fh); font-weight: 900; font-size: 19px; }
.summary__num b.hot { color: var(--accent-deep); }
.bar-progress { height: 10px; background: var(--cream-deep); border-radius: 100px; overflow: hidden; margin-top: 14px; }
.bar-progress > i { display: block; height: 100%; width: 0; border-radius: 100px; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .35s ease; }

/* ---------- Панель управления ---------- */
.toolbar { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.btn {
  font: inherit; font-family: var(--fh); font-weight: 700; font-size: 13px; cursor: pointer;
  background: var(--surface); color: var(--primary);
  border: 1px solid rgba(27, 79, 138, .18); border-radius: 100px; padding: 8px 16px;
  transition: background .18s, color .18s, transform .18s, border-color .18s;
}
.btn:hover { background: rgba(27, 79, 138, .07); transform: translateY(-1px); }
.btn.is-on { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn--ghost { background: transparent; color: var(--muted); border-color: var(--line); }
.btn--ghost:hover { color: var(--accent-deep); border-color: var(--accent); background: transparent; }
.field {
  font: inherit; font-size: 13px; padding: 8px 16px; min-width: 260px;
  border: 1px solid var(--line); border-radius: 100px; background: var(--surface); color: var(--ink); outline: none;
}
.field:focus { border-color: var(--primary); }

/* ---------- Заголовки блоков ---------- */
.kicker, .block h2, .deadlines h2 {
  font-family: var(--fh); font-weight: 800; font-size: 13px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent-deep); margin: 0 0 14px;
}

/* ---------- Дедлайны ---------- */
.deadlines { position: relative; z-index: 2; margin-bottom: 32px; }
.dl-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 9px; }
.dl {
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 12px; padding: 11px 14px; font-size: 13px; display: flex; gap: 11px;
}
.dl b { font-family: var(--fh); font-weight: 900; color: var(--accent-deep); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dl--final { border-left-color: var(--accent-soft); background: var(--primary-dark); color: #fff; border-color: var(--primary-dark); }
.dl--final b { color: var(--accent-soft); }

/* ---------- Этапы ---------- */
.stage {
  position: relative; z-index: 2;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 14px; overflow: hidden;
}
.stage__head { display: flex; align-items: center; gap: 16px; padding: 18px 22px; cursor: pointer; user-select: none; }
.stage__head:hover { background: rgba(251, 245, 233, .7); }
.stage__num {
  flex: none; width: 38px; height: 38px; border-radius: 100px;
  background: rgba(27, 79, 138, .09); color: var(--primary);
  display: grid; place-items: center; font-family: var(--fh); font-weight: 900; font-size: 15px;
}
.stage.is-done .stage__num { background: rgba(47, 143, 99, .12); color: var(--grass); }
.stage__main { flex: 1; min-width: 0; }
.stage__title { font-family: var(--fh); font-weight: 800; font-size: 17px; color: var(--ink); letter-spacing: -.01em; }
.stage__window { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.stage__count { font-family: var(--fh); font-weight: 800; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.stage__cmt { font-size: 12.5px; color: var(--primary); white-space: nowrap; }
.stage__chev { flex: none; color: var(--muted); transition: transform .2s ease; font-size: 11px; }
.stage.is-open .stage__chev { transform: rotate(90deg); }
.stage__body { display: none; padding: 0 22px 12px; }
.stage.is-open .stage__body { display: block; }
.stage__goal {
  font-size: 13.5px; color: var(--ink); background: var(--cream);
  border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px 15px; margin-bottom: 14px;
}
.stage__goal b { font-family: var(--fh); font-weight: 800; color: var(--primary); }

/* ---------- Пункты ---------- */
.item { display: flex; gap: 13px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.item:first-child { border-top: 0; }
.item__box {
  flex: none; width: 21px; height: 21px; margin-top: 2px; border-radius: 7px;
  border: 1.5px solid rgba(27, 79, 138, .28); background: #fff; cursor: pointer;
  display: grid; place-items: center; transition: all .15s ease;
}
.item__box:hover { border-color: var(--primary); background: rgba(27, 79, 138, .05); }
.item__box svg { width: 12px; height: 12px; opacity: 0; }
.item.is-done .item__box { background: var(--grass); border-color: var(--grass); }
.item.is-done .item__box svg { opacity: 1; }
.item__main { flex: 1; min-width: 0; }
.item__text { font-size: 14.5px; line-height: 1.5; color: var(--ink); cursor: pointer; }
.item.is-done .item__text { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(138, 138, 156, .5); }
.item__note { font-size: 13px; color: var(--body); margin-top: 6px; padding-left: 12px; border-left: 2px solid var(--cream-deep); }
.item__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag {
  font-family: var(--fh); font-weight: 700; font-size: 11px; padding: 3px 10px; border-radius: 100px;
  background: rgba(27, 79, 138, .07); color: var(--primary); white-space: nowrap;
}
.tag--due { background: rgba(242, 164, 19, .16); color: #9a5f08; font-variant-numeric: tabular-nums; }
.tag--crit { background: rgba(216, 62, 45, .10); color: #b3261e; }
.tag--cmt { background: rgba(47, 143, 99, .12); color: var(--grass); }

/* ---------- Комментарии ---------- */
.notes { margin-top: 10px; }
.note {
  background: var(--cream); border: 1px solid var(--line-soft); border-left: 3px solid var(--primary-light);
  border-radius: 12px; padding: 9px 13px; margin-bottom: 7px;
}
.note__meta { display: flex; align-items: center; gap: 9px; font-size: 11.5px; color: var(--muted); }
.note__meta b { font-family: var(--fh); font-weight: 800; color: var(--primary); font-size: 12px; }
.note__del { margin-left: auto; border: 0; background: none; cursor: pointer; color: rgba(138,138,156,.7); font-size: 17px; line-height: 1; padding: 0 2px; }
.note__del:hover { color: #b3261e; }
.note__text { font-size: 13.5px; color: var(--ink); white-space: pre-wrap; margin-top: 3px; }

.note-btn {
  font: inherit; font-family: var(--fh); font-weight: 700; font-size: 12px; cursor: pointer; padding: 4px 12px;
  background: none; border: 1px dashed rgba(27, 79, 138, .3); border-radius: 100px; color: var(--muted);
}
.note-btn:hover { border-style: solid; border-color: var(--primary); color: var(--primary); }
.note-btn--draft { border-style: solid; border-color: var(--accent); background: rgba(242, 164, 19, .12); color: #9a5f08; }

.note-form textarea {
  width: 100%; font: inherit; font-size: 13.5px; color: var(--ink);
  border: 1px solid var(--primary); border-radius: 12px; padding: 10px 13px; resize: vertical;
  min-height: 66px; background: #fff; outline: none;
}
.note-form__row { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.note-form__hint { font-size: 11.5px; color: var(--muted); }
.btn--sm { padding: 6px 14px; font-size: 12.5px; }
.btn--dark { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn--dark:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }

/* ---------- Сводка комментариев ---------- */
.block { position: relative; z-index: 2; margin-top: 40px; }
.digest { display: grid; gap: 10px; }
.digest__item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 18px; box-shadow: var(--shadow); }
.digest__ref { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 9px; }
.digest__ref span { display: block; font-family: var(--fh); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-deep); font-weight: 800; margin-bottom: 4px; }
.digest__note { font-size: 13.5px; color: var(--body); border-left: 2px solid var(--cream-deep); padding-left: 12px; margin-top: 8px; white-space: pre-wrap; }
.digest__note b { font-family: var(--fh); color: var(--primary); }
.digest__note span { color: var(--muted); font-size: 11.5px; }

/* ---------- План Б и роли ---------- */
.table {
  width: 100%; border-collapse: collapse; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.table th {
  text-align: left; font-family: var(--fh); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); font-weight: 800; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--cream);
}
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table td:first-child { font-weight: 600; color: var(--ink); }
.table td:last-child { color: var(--primary); white-space: nowrap; font-family: var(--fh); font-weight: 700; font-size: 12.5px; }

.roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 9px; }
.role { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; font-size: 13px; color: var(--ink); }
.role b { display: block; font-family: var(--fh); font-size: 10.5px; letter-spacing: .1em; color: var(--accent-deep); text-transform: uppercase; }
.role i { font-style: normal; color: var(--muted); font-size: 12px; }

.foot { position: relative; z-index: 2; margin-top: 46px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }

/* ---------- Адаптив ---------- */
@media (max-width: 860px) {
  .stat-strip__in { flex-wrap: wrap; }
  .stat-strip .ss { flex: 1 1 50%; border-bottom: 1px solid rgba(255,255,255,.12); padding-left: 0; }
}
@media (max-width: 620px) {
  .wrap { padding: 0 16px; }
  .bar-in { min-height: 66px; gap: 12px; }
  .brand__logo { height: 34px; }
  .bar__title { padding-left: 12px; }
  .bar__title b { font-size: 14px; }
  .bar__right .chip--calm { display: none; }
  .hero__in { padding-top: 46px; }
  .summary { padding: 16px; }
  .stage__head { padding: 15px 16px; gap: 12px; }
  .stage__body { padding: 0 16px 10px; }
  .stage__count { display: none; }
  .field { min-width: 100%; }
}

/* ---------- Печать ---------- */
@media print {
  body { background: #fff; font-size: 11px; }
  .grain, .toolbar, .stage__chev, .note-btn, .note-form, .note__del, .bar__right { display: none !important; }
  nav.bar { position: static; background: #fff; border-bottom: 2px solid var(--primary); }
  .hero { background: #fff; }
  .hero__photo, .hero::after { display: none; }
  .hero__in { padding: 14px 0 0; }
  .hero h1 { color: var(--ink); font-size: 24px; text-shadow: none; }
  .hero__kicker { color: var(--accent-deep); }
  .hero__sub { color: #333; }
  .pill { background: none; border-color: #bbb; color: #333; }
  .stat-strip { border-top-color: #ccc; }
  .stat-strip .n { color: var(--primary); }
  .stat-strip .l { color: #555; }
  .stat-strip .ss { border-right-color: #ddd; }
  .summary { margin-top: 12px; }
  .stage, .summary, .table, .dl, .digest__item { box-shadow: none; break-inside: avoid; }
  .stage__body { display: block !important; }
  .item, .note { break-inside: avoid; }
  .note { background: #fff; border-left-color: #666; }
  main.wrap { padding-bottom: 0; }
}
