/* claudefox news theme — tokens and home layout.
   Ink on white, one accent (the fox orange already used as the site accent), serif headlines, sans UI. */

/* @font-face rules live in default.hbs so the preload and the face share one {{asset}} URL. */

:root {
  --paper: #ffffff;
  --panel: #f5f6f7;
  --ink: #14161b;
  --muted: #646b76;
  --line: #e4e6ea;
  --accent: #c2410c;
  --accent-ink: #ffffff;
  --sans: var(--gh-font-body, "Inter"), system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: var(--gh-font-heading, "Source Serif 4"), Charter, "Iowan Old Style", Georgia, "Times New Roman", serif;
  --wrap: 1320px;
  --gap: 28px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #111317; --panel: #1a1d23; --ink: #eceef1; --muted: #9aa1ad; --line: #2a2e36;
    --accent: #f97316; --accent-ink: #14161b; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #111317; --panel: #1a1d23; --ink: #eceef1; --muted: #9aa1ad; --line: #2a2e36;
  --accent: #f97316; --accent-ink: #14161b; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  display: flex; flex-direction: column; min-height: 100vh;
  margin: 0; background: var(--paper); color: var(--ink);
  font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased;
}
img { display: block; width: 100%; height: 100%; object-fit: cover; background: var(--panel); }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--ink); color: var(--paper); padding: 8px 12px; }

time { display: block; margin-top: 6px; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }

/* ---------- header ---------- */
.head { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--line); }
.head-in { display: flex; align-items: center; gap: 28px; height: 60px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 20px; letter-spacing: -0.02em; flex: none; }
.head-nav { flex: 1; min-width: 0; }
.head-nav ul { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.head-nav ul::-webkit-scrollbar { display: none; }
.head-nav a { display: block; padding: 8px 12px; border-radius: 6px; font-weight: 600; font-size: 14px; white-space: nowrap; }
.head-nav a:hover { background: var(--panel); }
.head-tools { display: flex; align-items: center; gap: 4px; flex: none; }
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 6px;
  background: none; color: inherit; cursor: pointer;
}
.icon-btn:hover { background: var(--panel); }
.btn {
  margin-left: 8px; padding: 8px 14px; border-radius: 6px; background: var(--accent); color: var(--accent-ink);
  font-weight: 600; font-size: 14px;
}
.btn:hover { filter: brightness(1.08); }

