/* The System Lab: modern engineering, minimalist, tech editorial.
   Palette: white 70% / light blue 20% / orange 10%; navy for code and dark sections. */

@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/space-grotesk-vietnamese-600-normal.b3b410ab39d6.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/space-grotesk-latin-600-normal.49f2dd2d2132.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/space-grotesk-vietnamese-700-normal.5184ed62392c.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/space-grotesk-latin-700-normal.f9e147a59a93.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/inter-vietnamese-400-normal.f31e0b32e489.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/inter-latin-400-normal.da03732a27e1.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/inter-vietnamese-500-normal.054ab7c8eaec.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/inter-latin-500-normal.51205681a1ba.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/jetbrains-mono-vietnamese-400-normal.789a43b6ed9a.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-400-normal.caf0dfde4e44.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  /* Brand palette */
  --orange: #F97316;          /* primary: buttons, icons, highlights */
  --orange-ink: #C2410C;      /* orange for text on light backgrounds (WCAG AA 5.2:1) */
  --orange-hover: #EA580C;
  --sky: #BAE6FD;             /* secondary: tags, cards, secondary sections */
  --sky-soft: #E9F6FE;        /* light-blue tint for large surfaces */
  --white: #FFFFFF;
  --ink: #172B3A;             /* main text */
  --navy: #0F172A;            /* code blocks, dark sections */

  /* Semantic */
  --bg: var(--white);
  --surface: var(--white);
  --text: var(--ink);
  --muted: #52677A;           /* 5.9:1 on white */
  --border: #DCEAF3;
  --link: var(--orange-ink);
  --grid: rgba(186, 230, 253, .55);
  --logo-bg: var(--navy);
  --logo-fg: var(--white);
  --logo-accent: var(--orange);

  --font-heading: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --wide: 72rem;
  --text-width: 42rem;
  --radius: 12px;
  --gutter: 16px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .12);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.7 var(--font-sans);
  font-feature-settings: "cv11", "ss01";
  text-rendering: optimizeLegibility;
}
::selection { background: rgba(249, 115, 22, .22); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration-color: rgba(249, 115, 22, .45); text-underline-offset: 3px; }
a:hover { color: var(--orange-hover); text-decoration-color: var(--orange); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .5em; }
h3, h4 { font-weight: 600; }

.container { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }
.container-text { max-width: var(--text-width); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; z-index: 10; }
.skip-link:focus { left: var(--gutter); top: 8px; background: var(--white); padding: 6px 10px; }

/* Technical labels: mono, uppercase, small */
.label { font: 400 .72rem/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.label-accent { color: var(--orange-ink); }
.label-accent::first-letter { color: var(--orange); }
.format-badge {
  display: inline-block; font: 400 .68rem/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink); background: var(--sky); border-radius: 999px; padding: 6px 10px;
  text-decoration: none; white-space: nowrap;
}
a.format-badge:hover { background: var(--orange); color: var(--ink); }


input[type="search"], .button {
  font: inherit; font-size: .92rem; padding: 9px 14px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--white); color: var(--ink);
}
input[type="search"]:focus { border-color: var(--orange); outline: none; box-shadow: 0 0 0 3px rgba(249, 115, 22, .18); }
input[type="search"]::placeholder { color: var(--muted); }
.button { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; text-decoration: none; font-weight: 500; transition: background .15s, border-color .15s; }
.button:hover { border-color: var(--orange); color: var(--ink); }
.button-primary { background: var(--orange); border-color: var(--orange); color: var(--ink); font-weight: 600; }
.button-primary:hover { background: var(--orange-hover); border-color: var(--orange-hover); color: var(--ink); }
.button-ghost { background: var(--white); color: var(--ink); border-color: var(--sky); }


.page-hero { padding-block: 56px 32px; border-bottom: 1px solid var(--border); margin-bottom: 40px; }
.page-hero h1 { font-size: clamp(2rem, 4.5vw, 2.9rem); margin-top: 10px; }
.page-hero .lead { max-width: 40rem; }
.lead { color: var(--muted); font-size: 1.15rem; line-height: 1.6; }

/* ---------- Sections ---------- */
.section { padding: 56px 0 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-head h2 { font-size: 1.5rem; margin: 0; }
.section-head h2::before { content: ""; display: inline-block; width: 10px; height: 10px; background: var(--orange); border-radius: 2px; margin-right: 12px; vertical-align: 2px; }
.section-head a { font-size: .92rem; font-weight: 500; text-decoration: none; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 28px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 26rem), 1fr)); }

.card { display: flex; flex-direction: column; gap: 10px; }
.card-image { display: block; border-radius: var(--radius); overflow: hidden; background: var(--navy); aspect-ratio: 16 / 9; box-shadow: var(--shadow); }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.card:hover .card-image img { transform: scale(1.025); }
.card-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.card h3 { font-size: 1.22rem; margin: 0; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--orange-ink); }
.card p { margin: 0; color: var(--muted); font-size: .97rem; }
.card-meta { font: 400 .74rem/1.4 var(--font-mono); color: var(--muted); }


