/* CRAFT. Plain news layout: one stylesheet, system fonts, no framework. */

:root {
  --bg: #0b1114;
  --surface: #121c20;
  --text: #eff5f1;
  --body: #dbe4df;
  --muted: #a7b8b2;
  --faint: #7d908a;
  --accent: #9ce2c2;
  --accent-hover: #c2f0da;
  --rule: #2f3f3c;
  --rule-strong: #43575a;
  --sponsor: #f2c879;
  --flag: #ffd479;

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Charter", "Bitstream Charter", "Iowan Old Style", "Source Serif 4", Georgia, Cambria, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  /* Article body typeface. Experimenting with sans; set to var(--serif) to go back to Charter. */
  --body-font: var(--sans);

  --max: 1180px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --measure: 40rem;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

main:focus {
  outline: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 10;
  padding: 0.5rem 0.9rem;
  background: var(--accent);
  color: var(--bg);
}

.skip-link:focus {
  top: 0.5rem;
}

.container {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.small {
  font-size: 0.875rem;
}

.muted {
  color: var(--muted);
}

.dot {
  margin-inline: 0.4em;
  color: var(--faint);
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
}

.preview-banner {
  background: #3a2f12;
  color: var(--flag);
  font-size: 0.8125rem;
  text-align: center;
  padding: 0.35rem 1rem;
}

/* ---------------------------------------------------------------- Header */

.site-header {
  border-bottom: 1px dashed var(--rule-strong);
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.1rem 0.9rem;
}

.brand {
  display: inline-flex;
  color: var(--text);
}

.brand:hover {
  color: var(--text);
}

.logo-wordmark {
  height: 24px;
  width: auto;
  display: block;
}

.logo-wordmark g:last-child,
.logo-mark g:last-child {
  fill: var(--accent);
}

.utility-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.utility-nav a[aria-current="page"] {
  color: var(--text);
}

.topic-nav {
  border-top: 1px dashed var(--rule);
}

.topic-nav .container {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.topic-nav .container::-webkit-scrollbar {
  display: none;
}

.topic-nav a {
  padding-block: 0.7rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
  position: relative;
  transition: color 0.15s ease;
}

/* Underline that zips in from the left on hover; stays drawn on the current page. */
.topic-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.18s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.topic-nav a:hover,
.topic-nav a:focus-visible,
.topic-nav a[aria-current="page"] {
  color: var(--text);
}

.topic-nav a:hover::after,
.topic-nav a:focus-visible::after,
.topic-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

@media (prefers-reduced-motion: reduce) {
  .topic-nav a::after {
    transition: none;
  }
}

@media (max-width: 560px) {
  .utility-nav a:not([aria-label]) {
    display: none;
  }
  .logo-wordmark {
    height: 20px;
  }
}

/* ---------------------------------------------------------------- Shared bits */

.section {
  padding-block: 2rem;
}

.section-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px dashed var(--rule-strong);
}

.kicker {
  display: inline-block;
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.kicker a:hover {
  color: var(--accent-hover);
}

.kicker-sponsored {
  color: var(--sponsor);
}

.flags {
  margin-left: 0.6rem;
}

.flag {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--flag);
  border: 1px solid #6b5520;
  padding: 0.05rem 0.35rem;
  margin-right: 0.3rem;
  vertical-align: 1px;
}

.flag-demo {
  color: var(--muted);
  border-color: var(--rule-strong);
}

.meta {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--faint);
}

.empty {
  color: var(--muted);
  padding: 2rem 0;
}

.button {
  display: inline-block;
  padding: 0.55rem 1rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.9375rem;
}

.button:hover {
  background: var(--accent-hover);
  color: var(--bg);
}

/* ---------------------------------------------------------------- Front page */

.front {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 2.5rem;
  padding-block: 2rem 1rem;
}

.lead-media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface);
  margin-bottom: 1rem;
}

.lead-media img,
.row-thumb img,
.compact-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lead-title {
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.6rem;
}

.lead-dek {
  font-size: 1.0625rem;
  color: var(--muted);
  margin: 0 0 0.6rem;
  max-width: 40rem;
}

.front-side {
  border-left: 1px dashed var(--rule);
  padding-left: 2.5rem;
}

.compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  gap: 1rem;
  padding-block: 1rem;
  border-bottom: 1px dashed var(--rule);
}

.compact:first-child {
  padding-top: 0;
}

.compact:last-child {
  border-bottom: 0;
}

.compact-title {
  font-size: 1rem;
  line-height: 1.3;
  margin: 0 0 0.35rem;
}

.compact-thumb {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--surface);
}

@media (max-width: 860px) {
  .front {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .front-side {
    border-left: 0;
    padding-left: 0;
    border-top: 1px dashed var(--rule-strong);
    padding-top: 1rem;
  }
}

/* ---------------------------------------------------------------- Story rows */

.row {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 1.5rem;
  padding-block: 1.4rem;
  border-bottom: 1px dashed var(--rule);
}

.row.no-thumb {
  grid-template-columns: minmax(0, 1fr);
}

.row-thumb {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--surface);
}

.row-title {
  font-size: 1.25rem;
  line-height: 1.25;
  margin: 0 0 0.4rem;
}

.row-dek {
  color: var(--muted);
  margin: 0 0 0.5rem;
  max-width: 44rem;
}

@media (max-width: 640px) {
  .row {
    grid-template-columns: minmax(0, 1fr) 96px;
    gap: 1rem;
  }
  .row-thumb {
    order: 2;
    aspect-ratio: 1;
  }
  .row-title {
    font-size: 1.0625rem;
  }
  .row-dek {
    display: none;
  }
}

.is-sponsored .row-title a,
.is-sponsored .compact-title a {
  color: var(--text);
}

/* ---------------------------------------------------------------- Pages */

/* Text columns stay left-aligned with the page grid; their children set the measure. */
.narrow-head > * {
  max-width: calc(var(--measure) + 4rem);
}

.page-title {
  font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 0.75rem;
}

.page-intro {
  color: var(--muted);
  font-size: 1.0625rem;
  margin: 0 0 1rem;
  max-width: var(--measure);
}

.topic-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 40rem;
}

.topic-list li {
  display: flex;
  justify-content: space-between;
  padding-block: 0.9rem;
  border-bottom: 1px dashed var(--rule);
  font-size: 1.125rem;
  font-weight: 600;
}

.topic-list .count {
  color: var(--faint);
  font-weight: 400;
}

.author-links a {
  color: var(--accent);
  margin-right: 1rem;
}

.not-found-mark .logo-mark {
  height: 64px;
  width: auto;
  color: var(--rule-strong);
  margin-bottom: 1rem;
}

/* ---------------------------------------------------------------- Article */

.article-head {
  padding-top: 2.25rem;
}

.article-head > * {
  max-width: 52rem;
}

.article-title {
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0.2rem 0 0.9rem;
  text-wrap: balance;
}

.article-dek {
  font-size: 1.25rem;
  line-height: 1.45;
  color: var(--muted);
  margin: 0 0 1rem;
  max-width: 44rem;
}

.byline {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0;
}

.byline a {
  color: var(--text);
  font-weight: 600;
}

.sponsor-label {
  display: inline-block;
  margin: 0 0 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #231a05;
  background: var(--sponsor);
  padding: 0.2rem 0.5rem;
}

.article-hero {
  margin: 1.75rem auto 0;
}

.article-hero-frame {
  aspect-ratio: 21 / 9;
  overflow: hidden;
  background: var(--surface);
}

.article-hero-frame picture,
.article-hero-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-hero-credit {
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: var(--faint);
}

.article-hero-credit a {
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
}

@media (max-width: 700px) {
  .article-hero {
    padding-inline: 0;
  }
  .article-hero-frame {
    aspect-ratio: 3 / 2;
  }
  .article-hero-credit {
    padding-inline: clamp(1rem, 4vw, 2rem);
  }
}

.article-body > * {
  max-width: var(--measure);
}

.article-body {
  min-width: 0;
  padding-top: 2rem;
  padding-bottom: 1rem;
}

.prose {
  font-family: var(--body-font);
  font-size: 1.25rem;
  line-height: 1.5;
  letter-spacing: -0.003em;
  color: var(--body);
  max-width: var(--measure);
}

.prose-page {
  font-size: 1.0625rem;
}

.prose > * + * {
  margin-top: 1.1em;
}

