:root {
    --ink: #101820;
    --ink-2: #1a2732;
    --paper: #f6f3ea;
    --paper-2: #ece8dc;
    --white: #ffffff;
    --accent: #c7ff4a;
    --accent-ink: #142000;
    --blue: #3557ff;
    --blue-dark: #2037ba;
    --muted: #626e78;
    --muted-light: #a8b2bb;
    --line: #d6d2c8;
    --line-dark: #34414c;
    --danger: #9b2c2c;
    --shadow: 0 20px 60px rgba(16, 24, 32, 0.11);
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 24px;
    --shell: 1160px;
    --shell-wide: 1280px;
    --article: 760px;
    --header-height: 72px;
    --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    --step--1: clamp(.78rem, .75rem + .12vw, .86rem);
    --step-0: clamp(.98rem, .93rem + .2vw, 1.08rem);
    --step-1: clamp(1.18rem, 1.06rem + .45vw, 1.42rem);
    --step-2: clamp(1.48rem, 1.25rem + .9vw, 2rem);
    --step-3: clamp(2rem, 1.55rem + 1.7vw, 3rem);
    --step-4: clamp(2.9rem, 2rem + 3.2vw, 5.7rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 1rem;
    font-size: var(--step-0);
    line-height: 1.62;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}
body.nav-open { overflow: hidden; }
img, svg, video, iframe { max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .17em; }
a:hover { text-decoration-color: var(--blue); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .6; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }

.screen-reader-text {
    border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
    height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important;
}
.screen-reader-text:focus {
    background: var(--white); clip: auto !important; clip-path: none; color: var(--ink); display: block; font-size: 1rem;
    height: auto; left: 12px; padding: 14px 18px; top: 12px; width: auto; z-index: 99999; box-shadow: var(--shadow);
}
.skip-link { font-weight: 800; }

.shell { width: min(calc(100% - 40px), var(--shell)); margin-inline: auto; }
.shell--wide { width: min(calc(100% - 56px), var(--shell-wide)); }
.shell--article { width: min(calc(100% - 40px), var(--article)); margin-inline: auto; }
.site-main { overflow: clip; }

/* Header */
.site-header {
    position: sticky; top: 0; z-index: 1000; background: rgba(246,243,234,.96);
    border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.admin-bar .site-header { top: 32px; }
.site-header__bar { min-height: var(--header-height); display: grid; grid-template-columns: minmax(190px,auto) minmax(0,1fr) auto; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-size: 1rem; font-weight: 850; text-decoration: none; letter-spacing: -.02em; white-space: nowrap; }
.brand__mark { width: 38px; height: 38px; display: grid; grid-template-columns: 1fr 1fr; background: var(--ink); color: var(--paper); border-radius: 10px; overflow: hidden; font-family: var(--font-mono); font-size: 10px; line-height: 1; }
.brand__mark span { display: grid; place-items: center; }
.brand__mark span:last-child { background: var(--accent); color: var(--accent-ink); }
.brand__logo .custom-logo-link { display: flex; align-items: center; }
.brand__logo .custom-logo { max-height: 46px; width: auto; }
.site-nav { justify-self: center; min-width: 0; }
.site-nav ul, .footer-menu { list-style: none; padding: 0; margin: 0; }
.site-nav > ul, .site-nav .menu { display: flex; align-items: center; justify-content: center; gap: 2px; }
.site-nav a { display: inline-flex; min-height: 42px; align-items: center; padding: 8px 11px; border-radius: 8px; text-decoration: none; font-size: .91rem; font-weight: 700; color: #303b44; }
.site-nav a:hover, .site-nav .current-menu-item > a, .site-nav .current_page_item > a { background: var(--paper-2); color: var(--ink); }
.site-nav li { position: relative; }
.site-nav .sub-menu { position: absolute; min-width: 220px; top: calc(100% + 8px); left: 0; background: var(--white); border: 1px solid var(--line); padding: 8px; border-radius: 12px; box-shadow: var(--shadow); display: none; }
.site-nav li:hover > .sub-menu, .site-nav li:focus-within > .sub-menu { display: block; }
.site-nav .sub-menu a { width: 100%; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-button, .nav-toggle, .text-button { border: 0; background: transparent; color: inherit; }
.icon-button { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 8px; }
.icon-button:hover { background: var(--paper-2); }
.nav-toggle { display: none; }
.site-search-panel { border-top: 1px solid var(--line); background: var(--paper); }
.site-search-panel__inner { display: grid; grid-template-columns: minmax(0, 760px) auto; align-items: end; gap: 20px; padding-block: 28px 32px; }
.site-search label, .archive-search label { display: block; margin-bottom: 9px; font-size: var(--step--1); font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.search-field-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.search-field-row input, select, textarea, .entry-content input:not([type="checkbox"]):not([type="radio"]) { width: 100%; min-height: 48px; border: 1px solid #aeb4b8; background: var(--white); color: var(--ink); border-radius: 10px; padding: 10px 13px; }
.search-field-row input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(53,87,255,.14); outline: none; }
.text-button { text-decoration: underline; text-underline-offset: .2em; font-weight: 700; padding: 8px; }

/* Buttons */
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 17px; border-radius: 10px; border: 1px solid transparent; font-weight: 800; font-size: .93rem; text-decoration: none; transition: transform .16s ease, background-color .16s ease, border-color .16s ease; }
.button:hover { transform: translateY(-1px); text-decoration: none; }
.button--compact { min-height: 40px; padding: 8px 14px; }
.button--ink { background: var(--ink); color: var(--white); }
.button--ink:hover { background: var(--ink-2); }
.button--accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.button--accent:hover { background: #b9f13e; }
.button--ghost { border-color: #aeb2ad; background: transparent; color: var(--ink); }
.button--ghost:hover { border-color: var(--ink); background: rgba(255,255,255,.45); }
.button--ghost-light { border-color: #61707c; background: transparent; color: var(--white); }
.button--ghost-light:hover { border-color: var(--white); background: rgba(255,255,255,.06); }
.button--block { width: 100%; }
.text-link { font-weight: 800; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.text-link:hover { color: var(--blue); }
.text-link--large { font-size: var(--step-1); }

/* Shared typography */
.eyebrow { margin: 0 0 14px; font-family: var(--font-mono); font-size: .74rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; color: var(--muted); }
.eyebrow--accent { color: #315000; }
h1, h2, h3 { line-height: 1.08; letter-spacing: -.04em; text-wrap: balance; }
h1 { font-size: 5rem; font-size: var(--step-4); margin: 0; font-weight: 850; }
h2 { font-size: 2.7rem; font-size: var(--step-3); margin: 0; font-weight: 820; }
h3 { font-size: 1.35rem; font-size: var(--step-1); margin: 0; }
p { text-wrap: pretty; }
.hero__lede { max-width: 720px; font-size: 1.35rem; font-size: var(--step-1); line-height: 1.55; color: #45515b; }
.section { padding-block: 84px; padding-block: clamp(64px, 7vw, 104px); }
.section--paper { background: var(--paper); }
.section--soft { background: var(--paper-2); }
.section--ink { background: var(--ink); color: var(--white); }
.section--ink .eyebrow { color: var(--accent); }
.section--ink p { color: #bec7ce; }
.section-heading, .split-heading { display: flex; align-items: end; justify-content: space-between; gap: clamp(28px,5vw,64px); margin-bottom: clamp(30px,4vw,46px); }
.section-heading > div { max-width: 720px; }
.section-heading p, .split-heading > p { color: var(--muted); max-width: 580px; margin-bottom: 0; }
.section-heading--light p { color: var(--muted-light); }
.section-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.section-actions--top { margin-top: 36px; }

/* Home hero */
.hero--home { position: relative; padding-block: 88px 72px; padding-block: clamp(64px, 7vw, 96px) clamp(56px, 6vw, 82px); background: var(--paper); }
.hero--home::before { content: ""; position: absolute; inset: 0; opacity: .38; pointer-events: none; background-image: linear-gradient(to right, rgba(16,24,32,.07) 1px, transparent 1px), linear-gradient(to bottom, rgba(16,24,32,.05) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(to bottom, black, transparent 80%); }
.hero__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr); gap: clamp(44px, 6vw, 82px); align-items: center; }
.hero__content h1 { max-width: 12.8ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero-search { display: grid; grid-template-columns: 1fr auto; max-width: 680px; margin-top: 26px; padding: 6px; border: 1px solid #c5c1b7; background: rgba(255,255,255,.82); border-radius: 12px; box-shadow: 0 10px 30px rgba(16,24,32,.05); }
.hero-search input { border: 0; background: transparent; min-width: 0; padding: 11px 12px; color: var(--ink); outline: none; }
.hero-search button { border: 0; border-radius: 8px; background: var(--ink); color: var(--white); font-weight: 800; padding: 10px 16px; }
.research-board { position: relative; background: var(--ink); color: var(--white); padding: 24px; border-radius: 20px; box-shadow: 0 26px 70px rgba(16,24,32,.18); transform: none; }
.research-board::before { content: ""; position: absolute; inset: 9px; border: 1px solid var(--line-dark); border-radius: calc(var(--radius-lg) - 7px); pointer-events: none; }
.research-board__top { position: relative; display: flex; justify-content: space-between; gap: 12px; padding: 6px 8px 20px; border-bottom: 1px solid var(--line-dark); font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.research-board__top span { color: var(--muted-light); }
.research-board__top strong { color: var(--accent); }
.research-steps { position: relative; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.research-steps li { min-height: 126px; display: flex; flex-direction: column; justify-content: end; padding: 18px 10px; border-right: 1px solid var(--line-dark); }
.research-steps li:last-child { border-right: 0; }
.research-steps span { font-family: var(--font-mono); color: #84919a; font-size: .68rem; margin-bottom: auto; }
.research-steps strong { font-size: 1rem; }
.research-steps small { color: var(--muted-light); }
.research-board__matrix { position: relative; display: grid; grid-template-columns: repeat(6,1fr); gap: 5px; margin: 4px 8px 14px; }
.research-board__matrix span { height: 7px; background: #33424d; border-radius: 999px; }
.research-board__matrix span:nth-child(2), .research-board__matrix span:nth-child(5) { background: var(--accent); }
.research-board > p { position: relative; margin: 0; padding: 0 8px 4px; color: #aeb9c1; font-size: .78rem; }
.research-board--small { transform: none; box-shadow: none; max-width: 460px; justify-self: end; }
.page-intro-content { padding-block: 36px; }

/* Compare promo */
.compare-promo { padding-block: clamp(68px,7vw,96px); }
.compare-promo__grid { display: grid; grid-template-columns: minmax(0,1.08fr) minmax(360px,.92fr); gap: clamp(44px,7vw,88px); align-items: center; }
.compare-promo__grid h2 { max-width: 780px; }
.compare-promo__grid p { max-width: 700px; }
.compare-sample { border: 1px solid var(--line-dark); border-radius: 16px; overflow: hidden; background: #131f29; }
.compare-sample__row { display: grid; grid-template-columns: 42px 1fr auto; gap: 13px; align-items: center; padding: 15px; border-bottom: 1px solid var(--line-dark); }
.compare-sample__row > span { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #586572; border-radius: 8px; font-family: var(--font-mono); font-size: .74rem; color: var(--accent); }
.compare-sample__row small { color: var(--muted-light); }
.compare-sample__foot { display: flex; justify-content: space-between; padding: 18px 15px; font-size: .8rem; color: var(--muted-light); }
.compare-sample__foot strong { color: var(--white); }

/* Task index */
.task-index { border-top: 1px solid var(--line); }
.task-row { display: grid; grid-template-columns: 60px minmax(0,1fr) auto 22px; align-items: center; gap: 16px; min-height: 74px; border-bottom: 1px solid var(--line); text-decoration: none; transition: padding .16s ease, background .16s ease; }
.task-row > span:first-child { font-family: var(--font-mono); color: var(--muted); font-size: .73rem; }
.task-row strong { font-size: 1.08rem; }
.task-row small { color: var(--muted); }
.task-row:hover { background: rgba(255,255,255,.55); padding-inline: 12px; }
.task-row--large { min-height: 112px; grid-template-columns: 60px minmax(0,1fr) auto 22px; }
.task-row--large div { display: grid; gap: 7px; }
.task-row--large div strong { font-size: var(--step-1); }
.task-row--large div small { max-width: 700px; }
.task-row--large em { font-style: normal; color: var(--muted); font-size: .86rem; }

/* Tools */
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
.tool-card { min-width: 0; display: flex; flex-direction: column; background: var(--paper); border: 1px solid #c7c3b9; border-radius: 16px; overflow: hidden; box-shadow: 0 1px 0 rgba(16,24,32,.035); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.section--paper .tool-card { background: var(--white); }
.tool-card:hover { transform: translateY(-3px); border-color: #a8a39a; box-shadow: 0 18px 42px rgba(16,24,32,.09); }
.tool-card__topline { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 20px 20px 0; }
.tool-monogram { flex: 0 0 auto; width: 42px; height: 42px; display: inline-grid; place-items: center; border: 1px solid #aeb3af; border-radius: 10px; font-family: var(--font-mono); font-size: .82rem; font-weight: 800; background: var(--white); color: var(--ink); }
.tool-card__badges { display: flex; justify-content: end; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 8px; border-radius: 999px; background: #dfe6ff; color: #2038a3; font-size: .68rem; font-weight: 800; letter-spacing: .02em; }
.badge--muted { background: #e5e2d8; color: #62665f; }
.badge--dark { background: #2e3c47; color: #dbe2e7; }
.tool-card__body { padding: 18px 20px 20px; }
.tool-card__title { font-size: 1.42rem; margin: 0 0 9px; }
.tool-card__title a { text-decoration: none; }
.tool-card__title a:hover { color: var(--blue); }
.tool-card__excerpt { color: #535f68; margin: 0 0 18px; min-height: 3.2em; }
.fact-grid { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.fact-grid > div { min-width: 0; padding: 11px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fact-grid dt { color: var(--muted); font-family: var(--font-mono); font-size: .65rem; letter-spacing: .06em; text-transform: uppercase; }
.fact-grid dd { margin: 5px 0 0; font-weight: 700; font-size: .84rem; overflow-wrap: anywhere; }
.fact-grid a { color: var(--blue-dark); }
.tool-card__actions { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 20px; border-top: 1px solid var(--line); background: rgba(255,255,255,.42); }
.shortlist-button { min-height: 36px; border: 1px solid #a6aba8; background: transparent; border-radius: 8px; padding: 7px 10px; font-size: .78rem; font-weight: 800; }
.shortlist-button:hover, .shortlist-button.is-selected { border-color: var(--ink); background: var(--ink); color: var(--white); }

/* Workflow / editorial */
.workflow-section__head { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 42px; align-items: end; margin-bottom: 40px; }
.workflow-rhythm { display: flex; flex-wrap: wrap; gap: 4px; }
.workflow-rhythm span { border: 1px solid var(--line); padding: 7px 10px; border-radius: 999px; font-family: var(--font-mono); font-size: .68rem; }
.editorial-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
.entry-card { min-height: 286px; display: flex; flex-direction: column; padding: 24px; border: 1px solid #c9c5bb; border-radius: 16px; background: var(--paper); }
.entry-card__meta { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 42px; color: var(--muted); font-family: var(--font-mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; }
.entry-card h2 { font-size: 1.55rem; margin-bottom: 12px; }
.entry-card h2 a { text-decoration: none; }
.entry-card p { color: var(--muted); }
.entry-card .text-link { margin-top: auto; align-self: flex-start; }
.guide-list { border-top: 1px solid var(--line-dark); }
.guide-row { display: grid; grid-template-columns: 70px 1fr 48px; gap: 22px; align-items: start; padding: 28px 0; border-bottom: 1px solid var(--line-dark); }
.guide-row__index { font-family: var(--font-mono); color: #7d8b95; }
.guide-row__meta { margin: 0 0 8px !important; font-family: var(--font-mono); font-size: .72rem; }
.guide-row h3 { font-size: 1.35rem; }
.guide-row h3 a { text-decoration: none; }
.guide-row h3 a:hover { color: var(--accent); }
.guide-row p { max-width: 760px; margin-bottom: 0; }
.guide-row__arrow { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #586572; border-radius: 50%; text-decoration: none; color: var(--accent); }
.guide-row__arrow:hover { background: var(--accent); color: var(--accent-ink); }

/* Trust */
.trust-grid { display: grid; grid-template-columns: minmax(0,.82fr) minmax(0,1.18fr); gap: clamp(50px,7vw,92px); align-items: start; }
.trust-intro { position: sticky; top: calc(var(--header-height) + 34px); }
.trust-intro p { color: var(--muted); }
.trust-principles { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.trust-principles li { display: grid; grid-template-columns: 54px 1fr; gap: 22px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.trust-principles > li > span { font-family: var(--font-mono); color: var(--blue); font-size: .75rem; }
.trust-principles h3 { font-size: 1.22rem; }
.trust-principles p { margin-bottom: 0; color: var(--muted); }

/* Footer */
.site-footer { background: #0b1117; color: var(--white); padding-top: 72px; }
.footer-grid { display: grid; grid-template-columns: 1.15fr .8fr 1.05fr; gap: clamp(38px,6vw,72px); padding-bottom: 58px; }
.brand--footer .brand__mark { border: 1px solid #33414d; }
.footer-brand p, .footer-note p { color: #9ba8b2; max-width: 460px; }
.footer-label { margin: 0 0 18px; color: var(--accent) !important; font-family: var(--font-mono); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.footer-menu { columns: 2; column-gap: 22px; }
.footer-menu li { break-inside: avoid; margin-bottom: 8px; }
.footer-menu a, .footer-arrow { color: #d2d9df; text-decoration: none; }
.footer-menu a:hover, .footer-arrow:hover { color: var(--accent); }
.footer-arrow { font-weight: 800; }
.footer-bottom { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid #29353f; color: #87949e; font-size: .78rem; }
.footer-bottom a { color: #d2d9df; text-decoration: none; }

/* Archive / terms */
.archive-hero, .page-hero, .article-hero { padding-block: clamp(52px, 6vw, 82px); background: var(--paper); border-bottom: 1px solid var(--line); }
.archive-hero__grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(320px,420px); gap: clamp(40px,6vw,76px); align-items: end; }
.archive-hero h1, .page-hero h1, .article-hero h1 { max-width: 980px; }
.archive-hero p, .page-hero p { max-width: 720px; color: var(--muted); font-size: var(--step-1); }
.archive-hero--compact { padding-block: 64px; }
.archive-description { max-width: 760px; color: var(--muted); }
.archive-description p:last-child { margin-bottom: 0; }
.archive-search { align-self: end; padding: 20px; border: 1px solid #c7c3b9; border-radius: 14px; background: rgba(255,255,255,.78); box-shadow: 0 10px 30px rgba(16,24,32,.045); }
.archive-search--inline { max-width: 760px; margin-top: 28px; padding: 0; border: 0; background: transparent; }
.archive-stat { justify-self: end; width: min(100%, 300px); min-height: 156px; display: flex; flex-direction: column; justify-content: end; padding: 22px; background: var(--ink); color: var(--white); border-radius: 18px; }
.archive-stat strong { font-size: clamp(3rem, 7vw, 5.5rem); line-height: .9; letter-spacing: -.06em; }
.archive-stat span { margin-top: 14px; color: var(--accent); font-family: var(--font-mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; }
.archive-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 22px; margin-bottom: 28px; padding-bottom: 18px; border-bottom: 1px solid #c9c5bb; color: var(--muted); }
.archive-toolbar p { margin: 0; }
.pagination-wrap { margin-top: 40px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.page-numbers { min-width: 40px; min-height: 40px; display: inline-grid; place-items: center; padding: 7px 10px; border: 1px solid #b8b5ad; border-radius: 8px; text-decoration: none; }
.page-numbers.current { background: var(--ink); color: var(--white); border-color: var(--ink); }
.term-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.term-card { min-height: 172px; display: grid; grid-template-columns: 44px 1fr 24px; gap: 16px; padding: 24px; background: var(--paper); border: 1px solid #c7c3b9; border-radius: 14px; text-decoration: none; }
.term-card:hover { border-color: var(--ink); box-shadow: 0 12px 34px rgba(16,24,32,.07); }
.term-card__index { color: var(--blue); font-family: var(--font-mono); font-size: .72rem; }
.term-card h2 { font-size: 1.55rem; }
.term-card p { color: var(--muted); margin-bottom: 18px; }
.term-card small { color: var(--muted); font-family: var(--font-mono); }

/* Single tool */
.tool-detail__hero { background: var(--ink); color: var(--white); padding-block: clamp(56px, 6vw, 88px); }
.tool-detail__hero-grid { display: grid; grid-template-columns: minmax(0,1fr) 250px; gap: clamp(38px,6vw,72px); align-items: end; }
.tool-detail__hero .hero__lede { color: #b8c2c9; }
.record-labels { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.record-labels .eyebrow { margin: 0; color: var(--accent); }
.tool-detail__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.tool-identity { aspect-ratio: 1; display: flex; flex-direction: column; justify-content: space-between; padding: 22px; border: 1px solid #4c5a66; border-radius: 22px; background: radial-gradient(circle at 75% 20%, rgba(199,255,74,.18), transparent 38%), #141f28; }
.tool-identity > span { align-self: end; font-size: 7rem; line-height: 1; font-weight: 900; letter-spacing: -.09em; color: var(--accent); }
.tool-identity small { font-family: var(--font-mono); color: #93a0a9; text-transform: uppercase; letter-spacing: .08em; }
.tool-detail__layout, .collection-layout { display: grid; grid-template-columns: minmax(240px,280px) minmax(0,840px); justify-content: space-between; gap: clamp(44px,7vw,92px); align-items: start; padding-block: clamp(54px,7vw,92px); }
.tool-facts { position: sticky; top: calc(var(--header-height) + 30px); border-top: 2px solid var(--ink); }
.tool-facts .eyebrow { margin-top: 14px; }
.tool-facts dl { margin: 0; border-top: 1px solid var(--line); }
.tool-facts dl > div { display: grid; grid-template-columns: 1fr 1.25fr; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.tool-facts dt { color: var(--muted); font-size: .76rem; }
.tool-facts dd { margin: 0; font-weight: 750; font-size: .84rem; overflow-wrap: anywhere; }
.tool-facts dd a { color: var(--blue-dark); }
.fact-note { color: var(--muted); font-size: .78rem; }
.record-footer { display: flex; align-items: center; justify-content: space-between; gap: 40px; padding-block: 46px; border-top: 1px solid var(--line); }
.record-footer h2 { font-size: var(--step-2); }

/* Entry content */
.entry-content { font-size: 1.05rem; color: #28343d; }
.entry-content--research { max-width: 840px; }
.entry-content > * { max-width: 100%; }
.entry-content h2 { margin: 2.3em 0 .7em; font-size: clamp(1.7rem, 1.35rem + 1.2vw, 2.45rem); }
.entry-content h3 { margin: 1.9em 0 .6em; font-size: clamp(1.3rem, 1.15rem + .55vw, 1.65rem); }
.entry-content h4 { margin: 1.6em 0 .55em; }
.entry-content p, .entry-content ul, .entry-content ol { margin-top: 0; margin-bottom: 1.35em; }
.entry-content li + li { margin-top: .4em; }
.entry-content a { color: var(--blue-dark); font-weight: 650; }
.entry-content blockquote { margin: 2em 0; padding: 18px 22px; border-left: 4px solid var(--blue); background: var(--paper-2); font-size: 1.12rem; }
.entry-content pre { overflow-x: auto; padding: 18px; background: var(--ink); color: #e7edf1; border-radius: 12px; font-size: .88rem; }
.entry-content code { font-family: var(--font-mono); }
.entry-content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; margin-block: 1.8em; }
.entry-content th, .entry-content td { min-width: 140px; padding: 12px; border: 1px solid var(--line); text-align: left; }
.entry-content th { background: var(--paper-2); }
.entry-content figure { margin: 2em 0; }
.entry-content figcaption { color: var(--muted); font-size: .8rem; margin-top: 7px; }
.entry-content .alignwide { max-width: min(1100px, calc(100vw - 48px)); margin-left: 50%; transform: translateX(-50%); width: 1100px; }
.entry-content .alignfull { max-width: 100vw; margin-left: 50%; transform: translateX(-50%); width: 100vw; }

/* Articles / pages */
.article-hero { padding-bottom: 68px; }
.article-hero h1 { font-size: clamp(2.55rem, 2rem + 2.3vw, 4.7rem); }
.article-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; color: var(--muted); font-family: var(--font-mono); font-size: .75rem; }
.article-body, .page-body { padding-block: clamp(54px, 8vw, 98px); }
.article-end { display: flex; justify-content: space-between; gap: 20px; padding-block: 28px 54px; border-top: 1px solid var(--line); color: var(--muted); font-size: .83rem; }
.article-end a { color: var(--ink); font-weight: 800; text-decoration: none; }
.page-hero h1 { font-size: clamp(2.5rem, 2rem + 2vw, 4.5rem); }

/* Collection */
.collection-hero { padding-block: clamp(64px, 8vw, 112px); background: var(--blue); color: var(--white); }
.collection-hero__grid { display: grid; grid-template-columns: 1fr 420px; gap: 60px; align-items: end; }
.collection-hero .eyebrow { color: var(--accent); }
.collection-hero .hero__lede { color: #dce2ff; }
.workflow-mark { min-height: 160px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 22px; border: 1px solid rgba(255,255,255,.38); border-radius: 18px; }
.workflow-mark span { width: 52px; height: 52px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; font-family: var(--font-mono); }
.workflow-mark i { flex: 1; height: 1px; background: rgba(255,255,255,.4); }
.collection-aside { position: sticky; top: calc(var(--header-height) + 30px); padding: 20px; background: var(--paper-2); border-radius: 14px; }
.collection-aside p:last-child { margin-bottom: 0; color: var(--muted); }

/* Compare */
.compare-builder { display: grid; grid-template-columns: minmax(260px,.72fr) minmax(0,1.28fr); gap: clamp(40px,7vw,86px); align-items: start; }
.compare-builder__intro p { color: var(--muted); }
.compare-form { display: grid; gap: 20px; padding: clamp(20px,3vw,30px); border: 1px solid #c7c3b9; border-radius: 16px; background: rgba(255,255,255,.72); }
.compare-select-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.compare-select-grid label { display: grid; gap: 7px; font-size: .78rem; font-weight: 800; }
.compare-select-grid select { min-height: 52px; }
.compare-form__actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.comparison-empty { max-width: 760px; padding: clamp(34px, 6vw, 70px); background: var(--paper); border: 1px solid #cbc7bd; border-radius: 18px; }
.comparison-empty p { color: var(--muted); }
.comparison-table-wrap { overflow: auto; border: 1px solid #bdbab2; border-radius: 16px; background: var(--paper); box-shadow: 0 14px 36px rgba(16,24,32,.06); }
.comparison-table { width: 100%; min-width: 880px; border-collapse: collapse; }
.comparison-table th, .comparison-table td { padding: 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.comparison-table th:last-child, .comparison-table td:last-child { border-right: 0; }
.comparison-table tr:last-child th, .comparison-table tr:last-child td { border-bottom: 0; }
.comparison-table thead th { min-width: 190px; background: var(--ink); color: var(--white); }
.comparison-table thead th:first-child { min-width: 180px; color: var(--accent); font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.comparison-table thead .tool-monogram { margin-bottom: 12px; background: #1d2a34; border-color: #46535f; color: var(--accent); }
.comparison-table thead a { display: block; text-decoration: none; }
.comparison-table tbody th { background: #e6e2d7; font-size: .8rem; color: #4d5962; }
.comparison-table tbody td { font-weight: 700; font-size: .88rem; }
.comparison-table tbody td a { color: var(--blue-dark); }
.comparison-next { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; margin-top: 44px; padding-top: 30px; border-top: 1px solid #bdbab2; }
.comparison-next h2 { font-size: var(--step-2); }
.comparison-next > p { color: var(--muted); margin: 0; }

/* Shortlist */
.shortlist-dock { position: fixed; right: 18px; bottom: 18px; z-index: 900; width: min(390px, calc(100vw - 36px)); padding: 16px; background: var(--ink); color: var(--white); border: 1px solid #384650; border-radius: 16px; box-shadow: 0 22px 70px rgba(5,10,14,.28); }
.shortlist-dock__head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.shortlist-dock .eyebrow { color: var(--accent); margin-bottom: 3px; }
.shortlist-dock .text-button { color: #c9d1d7; }
.shortlist-dock__items { display: grid; gap: 6px; margin-block: 13px; }
.shortlist-item { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 8px 9px; border: 1px solid #36444f; border-radius: 8px; font-size: .8rem; }
.shortlist-item button { border: 0; background: transparent; color: #aeb8c0; padding: 3px 5px; }

/* Empty / 404 */
.empty-state { grid-column: 1 / -1; padding: 32px; border: 1px dashed #aaa79f; border-radius: 14px; color: var(--muted); }
.empty-state h2 { color: var(--ink); font-size: var(--step-2); }
.empty-state--large { min-height: 320px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.not-found { min-height: 65vh; display: grid; align-items: center; background: var(--ink); color: var(--white); padding-block: 80px; }
.not-found__grid { display: grid; grid-template-columns: 1fr .8fr; gap: 80px; align-items: center; }
.not-found .eyebrow { color: var(--accent); }
.not-found p { color: #b1bdc5; max-width: 680px; }
.not-found__code { display: grid; grid-template-columns: repeat(3,1fr); border: 1px solid #43515c; border-radius: 18px; overflow: hidden; }
.not-found__code span { aspect-ratio: .8; display: grid; place-items: center; border-right: 1px solid #43515c; font-size: clamp(4rem, 10vw, 8rem); font-weight: 900; letter-spacing: -.08em; color: var(--accent); }
.not-found__code span:last-child { border-right: 0; }
.not-found__code span:nth-child(2) { background: var(--accent); color: var(--accent-ink); }

/* Core WordPress helpers */
.wp-caption, .gallery-caption { color: var(--muted); font-size: .82rem; }
.bypostauthor { font-weight: inherit; }
.sticky { position: relative; }
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin-inline: auto; }


/* Layout refinement 1.1 */
.hero__lede { margin: 22px 0 0; max-width: 650px; }
.hero__signals { list-style: none; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; max-width: 680px; margin: 26px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); }
.hero__signals li { min-width: 0; padding: 0 14px; border-right: 1px solid var(--line); }
.hero__signals li:first-child { padding-left: 0; }
.hero__signals li:last-child { padding-right: 0; border-right: 0; }
.hero__signals strong, .hero__signals span { display: block; }
.hero__signals strong { margin-bottom: 3px; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .07em; text-transform: uppercase; }
.hero__signals span { color: var(--muted); font-size: .76rem; line-height: 1.4; }

.home-task-section { border-top: 1px solid var(--line); }
.task-index--home { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: rgba(255,255,255,.28); }
.task-index--home .task-row { min-height: 92px; grid-template-columns: 44px minmax(0,1fr) auto 20px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.task-index--home .task-row:nth-child(odd) { border-right: 1px solid var(--line); }
.task-index--home .task-row:nth-last-child(-n+2) { border-bottom: 0; }
.task-index--home .task-row:hover { padding-inline: 24px 16px; }

.reviewed-section .section-heading { padding-top: 2px; }
.tool-card__reviewed { display: flex; justify-content: space-between; gap: 14px; margin: 0 0 14px; padding: 10px 0; border-top: 1px solid var(--line); color: var(--muted); font-family: var(--font-mono); font-size: .66rem; letter-spacing: .025em; }
.tool-card__reviewed strong { color: #394650; font-weight: 800; text-align: right; }
.tool-card .fact-grid { border-left: 0; }
.tool-card .fact-grid > div:nth-child(odd) { border-left: 1px solid var(--line); }
.tool-card .fact-grid > div:nth-child(-n+2) { border-top: 1px solid var(--line); }

.compare-promo { position: relative; overflow: hidden; }
.compare-promo::after { content: ""; position: absolute; width: 360px; height: 360px; right: -120px; top: -160px; border: 1px solid rgba(199,255,74,.18); border-radius: 50%; pointer-events: none; }
.compare-promo__grid { position: relative; z-index: 1; }
.compare-sample { box-shadow: 0 18px 46px rgba(0,0,0,.16); }

.archive-toolbar__links { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.archive-toolbar__links .text-link { white-space: nowrap; }

.page-hero .shell--article, .article-hero .shell--article { max-width: 860px; }
.article-body .entry-content, .page-body .entry-content { line-height: 1.72; }

.compare-builder__intro { max-width: 460px; }
.compare-builder__intro h2 { max-width: 12ch; }
.compare-select-grid label span { color: #46525c; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .05em; text-transform: uppercase; }

.shortlist-dock { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

@media (max-width: 1120px) {
    .site-header__bar { grid-template-columns: auto 1fr auto; }
    .nav-toggle { display: inline-flex; align-items: center; gap: 10px; justify-self: end; padding: 8px 10px; border-radius: 8px; font-weight: 800; }
    .nav-toggle:hover { background: var(--paper-2); }
    .nav-toggle__icon { width: 20px; display: grid; gap: 5px; }
    .nav-toggle__icon span { display: block; height: 2px; background: currentColor; transition: transform .16s ease; }
    .nav-toggle[aria-expanded="true"] .nav-toggle__icon span:first-child { transform: translateY(3.5px) rotate(45deg); }
    .nav-toggle[aria-expanded="true"] .nav-toggle__icon span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
    .site-nav { display: none; position: fixed; inset: var(--header-height) 0 0; background: var(--paper); padding: 28px 24px 80px; overflow: auto; border-top: 1px solid var(--line); }
    .admin-bar .site-nav { inset-block-start: calc(var(--header-height) + 32px); }
    .site-nav.is-open { display: block; }
    .site-nav > ul, .site-nav .menu { display: grid; align-items: stretch; gap: 0; max-width: 760px; margin-inline: auto; }
    .site-nav li { border-bottom: 1px solid var(--line); }
    .site-nav a { width: 100%; padding: 18px 4px; border-radius: 0; font-size: 1.2rem; }
    .site-nav .sub-menu { display: block; position: static; border: 0; box-shadow: none; padding: 0 0 8px 18px; background: transparent; }
    .site-nav .sub-menu li { border-bottom: 0; }
    .site-nav .sub-menu a { font-size: .95rem; padding: 9px 4px; }
    .header-actions { justify-self: end; }
    .hero__grid, .compare-promo__grid { grid-template-columns: 1fr; }
    .hero__content h1 { max-width: 15ch; }
    .research-board { max-width: 760px; transform: none; }
    .compare-promo__grid { gap: 50px; }
    .tool-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .collection-hero__grid { grid-template-columns: 1fr 340px; }
}

@media (max-width: 820px) {
    :root { --header-height: 68px; }
    .admin-bar .site-header { top: 46px; }
    .admin-bar .site-nav { inset-block-start: calc(var(--header-height) + 46px); }
    .shell--wide { width: min(calc(100% - 36px), var(--shell-wide)); }
    .brand__name { display: none; }
    .site-header__bar { min-height: var(--header-height); grid-template-columns: auto 1fr auto; gap: 10px; }
    .header-actions .button { display: none; }
    .site-search-panel__inner { grid-template-columns: 1fr auto; }
    .section-heading, .split-heading, .workflow-section__head, .record-footer { display: grid; align-items: start; gap: 22px; }
    .tool-grid, .editorial-grid { grid-template-columns: 1fr; }
    .task-index--home { grid-template-columns: 1fr; }
    .task-index--home .task-row, .task-index--home .task-row:nth-child(odd), .task-index--home .task-row:nth-last-child(-n+2) { border-right: 0; border-bottom: 1px solid var(--line); }
    .task-index--home .task-row:last-child { border-bottom: 0; }
    .tool-card__excerpt { min-height: 0; }
    .trust-grid, .footer-grid, .archive-hero__grid, .tool-detail__layout, .collection-layout, .compare-builder, .comparison-next, .not-found__grid { grid-template-columns: 1fr; }
    .trust-grid { gap: 44px; }
    .trust-intro, .tool-facts, .collection-aside { position: static; }
    .footer-menu { columns: 1; }
    .footer-bottom { align-items: flex-start; padding-block: 20px; }
    .archive-stat { justify-self: start; width: 100%; min-height: 130px; }
    .archive-stat strong { font-size: 4rem; }
    .tool-detail__hero-grid { grid-template-columns: 1fr 160px; gap: 28px; }
    .tool-identity > span { font-size: 4.7rem; }
    .collection-hero__grid { grid-template-columns: 1fr; }
    .workflow-mark { min-height: 120px; }
    .term-grid { grid-template-columns: 1fr; }
    .task-row--large { grid-template-columns: 44px 1fr 20px; }
    .task-row--large em { display: none; }
    .compare-select-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .shell, .shell--article { width: min(calc(100% - 32px), var(--shell)); }
    .shell--wide { width: min(calc(100% - 32px), var(--shell-wide)); }
    .hero--home { padding-top: 50px; }
    .hero__signals { grid-template-columns: 1fr; gap: 10px; }
    .hero__signals li, .hero__signals li:first-child, .hero__signals li:last-child { padding: 0 0 10px; border-right: 0; border-bottom: 1px solid var(--line); }
    .hero__signals li:last-child { padding-bottom: 0; border-bottom: 0; }
    h1 { font-size: clamp(2.55rem, 13vw, 4.1rem); }
    .hero__actions, .section-actions, .tool-detail__actions { display: grid; grid-template-columns: 1fr; }
    .hero__actions .button, .section-actions .button, .tool-detail__actions .button { width: 100%; }
    .hero-search, .search-field-row { grid-template-columns: 1fr; }
    .hero-search button { min-height: 44px; }
    .research-board { padding: 16px; }
    .research-steps { grid-template-columns: 1fr; }
    .research-steps li { min-height: 82px; border-right: 0; border-bottom: 1px solid var(--line-dark); display: grid; grid-template-columns: 40px 1fr; align-items: center; gap: 4px 8px; }
    .research-steps li:last-child { border-bottom: 0; }
    .research-steps span { margin: 0; grid-row: 1 / 3; }
    .research-board__matrix { display: none; }
    .compare-sample__row { grid-template-columns: 38px 1fr; }
    .compare-sample__row small { grid-column: 2; }
    .task-row { grid-template-columns: 40px minmax(0,1fr) 20px; }
    .task-row small { display: none; }
    .fact-grid { grid-template-columns: 1fr; }
    .tool-card .fact-grid > div, .tool-card .fact-grid > div:nth-child(odd) { border-left: 1px solid var(--line); border-top: 0; }
    .tool-card .fact-grid > div:first-child { border-top: 1px solid var(--line); }
    .tool-card__actions { align-items: stretch; flex-direction: column; }
    .tool-card__reviewed { align-items: flex-start; }
    .tool-card__actions .text-link { align-self: flex-start; }
    .guide-row { grid-template-columns: 38px 1fr; }
    .guide-row__arrow { display: none; }
    .trust-principles li { grid-template-columns: 38px 1fr; }
    .site-search-panel__inner { grid-template-columns: 1fr; }
    .archive-toolbar { align-items: flex-start; flex-direction: column; }
    .archive-toolbar__links { display: grid; gap: 10px; }
    .tool-detail__hero-grid { grid-template-columns: 1fr; }
    .tool-identity { aspect-ratio: auto; min-height: 140px; }
    .tool-identity > span { font-size: 4rem; }
    .tool-detail__layout, .collection-layout { gap: 38px; }
    .tool-facts dl > div { grid-template-columns: 1fr; gap: 4px; }
    .article-end, .footer-bottom { flex-direction: column; }
    .entry-content .alignwide, .entry-content .alignfull { margin-left: 0; transform: none; width: auto; max-width: 100%; }
    .term-card { grid-template-columns: 34px 1fr 20px; padding: 18px; }
    .shortlist-dock { right: 10px; bottom: 10px; width: calc(100vw - 20px); }
    .not-found__code span { font-size: 4rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

@media (forced-colors: active) {
    .button, .tool-card, .entry-card, .term-card, .research-board, .comparison-table-wrap { border: 1px solid CanvasText; }
    .badge { border: 1px solid CanvasText; }
}

@media print {
    .site-header, .site-footer, .shortlist-dock, .tool-detail__actions, .compare-form { display: none !important; }
    body { background: #fff; color: #000; }
    .section, .archive-hero, .tool-detail__hero { padding-block: 24px; background: #fff !important; color: #000 !important; }
    a { color: #000; text-decoration: underline; }
}

/* Featured media and comments */
.article-featured { margin-top: clamp(28px, 5vw, 56px); margin-bottom: 0; }
.article-featured img { display: block; width: 100%; max-height: 720px; object-fit: cover; border-radius: 18px; }
.comments-wrap { padding-bottom: 64px; }
.comments-area { border-top: 1px solid var(--line); padding-top: 34px; }
.comments-title { font-size: var(--step-2); }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { padding-block: 20px; border-bottom: 1px solid var(--line); }
.comment-meta { font-size: .82rem; color: var(--muted); }
.comment-content { margin-left: 58px; }
.comment-reply-link { font-weight: 800; font-size: .8rem; }
.comment-form label { display: block; margin-bottom: 6px; font-weight: 750; font-size: .84rem; }
.comment-form input:not([type="checkbox"]):not([type="submit"]), .comment-form textarea { width: 100%; border: 1px solid #aeb4b8; border-radius: 9px; padding: 10px 12px; background: var(--white); }
.comment-form .submit { min-height: 44px; padding: 9px 15px; border: 0; border-radius: 9px; background: var(--ink); color: var(--white); font-weight: 800; }