.post-list { list-style: none; margin: 0; padding: 0; }
.post-row { display: grid; grid-template-columns: 7.5rem 1fr; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--border); }
.post-row:first-child { padding-top: 0; }
.post-row h3 { font-size: 1.22rem; margin: 8px 0 6px; }
.post-row h3 a { color: var(--ink); text-decoration: none; }
.post-row h3 a:hover { color: var(--orange-ink); }
.post-row p { margin: 0; color: var(--muted); }
.post-row time { font: 400 .78rem/1.9 var(--font-mono); color: var(--muted); }
@media (max-width: 560px) { .post-row { grid-template-columns: 1fr; gap: 4px; } }


.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border-radius: 999px; background: var(--sky); border: 1px solid var(--sky);
  color: var(--ink); text-decoration: none; font-size: .87rem; font-weight: 500;
}
.chip:hover { color: var(--ink); border-color: var(--orange); }
.chip[aria-current="page"] { background: var(--navy); border-color: var(--navy); color: var(--white); }
.chip small { font-family: var(--font-mono); color: var(--muted); }
.chip[aria-current="page"] small { color: var(--sky); }

/* ---------- Founder / author ---------- */
.avatar {
  flex: none; width: 48px; height: 48px; border-radius: 50%; object-fit: cover;
  display: inline-grid; place-items: center; background: var(--navy); color: var(--white);
  font: 700 .95rem/1 var(--font-heading); box-shadow: inset 0 -3px 0 var(--orange);
}
.avatar-lg { width: 72px; height: 72px; font-size: 1.4rem; }
.profile { display: flex; gap: 18px; align-items: flex-start; padding: 24px; border: 1px solid var(--sky); border-radius: var(--radius); background: var(--sky-soft); }
.profile h3 { margin: 0; font-size: 1.15rem; }
.profile p { margin: 6px 0 0; color: var(--muted); }
.profile-links { display: flex; gap: 14px; margin-top: 10px; font-size: .9rem; font-weight: 500; }

/* ---------- Listing page ---------- */
.filters { display: grid; gap: 14px; margin-bottom: 36px; }
.filters .label { margin-bottom: 6px; }
.pagination { display: flex; justify-content: space-between; align-items: center; padding: 32px 0; color: var(--muted); font-size: .92rem; }
.empty { color: var(--muted); padding: 24px 0; }

/* ---------- Article ---------- */
.article-header { padding-block: 48px 28px; }
.article-header h1 { font-size: clamp(2.1rem, 5vw, 3rem); letter-spacing: -0.03em; margin: 16px 0 14px; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.byline { display: flex; align-items: center; gap: 12px; }
.byline > div strong { display: block; font-size: .95rem; font-weight: 500; }
.byline > div span { display: block; color: var(--muted); font-size: .85rem; }
.meta-facts { display: flex; flex-wrap: wrap; gap: 6px 16px; font: 400 .78rem/1.6 var(--font-mono); color: var(--muted); }
.article-figure { max-width: 60rem; margin: 8px auto 40px; padding: 0 var(--gutter); }
.article-figure img { border-radius: var(--radius); width: 100%; box-shadow: var(--shadow); }

.prose { font-size: 1.08rem; line-height: 1.8; }
.prose > * + * { margin-top: 1.1em; }
.prose p { margin: 0; }
.prose h2 { font-size: 1.65rem; margin: 2.2em 0 .2em; }
.prose h3 { font-size: 1.3rem; margin: 1.8em 0 .2em; }
.prose h4 { font-size: 1.1rem; margin: 1.6em 0 .2em; }
.prose strong { font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0; }
.prose li + li { margin-top: .35em; }
.prose li::marker { color: var(--orange); }
.prose :not(pre) > code { font: .86em var(--font-mono); background: var(--sky-soft); border: 1px solid var(--sky); padding: 1px 6px; border-radius: 6px; }
.prose iframe { max-width: 100%; border: 0; border-radius: var(--radius); }

.block-image { margin: 2.2em 0; }
.block-image img { border-radius: var(--radius); width: 100%; }
.block-image.is-wide { margin-left: calc(50% - min(50vw, 30rem) + var(--gutter)); margin-right: calc(50% - min(50vw, 30rem) + var(--gutter)); }
.block-image figcaption, .block-code figcaption { font: 400 .78rem/1.5 var(--font-mono); color: var(--muted); margin-top: 10px; }
.block-image figcaption { text-align: center; }

.block-quote { margin: 2.2em 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--orange); }
.block-quote p { font: 600 1.3rem/1.5 var(--font-heading); letter-spacing: -0.01em; }
.block-quote footer { margin-top: 10px; font: 400 .8rem var(--font-mono); color: var(--muted); }

.block-code { margin: 2em 0; }
.block-code figcaption { margin: 0 0 8px; }
.block-code figcaption::before { content: "▸ "; color: var(--orange); }
.block-code pre {
  margin: 0; background: var(--navy); color: #E2E8F0;
  border-radius: var(--radius); padding: 18px 20px; overflow-x: auto;
  font: 400 .88rem/1.65 var(--font-mono); tab-size: 4;
  box-shadow: inset 0 3px 0 var(--orange);
}
.code-lang { float: right; font: 400 .68rem var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--sky); }

.callout { margin: 2em 0; padding: 16px 20px; border-radius: var(--radius); background: var(--sky-soft); border: 1px solid var(--sky); border-left: 4px solid var(--navy); }
.callout-tip { border-left-color: var(--ink); background: var(--white); }
.callout-warning { border-left-color: var(--orange); background: #FFF7ED; border-color: #FED7AA; }
.callout-title { font: 400 .74rem/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink); margin: 0 0 6px; }
.callout p { margin: 0; }
.callout p + p { margin-top: .6em; }

