/* sec.urvantcev.ru — a printed field manual: warm paper, dark ink, amber.
   Light only (the owner does not want dark sites); palette and fonts follow urvantcev.ru / urvantcev.com.
   Fonts are self-hosted in /fonts so the pages open without any external host. */

:root {
  --paper: #faf6ee;
  --paper-2: #f3ecdf;
  --paper-3: #e9e0cd;
  --card: #fffdf8;
  --ink: #17120b;
  --ink-2: #3d3428;
  --muted: #6b5f4f;
  --amber: #a85d00;
  --amber-bright: #ffb020;
  --amber-soft: #f9ecd3;
  --wine: #7a2b3a;
  --wine-soft: #f7eae7;
  --green: #2c5a38;
  --green-soft: #e8f0e3;
  --line: rgba(23, 18, 11, .15);
  --line-2: rgba(23, 18, 11, .08);

  --serif: 'Prata', Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  --sans: 'Onest', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --pad: clamp(16px, 4.6vw, 56px);
  --maxw: 1200px;
  --col: 46.5rem;
  --top: 58px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--top) + 18px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* paper grain: a tiled noise layer baked into the background, no fixed overlay to repaint on scroll */
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .09 0 0 0 0 .07 0 0 0 0 .04 0 0 0 .055 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  overflow-wrap: break-word;
}

::selection { background: var(--amber-bright); color: var(--ink); }
img, video, svg { max-width: 100%; }
img, video { height: auto; display: block; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 3px; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 8px; }
.skip:focus { left: 12px; }

.eyebrow { margin: 0; font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .17em; text-transform: uppercase; color: var(--amber); }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.005em; margin: 0; text-wrap: balance; }
h3, h4 { font-family: var(--sans); margin: 0; }
.lede { font-size: clamp(18px, 2.1vw, 21px); line-height: 1.55; color: var(--ink-2); margin: 0; max-width: 44rem; text-wrap: pretty; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: .7em 1.35em; border-radius: 999px;
  background: var(--ink); color: var(--paper); border: 1.5px solid var(--ink);
  font: 600 15.5px/1.2 var(--sans); text-decoration: none; cursor: pointer; text-align: center;
  transition: background .18s, color .18s, border-color .18s, transform .18s;
}
.btn::after { content: '→'; font-family: var(--sans); transition: transform .18s; }
.btn:hover { background: var(--amber); border-color: var(--amber); }
.btn:hover::after { transform: translateX(3px); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn--sm { min-height: 40px; font-size: 14px; padding: .5em 1.05em; }
.btn--sm::after { content: none; }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 50; background: rgba(250, 246, 238, .9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-2); }
.top__in { display: flex; align-items: center; gap: 18px; height: var(--top); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; min-width: 0; }
.brand__mark { flex: none; border-radius: 7px; }
.brand__t { font-family: var(--serif); font-size: 18px; white-space: nowrap; }
.nav { display: none; gap: clamp(12px, 1.7vw, 24px); }
.nav a, .menu__panel a { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; color: var(--muted); white-space: nowrap; transition: color .15s; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current] { color: var(--ink); box-shadow: 0 2px 0 var(--amber); }
.nav__n { color: var(--amber); margin-right: .55em; }
.chip-zoom { flex: none; font: 600 13px/1 var(--sans); text-decoration: none; color: var(--ink); background: var(--amber-bright); border-radius: 999px; padding: 9px 13px; white-space: nowrap; }
.chip-zoom:hover { background: var(--ink); color: var(--paper); }
.chip-zoom i { display: none; font-style: normal; }
.menu { flex: none; }
.menu > summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; font: 600 13.5px/1 var(--sans); cursor: pointer; user-select: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu__ico { width: 14px; height: 10px; border-block: 2px solid var(--ink); position: relative; }
.menu__ico::after { content: ''; position: absolute; left: 0; right: 0; top: 2px; border-top: 2px solid var(--ink); }
.menu[open] > summary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.menu[open] .menu__ico, .menu[open] .menu__ico::after { border-color: var(--paper); }
.menu__panel { position: absolute; left: 0; right: 0; top: var(--top); display: grid; background: var(--card); border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px -24px rgba(23, 18, 11, .35); padding: 6px var(--pad) 14px; }
.menu__panel a { padding: 15px 0; font-size: 13px; color: var(--ink); border-bottom: 1px solid var(--line-2); }
.menu__panel a:last-child { border-bottom: 0; }
.menu__panel a[aria-current] { color: var(--amber); }
@media (max-width: 520px) { .brand__t { font-size: 16.5px; } .chip-zoom { padding: 9px 11px; font-size: 12.5px; } .chip-zoom span { display: none; } .chip-zoom i { display: inline; } .top__in { gap: 10px; } .menu__t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } .menu > summary { padding: 0 13px; } }
@media (min-width: 1060px) { .nav { display: flex; } .menu { display: none; } .brand { margin-right: clamp(12px, 3vw, 44px); } .nav { margin-right: auto; } }