.brief { border-top: 1px solid var(--line); background: var(--panel); }
.brief-in { display: flex; align-items: center; gap: 14px; height: 40px; font-size: 13.5px; }
.brief-label { flex: none; font-weight: 700; color: var(--accent); }
.brief-link { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.brief-link:hover { text-decoration: underline; }
.brief time { flex: none; margin: 0; }

/* ---------- shared pieces ---------- */
.sec-h {
  margin-bottom: 14px; padding-top: 12px; border-top: 2px solid var(--ink);
  font: 700 14px/1.3 var(--sans);
}
.sec-h a:hover { color: var(--accent); }
.kicker { display: block; margin-bottom: 4px; color: var(--accent); font-size: 12.5px; font-weight: 600; }
.kicker:hover { text-decoration: underline; }

.t-item { padding: 14px 0; border-top: 1px solid var(--line); }
.t-item:first-child { padding-top: 0; border-top: 0; }
.t-title, .th-title, .f-title, .d-item a {
  display: block; font-family: var(--serif); font-weight: 600; line-height: 1.3; letter-spacing: -0.005em;
  text-wrap: pretty;
}
.t-title { font-size: 16px; }
.t-title:hover, .th-title:hover, .f-title:hover, .d-item a:hover, .lead h2 a:hover { color: var(--accent); }

.feature .f-img { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 4px; }
.feature .f-title { margin-top: 12px; font-size: 20px; line-height: 1.25; }

/* ---------- top: latest | lead | rail ---------- */
.top {
  display: grid; grid-template-columns: 280px minmax(0, 1fr) 300px; gap: 0 var(--gap);
  padding: 28px 0 40px;
}
.top > * { min-width: 0; }
.col-latest { grid-column: 1; grid-row: 1; padding-right: var(--gap); border-right: 1px solid var(--line); }
.col-lead { grid-column: 2; grid-row: 1; }
.col-rail { grid-column: 3; grid-row: 1; padding-left: var(--gap); border-left: 1px solid var(--line); }
.col-rail > section + section { margin-top: 32px; }
.col-rail .feature { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.col-rail .feature .f-title { font-size: 17px; }

.lead h2 { font: 700 40px/1.12 var(--serif); letter-spacing: -0.02em; text-wrap: balance; }
.lead-ex { margin-top: 12px; color: var(--muted); font-size: 16px; line-height: 1.5; max-width: 62ch; }
.lead-img { display: block; margin-top: 18px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 4px; }

.th-list { margin-top: 8px; }
.th-item { display: grid; grid-template-columns: 176px minmax(0, 1fr); gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.th-item:last-child { border-bottom: 0; padding-bottom: 0; }
.th-img { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 4px; }
.th-title { font-size: 19px; line-height: 1.25; }

.d-item { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.d-item:first-child { padding-top: 0; border-top: 0; }
.d-item time { margin: 2px 0 0; font-weight: 600; color: var(--ink); }
.d-item a { font-size: 15px; }

/* ---------- band: tips | tools ---------- */
.band {
  display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 0 var(--gap);
  padding: 0 0 40px;
}
.band > * { min-width: 0; }
.band-side { padding-right: var(--gap); border-right: 1px solid var(--line); }
.sq-item { display: grid; grid-template-columns: minmax(0, 1fr) 64px; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.sq-item:first-child { padding-top: 0; border-top: 0; }
.sq-img { order: 2; width: 64px; height: 64px; overflow: hidden; border-radius: 4px; }
.band-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); }
.band-grid > * { min-width: 0; }
.feature-lg .f-title { font-size: 26px; line-height: 1.18; letter-spacing: -0.01em; }
.f-ex { margin-top: 8px; color: var(--muted); font-size: 15px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- category pairs ---------- */
.pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px var(--gap); padding-bottom: 56px; }
.pair-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); background: var(--panel); }
.foot-in { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr)); gap: 32px; padding-top: 40px; padding-bottom: 32px; }
.foot-brand p { margin-top: 12px; max-width: 38ch; color: var(--muted); font-size: 14px; }
.foot h2 { margin-bottom: 12px; font: 700 14px/1.3 var(--sans); }
.foot nav li + li { margin-top: 8px; }
.foot nav li a { color: var(--muted); font-size: 14px; }
.foot nav li a:hover { color: var(--ink); text-decoration: underline; }
.foot-note { padding-top: 16px; padding-bottom: 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .top { grid-template-columns: 250px minmax(0, 1fr); }
  .col-rail {
    grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap);
    margin-top: 36px; padding-left: 0; border-left: 0;
  }
  .col-rail > section + section { margin-top: 0; }
  .lead h2 { font-size: 34px; }
  .band { grid-template-columns: 250px minmax(0, 1fr); }
  .band-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .band-grid .feature-lg { grid-column: 1 / -1; }
  .pair-body { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 820px) {
  .wrap { padding: 0 16px; }
  .head { position: static; }
  .foot-note { padding-top: 16px; padding-bottom: 28px; margin-top: 8px; }
  .foot-in { padding-top: 32px; padding-bottom: 24px; }
  .head-in { flex-wrap: wrap; gap: 0 12px; height: auto; padding-top: 8px; }
  .logo { height: 40px; }
  .head-tools { margin-left: auto; }
  .head-nav { order: 3; flex: 0 0 100%; margin: 0 -16px; padding: 0 6px 4px; }
  /* Every section stays visible: the row wraps instead of scrolling items off-screen. */
  .head-nav ul { flex-wrap: wrap; gap: 0 2px; overflow: visible; }
  .head-nav a { padding: 8px 10px; }
  .btn { display: none; }
  .top, .band { display: block; padding-top: 20px; }
  .col-latest, .band-side { padding-right: 0; border-right: 0; }
  .col-latest, .col-rail, .band-main { margin-top: 36px; }
  .col-rail { display: block; }
  .col-rail > section + section { margin-top: 36px; }
  .lead h2 { font-size: 28px; line-height: 1.15; }
  .lead-ex { font-size: 15px; }
  .th-item { grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding: 14px 0; }
  .th-title { font-size: 16px; }
  .band-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .feature-lg .f-title { font-size: 22px; }
  .pairs { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-bottom: 40px; }
  .pair-body { gap: 16px; }
  .foot-in { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
}

/* fixes after the walkthrough */
body > main { flex: 1 0 auto; width: 100%; }
.foot { flex: none; }
.t-cols { grid-column: span 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--gap); align-content: start; }
.t-cols .t-item:nth-child(2) { padding-top: 0; border-top: 0; }
.rail-empty { color: var(--muted); font-size: 14px; }
/* Ghost's comments frame is a light document; matching schemes keeps it transparent on the dark page */
.post-comments iframe { color-scheme: light; }
@media (max-width: 820px) {
  .t-cols { grid-column: auto; grid-template-columns: minmax(0, 1fr); }
  .t-cols .t-item:nth-child(2) { padding-top: 14px; border-top: 1px solid var(--line); }
}