.article-footer { margin-top: 48px; display: grid; gap: 28px; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 18px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.share .label { margin-right: 6px; }
.share a, .share button { font-size: .85rem; padding: 6px 12px; }

/* ---------- Search ---------- */
.search-form-lg { display: flex; gap: 10px; margin-top: 20px; max-width: 36rem; }
.search-form-lg input { flex: 1; min-width: 0; font-size: 1rem; padding: 12px 14px; }


@media (max-width: 640px) {
  .section { padding-top: 44px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* =====================================================================
   Blueprint (design-handoff/Main.dc.html): shared dark header/footer,
   dark homepage. Values are taken 1:1 from the approved reference.
   ===================================================================== */
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/space-grotesk-vietnamese-500-normal.a37bb428c0a1.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/space-grotesk-latin-500-normal.ab4861869c91.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bp-deep: #0B1222;
  --bp-text: #E2EEF6;
  --bp-text-soft: #C9DCEA;
  --bp-line: rgba(186, 230, 253, .25);
  --bp-line-strong: rgba(186, 230, 253, .45);
  --bp-grid-line: rgba(186, 230, 253, .055);
}

/* Custom cursors, site-wide (hotspot 16 16). Text fields keep the I-beam. */
html { cursor: url("../img/cursors/cross.835d6907ca77.svg") 16 16, crosshair; }
a, button, summary, select, label[for], [role="button"] { cursor: url("../img/cursors/target.dfbf8ce4a28b.svg") 16 16, pointer; }
input[type="search"], input[type="text"], textarea { cursor: text; }

/* Dark blueprint surfaces */
.bp-page, .bp-header, .bp-footer {
  background-color: var(--navy);
  background-image:
    linear-gradient(var(--bp-grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--bp-grid-line) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--bp-text);
}
.bp-page { font-size: 17px; line-height: 1.6; }
.bp-page .bp-header, .bp-page .bp-footer { background: none; }
.bp-page a, .bp-header a, .bp-footer a { color: var(--bp-text); text-decoration: none; }
.bp-page a:hover, .bp-header a:hover, .bp-footer a:hover { color: var(--orange); }
.bp-page a:focus-visible, .bp-header a:focus-visible, .bp-footer a:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; }
.bp-shell { max-width: 1216px; margin: 0 auto; padding: 0 24px; }
.bp-svg * { transform-box: fill-box; }
.bp-accent { color: var(--orange); }
.bp-label, .bp-meta, .bp-mod__meta, .bp-row__format { text-transform: uppercase; }

/* Header */
.bp-header__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; padding: 18px 0; border-bottom: 1px solid var(--bp-line); }
.bp-brand { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.bp-logo { flex: none; }
.bp-wordmark { font-family: var(--font-heading); font-weight: 700; font-size: 20px; letter-spacing: -.02em; }
.bp-nav { display: flex; flex-wrap: wrap; gap: 28px; font-family: var(--font-mono); font-size: 13px; letter-spacing: .04em; }
.bp-nav a { padding: 12px 0; }
.bp-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--orange); }
.bp-header__tools { display: flex; align-items: center; gap: 20px; }
.bp-search input {
  width: 11rem; padding: 9px 12px; border: 1px solid var(--bp-line-strong); border-radius: 0;
  background: transparent; color: var(--bp-text); font: 400 13px/1.2 var(--font-mono);
}
.bp-search input::placeholder { color: var(--sky); opacity: .8; }
.bp-search input:focus { border-color: var(--orange); outline: none; box-shadow: none; }
.bp-readout { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; color: var(--sky); min-width: 150px; text-align: right; font-variant-numeric: tabular-nums; }
@media (hover: none) { .bp-readout { display: none; } }