/* ---------- chapter header ---------- */
.phead { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.phead__in { position: relative; padding-block: clamp(34px, 7vw, 84px) clamp(28px, 5vw, 56px); }
.phead__num { position: absolute; right: var(--pad); top: 50%; transform: translateY(-52%); font-family: var(--serif); font-size: clamp(150px, 30vw, 380px); line-height: .8; color: var(--amber); opacity: .1; pointer-events: none; user-select: none; }
.phead h1 { position: relative; font-size: clamp(34px, 6.4vw, 70px); line-height: 1.04; margin: 16px 0 20px; max-width: 16ch; }
.chapter--vaultwarden .phead h1 { max-width: 19ch; }
.phead .lede { position: relative; }
@media (max-width: 700px) { .phead__num { top: 14px; transform: none; font-size: 132px; } }
.phead__meta { position: relative; margin: 22px 0 0; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 18px; }

/* ---------- page grid, table of contents ---------- */
.pgrid { display: grid; grid-template-columns: minmax(0, 1fr); padding-block: clamp(22px, 4vw, 48px) clamp(56px, 8vw, 104px); }
.pgrid--wide .prose { max-width: none; }
.pgrid--rules { --col: 54rem; }
.prose { min-width: 0; max-width: var(--col); }
.toc { display: none; }
.toc-m { margin: 0 0 30px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.toc-m > summary { padding: 13px 16px; font: 600 15px/1.3 var(--sans); cursor: pointer; }
.toc-m ol { margin: 0; padding: 2px 16px 12px 38px; }
.toc-m li { padding: 5px 0; color: var(--amber); font-family: var(--mono); font-size: 12px; }
.toc-m a { font: 400 15.5px/1.4 var(--sans); color: var(--ink); text-decoration: none; }
@media (min-width: 1100px) {
  .pgrid { grid-template-columns: 236px minmax(0, var(--col)); column-gap: clamp(40px, 6vw, 88px); }
  .pgrid--wide { grid-template-columns: minmax(0, 1fr); }
  .toc-m { display: none; }
  .toc { display: block; position: sticky; top: calc(var(--top) + 26px); align-self: start; max-height: calc(100vh - var(--top) - 46px); overflow-y: auto; padding-right: 6px; scrollbar-width: thin; }
  .toc__h { margin: 0 0 12px; font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
  .toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; border-left: 1px solid var(--line); }
  .toc li { counter-increment: toc; }
  .toc a { display: block; padding: 6px 0 6px 16px; margin-left: -1px; border-left: 2px solid transparent; font-size: 14px; line-height: 1.35; color: var(--muted); text-decoration: none; transition: color .15s, border-color .15s; }
  .toc a:hover { color: var(--ink); }
  .toc a.is-current { color: var(--ink); border-left-color: var(--amber); font-weight: 500; }
}

/* ---------- prose ---------- */
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: clamp(26px, 3.6vw, 36px); line-height: 1.14; margin: clamp(52px, 7vw, 84px) 0 18px; }
.prose h2 .step-n { display: block; font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .17em; text-transform: uppercase; color: var(--amber); margin-bottom: 12px; }
.prose h3 { font-size: 20px; font-weight: 600; line-height: 1.3; margin: 38px 0 12px; }
.prose h4 { font-size: 16.5px; font-weight: 600; line-height: 1.35; margin: 26px 0 8px; }
.prose p { margin: 0 0 1.05em; text-wrap: pretty; }
.prose ul, .prose ol { margin: 0 0 1.15em; padding-left: 1.35em; }
.prose li { margin: 0 0 .5em; padding-left: .2em; }
.prose li::marker { color: var(--amber); }
.prose ol > li::marker { font-family: var(--mono); font-size: .86em; font-weight: 500; }
.prose li > ul, .prose li > ol { margin-top: .5em; }
.prose :is(.steps, .rules, .cards, .stores, .zones, .kit__list, .clip__steps, .vp__list ol) { padding-left: 0; list-style: none; }
.prose a { text-decoration: underline; text-decoration-color: var(--amber); text-decoration-thickness: 1.5px; text-underline-offset: 3px; transition: color .15s; }
.prose a:hover { color: var(--amber); }
.prose a.btn { text-decoration: none; color: var(--paper); }
.prose a.btn--ghost { color: var(--ink); }
.prose a.btn--ghost:hover { color: var(--paper); }
.prose b, .prose strong { font-weight: 600; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 44px 0; }
.prose .big { font-size: clamp(19px, 2.3vw, 22px); line-height: 1.5; color: var(--ink-2); }
.small, .prose .small { font-size: 14.5px; line-height: 1.55; color: var(--muted); }
code, kbd, samp { font-family: var(--mono); font-size: .86em; }
:not(pre) > code { background: var(--paper-2); border: 1px solid var(--line-2); border-radius: 5px; padding: .08em .36em; overflow-wrap: anywhere; }

/* numbered steps */
.steps { list-style: none; padding: 0; counter-reset: st; }
.steps > li { counter-increment: st; position: relative; padding: 0 0 0 44px; margin: 0 0 14px; min-height: 30px; }
.steps > li::before { content: counter(st); position: absolute; left: 0; top: -1px; width: 30px; height: 30px; display: grid; place-items: center; border: 1.5px solid var(--ink); border-radius: 50%; font: 500 13px/1 var(--mono); background: var(--card); }

/* callouts */
.note, .gotcha, .okbox { margin: 26px 0; padding: 16px 18px 16px 20px; border-radius: 4px 14px 14px 4px; }
.note > :last-child, .gotcha > :last-child, .okbox > :last-child { margin-bottom: 0; }
.note { background: var(--amber-soft); border-left: 3px solid var(--amber); }
.okbox { background: var(--green-soft); border-left: 3px solid var(--green); }
.gotcha { background: var(--wine-soft); border-left: 3px solid var(--wine); }
.gotcha__tag, .note__tag { display: block; margin: 0 0 6px; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .17em; text-transform: uppercase; }
.gotcha__tag { color: var(--wine); }
.note__tag { color: var(--amber); }
.gotcha h3, .gotcha h4, .note h3, .note h4 { margin: 0 0 8px; font-size: 18px; line-height: 1.3; }
.src { margin: 14px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.prose .src a { text-decoration-thickness: 1px; }
.ver { display: inline-block; font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }

/* code */
.code { margin: 24px 0; border: 1px solid var(--line); border-radius: 14px; background: var(--card); overflow: hidden; }
.code figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; padding: 9px 12px 9px 16px; border-bottom: 1px solid var(--line-2); background: var(--paper-2); }
.code__name { font-family: var(--mono); font-size: 12.5px; font-weight: 500; overflow-wrap: anywhere; }
.code__tools { display: inline-flex; gap: 6px; }
.code__tools a, .code__tools button, .cmd__copy { font: 500 12.5px/1 var(--sans); color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; cursor: pointer; text-decoration: none; }
.code__tools a:hover, .code__tools button:hover, .cmd__copy:hover { border-color: var(--ink); color: var(--ink); }
.is-copied { background: var(--green-soft) !important; border-color: var(--green) !important; }
pre { margin: 0; padding: 16px; overflow-x: auto; font-family: var(--mono); font-size: 13px; line-height: 1.6; tab-size: 2; -webkit-overflow-scrolling: touch; }
pre code { font-size: inherit; background: none; border: 0; padding: 0; }
pre .c { color: #8a7a62; }
.cmd { position: relative; margin: 18px 0 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper-2); }
.cmd pre { padding: 14px 16px; }
.js .cmd:not(.cmd--plain) pre { padding-bottom: 46px; }
.cmd__copy { position: absolute; right: 10px; bottom: 10px; }

/* tables */
.tbl { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 15.5px; line-height: 1.5; }
.tbl th { text-align: left; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 0 16px 10px 0; border-bottom: 1.5px solid var(--ink); vertical-align: bottom; }
.tbl td { padding: 13px 16px 13px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl td:first-child { font-weight: 600; }
.tbl tr > :last-child { padding-right: 0; }
@media (max-width: 719px) {
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; }
  .tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .tbl tr { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .tbl td { border: 0; padding: 0 0 8px; }
  .tbl td:last-child { padding-bottom: 0; }
  .tbl td[data-th]::before { content: attr(data-th); display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
  .tbl td:first-child { font-size: 17px; }
}

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 215px), 1fr)); gap: 14px; margin: 24px 0; padding: 0; list-style: none; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; margin: 0; }
.prose .cards > li { margin: 0; padding: 18px 20px; }
.card h3, .card h4 { margin: 0 0 4px; font-size: 17.5px; line-height: 1.3; }
.prose .card__who { margin: 0 0 8px; font-family: var(--mono); font-size: 11px; line-height: 1.5; letter-spacing: .13em; text-transform: uppercase; color: var(--amber); }
.card p:not(.card__who) { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--ink-2); }
.card p:not(.card__who) + p { margin-top: .6em; }
.stores { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 215px), 1fr)); gap: 10px; margin: 18px 0; padding: 0; list-style: none; }
.prose .stores li { margin: 0; padding: 0; }
.stores a { display: block; height: 100%; padding: 12px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; transition: border-color .15s; }
.stores a:hover { border-color: var(--ink); color: var(--ink); }
.stores b { display: block; font-size: 15.5px; }
.stores span { display: block; font-size: 13px; color: var(--muted); line-height: 1.4; }