.prose p {
  margin-bottom: 0;
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgb(156 226 194 / 0.4);
  text-underline-offset: 0.15em;
}

.prose a:hover {
  text-decoration-color: var(--accent);
}

.prose h2,
.prose h3 {
  font-family: var(--sans);
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 0;
}

.prose h2 {
  font-size: 1.45rem;
  margin-top: 2em;
}

.prose h3 {
  font-size: 1.2rem;
  margin-top: 1.6em;
}

.prose h2 + *,
.prose h3 + * {
  margin-top: 0.6em;
}

.prose .anchor {
  display: none;
}

.prose strong {
  color: var(--text);
}

.prose blockquote {
  margin-inline: 0;
  padding-left: 1.1em;
  border-left: 3px solid var(--accent);
  color: var(--text);
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose li + li {
  margin-top: 0.35em;
}

.prose hr {
  border: 0;
  border-top: 1px dashed var(--rule-strong);
  margin-block: 2em;
}

.prose :not(pre) > code {
  background: var(--surface);
  padding: 0.1em 0.3em;
  font-size: 0.82em;
}

.code-block {
  position: relative;
}

.code-lang {
  position: absolute;
  top: 0.4rem;
  right: 0.6rem;
  font: 0.6875rem var(--sans);
  color: var(--faint);
}

.prose pre {
  margin: 0;
  background: #081013;
  border: 1px dashed var(--rule);
  padding: 0.9rem 1rem;
  overflow-x: auto;
  font-size: 0.8125rem;
  line-height: 1.6;
}

.table-wrap {
  overflow-x: auto;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font: 0.875rem/1.45 var(--sans);
}

.prose th,
.prose td {
  text-align: left;
  vertical-align: top;
  padding: 0.55rem 0.6rem;
  border-bottom: 1px dashed var(--rule);
}

.prose th {
  color: var(--text);
  border-bottom-color: var(--rule-strong);
}

.prose figure {
  margin-inline: 0;
}

.prose figcaption {
  font: 0.8125rem var(--sans);
  color: var(--muted);
  margin-top: 0.4rem;
}

.prose aside {
  font: 0.95rem/1.55 var(--sans);
  background: var(--surface);
  padding: 1rem 1.2rem;
}

.editor-flag {
  background: #3a2f12;
  color: var(--flag);
  font: 0.8em var(--sans);
  padding: 0.05em 0.35em;
}

.editor-panel {
  background: #2a2210;
  border-left: 3px solid var(--flag);
  color: #f5e2b0;
  padding: 0.8rem 1rem;
  margin-bottom: 1.75rem;
  max-width: var(--measure);
  font-size: 0.875rem;
}

.editor-panel p {
  margin: 0 0 0.5rem;
}

.editor-panel p:last-child {
  margin-bottom: 0;
}

.sponsor-disclosure {
  border-left: 3px solid var(--sponsor);
  background: #241f13;
  padding: 0.8rem 1rem;
  margin-bottom: 1.75rem;
  max-width: var(--measure);
  font-size: 0.9375rem;
}

.sponsor-disclosure p {
  margin: 0 0 0.4rem;
}

.sponsor-disclosure p:last-child {
  margin: 0;
}

.sponsor-disclosure a {
  color: var(--sponsor);
}

.sources {
  max-width: var(--measure);
  margin-top: 2.5rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

.sources h2 {
  font-size: 0.9375rem;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.sources ol {
  margin: 0;
  padding-left: 1.2rem;
}

.sources li + li {
  margin-top: 0.3rem;
}

.sources a {
  color: var(--accent);
}

.article-foot {
  max-width: var(--measure);
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--rule);
  font-size: 0.875rem;
  color: var(--muted);
}

.share a,
.link-button {
  color: var(--text);
  margin-left: 0.6rem;
}

.link-button {
  font: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.share a:hover,
.link-button:hover {
  color: var(--accent);
}

.author-note a {
  color: var(--text);
  font-weight: 600;
}

/* ---------------------------------------------------------------- Press kit */

.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.brand-tile {
  margin: 0;
  border: 1px dashed var(--rule);
}

.brand-preview {
  display: grid;
  place-items: center;
  height: 150px;
  padding: 1.5rem;
}

.brand-preview svg {
  max-height: 46px;
  width: auto;
}

.brand-dark .brand-preview {
  background: var(--bg);
}

.brand-light .brand-preview {
  background: #ffffff;
}

.brand-tile figcaption {
  padding: 0.7rem 0.8rem;
  font-size: 0.8125rem;
  border-top: 1px dashed var(--rule);
}

.brand-name {
  display: block;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.brand-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.9rem;
}

.brand-downloads a {
  color: var(--accent);
  white-space: nowrap;
}

.swatches {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.swatches li {
  display: grid;
  gap: 0.25rem;
  font-size: 0.8125rem;
}

.swatch {
  width: 96px;
  height: 56px;
  border: 1px solid var(--rule-strong);
}

.swatches code {
  color: var(--muted);
}

/* ---------------------------------------------------------------- Footer */

.site-footer {
  margin-top: 3rem;
  border-top: 1px dashed var(--rule-strong);
  padding-block: 2rem 2.5rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem 2rem;
  align-items: center;
}

.footer-mark {
  color: var(--text);
}

.footer-mark .logo-mark {
  display: block;
  height: 30px;
  width: auto;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  font-size: 0.875rem;
  color: var(--muted);
}

/* Mid-article sponsor slot (configured in src/sponsor.ts), full body width, before the second <h2>. */
.prose .mid-sponsor {
  margin: 2.25em 0;
  padding: 0;
  background: none;
}

.mid-sponsor-label {
  margin: 0 0 0.4rem;
  font: 600 0.6875rem/1 var(--mono, var(--sans));
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.prose .mid-sponsor-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-height: 7.5rem;
  padding: 1.25rem;
  text-align: center;
  border: 1px dashed var(--rule-strong);
  color: var(--text);
  text-decoration: none;
  font: 600 1rem/1.35 var(--sans);
}

.mid-sponsor-sub {
  color: var(--muted);
  font-weight: 400;
}

.mid-sponsor-arrow,
.mid-sponsor-cta {
  margin-top: 0.35rem;
  color: var(--muted);
}

.prose .mid-sponsor-box:hover,
.prose .mid-sponsor-box:focus-visible,
.mid-sponsor-box:hover .mid-sponsor-sub,
.mid-sponsor-box:hover .mid-sponsor-arrow,
.mid-sponsor-box:hover .mid-sponsor-cta,
.mid-sponsor-box:focus-visible .mid-sponsor-sub,
.mid-sponsor-box:focus-visible .mid-sponsor-arrow,
.mid-sponsor-box:focus-visible .mid-sponsor-cta {
  border-color: var(--accent);
  color: var(--accent);
}

.mid-sponsor-banner img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
}

/* Lettermark that closes each article, on its own line after the last paragraph. */
.prose .end-mark-line {
  margin-top: 1.5em;
  line-height: 1;
}

.end-mark {
  display: inline-block;
}

.end-mark .logo-mark {
  display: block;
  height: 1.1rem;
  width: auto;
  color: var(--text);
}

.footer-legal {
  grid-column: 1 / -1;
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
  color: var(--faint);
}

@media (max-width: 560px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------------------- Motion & print */

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .share,
  .related,
  .preview-banner {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  .prose {
    color: #000;
  }
}

/* ---------------------------------------------------------------- Newsletter */

.newsletter {
  margin-top: 3rem;
  border-top: 1px dashed var(--rule-strong);
  background: var(--surface);
}

.newsletter + .site-footer {
  margin-top: 0;
}

.newsletter-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 1.25rem 3rem;
  align-items: center;
  padding-block: 2rem;
}

.newsletter h2 {
  font-size: 1.25rem;
  margin: 0 0 0.35rem;
}

.newsletter-copy p {
  margin: 0;
  color: var(--muted);
  max-width: 34rem;
}

.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.newsletter-form input[type="text"],
.newsletter-form input[type="email"] {
  flex: 1 1 10rem;
  min-width: 0;
  padding: 0.6rem 0.75rem;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--rule-strong);
  border-radius: 0;
}

.newsletter-form input[type="email"] {
  flex-basis: 14rem;
}

.newsletter-form input::placeholder {
  color: var(--faint);
}

.newsletter-form input:focus {
  border-color: var(--accent);
  outline: none;
}

.newsletter-form button {
  padding: 0.6rem 1.1rem;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--bg);
  background: var(--accent);
  border: 0;
  cursor: pointer;
}

.newsletter-form button:hover {
  background: var(--accent-hover);
}

.newsletter-fine {
  flex-basis: 100%;
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: var(--faint);
}

.newsletter-fine a {
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
}

@media (max-width: 760px) {
  .newsletter-inner {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------------------- Author */

.author-photo {
  display: block;
  flex: none;
  max-width: none;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface);
}

/* The link around the photo must never shrink, or the circle turns into an oval. */
.author-card > a {
  flex: none;
  display: block;
  width: 64px;
  height: 64px;
}

.author-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin: 1.25rem 0;
  padding: 1rem 0;
  border-top: 1px dashed var(--rule);
  border-bottom: 1px dashed var(--rule);
}

.author-card .author-photo {
  width: 64px;
  height: 64px;
}

.author-card > div {
  min-width: 0;
}

.author-card p {
  margin: 0;
}

.author-card-name a {
  color: var(--text);
  font-weight: 700;
  font-size: 1rem;
}

.author-card-bio {
  margin-top: 0.2rem !important;
  color: var(--muted);
  font-size: 0.875rem;
}

.author-head .author-photo {
  width: 120px;
  height: 120px;
  margin-bottom: 1.25rem;
}

/* ---------------------------------------------------------------- Article sidebar */

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
}