/* Hero */
.bp-hero { padding: 120px 0 104px; display: flex; flex-direction: column; }
.bp-hero__top { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 32px 48px; }
.bp-hero__title-col { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 36px; padding-bottom: 40px; }
.bp-kicker { margin: 0; font-family: var(--font-mono); font-size: 13px; letter-spacing: .14em; color: var(--sky); text-transform: uppercase; }
.bp-hero__title { margin: 0; font-family: var(--font-heading); font-weight: 700; font-size: clamp(56px, 11.4vw, 164px); line-height: .86; letter-spacing: -.05em; }
.bp-outline { color: transparent; -webkit-text-stroke: 2px var(--orange); }
.bp-hero__agent { flex: 1 1 260px; max-width: 320px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.bp-terminal { max-width: 100%; padding: 12px 16px; border: 1px solid var(--sky); background: var(--navy); font-family: var(--font-mono); font-size: 14px; color: var(--bp-text); overflow: hidden; }
.bp-typed {
  --typed-ch: 30;
  display: inline-block; vertical-align: bottom; overflow: hidden; white-space: nowrap; width: 0;
  border-right: 2px solid var(--orange);
  animation: bp-type 2.8s steps(var(--typed-ch)) .5s forwards, bp-caret 1s step-end infinite;
}
.bp-mascot { width: 100%; max-width: 280px; height: auto; display: block; animation: bp-bob 4.5s ease-in-out infinite; }
.bp-mascot--resting { flex: none; width: 132px; animation: none; }
.bp-blink { animation: bp-blink 5s infinite; transform-origin: center; }
.bp-bubble { animation: bp-bubble 3s ease-in infinite; }
.bp-bubble--2 { animation-delay: 1s; }
.bp-bubble--3 { animation-delay: 2s; }
.bp-wave { animation: bp-wave 1.8s ease-in-out infinite; transform-origin: 100% 100%; }
.bp-slosh { animation: bp-slosh 4.5s ease-in-out infinite; transform-origin: 50% 100%; }

.bp-dimension { display: flex; flex-direction: column; gap: 12px; }
.bp-dimension__line { position: relative; height: 9px; border-left: 1px solid var(--sky); border-right: 1px solid var(--sky); }
.bp-dimension__line::before { content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 1px; background: var(--sky); opacity: .7; }
.bp-dimension__labels { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-family: var(--font-mono); font-size: 14px; color: var(--sky); }
.bp-hero__bottom { display: flex; flex-wrap: wrap; gap: 32px 64px; align-items: flex-end; justify-content: space-between; padding-top: 64px; }
.bp-hero__intro { flex: 1 1 420px; max-width: 600px; font-size: 21px; line-height: 1.55; text-wrap: pretty; }
.bp-hero__intro p { margin: 0; }
.bp-hero__actions { display: flex; flex-wrap: wrap; gap: 16px; }
.bp-btn { display: inline-flex; align-items: center; min-height: 52px; padding: 0 28px; }
.bp-page .bp-btn--primary { background: var(--orange); color: var(--navy); font-weight: 600; }
.bp-page .bp-btn--primary:hover { background: var(--orange-hover); color: var(--navy); }
.bp-btn--ghost { border: 1px solid var(--sky); }
.bp-btn--ghost:hover { border-color: var(--orange); }

/* Sections */
.bp-section { padding: 96px 0; border-top: 1px solid var(--bp-line); display: flex; flex-direction: column; gap: 32px; }
.bp-section--featured { gap: 40px; }
.bp-section__head, .bp-section__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; }
.bp-section__head--split { justify-content: space-between; }
.bp-fig { font-family: var(--font-mono); font-size: 13px; letter-spacing: .14em; color: var(--orange); }
.bp-section h2 { margin: 0; font-family: var(--font-heading); font-size: clamp(28px, 3.4vw, 44px); font-weight: 700; letter-spacing: -.03em; }
.bp-section__more { font-family: var(--font-mono); font-size: 13px; padding: 12px 0; }
.bp-empty { margin: 0; color: var(--bp-text-soft); }

/* FIG. 1: featured cards */
.bp-featured { display: flex; flex-wrap: wrap; gap: 48px 40px; }
.bp-card { display: flex; flex-direction: column; gap: 16px; }
.bp-card--lead { flex: 3 1 560px; min-width: 0; gap: 20px; }
.bp-featured__side { flex: 2 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 48px; }
.bp-meta { margin: 0; font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; color: var(--sky); }
.bp-card h3 { margin: 0; font-family: var(--font-heading); font-weight: 700; font-size: 24px; line-height: 1.18; letter-spacing: -.02em; }
.bp-card--lead h3 { font-size: clamp(28px, 3.4vw, 44px); line-height: 1.08; letter-spacing: -.03em; text-wrap: balance; }
.bp-card__intro { margin: 0; max-width: 620px; color: var(--bp-text-soft); text-wrap: pretty; }

.bp-thumb { position: relative; aspect-ratio: 16 / 9; background: var(--bp-deep); border: 1px solid var(--bp-line-strong); overflow: hidden; transition: border-color .2s ease; }
.bp-card:hover .bp-thumb { border-color: var(--orange); }
.bp-thumb--outbox { font-family: var(--font-mono); font-size: 13px; color: var(--sky); }
.bp-outbox__tx { position: absolute; left: 5%; top: 24%; width: 59%; height: 52%; border: 1.5px dashed var(--orange); }
.bp-outbox__tx-label { position: absolute; left: 5%; top: 13%; color: var(--orange); letter-spacing: .08em; }
.bp-outbox__wire { position: absolute; top: 50%; width: 9%; height: 1.5px; background: var(--sky); }
.bp-outbox__wire--1 { left: 30%; }
.bp-outbox__wire--2 { left: 61%; }
.bp-outbox__box { position: absolute; top: 34%; width: 22%; height: 32%; border: 1.5px solid var(--sky); display: flex; align-items: flex-end; padding: 6px 8px; }
.bp-outbox__box--db { left: 8%; }
.bp-outbox__box--outbox { left: 39%; }
.bp-outbox__box--broker { left: 70%; }
.bp-outbox__packet { position: absolute; left: 16%; top: calc(46% - 8px); width: 16px; height: 16px; background: var(--orange); animation: bp-packet 5s ease-in-out infinite; }
.bp-thumb--split { display: flex; align-items: center; justify-content: center; }
.bp-split { display: grid; grid-template-columns: repeat(2, 56px); grid-auto-rows: 56px; animation: bp-split 4s ease-in-out infinite; }
.bp-split > div { border: 1.5px solid var(--sky); }
.bp-split > .is-hot { background: var(--orange); }
.bp-thumb--chunk { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.bp-chunk {
  width: 80%; height: 30%; background-color: var(--sky);
  background-image: linear-gradient(90deg, var(--bp-deep) 0, var(--bp-deep) 4px, transparent 4px);
  background-size: 9% 100%; animation: bp-chunk 5s ease-in-out infinite;
}
.bp-chunk__legend { width: 80%; font-family: var(--font-mono); font-size: 12px; color: var(--sky); display: flex; justify-content: space-between; }
.bp-thumb--image img { width: 100%; height: 100%; object-fit: cover; }
.bp-thumb--default {
  display: flex; align-items: flex-end; padding: 10px 12px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--sky);
  background-image: linear-gradient(var(--bp-line) 1px, transparent 1px), linear-gradient(90deg, var(--bp-line) 1px, transparent 1px);
  background-size: 16px 16px;
}

