/* Guides section (/guides and /guides/<slug>). Tokens only, so light and dark follow the site theme. */
.page-guides .guide-hero { padding-bottom: 32px; }
.page-guides .guide-hero .display { font-size: var(--ot-fs-h1); line-height: var(--ot-lh-h1); max-width: 820px; }
.page-guides .guide-hero .lead { max-width: 680px; }
.page-guides .guide-meta { margin: 16px 0 0; font-size: 14px; color: var(--ot-text-dim); }
.page-guides .crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; list-style: none; margin: 0 0 18px; padding: 0; font-size: 14px; color: var(--ot-text-dim); }
.page-guides .crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--ot-text-faint); }
.page-guides .crumbs a { color: var(--ot-text-2); }
.page-guides .crumbs a:hover { color: var(--ot-gold-text); }
.page-guides .crumbs li[aria-current] { overflow-wrap: anywhere; }

.page-guides .guide-article { max-width: 760px; min-width: 0; font-size: 16.5px; line-height: 1.65; color: var(--ot-text-2); }
.page-guides .guide-article > :first-child { margin-top: 0; }
.page-guides .guide-article h2 { font-size: var(--ot-fs-h2); line-height: var(--ot-lh-h2); letter-spacing: -0.01em; font-weight: 600; color: var(--ot-text); margin: 48px 0 14px; scroll-margin-top: 96px; text-wrap: balance; }
.page-guides .guide-article p { margin: 0 0 16px; }
.page-guides .guide-article strong { color: var(--ot-text); font-weight: 600; }
.page-guides .guide-article a:not(.btn) { color: var(--ot-gold-text); text-decoration: underline; text-underline-offset: 3px; }
.page-guides .guide-article a:not(.btn):hover { color: var(--ot-gold-hi); }
.page-guides .guide-article ul, .page-guides .guide-article ol { margin: 0 0 18px; padding-left: 22px; display: grid; gap: 10px; }
.page-guides .guide-article li::marker { color: var(--ot-gold-text); }
/* A code block inside a list item scrolls inside the item instead of widening the list's grid track. */
.page-guides .guide-article li { min-width: 0; }
.page-guides .guide-article li > .code-block, .page-guides .guide-article li > p { margin-top: 10px; }
.page-guides .guide-article code { font-family: var(--ot-font-mono); font-size: 0.86em; padding: 2px 6px; border-radius: 4px; background: var(--ot-surface-2); border: 1px solid var(--ot-hair); color: var(--ot-text); overflow-wrap: anywhere; }

/* The first paragraph is the short answer. */
.page-guides .guide-article .guide-answer { font-size: var(--ot-fs-lead); line-height: var(--ot-lh-lead); color: var(--ot-text); padding: 4px 0 4px 20px; border-left: 3px solid var(--ot-gold); margin-bottom: 28px; }

.page-guides .guide-figures { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; margin: 0 0 8px; }
.page-guides .guide-figure { margin: 0; border-radius: var(--ot-r-xl); overflow: hidden; background: var(--ot-well); border: 1px solid var(--ot-hair); box-shadow: var(--ot-shadow-raise-1); }
.page-guides .guide-figure img { display: block; width: 100%; height: auto; }
.page-guides .guide-figure.square { flex: 1 1 280px; max-width: 360px; }
.page-guides .guide-figure.portrait { flex: 0 1 190px; max-width: 190px; }

.page-guides .table-wrap { overflow-x: auto; margin: 0 0 22px; border: 1px solid var(--ot-hair); border-radius: var(--ot-r-md); }
.page-guides .guide-article table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; min-width: 440px; }
.page-guides .guide-article th, .page-guides .guide-article td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--ot-hair); }
.page-guides .guide-article thead th, .page-guides .guide-article thead td { background: var(--ot-surface-2); color: var(--ot-text); font-weight: 600; }
.page-guides .guide-article tbody th { color: var(--ot-text); font-weight: 600; }
.page-guides .guide-article tbody tr:last-child > * { border-bottom: 0; }

.page-guides .code-block { position: relative; margin: 0 0 22px; }
.page-guides .code-block pre { margin: 0; overflow-x: auto; padding: 16px 18px; padding-right: 76px; border-radius: var(--ot-r-md); background: var(--ot-surface); border: 1px solid var(--ot-hair); font: 400 14px/1.6 var(--ot-font-mono); color: var(--ot-text-2); }
.page-guides .code-block pre code { padding: 0; border: 0; background: none; font-size: inherit; color: inherit; overflow-wrap: normal; white-space: pre; }
.page-guides .code-copy { position: absolute; top: 10px; right: 10px; min-height: 32px; padding: 0 12px; border-radius: var(--ot-r-sm); border: 0; cursor: pointer; font: 500 13px/1 var(--ot-font-sans); color: var(--ot-text); background: var(--ot-surface-2); box-shadow: inset 0 0 0 1px var(--ot-hair-strong); }
.page-guides .code-copy:hover { box-shadow: inset 0 0 0 1px var(--ot-tile-edge); }
.page-guides .code-copy[hidden] { display: none; }