/* glossary, faq */
.gloss { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 4px 36px; margin: 20px 0; }
.gloss div { padding: 12px 0; border-top: 1px solid var(--line); }
.gloss dt { font-weight: 600; }
.gloss dd { margin: 2px 0 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.5; }
.faq { margin: 20px 0; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 15px 30px 15px 0; font-weight: 600; position: relative; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 12px; font: 400 22px/1.2 var(--mono); color: var(--amber); }
.faq details[open] summary::after { content: '−'; }
.faq details > p { margin: 0 0 16px; color: var(--ink-2); }

/* rules: «нельзя — почему — как правильно» */
.rules { list-style: none; padding: 0; margin: 24px 0; counter-reset: rule; border-top: 1.5px solid var(--ink); }
.prose .rules > li { counter-increment: rule; margin: 0; padding: 20px 0 18px; border-bottom: 1px solid var(--line); display: grid; gap: 12px; }
.rules__c { min-width: 0; }
.rules__l { display: block; margin-bottom: 3px; font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .15em; text-transform: uppercase; }
.rules__no .rules__l { color: var(--wine); }
.rules__why .rules__l { color: var(--muted); }
.rules__yes .rules__l { color: var(--green); }
.rules__no { font-weight: 600; }
.rules__no .rules__l::before { content: counter(rule, decimal-leading-zero) ' · '; color: var(--muted); }
.rules__why { color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
.rules__yes { font-size: 15.5px; line-height: 1.55; }
.rules__head { display: none; }
@media (min-width: 860px) {
  .rules__head { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 28px; padding: 0 0 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); margin-top: 24px; }
  .rules__head + .rules { margin-top: 0; }
  .prose .rules > li { grid-template-columns: 1fr 1.15fr 1fr; gap: 28px; }
  .rules__l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .rules__no::before { content: counter(rule, decimal-leading-zero); float: left; margin-right: 10px; font: 500 12px/1.9 var(--mono); color: var(--muted); }
}