@media (min-width: 1000px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 3rem;
  }
  .article-rail {
    padding-top: 2rem;
  }
}

.article-rail {
  display: grid;
  gap: 1.75rem;
  align-content: start;
}

.rail-box {
  border-top: 1px dashed var(--rule-strong);
  padding-top: 0.75rem;
}

/* Two dotted CTA boxes under "Follow CRAFT.", full rail width and stacked: contribute and advertise. */
.rail-ctas {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.rail-cta {
  min-height: 7.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem;
  text-align: center;
  border: 1px dashed var(--rule-strong);
  color: var(--text);
  text-decoration: none;
  font: 600 0.875rem/1.3 var(--sans);
}

.rail-cta-sub {
  color: var(--muted);
  font-weight: 400;
}

.rail-cta-arrow {
  margin-top: 0.35rem;
  color: var(--muted);
}

.rail-cta:hover,
.rail-cta:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.rail-cta:hover .rail-cta-sub,
.rail-cta:hover .rail-cta-arrow,
.rail-cta:focus-visible .rail-cta-sub,
.rail-cta:focus-visible .rail-cta-arrow {
  color: var(--accent);
}

.rail-title {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.6rem;
}

.rail-text {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.rail-newsletter {
  background: var(--surface);
  border-top-color: var(--accent);
  padding: 0.9rem 1rem 1rem;
}

.newsletter-form.is-compact input[type="email"] {
  flex-basis: 100%;
}

.newsletter-form.is-compact button {
  flex-basis: 100%;
}

.share-buttons,
.follow-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pill {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  font: 600 0.8125rem var(--sans);
  color: var(--text);
  background: transparent;
  border: 1px solid var(--rule-strong);
  cursor: pointer;
}

.pill:hover {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}

.pill.is-placeholder {
  opacity: 0.6;
  cursor: default;
}

.trending {
  list-style: none;
  counter-reset: trend;
  margin: 0;
  padding: 0;
}

.trending li {
  counter-increment: trend;
  display: grid;
  grid-template-columns: 1.75rem minmax(0, 1fr);
  padding-block: 0.65rem;
  border-bottom: 1px dashed var(--rule);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
}

.trending li:last-child {
  border-bottom: 0;
}

.trending li::before {
  content: counter(trend);
  color: var(--accent);
  font-weight: 700;
}

.trending .flags {
  grid-column: 2;
  margin: 0.3rem 0 0;
}

/* The sidebar newsletter only shows on wide screens; the footer signup covers small ones. */
@media (max-width: 999px) {
  .rail-newsletter {
    display: none;
  }
}


/* ---------------------------------------------------------------- Blueprint details */

/* Small "+" registration marks where the main rules meet the page grid. */
.topic-nav,
.newsletter-inner,
.footer-inner {
  position: relative;
}

.topic-nav::before,
.topic-nav::after,
.newsletter-inner::before,
.newsletter-inner::after,
.footer-inner::before,
.footer-inner::after {
  content: "+";
  position: absolute;
  font: 400 13px/1 var(--mono);
  color: var(--faint);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* The topic bar spans the viewport (its inner row scrolls), so place its marks on the page grid. */
.topic-nav::before,
.topic-nav::after {
  top: 100%;
  z-index: 1;
}

.topic-nav::before {
  left: calc(max(0px, (100% - var(--max)) / 2) + var(--gutter));
}

.topic-nav::after {
  left: calc(100% - max(0px, (100% - var(--max)) / 2) - var(--gutter));
}

.newsletter-inner::before,
.newsletter-inner::after,
.footer-inner::before,
.footer-inner::after {
  top: 0;
}

.newsletter-inner::before,
.footer-inner::before {
  left: var(--gutter);
}

.newsletter-inner::after,
.footer-inner::after {
  left: calc(100% - var(--gutter));
}

/* The topic bar scrolls on phones; keep its marks out of the scroll area there. */


/* Dashed frames around large images, offset like a drawing's construction lines. */
.lead-media,
.article-hero-frame {
  outline: 1px dashed var(--rule-strong);
  outline-offset: 5px;
}

.article-hero-frame {
  overflow: hidden;
}

@media (max-width: 700px) {
  .article-hero-frame {
    outline: 0;
  }
}

/* ---------------------------------------------------------------- End-of-article bylines */

.byline-block {
  margin: 1.5rem 0 0;
}

.byline-block + .byline-block {
  margin-top: 1rem;
}

.byline-label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.byline-block .author-card {
  margin-top: 0.5rem;
}

.profile-card + .profile-card {
  margin-top: 0;
  border-top: none;
}

.profile-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  color: var(--text);
  border: 1px solid var(--rule-strong);
}

.profile-card-role {
  margin-top: 0.15rem !important;
  font-size: 0.875rem;
  color: var(--text);
}

/* ---------------------------------------------------------------- Lead paragraph + drop cap (articles only) */

/* The opening paragraph reads as a lead: larger, brighter, slightly heavier (after LeadDev). */
.article-body .prose > p:first-child {
  font-size: 1.5rem;
  line-height: 1.38;
  font-weight: 500;
  letter-spacing: -0.012em;
  color: var(--text);
}

.article-body .prose > p:first-child + * {
  margin-top: 1.4em;
}

.article-body .prose > p:first-child::first-letter {
  float: left;
  margin: 0.05em 0.1em 0 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 2.55em;
  line-height: 0.85;
  color: var(--accent);
}

@supports (initial-letter: 2) or (-webkit-initial-letter: 2) {
  .article-body .prose > p:first-child::first-letter {
    float: none;
    margin: 0 0.12em 0 0;
    font-size: 1em;
    line-height: inherit;
    -webkit-initial-letter: 2;
    initial-letter: 2;
  }
}

@media (max-width: 640px) {
  .prose {
    font-size: 1.125rem;
  }
  .article-body .prose > p:first-child {
    font-size: 1.3rem;
  }
}

@media print {
  .article-body .prose > p:first-child::first-letter {
    color: #000;
  }
  .article-body .prose > p:first-child {
    color: #000;
  }
}


/* ---------------------------------------------------------------- Signup popup */

.signup-popup {
  width: min(92vw, 30rem);
  max-height: calc(100dvh - 2rem);
  padding: 0;
  overflow: auto;
  color: var(--text);
  background: var(--bg);
  border: 1px dashed var(--rule-strong);
  outline: 1px solid var(--rule);
  outline-offset: 6px;
}

.signup-popup::backdrop {
  background: rgb(5 9 11 / 0.72);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.signup-popup[open] {
  animation: popup-in 220ms ease-out;
}

@keyframes popup-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.popup-inner {
  position: relative;
  padding: 2rem 1.75rem 1.5rem;
}

.popup-close {
  position: absolute;
  top: 0.6rem;
  right: 0.7rem;
  width: 2rem;
  height: 2rem;
  font: 400 1.5rem/1 var(--sans);
  color: var(--muted);
  background: none;
  border: 0;
  cursor: pointer;
}

.popup-close:hover {
  color: var(--text);
}

.popup-brand {
  color: var(--text);
  margin-bottom: 1.5rem;
}

.popup-brand .logo-wordmark {
  height: 20px;
}

.popup-title {
  margin: 0 0 0.6rem;
  line-height: 1.1;
}

.popup-kicker {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.popup-report {
  display: block;
  font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--text);
}

.popup-report .t-agentic {
  color: var(--accent);
}

.popup-report .t-craft {
  color: #ffffff;
}

.popup-tagline {
  margin: 0 0 1.25rem;
  font-size: 1.0625rem;
  color: var(--body);
}

.signup-popup .newsletter-form input[type="email"] {
  padding: 0.75rem 0.85rem;
  font-size: 1rem;
}

.signup-popup .newsletter-form button {
  padding: 0.75rem 1rem;
  font-size: 1rem;
}

.popup-season {
  margin: 1.25rem 0 0;
  padding-top: 1rem;
  border-top: 1px dashed var(--rule);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  .signup-popup[open] {
    animation: none;
  }
}

/* ---------------------------------------------------------------- Social icons beside names */

.author-card > div {
  flex: 1 1 auto;
}

.card-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 0.75rem;
  flex-wrap: wrap;
}

.social-icons {
  display: inline-flex;
  gap: 0.15rem;
  flex: none;
}

.social-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: var(--muted);
  font: 700 10px/1 var(--sans);
  letter-spacing: 0;
  text-decoration: none;
}

.social-icon:hover,
.social-icon:focus-visible {
  color: var(--accent);
}

.social-icon svg {
  display: block;
}

.social-icon img {
  width: 12px;
  height: 12px;
  display: block;
}

.social-badge {
  font-weight: 700;
}

.social-bluesky .social-badge {
  font-size: 8.5px;
}

/* ---------------------------------------------------------------- Coming soon (pre-launch overlay) */

html.cs-on:not(.cs-unlocked) body {
  overflow: hidden;
}

.coming-soon {
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow-y: auto;
  background: rgba(11, 17, 20, 0.55);
  -webkit-backdrop-filter: blur(28px);
  backdrop-filter: blur(28px);
  transition: opacity 0.7s ease;
}

.coming-soon.is-leaving {
  opacity: 0;
}

.cs-unlocked .coming-soon {
  display: none;
}

.cs-inner {
  box-sizing: border-box;
  max-width: 600px;
  margin: 0 auto;
  min-height: 100%;
  padding: 40px 24px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
}

.cs-head p,
.cs-card p,
.cs-foot p,
.cs-promise {
  margin: 0;
}

.cs-eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.cs-wordmark {
  margin: 12px 0;
  color: var(--text);
}

.cs-wordmark .logo-wordmark {
  width: clamp(220px, 70vw, 340px);
  height: auto;
}

.cs-lede {
  max-width: 520px;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--body);
}