/* The download panel. */
.page-guides .guide-cta { margin: 36px 0; padding: 26px 28px; border-radius: var(--ot-r-xl); background: var(--ot-surface); border: 1px solid var(--ot-hair-strong); box-shadow: var(--ot-shadow-raise-1), inset 0 1px 0 var(--ot-hair); display: grid; gap: 4px; justify-items: start; }
.page-guides .guide-article .guide-cta p { margin: 0; }
.page-guides .guide-article .guide-cta .guide-cta-title { font-size: 20px; line-height: 1.3; font-weight: 600; color: var(--ot-text); }
.page-guides .guide-cta .btn { margin-top: 14px; white-space: normal; text-align: center; text-decoration: none; }

.page-guides .guide-faq .faq-list { display: grid; gap: 0; }
.page-guides .guide-faq .faq-item { padding: 18px 0; border-top: 1px solid var(--ot-hair); }
.page-guides .guide-faq .faq-item:last-child { border-bottom: 1px solid var(--ot-hair); }
.page-guides .guide-faq h3 { margin: 0 0 6px; font-size: 17px; line-height: 1.4; font-weight: 600; color: var(--ot-text); }
.page-guides .guide-faq .faq-item p { margin: 0; }

.page-guides .guide-related ul { list-style: none; padding: 0; gap: 0; }
.page-guides .guide-related li { border-top: 1px solid var(--ot-hair); }
.page-guides .guide-related li:last-child { border-bottom: 1px solid var(--ot-hair); }
.page-guides .guide-related li a { display: block; padding: 14px 0; }

/* Index list */
.page-guides .guide-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; max-width: 760px; }
.page-guides .guide-link { display: grid; gap: 8px; padding: 26px 28px; border-radius: var(--ot-r-xl); background: var(--ot-surface); border: 1px solid var(--ot-hair); box-shadow: var(--ot-shadow-raise-1); color: var(--ot-text-2); }
.page-guides .guide-link:hover { border-color: var(--ot-hair-strong); }
.page-guides .guide-link-title { font-size: 20px; line-height: 1.3; font-weight: 600; color: var(--ot-text); }
.page-guides .guide-link:hover .guide-link-title { color: var(--ot-gold-text); }
.page-guides .guide-link-desc { font-size: 15px; line-height: 1.55; }

/* Blog articles (/blog/<slug>, src/blog-page.ts) use these reading styles. The post title is the page's h1;
   Markdown "## Section" is an h2 (the guides' h2 style), "###" an h3 and "####" an h4. */
.page-guides .blog-article { margin-top: 28px; }
.page-guides .blog-article .guide-meta { margin: 0 0 20px; }
.page-guides .blog-article .guide-figures { margin: 0 0 32px; }
.page-guides .blog-article .blog-hero { flex: 1 1 100%; min-width: 0; }
.page-guides .blog-article h3 { font-size: var(--ot-fs-h3); line-height: var(--ot-lh-h3); font-weight: 600; color: var(--ot-text); margin: 40px 0 12px; scroll-margin-top: 96px; text-wrap: balance; }
.page-guides .blog-article h4 { font-size: 17px; line-height: 1.4; font-weight: 600; color: var(--ot-text); margin: 28px 0 8px; }
.page-guides .blog-article .guide-related h2 { margin-top: 56px; }

@media (max-width: 719px) {
  .page-guides .guide-article table { min-width: 0; font-size: 14px; }
  .page-guides .guide-article th, .page-guides .guide-article td { padding: 9px 10px; overflow-wrap: anywhere; }
  .page-guides .guide-article { font-size: 16px; }
  .page-guides .guide-article h2 { margin-top: 40px; }
  .page-guides .guide-cta { padding: 22px 20px; }
  .page-guides .guide-cta .btn { width: 100%; }
  .page-guides .guide-link { padding: 22px 20px; }
  .page-guides .guide-figure.portrait { flex-basis: 150px; max-width: 150px; }
}

