/* PCB Canvas website. Hand-written, no build step. Mobile first.
   Colours follow the app themes (src/ui/theme.odin): accent #F25C1A with white text (day and night; icon #FF6A2A)
   (night uses the same fill); amber warnings stay apart from it. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/Inter-Regular.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/Inter-Medium.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/Inter-SemiBold.woff2") format("woff2"); }
/* Metric-matched fallback so the swap to Inter does not shift the layout. */
@font-face { font-family: "Inter Fallback"; src: local("Arial"), local("Helvetica"); ascent-override: 90.2%; descent-override: 22.5%; line-gap-override: 0%; size-adjust: 107.4%; }

:root {
  --bg: #ffffff;
  --surface: #f0f1f4;
  --surface-2: #ffffff;
  --border: rgba(0, 0, 0, .1);
  --text: #1c1e24;
  --muted: #5f6470;
  --accent: #f25c1a;
  --accent-text: #ffffff;
  --accent-soft: rgba(255, 106, 42, .12);
  --link: #c2410c;
  --warn-bg: #fff6db;
  --warn-text: #8a5a00;
  --error-text: #b42318;
  --error-bg: #fdecea;
  --input-border: rgba(0, 0, 0, .28);
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.06);
  --radius: 14px;
  --font: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --text-w: 720px;
  --wide-w: 1120px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1e1f23;
    --surface: #2a2c32;
    --surface-2: #26282d;
    --border: rgba(255, 255, 255, .1);
    --text: #ecedf0;
    --muted: #a3a8b2;
    --accent: #f25c1a;
    --accent-soft: rgba(255, 128, 64, .16);
    --link: #ff9a66;
    --warn-bg: #3a2f10;
    --warn-text: #ffc233;
    --error-text: #ff9b8f;
    --error-bg: #3d1f1c;
    --input-border: rgba(255, 255, 255, .3);
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.3);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1rem/1.6 var(--font); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
img, video, svg { max-width: 100%; height: auto; }
img, video { display: block; }
a { color: var(--link); text-underline-offset: .15em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; font-weight: 600; letter-spacing: -.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -.025em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.75rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
code, kbd, .mono { font-family: var(--mono); font-size: .9em; }
:not(pre) > code { background: var(--surface); padding: .1em .35em; border-radius: 5px; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.block { display: block; }
.center { text-align: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--accent); color: var(--accent-text); padding: .5rem 1rem; border-radius: 8px; z-index: 10; }
.skip:focus { top: 1rem; }

.wrap { width: 100%; max-width: var(--wide-w); margin: 0 auto; padding: 0 1rem; }
.wrap-text { max-width: calc(var(--text-w) + 2rem); margin: 0 auto; padding: 0 1rem; }
.wrap-wide { max-width: calc(960px + 2rem); margin: 0 auto; padding: 0 1rem; }
.narrow { max-width: calc(var(--text-w) + 2rem); }
@media (min-width: 760px) { .wrap, .wrap-text, .wrap-wide { padding: 0 2rem; } .wrap-text { max-width: calc(var(--text-w) + 4rem); } .wrap-wide { max-width: calc(960px + 4rem); } .narrow { max-width: calc(var(--text-w) + 4rem); } }

/* header */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--border); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 1rem; min-height: 3.5rem; }
.logo { display: inline-flex; align-items: center; gap: .55rem; color: var(--text); font-weight: 600; text-decoration: none; padding: .6rem 0; }
.logo-mark { flex: none; }
.app-icon { width: 96px; height: 96px; margin: 0 0 1.25rem; filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .14)); }
.site-nav { width: 100%; overflow-x: auto; scrollbar-width: none; margin: 0 -1rem; padding: 0 1rem; width: calc(100% + 2rem); }
.site-nav ul { display: flex; gap: 0; list-style: none; margin: 0; padding: 0 0 .5rem; }
.site-nav a { display: flex; align-items: center; min-height: 44px; padding: .4rem .6rem; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: .95rem; white-space: nowrap; }
.site-nav a:hover { color: var(--text); background: var(--surface); }
.site-nav a[aria-current="page"] { color: var(--accent-text); background: var(--accent); }
@media (max-width: 400px) { .site-nav a { font-size: .9rem; padding: .4rem .5rem; } }
@media (min-width: 760px) {
  .site-nav { width: auto; margin: 0; padding: 0; overflow: visible; }
  .site-nav ul { padding: 0; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .6rem 1.1rem; border-radius: 999px; background: var(--accent); color: var(--accent-text); font-weight: 600; font-size: .95rem; text-decoration: none; border: 1px solid transparent; cursor: pointer; font-family: inherit; line-height: 1.2; }
.btn:hover { filter: brightness(1.08); }
.btn .icon { width: 18px; height: 18px; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface); filter: none; }
.btn-small { min-height: 36px; padding: .4rem .85rem; font-size: .875rem; }
.btn-lg { min-height: 52px; padding: .7rem 1.4rem; font-size: 1.2rem; }
.btn-disabled { background: var(--surface); color: var(--muted); cursor: default; }
.btn-disabled:hover { filter: none; }
.btn-store { background: var(--text); color: var(--bg); min-height: 52px; padding: .5rem 1.2rem; border-radius: 12px; }
.btn-store span { display: flex; flex-direction: column; text-align: left; font-size: 1.05rem; line-height: 1.15; }
.btn-store small { font-size: .7rem; font-weight: 500; opacity: .8; }
.actions, .cta-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.cta-row { margin-bottom: 1rem; }
.cta-center { justify-content: center; }

