/* DidDecode — Ghost theme
   Fonts, accent and cover palette are set as CSS variables in default.hbs from the
   theme settings (Ghost Admin → Design). Everything else lives here. */

:root {
  --paper: #ffffff;
  --paper-2: #f4f5f7;
  --ink: #15202b;
  --ink-2: #5b6573;
  --line: #dfe3e8;
  --accent-2: color-mix(in srgb, var(--accent) 80%, black);

  --measure: 66ch;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1120px;
  --radius: 4px;
}
:root[data-theme="dark"] {
  --paper: #0f1521;
  --paper-2: #161e2c;
  --ink: #e9edf3;
  --ink-2: #9aa5b5;
  --line: #273347;
  --accent-2: color-mix(in srgb, var(--accent) 75%, white);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.5;
  font-optical-sizing: auto;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; line-height: 1.1; }
.muted { color: var(--ink-2); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; background: var(--paper-2); padding: 1px 5px; border-radius: 3px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: var(--measure); margin-left: auto; margin-right: auto; }

/* --- Header -------------------------------------------------- */
.site-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--line);
}
.masthead { font-weight: 800; font-size: 28px; letter-spacing: -0.03em; line-height: 1; display: inline-flex; align-items: center; gap: 10px; }
.masthead .mark { flex: none; width: 27px; height: 30px; }
.masthead .dot { color: var(--accent); }
.nav { display: flex; gap: 22px; align-items: center; font-size: 15px; }
.nav ul { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav .nav-current a { color: var(--accent); }
.btn {
  display: inline-block; padding: 10px 16px; border-radius: 999px;
  background: var(--ink); color: var(--paper); font-weight: 600; font-size: 15px;
  border: 0; cursor: pointer; font-family: inherit; line-height: 1.2;
}
.btn:hover { background: var(--accent); color: #fff; }
/* primary buttons: the cover's yellow with navy text (the accent stays navy for links and labels) */
.btn.accent { background: var(--cover-badge); color: var(--cover-base); box-shadow: inset 0 -2px 0 rgba(0,0,0,.08); }
.btn.accent:hover { background: color-mix(in srgb, var(--cover-badge) 86%, black); color: var(--cover-base); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 640px) { .nav ul { display: none; } }

/* --- Composed magazine cover ---------------------------------
   Business-magazine structure: boxed labels, a masthead bar, a sticker, a dark band and a solid
   footer strip. Everything scales with container width (cqw). */
.mag {
  --photo: none;
  --plum: var(--cover-base);
  --magenta: var(--cover-tint);
  --pink: var(--cover-highlight);
  --cyan: var(--cover-secondary);
  --coral: var(--cover-badge);
  position: relative; display: block; container-type: inline-size;
  aspect-ratio: 3 / 4; overflow: hidden; border-radius: var(--radius);
  background: var(--plum); color: #fff; isolation: isolate;
  font-family: var(--display);
}
/* a topic colour tints the photo; labels keep the cover's gold */
.mag.has-topic-color {
  --magenta: var(--topic);
  --plum: oklch(from var(--topic) 0.2 0.06 h);
}
.mag:hover, .mag-link:hover { color: #fff; }
.mag-link { display: block; }
.mag .photo {
  position: absolute; inset: 0; z-index: 0;
  background: var(--photo) center / cover no-repeat;
  filter: contrast(1.05) saturate(0.9);
}
.mag .photo::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(170deg, var(--magenta) 0%, var(--plum) 100%);
  opacity: .6; mix-blend-mode: multiply;
}
.mag .photo::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(0deg, var(--plum) 0%, color-mix(in srgb, var(--plum) 70%, transparent) 30%, transparent 58%),
    linear-gradient(180deg, color-mix(in srgb, var(--plum) 55%, transparent) 0%, transparent 32%);
}
.mag > * { position: relative; z-index: 1; }

/* specimen cover (no issue published yet): texture instead of a photo, and a SPECIMEN stamp */
.mag-specimen .photo { background:
    radial-gradient(120% 80% at 80% 30%, color-mix(in srgb, var(--magenta) 70%, transparent), transparent 70%),
    repeating-linear-gradient(115deg, rgba(255,255,255,.06) 0 1px, transparent 1px 9px),
    repeating-linear-gradient(25deg, rgba(255,255,255,.035) 0 1px, transparent 1px 22px); }
.mag .specimen-stamp { position: absolute; z-index: 1; left: 50%; top: 61%; transform: translate(-50%, -50%) rotate(-10deg);
    font-size: 8cqw; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: transparent;
    -webkit-text-stroke: .35cqw color-mix(in srgb, var(--coral) 75%, transparent); border: .6cqw solid color-mix(in srgb, var(--coral) 60%, transparent);
    padding: 1.5cqw 4cqw; border-radius: 2cqw; pointer-events: none; white-space: nowrap; opacity: .85; }
.soon-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; }
.soon-list li { display: grid; gap: 3px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.soon-list b { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.soon-list span { font-family: var(--prose); font-size: 15px; color: var(--ink-2); line-height: 1.45; }


/* masthead: bar + name, tagline band, month */
.mag .brand { position: absolute; top: 5cqw; left: 6cqw; right: 6cqw; border-left: 1.4cqw solid var(--coral); padding-left: 3cqw; }
.mag .brand-name { font-weight: 800; font-size: 12cqw; letter-spacing: -0.04em; line-height: 0.95; white-space: nowrap; font-variation-settings: "wdth" 90; display: flex; align-items: center; gap: 2cqw; }
.mag .brand-name .mark { width: 9cqw; height: 10cqw; flex: none; }
.mag .brand-name .mark-accent { fill: var(--coral); }
.mag .brand .dot { color: var(--coral); }
.mag .brand-band { display: inline-block; margin-top: 2cqw; padding: 0.8cqw 2cqw; background: var(--coral); color: var(--plum); font-size: 2.3cqw; white-space: nowrap; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.mag .brand-meta { margin-top: 1.6cqw; font-size: 2.6cqw; font-weight: 600; letter-spacing: 0.04em; opacity: .9; }

/* boxed labels */
.mag .label { display: inline-block; padding: 0.9cqw 2.2cqw; background: var(--coral); color: var(--plum); font-size: 2.6cqw; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }

/* "In this issue": three other articles, top-left */
.mag .flash { position: absolute; top: 37cqw; left: 6cqw; width: 46cqw; }
.mag .flash ul { margin: 2cqw 0 0; padding: 0; list-style: none; }
.mag .flash li { position: relative; padding-left: 3.2cqw; margin-bottom: 1.6cqw; font-size: 3cqw; font-weight: 700; line-height: 1.2; letter-spacing: 0; text-shadow: 0 0.3cqw 1cqw color-mix(in srgb, var(--plum) 70%, transparent); }
.mag .flash li::before { content: ""; position: absolute; left: 0; top: 1cqw; width: 1.4cqw; height: 1.4cqw; background: var(--coral); }

/* topic sticker, right */
.mag .badge {
  position: absolute; top: 40cqw; right: 6cqw; width: 26cqw; height: 26cqw; border-radius: 50%; padding: 2cqw;
  background: var(--coral); color: var(--plum); display: grid; place-content: center; text-align: center;
  font-weight: 800; line-height: 1.05; letter-spacing: 0; transform: rotate(8deg);
}
.mag .badge b { display: block; font-size: 3cqw; line-height: 1.1; letter-spacing: 0; text-transform: uppercase; overflow-wrap: normal; word-break: normal; }

/* bottom stack: cover feature label, title, byline, "also inside" band */
.mag .bottom { position: absolute; left: 6cqw; right: 6cqw; bottom: 10cqw; display: flex; flex-direction: column; align-items: flex-start; gap: 2cqw; }
.mag .title {
  font-weight: 800; font-size: 9.5cqw; line-height: 0.95; letter-spacing: -0.03em;
  text-transform: uppercase; font-variation-settings: "wdth" 78;
  text-shadow: 0 0.4cqw 1.2cqw color-mix(in srgb, var(--plum) 70%, transparent);
  max-width: 24ch; font-size: 9cqw;
}
.mag .title em { font-style: normal; color: var(--pink); }
.mag .byline { font-size: 2.8cqw; font-weight: 600; letter-spacing: 0.02em; opacity: .95; }
.mag .foot {
  align-self: stretch; margin-top: 1cqw; padding: 1.8cqw 2.4cqw;
  background: color-mix(in srgb, var(--plum) 78%, black); border-left: 1.2cqw solid var(--coral);
  display: flex; flex-wrap: wrap; gap: 1cqw 2.4cqw; font-size: 2.5cqw; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; line-height: 1.2;
}
.mag .foot b { color: var(--coral); }
.mag .foot span + span::before { content: "•"; margin-right: 2.4cqw; opacity: .6; }
.mag .foot:not(:has(span)) { display: none; }

/* solid footer strip with the sections */
.mag .bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.6cqw 4cqw; background: var(--coral); color: var(--plum); display: flex; justify-content: space-between; gap: 1.2cqw; font-size: 2.2cqw; font-weight: 800; letter-spacing: 0.04em; white-space: nowrap; overflow: hidden; }
.mag .bar span + span::before { content: "|"; margin-right: 1.2cqw; opacity: .5; }

@container (max-width: 300px) {
  .mag .flash, .mag .foot, .mag .bar, .mag .byline, .mag .brand-band { display: none; }
  .mag .bottom { bottom: 7cqw; gap: 1.5cqw; }
  .mag .title { font-size: 11cqw; }
  .mag .badge { top: 40cqw; }
  .mag .brand-name { font-size: 13cqw; }
}

/* --- Cover (home hero) ---------------------------------------- */
.cover { padding: 32px 0 40px; }
.cover-grid { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
  .cover-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 48px; align-items: start; }
}
.cover-meta { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; font-size: 15px; color: var(--ink-2); }

.lead { display: block; color: inherit; }
.lead:hover { color: inherit; }
.lead-text { padding: 20px 0 0; }
.lead .kicker { font-size: 15px; color: var(--accent); font-weight: 600; margin-bottom: 8px; }
.lead h2 { font-size: clamp(26px, 3vw, 34px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.08; max-width: 24ch; }
.lead:hover h2 { color: var(--accent); }
.lead p.dek { font-family: var(--prose); font-size: 19px; line-height: 1.45; margin: 12px 0 10px; max-width: 48ch; color: var(--ink-2); }
.lead-empty { background: var(--paper-2); border-radius: 8px; padding: 32px; color: var(--ink-2); }
.byline { font-size: 14px; color: var(--ink-2); }
.byline b { color: var(--ink); font-weight: 600; }

.coverlines { padding-top: 0; }
.coverlines .lead-text-aside { display: block; padding: 0 0 20px; margin-bottom: 14px; border-bottom: 3px solid var(--ink); color: inherit; }
.coverlines .lead-text-aside:hover { color: inherit; }
.coverlines .lead-text-aside:hover h2 { color: var(--accent); }
.coverlines .lead-text-aside h2 { font-size: clamp(24px, 2.6vw, 30px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.08; }
.coverlines .lead-text-aside .dek { font-size: 17px; margin: 10px 0 8px; }
.coverlines-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.coverline {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: start;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.coverline .topic { font-size: 13px; color: var(--accent); font-weight: 600; margin-bottom: 4px; }
.coverline .topic:empty { display: none; }
.coverline h3 { font-size: 19px; font-weight: 600; line-height: 1.2; letter-spacing: -0.015em; }
.coverline .mins { font-size: 13px; color: var(--ink-2); padding-top: 22px; white-space: nowrap; }
.coverline.big { grid-template-columns: 1fr 84px; }
.coverline.big img { width: 84px; height: 84px; object-fit: cover; border-radius: var(--radius); margin-top: 4px; }
.coverline.big h3 { font-size: 22px; }
.coverline.big .mins { grid-column: 1; padding-top: 6px; }
.all { display: inline-block; margin-top: 14px; font-size: 15px; font-weight: 600; color: var(--accent); }

/* --- Sections ------------------------------------------------- */
.section { padding: 40px 0; border-top: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 20px; }
.section-head h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.section-head a { font-size: 15px; color: var(--accent); font-weight: 600; }
.topic-list { max-width: var(--measure); }

/* --- Hero: who is behind it ----------------------------------- */
.intro { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); padding: 40px 0 48px; align-items: center; }
@media (min-width: 760px) { .intro { grid-template-columns: 1.1fr 0.9fr; gap: 48px; } }
.intro-kicker { font-size: 14px; font-weight: 600; color: var(--accent); margin-bottom: 14px; }
.intro h1 { font-size: clamp(32px, 4.6vw, 54px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.02; max-width: 18ch; }
.intro p { font-family: var(--prose); font-size: 19px; line-height: 1.5; color: var(--ink-2); max-width: 50ch; margin: 18px 0 0; }
.intro-gains { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.intro-gains li { position: relative; padding-left: 30px; font-size: 17px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.intro-gains li::before { content: ""; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); }
.intro-gains li::after { content: ""; position: absolute; left: 7px; top: 5px; width: 5px; height: 9px; border: solid var(--cover-badge); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.btn.big { padding: 15px 26px; font-size: 16px; }
.intro p.intro-note { font-family: var(--display); font-size: 14px; color: var(--ink-2); margin-top: 14px; }
.intro-photo figure { position: relative; margin: 0; }
.intro-proof { position: absolute; left: 18px; right: 18px; bottom: 18px; display: grid; gap: 8px; padding: 18px 22px; border-radius: 14px; background: color-mix(in srgb, var(--cover-base) 88%, transparent); color: #fff; font-size: 15.5px; line-height: 1.3; border-left: 4px solid var(--cover-badge); backdrop-filter: blur(4px); }
.intro-proof b { font-size: 17px; }
.intro-proof b { color: var(--cover-badge); }
.intro .cta-actions { margin-top: 28px; gap: 12px; }
.intro .social { display: flex; gap: 10px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.intro .social a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink); }
.intro .social a:hover { border-color: var(--accent); color: var(--accent); }
.intro-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 16px; }
@media (min-width: 760px) { .intro-photo { max-width: 460px; width: 100%; justify-self: end; } }

/* --- Services ------------------------------------------------- */
/* compact service cards ("Other ways I can help" on a service page) */
.services-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }
.service { display: flex; flex-direction: column; gap: 8px; padding: 24px; border: 1px solid var(--line); border-radius: 12px; color: inherit; }
.service:hover { border-color: var(--accent); color: inherit; }
.service:hover h3 { color: var(--accent); }
.service-kicker { font-size: 13px; font-weight: 600; color: var(--accent); }
.service h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.service p { margin: 0; font-family: var(--prose); font-size: 16px; line-height: 1.45; color: var(--ink-2); flex: 1; }

/* --- Packages (What I do): cards on a navy band, a slow carousel on the home page --- */
.pkg-track { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .pkg-track { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .pkg-track { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pkg { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--paper); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.pkg:hover { transform: translateY(-3px); box-shadow: 0 14px 34px -18px rgba(15, 29, 51, .45); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.pkg-head { position: relative; padding: 22px 24px 20px; color: #fff; background:
    repeating-linear-gradient(115deg, rgba(255,255,255,.05) 0 1px, transparent 1px 8px),
    linear-gradient(150deg, var(--cover-tint), var(--cover-base)); }
.pkg-head::after { content: ""; position: absolute; left: 24px; right: 24px; bottom: 0; height: 3px; background: var(--cover-badge); }
.pkg-icon { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.08); border: 1px solid color-mix(in srgb, var(--cover-badge) 55%, transparent); margin-bottom: 14px; }
.pkg-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--cover-badge); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pkg-kicker { display: block; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--cover-badge); margin-bottom: 6px; }
.pkg-head h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; color: #fff; }
/* every header reserves the kicker plus two title lines, bottom-aligned, so the gold rules line up across cards */
.pkg-titles { display: flex; flex-direction: column; justify-content: flex-end; min-height: calc(12px * 1.5 + 6px + 2 * 22px * 1.15); }
.pkg-body { flex: 1; display: flex; flex-direction: column; gap: 18px; padding: 20px 24px 8px; }
.pkg-promise { margin: 0; font-family: var(--prose); font-size: 16px; line-height: 1.5; color: var(--ink); }
.pkg-label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 8px; }
.pkg-list { margin: 0; font-size: 14px; color: var(--ink-2); }
ul.pkg-list { list-style: none; padding: 0; display: grid; gap: 7px; }
ul.pkg-list li { position: relative; padding-left: 24px; color: var(--ink); line-height: 1.35; }
ul.pkg-list li::before { content: ""; position: absolute; left: 0; top: 2px; width: 15px; height: 15px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 12%, var(--paper)); }
ul.pkg-list li::after { content: ""; position: absolute; left: 5px; top: 5px; width: 4px; height: 7px; border: solid var(--accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.pkg-foot { padding: 16px 24px 22px; display: grid; gap: 14px; }
.pkg-format { font-size: 13px; color: var(--ink-2); padding-top: 14px; border-top: 1px dashed var(--line); }
.pkg-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pkg-actions .btn { padding: 12px 22px; font-size: 15px; }
.pkg-more { font-size: 15px; font-weight: 600; color: var(--accent); }
.pkg-more:hover { text-decoration: underline; text-underline-offset: 3px; }

/* carousel (home): a scroll-snap row, three cards visible on desktop; main.js adds the slow rotation, arrows and dots */
.pkg-carousel .pkg-track { display: flex; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding: 4px 2px 18px; margin: -4px -2px 0; }
.pkg-carousel .pkg-track::-webkit-scrollbar { display: none; }
.pkg-carousel .pkg { flex: 0 0 86%; scroll-snap-align: start; }
@media (min-width: 640px) { .pkg-carousel .pkg { flex-basis: calc((100% - 20px) / 2); } }
@media (min-width: 900px) { .pkg-carousel .pkg { flex-basis: calc((100% - 40px) / 3); } }
.pkg-controls { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 6px; }
.pkg-nav { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.pkg-nav:hover { border-color: var(--accent); color: var(--accent); }
.pkg-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pkg-dots { display: flex; gap: 8px; }
.pkg-dots button { width: 8px; height: 8px; padding: 0; border-radius: 999px; border: 0; background: var(--line); cursor: pointer; transition: width .3s ease, background .3s ease; }
.pkg-dots button[aria-selected="true"] { width: 26px; background: var(--accent); }
@media (prefers-reduced-motion: reduce) { .pkg, .pkg-carousel .pkg-track { transition: none; scroll-behavior: auto; } .pkg:hover { transform: none; } }

/* --- Proof strip ---------------------------------------------- */
.proof-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.fact { border-top: 3px solid var(--ink); padding-top: 12px; }
.fact b { display: block; font-size: 34px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; margin-bottom: 8px; }
.fact span { font-size: 14px; line-height: 1.4; color: var(--ink-2); }
.proof-note { margin: 24px 0 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); max-width: 80ch; }

/* --- How it works / service page ------------------------------ */
.how h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 16px; }
.steps { margin: 0 0 24px; padding-left: 1.3em; display: grid; gap: 14px; font-size: 16px; line-height: 1.5; max-width: 72ch; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: none; } }
.service-page .page-title .service-kicker { margin-bottom: 8px; }
.service-tools { margin-top: 14px; font-size: 14px; color: var(--ink-2); }
.service-page .prose { margin-top: 8px; }

.cover-empty .lead-empty p { margin: 0; font-size: 22px; font-weight: 600; color: var(--ink); }
.cover-empty .lead-empty p.hint { margin-top: 10px; font-size: 14px; font-weight: 400; color: var(--ink-2); }

/* --- Microblog ------------------------------------------------ */
/* The board: a masonry wall of post-style cards (CSS columns). */
.notes-board { padding: 8px 0 32px; }
.notes-board { columns: 3; column-gap: 20px; }
@media (max-width: 960px) { .notes-board { columns: 2; } }
@media (max-width: 600px) { .notes-board { columns: 1; } }
.notes-board .pagination { column-span: all; }
.note {
  break-inside: avoid; display: flex; flex-direction: column; gap: 12px;
  margin: 0 0 20px; padding: 18px 20px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper);
}
.note-head { display: flex; align-items: center; gap: 10px; }
.note-head .avatar { width: 34px; height: 34px; }
.note-who { display: flex; flex-direction: column; line-height: 1.2; font-size: 14px; }
.note-who b { font-weight: 600; }
.note-date { font-size: 13px; color: var(--ink-2); }
.note-img { display: block; margin: 2px 0 0; }
.note-img img { border-radius: 8px; width: 100%; }
.note-body { font-family: var(--prose); font-size: 17px; line-height: 1.5; }
.note-body > * + * { margin-top: 0.8em; }
.note-body > :first-child { margin-top: 0; }
.note-body p { margin-bottom: 0; }
.note-body ul, .note-body ol { margin: 0; padding-left: 1.2em; }
.note-body li + li { margin-top: 0.3em; }
.note-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.note-body figure { margin: 0.8em 0; } .note-body img { border-radius: 8px; }
.note-tags { margin: -4px 0 0; font-size: 15px; font-weight: 600; line-height: 1.4; }
.note-tags:empty, .note-tags:not(:has(a)) { display: none; }
.note-tag { color: var(--accent); }
.note-tag:hover { text-decoration: underline; text-underline-offset: 3px; }

.notes-row { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.note-mini { display: block; padding: 18px 20px; border: 1px solid var(--line); border-radius: 8px; }
.note-mini:hover { border-color: var(--accent); color: inherit; }
.note-mini time { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.note-mini h3 { font-size: 18px; font-weight: 600; line-height: 1.25; margin: 8px 0 6px; }
.note-mini p { margin: 8px 0 0; font-family: var(--prose); font-size: 16px; line-height: 1.5; color: var(--ink); }

/* --- Links page (/links/, link in bio) ------------------------
   One narrow column of full-width buttons. Editor Button cards, list links and
   lone paragraph links in the page content all take the same button style. */
.links-page { background: var(--paper-2); }
.links { max-width: 560px; margin: 0 auto; padding: 48px 16px 28px; display: flex; flex-direction: column; gap: 12px; }
.links-head { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; margin-bottom: 16px; }
.links-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin-bottom: 6px; }
.links-head h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.links-head p { margin: 0; max-width: 38ch; font-family: var(--prose); font-size: 16px; line-height: 1.45; color: var(--ink-2); }

.links-btn,
.links-list .kg-button-card .kg-btn,
.links-list li > a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  width: 100%; height: auto; min-height: 56px; padding: 14px 20px;
  background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 14px;
  font-family: var(--display); font-size: 16px; font-weight: 600; line-height: 1.25; text-align: center; text-decoration: none;
}
.links-btn:hover,
.links-list .kg-button-card .kg-btn:hover,
.links-list li > a:hover { border-color: var(--accent); color: var(--accent); opacity: 1; }
.links-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.links-btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.links-btn b { font-weight: 700; }
.links-btn small { font-size: 13px; font-weight: 500; opacity: .85; }

.links-list { display: flex; flex-direction: column; gap: 12px; }
.links-list > * { margin: 0; }
.links-list .kg-button-card { display: block; margin: 0; }
.links-list ul, .links-list ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.links-list h2, .links-list h3 { margin: 12px 0 0; text-align: center; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.links-list p { text-align: center; color: var(--ink-2); font-size: 15px; }
.links-list p:empty { display: none; }

/* Product card in the page content (e.g. ScribeOps): logo left, text right, button below */
.links-list .kg-product-card { display: block; margin: 0; }
.links-list .kg-product-card .kg-product-card-container {
  display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 14px; row-gap: 4px; align-items: center;
  width: 100%; max-width: none; padding: 16px; text-align: left;
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: none;
}
.links-list .kg-product-card .kg-product-card-image { grid-column: 1; grid-row: 1 / span 2; width: 56px; height: 56px; object-fit: contain; border-radius: 12px; justify-self: start; align-self: start; }
.links-list .kg-product-card .kg-product-card-title-container { grid-column: 2; }
.links-list .kg-product-card .kg-product-card-title { margin: 0; font-family: var(--display); font-size: 17px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.links-list .kg-product-card .kg-product-card-description { grid-column: 2; }
.links-list .kg-product-card .kg-product-card-description p { margin: 0; text-align: left; font-family: var(--prose); font-size: 15px; line-height: 1.4; color: var(--ink-2); }
.links-list .kg-product-card .kg-product-card-container:not(:has(.kg-product-card-image)) { grid-template-columns: minmax(0, 1fr); }
.links-list .kg-product-card .kg-product-card-container:not(:has(.kg-product-card-image)) > * { grid-column: 1; }
.links-list .kg-product-card .kg-product-card-button {
  grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; width: 100%; height: auto; min-height: 44px; margin-top: 12px;
  background: var(--ink); color: var(--paper); border-radius: 10px; font-family: var(--display); font-size: 15px; font-weight: 600; text-decoration: none;
}
.links-list .kg-product-card .kg-product-card-button:hover { background: var(--accent); color: #fff; opacity: 1; }
.links-list .kg-product-card .kg-product-card-rating { display: none; }
/* links inside a card's text become small pills with an icon: LinkedIn, or a globe for any other site */
.links-list .kg-product-card .kg-product-card-description p + p { margin-top: 12px; }
.links-list .kg-product-card .kg-product-card-description a {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.5 2.7 3.8 5.7 3.8 9s-1.3 6.3-3.8 9c-2.5-2.7-3.8-5.7-3.8-9S9.5 5.7 12 3z'/%3E%3C/svg%3E");
  display: inline-flex; align-items: center; gap: 6px; margin: 0 6px 6px 0; padding: 7px 12px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--display); font-size: 14px; font-weight: 600; line-height: 1.2; color: var(--ink); text-decoration: none;
}
.links-list .kg-product-card .kg-product-card-description a[href*="linkedin.com"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.9 8.6H3.6V20h3.3V8.6zM5.2 3.5a1.9 1.9 0 1 0 0 3.8 1.9 1.9 0 0 0 0-3.8zM20.4 13c0-3.3-1.8-4.7-4.1-4.7-1.6 0-2.6.9-3.1 1.6V8.6H9.9V20h3.3v-5.7c0-1.5.3-3 2.2-3 1.8 0 1.8 1.7 1.8 3.1V20h3.3V13z'/%3E%3C/svg%3E"); }
.links-list .kg-product-card .kg-product-card-description a::before {
  content: ""; flex: none; width: 14px; height: 14px; background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
}
.links-list .kg-product-card .kg-product-card-description a:hover { border-color: var(--accent); color: var(--accent); }

.links-issue {
  display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 16px; align-items: center;
  padding: 12px 16px 12px 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
}
.links-issue:hover { border-color: var(--accent); color: inherit; }
.links-issue-cover .mag { border-radius: 6px; }
.links-kicker { display: block; font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 4px; }
.links-issue-text b { display: block; font-size: 17px; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.links-issue:hover b { color: var(--accent); }

.links-social { display: flex; justify-content: center; gap: 10px; margin-top: 12px; }
.links-social a { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); display: grid; place-items: center; color: var(--ink); }
.links-social a:hover { border-color: var(--accent); color: var(--accent); }
.links-foot { display: flex; justify-content: center; margin-top: 20px; }
.links-foot .masthead { font-size: 18px; gap: 8px; }
.links-foot .masthead .mark { width: 20px; height: 22px; }

/* --- Call to action (end of articles) ------------------------- */
.cta { margin: 40px 0 0; padding: 28px; border-radius: 12px; background: var(--paper-2); display: grid; gap: 18px; }
@media (min-width: 760px) { .cta { grid-template-columns: 1.4fr 1fr; align-items: center; } }
.cta h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.cta p { margin: 10px 0 0; color: var(--ink-2); font-size: 16px; line-height: 1.5; max-width: 48ch; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (min-width: 760px) { .cta .cta-actions { flex-direction: column; align-items: stretch; } .cta .btn { text-align: center; } }

/* --- Work with me --------------------------------------------- */
.offers { display: grid; gap: 24px; }
@media (min-width: 760px) { .offers { grid-template-columns: 1fr 1fr; } }
.offer { padding: 28px; border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; gap: 12px; }
.offer-kicker { font-size: 13px; font-weight: 600; color: var(--accent); }
.offer h2 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.offer p { margin: 0; color: var(--ink-2); line-height: 1.5; flex: 1; }
.offer .cta-actions { margin-top: 8px; }

@media (min-width: 900px) { .offers-3 { grid-template-columns: 1fr 1fr 1fr; } }
.offer-main { border-color: var(--accent); border-width: 2px; }

/* --- IT on retainer ------------------------------------------- */
.retainer .seats { font-size: 14px; font-weight: 600; color: var(--accent); }
.retainer-lead { font-family: var(--prose); font-size: 18px; line-height: 1.5; color: var(--ink-2); max-width: 64ch; margin: 0 0 12px; }
.retainer-note { font-size: 15px; line-height: 1.5; color: var(--ink-2); max-width: 72ch; margin: 0 0 28px; padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--paper-2); }
.tiers { display: grid; gap: 20px; }
@media (min-width: 900px) { .tiers { grid-template-columns: repeat(3, 1fr); align-items: start; } }
.tier { position: relative; padding: 26px 24px; border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; gap: 10px; }
.tier-featured { border-color: var(--accent); border-width: 2px; }
.tier-badge { position: absolute; top: -12px; left: 20px; padding: 3px 10px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; }
.tier-name { font-size: 15px; font-weight: 700; color: var(--ink-2); }
.tier-price { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.tier-fx { font-size: 13px; color: var(--ink-2); margin-top: -4px; }
.tier-price span { font-size: 15px; font-weight: 500; color: var(--ink-2); letter-spacing: 0; margin-left: 4px; }
.tier-for { margin: 0; font-family: var(--prose); color: var(--ink-2); font-size: 15px; line-height: 1.45; min-height: 2.9em; }
.tier ul, .retainer-cols ul { margin: 6px 0 0; padding: 0; list-style: none; }
.tier li, .retainer-cols li { position: relative; padding: 7px 0 7px 22px; border-top: 1px dashed var(--line); font-size: 15px; line-height: 1.4; }
.tier li::before, .retainer-cols li::before { content: ""; position: absolute; left: 0; top: 13px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.5l2.5 2.5L10 3.5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.5l2.5 2.5L10 3.5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.retainer-cols { display: grid; gap: 32px; margin-top: 40px; }
@media (min-width: 760px) { .retainer-cols { grid-template-columns: 1fr 1fr; } }
.retainer h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.retainer-cols p { margin: 10px 0 0; font-family: var(--prose); font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.retainer-how { margin-top: 40px; padding: 28px; border-radius: 12px; background: var(--paper-2); }
.retainer-how ol { margin: 0 0 20px; padding-left: 1.3em; display: grid; gap: 8px; font-size: 16px; line-height: 1.45; }
@media (min-width: 760px) { .retainer-how ol { grid-template-columns: repeat(3, 1fr); gap: 20px; padding-left: 1.2em; } }

/* --- Featured topic landing + featured topic cards ------------- */
.topic-hero { --topic: var(--accent); display: grid; gap: 28px; padding: 36px 0 8px; align-items: center; }
@media (min-width: 760px) { .topic-hero.has-image { grid-template-columns: 1.2fr 0.8fr; gap: 48px; } }
.topic-kicker { font-size: 13px; font-weight: 600; color: var(--topic); margin-bottom: 10px; }
.topic-hero h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.topic-hero p { font-family: var(--prose); font-size: 20px; line-height: 1.45; color: var(--ink-2); max-width: 46ch; margin: 16px 0 0; }
.topic-meta { margin-top: 18px; font-size: 14px; color: var(--ink-2); font-weight: 600; }
.topic-hero-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }
.topic-card-featured { padding-top: 16px; }
.topic-card-featured img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; margin-bottom: 8px; }
.topic-flag { font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--topic); }

/* --- Hosted apps bundles -------------------------------------- */
@media (min-width: 900px) { .offers-4 { grid-template-columns: 1fr 1fr; } }
.offer-soon { border-style: dashed; }
.bundles { display: grid; gap: 20px; }
@media (min-width: 900px) { .bundles { grid-template-columns: repeat(3, 1fr); align-items: start; } }
.bundle { padding: 24px; border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; gap: 8px; }
.bundle h3 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.bundle ul { margin: 6px 0 14px; padding: 0; list-style: none; }
.bundle li { position: relative; padding: 7px 0 7px 22px; border-top: 1px dashed var(--line); font-size: 15px; line-height: 1.4; }
.bundle li::before { content: ""; position: absolute; left: 0; top: 13px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.5l2.5 2.5L10 3.5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.5l2.5 2.5L10 3.5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.bundle .btn { align-self: flex-start; margin-top: auto; }
.hosted-note { margin: 24px 0 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); max-width: 72ch; }

/* --- Contact page --------------------------------------------- */
.contact-grid { display: grid; gap: 40px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: start; } }
.enquiry { display: grid; gap: 16px; }
.enquiry label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.enquiry input, .enquiry select, .enquiry textarea { font: inherit; font-weight: 400; font-size: 16px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); }
.enquiry textarea { resize: vertical; }
.enquiry input:focus, .enquiry select:focus, .enquiry textarea:focus { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.enquiry button { justify-self: start; }
.enquiry small { color: var(--ink-2); font-size: 13px; line-height: 1.4; }
.contact-aside h2 { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 10px; }
.contact-aside h2 + ul, .contact-aside .steps { margin-bottom: 28px; }
.steps-col { grid-template-columns: 1fr !important; gap: 10px !important; padding-left: 1.3em; }
.contact-ways { margin: 0; padding-left: 1.1em; display: grid; gap: 8px; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.contact-ways a { color: var(--accent); font-weight: 600; }

/* --- Building (projects) -------------------------------------- */
.projects-grid { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .projects-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .projects-grid { grid-template-columns: repeat(3, 1fr); } }
.project { display: flex; flex-direction: column; gap: 12px; color: inherit; }
.project:hover { color: inherit; } .project:hover h3 { color: var(--accent); }
.project .card-img { aspect-ratio: 16 / 10; }
.project-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 13px; color: var(--ink-2); }
.project-meta .status { font-weight: 700; color: var(--accent); }
.project h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; }
.project p { margin: 0; font-family: var(--prose); font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.pin { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; vertical-align: middle; }

/* --- Members gate --------------------------------------------- */
.gate { margin: 8px auto 0; padding: 32px; border-radius: 12px; border: 2px solid var(--accent); background: var(--paper); }
.prose .gate { margin-top: 2.2em; position: relative; }
.prose .gate::before { content: ""; position: absolute; left: 0; right: 0; top: -2.4em; height: 2em; background: linear-gradient(to bottom, transparent, var(--paper)); pointer-events: none; }
.prose .gate h2 { margin-top: 0; font-size: 22px; }
.prose .gate p { margin: 10px 0 0; }
.prose .gate a { text-decoration: none; }
.prose .gate .btn.accent { color: var(--cover-base); }
.prose .gate .btn.ghost { color: var(--ink); }
.gate h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.gate p { margin: 10px 0 0; color: var(--ink-2); line-height: 1.5; max-width: 60ch; }
.gate .cta-actions { margin-top: 28px; gap: 12px; }
.gate .btn { padding: 14px 26px; font-size: 16px; }

/* --- Topics page ---------------------------------------------- */
.topics-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.topic-card { --topic: var(--accent); display: flex; flex-direction: column; gap: 6px; padding: 20px; border: 1px solid var(--line); border-left: 4px solid var(--topic); border-radius: 10px; }
.topic-card:hover { border-color: var(--topic); color: inherit; }
.topic-card b { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.topic-card p { margin: 0; font-size: 15px; color: var(--ink-2); line-height: 1.4; }
.topic-card span { font-size: 13px; color: var(--ink-2); margin-top: auto; }

/* subscribe */
.subscribe {
  background: var(--paper-2); border-radius: 8px; padding: clamp(28px, 5vw, 48px);
  display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 760px) { .subscribe { grid-template-columns: 1.3fr 1fr; align-items: center; } }
.subscribe h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 700; letter-spacing: -0.025em; }
.subscribe p { margin: 10px 0 0; color: var(--ink-2); max-width: 44ch; }
.subscribe form { display: flex; gap: 8px; flex-wrap: wrap; }
.subscribe input {
  flex: 1 1 200px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 999px;
  font: inherit; font-size: 15px; background: var(--paper); color: var(--ink);
}
.subscribe small { display: block; flex-basis: 100%; color: var(--ink-2); font-size: 13px; }
.subscribe .msg { display: none; }
.subscribe form.success .msg.success { display: block; color: var(--accent); }
.subscribe form.error .msg.error { display: block; color: #c62828; }
.subscribe form.success .sub-note, .subscribe form.error .sub-note { display: none; }
.subscribe form.loading button { opacity: .6; }

.site-foot { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 14px; color: var(--ink-2);
  display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
.site-foot a + a { margin-left: 14px; }

/* --- Article -------------------------------------------------- */
.article-head { padding: 36px 0 24px; }
.article-head .crumbs { display: flex; gap: 12px; align-items: center; font-size: 14px; color: var(--ink-2); margin-bottom: 22px; flex-wrap: wrap; }
.article-head .crumbs .topic { color: var(--accent); font-weight: 600; }
.article-head .crumbs .when { color: var(--ink-2); }
.article-head h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.02; }
.article-head .dek { font-family: var(--prose); font-size: 21px; line-height: 1.4; color: var(--ink-2); margin: 18px 0 20px; }
.article-head .byline { display: flex; align-items: center; gap: 12px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); object-fit: cover; display: block; flex: none; }
.article-hero { margin: 8px 0 32px; }
.article-cover { margin: 8px auto 36px; max-width: 460px; }

/* --- Newsletter archive (/newsletter/) ------------------------- */
.issues { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 24px; }
.issue { display: block; color: inherit; }
.issue .mag { border-radius: 6px; }
.issue-text { margin-top: 14px; }
.issue-text .topic { font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 4px; }
.issue-text h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.issue:hover h3 { color: var(--accent); }
.issue-text .excerpt { font-size: 15px; color: var(--ink-2); margin-top: 6px; }
@media (max-width: 900px) { .issues { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .issues { grid-template-columns: minmax(0, 1fr); max-width: 420px; } }
.article-hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }

/* --- Article plate: the cover's language in a lighter key ------ */
.plate-frame { --topic: var(--cover-tint); --mat: oklch(from var(--topic) 0.24 0.05 h); position: relative; width: 100%; height: 100%; padding: 12px; border-radius: var(--radius); background: var(--mat); }
.plate-frame::before { content: ""; position: absolute; inset: 6px; border: 1px solid var(--cover-badge); opacity: .85; pointer-events: none; z-index: 1; }
.plate-card { padding: 8px; }
.plate-card::before { inset: 4px; }
.plate { position: relative; width: 100%; height: 100%; overflow: hidden;
         background: linear-gradient(135deg, color-mix(in srgb, var(--topic) 45%, white), color-mix(in srgb, var(--topic) 80%, black)); }
.plate-frame.plate-hero .plate { aspect-ratio: 2 / 1; }
.plate .photo { position: absolute; inset: 0; background: var(--photo) center / cover no-repeat; }
.plate .wash { position: absolute; inset: 0; background: var(--topic); mix-blend-mode: multiply; opacity: .18; }
.plate { container-type: inline-size; }
.plate .deco { position: absolute; inset: 0; pointer-events: none; }
.plate .deco > * { position: absolute; }
.plate .screen { inset: 0; background: repeating-linear-gradient(115deg, rgba(255,255,255,.06) 0 1px, transparent 1px 7px); mix-blend-mode: overlay; }
.plate .screen::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 24cqw; background: linear-gradient(to top, color-mix(in srgb, var(--topic) 75%, black), transparent); opacity: .55; }
.plate .corner { width: 5cqw; height: 5cqw; border: 2px solid var(--cover-badge); opacity: .95; }
.plate .corner.tl { top: 3cqw; left: 3cqw; border-right: 0; border-bottom: 0; }
.plate .corner.br { bottom: 3cqw; right: 3cqw; border-left: 0; border-top: 0; }
.plate .rule { left: 3cqw; right: 11cqw; bottom: 4cqw; height: 1px; background: var(--cover-badge); opacity: .8; }
.plate .sq { left: 3cqw; bottom: 3.3cqw; width: 1.5cqw; height: 1.5cqw; background: var(--cover-badge); }
.plate .dd { right: 11cqw; bottom: 5.2cqw; color: var(--cover-badge); --accent: var(--cover-badge); line-height: 0; }
.plate .dd svg { width: auto; height: 4cqw; }
.plate-card .dd { display: none; }
.plate-card .rule { right: 9cqw; }
@media (prefers-reduced-motion: no-preference) { .card:hover .plate .photo { transform: scale(1.02); } .plate .photo { transition: transform .5s ease; } }
.no-photo .plate .photo { background: repeating-linear-gradient(115deg, rgba(255,255,255,.07) 0 2px, transparent 2px 16px); }
.card-img { padding: 0; }
.card-img .plate-frame { height: 100%; }
@media (max-width: 640px) { .plate-frame.plate-hero .plate { aspect-ratio: 16 / 10; } .plate-hero { padding: 8px; } .plate-hero::before { inset: 4px; } }
.article-hero figcaption { font-size: 13px; color: var(--ink-2); margin-top: 8px; }

.prose { font-family: var(--prose); font-size: 18px; line-height: 1.6; }
.serif-body .prose { font-size: 19px; }
.prose > * + * { margin-top: 1.3em; }
.prose > :first-child { margin-top: 0; }
.prose p { margin-bottom: 0; }
.prose h2 { font-family: var(--display); font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-top: 2em; }
.prose h3 { font-family: var(--display); font-size: 20px; font-weight: 600; margin-top: 1.6em; }
.prose h2 + *, .prose h3 + * { margin-top: 0.6em; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote {
  margin: 1.8em 0; padding: 0 0 0 20px; border-left: 3px solid var(--accent);
  font-size: 1.2em; line-height: 1.35; font-style: italic;
}
.prose blockquote.kg-blockquote-alt { border: 0; padding: 0; text-align: center; font-size: 1.35em; }
.prose ul, .prose ol { padding-left: 1.2em; } .prose li + li { margin-top: 0.4em; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.prose figure { margin: 2em 0; }
.prose figure img { border-radius: var(--radius); width: 100%; }
.prose figcaption { font-family: var(--display); font-size: 13px; color: var(--ink-2); margin-top: 8px; text-align: center; }
.prose pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; line-height: 1.5; background: var(--paper-2); padding: 16px; border-radius: var(--radius); overflow-x: auto; }
.prose pre code { background: none; padding: 0; font-size: inherit; }
.prose .kg-callout-card { font-family: var(--display); font-size: 15px; border-radius: var(--radius); }
.prose .kg-button-card .kg-btn { font-family: var(--display); border-radius: 999px; font-weight: 600; }
.prose iframe { max-width: 100%; }

/* wide and full-bleed Koenig cards break out of the measure */
.prose .kg-width-wide { position: relative; width: min(1120px - 2 * var(--gutter), 100vw - 2 * var(--gutter)); left: 50%; transform: translateX(-50%); }
.prose .kg-width-full { position: relative; width: 100vw; left: 50%; transform: translateX(-50%); }
.prose .kg-width-full img { border-radius: 0; }

@media (max-width: 520px) { .prose { font-size: 17px; } }

.article-foot { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.author-card { display: flex; gap: 14px; align-items: flex-start; font-size: 15px; }
.author-card p { margin: 2px 0 0; color: var(--ink-2); }

.more { padding: 40px 0; border-top: 1px solid var(--line); }
.more h2 { font-size: 22px; font-weight: 700; margin-bottom: 8px; display: flex; gap: 12px; align-items: center; }

.page-title { padding: 36px 0 8px; }
.page-narrow { max-width: 760px; margin: 0 auto; }
.page-narrow .prose { max-width: none; }
.page-title h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 700; letter-spacing: -0.03em; }
.page-title p { color: var(--ink-2); font-family: var(--prose); font-size: 20px; margin: 10px 0 0; max-width: 48ch; }

/* --- Article grid (/articles/, topic and author pages) ---------
   Three columns; the 1st and 7th card of every ten span two columns, so the
   wide card alternates sides from row to row. */
.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 24px; grid-auto-flow: dense; }
.card { display: flex; flex-direction: column; gap: 14px; color: inherit; }
.card:hover { color: inherit; }
.card:hover h3 { color: var(--accent); }
.card-img { aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--paper-2); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card .topic { font-size: 13px; color: var(--accent); font-weight: 600; margin-bottom: 6px; }
.card .topic:empty { display: none; }
.card h3 { font-size: 20px; font-weight: 600; line-height: 1.2; letter-spacing: -0.015em; }
.card .excerpt { display: none; font-family: var(--prose); color: var(--ink-2); font-size: 16px; line-height: 1.45; margin: 8px 0 0; max-width: 56ch; }
.card .mins { font-size: 13px; color: var(--ink-2); margin-top: 8px; }

.article-grid > .card:nth-child(10n+1),
.article-grid > .card:nth-child(10n+7) { grid-column: span 2; }
.article-grid > .card:nth-child(10n+1) .card-img,
.article-grid > .card:nth-child(10n+7) .card-img { aspect-ratio: 16 / 9; }
.article-grid > .card:nth-child(10n+1) h3,
.article-grid > .card:nth-child(10n+7) h3 { font-size: clamp(24px, 2.6vw, 30px); letter-spacing: -0.025em; max-width: 22ch; }
.article-grid > .card:nth-child(10n+1) .excerpt,
.article-grid > .card:nth-child(10n+7) .excerpt { display: block; }

@media (max-width: 900px) {
  .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-grid > .card:nth-child(10n+1), .article-grid > .card:nth-child(10n+7) { grid-column: span 2; }
}
@media (max-width: 560px) {
  .article-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .article-grid > .card { grid-column: auto !important; }
  .card .excerpt { display: block; }
}

/* pagination */
.pagination { display: flex; justify-content: space-between; align-items: center; padding: 24px 0; font-size: 14px; color: var(--ink-2); }
.pagination a { color: var(--accent); font-weight: 600; }

@media (prefers-reduced-motion: no-preference) { .btn, .lead h2 { transition: color .15s, background-color .15s; } }
