/* Digitalfirma – light theme. Space Grotesk (headings) + IBM Plex Sans (text), self-hosted, SIL OFL. */
@font-face { font-family: "Space Grotesk"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/space-grotesk-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: italic; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }

:root {
  --bg: #ffffff;
  --tint: #f3f7fa;
  --tint-2: #e9f3f5;
  --line: #dfe6ec;
  --text: #13202e;
  --soft: #4b5a69;
  --faint: #7a8896;
  --teal: #0b7285;
  --teal-deep: #075866;
  --teal-wash: #e3f4f6;
  --blue: #1f62c9;
  --blue-wash: #e8f0fc;
  --coral: #e2553c;
  --coral-ink: #b8402a;
  --coral-wash: #fdece8;
  --amber: #f2a516;
  --amber-ink: #8a5a00;
  --amber-wash: #fdf3dc;
  --radius: 14px;
  --radius-s: 8px;
  --head: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --body: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --max: 76rem;
  --read: 42rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1.0625rem/1.7 var(--body); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--coral-ink); }
h1, h2, h3 { font-family: var(--head); font-weight: 700; letter-spacing: -0.015em; line-height: 1.15; color: var(--text); }
.wrap-x { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }

.jump { position: absolute; left: -9999px; }
.jump:focus { left: 1rem; top: 1rem; z-index: 50; background: var(--teal); color: #fff; padding: .5rem 1rem; border-radius: var(--radius-s); }

/* Header */
.accent-rule { height: 4px; background: linear-gradient(90deg, var(--teal) 0 55%, var(--amber) 55% 78%, var(--coral) 78% 100%); }
.topbar { background: var(--bg); border-bottom: 1px solid var(--line); }
.topbar-row { display: flex; align-items: center; gap: 1.25rem; padding: 1rem 0 .75rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-word { font: 700 1.55rem/1 var(--head); letter-spacing: -0.03em; }
.brand-word b { color: var(--teal); font-weight: 700; }
.brand-word i { font-style: normal; color: var(--coral); font-size: .62em; margin-left: .08em; }
.brand-claim { margin: 0; padding-left: 1.25rem; border-left: 1px solid var(--line); color: var(--soft); font-size: .92rem; line-height: 1.35; max-width: 22rem; }
.util-links { margin-left: auto; display: flex; gap: 1.1rem; font-size: .92rem; }
.util-links a { color: var(--soft); text-decoration: none; font-weight: 600; }
.util-links a:hover { color: var(--teal); }
.chipnav-wrap { border-top: 1px solid var(--line); background: var(--bg); }
.chipnav { list-style: none; margin: 0; padding: .6rem 0; display: flex; gap: .45rem; overflow-x: auto; scrollbar-width: none; }
.chipnav::-webkit-scrollbar { display: none; }
.chipnav .chip { font-size: .9rem; padding: .32rem .8rem; white-space: nowrap; }
.chipnav a[aria-current="page"] { outline: 2px solid currentColor; outline-offset: 1px; }

/* Chips (category labels) */
.chip { display: inline-block; font: 600 .74rem/1.2 var(--body); letter-spacing: .02em; padding: .25rem .6rem; border-radius: 999px; text-decoration: none; }
.chip--teal { background: var(--teal-wash); color: var(--teal-deep); }
.chip--blue { background: var(--blue-wash); color: var(--blue); }
.chip--coral { background: var(--coral-wash); color: var(--coral-ink); }
.chip--amber { background: var(--amber-wash); color: var(--amber-ink); }
a.chip:hover { filter: brightness(.96); }

/* Home intro */
.intro-band { background: linear-gradient(180deg, var(--tint-2), var(--bg)); border-bottom: 1px solid var(--line); }
.intro-row { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2.5rem; align-items: end; padding: 2.6rem 0 2.2rem; }
.eyebrow { margin: 0 0 .5rem; font: 600 .8rem/1 var(--body); text-transform: uppercase; letter-spacing: .12em; color: var(--coral-ink); }
.intro-row h1 { margin: 0; font-size: clamp(2rem, 3.6vw, 3rem); }
.intro-text { margin: 0; color: var(--soft); font-size: 1.02rem; }

/* Lead + briefs */
.front-top { display: grid; grid-template-columns: 1.55fr 1fr; gap: 2rem; padding: 2.2rem 0 1rem; }
.lead { display: block; text-decoration: none; color: inherit; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg); transition: box-shadow .15s, transform .15s; }
.lead:hover { color: inherit; box-shadow: 0 12px 30px -18px rgba(11, 114, 133, .45); transform: translateY(-2px); }
.lead-photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.lead-text { padding: 1.4rem 1.6rem 1.6rem; }
.lead-text h2 { font-size: clamp(1.5rem, 2.4vw, 2.05rem); margin: .7rem 0 .6rem; }
.lead-text p { margin: 0 0 1rem; color: var(--soft); }
.lead-more { font-weight: 600; color: var(--teal); }
.rail-title { font-size: 1rem; text-transform: uppercase; letter-spacing: .1em; color: var(--soft); margin: .2rem 0 .8rem; padding-bottom: .6rem; border-bottom: 3px solid var(--amber); display: inline-block; }
.brief-list { list-style: none; margin: 0; padding: 0; }
.brief { display: flex; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.brief:hover strong { color: var(--teal); }
.brief-n { font: 700 1.6rem/1 var(--head); color: var(--coral); min-width: 2.2rem; }
.brief-body { display: grid; gap: .4rem; justify-items: start; }
.brief-body strong { font: 700 1.08rem/1.3 var(--head); }

/* Blocks */
.block { padding: 2.2rem 0 1rem; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.block-head h2 { margin: 0; font-size: 1.6rem; }
.block-head p { margin: 0; color: var(--soft); }

.topic-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.topic { position: relative; display: flex; flex-direction: column; padding: 1.15rem 1.2rem 1rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--tint); text-decoration: none; color: inherit; transition: border-color .15s, background .15s; }
.topic:hover { color: inherit; background: var(--bg); border-color: currentColor; }
.topic h3 { margin: .6rem 0 .35rem; font-size: 1.12rem; }
.topic p { margin: 0 0 .8rem; font-size: .9rem; line-height: 1.5; color: var(--soft); }
.topic-count { margin-top: auto; font-size: .8rem; font-weight: 600; color: var(--faint); }
.topic-dot { width: 26px; height: 6px; border-radius: 3px; }
.topic--teal .topic-dot { background: var(--teal); } .topic--teal:hover { border-color: var(--teal); }
.topic--blue .topic-dot { background: var(--blue); } .topic--blue:hover { border-color: var(--blue); }
.topic--coral .topic-dot { background: var(--coral); } .topic--coral:hover { border-color: var(--coral); }
.topic--amber .topic-dot { background: var(--amber); } .topic--amber:hover { border-color: var(--amber); }

.tile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.tile { display: flex; flex-direction: column; text-decoration: none; color: inherit; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); overflow: hidden; transition: box-shadow .15s, transform .15s; }
.tile:hover { color: inherit; box-shadow: 0 12px 28px -18px rgba(19, 32, 46, .4); transform: translateY(-2px); }
.tile-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.tile-text { padding: 1rem 1.15rem 1.15rem; display: flex; flex-direction: column; align-items: flex-start; flex: 1; }
.tile-text h3 { margin: .6rem 0 .4rem; font-size: 1.18rem; }
.tile-text p { margin: 0; color: var(--soft); font-size: .93rem; line-height: 1.55; }
.tile-text .tile-meta { margin-top: auto; padding-top: .8rem; font-size: .8rem; color: var(--faint); }

/* Section (category) head */
.section-head { background: var(--tint); border-bottom: 1px solid var(--line); padding: 1.6rem 0 1.8rem; border-top: 0; }
.section-head h1 { margin: .6rem 0 .5rem; font-size: clamp(2rem, 4vw, 2.8rem); }
.section-head--teal h1 { box-shadow: inset 0 -.28em 0 var(--teal-wash); display: inline; }
.section-head--blue h1 { box-shadow: inset 0 -.28em 0 var(--blue-wash); display: inline; }
.section-head--coral h1 { box-shadow: inset 0 -.28em 0 var(--coral-wash); display: inline; }
.section-head--amber h1 { box-shadow: inset 0 -.28em 0 var(--amber-wash); display: inline; }
.section-intro { max-width: 46rem; color: var(--soft); margin: 1rem 0 .4rem; }
.section-count { margin: 0; font-size: .85rem; font-weight: 600; color: var(--faint); }
.filter-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.filter-chips button { font: 600 .85rem var(--body); border: 1px solid var(--line); background: var(--bg); color: var(--soft); padding: .35rem .85rem; border-radius: 999px; cursor: pointer; }
.filter-chips button.is-active { background: var(--teal); border-color: var(--teal); color: #fff; }
.empty-note { color: var(--soft); }

/* Trail */
.trail ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; font-size: .83rem; color: var(--faint); }
.trail li + li::before { content: "/"; margin-right: .35rem; color: var(--line); }
.trail a { color: var(--soft); text-decoration: none; }
.trail a:hover { color: var(--teal); }

/* Article */
.story-top { padding: 1.6rem 0 1.2rem; max-width: 52rem; margin-left: max(1.25rem, calc((100% - var(--max)) / 2)); }
.story-cat { margin: 1.1rem 0 0; display: flex; gap: .5rem; align-items: center; }
.story-tag { font-size: .82rem; font-weight: 600; color: var(--soft); text-decoration: none; }
.story-top h1 { font-size: clamp(2rem, 4.2vw, 3.05rem); margin: .7rem 0 .8rem; }
.standfirst { font-size: 1.2rem; line-height: 1.55; color: var(--soft); margin: 0 0 1rem; }
.byline { display: flex; flex-wrap: wrap; gap: .35rem 1rem; margin: 0; font-size: .86rem; color: var(--faint); }
.byline span:first-child { color: var(--text); font-weight: 600; }
.story-photo { margin: 0; }
.story-photo { max-width: 60rem; }
.story-photo img { width: 100%; border-radius: var(--radius); aspect-ratio: 16 / 9; object-fit: cover; max-height: 30rem; }
.photo-note { font-size: .78rem; color: var(--faint); margin-top: .45rem; }
.photo-note a { color: var(--faint); }
.story-grid { display: grid; grid-template-columns: 15rem minmax(0, var(--read)); gap: 3.5rem; padding: 2rem 0 3rem; }
.toc { position: sticky; top: 1.2rem; align-self: start; font-size: .9rem; border-left: 3px solid var(--teal-wash); padding-left: 1rem; }
.toc-title { margin: 0 0 .5rem; font: 700 .8rem var(--body); text-transform: uppercase; letter-spacing: .1em; color: var(--coral-ink); }
.toc ol { margin: 0; padding-left: 1.1rem; color: var(--faint); }
.toc li { margin: .35rem 0; line-height: 1.35; }
.toc a { color: var(--soft); text-decoration: none; }
.toc a:hover { color: var(--teal); }
.copy > :first-child { margin-top: 0; }
.copy h2 { font-size: 1.6rem; margin: 2.4rem 0 .7rem; scroll-margin-top: 1rem; }
.copy h3 { font-size: 1.22rem; margin: 1.8rem 0 .5rem; }
.copy p, .copy ul, .copy ol { margin: 0 0 1.1rem; }
.copy li { margin: .3rem 0; }
.copy ul li::marker { color: var(--teal); }
.copy strong { font-weight: 600; }
.copy blockquote { margin: 1.5rem 0; padding: .9rem 1.2rem; background: var(--amber-wash); border-radius: var(--radius-s); }
.copy blockquote p { margin: 0; }
.copy hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.copy table { width: 100%; border-collapse: collapse; margin: 1.2rem 0 1.6rem; font-size: .92rem; display: block; overflow-x: auto; }
.copy th { text-align: left; font-weight: 600; background: var(--teal-wash); color: var(--teal-deep); }
.copy th, .copy td { padding: .6rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.quick-answer { margin: 0 0 2rem; padding: 1.15rem 1.3rem; border: 1px solid #bfe3e8; background: var(--teal-wash); border-radius: var(--radius); position: relative; }
.quick-answer-label { margin: 0 0 .35rem; font: 700 .78rem var(--body); text-transform: uppercase; letter-spacing: .12em; color: var(--teal-deep); }
.quick-answer-label::before { content: ""; display: inline-block; width: .55rem; height: .55rem; border-radius: 2px; background: var(--coral); margin-right: .45rem; vertical-align: .05em; }
.quick-answer p:last-child { margin: 0; }
.faq-list { display: grid; gap: .6rem; margin: 1rem 0 2rem; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--bg); }
.faq-item summary { cursor: pointer; padding: .85rem 1rem; font: 700 1.04rem/1.35 var(--head); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--coral); font-size: 1.3rem; line-height: 1; }
.faq-item[open] summary::after { content: "–"; }
.faq-answer { padding: 0 1rem .4rem; }
.more-reading { margin-top: 2.6rem; padding: 1.3rem 1.4rem; background: var(--tint); border-radius: var(--radius); }
.more-reading h2 { margin: 0 0 .7rem; font-size: 1.15rem; }
.more-reading ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.more-reading a { text-decoration: none; font-weight: 600; color: var(--text); display: grid; }
.more-reading a span { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--coral-ink); }
.more-reading a:hover { color: var(--teal); }
.draft-note { margin: 1rem 0 0; padding: .7rem 1rem; background: var(--amber-wash); border-radius: var(--radius-s); font-size: .9rem; }
.ad-mark { display: inline-block; margin: 1rem 0 0; padding: .2rem .6rem; background: var(--amber); color: var(--text); font-weight: 700; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; border-radius: 4px; }
.ad-who { margin: .35rem 0 0; font-size: .85rem; color: var(--soft); }