.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 600; color: var(--link); margin-bottom: .6rem; }
@media (prefers-color-scheme: dark) { .eyebrow { color: var(--link); } }
.lede { font-size: 1.15rem; color: var(--muted); }
.meta { color: var(--muted); font-size: .875rem; margin-bottom: .4rem; }
.badge { display: inline-block; padding: 0 .45rem; border-radius: 6px; font-size: .75rem; font-weight: 600; }
.badge-warn, .notice-warn { background: var(--warn-bg); color: var(--warn-text); }
.notice { padding: .75rem 1rem; border-radius: 10px; background: var(--surface); font-size: .925rem; }
.card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.card > :last-child { margin-bottom: 0; }
.small-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin-bottom: .75rem; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li + li { margin-top: .35rem; }

/* sections */
.page-head { padding-top: 2.5rem; padding-bottom: 1.5rem; }
.page-head.center .actions { justify-content: center; }
.section { padding: 3.5rem 0; }
.section-alt { background: var(--surface); }
.section-title { margin-bottom: 1.5rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.section-head > a { display: inline-flex; align-items: center; min-height: 44px; }

/* hero */
.hero { padding: 2.5rem 0 2rem; overflow: hidden; }
.hero-grid { display: grid; gap: 2rem; align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 6.5vw, 3.2rem); }
.device { border-radius: 18px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--surface); aspect-ratio: 16 / 10; }
.device img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) {
  .hero { padding: 4.5rem 0 3.5rem; }
  .hero-grid { grid-template-columns: 5fr 6fr; gap: 3rem; }
}

.features { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.feature { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.feature p { color: var(--muted); margin: 0; font-size: .95rem; }
.feature-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--link); margin-bottom: .75rem; }
.split { display: grid; gap: 2rem; align-items: center; }
.split img { border-radius: var(--radius); border: 1px solid var(--border); }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 3rem; } }
.cta-band { text-align: center; }
.cta-inner { max-width: 640px; }
.cta-inner p { color: var(--muted); }

/* landing: proof strip, feature rows, "also", FAQ (app/landing.py) */
.proof { border-block: 1px solid var(--border); background: var(--surface-2); }
.proof-list { list-style: none; margin: 0; padding: 1.5rem 0; display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
.proof-list li { display: flex; flex-direction: column; gap: .2rem; }
.proof-list strong { font-size: 1.6rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
.proof-list span { color: var(--muted); font-size: .95rem; }
@media (min-width: 760px) { .proof-list { grid-template-columns: repeat(3, 1fr); gap: 2rem; padding: 2rem 0; } }
.feature-rows { display: grid; gap: 3rem; }
.feature-row { display: grid; gap: 1.25rem; align-items: center; scroll-margin-top: 5rem; }
.feature-row h3 { font-size: clamp(1.3rem, 2.6vw, 1.6rem); }
.feature-text p:last-child { color: var(--muted); margin: 0; }
.feature-media img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--surface); }
@media (min-width: 900px) {
  .feature-row { grid-template-columns: 5fr 7fr; gap: 3rem; }
  .feature-row:nth-child(even) .feature-text { order: 2; }
  .feature-rows { gap: 4.5rem; }
}
.also { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem 1.5rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.also li { padding-left: 1.6rem; position: relative; }
.also li::before { content: "✓"; position: absolute; left: 0; color: var(--link); font-weight: 600; }
.faq { display: grid; gap: .6rem; }
.faq details { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 0 1rem; }
.faq summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; padding: .6rem 0; list-style-position: outside; }
.faq summary::marker { color: var(--muted); }
.faq details[open] summary { border-bottom: 1px solid var(--border); margin-bottom: .75rem; }
.faq details p { color: var(--text); }
.lang-switch a { display: inline-flex; align-items: center; min-height: 44px; }
.plans-note { max-width: 42rem; margin-left: auto; margin-right: auto; }
.plan h3 { font-size: 1.35rem; }
.price-period { display: block; font-size: .875rem; font-weight: 400; line-height: 1.4; margin-top: .2rem; }