/* regulation document */
.doc { margin: 26px 0; border: 1px solid var(--line); border-radius: 16px; background: var(--card); overflow: hidden; }
.doc__tools { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); background: var(--paper-2); }
.doc__body { padding: clamp(18px, 4vw, 40px); }
.prose .doc__title { font-family: var(--serif); font-weight: 400; font-size: clamp(21px, 3vw, 27px); line-height: 1.25; margin: 0 0 6px; }
.prose .doc__h { margin: 26px 0 8px; font-size: 17px; }
.prose .doc__p { margin: 0 0 .7em; padding-left: 2.9em; text-indent: -2.9em; font-size: 16px; line-height: 1.6; }
@media (max-width: 520px) { .prose .doc__p { padding-left: 0; text-indent: 0; } .doc__no { width: auto; margin-right: .5em; } }
.doc__no { display: inline-block; width: 2.9em; text-indent: 0; font-family: var(--mono); font-size: .82em; color: var(--muted); }
.doc__src { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
mark.blank { background: var(--amber-soft); color: inherit; border-radius: 4px; padding: 0 .2em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* kit downloads */
.kit { margin: 24px 0; border: 1px solid var(--line); border-radius: 16px; background: var(--card); padding: 6px 18px 18px; }
.kit__list { list-style: none; margin: 0 0 16px; padding: 0; }
.prose .kit__list li { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line-2); display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 16px; }
.kit__list span { color: var(--muted); font-size: 14.5px; }
.kit__zip { margin: 0; }

/* statistics */
.stat { display: grid; gap: 6px 36px; padding: 30px 0; border-top: 1px solid var(--line); }
.stat:last-of-type { border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.stat__num { font-family: var(--serif); font-size: clamp(54px, 13vw, 92px); line-height: 1; color: var(--amber); white-space: nowrap; margin: 0; }
.stat__num small { font-size: .42em; margin-left: .12em; }
.stat h3 { margin: 4px 0 10px; font-size: clamp(19px, 2.4vw, 22px); line-height: 1.3; }
.stat p:not(.stat__num) { margin: 0 0 .7em; color: var(--ink-2); }
.stat .src { margin-top: 4px; }
@media (min-width: 760px) { .stat { grid-template-columns: 238px minmax(0, 1fr); align-items: start; } .stat__num { font-size: clamp(60px, 6.6vw, 84px); } .stat__num--long { font-size: clamp(44px, 4.6vw, 60px); padding-top: 12px; } }

/* device / server diagram */
.e2e { margin: 28px 0; display: grid; gap: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--card); overflow: hidden; }
.e2e__side { padding: 20px 22px 22px; }
.e2e__side h3 { margin: 0 0 12px; font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--amber); }
.e2e__side ul { margin: 0; padding-left: 1.15em; font-size: 15.5px; line-height: 1.5; }
.e2e__side li { margin-bottom: .45em; }
.e2e__wire { display: grid; place-items: center; padding: 12px 18px; background: var(--paper-2); border-block: 1px dashed var(--line); text-align: center; font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; color: var(--ink-2); }
.e2e__wire span { display: block; }
.e2e__wire svg { display: block; margin: 0 auto 6px; }
@media (min-width: 760px) { .e2e { grid-template-columns: 1fr 190px 1fr; } .e2e__wire { border-block: 0; border-inline: 1px dashed var(--line); } }

