/*
 * learn.kezzo.kz — справочник. Палитра и шрифты — как у лендинга kezzo.kz:
 * «тёплая бумага», чернила, фирменный оранжевый. Никакой сборки: один файл.
 */
:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --soft: #f1ede7;
  --ink: #1d1a17;
  --muted: #6f675f;
  --line: #e7e1d9;
  --accent: #ff5c1f;
  --accent-text: #c2410c;
  --good: #15803d;
  --warn: #b45309;
  --radius: 18px;
  --shadow: 0 1px 2px rgb(29 26 23 / 0.04), 0 12px 40px -12px rgb(29 26 23 / 0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: "Unbounded", "Manrope", sans-serif; line-height: 1.15; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(34px, 6vw, 60px); font-weight: 700; }
h2 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 700; }
h3 { font-size: 19px; font-weight: 600; margin-top: 28px; }
p { margin: 12px 0; }
code, kbd { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.9em; background: var(--soft); padding: 1px 6px; border-radius: 6px; }

/* --- шапка ------------------------------------------------------------- */
.top {
  position: sticky; top: 0; z-index: 30;
  background: rgb(250 248 245 / 0.86);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.top-in { max-width: 1240px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: "Unbounded", sans-serif; font-weight: 700; font-size: 18px; }
.brand img { width: 28px; height: 28px; }
.brand span { color: var(--muted); font-family: "Manrope", sans-serif; font-weight: 500; font-size: 14px; }
.top nav { margin-left: auto; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.top nav a { text-decoration: none; padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.top nav a:hover { background: var(--soft); }
.top nav a.on { background: var(--ink); color: var(--bg); }
.top .cta { background: var(--accent); color: #fff; text-decoration: none; padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; white-space: nowrap; }
@media (max-width: 760px) {
  .top-in { flex-wrap: wrap; gap: 10px; }
  .top nav { order: 3; width: 100%; margin: 0 -4px; }
  .top .cta { margin-left: auto; }
  .brand span { display: none; }
}

/* --- общие блоки -------------------------------------------------------- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.eyebrow { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent-text); }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 720px; }
.hero { padding-block: 72px 40px; }
.hero h1 { margin-top: 14px; max-width: 900px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--soft); font-size: 13px; font-weight: 500; }

.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 32px 0; }
.card {
  display: block; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; transition: transform .2s ease, box-shadow .2s ease;
}
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card .ic { width: 44px; height: 44px; border-radius: 14px; background: var(--soft); display: grid; place-items: center; font-size: 22px; }
.card h3 { margin-top: 16px; }
.card p { color: var(--muted); font-size: 15px; margin-bottom: 0; }
.card.accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.card.accent p { color: rgb(255 255 255 / 0.85); }
.card.accent .ic { background: rgb(255 255 255 / 0.2); }
.card .go { display: inline-block; margin-top: 14px; font-weight: 600; font-size: 14px; }

/* --- гид: оглавление слева, разделы справа ------------------------------ */
.guide { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 48px; padding-block: 24px 96px; }
.toc { position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 110px); overflow-y: auto; padding-right: 6px; scrollbar-width: thin; }
.toc p { font-family: ui-monospace, monospace; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin: 18px 0 6px; }
.toc a { display: block; padding: 6px 10px; border-radius: 10px; text-decoration: none; font-size: 14px; color: var(--muted); }
.toc a:hover { color: var(--ink); background: var(--soft); }
.toc a.on { color: var(--ink); background: var(--surface); box-shadow: inset 2px 0 0 var(--accent); font-weight: 600; }
.toc-toggle { display: none; }
@media (max-width: 980px) {
  .guide { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { position: fixed; inset: auto 12px 12px 12px; top: auto; max-height: 62vh; z-index: 40; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 10px 14px 14px; box-shadow: var(--shadow); transform: translateY(calc(100% + 24px)); transition: transform .25s ease; }
  .toc.open { transform: none; }
  .toc-toggle { display: flex; position: fixed; right: 16px; bottom: 16px; z-index: 41; align-items: center; gap: 8px; border: 0; background: var(--ink); color: var(--bg); font: 600 14px "Manrope", sans-serif; padding: 12px 18px; border-radius: 999px; box-shadow: var(--shadow); cursor: pointer; }
}

.sec { padding: 56px 0 8px; border-top: 1px solid var(--line); }
.sec:first-child { border-top: 0; padding-top: 16px; }
.sec > h2 { display: flex; align-items: baseline; gap: 14px; }
.sec > h2 .n { font-family: ui-monospace, monospace; font-size: 14px; color: var(--accent-text); font-weight: 500; }
.sec .who { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.sec .who span { font-size: 12px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.part { font-family: "Unbounded", sans-serif; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 64px 0 0; }

.row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 36px; align-items: start; margin-top: 24px; }
.row.phone-row { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); }
.row.reverse > :first-child { order: 2; }
@media (max-width: 860px) {
  .row, .row.phone-row { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .row.reverse > :first-child { order: 0; }
}

/* --- скриншоты в рамках ------------------------------------------------- */
.shot { margin: 0; cursor: zoom-in; }
.shot figcaption { font-size: 13px; color: var(--muted); margin-top: 10px; }
.browser { border-radius: 14px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.browser .bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: var(--soft); border-bottom: 1px solid var(--line); }
.browser .bar i { width: 10px; height: 10px; border-radius: 50%; background: #e2dbd2; }
.browser .bar span { margin-left: 10px; flex: 1; background: var(--surface); border-radius: 8px; padding: 3px 10px; font-size: 12px; color: var(--muted); font-family: ui-monospace, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone { max-width: 300px; margin: 0 auto; border-radius: 40px; padding: 10px; background: #1d1a17; box-shadow: var(--shadow); }
.phone img { border-radius: 31px; }
.phones { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-top: 24px; }
.phones .phone { max-width: 250px; border-radius: 34px; padding: 8px; }
.phones .phone img { border-radius: 27px; }
.phones figcaption { text-align: center; }

/* --- шаги, подсказки ---------------------------------------------------- */
ol.steps { list-style: none; counter-reset: s; padding: 0; margin: 16px 0; }
ol.steps li { counter-increment: s; position: relative; padding: 0 0 14px 44px; }
ol.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--bg); font: 600 13px/28px "Manrope", sans-serif; text-align: center; }
ol.steps li b { display: block; }
ul.list { padding-left: 20px; margin: 12px 0; }
ul.list li { margin: 6px 0; }
.note { border-radius: 14px; padding: 14px 16px; margin: 16px 0; background: var(--soft); font-size: 15px; }
.note b { display: block; margin-bottom: 4px; }
.note.tip { background: #fff4ec; border: 1px solid #ffd9c2; }
.note.warn { background: #fff8e6; border: 1px solid #f6e0a4; }
.note.good { background: #eef8f0; border: 1px solid #cde8d4; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.tags span { font-size: 13px; padding: 5px 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }

table.roles { width: 100%; border-collapse: collapse; font-size: 14px; margin: 16px 0; background: var(--surface); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
table.roles th, table.roles td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
table.roles th { background: var(--soft); font-weight: 600; }
table.roles td:not(:first-child), table.roles th:not(:first-child) { text-align: center; }
.table-scroll { overflow-x: auto; }

/* --- WhatsApp и мокапы устройства --------------------------------------- */
.wa { background: #efe7de url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Ccircle cx='2' cy='2' r='1' fill='%23e0d5c8'/%3E%3C/svg%3E"); border-radius: 22px; padding: 18px 14px; max-width: 380px; }
.wa .head { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; margin: -4px 0 12px; }
.wa .head i { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; }
.wa .head i img { width: 18px; filter: invert(1); }
.wa .msg { background: #fff; border-radius: 4px 14px 14px 14px; padding: 10px 12px 8px; font-size: 14px; line-height: 1.45; margin: 8px 0; max-width: 92%; box-shadow: 0 1px 1px rgb(0 0 0 / 0.06); white-space: pre-line; }
.wa .msg small { display: block; text-align: right; color: #9a948d; font-size: 11px; margin-top: 4px; }
.wa .msg a { color: #0a7cff; text-decoration: none; word-break: break-all; }

.device-steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 20px 0; }
.dstep { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.dstep .scr { height: 150px; border-radius: 14px; background: var(--soft); display: grid; place-items: center; margin-bottom: 14px; position: relative; overflow: hidden; }
.dstep .scr svg { width: 46px; height: 46px; color: #0a7cff; }
.dstep .scr .sheet { position: absolute; inset: auto 12px 12px; background: var(--surface); border-radius: 12px; padding: 8px 10px; font-size: 13px; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 6px 20px -8px rgb(0 0 0 / 0.25); }
.dstep .scr .sheet svg { width: 20px; height: 20px; color: var(--ink); }
.dstep .scr .app { width: 64px; height: 64px; border-radius: 16px; background: var(--ink); display: grid; place-items: center; box-shadow: var(--shadow); }
.dstep .scr .app img { width: 36px; filter: invert(1); }
.dstep .scr .label { position: absolute; bottom: 14px; font-size: 12px; font-weight: 600; }
.dstep .scr .popup { background: var(--surface); border-radius: 14px; padding: 12px; width: 82%; font-size: 12px; text-align: center; box-shadow: 0 8px 26px -10px rgb(0 0 0 / .3); }
.dstep .scr .popup b { display: block; font-size: 13px; margin-bottom: 8px; }
.dstep .scr .popup span { display: inline-block; margin: 0 6px; color: #0a7cff; font-weight: 600; }
.dstep h4 { margin: 0 0 4px; font-size: 15px; }
.dstep p { margin: 0; color: var(--muted); font-size: 14px; }
.dstep .k { font-family: ui-monospace, monospace; font-size: 11px; color: var(--accent-text); letter-spacing: .14em; }

.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--soft); margin-top: 18px; }
.tabs button { border: 0; background: transparent; font: 600 14px "Manrope", sans-serif; padding: 8px 16px; border-radius: 999px; cursor: pointer; color: var(--muted); }
.tabs button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / .08); }
[data-panel][hidden] { display: none; }

details.faq { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin: 10px 0; }
details.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.faq summary::after { content: "+"; font-size: 20px; line-height: 1; color: var(--muted); }
details.faq[open] summary::after { content: "–"; }
details.faq p { color: var(--muted); margin-bottom: 0; }

/* --- лайтбокс ----------------------------------------------------------- */
.lb { position: fixed; inset: 0; z-index: 100; background: rgb(20 17 15 / 0.88); display: none; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
.lb.open { display: flex; animation: fade .18s ease; }
.lb img { max-width: min(1400px, 100%); max-height: 100%; border-radius: 12px; box-shadow: 0 30px 80px rgb(0 0 0 / .5); }
@keyframes fade { from { opacity: 0; } }

/* --- появление при прокрутке -------------------------------------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; }
footer a { color: var(--ink); }