/* beta signup form (partials/beta_form.html) */
.beta-card { padding: 1.5rem; }
.beta-form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 600; font-size: .95rem; }
.field input[type="email"], .field input[type="text"], .field select { width: 100%; min-height: 48px; padding: .6rem .9rem; border-radius: 12px; border: 1px solid var(--input-border); background: var(--bg); color: var(--text); font: inherit; }
.field select { appearance: auto; }
.field [aria-invalid="true"] { border-color: var(--error-text); box-shadow: 0 0 0 1px var(--error-text); }
.field-check { grid-template-columns: auto 1fr; align-items: start; gap: .25rem .75rem; }
.field-check input { width: 24px; height: 24px; margin: 10px; accent-color: var(--accent); }
.field-check label { font-weight: 400; font-size: .925rem; padding: .55rem 0; min-height: 44px; }
.field-check .field-error { grid-column: 2; }
.field-error { color: var(--error-text); font-size: .9rem; margin: 0; }
.form-errors { background: var(--error-bg); color: var(--error-text); border-radius: 10px; padding: .75rem 1rem; }
.form-errors p { margin: 0 0 .3rem; font-weight: 600; }
.form-errors ul { margin: 0; padding-left: 1.2rem; }
.form-errors a { color: inherit; }
.beta-form .btn { justify-self: start; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.notice-title { font-weight: 600; margin-bottom: .3rem; }
.beta-closed p:last-child { margin-bottom: 0; }

/* blog list */
.post-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.post-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.post-card-img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--surface); }
.post-card-body { padding: 1rem 1.25rem 1.25rem; }
.post-card-body p:last-child { margin: 0; color: var(--muted); font-size: .95rem; }
.post-card-title { font-size: 1.2rem; margin: .1rem 0 .4rem; }
.post-card-title a { color: var(--text); text-decoration: none; }
.post-card-title a:hover { color: var(--link); }
.blog-layout { display: grid; gap: 2rem; padding-bottom: 3rem; }
.post-list { display: grid; gap: 1.25rem; }
.post-list .post-card { flex-direction: column; }
@media (min-width: 700px) {
  .post-list .post-card { flex-direction: row; }
  .post-list .post-card-img { flex: 0 0 38%; }
  .post-list .post-card-img img { height: 100%; }
}
@media (min-width: 1000px) { .blog-layout { grid-template-columns: 1fr 240px; } }
.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.tag { display: inline-block; padding: .2rem .65rem; border-radius: 999px; background: var(--surface); color: var(--text); text-decoration: none; font-size: .85rem; }
.tag:hover, .tag[aria-current="page"] { background: var(--accent-soft); color: var(--link); }
.tag .count { color: var(--muted); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: 1rem; }

/* post */
.post-head { padding-top: 2.5rem; }
.post-head .tags { margin-bottom: 1.5rem; }
.post-cover { margin: 0 auto 2rem; }
.post-cover img { border-radius: var(--radius); border: 1px solid var(--border); width: 100%; }
.post-body { max-width: calc(var(--text-w) + 2rem); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 760px) { .post-body { max-width: calc(var(--text-w) + 4rem); padding: 0 2rem; } }
.toc { margin-bottom: 2rem; border: 1px solid var(--border); border-radius: 12px; padding: .75rem 1rem; font-size: .9rem; }
.toc summary { cursor: pointer; font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.toc ol { list-style: none; padding: 0; margin: .5rem 0 0; }
.toc li { margin: .3rem 0; }
.toc .toc-l3 { padding-left: 1rem; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--link); }
@media (min-width: 1240px) {
  .post-body.has-toc { max-width: calc(var(--text-w) + 2 * 260px + 4rem); display: grid; grid-template-columns: 220px minmax(0, var(--text-w)) 220px; gap: 2rem; }
  .post-body.has-toc .toc { position: sticky; top: 5rem; align-self: start; border: 0; padding: 0; }
}
.post-foot { padding-top: 2rem; padding-bottom: 4rem; }
.prev-next { display: grid; gap: .75rem; grid-template-columns: 1fr; margin-bottom: 1.5rem; border-top: 1px solid var(--border); padding-top: 1.5rem; }
@media (min-width: 600px) { .prev-next { grid-template-columns: 1fr 1fr; } }
.pn { display: flex; flex-direction: column; gap: .2rem; padding: .9rem 1rem; border: 1px solid var(--border); border-radius: 12px; text-decoration: none; color: var(--text); font-weight: 500; }
.pn:hover { border-color: var(--accent); }
.pn-next { text-align: right; }

