:root {
  --blue: var(--accent-dark);
  --blue-soft: var(--accent-soft);
}

a { color: var(--blue); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.layout { display: grid; grid-template-columns: 275px minmax(0, 1fr); min-height: calc(100vh - var(--site-header-height)); }
.sidebar { position: sticky; top: var(--site-header-height); align-self: start; height: calc(100vh - var(--site-header-height)); overflow-y: auto; border-right: 1px solid var(--line); padding: 20px 16px 30px 24px; scrollbar-width: thin; }
.search, .home-search { position: relative; }
.search { position: sticky; top: -20px; z-index: 2; background: var(--paper); margin: -20px -16px 20px -24px; padding: 20px 16px 8px 24px; }
.search::before, .home-search::before { content: ""; position: absolute; width: 11px; height: 11px; border: 1.8px solid #768ba3; border-radius: 50%; left: 39px; top: 34px; pointer-events: none; }
.search::after, .home-search::after { content: ""; position: absolute; width: 6px; height: 1.8px; background: #768ba3; transform: rotate(46deg); left: 50px; top: 46px; pointer-events: none; }
.search input, .home-search input { width: 100%; background: var(--paper); border: 1px solid #c5d5e4; border-radius: 6px; color: var(--ink); outline: none; height: 42px; padding: 0 13px 0 38px; font-size: 13px; }
.search input:focus, .home-search input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px #096eb71a; }
input::placeholder { color: var(--muted); }
.sidebar-home { display: block; margin: 0 0 17px; padding: 8px 12px; color: var(--accent-dark); font-size: 13px; font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--line); }
.sidebar-home:hover { text-decoration: underline; }
.nav-group { margin: 0 0 21px; }
.nav-group + .nav-group { padding-top: 15px; border-top: 1px solid #edf1f5; }
.nav-group h2 { margin: 0 0 7px; padding: 0 12px; font-size: 12px; line-height: 1.6; font-weight: 730; color: var(--muted); }
.nav-group a { display: block; min-height: 33px; margin: 1px 0; padding: 7px 12px; border-radius: 5px; color: var(--body); text-decoration: none; font-size: 13px; line-height: 1.45; }
.nav-group a:hover, .nav-group a:focus-visible { color: var(--blue); background: #f4f8fc; }
.nav-group a.selected { color: var(--blue); background: var(--blue-soft); font-weight: 680; }
.no-results { padding: 12px; color: var(--muted); font-size: 14px; }
.menu-toggle { display: none; }

#content { min-width: 0; padding: 34px clamp(26px, 3.2vw, 58px) 72px; }
.reading-layout { display: grid; grid-template-columns: minmax(0, 820px) minmax(150px, 190px); gap: clamp(32px, 3.2vw, 58px); max-width: 1110px; margin: 0 auto; }
article { min-width: 0; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; color: var(--muted); font-size: 13px; margin-bottom: 23px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--blue); text-decoration: underline; }
article h1 { margin: 0 0 9px; font-size: clamp(32px, 3vw, 40px); font-weight: 760; letter-spacing: -.035em; line-height: 1.22; }
.summary { margin: 0 0 24px; font-size: 16px; line-height: 1.7; color: var(--body); }
.shortcuts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.shortcut { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 5px; padding: 5px 8px; color: var(--body); font-size: 12px; }
.shortcut kbd { color: var(--ink); border: 1px solid #d4e0ea; border-radius: 4px; padding: 1px 5px; font-family: inherit; background: #f7fafc; }
.examples { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 17px; margin: 22px 0 30px; }
.examples figure { margin: 0; }
.examples a { display: block; border: 1px solid #cad8e4; border-radius: 6px; overflow: hidden; box-shadow: 0 6px 18px #173c6212; background: #0d151f; }
.examples a:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.examples img { width: 100%; max-height: 430px; display: block; object-fit: contain; }
.examples figcaption { color: var(--muted); font-size: 12px; line-height: 1.5; margin-top: 9px; }
.figure { margin: 20px 0 28px; border-radius: 6px; overflow: auto; background: #111c26; }
.figure svg { display: block; width: 100%; min-width: 600px; }
.step { position: relative; padding: 16px 0 21px; margin: 0; border-bottom: 1px solid var(--line); scroll-margin-top: 78px; }
.step h2 { margin: 0 0 8px; font-size: 19px; line-height: 1.4; font-weight: 710; }
.step p { color: var(--body); margin: 0; font-size: 15px; line-height: 1.82; }
.step strong { color: var(--ink); font-weight: 680; }
.step.important { margin: 12px 0; padding: 17px 20px; border: 0; border-left: 3px solid var(--blue); background: #f1f7fd; }
.related { padding-top: 32px; }
.related h2 { margin: 0 0 13px; font-size: 16px; }
.related div { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.related a { text-decoration: none; font-size: 14px; }
.related a:hover { text-decoration: underline; }
.page-outline { position: sticky; top: calc(var(--site-header-height) + 30px); align-self: start; border-left: 1px solid var(--line); padding: 0 0 0 19px; margin-top: 5px; }
.page-outline h2 { font-size: 13px; margin: 0 0 14px; font-weight: 730; }
.page-outline nav { display: flex; flex-direction: column; gap: 12px; }
.page-outline a { color: var(--muted); text-decoration: none; font-size: 12px; line-height: 1.5; }
.page-outline a:hover, .page-outline a:focus-visible { color: var(--blue); }
footer { max-width: 1110px; margin: 70px auto 0; border-top: 1px solid var(--line); padding-top: 22px; color: var(--muted); font-size: 12px; }

.home-main { max-width: 1440px; margin: 0 auto; padding: 44px clamp(24px, 5vw, 72px) 65px; }
.home-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.13fr); align-items: center; gap: 45px; padding: 0 0 50px; border-bottom: 1px solid var(--line); }
.home-eyebrow { display: block; margin-bottom: 15px; color: var(--accent-dark); font-size: 12px; font-weight: 720; letter-spacing: .08em; }
.home-copy h1 { margin: 0 0 17px; font-size: clamp(34px, 3.6vw, 54px); font-weight: 760; line-height: 1.15; letter-spacing: -.04em; }
.home-copy p { font-size: clamp(16px, 1.3vw, 19px); line-height: 1.65; color: var(--body); max-width: 570px; margin: 0 0 26px; }
.home-search { max-width: 580px; }
.home-search::before { left: 20px; top: 17px; width: 13px; height: 13px; }
.home-search::after { left: 33px; top: 31px; }
.home-search input { height: 52px; padding-left: 53px; font-size: 15px; }
.home-visual { margin: 0; border: 1px solid #c9d6e1; border-radius: 7px; overflow: hidden; box-shadow: 0 8px 25px #18395218; background: #0d151f; }
.home-visual img { display: block; width: 100%; }
.home-directory { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 29px; }
.home-group { display: grid; grid-template-columns: 25px minmax(0, 1fr); gap: 12px; min-width: 0; padding: 22px 24px 22px 5px; border-bottom: 1px solid var(--line); }
.home-group:not(:nth-child(4n+1)) { border-left: 1px solid var(--line); padding-left: 24px; }
.home-group:nth-last-child(-n+4) { border-bottom: 0; }
.home-group > img { width: 22px; height: 22px; margin-top: 2px; filter: brightness(.62) saturate(1.7); }
.home-group h2 { margin: 0 0 12px; font-size: 17px; font-weight: 720; }
.home-group a { display: block; padding: 5px 0; font-size: 13px; line-height: 1.35; text-decoration: none; }
.home-group a:hover { text-decoration: underline; }
.home-main footer { margin-top: 45px; }

@media (max-width: 1160px) {
  .reading-layout { display: block; max-width: 820px; }
  .page-outline { display: none; }
  .home-hero { gap: 28px; }
}
@media (max-width: 920px) {
  .home-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-group, .home-group:nth-last-child(-n+4) { border-bottom: 1px solid var(--line); }
  .home-group:nth-child(odd) { border-left: 0; padding-left: 5px; }
  .home-group:nth-child(even) { border-left: 1px solid var(--line); padding-left: 24px; }
  .home-group:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (max-width: 750px) {
  .menu-toggle { display: flex; flex-direction: column; justify-content: center; gap: 4px; flex: 0 0 31px; width: 31px; height: 30px; padding: 6px; background: white; border: 1px solid var(--line); border-radius: 5px; cursor: pointer; }
  .menu-toggle span { display: block; height: 1.5px; width: 100%; background: var(--ink); }
  .layout { display: block; }
  .sidebar { display: none; position: fixed; z-index: 9; top: var(--site-header-height); left: 0; bottom: auto; width: min(86vw, 330px); height: calc(100dvh - var(--site-header-height)); background: var(--paper); box-shadow: 15px 0 25px #15365316; padding-top: 0; }
  .sidebar.open { display: block; }
  .sidebar .search { position: static; margin-top: 0; padding-top: 10px; }
  .sidebar .search::before { top: 24px; }
  .sidebar .search::after { top: 36px; }
  #content { padding: 27px 22px 55px; }
  .breadcrumbs { margin-bottom: 21px; }
  article h1 { font-size: 31px; }
  .examples img { max-height: none; }
  .home-main { padding: 29px 22px 52px; }
  .home-hero { display: flex; flex-direction: column; align-items: stretch; padding-bottom: 32px; }
  .home-copy h1 { font-size: clamp(33px, 8vw, 42px); }
  .home-copy p { font-size: 16px; }
  .home-visual { max-width: 600px; }
}
@media (max-width: 560px) {
  .home-directory { display: block; margin-top: 12px; }
  .home-group, .home-group:nth-child(even), .home-group:nth-last-child(-n+2) { border-left: 0; border-bottom: 1px solid var(--line); padding: 19px 0; }
  .home-group:last-child { border-bottom: 0; }
  .step h2 { font-size: 18px; }
  .step p { font-size: 14px; }
}
