/* ofcskn design system v1
   One stylesheet for every public page. No framework, no icon font, no web-font CDN.
   Layers: tokens > base > layout > components > pages (home.css is loaded only on the home page). */

/* ---------- 1. Tokens ---------- */
@font-face { font-family: Montserrat; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(/fonts/montserrat/montserrat-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Montserrat; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(/fonts/montserrat/montserrat-latin.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 {
  --ink: #0b0b0c; --ink-2: #141416; --ink-3: #1d1d20;
  --paper: #f4f1ea; --paper-2: #e9e5da;
  --accent: #ffde59;
  --on-ink-muted: #b6b2a9;       /* 8.6:1 on --ink */
  --on-paper-muted: #55534d;     /* 6.9:1 on --paper */
  --line-ink: rgba(244, 241, 234, .16);
  --line-paper: rgba(11, 11, 12, .16);
  --danger: #ff8a7a; --danger-paper: #9b2c1f;
  --font: Montserrat, "Segoe UI", Arial, sans-serif;
  --radius: 14px; --radius-s: 8px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --gutter: clamp(16px, 4vw, 40px);
  --measure: 42rem;
  --t-body: 1.0625rem;
  --t-small: .875rem;
  --t-h3: clamp(1.15rem, 2vw, 1.35rem);
  --t-h2: clamp(1.6rem, 3.4vw, 2.4rem);
  --t-h1: clamp(1.9rem, 5.4vw, 3.9rem);
  --t-hero: clamp(2.7rem, 10.5vw, 8.2rem);
  --header-h: 68px;
  color-scheme: dark;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; background: var(--ink); color: var(--paper); font: 400 var(--t-body)/1.7 var(--font); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
img, picture, video, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { text-decoration-color: var(--accent); }
h1, h2, h3, h4 { margin: 0 0 .6em; font-weight: 800; line-height: 1.2; letter-spacing: -.02em; text-wrap: balance; }
h3, h4 { letter-spacing: -.01em; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0; padding: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.paper :focus-visible, .on-paper :focus-visible { outline-color: var(--ink); box-shadow: 0 0 0 6px var(--accent); }
::selection { background: var(--accent); color: var(--ink); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: var(--gutter); top: -100px; z-index: 100; background: var(--accent); color: var(--ink); padding: .7rem 1.1rem; border-radius: var(--radius-s); font-weight: 700; }
.skip-link:focus { top: 12px; }

/* ---------- 3. Layout ---------- */
.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 860px; }
.section { padding-block: clamp(56px, 9vw, 120px); }
.section--tight { padding-block: clamp(32px, 5vw, 64px); }
.paper { background: var(--paper); color: var(--ink); --muted: var(--on-paper-muted); --line: var(--line-paper); color-scheme: light; }
.ink { background: var(--ink); color: var(--paper); --muted: var(--on-ink-muted); --line: var(--line-ink); }
.ink-2 { background: var(--ink-2); color: var(--paper); --muted: var(--on-ink-muted); --line: var(--line-ink); }
.muted { color: var(--muted, var(--on-ink-muted)); }
.grid { display: grid; gap: clamp(16px, 2.4vw, 28px); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.split { display: grid; gap: clamp(28px, 5vw, 72px); }
@media (min-width: 960px) { .split { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } .split--even { grid-template-columns: 1fr 1fr; } }

/* ---------- 4. Components ---------- */
/* Eyebrow + section heading */
.eyebrow { display: inline-flex; align-items: center; gap: .6rem; margin: 0 0 1rem; font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted, var(--on-ink-muted)); }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--accent); }
.paper .eyebrow::before { background: var(--ink); }
.section-head { display: grid; gap: .4rem; margin-bottom: clamp(28px, 4vw, 52px); max-width: 60rem; }
.section-head h1, .section-head h2 { font-size: var(--t-h1); margin: 0; }
.section-head p { color: var(--muted); margin: 0; max-width: 46rem; font-size: 1.1rem; }
.section-head.section-head__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; max-width: none; }
.section-head__row > div { max-width: 46rem; }

/* Buttons and links */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 48px; padding: .8rem 1.5rem; border: 2px solid transparent; border-radius: 999px; background: var(--accent); color: var(--ink); font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer; transition: transform .2s var(--ease), background-color .2s, color .2s, border-color .2s; }
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.btn--ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn--ghost:hover { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.paper .btn:not(.btn--ghost) { background: var(--ink); color: var(--paper); }
.paper .btn--ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.arrow-link { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; text-decoration: none; }
.arrow-link::after { content: ""; width: 1.1em; height: 1.1em; background: currentColor; -webkit-mask: var(--arrow) center/contain no-repeat; mask: var(--arrow) center/contain no-repeat; transition: transform .25s var(--ease); }
.arrow-link:hover::after { transform: translateX(5px); }
:root { --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h16M14 6l6 6-6 6'/%3E%3C/svg%3E"); }
.tag { display: inline-block; padding: .1rem 0; font-size: var(--t-small); font-weight: 600; text-decoration: none; color: var(--muted); }
.tag::before { content: "#"; color: var(--accent); margin-right: .1em; }
.paper .tag::before { color: var(--ink); }
.tag:hover { color: inherit; text-decoration: underline; }

/* Icons: inline SVG sprite, sized by font */
.icon { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Site header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(11, 11, 12, .86); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line-ink); color: var(--paper); }
.site-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { width: 66px; height: 48px; }
.nav { display: none; align-items: center; gap: .25rem; list-style: none; }
.nav a, .nav summary { display: inline-flex; align-items: center; gap: .4rem; padding: .55rem .9rem; border-radius: 999px; font-size: .95rem; font-weight: 600; text-decoration: none; cursor: pointer; list-style: none; }
.nav summary::-webkit-details-marker { display: none; }
.nav a:hover, .nav summary:hover, .nav a[aria-current="page"] { background: var(--ink-3); }
.nav details { position: relative; }
.nav details[open] > summary { background: var(--ink-3); }
.nav .chev { width: .9em; height: .9em; transition: transform .2s var(--ease); }
.nav details[open] .chev { transform: rotate(180deg); }
.nav__panel { position: absolute; top: calc(100% + 8px); right: 0; min-width: 260px; max-height: min(70vh, 560px); overflow: auto; padding: .5rem; background: var(--ink-2); border: 1px solid var(--line-ink); border-radius: var(--radius); box-shadow: 0 24px 60px rgba(0, 0, 0, .55); }
.nav__panel a { display: flex; width: 100%; border-radius: var(--radius-s); }
.nav__panel .nav__group { padding: .55rem .9rem .2rem; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--on-ink-muted); font-weight: 700; }
.nav__panel .nav__sub { padding-left: 1.5rem; font-weight: 500; color: var(--on-ink-muted); font-size: .9rem; }
.nav__lang a, .nav__lang summary { border: 1px solid var(--line-ink); }
.menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 1px solid var(--line-ink); border-radius: 999px; background: transparent; color: inherit; cursor: pointer; }
@media (min-width: 960px) { .nav { display: flex; } .menu-btn { display: none; } }