/* prose */
.prose { font-size: 1.0625rem; line-height: 1.7; overflow-wrap: break-word; }
.prose h2 { margin-top: 2.2em; }
.prose h3 { margin-top: 1.8em; }
.prose h2 .header-anchor, .prose h3 .header-anchor { margin-left: .35em; color: var(--muted); text-decoration: none; opacity: 0; font-weight: 400; }
.prose h2:hover .header-anchor, .prose h3:hover .header-anchor, .header-anchor:focus { opacity: 1; }
@media (hover: none) { .prose .header-anchor { opacity: .35; } }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: .3em 0; }
.prose blockquote { margin: 1.5em 0; padding: .1em 1.1em; border-left: 3px solid var(--accent); color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.5em 0; }
.prose figure { margin: 2em 0; }
.prose figure img, .prose > p > img { border-radius: 12px; border: 1px solid var(--border); width: 100%; }
.prose figcaption { color: var(--muted); font-size: .9rem; margin-top: .6rem; text-align: center; }
.prose figcaption .dl { display: block; font-size: .85rem; }
.table-wrap { overflow-x: auto; margin: 1.5em 0; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: .925rem; }
th, td { text-align: left; padding: .55rem .75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.code { position: relative; margin: 1.5em 0; }
.code .highlight { border-radius: 12px; background: var(--surface); overflow-x: auto; }
.code pre { margin: 0; padding: 1rem 1.1rem; font-size: .875rem; line-height: 1.55; }
.code[data-lang]::after { content: attr(data-lang); position: absolute; top: .4rem; right: .7rem; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.footnotes { font-size: .9rem; color: var(--muted); }
.video video { width: 100%; border-radius: 12px; background: #000; aspect-ratio: 16 / 10; }
.video-missing { padding: 1rem; border: 1px dashed var(--border); border-radius: 12px; color: var(--muted); }
.project-card { display: grid; grid-template-columns: auto 1fr; gap: 1rem; margin: 2em 0; padding: 1.25rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); box-shadow: var(--shadow); }
.project-card p { margin-bottom: .5rem; font-size: .975rem; }
.project-card .eyebrow { margin-bottom: .2rem; }
.project-name { margin: 0 0 .3rem; font-size: 1.2rem; }
.project-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--accent) url("../img/pack.svg") center / 28px no-repeat; }
.project-card .actions { margin: .5rem 0 0; }

/* tutorials */
.tutorial-list { list-style: none; padding: 0; margin: 0 0 3rem; display: grid; gap: 1.5rem; }
.tutorial { display: grid; gap: 1.25rem; padding: 1.25rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.tutorial h2 a { color: var(--text); text-decoration: none; }
.tutorial-media { position: relative; display: block; border-radius: 10px; overflow: hidden; }
.tutorial-media .play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.tutorial-media .play .icon { width: 56px; height: 56px; padding: 14px; border-radius: 50%; background: rgba(0,0,0,.55); fill: currentColor; }
@media (min-width: 760px) { .tutorial { grid-template-columns: 360px 1fr; align-items: center; } }
.prose-narrow { max-width: var(--text-w); padding-bottom: 3rem; }

/* pricing, download */
.plans { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); max-width: 760px; margin: 0 auto 1.5rem; }
.plan { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; background: var(--surface-2); }
.plan-featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.price { font-size: 2rem; font-weight: 600; margin-bottom: .5rem; }
.checks { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.checks li { padding-left: 1.6rem; position: relative; margin: .4rem 0; }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--link); font-weight: 600; }
.cards-2 { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-bottom: 1.5rem; }
.page { padding-top: 2.5rem; padding-bottom: 4rem; }