/* FIG. 2: parts list */
.bp-parts { display: flex; flex-direction: column; border-top: 1px solid var(--sky); }
.bp-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 32px; padding: 26px 12px; border-bottom: 1px solid var(--bp-line); transition: padding-left .25s ease, background-color .25s ease; }
.bp-row:hover { background: rgba(186, 230, 253, .07); padding-left: 28px; }
.bp-row__no { font-family: var(--font-mono); font-size: 13px; color: var(--orange); width: 32px; }
.bp-row__date { font-family: var(--font-mono); font-size: 13px; color: var(--sky); width: 96px; }
.bp-row__format { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; color: var(--sky); width: 210px; }
.bp-row__title { flex: 1 1 360px; font-family: var(--font-heading); font-size: 22px; font-weight: 500; line-height: 1.3; }
.bp-row__time { font-family: var(--font-mono); font-size: 13px; color: var(--sky); }

/* FIG. 3: topic modules */
.bp-modules { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 16px; }
.bp-mod { display: flex; flex-direction: column; gap: 12px; padding: 28px; border: 1px dashed var(--sky); background: rgba(15, 23, 42, .85); transition: border-color .2s ease, transform .2s ease; }
.bp-mod:hover { border-color: var(--orange); transform: translateY(-4px); }
.bp-mod__meta { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; color: var(--sky); }
.bp-page .bp-mod__name { font-family: var(--font-heading); font-size: 26px; font-weight: 700; color: var(--bp-text); }
.bp-mod__desc { color: var(--sky); font-size: 15px; }

/* Footer (all pages) */
.bp-footer { margin-top: 96px; font-size: 17px; line-height: 1.6; }
.bp-page .bp-footer { margin-top: 0; }
.bp-footer__inner { padding: 96px 0 0; border-top: 1px solid var(--bp-line); display: flex; flex-direction: column; gap: 48px; }
.bp-footer__intro { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 32px 56px; }
.bp-footer__text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.bp-status { margin: 0; font-family: var(--font-mono); font-size: 14px; color: var(--sky); }
.bp-status__value { color: var(--orange); }
.bp-pulse { animation: bp-pulse 1s step-end infinite; }
.bp-footer__about { margin: 0; max-width: 760px; font-family: var(--font-heading); font-size: clamp(20px, 2.2vw, 28px); line-height: 1.35; letter-spacing: -.01em; text-wrap: pretty; }
.bp-titleblock { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); border: 1px solid var(--sky); background: var(--navy); }
.bp-titleblock__cell { padding: 20px 24px; border: 1px solid var(--bp-line); display: flex; flex-direction: column; gap: 4px; }
.bp-label { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; color: var(--sky); }
.bp-titleblock__value { font-family: var(--font-heading); font-size: 20px; font-weight: 700; }
.bp-titleblock__links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.bp-titleblock__links a { padding: 8px 0; }
.bp-footer__wordmark {
  overflow: hidden; font-family: var(--font-heading); font-weight: 700; font-size: clamp(48px, 10.2vw, 190px);
  line-height: .8; letter-spacing: -.05em; white-space: nowrap; color: transparent;
  -webkit-text-stroke: 1px rgba(186, 230, 253, .45); margin-bottom: -0.12em;
}

