.site-skip {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  transform: translateY(calc(-100% - 12px));
}
.site-skip:focus { transform: none; }

.site-header { background: var(--surface); backdrop-filter: none; }
.site-header .wrap { gap: 32px; height: 76px; }
.site-header .logo { font-size: 20px; }
.site-header .logo img { width: 32px; height: 32px; }
.site-header .nav { display: flex; gap: 24px; }
.site-header .nav a { display: flex; align-items: center; min-height: 44px; font-size: 14px; }
.site-header .right { gap: 12px; }
.site-header .acct { min-width: 0; min-height: 44px; padding: 5px 8px; border-color: transparent; }
.site-header .acct:hover, .site-header .acct[aria-expanded=true] { background: var(--tint); }
.site-header .acct .av { border-radius: 50%; background: var(--tint); color: var(--brand); }
.site-header .acct .nm { font-weight: 500; }
.site-header .menu { left: auto; width: min(280px, calc(100vw - 32px)); }
.site-header .menu a, .site-header .menu button { min-height: 44px; }
.site-header .menu .monly { display: none; }
.site-signin {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 14px;
  text-decoration: none;
}
.site-signin:hover { background: var(--tint); }
.public-menu { display: none; position: relative; }
.public-menu summary {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.public-menu summary::-webkit-details-marker { display: none; }
.public-menu summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.public-menu nav {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(220px, calc(100vw - 32px));
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.public-menu[open] { overflow: visible !important; }
.public-menu nav a { padding: 10px 12px; border-radius: 6px; color: var(--text); font-size: 14px; }
.public-menu nav a:hover { background: var(--tint); }

.sitefoot {
  display: block;
  padding: 28px 0;
  background: var(--surface);
}
.sitefoot-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.sitefoot-brand { color: var(--soft); }
.sitefoot-brand b { display: block; margin-bottom: 4px; color: var(--ink); }
.sitefoot nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px 24px; }

.authpage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 416px;
  gap: 72px;
  align-items: center;
  min-height: auto;
  max-width: 1040px;
  margin: 48px auto;
  padding: 0 40px;
}
.auth-intro h2 { max-width: 430px; font-size: 38px; line-height: 1.18; letter-spacing: -.02em; }
.auth-intro p { max-width: 390px; margin-top: 20px; color: var(--soft); }
.auth-intro > a { display: inline-block; margin-top: 24px; }
.auth-products { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.auth-products img { width: 36px; height: 36px; }
.authpage .auth { min-width: 0; max-width: none; padding: 32px; border-radius: 14px; box-shadow: none; }
.authpage .auth h1 { font-size: 28px; line-height: 1.25; letter-spacing: -.02em; }
.authpage .auth .sub2 { margin: 8px 0 24px; color: var(--soft); font-size: 14px; overflow-wrap: anywhere; }
.authpage .auth .alt { overflow-wrap: anywhere; }
.authpage .auth .field > span:first-child { color: var(--text); font-weight: 500; }
.authpage .auth .inp { font-size: 16px; border-radius: 8px; }
.authpage .auth .eye { top: 1px; right: 1px; width: 42px; height: 42px; }
.authpage .auth .btn { min-height: 44px; height: auto; padding-block: 12px; line-height: 1.25; white-space: normal; text-align: center; }
.authpage .auth .btn.brand { background: var(--btn); border-color: var(--btn); color: var(--btn-ink); }
.authpage .auth .chk input:checked { background: var(--brand); border-color: var(--brand); }
.authpage .auth .two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.authpage .auth .qr-refresh { margin-top: 12px; }
.authpage .auth .alert { border: 1px solid var(--line); border-radius: 8px; }
.authpage .auth .alert.bad { border-color: color-mix(in srgb, var(--bad) 25%, var(--line)); }
.authpage .auth .pickd { border-radius: 8px; background: color-mix(in srgb, var(--brand) 8%, var(--surface)); }
.auth-status { display: grid; place-items: center; width: 48px; height: 48px; margin: 24px 0 16px; border-radius: 50%; background: var(--okbg); color: var(--ok); }
.auth-status.warn { background: var(--warnbg); color: var(--warn); }
.auth-status .i { width: 25px; height: 25px; }
.auth-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.field-hint { display: block; margin-top: 6px; color: var(--soft); font-size: 13px; }
.auth-note { margin-bottom: 20px; }

.faq-mark { width: 20px; height: 20px; color: var(--soft); stroke-width: 1.7; }
.faq-mark .expand-vertical { transform-origin: center; transition: transform .18s ease, opacity .18s ease; }
details[open]:not(.closing) > summary .faq-mark .expand-vertical { transform: scaleY(0); opacity: 0; }
.faq summary:has(.faq-mark)::after, .tocbox > summary:has(.faq-mark)::after { content: none; }
.faq summary:has(.faq-mark):hover { color: var(--brand); }
.about-points { list-style: none; padding: 0; }
.about-points li { padding: 10px 0; border-top: 1px solid var(--line); }

@media screen {
  .docwrap { grid-template-columns: 216px minmax(0, 760px); gap: 48px; padding: 36px 32px 56px; }
  .doctoc { position: sticky; top: 108px; max-height: calc(100vh - 128px); overflow: auto; gap: 16px; }
  .docnav3 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .docnav3 a { padding: 10px 12px; min-height: 42px; border-radius: 6px; text-align: left; }
  .docnav3 a.on { background: color-mix(in srgb, var(--brand) 10%, var(--surface)); color: var(--brand); }
  .tocbox { padding: 12px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
  .tocbox > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0;
    padding: 8px 12px;
    color: var(--soft);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: normal;
    text-transform: none;
    pointer-events: auto;
    cursor: pointer;
  }
  .tocbox > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
  .tocbox[open] .toc { margin: 8px 0 0 12px; }
  .toc a { padding: 6px 12px; border-left-width: 1px; font-size: 13px; }
  .toc a.on { border-color: var(--brand); color: var(--brand); }
  .docwrap .doc { overflow-wrap: anywhere; }
  .docwrap .doc h1 { font-size: 34px; line-height: 1.2; }
  .docwrap .doc h2 { margin: 32px 0 12px; font-size: 22px; letter-spacing: 0; scroll-margin-top: 104px; }
  .docwrap .doc p { margin: 14px 0 0; line-height: 1.7; }
  .docwrap .doc h1 + .muted { margin: 10px 0 24px; font-size: 14px; }
  .docwrap .doc ul, .docwrap .doc ol { padding-left: 24px; }
  .docwrap .doc li { margin-top: 8px; }
  .docwrap .doc a.btn { margin-top: 16px; }
}

@media (max-width: 900px) {
  .site-header .wrap, .site-header .nav { gap: 16px; }
  .site-header .acct .nm { display: none; }
  .authpage { grid-template-columns: minmax(0, 1fr) 400px; gap: 32px; padding-inline: 28px; }
  .auth-intro h2 { font-size: 32px; }
  .docwrap { grid-template-columns: 180px minmax(0, 1fr); gap: 32px; }
}

@media (max-width: 700px) {
  .site-header .wrap { height: 68px; gap: 12px; }
  .site-header .logo { font-size: 18px; }
  .site-header .right { gap: 4px; }
  .site-header .nav { display: none; }
  .site-header .menu .monly { display: flex; }
  .public-menu { display: block; }
  .sitefoot-inner { flex-direction: column; gap: 16px; }
  .sitefoot nav { justify-content: flex-start; gap: 8px 18px; }
  .authpage { grid-template-columns: minmax(0, 1fr); max-width: 460px; margin: 28px auto; padding-inline: 20px; }
  .auth-intro { display: none; }
  .authpage .auth { padding: 24px; }
  .authpage .auth h1 { font-size: 26px; }
  .docwrap { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 24px 20px 48px; }
  .doctoc { position: static; max-height: none; overflow: visible; }
  .docnav3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .docwrap .doc h1 { font-size: 30px; }
  .docwrap .doc h2 { font-size: 20px; }
}

@media (max-width: 360px) {
  .site-header .wrap { padding-inline: 12px; }
  .authpage { padding-inline: 16px; }
  .authpage .auth { padding: 20px; }
}

@media print {
  .site-skip { display: none; }
  :root[data-theme=dark] { --ink: #000; --text: #000; --soft: #333; --bg: #fff; --surface: #fff; --line: #ccc; }
  .docwrap { display: block; padding: 0; }
}
