/* GAM help page (help.html). Loaded after gam.css, which gives the tokens,
   the header and the buttons. The studio and the wizard keep the body from
   scrolling; this page is a long document, so the page itself scrolls. */

body.doc{height:auto; min-height:100%; overflow:visible}
.doc .hd{position:sticky; top:0}

.hp{display:grid; grid-template-columns:232px minmax(0,780px); justify-content:center; gap:var(--s-6);
    padding:var(--s-6) var(--s-5) var(--s-7)}

/* ── contents ──────────────────────────────────────────────────────────── */
.hp-toc{position:sticky; top:calc(var(--hd) + var(--s-5)); align-self:start;
        max-height:calc(100vh - var(--hd) - var(--s-6)); overflow:auto}
.hp-toc ol{display:grid; gap:2px; margin:10px 0 0; padding:0; list-style:none}
.hp-toc a{display:block; padding:6px 10px; border-radius:8px; color:var(--muted); font-size:14px; line-height:1.35; text-decoration:none}
@media (hover:hover){ .hp-toc a:hover{background:var(--surface-alt); color:var(--title)} }
.hp-toc a[aria-current="true"]{background:var(--blue-tint); color:var(--blue-strong); font-weight:600}

/* ── text ──────────────────────────────────────────────────────────────── */
.hp-main{min-width:0; font-size:16px; line-height:1.6}
.hp-main [id]{scroll-margin-top:calc(var(--hd) + var(--s-4))}
.hp-main h1{margin:10px 0 14px; font-size:clamp(28px,3.4vw,38px); line-height:1.1; letter-spacing:-.03em}
.hp-main h2{margin:var(--s-7) 0 var(--s-3); padding-top:var(--s-5); border-top:1px solid var(--line);
            font-size:clamp(21px,2.2vw,25px); line-height:1.2}
.hp-main h3{margin:var(--s-5) 0 var(--s-2); font-size:18px; line-height:1.3}
.hp-main p,.hp-main ul,.hp-main ol,.hp-main dl,.hp-main .hp-scroll{margin:0 0 var(--s-3)}
.hp-main ul,.hp-main ol{padding-left:22px}
.hp-main li{margin:4px 0}
.hp-main .lead{margin-bottom:var(--s-4); font-size:17.5px}
.hp-main .note{margin:var(--s-4) 0}

/* A control's name as it reads on screen: «натисніть Створити». */
.ui,.hp-main kbd{display:inline-block; padding:0 7px; border:1px solid var(--line-strong); border-radius:6px; background:var(--surface);
    color:var(--title); font-size:.88em; font-weight:600; line-height:1.55; white-space:nowrap}
.hp-main kbd{font-family:var(--mono); font-size:.8em}

/* ── quick start ───────────────────────────────────────────────────────── */
.hp-cards{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; padding:0 !important; list-style:none}
.hp-cards li{display:grid; align-content:start; gap:6px; margin:0; padding:16px; border:1px solid var(--line);
             border-radius:var(--r-card); background:var(--surface); box-shadow:var(--shadow-card); font-size:15px; line-height:1.5}
.hp-cards b{color:var(--title); font-size:16px}

/* ── views: term and meaning ───────────────────────────────────────────── */
.hp-dl{display:grid; grid-template-columns:150px minmax(0,1fr); border:1px solid var(--line); border-radius:var(--r-card);
       background:var(--surface); overflow:hidden}
.hp-dl dt,.hp-dl dd{margin:0; padding:10px 14px; border-bottom:1px solid var(--line)}
.hp-dl dt{color:var(--title); font-weight:600}
.hp-dl dd{font-size:15px}
.hp-dl > :nth-last-child(-n+2){border-bottom:0}
.hp-dl dt:target,.hp-dl dt:target + dd{background:var(--blue-tint)}

/* ── wizard steps ──────────────────────────────────────────────────────── */
.hp-steps{display:grid; gap:10px; padding:0 !important; list-style:none}
.hp-steps li{margin:0; padding:14px 16px; border:1px solid var(--line); border-radius:var(--r-card); background:var(--surface)}
.hp-steps li:target{border-color:var(--blue); box-shadow:var(--focus)}
.hp-steps h3{display:flex; align-items:baseline; gap:10px; margin:0 0 4px; font-size:17px}
.hp-steps h3 .mono{color:var(--blue-strong)}
.hp-steps p{margin:0 0 6px; font-size:15px}
.hp-steps p:last-child{margin-bottom:0}
.hp-done{color:var(--muted)}
.hp-done b{color:var(--ok)}