/* zones */
.zones { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 0; margin: 26px 0; border: 1px solid var(--line); border-radius: 18px; background: var(--card); overflow: hidden; list-style: none; padding: 0; }
.prose .zones li { margin: 0; padding: 18px 20px 20px; border-top: 3px solid var(--amber); box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
.zones h3 { margin: 0 0 2px; font-size: 17px; line-height: 1.3; }
.zones p:not(.card__who) { margin: 8px 0 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.prose .zones .card__who { margin: 4px 0 0; }

/* pager */
.pager { display: grid; gap: 12px; margin-top: clamp(56px, 8vw, 92px); padding-top: 26px; border-top: 1.5px solid var(--ink); }
.prose .pager__a { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); text-decoration: none; font-family: var(--serif); font-size: 20px; line-height: 1.25; transition: border-color .15s; }
.prose .pager__a:hover { border-color: var(--ink); color: var(--ink); }
.pager__a span { display: block; margin-bottom: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.pager__a--next span { color: var(--amber); }
@media (min-width: 640px) { .pager { grid-template-columns: 1fr 1fr; } .pager__a--next { text-align: right; } }

/* ---------- video ---------- */
.clip { min-width: 0; }
.clip__frame { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #ece3d1; }
.clip__frame video { width: 100%; aspect-ratio: 16 / 9; background: #ece3d1; }
.clip .clip__title { display: flex; align-items: baseline; gap: 12px; margin: 16px 0 8px; font-family: var(--sans); font-size: 19px; font-weight: 600; line-height: 1.3; letter-spacing: 0; }
.clip__title > span:nth-last-child(2) { flex: 1; min-width: 0; }
.clip__n { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--amber); }
.clip__dur { font-family: var(--mono); font-size: 12.5px; font-weight: 400; color: var(--muted); }
.clip__steps { list-style: none; margin: 0; padding: 0; }
.prose .clip__steps li { margin: 0; padding: 0; }
.clip__step { display: grid; grid-template-columns: 3.1em minmax(0, 1fr); gap: 4px; width: 100%; padding: 8px 10px; border: 0; border-radius: 9px; background: none; color: inherit; font: inherit; font-size: 15.5px; line-height: 1.45; text-align: left; cursor: pointer; }
.clip__step:hover { background: var(--paper-2); }
.clip__step[aria-current] { background: var(--amber-soft); }
.clip__t { font-family: var(--mono); font-size: 12.5px; line-height: 1.8; color: var(--amber); }
html:not(.js) .clip__step { cursor: default; }

.clipbox { margin: 20px 0 26px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.clipbox > summary { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; list-style: none; font-weight: 600; font-size: 15.5px; line-height: 1.35; }
.clipbox > summary::-webkit-details-marker { display: none; }
.clipbox__play { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); position: relative; transition: background .15s; }
.clipbox__play::after { content: ''; position: absolute; left: 12px; top: 9px; border-left: 9px solid var(--paper); border-block: 6px solid transparent; }
.clipbox > summary:hover .clipbox__play, .clipbox[open] .clipbox__play { background: var(--amber); }
.clipbox__label { flex: 1; min-width: 0; }
.clipbox__dur { font-family: var(--mono); font-size: 12.5px; font-weight: 400; color: var(--muted); }
.clipbox .clip { padding: 0 14px 12px; }
.clipbox .clip__title { display: none; }
.clipbox .clip__steps { margin-top: 10px; }

.vp { display: grid; gap: 26px; margin-top: 8px; }
.vp__sum { margin: 0 0 10px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.vp__list ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.prose .vp__list li { margin: 0; padding: 0; }
.prose .vp__item { display: grid; grid-template-columns: 2em minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); text-decoration: none; font-size: 15px; line-height: 1.35; transition: border-color .15s, background .15s; }
.prose .vp__item:hover { border-color: var(--ink); color: var(--ink); }
.prose .vp__item[aria-current] { border-color: var(--amber); background: var(--amber-soft); }
.vp__n { font-family: var(--mono); font-size: 12px; color: var(--amber); }
.vp__dur { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.vp__stage { min-width: 0; display: grid; gap: 54px; }
.vp__stage .clip .clip__title { font-size: clamp(20px, 2.6vw, 24px); margin-top: 18px; }
.js .vp__stage { gap: 0; }
.js .vp__stage .clip { display: none; }
.js .vp__stage .clip.is-active { display: block; }
@media (min-width: 980px) {
  .vp { grid-template-columns: minmax(0, 1fr) 318px; align-items: start; column-gap: 40px; }
  .vp__list { order: 2; position: sticky; top: calc(var(--top) + 24px); }
}

/* ---------- home ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::before { content: ''; position: absolute; inset: -30% auto auto -20%; width: 900px; height: 760px; background: radial-gradient(50% 50% at 50% 50%, rgba(255, 176, 32, .2), transparent 70%); pointer-events: none; }
.hero__in { position: relative; display: grid; gap: clamp(30px, 5vw, 60px); padding-block: clamp(34px, 6.5vw, 86px) clamp(40px, 6vw, 80px); }
.hero h1 { font-size: clamp(33px, 9.2vw, 62px); line-height: 1.04; margin: 18px 0 22px; }
.hero h1 span { display: block; }
.hero h1 em { font-style: normal; color: var(--amber); }
.hero .lede { max-width: 39rem; }
.hero__by { display: flex; align-items: center; gap: 12px; margin-top: 28px; font-size: 15px; line-height: 1.4; color: var(--ink-2); }
.hero__by img { width: 46px; height: 46px; border-radius: 50%; flex: none; }
.hero__by b { display: block; color: var(--ink); font-weight: 600; }
.hero__by a { text-decoration-color: var(--amber); text-underline-offset: 3px; }
@media (min-width: 1000px) { .hero__in { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); align-items: center; } .hero h1 { font-size: clamp(46px, 4.5vw, 58px); } }
.js .hero__in > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.js .hero__in > :nth-child(2) { animation-delay: .12s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* the zoom ticket */
.zoom { min-width: 0; }
.ticket { position: relative; display: grid; background: var(--card); border: 1.5px solid var(--ink); border-radius: 22px; box-shadow: 8px 8px 0 var(--amber-bright); }
.ticket__stub { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 6px 12px; padding: 18px 22px 16px; border-bottom: 1.5px dashed var(--ink); position: relative; }
.ticket__stub::before, .ticket__stub::after { content: ''; position: absolute; bottom: -10px; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--ink); }
.ticket__stub::before { left: -10.5px; clip-path: inset(0 0 0 50%); }
.ticket__stub::after { right: -10.5px; clip-path: inset(0 50% 0 0); }
.ticket__dow, .ticket__mon, .ticket__time { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.ticket__dow { color: var(--amber); align-self: center; }
.ticket__day { font-family: var(--serif); font-size: 74px; line-height: .9; }
.ticket__time { justify-self: end; font-size: 14px; background: var(--ink); color: var(--paper); border-radius: 999px; padding: 7px 12px; letter-spacing: .06em; }
.ticket__time:empty { visibility: hidden; }
.ticket__main { padding: 22px 22px 24px; }
.ticket__title { font-size: clamp(23px, 3vw, 29px); line-height: 1.18; margin: 10px 0 12px; }
.ticket__main p { margin: 0 0 16px; color: var(--ink-2); font-size: 16px; line-height: 1.55; }
.ticket__main p a { text-decoration-color: var(--amber); text-underline-offset: 3px; }
.ticket__cta { display: grid; gap: 10px; margin: 18px 0 12px; }
.ticket__main .ticket__note { margin: 0; font-size: 13.5px; color: var(--muted); }
.ticket--past { box-shadow: none; border-color: var(--line); }
.ticket--past .ticket__stub { border-bottom-color: var(--line); }
.ticket--past .ticket__stub::before, .ticket--past .ticket__stub::after { border-color: var(--line); }
.ticket--past .ticket__day { color: var(--muted); }
@media (min-width: 520px) and (max-width: 999px) { .ticket__cta { grid-template-columns: 1fr 1fr; } }

.sec { padding-block: clamp(46px, 7vw, 92px); border-bottom: 1px solid var(--line); }
.sec__head { display: grid; gap: 12px; margin-bottom: clamp(24px, 4vw, 44px); max-width: 46rem; }
.sec__head h2 { font-size: clamp(28px, 4.4vw, 46px); line-height: 1.08; }
.sec__head p:not(.eyebrow) { margin: 0; color: var(--ink-2); }

/* contents: the book's table of contents */
.contents { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.contents li { border-bottom: 1px solid var(--line); }
.contents a { display: grid; grid-template-columns: 2.6em minmax(0, 1fr); gap: 2px 12px; padding: 20px 0; text-decoration: none; transition: background .2s, padding .2s; }
.contents a:hover { background: var(--card); padding-inline: 14px; }
.contents__n { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--amber); padding-top: .55em; }
.contents__t { font-family: var(--serif); font-size: clamp(22px, 3.2vw, 32px); line-height: 1.15; }
.contents__d { grid-column: 2; color: var(--ink-2); font-size: 15.5px; line-height: 1.5; max-width: 44rem; }
.contents__for { grid-column: 2; margin-top: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
@media (min-width: 900px) {
  .contents a { grid-template-columns: 3.4em minmax(0, 1fr) 15rem; align-items: baseline; }
  .contents__d { grid-column: 2; }
  .contents__for { grid-column: 3; grid-row: 1 / span 2; margin: 0; text-align: right; align-self: center; }
}

.who { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.who li { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 10px; }
.who h3 { font-family: var(--serif); font-weight: 400; font-size: 24px; line-height: 1.2; }
.who p { margin: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
.who__path { margin-top: auto !important; padding-top: 10px; font-size: 14.5px !important; }
.who__path a { text-decoration-color: var(--amber); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

.theses { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 0 44px; counter-reset: th; }
.theses li { counter-increment: th; padding: 20px 0 20px 54px; border-top: 1px solid var(--line); position: relative; }
.theses li::before { content: counter(th); position: absolute; left: 0; top: 14px; font-family: var(--serif); font-size: 38px; line-height: 1; color: var(--amber); }
.theses b { display: block; font-size: 18px; line-height: 1.3; margin-bottom: 4px; }
.theses span { color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }

.author { display: grid; gap: 22px 56px; }
.author__who { display: flex; align-items: center; gap: 18px; }
.author__pic { width: 84px; height: 84px; border-radius: 50%; flex: none; }
.author__who h2 { font-size: clamp(26px, 4vw, 40px); line-height: 1.1; margin-top: 6px; }
.author__text p { margin: 0 0 .9em; color: var(--ink-2); max-width: 40rem; }
.author__text a, .author__cta p a:not(.btn) { text-decoration-color: var(--amber); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.author__cta { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 24px 24px 22px; }
.author__cta h3 { font-family: var(--serif); font-weight: 400; font-size: 25px; line-height: 1.2; margin-bottom: 10px; }
.author__cta p { margin: 0 0 16px; color: var(--ink-2); font-size: 16px; line-height: 1.55; }
.author__btns { display: grid; gap: 10px; margin: 0 !important; }
@media (min-width: 520px) and (max-width: 939px) { .author__btns { grid-template-columns: 1fr 1fr; } }
@media (min-width: 940px) { .author { grid-template-columns: minmax(0, 1fr) minmax(0, .92fr); align-items: start; } .author__cta { grid-column: 2; grid-row: 1 / span 2; } }

/* ---------- footer ---------- */
.foot { background: var(--paper-2); border-top: 1px solid var(--line); }
.foot__in { padding-block: clamp(36px, 5vw, 60px) 30px; display: grid; gap: 34px; }
.by { display: flex; gap: 14px; align-items: flex-start; max-width: 40rem; }
.home .by { display: none; }
.by__pic { width: 52px; height: 52px; border-radius: 50%; flex: none; }
.by__name { margin: 0 0 2px; font-family: var(--serif); font-size: 20px; }
.by__text { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.foot a { text-decoration-color: var(--line); text-underline-offset: 3px; }
.foot a:hover { text-decoration-color: var(--amber); }
.foot__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 26px 40px; }
.foot__h { margin: 0 0 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.foot ul { list-style: none; margin: 0; padding: 0; font-size: 15px; line-height: 1.5; }
.foot li { margin-bottom: 7px; }
.foot__note { margin: 0; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.55; color: var(--muted); max-width: 56rem; }

.nf { padding-block: clamp(60px, 12vw, 160px); }
.nf h1 { font-size: clamp(34px, 6vw, 64px); margin: 14px 0 18px; }
.nf a { text-decoration-color: var(--amber); text-underline-offset: 3px; }

@media print {
  .top, .foot, .toc, .toc-m, .pager, .code__tools, .cmd__copy, .doc__tools, .chip-zoom, .clip__frame { display: none !important; }
  body { background: #fff; font-size: 11.5pt; }
  .pgrid { display: block; padding: 0; }
  .prose { max-width: none; }
  .phead__num { display: none; }
  details > * { display: block !important; }
}