/* Motion (from the reference) */
@keyframes bp-blink { 0%, 92%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
@keyframes bp-wave { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(18deg); } }
@keyframes bp-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes bp-bubble { 0% { transform: translateY(26px); opacity: 0; } 25% { opacity: 1; } 100% { transform: translateY(-22px); opacity: 0; } }
@keyframes bp-slosh { 0%, 100% { transform: skewX(0deg); } 50% { transform: skewX(-4deg); } }
@keyframes bp-pulse { 50% { opacity: .25; } }
@keyframes bp-type { from { width: 0; } to { width: calc(var(--typed-ch) * 1ch); } }
@keyframes bp-caret { 50% { border-right-color: transparent; } }
@keyframes bp-packet { 0%, 12% { left: 16%; opacity: 1; } 32%, 48% { left: 47%; opacity: 1; } 68%, 88% { left: 78%; opacity: 1; } 96%, 100% { left: 78%; opacity: 0; } }
@keyframes bp-split { 0%, 15% { gap: 0px; } 50%, 65% { gap: 18px; } 100% { gap: 0px; } }
@keyframes bp-chunk { 0%, 10% { background-size: 9% 100%; } 50%, 60% { background-size: 34% 100%; } 100% { background-size: 9% 100%; } }
@keyframes bp-rise { from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: none; } }
@supports (animation-timeline: view()) {
  .bp-reveal { animation: bp-rise linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
}
@media (prefers-reduced-motion: reduce) {
  .bp-page *, .bp-header *, .bp-footer * { animation: none !important; transition: none !important; }
  .bp-typed { width: calc(var(--typed-ch) * 1ch) !important; }
}

@media (max-width: 640px) {
  .bp-shell { padding: 0 16px; }
  .bp-search input { width: 9rem; }
  .bp-hero { padding: 64px 0 72px; }
  .bp-section { padding: 72px 0; }
  .bp-footer__inner { padding-top: 72px; }
}

/* =====================================================================
   Blueprint listing, article and topics pages (design A2, A3, A4).
   Category colour arrives as --cat (set inline from BlogCategory.color).
   ===================================================================== */
.bp-shell--wide { max-width: 1360px; }
.bp-listing { padding-bottom: 96px; }
.bp-pagehead { padding: 88px 0 56px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 64px; }
.bp-pagehead__main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.bp-pagehead__title { margin: 0; font-family: var(--font-heading); font-weight: 700; font-size: clamp(44px, 8vw, 112px); line-height: .92; letter-spacing: -.05em; overflow-wrap: anywhere; }
.bp-pagehead__lead { margin: 0; flex: 0 1 460px; font-size: 19px; text-wrap: pretty; }
.bp-pagehead__lead p { margin: 0; }

/* Chips: categories are filled pills in their colour; formats are dashed mono tags. */
.bp-chips { flex: 1 1 480px; display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.bp-page .bp-cat-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px;
  border: 2px solid var(--cat, var(--sky)); background: var(--cat, var(--sky)); color: var(--navy);
  font-size: 13px; font-weight: 600; line-height: 1.4; transition: transform .15s ease, background-color .2s ease, color .2s ease;
}
.bp-page .bp-cat-chip:hover { color: var(--navy); transform: translateY(-2px); }
.bp-page .bp-cat-chip--toggle { min-height: 44px; padding: 0 16px; font-size: 15px; background: transparent; color: var(--white); }
.bp-page .bp-cat-chip--toggle:hover { color: var(--white); }
.bp-page .bp-cat-chip--toggle[aria-current="page"] { background: var(--cat, var(--sky)); color: var(--navy); }
.bp-page .bp-format-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px dashed var(--sky);
  font-family: var(--font-mono); font-size: 12px; line-height: 1.4; color: var(--bp-text); transition: transform .15s ease, background-color .2s ease, color .2s ease;
}
.bp-page .bp-format-chip:hover { border-color: var(--orange); transform: translateY(-2px); }
.bp-page .bp-format-chip--toggle { min-height: 44px; padding: 0 14px; font-size: 13px; }
.bp-page .bp-format-chip--toggle[aria-current="page"] { background: var(--white); border-style: solid; border-color: var(--white); color: var(--navy); }

.bp-filters { display: flex; flex-direction: column; gap: 24px; padding: 28px; border: 1px solid rgba(186, 230, 253, .35); background: var(--bp-deep); }
.bp-filters__row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 24px; }
.bp-filters__row > .bp-label { flex: 0 0 96px; margin: 0; text-transform: uppercase; letter-spacing: .12em; }
.bp-listing__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; padding: 32px 0 20px; font-family: var(--font-mono); font-size: 13px; color: var(--sky); }
.bp-page .bp-listing__bar a { color: var(--orange); text-decoration: underline; padding: 10px 0; }