/* Plain pages */
.page-top { padding: 1.8rem 0 .5rem; }
.page-top h1 { font-size: clamp(2rem, 4vw, 2.6rem); margin: .7rem 0 .5rem; }
.page-top .standfirst { max-width: var(--read); }
.page-body { padding: 0 0 3rem; max-width: var(--read); }

/* Footer */
.sitefoot { margin-top: 3rem; background: var(--tint); border-top: 1px solid var(--line); }
.sitefoot-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding: 2.4rem 0 1.6rem; }
.sitefoot h2 { font: 700 .8rem var(--body); text-transform: uppercase; letter-spacing: .12em; color: var(--soft); margin: .3rem 0 .8rem; }
.sitefoot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; font-size: .93rem; }
.sitefoot ul a { color: var(--text); text-decoration: none; }
.sitefoot ul a:hover { color: var(--teal); }
.sitefoot-about p { color: var(--soft); font-size: .93rem; max-width: 24rem; }
.brand--small .brand-word { font-size: 1.25rem; }
.brand--small .brand-mark { width: 28px; height: 28px; }
.sitefoot-base { border-top: 1px solid var(--line); padding: 1rem 0 1.4rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; font-size: .82rem; color: var(--soft); }
.sitefoot-base p { margin: 0; }
.owner-line { font-size: .72rem; color: var(--faint); }

/* Responsive */
@media (max-width: 1000px) {
  .topic-grid { grid-template-columns: repeat(2, 1fr); }
  .tile-grid { grid-template-columns: repeat(2, 1fr); }
  .front-top { grid-template-columns: 1fr; }
  .story-grid { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .toc { position: static; }
  .story-top { margin-left: auto; width: min(100% - 2.5rem, var(--max)); }
}
@media (max-width: 760px) {
  .brand-claim { display: none; }
  .intro-row { grid-template-columns: 1fr; gap: 1rem; padding: 1.8rem 0 1.6rem; }
  .sitefoot-cols { grid-template-columns: 1fr; }
  .brand-word { font-size: 1.3rem; }
}
@media (max-width: 560px) {
  .wrap-x { width: min(100% - 1.6rem, var(--max)); }
  .story-top { width: min(100% - 1.6rem, var(--max)); }
  .tile-grid, .topic-grid { grid-template-columns: 1fr; }
  .util-links { gap: .8rem; font-size: .85rem; }
  .lead-text { padding: 1.1rem 1.1rem 1.3rem; }
}