/* B2 + GD1: one reading layout for the guide, the guides and the blog posts. A 960 px column, body 19/1.7 justified. */
.page-blog.page-guides .account-wrap { max-width: calc(960px + 2 * var(--ot-space-gutter)); }
.page-guides .guide-article { max-width: 960px; font-size: 19px; line-height: 1.7; }
.page-guides .guide-article :is(p, li) { hyphens: auto; -webkit-hyphens: auto; text-wrap: pretty; }
/* Justified from 720 px up; on a phone the measure is too short to justify without rivers, so text stays ragged there. */
@media (min-width: 720px) {
  .page-guides .guide-article :is(p, li) { text-align: justify; }
}
.page-guides .guide-article :is(h2, h3, h4, th, td, pre), .page-guides .guide-article :is(.guide-cta, .guide-related, .guide-meta) p,
.page-guides .guide-article .guide-related li { text-align: left; hyphens: manual; }
.page-guides .guide-article code { hyphens: none; -webkit-hyphens: none; }
/* Paths and commands cannot break, so a paragraph or item that holds code is set ragged instead of stretching its spaces. */
.page-guides .guide-article :is(p, li):has(code) { text-align: left; }
.page-guides .guide-article h3 { font-size: 22px; line-height: 1.35; }
.page-guides .guide-article h4 { font-size: 19px; }
.page-guides .guide-faq h3 { font-size: 20px; margin-bottom: 8px; }
.page-guides .guide-article table { font-size: 16px; }
.page-guides .guide-article ul, .page-guides .guide-article ol { gap: 12px; }

/* Figures: centred, at most 560 px tall (B3), the frame hugs the image. */
.page-guides .guide-figures { justify-content: center; gap: 16px; margin: 0 0 8px; }
.page-guides .guide-figures .guide-figure { flex: 0 1 auto; max-width: 100%; }
.page-guides .guide-figures .guide-figure img { width: auto; max-width: 100%; height: auto; max-height: 560px; }
.page-guides .blog-article .guide-figures { margin: 0 0 40px; }

/* G3: a button sits 24 px under the text above it. */
.page-guides .guide-cta .btn { margin-top: 24px; }

@media (max-width: 719px) {
  .page-guides .guide-article { font-size: 17px; line-height: 1.65; }
  .page-guides .guide-article h3 { font-size: 20px; }
  .page-guides .guide-article table { font-size: 14px; }
}

/* GI1 + G3: the guide list is a grid of cards in the blog index's card style (surface, 1 px hair border, radius lg, 24 px padding), 16 px apart. */
.page-guides .guide-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; max-width: none; }
.page-guides .guide-card-item { display: grid; min-width: 0; }
.page-guides .guide-link { align-content: start; gap: 12px; min-width: 0; padding: 24px; border-radius: var(--ot-r-lg); background: var(--ot-surface); border: 1px solid var(--ot-hair); box-shadow: none; }
.page-guides .guide-link-title { font-size: 22px; line-height: 1.3; text-wrap: balance; overflow-wrap: anywhere; }
.page-guides .guide-link-desc { font-size: 16px; line-height: 1.6; overflow-wrap: anywhere; }
@media (max-width: 999px) { .page-guides .guide-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 719px) { .page-guides .guide-list { grid-template-columns: minmax(0, 1fr); } .page-guides .guide-link { padding: 20px; } }

/* K: keypad overlay. The hardware is drawn once (the #kpo-hw symbol in the page's sprite) with transparent key windows;
   the screen media sits behind it in a box that is exactly the rect x=139.5 y=134 w=h=724.559 of the 1000 x 1175 viewBox. */
.kpo{position:relative;display:block;width:100%;aspect-ratio:1000/1175;margin:0}
.kpo-media{position:absolute;left:13.95%;top:11.4043%;width:72.4559%;height:61.6646%;overflow:hidden;background:#0d0c0b}
/* The underlay reaches 10 viewBox units past the window grid, under the key caps. Where an outer window edge meets the media edge, both are anti-aliased at one sub-pixel position and the light page showed through as a line. */
.kpo::before{content:"";position:absolute;left:12.95%;top:10.5532%;width:74.4559%;height:63.3667%;background:#0d0c0b}
.kpo.kpo.kpo .kpo-media>img,.kpo.kpo.kpo .kpo-media>video{display:block;width:100%;height:100%;max-width:none;max-height:none;margin:0;object-fit:cover;border-radius:0}
.kpo-hw{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}
.guide-figure.kpo-fig,.page-guides .guide-figures .guide-figure.kpo-fig{flex:0 1 480px;width:min(100%,480px);max-width:100%;background:none;border:0;box-shadow:none;border-radius:0;overflow:visible}
.page-guides .guide-figures .guide-figure.kpo-fig .kpo{width:100%}