.bp-posts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); gap: 24px; }
.bp-post { display: flex; flex-direction: column; border: 1px solid rgba(186, 230, 253, .3); background: var(--bp-deep); transition: transform .2s ease, border-color .2s ease; animation: bp-in .35s ease both; }
.bp-post:hover { transform: translateY(-4px); border-color: var(--sky); }
.bp-post__bar { height: 6px; background: var(--cat, var(--sky)); }
.bp-post__body { display: flex; flex-direction: column; gap: 16px; padding: 24px 28px 28px; }
.bp-post__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.bp-post__title { margin: 0; font-family: var(--font-heading); font-weight: 700; font-size: 26px; line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
.bp-post__intro { margin: 0; font-size: 16px; color: var(--bp-text-soft); text-wrap: pretty; }
.bp-posts__empty { padding: 56px 28px; border: 1px dashed var(--sky); text-align: center; font-family: var(--font-heading); font-size: 24px; font-weight: 700; }
.bp-posts__empty span { font-size: 40px; }
.bp-posts__empty p { margin: 8px 0 0; }
.bp-page .pagination { color: var(--sky); font-family: var(--font-mono); font-size: 13px; }

/* Article: contents on the left, reactions and comments on the right. */
.bp-article { display: grid; grid-template-columns: 240px minmax(0, 700px) 300px; justify-content: space-between; align-items: start; gap: 48px 40px; padding: 64px 0 32px; }
.bp-article__left, .bp-article__right { display: flex; flex-direction: column; gap: 32px; min-width: 0; position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; }
.bp-article__main { min-width: 0; font-size: 18px; line-height: 1.7; }
.bp-article__header { display: flex; flex-direction: column; gap: 24px; margin-bottom: 32px; }
.bp-article__header h1 { margin: 0; font-family: var(--font-heading); font-weight: 700; font-size: clamp(34px, 4.4vw, 58px); line-height: 1.04; letter-spacing: -.035em; text-wrap: balance; }
.bp-article__lead { margin: 0; font-size: 21px; line-height: 1.55; color: var(--white); text-wrap: pretty; }
.bp-article__figure { margin: 0 0 32px; }
.bp-article__figure img { width: 100%; border: 1px solid var(--bp-line-strong); }

.bp-catcard { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; background: var(--cat, var(--sky)); color: var(--navy); }
.bp-catcard__label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.bp-page .bp-catcard a { color: var(--navy); }
.bp-page .bp-catcard a:hover { color: var(--navy); text-decoration: underline; }
.bp-catcard__name { display: flex; align-items: center; gap: 8px; font-family: var(--font-heading); font-weight: 700; font-size: 22px; line-height: 1.1; }
.bp-catcard__format { font-family: var(--font-mono); font-size: 12px; padding: 4px 0; }

.bp-toc { display: flex; flex-direction: column; }
.bp-toc > .bp-label { margin: 0 0 12px; text-transform: uppercase; letter-spacing: .12em; }
.bp-toc__link { display: flex; gap: 12px; padding: 11px 12px; border-left: 2px solid rgba(186, 230, 253, .3); font-size: 15px; line-height: 1.35; transition: padding-left .2s ease, border-color .2s ease; }
.bp-toc__link:hover { padding-left: 20px; }
.bp-toc__link--h3 { padding: 9px 12px 9px 44px; font-size: 14px; color: var(--bp-text-soft); }
.bp-toc__link--h3:hover { padding-left: 52px; }
.bp-toc__no { font-family: var(--font-mono); font-size: 12px; color: var(--sky); padding-top: 2px; }
.bp-page .bp-toc__link.is-active { border-left-color: var(--orange); color: var(--white); font-weight: 600; }
.bp-toc__link.is-active .bp-toc__no { color: var(--orange); }
.bp-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; font-family: var(--font-mono); font-size: 12px; }
.bp-tags a { display: inline-block; padding: 8px 10px; border: 1px solid rgba(186, 230, 253, .4); }
.bp-tags a:hover { border-color: var(--orange); }

