:root {
  --paper: #fdfcf9;
  --panel: #ffffff;
  --ink: #17140f;
  --muted: #5b554b;
  --line: #ebe5da;
  --rule: #d9d1c3;
  --accent: #c2410c;
  --accent-ink: #9a3412;
  --tint: #fbf3ea;
  --t-ai: #0f766e;
  --t-devices: #1d4ed8;
  --t-security: #b91c1c;
  --t-software: #b45309;
  --t-policy: #3f6212;
  --t-gear: #9d174d;
  --t-advice: #c2410c;
  --head: "Libre Franklin", "Segoe UI", Arial, sans-serif;
  --body: "Public Sans", "Segoe UI", Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #131210; --panel: #1c1a17; --ink: #eee9e0; --muted: #b3ab9d; --line: #353028; --rule: #eee9e0;
  --accent: #fb8a4c; --accent-ink: #fdba8c; --tint: #221f1a;
  --t-ai: #2dd4bf; --t-devices: #7aa2ff; --t-security: #f87171; --t-software: #fbbf24; --t-policy: #a3e635; --t-gear: #f472b6; --t-advice: #fb8a4c;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.65 var(--body); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--head); line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .5em; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--panel); padding: 8px 12px; z-index: 10; }

.t-ai { --tc: var(--t-ai); } .t-devices { --tc: var(--t-devices); } .t-security { --tc: var(--t-security); }
.t-software { --tc: var(--t-software); } .t-policy { --tc: var(--t-policy); } .t-gear { --tc: var(--t-gear); }
.t-advice { --tc: var(--t-advice); }

/* Masthead */
.mast { border-bottom: 1px solid var(--line); background: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.02); }
:root[data-theme="dark"] .mast { background: var(--panel); }
.mast-top { display: flex; align-items: center; gap: 16px; padding: 10px 0; font-size: .82rem; color: var(--muted); border-bottom: 1px solid var(--line); }
.mast-tag { flex: 1; text-align: center; }
.theme { background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 999px; width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; }
.mast-name { text-align: center; padding: 18px 0 10px; }
.wordmark { font: 800 clamp(2.4rem, 7vw, 4.6rem)/1 var(--head); letter-spacing: -0.035em; text-decoration: none; color: var(--ink); }
.wordmark.small { font-size: 1.7rem; }
.topics { display: flex; gap: 4px 22px; justify-content: center; flex-wrap: wrap; padding: 10px 0 12px; border-top: 1px solid var(--line); font: 600 .95rem var(--head); }
.topics a { text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.topics a:hover, .topics a[aria-current] { border-bottom-color: var(--accent); color: var(--ink); }

/* Kickers and cards */
.kicker { font: 700 .78rem var(--head); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 .4em; color: var(--muted); }
.kicker a { color: var(--tc, var(--accent)); text-decoration: none; margin-right: 8px; }
.kicker time { font-weight: 600; }
.dek { color: var(--muted); margin: 0; }
.card h3 { font-size: 1.22rem; margin: 0 0 .35em; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card-img { display: block; margin-bottom: 12px; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 3px rgba(60,40,20,.08); }
.card-img img { aspect-ratio: 16 / 9; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-img img { transform: scale(1.03); }
@media (prefers-reduced-motion: reduce) { .card-img img { transition: none; } }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.rule-h { font-size: .9rem; text-transform: uppercase; letter-spacing: .1em; border-top: 3px solid var(--accent); padding-top: 8px; }

/* Front page */
.front { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); gap: 36px; padding: 28px 0; }
.lead { display: grid; gap: 16px; }
.lead-img { display: block; border-radius: 12px; overflow: hidden; }
.lead h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); letter-spacing: -0.025em; }
.lead h2 a { text-decoration: none; }
.lead .dek { font-size: 1.15rem; }
.latest ol { list-style: none; margin: 0; padding: 0; }
.latest li { display: grid; grid-template-columns: 52px 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.latest time { font: 700 .78rem var(--head); color: var(--accent); text-transform: uppercase; padding-top: 3px; }
.latest a { font: 600 1rem/1.35 var(--head); text-decoration: none; }
.latest a:hover { text-decoration: underline; }
.more-link { display: inline-block; margin-top: 12px; font: 700 .9rem var(--head); color: var(--accent-ink); }
.brief { background: var(--tint); border-left: 6px solid var(--accent); border-radius: 0 10px 10px 0; padding: 20px 24px; margin-bottom: 36px; }
.brief h2 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: .08em; }
.brief ul { margin: 0; padding-left: 1.1em; columns: 2 320px; column-gap: 40px; }
.brief li { break-inside: avoid; margin-bottom: 8px; }
.brief a { text-decoration: none; }
.brief a:hover { text-decoration: underline; }
.desk { padding: 28px 0; border-top: 1px solid var(--line); }
.desk-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.desk-head h2 { font-size: 1.6rem; margin: 0; }
.desk-head h2 a { text-decoration: none; color: var(--tc); }
.desk-head p { margin: 0; color: var(--muted); }
.advice-band { background: var(--tint); color: var(--ink); padding: 48px 0; margin: 28px 0 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.advice-band h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.band-lede { color: var(--muted); max-width: 60ch; }
.adv-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.adv-list a { display: grid; gap: 6px; padding: 20px; height: 100%; text-decoration: none; border-top: 3px solid var(--accent); background: var(--panel); border-radius: 0 0 10px 10px; box-shadow: 0 1px 3px rgba(60,40,20,.06); }
.adv-list a:hover { box-shadow: 0 6px 18px rgba(60,40,20,.12); color: inherit; }
.adv-t { font: 700 1.1rem/1.25 var(--head); }
.adv-d { font-size: .95rem; color: var(--muted); }
.adv-list.solo a { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--accent); }

