/* Тилво для уроков — общие стили всех экранов: цвета, шрифты, базовые элементы.
   Источник — макет .autopilot/…/mockup.html. Подключение: <link rel="stylesheet" href="/static/shared/styles.css">
   Раскладку конкретного экрана держит его собственный файл стилей; здесь — только общее.
   Шрифты лежат у нас (web/shared/fonts): браузер ходит только на наш сервер. */

/* ---------- шрифты: Golos Text — текст, Literata — заголовки и реплики ---------- */
@font-face{font-family:"Golos Text";font-style:normal;font-weight:400 600;font-display:swap;src:url("fonts/GolosText-cyrillic.woff2") format("woff2");unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116}
@font-face{font-family:"Golos Text";font-style:normal;font-weight:400 600;font-display:swap;src:url("fonts/GolosText-latin.woff2") format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:"Literata";font-style:normal;font-weight:400 600;font-display:swap;src:url("fonts/Literata-cyrillic.woff2") format("woff2");unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116}
@font-face{font-family:"Literata";font-style:normal;font-weight:400 600;font-display:swap;src:url("fonts/Literata-latin.woff2") format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:"Literata";font-style:italic;font-weight:400 600;font-display:swap;src:url("fonts/Literata-Italic-cyrillic.woff2") format("woff2");unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116}
@font-face{font-family:"Literata";font-style:italic;font-weight:400 600;font-display:swap;src:url("fonts/Literata-Italic-latin.woff2") format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}

/* ---------- цвета, радиусы, шрифты ---------- */
:root{
  --bg:#F6F3EC; --surface:#FFFFFF; --surface-2:#EEE9DF; --ink:#1E2320; --muted:#666B64; --line:#DDD7CA;
  --accent:#1F5C4D; --accent-hover:#17483C; --accent-ink:#FFFFFF; --highlight:#E3B55B; --danger:#A8432A;
  --r-lg:20px; --r-md:14px; --r-sm:10px;
  --accent-soft:#E2EBE6; --highlight-deep:#A9792B; --highlight-soft:#F7EACB;
  --warm-1:#FFF7E7; --warm-2:#F4E3C4; --warm-3:#EAD3AD; --kid-bg:#F4ECDD;
  --ink-2:#3c423e; --line-strong:#c9c2b2;
  --f-text:"Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-head:"Literata", Georgia, "Times New Roman", serif;
  color-scheme:light;
}

/* ---------- основа ---------- */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{
  margin:0; min-height:100vh; min-height:100dvh; color:var(--ink); font:16px/1.5 var(--f-text);
  background-color:var(--bg);
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .12  0 0 0 0 .13  0 0 0 0 .12  0 0 0 .06 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  -webkit-font-smoothing:antialiased;
}
a{color:inherit}
button,input,select,textarea{font:inherit;color:inherit}
button{-webkit-tap-highlight-color:transparent}
img,svg{max-width:100%}
[hidden]{display:none !important}
:focus-visible{outline:3px solid rgba(31,92,77,.45);outline-offset:2px}
.ic{width:24px;height:24px;flex:none}

/* ---------- текст ---------- */
h1,h2,h3{font-family:var(--f-head);font-weight:600;letter-spacing:-.012em;margin:0}
.mh2{font:600 29px/1.14 var(--f-head);letter-spacing:-.012em;margin:6px 0 24px}
.mh2 .mut{color:var(--muted);font-weight:450}
.kh{font:600 27px/1.15 var(--f-head);margin:20px 0 8px;letter-spacing:-.01em}
.kp{font-size:17px;line-height:1.45;margin:0 0 8px}
.lead{font-size:17px;line-height:1.5;margin:0}
.small{font-size:14px;color:var(--muted);margin:12px 0 0;text-align:center}
.muted{color:var(--muted)}
.mt-auto{margin-top:auto}
.label-caps{font:600 13px/1 var(--f-text);text-transform:uppercase;letter-spacing:.08em;color:var(--muted)}

/* ---------- экран телефона: общий каркас страниц мамы ---------- */
.page{max-width:480px;min-height:100vh;min-height:100dvh;margin:0 auto;display:flex;flex-direction:column;
  padding-bottom:env(safe-area-inset-bottom)}