/* Side-by-side columns end on the same line: the shorter column's list (and section image)
   takes up the spare height, so no column stops short of its neighbour. Desktop and tablet only. */
@media (min-width: 821px) {
  .col-latest, .col-lead, .band-side, .band-main, .pair, .col-rail > section { display: flex; flex-direction: column; }
  .col-latest > .t-list, .col-lead > .th-list, .band-side > .sq-list, .band-main > .band-grid,
  .pair > .pair-body, .col-rail > section > ul:last-child { flex: 1 1 auto; }

  .col-latest > .t-list, .col-lead > .th-list, .band-side > .sq-list, .band-main .band-grid > .t-list,
  .pair-body > .t-list, .col-rail > section > ul:last-child { display: flex; flex-direction: column; }
  .col-latest > .t-list > li, .col-lead > .th-list > li, .band-side > .sq-list > li,
  .band-main .band-grid > .t-list > li, .pair-body > .t-list > li,
  .col-rail > section > ul:last-child > li { flex: 1 0 auto; }
  .t-list > .t-item { display: flex; flex-direction: column; justify-content: center; }
  .sq-item, .th-item, .d-item { align-content: center; }
  /* First and last rows sit flush with the column's top and bottom edge and take half a share of the
     spare height, so the space on both sides of every divider stays equal. */
  .col-latest > .t-list > li:first-child, .col-lead > .th-list > li:first-child, .band-side > .sq-list > li:first-child,
  .band-main .band-grid > .t-list > li:first-child, .pair-body > .t-list > li:first-child,
  .col-rail > section > ul:last-child > li:first-child { flex-grow: 0.5; justify-content: flex-start; align-content: start; }
  .col-latest > .t-list > li:last-child, .col-lead > .th-list > li:last-child, .band-side > .sq-list > li:last-child,
  .band-main .band-grid > .t-list > li:last-child, .pair-body > .t-list > li:last-child,
  .col-rail > section > ul:last-child > li:last-child { flex-grow: 0.5; justify-content: flex-end; align-content: end; padding-bottom: 0; }

  .band-main .band-grid > .feature, .pair-body > .feature { display: flex; flex-direction: column; }
  .band-main .band-grid > .feature, .pair-body > .feature { container-type: inline-size; }
  /* the image may grow from 16:9 up to a square, never taller */
  .band-main .band-grid > .feature > .f-img, .pair-body > .feature > .f-img { flex: 1 0 auto; max-height: 100cqw; }
}
@media (min-width: 1181px) {
  .col-rail { display: flex; flex-direction: column; }
  .col-rail > section { flex: 1 1 auto; }
}
/* Tablet: Tools is far taller than Tips here, so Tips becomes a two-column strip above it. */
@media (min-width: 821px) and (max-width: 1180px) {
  .band { display: block; }
  .band-side { margin-bottom: 36px; padding-right: 0; border-right: 0; }
  .band-side > .sq-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--gap); }
  .band-side > .sq-list > li, .band-side > .sq-list > li:first-child, .band-side > .sq-list > li:last-child { align-content: start; padding-bottom: 14px; }
  .band-side > .sq-list > li:nth-child(2) { padding-top: 0; border-top: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .f-img img, .lead-img img, .th-img img { transition: transform .3s ease; }
  .feature:hover .f-img img, .lead:hover .lead-img img, .th-item:hover .th-img img { transform: scale(1.02); }
}