.cs-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 26px 28px;
  background: rgba(18, 28, 32, 0.92);
  border: 1px solid var(--rule);
}

.cs-kicker {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: -10px !important;
}

.cs-report {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.cs-report .t-agentic {
  color: var(--accent);
}

.cs-tagline {
  margin-top: -10px !important;
  font-size: 1rem;
  color: var(--accent);
}

.cs-card .newsletter-form {
  gap: 12px;
}

.cs-card .newsletter-form.is-compact input[type="email"] {
  flex: 1 1 240px;
  height: 44px;
  padding: 0 14px;
  font-size: 0.9375rem;
}

.cs-card .newsletter-form.is-compact button {
  flex: 0 0 auto;
  height: 44px;
  padding: 0 22px;
  font-size: 0.9375rem;
}

.newsletter-form.is-done > :not(.newsletter-thanks) {
  display: none;
}

.newsletter-thanks {
  flex-basis: 100%;
  margin: 0;
  padding: 12px 16px;
  border: 1px solid var(--accent);
  font-weight: 600;
}

.newsletter-status {
  flex-basis: 100%;
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--body);
}

.cs-season {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--body);
}

.cs-launch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem;
  font-weight: 600;
}

.cs-date {
  padding: 4px 10px;
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--bg);
  background: var(--accent);
}

