:root {
  --bg: #f6fbfa;
  --surface: #ffffff;
  --ink: #1b2e2c;
  --ink-soft: #5f6475;
  --line: #e4e6ee;
  --accent: #0f766e;
  --accent-soft: #ecfbf9;
  --ok: #1d7a46;
  --ok-bg: #e8f6ee;
  --warn: #8a5a00;
  --warn-bg: #fff4dc;
  --tg: #e7f0fb;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; }
code, kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9em; background: var(--accent-soft); border-radius: 6px; padding: 1px 6px;
}

.top {
  background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.top-in {
  max-width: 1180px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 14px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; white-space: nowrap; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand span { font-weight: 500; color: var(--ink-soft); }
.top .bot {
  margin-left: auto; text-decoration: none; font-weight: 700; font-size: 14px;
  background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 10px; white-space: nowrap;
}
.top .bot + .bot { margin-left: 0; }
.menu-btn { display: none; }

.layout {
  max-width: 1180px; margin: 0 auto; padding: 24px 20px 60px;
  display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 36px;
}
.side { position: sticky; top: 76px; align-self: start; }
.side nav a {
  display: block; padding: 7px 12px; border-radius: 9px; color: var(--ink);
  text-decoration: none; font-size: 15px;
}
.side nav a:hover { background: var(--accent-soft); }
.side nav a.on { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.side .group { margin: 16px 12px 4px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }

main { min-width: 0; }
main h1 { font-size: 34px; line-height: 1.2; margin: 4px 0 10px; letter-spacing: -0.01em; }
main .lead { font-size: 18px; color: var(--ink-soft); margin: 0 0 26px; max-width: 760px; }
main h2 { font-size: 23px; margin: 40px 0 12px; scroll-margin-top: 80px; }
main h3 { font-size: 18px; margin: 26px 0 8px; scroll-margin-top: 80px; }
main p, main li { max-width: 780px; }
main ol, main ul { padding-left: 22px; }
main li { margin: 4px 0; }

.steps { list-style: none; padding: 0; counter-reset: s; }
.steps > li { counter-increment: s; position: relative; padding-left: 44px; margin: 14px 0; }
.steps > li::before {
  content: counter(s); position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 15px;
}

.shot { margin: 18px 0 26px; max-width: 820px; }
.shot img { display: block; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 6px 20px rgba(27, 46, 44, .06); }
.shot.narrow { max-width: 340px; }
.shot.mid { max-width: 560px; }
.shot figcaption { font-size: 14px; color: var(--ink-soft); margin-top: 8px; }

.note, .warn, .tip {
  border-radius: 12px; padding: 12px 16px; margin: 16px 0; max-width: 780px; font-size: 15px;
}
.note { background: var(--accent-soft); }
.tip { background: var(--ok-bg); }
.warn { background: var(--warn-bg); color: #5a3d00; }
.note b:first-child, .tip b:first-child, .warn b:first-child { display: block; margin-bottom: 2px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 18px 0 8px; }
.cards a {
  display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; color: var(--ink); text-decoration: none;
}
.cards a:hover { border-color: var(--accent); }
.cards b { display: block; font-size: 16px; margin-bottom: 4px; }
.cards span { font-size: 14px; color: var(--ink-soft); }

.chat {
  background: #dfe8f1; border-radius: var(--radius); padding: 16px; margin: 16px 0 24px;
  max-width: 520px; font-size: 15px;
}
.chat .who { font-size: 12px; color: var(--ink-soft); margin: 0 0 8px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.msg {
  background: #fff; border-radius: 12px 12px 12px 4px; padding: 10px 12px; margin: 0 0 8px;
  white-space: pre-line; max-width: 92%;
}
.msg.me { background: #e3f7d4; border-radius: 12px 12px 4px 12px; margin-left: auto; width: fit-content; }
.kb { display: grid; gap: 6px; margin: 4px 0 10px; }
.kb.two { grid-template-columns: 1fr 1fr; }
.kb span {
  background: rgba(255, 255, 255, .78); border-radius: 9px; padding: 8px 10px; text-align: center;
  font-weight: 600; font-size: 14px; color: #2b5d8a;
}

.faq-search {
  width: 100%; max-width: 780px; font: inherit; padding: 12px 14px; border: 1.5px solid var(--line);
  border-radius: 12px; background: #fff; margin: 4px 0 18px;
}
.faq-search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(15, 118, 110, .15); }
details.q {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  margin: 10px 0; max-width: 780px;
}
details.q summary { cursor: pointer; padding: 14px 16px; font-weight: 700; list-style: none; }
details.q summary::-webkit-details-marker { display: none; }
details.q summary::after { content: "+"; float: right; color: var(--ink-soft); font-weight: 400; }
details.q[open] summary::after { content: "−"; }
details.q .a { padding: 0 16px 14px; }
details.q .a p:first-child { margin-top: 0; }
.faq-empty { color: var(--ink-soft); }

.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 48px; max-width: 780px; }
.pager a {
  flex: 1; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 16px; text-decoration: none; color: var(--ink);
}
.pager a:hover { border-color: var(--accent); }
.pager small { display: block; color: var(--ink-soft); font-size: 13px; }
.pager .next { text-align: right; }

.foot { border-top: 1px solid var(--line); background: var(--surface); }
.foot-in { max-width: 1180px; margin: 0 auto; padding: 20px; font-size: 14px; color: var(--ink-soft); display: flex; gap: 18px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 0; padding-top: 16px; }
  .side { position: static; display: none; }
  .side.open { display: block; margin-bottom: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
  .menu-btn {
    display: inline-block; font: inherit; font-size: 14px; font-weight: 700; border: 1px solid var(--line);
    background: #fff; border-radius: 10px; padding: 7px 12px; cursor: pointer;
  }
  .brand span { display: none; }
  .brand img { width: 26px; height: 26px; }
  .brand b { font-size: 15px; }
  .top-in { gap: 10px; padding: 10px 16px; }
  main h1 { font-size: 27px; }
  .kb.two { grid-template-columns: 1fr; }
  .top .bot { padding: 7px 10px; }
}
@media (max-width: 560px) {
  .top .bot { font-size: 13px; padding: 6px 9px; }
}
@media (max-width: 420px) {
  .brand b { display: none; }
}