/* library */
.search { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.search input, .search select { flex: 1 1 14rem; min-height: 44px; padding: .55rem .9rem; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; }
.search select { flex: 0 1 14rem; }
.pack-grid { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.pack-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; background: var(--surface-2); }
.pack-card h2 { font-size: 1.25rem; }
.pack-card h2 a { color: var(--text); text-decoration: none; }
.pack-card h2 a:hover { color: var(--link); }
.pack-card p:not(.meta):not(.eyebrow) { color: var(--muted); font-size: .95rem; }
.pack-layout { display: grid; gap: 2rem; padding-bottom: 3rem; }
.pack-aside { display: grid; gap: 1rem; align-content: start; }
@media (min-width: 1000px) { .pack-layout { grid-template-columns: minmax(0, 1fr) 300px; } }
.parts td .block { max-width: 34rem; }
.parts td { overflow-wrap: anywhere; }
.parts td.mono { font-size: .8rem; }
@media (min-width: 641px) {
  .parts { table-layout: fixed; }
  .parts th:nth-child(1) { width: 38%; }
  .parts th:nth-child(2) { width: 32%; }
  .parts th:nth-child(4) { width: 14%; }
}
@media (max-width: 640px) { .hide-sm { display: none; } }
.part-layout { display: grid; gap: 1.25rem; margin-bottom: 2rem; }
@media (min-width: 800px) { .part-layout { grid-template-columns: 1fr 1fr; } }
.preview { display: flex; flex-direction: column; }
.preview-img { width: 100%; max-height: 260px; object-fit: contain; margin: auto; background: var(--bg); border-radius: 10px; padding: 1rem; }
.preview-missing { margin: auto; padding: 3rem 0; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1rem; margin: 0 0 1rem; }
.facts dt { color: var(--muted); font-size: .875rem; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.pins { max-width: 560px; }

/* footer */
.site-footer { border-top: 1px solid var(--border); padding: 2.5rem 0 2rem; font-size: .925rem; }
.footer-grid { display: grid; gap: 1.5rem; }
.footer-brand { font-weight: 600; margin-bottom: .3rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem 1.5rem; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer-fine { margin-top: 1.5rem; font-size: .8rem; }
.footer-fine a { color: inherit; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1fr auto; } .footer-links { grid-template-columns: repeat(4, auto); } }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media print { .site-header, .site-footer, .toc, .prev-next { display: none; } }

/* component wiki (app/wiki.py) */
.wiki-list { list-style: none; padding: 0; display: grid; gap: .6em; grid-template-columns: repeat(auto-fill, minmax(18em, 1fr)); }
.wiki-list li { display: flex; flex-direction: column; gap: .15em; }
.wiki-list a { font-weight: 600; }
.wiki-langs { margin: .5em 0 0; }
.wiki-langs [aria-current] { font-weight: 600; }
.prose figure.circuit img { width: 100%; height: auto; background: var(--surface, #fff); padding: 12px; box-sizing: border-box; }
.wiki-related { display: flex; flex-wrap: wrap; gap: .4em 1.2em; list-style: none; padding: 0; }
.wiki-link { margin-top: .5em; }

/* user guide (app/guide.py): numbered contents, screenshots, next/previous */
.guide-list { list-style: decimal inside; grid-template-columns: 1fr; }
.guide-list li { display: list-item; }
.guide-list li span { display: block; }
.prose figure.guide-shot img { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--border, #ddd); }
.guide-steps { display: flex; justify-content: space-between; gap: 1em; flex-wrap: wrap; margin-top: 2em; padding-top: 1em; border-top: 1px solid var(--border, #ddd); }
.guide-steps a[rel="next"] { margin-left: auto; }

/* trailer: poster with a play button until clicked (static/js/video.js) */
.device.video { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 16px; }
.video-facade { display: block; position: relative; width: 100%; height: 100%; }
.video-facade img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-facade .play { position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px;
  border-radius: 50%; background: #F25C1A; box-shadow: 0 8px 30px rgba(0,0,0,.45); }
.video-facade .play::after { content: ""; position: absolute; left: 34px; top: 26px;
  border-style: solid; border-width: 16px 0 16px 26px; border-color: transparent transparent transparent #fff; }
.video-facade:hover .play, .video-facade:focus-visible .play { transform: scale(1.06); }