.cs-unsub {
  align-self: flex-end;
  margin-top: -8px !important;
  font-size: 0.6875rem;
  color: var(--muted);
}

.cs-promise {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--text);
}

.cs-promise span {
  color: var(--accent);
}

.cs-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 24px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}

.cs-editor {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cs-editor img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--rule-strong);
}

.cs-name {
  font-weight: 600;
}

.cs-name {
  font-size: 0.9375rem;
}

.cs-role,
.cs-feature {
  font-size: 0.8125rem;
  color: var(--muted);
}

.cs-feature {
  max-width: 300px;
  line-height: 1.5;
}

.cs-feature a {
  color: var(--accent);
}

/* The sneak-peek corner: a dog-ear that peels toward the top left, black underneath. */
.cs-peek {
  position: fixed;
  right: 0;
  bottom: 0;
  z-index: 1001;
  width: 34px;
  height: 34px;
  transition: width 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), height 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cs-peek.is-open {
  width: 240px;
  height: 240px;
}

.cs-peek.is-pass {
  width: 320px;
  height: 320px;
}

.cs-peek-under {
  position: absolute;
  inset: 0;
  background: #000;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.cs-peek-flap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  filter: drop-shadow(-6px -6px 14px rgba(0, 0, 0, 0.5));
}

.cs-peek-flap div {
  width: 100%;
  height: 100%;
  clip-path: polygon(0 0, 100% 0, 0 100%);
  background: linear-gradient(135deg, #121c20 0%, #2f3f3c 30%, #7d908a 47%, #b9cac3 50%, transparent 50%);
}

.cs-peek-hit {
  position: absolute;
  inset: 0;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.cs-peek.is-open .cs-peek-hit {
  display: none;
}

.cs-peek-panel {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 172px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  text-align: right;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}

.cs-peek.is-open .cs-peek-panel {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease 0.2s, visibility 0s;
}

.cs-peek-panel p {
  margin: 0;
}

.cs-peek-label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.cs-peek-open {
  height: 34px;
  padding: 0 12px;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--rule-strong);
  cursor: pointer;
}

.cs-peek-open:hover {
  border-color: var(--accent);
}

.cs-peek-form {
  display: flex;
  gap: 6px;
}

.cs-peek-form[hidden],
.cs-peek-open[hidden] {
  display: none;
}

.cs-peek-form input {
  box-sizing: border-box;
  width: 124px;
  height: 34px;
  padding: 0 10px;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--rule-strong);
  border-radius: 0;
}