/* Mobile menu sheet (<dialog>) */
.sheet { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: var(--ink); color: var(--paper); }
.sheet::backdrop { background: rgba(0, 0, 0, .6); }
.sheet__inner { display: flex; flex-direction: column; min-height: 100%; padding: 0 var(--gutter) 40px; }
.sheet__top { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); }
.sheet__list { list-style: none; display: grid; gap: .25rem; margin-top: 1rem; }
.sheet__list > li > a, .sheet__list summary { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--line-ink); font-size: 1.5rem; font-weight: 800; letter-spacing: -.01em; text-decoration: none; cursor: pointer; list-style: none; }
.sheet__list summary::-webkit-details-marker { display: none; }
.sheet__sub { display: grid; padding: .4rem 0 1rem; }
.sheet__sub a { padding: .6rem 0 .6rem 1rem; color: var(--on-ink-muted); font-weight: 600; text-decoration: none; }
.sheet__sub .sheet__sub-title { padding-left: 1rem; margin-top: .6rem; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--on-ink-muted); }
.sheet__lang { display: flex; gap: .5rem; margin-top: 1.5rem; }
.sheet__lang a { padding: .5rem 1rem; border: 1px solid var(--line-ink); border-radius: 999px; text-decoration: none; font-weight: 600; }

/* Footer */
.site-footer { margin-top: auto; border-top: 1px solid var(--line-ink); background: var(--ink); color: var(--paper); }
.site-footer__grid { display: grid; gap: clamp(28px, 4vw, 56px); padding-block: clamp(40px, 6vw, 80px); }
@media (min-width: 880px) { .site-footer__grid { grid-template-columns: 1.1fr 1fr 1.2fr; } }
.site-footer h2 { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--on-ink-muted); margin-bottom: 1rem; }
.site-footer p { color: var(--on-ink-muted); margin-bottom: 1rem; }
.site-footer__brand img { width: 150px; height: auto; margin-bottom: 1.2rem; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: .3rem 1rem; list-style: none; }
.social { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; margin-bottom: 1.2rem; }
.social a { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 1px solid var(--line-ink); border-radius: 999px; transition: background-color .2s, color .2s, border-color .2s; }
.social a:hover { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.site-footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem 2rem; padding-block: 24px 32px; border-top: 1px solid var(--line-ink); font-size: var(--t-small); color: var(--on-ink-muted); }
.site-footer__legal a { text-decoration: none; margin-right: 1.2rem; }
.site-footer__legal a:hover { color: var(--paper); text-decoration: underline; }
.inline-form { display: flex; gap: .5rem; }
.inline-form input { flex: 1; min-width: 0; }