/* ---------- theme additions ---------- */
.head-nav .nav-current a { color: var(--accent); }
.btn { display: inline-block; border: 0; cursor: pointer; font-family: inherit; }
.btn-quiet { margin-left: 0; background: var(--panel); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.th-noimg { grid-template-columns: minmax(0, 1fr); }
.th-ex { margin-top: 6px; color: var(--muted); font-size: 14.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.popular { padding-bottom: 40px; }

/* archive: index, tag, author */
.archive { max-width: 860px; padding: 36px 0 56px; }
.archive-head { padding-bottom: 20px; border-bottom: 2px solid var(--ink); }
.archive-head h1 { font: 700 34px/1.15 var(--serif); letter-spacing: -0.02em; }
.archive-head p { margin-top: 8px; max-width: 62ch; color: var(--muted); font-size: 16px; }
.archive-head .archive-count { font-size: 13px; }
.th-list-lg { margin-top: 0; }
.th-list-lg .th-item { grid-template-columns: 240px minmax(0, 1fr); gap: 20px; padding: 22px 0; }
.th-list-lg .th-noimg { grid-template-columns: minmax(0, 1fr); }
.th-list-lg .th-item:last-child { border-bottom: 1px solid var(--line); padding-bottom: 22px; }
.th-list-lg .th-title { font-size: 22px; }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 28px; font-size: 14px; }
.pagination a { padding: 8px 14px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; }
.pagination a:hover { background: var(--panel); }
.pagination .page-number { color: var(--muted); margin: 0 auto; }

.empty { padding: 72px 0 96px; max-width: 560px; }
.empty h1 { font: 700 32px/1.15 var(--serif); letter-spacing: -0.02em; }
.empty p { margin: 12px 0 20px; color: var(--muted); font-size: 16px; }
.empty .btn { margin-left: 0; }
.empty .error-code { margin: 0 0 8px; color: var(--accent); font-weight: 700; font-size: 14px; }
.empty-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* post and page */
.post-wrap { display: grid; grid-template-columns: minmax(0, 760px) 300px; justify-content: space-between; gap: 0 56px; padding-top: 36px; padding-bottom: 64px; }
.page-wrap { max-width: 808px; padding-top: 36px; padding-bottom: 64px; }
.post { min-width: 0; }
.post-head h1 { font: 700 42px/1.1 var(--serif); letter-spacing: -0.02em; text-wrap: balance; }
.post-ex { margin-top: 14px; color: var(--muted); font-size: 19px; line-height: 1.45; }
.post-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 18px; color: var(--muted); font-size: 13.5px; }
.post-meta time { margin: 0; font-size: inherit; }
.post-meta a { color: var(--ink); font-weight: 600; }
.post-meta a:hover { color: var(--accent); }
.post-image { margin: 24px 0 0; }
.post-image img { height: auto; aspect-ratio: 16 / 9; border-radius: 4px; }
.post-image figcaption, .gh-content figcaption { margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.post-image figcaption a, .gh-content figcaption a { text-decoration: underline; }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); }
.post-tags a { padding: 6px 12px; border-radius: 999px; background: var(--panel); font-size: 13px; font-weight: 600; }
.post-tags a:hover { color: var(--accent); }
.post-comments { margin-top: 40px; }
.post-rail { padding-left: 28px; border-left: 1px solid var(--line); align-self: start; position: sticky; top: 124px; }
.post-rail > section + section { margin-top: 32px; }