/* FAQ */
.faq { padding: 36px 0; }
.faq h2 { font-size: 1.5rem; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { font: 700 1.05rem var(--head); cursor: pointer; }
.faq details p { margin: .6em 0 0; }

/* Story */
.crumbs { font-size: .85rem; color: var(--muted); padding: 18px 0 0; }
.crumbs a { color: var(--muted); }
.story-head { max-width: 820px; padding: 22px 0 18px; }
.story-head h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); letter-spacing: -0.03em; }
.standfirst { font-size: 1.25rem; color: var(--muted); margin: 0 0 14px; }
.byline { font-size: .9rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; margin: 0; }
.story-art { margin: 0 0 28px; }
.story-art img { border-radius: 12px; width: 100%; max-height: 540px; object-fit: cover; }
.story-art figcaption { font-size: .8rem; color: var(--muted); margin-top: 8px; }
.story-art figcaption a { color: var(--muted); }
.story-grid { display: grid; grid-template-columns: 280px minmax(0, 720px); gap: 44px; }
.short { align-self: start; position: sticky; top: 16px; background: var(--tint); padding: 18px 20px; border-top: 4px solid var(--tc); border-radius: 0 0 10px 10px; }
.short h2 { font-size: .9rem; text-transform: uppercase; letter-spacing: .09em; }
.short ul, .short ol { margin: 0; padding-left: 1.1em; font-size: .97rem; }
.short li { margin-bottom: 8px; }
.prose { font-size: 1.1rem; }
.prose h2 { font-size: 1.55rem; margin-top: 1.6em; }
.prose h3 { font-size: 1.2rem; margin-top: 1.3em; }
.prose p, .prose ul { margin: 0 0 1.05em; }
.prose a { color: var(--accent-ink); }
.sources { margin-top: 32px; padding-top: 16px; border-top: 2px solid var(--line); font-size: .95rem; }
.sources h2 { font-size: 1.05rem; text-transform: uppercase; letter-spacing: .08em; margin-top: 0; }
.more { padding: 44px 0 20px; }
.also { margin: 44px 0 0; padding: 24px 0; border-top: 1px solid var(--line); }
.also h2 { font-size: 1.2rem; }

/* Listings and pages */
.list-head { padding: 18px 0 24px; border-bottom: 2px solid var(--line); margin-bottom: 8px; }
.list-head h1 { font-size: clamp(2rem, 4vw, 3rem); }
.list-head p { color: var(--muted); margin: 0; max-width: 60ch; }
.card.row { display: grid; grid-template-columns: 280px 1fr; column-gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.card.row .card-img { grid-row: span 3; margin: 0; }
.page { max-width: 780px; padding-bottom: 40px; }
.page h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-top: 18px; }
.page .byline { margin-bottom: 20px; }

/* Footer */
.foot { border-top: 1px solid var(--line); background: #fff; margin-top: 48px; padding: 36px 0 24px; font-size: .95rem; }
:root[data-theme="dark"] .foot { background: var(--panel); }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 36px; }
.foot h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .09em; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin-bottom: 6px; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.fine { font-size: .85rem; color: var(--muted); }

@media (max-width: 900px) {
  .front { grid-template-columns: minmax(0, 1fr); }
  .grid3, .adv-list { grid-template-columns: 1fr 1fr; }
  .story-grid { grid-template-columns: 1fr; gap: 24px; }
  .short { position: static; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .mast-tag { display: none; }
  .mast-top { justify-content: space-between; }
  .grid3, .adv-list { grid-template-columns: 1fr; }
  .card.row { grid-template-columns: 1fr; }
  .card.row .card-img { grid-row: auto; margin-bottom: 12px; }
  .topics { gap: 2px 14px; font-size: .88rem; }
  .brief { padding: 16px; }
}

.adv-list .adv-img { display: block; margin: -20px -20px 8px; aspect-ratio: 16 / 9; overflow: hidden; }
.adv-list .adv-img img { width: 100%; height: 100%; object-fit: cover; }
.adv-list a { overflow: hidden; }