/* Forms */
.field { display: grid; gap: .45rem; margin-bottom: 1.2rem; }
.field label, .field .label { font-size: var(--t-small); font-weight: 700; letter-spacing: .02em; }
.input, .field input:not([type="checkbox"]):not([type="radio"]), .field textarea { width: 100%; min-height: 52px; padding: .85rem 1rem; background: var(--ink-2); border: 1.5px solid var(--line-ink); border-radius: var(--radius-s); color: var(--paper); transition: border-color .2s, background-color .2s; }
.paper .input, .paper .field input:not([type="checkbox"]):not([type="radio"]), .paper .field textarea { background: #fff; border-color: var(--line-paper); color: var(--ink); }
.field textarea { min-height: 180px; resize: vertical; }
.input:hover, .field input:not([type="checkbox"]):not([type="radio"]):hover, .field textarea:hover { border-color: var(--accent); }
.input:focus-visible, .field input:not([type="checkbox"]):not([type="radio"]):focus-visible, .field textarea:focus-visible { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 222, 89, .35); }
.paper .input:focus-visible, .paper .field input:not([type="checkbox"]):not([type="radio"]):focus-visible, .paper .field textarea:focus-visible { border-color: var(--ink); box-shadow: 0 0 0 3px var(--accent); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.paper .field [aria-invalid="true"] { border-color: var(--danger-paper); }
.newsletter--inline .check { margin-top: .9rem; }
.field__error { color: var(--danger); font-size: var(--t-small); font-weight: 600; min-height: 0; }
.paper .field__error { color: var(--danger-paper); }
.check { display: flex; gap: .8rem; align-items: flex-start; font-size: var(--t-small); font-weight: 500; letter-spacing: 0; line-height: 1.5; }
.check input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); flex: none; }
.check span { padding-top: 1px; }
.note { padding: 1rem 1.2rem; border-radius: var(--radius-s); background: var(--ink-3); border: 1px solid var(--line-ink); margin-bottom: 1rem; font-weight: 600; }
.note--ok { border-color: var(--accent); }
.note--error { border-color: var(--danger); }
.paper .note { background: #fff; border-color: var(--line-paper); }

/* Cards */
.media { position: relative; overflow: hidden; background: var(--ink-3); border-radius: var(--radius); aspect-ratio: 16 / 9; }
.media picture { display: block; width: 100%; height: 100%; }   /* an inline <picture> made the image ignore the box height */
.media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
/* No picture, or the picture failed to load: show the mark, faint and centred, instead of a broken-image icon. */
.media--empty img { display: none; }
.media--empty::before, .media:not(:has(img))::before { content: ""; position: absolute; inset: 0; background: url(/assets/brand/ofc-mark-paper.svg) center / min(34%, 150px) no-repeat; opacity: .16; }
.card { position: relative; display: flex; flex-direction: column; gap: 1rem; text-decoration: none; }
.card:hover .media img { transform: scale(1.045); }
.card__title { font-size: var(--t-h3); margin: 0; }
.card__title a { text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; }   /* whole card is the link target */
.card__title a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.card__meta { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: var(--t-small); color: var(--muted); }
.card__text { margin: 0; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .tag, .card .card__meta a { position: relative; z-index: 1; }
.category-tile { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; min-height: 200px; padding: 1.6rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--ink-2); transition: border-color .25s, background-color .25s, transform .25s var(--ease); }
.paper .category-tile { background: #fff; }
.category-tile:hover { border-color: var(--accent); transform: translateY(-3px); }
.paper .category-tile:hover { border-color: var(--ink); }
.category-tile h2, .category-tile h3 { margin: 0; font-size: var(--t-h2); }
.category-tile h2 a, .category-tile h3 a { text-decoration: none; }
.category-tile h2 a::after, .category-tile h3 a::after { content: ""; position: absolute; inset: 0; }
.category-tile .tag-cloud { position: relative; z-index: 1; }

/* Editorial list row (writing index) */
.rows { list-style: none; border-top: 1px solid var(--line); }
.row-item { position: relative; display: grid; gap: .3rem 1.5rem; padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
@media (min-width: 760px) { .row-item { grid-template-columns: 7rem 1fr auto; align-items: baseline; } }
.row-item__date { font-size: var(--t-small); color: var(--muted); font-variant-numeric: tabular-nums; }
.row-item__title { margin: 0; font-size: clamp(1.15rem, 2.4vw, 1.7rem); }
.row-item__title a { text-decoration: none; }
.row-item__title a::after { content: ""; position: absolute; inset: 0; }
.row-item:hover .row-item__title a, .row-item:focus-within .row-item__title a { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: .1em; }
.row-item__cat { font-size: var(--t-small); font-weight: 700; color: var(--muted); }

/* Page head (replaces the breadcrumb banner) */
.page-head { padding-block: clamp(48px, 8vw, 104px) clamp(24px, 4vw, 48px); border-bottom: 1px solid var(--line-ink); }
.page-head h1 { font-size: var(--t-h1); margin: 0 0 .5rem; }
.page-head p { color: var(--on-ink-muted); max-width: 46rem; margin: 0; font-size: 1.1rem; }
.crumbs { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem .8rem; margin: 0 0 1.4rem; font-size: var(--t-small); color: var(--on-ink-muted); }
.crumbs li + li::before { content: "/"; margin-right: .8rem; color: var(--accent); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* Pagination */
.pager { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; list-style: none; margin-top: clamp(32px, 5vw, 56px); }
.pager a, .pager span { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; min-height: 48px; padding: 0 1rem; border: 1px solid var(--line); border-radius: 999px; font-weight: 700; text-decoration: none; }
.pager a:hover { border-color: var(--accent); }
.pager [aria-current="page"] { background: var(--accent); color: var(--ink); border-color: var(--accent); }

/* Prose (articles, policies, about) */
.prose { max-width: var(--measure); font-size: 1.1rem; line-height: 1.7; font-weight: 450; }
.prose > * + * { margin-top: 1.3em; }
.prose h2 { font-size: var(--t-h2); margin-top: 2em; }
.prose h3 { font-size: var(--t-h3); margin-top: 1.7em; }
.prose a { text-decoration-color: currentColor; text-decoration-thickness: .08em; text-underline-offset: .18em; }

.prose img, .prose video, .prose iframe { border-radius: var(--radius-s); max-width: 100%; }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; }
.prose blockquote { margin-inline: 0; padding: .2rem 0 .2rem 1.4rem; border-left: 4px solid var(--accent); font-size: 1.05em; font-weight: 500; line-height: 1.5; }
.paper .prose blockquote { border-left-color: var(--ink); }
.prose pre { overflow: auto; padding: 1.2rem; border-radius: var(--radius-s); background: var(--ink); color: var(--paper); font-size: .92rem; line-height: 1.6; }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; }
.prose pre code { font-size: inherit; }
.prose :not(pre) > code { padding: .1em .4em; border-radius: 4px; background: rgba(11, 11, 12, .09); }
.prose table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.prose th, .prose td { padding: .7rem 1rem; border-bottom: 1px solid var(--line); text-align: left; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose :is(ul, ol):not(.social):not(.share):not(.tag-cloud):not(.toc ol) li + li { margin-top: .5em; }
.prose .callout { padding: 1.2rem 1.4rem; border-radius: var(--radius-s); background: #fff; border: 1.5px solid var(--ink); }

/* Article */
.article-head { padding-block: clamp(40px, 6vw, 72px) 0; }
.article-head h1 { font-size: var(--t-h1); max-width: 22ch; margin-bottom: 1.2rem; }
.article-meta { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; list-style: none; font-size: .9375rem; line-height: 1.45; font-weight: 600; color: var(--muted); }
.article-cover { margin-block: 0 1.5rem; }
.article-section { padding-top: clamp(28px, 4vw, 56px); }
.article-cover .media { aspect-ratio: 16 / 9; border-radius: var(--radius); }
.lead { font-size: clamp(1.2rem, 2vw, 1.4rem); font-weight: 550; line-height: 1.45; max-width: 40rem; margin-bottom: 1.75rem; text-wrap: pretty; }
.share { display: flex; gap: .6rem; list-style: none; }
.share a { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 1.5px solid var(--line); border-radius: 999px; }
.share a:hover { background: var(--ink); color: var(--paper); }
.prev-next { display: grid; gap: 1rem; margin-top: clamp(32px, 5vw, 64px); }
@media (min-width: 720px) { .prev-next { grid-template-columns: 1fr 1fr; } }
.prev-next a { display: grid; gap: .3rem; padding: 1.4rem; border: 1.5px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.prev-next a:hover { border-color: var(--ink); }
.prev-next small { font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.prev-next .is-next { text-align: right; }
.comments { margin-top: clamp(40px, 6vw, 80px); }
.comments form .btn { margin-top: .6rem; }
.comments_section { margin-top: clamp(32px, 5vw, 56px); }
.comment { padding-block: 1.4rem; border-top: 1px solid var(--line); }
.comment__head { display: flex; align-items: center; gap: .8rem; margin-bottom: .7rem; }
.comment__avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--accent); font-weight: 800; flex: none; }
.comment__who { font-weight: 800; margin: 0; line-height: 1.2; }
.comment__when { font-size: var(--t-small); color: var(--muted); margin: 0; }
.comment__body { margin: 0 0 .6rem; overflow-wrap: anywhere; }
.comment__reply { font-size: var(--t-small); }
.comment__replies { display: grid; gap: .8rem; margin-top: 1.2rem; margin-left: clamp(12px, 3vw, 28px); padding-left: clamp(12px, 3vw, 24px); border-left: 2px solid var(--line); }
.comment--reply { padding: 1rem 1.2rem; border: 0; border-radius: var(--radius); background: var(--paper-2); }
.comment--reply .comment__avatar { width: 34px; height: 34px; background: var(--paper); color: var(--ink); }
.sidebar { display: grid; gap: 2rem; }
.sidebar h2 { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: .8rem; }
.sidebar__list { list-style: none; display: grid; gap: .8rem; }
.sidebar__list a { font-weight: 700; text-decoration: none; line-height: 1.35; }
.sidebar__list a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
@media (min-width: 960px) { .sidebar--sticky { position: sticky; top: calc(var(--header-h) + 24px); } }

/* Project cards and detail */
.project { display: grid; gap: 1rem; }
.project__facts { display: grid; gap: 1.2rem; list-style: none; margin-block: 1.5rem; }
@media (min-width: 720px) { .project__facts { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); } }
.project__facts dt { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.project__facts dd { margin: .2rem 0 0; font-weight: 700; }

/* Video dialog */
.lightbox { width: min(96vw, 1100px); padding: 0; border: 0; border-radius: var(--radius); background: #000; overflow: hidden; }
.lightbox::backdrop { background: rgba(0, 0, 0, .8); }
.lightbox__frame { aspect-ratio: 16 / 9; width: 100%; }
.lightbox__frame iframe { width: 100%; height: 100%; border: 0; }
.lightbox__close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 44px; height: 44px; border-radius: 999px; border: 0; background: var(--accent); color: var(--ink); cursor: pointer; display: grid; place-items: center; }

/* Cookie notice */
.cookie { position: fixed; left: var(--gutter); right: var(--gutter); bottom: 16px; z-index: 60; display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.5rem; max-width: 720px; padding: 1rem 1.2rem; border: 1px solid var(--line-ink); border-radius: var(--radius); background: var(--ink-2); color: var(--paper); box-shadow: 0 20px 50px rgba(0, 0, 0, .5); font-size: var(--t-small); }
.cookie p { margin: 0; flex: 1 1 280px; }
.cookie a { color: var(--accent); }
.to-top { position: fixed; right: 16px; bottom: 16px; z-index: 40; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 999px; background: var(--accent); color: var(--ink); opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .25s, transform .25s var(--ease); }
.to-top.is-on { opacity: 1; pointer-events: auto; transform: none; }

/* Ads (kept, but reserved space prevents layout shift) */
.ad-slot:not(:has(*)) { display: none; }   /* an empty sponsor slot must not leave a gap */
.ads_box:has(ins[data-ad-status="unfilled"]) { display: none; }
.ad-slot { margin-block: 1.5rem; }

/* Error pages */
.error-view { min-height: 60vh; display: grid; align-content: center; gap: 1rem; }
.error-view .code { font-size: clamp(5rem, 24vw, 16rem); font-weight: 800; line-height: .9; letter-spacing: -.05em; color: var(--accent); margin: 0; }

/* About */
.about { display: grid; gap: clamp(28px, 5vw, 72px); align-items: start; }
@media (min-width: 900px) { .about { grid-template-columns: 1.4fr 1fr; } }
.about__photo { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; background: var(--ink-3); }
.about__photo picture { display: block; width: 100%; height: 100%; }
.about__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }

/* ---------- 5. Article extras, promos, ads ---------- */
.play { position: absolute; inset: 0; display: grid; place-items: center; width: 100%; border: 0; background: linear-gradient(180deg, transparent 40%, rgba(11, 11, 12, .55)); color: var(--paper); cursor: pointer; z-index: 1; text-decoration: none; }
.play .icon { width: 64px; height: 64px; padding: 18px; border-radius: 999px; background: var(--accent); color: var(--ink); transition: transform .25s var(--ease); }
.play:hover .icon, .play:focus-visible .icon { transform: scale(1.12); }
.toc { margin-bottom: 2rem; padding: 1.1rem 1.3rem; border: 1.5px solid var(--ink); border-radius: var(--radius); background: #fff; max-width: var(--measure); }
.toc .toc_title { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: .8rem; }
.toc ol { padding-left: 1.3rem; display: grid; gap: .15rem; font-weight: 600; line-height: 1.45; }
.toc li + li { margin-top: 0; }
.toc a { display: flex; align-items: center; min-height: 40px; text-decoration: none; }
.toc a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: .12em; }
.heading-anchor { display: flex; align-items: baseline; gap: .5rem; }
.heading-anchor .header_link { text-decoration: none; opacity: 0; transition: opacity .2s; font-weight: 600; }
.heading-anchor:hover .header_link, .heading-anchor .header_link:focus-visible { opacity: 1; }
.prose figure, .prose .blog_content__media_box { margin: 1.6em 0; }
.prose figcaption { margin-top: .6rem; font-size: var(--t-small); line-height: 1.4; color: rgba(11, 11, 12, .68); text-align: center; }
.prose .blog_content__image { width: 100%; }
.prose .callout .callout__title { display: block; margin-bottom: .4rem; font-size: 1.05rem; }
.prose .callout .btn { margin-top: .4rem; }
.prose .blog_iframe__container { margin: 1.6em 0; }
.resources { max-width: var(--measure); margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.resources .br_title { font-size: var(--t-h3); }
.resources ol { padding-left: 1.3rem; display: grid; gap: .5rem; }
.mid-article-cta { margin: 2rem 0; padding: 1rem 1.2rem; border: 1.5px solid var(--ink); border-radius: var(--radius); background: #fff; }
.mid-article-cta__link { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; text-decoration: none; }
.mid-article-cta__text { flex: 1 1 220px; font-size: .95rem; }
.mid-article-cta__action { font-weight: 800; }
.promo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 2rem; padding: clamp(18px, 3vw, 32px); border-radius: var(--radius); background: var(--ink); color: var(--paper); text-decoration: none; --muted: var(--on-ink-muted); }
.promo:hover { text-decoration: none; }
.promo .btn { background: var(--accent); color: var(--ink); }
.promo__text { display: grid; gap: .3rem; flex: 1 1 320px; }
.promo__title { font-size: var(--t-h2); line-height: 1.1; letter-spacing: -.02em; }
.ads_box { margin-block: 1.5rem; }
.ads_box .ads_title { margin: 0 0 .5rem; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.manual_ads__card, .manual_ads_text__card { padding: 1rem 1.2rem; border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff; }
.manual_ads__card .ads_image { margin-bottom: .8rem; border-radius: var(--radius-s); overflow: hidden; }

.video-facade { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-s); overflow: hidden; background: var(--ink); }
.video-facade__link { position: absolute; inset: 0; display: block; }
.video-facade__link img { width: 100%; height: 100%; object-fit: cover; }
.video-facade iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.video-facade .play { text-decoration: none; }

/* Links that stand alone get a 24px minimum hit area (WCAG 2.5.8) */
.sidebar__list a, .site-footer__legal a, .crumbs a, .row-item__title a, .prose .toc a { display: inline-block; min-height: 24px; padding-block: .2rem; }
.sidebar__list { gap: .4rem; }

/* Chainabit product block. Article/sidebar version is a dark card with one obvious primary action; the footer version is a row of small pills. */
.chainabit-container { display: grid; gap: 1rem; }
.chainabit-container:not(.chainabit--inline) { position: relative; overflow: hidden; padding: clamp(22px, 3vw, 30px); padding-top: clamp(26px, 3.4vw, 34px); border-radius: var(--radius); background: var(--ink); color: var(--paper); --muted: var(--on-ink-muted); }
.chainabit-container:not(.chainabit--inline)::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--accent); }
.chainabit-brand { display: flex; align-items: center; gap: .8rem; }
.chainabit-logo-wrapper { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--paper); flex: none; }
.chainabit-logo-wrapper img { width: 30px; height: 30px; }
.chainabit-title-group { display: grid; line-height: 1.2; }
.chainabit-brand-name { font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; }
.chainabit-status-badge { font-size: .8rem; font-weight: 700; color: var(--accent); }
.chainabit-tagline { margin: .4rem 0 0; color: var(--on-ink-muted); font-size: 1rem; line-height: 1.6; }
.chainabit-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.chainabit-action-card { display: inline-flex; align-items: center; gap: .7rem; min-height: 48px; padding: .5rem 1rem; border: 1.5px solid currentColor; border-radius: 999px; font-weight: 700; text-decoration: none; transition: transform .2s var(--ease), background-color .2s, color .2s, border-color .2s; }
.chainabit-action-card:hover { background: var(--accent); color: var(--ink); border-color: var(--accent); text-decoration: none; }
.chainabit-action-card img, .chainabit-action-card svg { width: 20px; height: 20px; flex: none; }
.chainabit-action-card .action-sublabel, .chainabit-action-card .action-chevron { display: none; }
.chainabit-container:not(.chainabit--inline) .chainabit-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.chainabit-container:not(.chainabit--inline) .chainabit-action-card { border-radius: 14px; border-color: var(--line-ink); padding: .8rem 1rem; }
.chainabit-container:not(.chainabit--inline) .chainabit-action-card:hover { transform: translateY(-2px); }
.chainabit-container:not(.chainabit--inline) .action-info { display: grid; line-height: 1.25; text-align: left; }
.chainabit-container:not(.chainabit--inline) .action-label { font-size: .98rem; }
.chainabit-container:not(.chainabit--inline) .action-sublabel { display: block; font-size: .78rem; font-weight: 500; opacity: .8; }
.chainabit-container:not(.chainabit--inline) .chainabit-action--web { grid-column: 1 / -1; justify-content: space-between; min-height: 64px; background: var(--accent); color: var(--ink); border-color: var(--accent); padding-inline: 1.2rem; }
.chainabit-container:not(.chainabit--inline) .chainabit-action--web:hover { background: var(--paper); border-color: var(--paper); }
.chainabit-container:not(.chainabit--inline) .chainabit-action--web .action-label { font-size: 1.1rem; }
.chainabit-container:not(.chainabit--inline) .chainabit-action--web .action-icon { display: none; }
.chainabit-container:not(.chainabit--inline) .chainabit-action--web .action-info { flex: 1; }
.chainabit-container:not(.chainabit--inline) .chainabit-action--web .action-chevron { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; background: var(--ink); color: var(--accent); transition: transform .25s var(--ease); }
.chainabit-container:not(.chainabit--inline) .chainabit-action--web:hover .action-chevron { transform: translateX(4px); }
.chainabit-container:not(.chainabit--inline) .chainabit-action--web .action-chevron svg { width: 16px; height: 16px; }
.chainabit-container:not(.chainabit--inline) { container-type: inline-size; }
@container (max-width: 440px) { .chainabit-actions { grid-template-columns: 1fr !important; } }

/* Motion: everything decorative is opt-in and respects the user's setting */
.reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
  .js .reveal.is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
@media (prefers-reduced-motion: no-preference) { @view-transition { navigation: auto; } .site-header { view-transition-name: site-header; } }
@media print { .site-header, .site-footer, .cookie, .to-top { display: none; } body { background: #fff; color: #000; } }

/* ---------- 6. Small utilities that replace inline styles ---------- */
.plain-list { list-style: none; }
.card__link { position: relative; z-index: 1; }
.arrow-link--lg { font-size: 1.4rem; }
.contact-alt { margin-top: 3rem; }
.lede { font-size: 1.2rem; max-width: 36rem; }
.error-view h1 { margin: 0; }
.nav__panel--narrow { min-width: 160px; }
.check--spaced { margin-top: .9rem; }
.sidebar__note { display: block; font-weight: 500; font-size: .875rem; }
.category-tile p { margin: 0; }
.project__facts { margin: 0; }
.lightbox img { width: 100%; height: auto; max-height: 90vh; object-fit: contain; }
.chainabit_promotion__section { margin-top: 2rem; }
.article-foot { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line-paper); }
.author { display: flex; gap: 1.2rem; align-items: flex-start; margin-top: 3rem; }
.author__photo { border-radius: 999px; flex: none; }
.author__text { margin: .3rem 0; }
.split .article-cover { margin-top: 0; }
.about .social { margin-top: 2rem; }
.social--paper a { border-color: var(--line-paper); }
.social--paper a:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.prose .social, .prose .share, .prose .tag-cloud { padding-left: 0; }
.prose .toc, .toc { margin-top: 0; }
.prose .toc .toc_title, .toc .toc_title { margin: 0 0 .8rem; }

/* On article pages exactly one product card is prominent: in the sidebar when there is one, after the text on small screens. */
.sidebar__promo--article { display: none; }
@media (min-width: 960px) { .sidebar__promo--article { display: block; } .chainabit_promotion__section { display: none; } }

/* ---------- 7. Article rhythm (readability review) ----------
   The CMS nests content in extra wrappers (div > section > div > p), so `.prose > * + *` never reached it.
   These rules give the nested content the same vertical rhythm. */
.prose :is(p, li), .prose .lead { text-wrap: pretty; overflow-wrap: break-word; }
.prose .blog_content__desc > * { margin: 0; }
.prose .blog_content__desc > * + * { margin-top: 1.1em; }
.prose .blog_content__desc :is(ul, ol) { padding-left: 1.5rem; }
.prose .blog_post__detail > .blog_content + .blog_content { margin-top: 2.4rem; }
.prose .blog_content > :is(h2, h3) { margin-top: 0; margin-bottom: .7rem; font-size: clamp(1.5rem, 2.8vw, 2rem); scroll-margin-top: 5.5rem; }
.prose .blog_content__desc h3 { font-size: var(--t-h3); margin-top: 1.6em; }
.prose .blog_content__media_box, .prose figure { margin-block: 1.8rem; }
@media (max-width: 600px) { .prose { line-height: 1.65; } .article-head h1 { text-wrap: pretty; } }

/* ---------- Captcha (Cloudflare Turnstile) ----------
   The widget is invisible ("interaction-only"). The host box takes no space until Cloudflare needs the visitor to act; then it is
   shown centred above the page, keyboard-focusable, and Escape closes it. */
.ds-turnstile { position: fixed; left: 0; top: 0; width: 0; height: 0; overflow: hidden; z-index: 2000; }
.ds-turnstile.is-active { left: 50%; top: 50%; width: auto; height: auto; max-width: calc(100vw - 2rem); padding: 1rem; overflow: visible; transform: translate(-50%, -50%); background: var(--paper, #fff); border: 1px solid var(--line-paper, #ccc); border-radius: var(--radius-s, 6px); box-shadow: 0 10px 40px rgba(0, 0, 0, .35); }
.ds-turnstile:focus-visible { outline: 3px solid var(--accent, #0a58ca); outline-offset: 2px; }