.gh-content { margin-top: 28px; font: 18px/1.7 var(--serif); overflow-wrap: break-word; }
.gh-content > * { margin: 0; }
.gh-content > * + * { margin-top: 1.25em; }
.gh-content h2 { margin-top: 1.9em; font: 700 27px/1.2 var(--serif); letter-spacing: -0.01em; }
.gh-content h3 { margin-top: 1.7em; font: 700 21px/1.25 var(--serif); }
.gh-content h4, .gh-content h5, .gh-content h6 { margin-top: 1.5em; font: 700 17px/1.3 var(--sans); }
.gh-content h2 + *, .gh-content h3 + *, .gh-content h4 + * { margin-top: 0.6em; }
.gh-content a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.gh-content a:hover { text-decoration-thickness: 2px; }
.gh-content ul, .gh-content ol { padding-left: 1.3em; }
.gh-content ul { list-style: disc; }
.gh-content ol { list-style: decimal; }
.gh-content li + li { margin-top: 0.4em; }
.gh-content li > ul, .gh-content li > ol { margin-top: 0.4em; }
.gh-content blockquote { margin-left: 0; margin-right: 0; padding-left: 20px; border-left: 3px solid var(--accent); font-style: italic; }
.gh-content hr { height: 1px; border: 0; background: var(--line); margin: 2em 0; }
.gh-content img { height: auto; border-radius: 4px; }
.gh-content figure { margin-left: 0; margin-right: 0; }
.gh-content code { padding: 2px 5px; border-radius: 4px; background: var(--panel); font: 0.85em/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.gh-content pre { padding: 16px 18px; border-radius: 6px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); overflow-x: auto; font-size: 14px; line-height: 1.6; }
.gh-content pre code { padding: 0; background: none; font-size: inherit; }
.gh-content table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font: 15px/1.5 var(--sans); }
.gh-content th, .gh-content td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.gh-content th { border-bottom: 2px solid var(--ink); font-weight: 700; white-space: nowrap; }
/* phones: long install commands, package names and URLs wrap inside cells instead of making the table scroll (2026-11-20) */
@media (max-width: 600px) { .gh-content td { overflow-wrap: anywhere; } .gh-content th { white-space: normal; } }
.gh-content iframe, .gh-content video { max-width: 100%; }
.gh-content .kg-card + *, .gh-content * + .kg-card { margin-top: 1.6em; }
/* the article column is the full measure, so wide and full cards stay inside it */
.kg-width-wide, .kg-width-full { width: 100%; }
.kg-width-wide img, .kg-width-full img { width: 100%; }

@media (max-width: 1180px) {
  .post-wrap { grid-template-columns: minmax(0, 1fr) 260px; gap: 0 32px; }
}
@media (max-width: 820px) {
  .archive { padding: 24px 0 40px; }
  .archive-head h1 { font-size: 28px; }
  .th-list-lg .th-item { grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding: 16px 0; }
  .th-list-lg .th-noimg { grid-template-columns: minmax(0, 1fr); }
  .th-list-lg .th-title { font-size: 17px; }
  .th-ex { display: none; }
  .post-wrap { display: block; padding-top: 24px; padding-bottom: 40px; }
  .page-wrap { padding-top: 24px; padding-bottom: 40px; }
  .post-head h1 { font-size: 30px; line-height: 1.15; }
  .post-ex { font-size: 17px; }
  .gh-content { font-size: 17px; }
  .gh-content h2 { font-size: 23px; }
  .post-rail { position: static; margin-top: 40px; padding-left: 0; border-left: 0; }
  .popular { padding-top: 36px; padding-bottom: 0; }
  .empty { padding: 48px 0 64px; }
  .empty h1 { font-size: 26px; }
}