/* ── a check list as the wizard shows it ───────────────────────────────── */
.hp-checks{padding:12px 16px !important; border:1px solid var(--line); border-radius:var(--r-card); background:var(--surface);
           list-style:none; font-size:15px}
.hp-checks .is-ok{color:var(--ok)}
.hp-checks .is-err{color:var(--err)}
.hp-checks .is-soft{color:var(--muted)}

/* ── tables ────────────────────────────────────────────────────────────── */
.hp-scroll{overflow-x:auto; border:1px solid var(--line); border-radius:var(--r-card); background:var(--surface)}
.hp-scroll table{font-size:14.5px}
.hp-scroll thead th{position:static}
.hp-scroll td:first-child{white-space:nowrap}

/* ── questions ─────────────────────────────────────────────────────────── */
.hp-faq details{margin:0 0 8px; padding:0 16px; border:1px solid var(--line); border-radius:var(--r-card); background:var(--surface)}
.hp-faq summary{padding:12px 0; color:var(--title); font-weight:600; cursor:pointer}
.hp-faq details[open] summary{margin-bottom:10px; border-bottom:1px solid var(--line)}
.hp-faq details p{font-size:15px}

.hp-foot{margin-top:var(--s-7); padding-top:var(--s-4); border-top:1px solid var(--line); color:var(--muted); font-size:14px}

/* ── the home page (index.html) ────────────────────────────────────────── */
.home{max-width:1080px; margin:0 auto; padding:var(--s-6) var(--s-5) var(--s-7)}
.home-hero{display:grid; gap:14px; max-width:780px}
.home-hero h1{margin:0; font-size:clamp(30px,4vw,46px); line-height:1.05; letter-spacing:-.03em}
.home-hero .lead{margin:0; font-size:17.5px; line-height:1.6}
.home-cta{display:flex; flex-wrap:wrap; gap:10px; margin-top:6px}
.home-cta .btn{min-height:42px; padding:8px 18px; font-size:15px; text-decoration:none}
.home-cta .btn--primary{border-color:var(--blue); background:var(--blue); color:#fff}
@media (hover:hover){ .home-cta .btn--primary:hover{border-color:var(--blue-strong); background:var(--blue-strong); color:#fff} }
.home-drafts{margin:0; color:var(--muted); font-size:15px}
.home-demos{margin-top:var(--s-7)}
.home-demos h2{margin:0 0 var(--s-4); font-size:clamp(21px,2.2vw,25px)}
.home-cards{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin:0; padding:0; list-style:none}
.home-card{display:flex; flex-direction:column; gap:10px; padding:20px; border:1px solid var(--line); border-radius:var(--r-card);
           background:var(--surface); box-shadow:var(--shadow-card)}
.home-card__kind{margin:0; color:var(--blue-strong); font-family:var(--mono); font-size:12px; letter-spacing:.06em; text-transform:uppercase}
.home-card h3{margin:0; font-size:18px; line-height:1.3}
.home-card p{margin:0; color:var(--ink); font-size:15px; line-height:1.55}
.home-card .btn{align-self:flex-start; margin-top:auto; text-decoration:none}
.home-card p.home-card__sys{color:var(--muted); font-size:14px}
.home-card__sys a{color:var(--blue-strong)}
.home-note{margin:var(--s-4) 0 0; font-size:14px}
.home .hp-foot{max-width:none}

@media (max-width:899px){
  .home{padding:var(--s-4) 16px var(--s-6)}
  .home-cards{grid-template-columns:minmax(0,1fr)}
}

@media (max-width:899px){
  .hp{grid-template-columns:minmax(0,1fr); gap:var(--s-4); padding:var(--s-4) 16px var(--s-6)}
  .hp-toc{position:static; max-height:none; padding:12px 14px; border:1px solid var(--line); border-radius:var(--r-card);
          background:var(--surface)}
  .hp-toc ol{grid-template-columns:repeat(2,minmax(0,1fr)); grid-template-rows:repeat(5,auto); grid-auto-flow:column}
  .hp-cards{grid-template-columns:minmax(0,1fr)}
  .hp-main h2{margin-top:var(--s-6)}
}
@media (max-width:520px){
  .hp-toc a{padding:5px 8px}
  .hp-dl{grid-template-columns:minmax(0,1fr)}
  .hp-dl dt{padding-bottom:0; border-bottom:0}
  .hp-dl dd{padding-top:2px}
}