.mtop{flex:none;display:flex;align-items:center;justify-content:space-between;min-height:52px;padding:0 14px}
.mbody{flex:1;display:flex;flex-direction:column;padding:6px 22px 34px}
.brand{display:flex;align-items:center;gap:10px;font:600 17px/1 var(--f-head)}
.bmark{width:36px;height:36px;border-radius:50%;overflow:hidden;background:var(--warm-2);flex:none}
.bmark svg{width:100%;height:100%}

/* ---------- кнопки ---------- */
.btn{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:56px;padding:0 20px;border-radius:var(--r-md);border:0;
  font:600 17px/1.2 var(--f-text);text-decoration:none;cursor:pointer;transition:background .2s,transform .1s;text-align:center}
.btn:active{transform:scale(.985)}
.btn:disabled,.btn[aria-disabled="true"]{opacity:.5;cursor:default;transform:none}
.btn-primary{background:var(--accent);color:var(--accent-ink)}
.btn-primary:hover{background:var(--accent-hover)}
.btn-ghost{background:var(--surface);color:var(--ink);box-shadow:inset 0 0 0 1.5px var(--line)}
.btn-ghost:hover{box-shadow:inset 0 0 0 1.5px var(--line-strong)}
.btn-ya{background:#000;color:#fff;border-radius:12px}
.btn-ya .ya{width:30px;height:30px;border-radius:50%;background:#fff;color:#000;display:grid;place-items:center;font:700 17px/1 var(--f-text)}
.btn-kid{min-height:64px;font-size:19px;border-radius:18px;padding:0 14px}
.btn-xl{min-height:78px;font:600 27px/1 var(--f-head);border-radius:24px;letter-spacing:-.005em}
.btn-xl .ic{width:26px;height:26px}
.linkbtn{background:none;border:0;padding:8px 0;color:var(--accent);font-weight:600;font-size:15.5px;cursor:pointer;text-decoration:none}
.iconbtn{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;color:var(--ink);text-decoration:none;background:transparent;border:0;cursor:pointer}
.iconbtn:hover{background:var(--surface-2)}
.pill{display:flex;align-items:center;justify-content:center;gap:10px;min-height:56px;border-radius:18px;border:0;cursor:pointer;
  background:rgba(255,255,255,.75);box-shadow:inset 0 0 0 1.5px var(--line);font:600 17px/1 var(--f-text)}
.pill .ic{color:var(--accent)}
.pill[aria-pressed="true"]{box-shadow:inset 0 0 0 2px var(--accent)}

/* ---------- поля, выбор ---------- */
.field{display:block;margin-bottom:26px}
.field>.lbl{display:block;font-size:15px;color:var(--muted);font-weight:500;margin-bottom:9px}
.field input,.field textarea{width:100%;min-height:58px;border-radius:var(--r-md);border:1.5px solid var(--line);background:var(--surface);padding:0 16px;
  font:500 19px var(--f-text);color:var(--ink);outline:none}
.field textarea{padding:14px 16px;line-height:1.4;resize:vertical}
.field input:focus,.field textarea:focus{border-color:var(--accent);box-shadow:0 0 0 4px rgba(31,92,77,.12)}
.chips{display:flex;gap:10px;flex-wrap:wrap}
.chip{min-height:52px;padding:0 16px;border-radius:12px;border:1.5px solid var(--line);background:var(--surface);
  font:500 16px/1.2 var(--f-text);color:var(--ink);cursor:pointer;transition:background .15s,border-color .15s}
.chip:hover{border-color:#c6bfaf}
.chip[aria-pressed="true"]{background:var(--accent);border-color:var(--accent);color:#fff}
.chips.grade .chip{width:66px;height:66px;padding:0;font:600 24px/1 var(--f-head)}
.check{position:relative;display:flex;align-items:center;gap:14px;min-height:58px;padding:0 16px;margin-bottom:10px;border-radius:var(--r-md);
  background:var(--surface);border:1.5px solid var(--line);font:500 17px/1.2 var(--f-text);cursor:pointer}
.check input{position:absolute;opacity:0;pointer-events:none}
.check .box{width:26px;height:26px;border-radius:8px;border:2px solid #cfc8b8;display:grid;place-items:center;color:transparent;flex:none;transition:.15s}
.check .box .ic{width:18px;height:18px}
.check input:checked + .box{background:var(--accent);border-color:var(--accent);color:#fff}
.check:has(input:checked){border-color:rgba(31,92,77,.45);background:#F8FBF9}

/* ---------- карточки, списки, раскрывашки ---------- */
.card{background:var(--surface);border-radius:var(--r-lg);border:1px solid var(--line);padding:18px}
.blk{margin-bottom:22px}
.blk h3{font:600 13px/1 var(--f-text);text-transform:uppercase;letter-spacing:.08em;color:var(--muted);margin:0 0 12px}
.together{background:var(--highlight-soft);border-radius:var(--r-lg);padding:16px;font-size:16px;line-height:1.45}
details{margin-top:10px;border-radius:12px;background:var(--bg);border:1px solid var(--line)}
details summary{list-style:none;cursor:pointer;min-height:48px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 14px;font-weight:500;font-size:15px}
details summary::-webkit-details-marker{display:none}
details summary::after{content:"";width:9px;height:9px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(45deg) translateY(-3px);transition:transform .2s;flex:none}
details[open] summary::after{transform:rotate(-135deg) translateY(-2px)}

/* ---------- таблица (страница Андрея) ---------- */
.tbl-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:var(--r-md);background:var(--surface)}
table{border-collapse:collapse;width:100%;font-size:14.5px;font-variant-numeric:tabular-nums}
th{text-align:left;font-weight:600;font-size:13px;line-height:1.25;color:var(--muted);padding:11px 12px;background:var(--bg);border-bottom:1px solid var(--line);vertical-align:bottom}
td{padding:13px 12px;border-bottom:1px solid var(--line)}
tr:last-child td{border-bottom:0}
td.num,th.num{text-align:right}

/* ---------- состояние: говорит, слушает, думает, ждём ---------- */
.status{display:inline-flex;align-items:center;gap:9px;white-space:nowrap;padding:9px 16px 9px 13px;border-radius:999px;
  background:rgba(255,255,255,.92);font:600 15.5px/1 var(--f-text);box-shadow:0 6px 18px -8px rgba(30,35,32,.35)}
.status .ic{width:18px;height:18px;color:var(--accent)}
.eq{display:inline-flex;gap:2.5px;align-items:center;height:16px}
.eq i{width:3px;height:6px;border-radius:2px;background:var(--accent);animation:eq 1s ease-in-out infinite}
.eq i:nth-child(2){animation-delay:-.35s}.eq i:nth-child(3){animation-delay:-.7s}.eq i:nth-child(4){animation-delay:-.2s}
@keyframes eq{0%,100%{height:5px}50%{height:16px}}
.dot{width:10px;height:10px;border-radius:50%;background:var(--accent)}
.dot.calm{background:#9DB5AC}
.dot.live{animation:live 1.4s ease-in-out infinite}
@keyframes live{0%,100%{box-shadow:0 0 0 0 rgba(31,92,77,.45)}50%{box-shadow:0 0 0 6px rgba(31,92,77,0)}}
.dots{display:inline-flex;gap:4px}
.dots i{width:6px;height:6px;border-radius:50%;background:var(--accent);animation:dots 1.2s ease-in-out infinite}
.dots i:nth-child(2){animation-delay:.2s}.dots i:nth-child(3){animation-delay:.4s}
@keyframes dots{0%,100%{opacity:.25;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}
.spin{width:44px;height:44px;border-radius:50%;border:4px solid rgba(31,92,77,.18);border-top-color:var(--accent);animation:spin 1s linear infinite;margin:26px auto 0}
@keyframes spin{to{transform:rotate(360deg)}}
/* «что-то не сходится»: мягкое выделение, ошибки красным не красим */
.soft-mark{background:var(--highlight-soft);box-shadow:inset 0 0 0 1.5px var(--highlight);border-radius:var(--r-sm)}

@media (prefers-reduced-motion:reduce){
  .eq i,.dot.live,.dots i,.spin{animation:none}
  .btn{transition:none}
}