.cs-peek-form input:focus {
  border-color: var(--accent);
  outline: none;
}

.cs-peek-form button {
  width: 34px;
  height: 34px;
  font-weight: 600;
  color: var(--bg);
  background: var(--accent);
  border: 0;
  cursor: pointer;
}

.cs-peek-error {
  font-size: 0.75rem;
  color: var(--sponsor);
}

.cs-exit {
  display: none;
}

.cs-unlocked .cs-exit {
  display: block;
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  height: 36px;
  padding: 0 14px;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: #000;
  border: 1px solid var(--rule-strong);
  cursor: pointer;
}

@media (max-height: 760px) and (min-width: 561px) {
  .cs-inner {
    padding-top: 24px;
    gap: 16px;
  }
  .cs-wordmark .logo-wordmark {
    width: 280px;
  }
  .cs-card {
    gap: 12px;
    padding: 20px 24px;
  }
}

@media (max-width: 560px) {
  .cs-inner {
    padding-top: 32px;
  }
  .cs-card {
    padding: 22px;
  }
  .cs-card .newsletter-form.is-compact button {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .coming-soon,
  .cs-peek,
  .cs-peek-panel,
  .cs-peek.is-open .cs-peek-panel {
    transition: none;
  }
}

/* "Featuring …" line under the author/date in story lists and the article header. */
.meta-featuring,
.byline-featuring {
  margin-top: 0.2rem;
}

/* About page: wordmark and tagline above the title */
.about-brand {
  margin: 0 0 2rem;
}

.about-brand .logo-wordmark {
  height: clamp(40px, 8vw, 64px);
  color: var(--text);
}

.about-tagline {
  margin: 0.9rem 0 0;
  font-family: var(--mono);
  font-size: 0.9375rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* About page: Who's involved */
.whos-involved {
  margin-top: 3rem;
}

.whos-involved .byline-block:first-of-type {
  margin-top: 1.25rem;
}

.featured-in {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}