/* Article body on the dark surface */
.bp-page .prose { font-size: 18px; line-height: 1.7; }
.bp-page .prose h2, .bp-page .prose h3 { scroll-margin-top: 24px; }
.bp-page .prose h2 { font-size: 30px; line-height: 1.15; }
.bp-page .prose a { color: var(--orange); text-decoration: underline; }
.bp-page .prose :not(pre) > code { background: var(--bp-deep); border-color: var(--bp-line-strong); color: var(--sky); }
.bp-page .block-code pre { border: 1px solid var(--bp-line-strong); border-radius: 0; background: var(--bp-deep); }
.bp-page .block-image img, .bp-page .prose iframe { border-radius: 0; }
.bp-page .block-image.is-wide { margin-left: 0; margin-right: 0; }
.bp-page .block-image figcaption, .bp-page .block-code figcaption, .bp-page .block-quote footer { color: var(--sky); }
.bp-page .callout { border: 0; border-radius: 0; background: var(--sky); color: var(--navy); }
.bp-page .callout-tip { background: #86EFAC; }
.bp-page .callout-warning { background: #FDE68A; }
.bp-page .callout a { color: var(--navy); text-decoration: underline; }
.bp-page .callout :not(pre) > code { background: rgba(15, 23, 42, .1); border-color: rgba(15, 23, 42, .25); color: var(--navy); }
.bp-page .profile { border: 1px solid var(--bp-line-strong); border-radius: 0; background: var(--bp-deep); }
.bp-page .profile p, .bp-page .profile .label, .bp-page .profile .card-meta { color: var(--bp-text-soft); }
.bp-page .profile-links a { color: var(--orange); }

/* Reactions */
.bp-actions { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.bp-actions form { display: contents; }
.bp-page .bp-action {
  min-height: 76px; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--sky); background: transparent; color: var(--bp-text); padding: 8px 4px; list-style: none;
  font: 400 12px/1.3 var(--font-mono); text-align: center; transition: transform .15s ease, background-color .2s ease, border-color .2s ease;
}
.bp-action::-webkit-details-marker { display: none; }
.bp-page .bp-action:hover { transform: translateY(-2px); border-color: var(--orange); color: var(--bp-text); }
.bp-page .bp-action:active { transform: scale(.96); }
.bp-actions form .bp-action { border-color: var(--orange); }
.bp-page .bp-action.is-on { background: var(--orange); color: var(--navy); }
.bp-sharebox[open] > .bp-action { background: var(--sky); color: var(--navy); }
.bp-sharebox__panel { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 2; display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; border: 1px solid var(--sky); background: var(--navy); animation: bp-in .2s ease both; }
.bp-sharebox__panel a, .bp-sharebox__panel button { min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px; border: 1px solid var(--bp-line-strong); background: transparent; color: var(--bp-text); font: 400 13px/1 var(--font-mono); }
.bp-sharebox__panel a:hover, .bp-sharebox__panel button:hover { border-color: var(--orange); color: var(--orange); }

/* Comments */
.bp-comments { display: flex; flex-direction: column; gap: 16px; padding: 24px; border: 1px solid rgba(186, 230, 253, .35); background: var(--bp-deep); scroll-margin-top: 24px; }
.bp-comments h2 { margin: 0; font-family: var(--font-heading); font-weight: 700; font-size: 22px; }
.bp-comments__empty { margin: 0; font-size: 15px; color: var(--sky); }
.bp-notice { margin: 0; padding: 12px 14px; background: #86EFAC; color: var(--navy); font-size: 15px; }
.bp-notice--warn { background: #FDE68A; }
.bp-comment { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--bp-line); }
.bp-comment p { margin: 0; }
.bp-comment__meta { font-family: var(--font-mono); font-size: 12px; color: var(--sky); }
.bp-comment__body { font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.bp-commentform { display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 24px; }
.bp-commentform .bp-label { text-transform: uppercase; }
.bp-commentform input[type="text"], .bp-commentform textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--sky); border-radius: 0; background: var(--navy); color: var(--white);
  font: 400 15px/1.5 var(--font-sans);
}
.bp-commentform textarea { resize: vertical; }
.bp-commentform input:focus-visible, .bp-commentform textarea:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.bp-commentform .bp-btn { align-self: flex-start; min-height: 44px; padding: 0 22px; border: 0; font: 600 15px/1 var(--font-sans); }
.bp-commentform__hint { margin: 0; font-size: 13px; color: var(--sky); }
.bp-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Topics page */
.bp-dist { display: flex; gap: 4px; height: 44px; margin-bottom: 48px; }
.bp-dist__seg { flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 6px; background: var(--cat, var(--sky)); color: var(--navy); font: 500 13px/1 var(--font-mono); transform-origin: left center; animation: bp-grow .8s cubic-bezier(.2, .7, .2, 1) both; }
.bp-topics { display: flex; flex-direction: column; border-top: 1px solid var(--sky); }
.bp-topic { border-bottom: 1px solid rgba(186, 230, 253, .3); scroll-margin-top: 24px; }
.bp-topic__head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; padding: 24px 8px; list-style: none; }
.bp-topic__head::-webkit-details-marker { display: none; }
.bp-topic__tile { flex: none; width: 76px; height: 76px; display: flex; align-items: center; justify-content: center; background: var(--cat, var(--sky)); color: var(--navy); transition: transform .25s ease; }
.bp-topic__head:hover .bp-topic__tile { transform: rotate(-6deg) scale(1.06); }
.bp-topic__icon path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.bp-topic[open] .bp-topic__icon path { animation: bp-draw 1.4s ease both; }
.bp-topic__no { font-family: var(--font-mono); font-size: 13px; letter-spacing: .1em; color: var(--cat, var(--sky)); }
.bp-topic__name { flex: 1 1 320px; min-width: 0; font-family: var(--font-heading); font-weight: 700; font-size: clamp(28px, 4.4vw, 58px); line-height: 1; letter-spacing: -.04em; transition: letter-spacing .25s ease, color .2s ease; }
.bp-topic__head:hover .bp-topic__name { letter-spacing: -.01em; }
.bp-topic[open] .bp-topic__name { color: var(--cat, var(--sky)); }
.bp-topic__count { font-family: var(--font-mono); font-size: 13px; color: var(--sky); text-transform: uppercase; }
.bp-topic__sign { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--sky); font: 400 22px/1 var(--font-mono); }
.bp-topic__sign::before { content: "+"; }
.bp-topic[open] .bp-topic__sign::before { content: "−"; }
.bp-topic__body { display: flex; flex-wrap: wrap; gap: 24px 56px; padding: 8px 8px 40px 112px; animation: bp-open .35s ease both; }
.bp-topic__intro { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; font-size: 18px; }
.bp-topic__intro p { margin: 0; text-wrap: pretty; }
.bp-page .bp-topic__open { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; background: var(--cat, var(--sky)); color: var(--navy); font-weight: 600; }
.bp-page .bp-topic__open:hover { color: var(--navy); text-decoration: underline; }
.bp-topic__posts { flex: 2 1 420px; min-width: 0; margin: 0; padding: 0; list-style: none; border-top: 1px dashed var(--cat, var(--sky)); }
.bp-topic__posts li { border-bottom: 1px dashed var(--cat, var(--sky)); }
.bp-topic__posts a { display: flex; flex-direction: column; gap: 4px; padding: 16px 0; transition: padding-left .2s ease; }
.bp-topic__posts a:hover { padding-left: 12px; }
.bp-topic__title { font-family: var(--font-heading); font-weight: 700; font-size: 21px; line-height: 1.25; }
.bp-topic__none { padding: 16px 0; color: var(--sky); }

@keyframes bp-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes bp-open { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes bp-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes bp-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

@media (max-width: 1180px) {
  .bp-article { grid-template-columns: 220px minmax(0, 1fr); }
  .bp-article__right { grid-column: 2; position: static; max-height: none; overflow: visible; }
}
@media (max-width: 800px) {
  .bp-article { grid-template-columns: minmax(0, 1fr); padding-top: 40px; }
  .bp-article__left { position: static; max-height: none; overflow: visible; }
  .bp-article__right { grid-column: 1; }
  .bp-pagehead { padding: 56px 0 40px; }
  .bp-filters { padding: 20px; }
  .bp-topic__body { padding-left: 8px; }
}
