/* /news styles — marketing dialect per design.md. Values come from
 * design/tokens.css (copied to /assets/tokens.css at build, loaded before this
 * file; body carries .plane-marketing). The article layout is the studio
 * ArticleSpecimen (design/studio/src/marketing/article.css). The white/black
 * rgba shadow + sheen recipes stay literal per the port rules. */

/* ─── Fonts (self-hosted, variable) ─── */
@font-face {
  font-family: 'Manrope Variable';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/assets/fonts/manrope-latin-wght-normal.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Newsreader Variable';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/assets/fonts/newsreader-latin-wght-normal.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Newsreader Variable';
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url('/assets/fonts/newsreader-latin-wght-italic.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
}

/* ─── Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
.wrap {
  max-width: 760px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* Squircle corners (progressive enhancement, as on landing) */
@supports (corner-shape: superellipse(1)) {
  .squircle { corner-shape: superellipse(1.8); }
  .pill { corner-shape: superellipse(2.2); }
}

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

/* ─── Header — brand pill (serif wordmark, black ink on the accent fill) ─── */
.site-head {
  border-bottom: 1px solid var(--line);
}
.head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 16px;
}
.brand-pill {
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius-pill);
  padding: 8px 16px 9px; /* optical centering: serif sits high in its box */
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform calc(0.2s * var(--motion-scale)) var(--ease);
}
.brand-pill:hover { transform: translateY(-1px); }
.brand-pill:active { transform: scale(0.96); }

.head-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
.head-nav > a {
  font-size: 14px;
  font-weight: 550;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color calc(0.2s * var(--motion-scale)) var(--ease);
}
.head-nav > a:hover { color: var(--ink); }

/* mk-btn-dark, from the studio marketing chrome */
.btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 550;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  min-height: 40px;
  padding: 11px 18px 11px 20px; /* icon side = text side − 2px */
  border: 1px solid rgba(0, 0, 0, 0.9);
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #fff; /* tokenized: btn-dark port literal (studio marketing.css) */
  white-space: nowrap;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 14px 30px -24px rgba(0, 0, 0, 0.68);
  transition:
    transform calc(0.2s * var(--motion-scale)) var(--ease),
    background calc(0.2s * var(--motion-scale)) var(--ease),
    box-shadow calc(0.2s * var(--motion-scale)) var(--ease);
}
.btn-dark:hover {
  background: #0b0b0d; /* tokenized: btn-dark port literal (studio marketing.css) */
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.16) inset,
    0 20px 38px -26px rgba(0, 0, 0, 0.74);
}
.btn-dark:active {
  transform: scale(0.96);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 8px 18px -18px rgba(0, 0, 0, 0.64);
}
.btn-arrow {
  display: inline-flex;
  width: 1em;
  height: 1em;
  opacity: 0.72;
  transition:
    opacity calc(0.2s * var(--motion-scale)) var(--ease),
    transform calc(0.2s * var(--motion-scale)) var(--ease);
}
.btn-dark:hover .btn-arrow {
  opacity: 1;
  transform: translateX(2px);
}

main { padding-block: 56px 88px; }

/* ─── Shared bits ─── */
.kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 14px;
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-tertiary);
}
.post-meta .author {
  color: var(--ink-soft);
  font-weight: 500;
}
.post-meta .lang-alt {
  color: var(--ink-soft);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.post-meta .lang-alt:hover { color: var(--ink); }

/* Category chips — the marketing pastel set, decorative on this plane. */
.chip {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  color: var(--ink);
  padding: 6px 10px;
  border-radius: var(--radius-pill);
}
.chip-c1 { background: color-mix(in srgb, var(--c1) 32%, white); }
.chip-c2 { background: color-mix(in srgb, var(--c2) 32%, white); }
.chip-c3 { background: color-mix(in srgb, var(--c3) 32%, white); }
.chip-c4 { background: color-mix(in srgb, var(--c4) 32%, white); }
.chip-c5 { background: color-mix(in srgb, var(--c5) 32%, white); }
.chip-c6 { background: color-mix(in srgb, var(--c6) 32%, white); }

/* ─── Index — Anthropic-news-inspired: featured entry, then a dated list ─── */
.news-head h1 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(32px, 3vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  text-wrap: balance;
}
.news-head .lede {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 56ch;
}

.featured {
  display: block;
  text-decoration: none;
  color: inherit;
  margin-top: 44px;
  padding: 28px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  transition:
    transform calc(0.2s * var(--motion-scale)) var(--ease),
    box-shadow calc(0.2s * var(--motion-scale)) var(--ease);
}
.featured:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-pop);
}
.featured h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.18;
  letter-spacing: -0.018em;
  margin: 16px 0 10px;
  text-wrap: balance;
}
.featured-excerpt {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: 14px;
  max-width: 62ch;
}

.news-list {
  list-style: none;
  margin-top: 20px;
}
.news-list li + li { border-top: 1px solid var(--line); }
.news-list a {
  display: grid;
  grid-template-columns: 120px auto 1fr;
  align-items: baseline;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  padding: 20px;
  margin-inline: -20px;
  border-radius: var(--radius-sm);
  transition: background calc(0.2s * var(--motion-scale)) var(--ease);
}
.news-list a:hover { background: var(--select-bg); }
.news-list time {
  font-size: 14px;
  color: var(--ink-tertiary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.news-list h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.012em;
  line-height: 1.3;
}

.empty-note {
  margin-top: 44px;
  font-size: 15px;
  color: var(--ink-soft);
}
.empty-note a { color: inherit; }

/* ─── Article — the studio ArticleSpecimen, verbatim dialect ─── */
.article {
  max-width: 68ch;
  margin-inline: auto;
}
.article h1 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(32px, 3vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 16px;
  text-wrap: balance;
}
.article .post-meta { margin: 0 0 36px; }

.article-body p {
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: -0.008em;
  text-wrap: pretty;
  color: var(--ink);
  margin: 0 0 22px;
}
.article-body a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color calc(0.15s * var(--motion-scale)) var(--ease);
}
.article-body a:hover { text-decoration-color: var(--ink); }

/* Drop cap — serif, spans ~3 lines of the 17px/1.7 body. */
.article-body > p:first-of-type::first-letter {
  float: left;
  font-family: var(--font-serif);
  font-size: 3.6em;
  line-height: 0.78;
  padding: 0.08em 0.14em 0 0;
  color: var(--ink);
}

.article-body h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 40px 0 12px;
  text-wrap: balance;
}
.article-body h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 30px 0 10px;
}

.article-body ul,
.article-body ol {
  margin: 0 0 22px;
  padding-left: 26px;
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: -0.008em;
}
.article-body li { margin: 6px 0; }
.article-body li p { margin: 0; }

/* Pull quote — serif italic between hairline rules */
.article-body blockquote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 26px;
  line-height: 1.4;
  letter-spacing: 0;
  color: var(--ink);
  text-wrap: balance;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 26px 0;
  margin: 38px 0;
}
.article-body blockquote p {
  font: inherit;
  color: inherit;
  margin: 0;
}
.article-body blockquote p + p { margin-top: 14px; }

/* Figures */
.article-body figure { margin: 38px 0; }
.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}
.article-body figcaption {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-tertiary);
}

/* Machine text */
.article-body code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 6px;
}
.article-body pre {
  margin: 0 0 22px;
  padding: 18px 20px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
}
.article-body pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

/* Ledger-grade tables */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 22px;
  font-size: 15px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.article-body th {
  text-align: left;
  font-weight: 600;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line-strong);
  padding: 8px var(--cell-pad-x);
}
.article-body td {
  border-bottom: 1px dotted var(--grid-line);
  padding: 8px var(--cell-pad-x);
}

.article-body hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 38px 0;
}

/* ─── Post foot — back link + the one CTA ─── */
.post-foot {
  max-width: 68ch;
  margin: 56px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.post-foot .back {
  font-size: 14px;
  font-weight: 550;
  color: var(--ink-soft);
  text-decoration: none;
}
.post-foot .back:hover { color: var(--ink); }
.post-cta {
  margin-top: 20px;
  padding: 20px 22px;
  background: var(--surface);
  border-radius: var(--radius-md);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.post-cta strong { color: var(--ink); }
.post-cta a { color: inherit; }

/* ─── Footer ─── */
.site-foot { border-top: 1px solid var(--line); }
.foot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-block: 22px 30px;
  font-size: 13px;
  color: var(--ink-tertiary);
}
.foot-nav { display: flex; gap: 18px; }
.foot-nav a {
  color: var(--ink-soft);
  text-decoration: none;
}
.foot-nav a:hover { color: var(--ink); }

/* ─── Small screens ─── */
@media (max-width: 640px) {
  .news-head h1, .article h1 { font-size: 30px; }
  .featured { padding: 22px; }
  .news-list a {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .article-body p, .article-body ul, .article-body ol { font-size: 16px; }
  .article-body blockquote { font-size: 22px; }
  .head-nav > a.site-link { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ─── Subscribe box ─── */
.subscribe {
  max-width: 68ch;
  margin: 56px auto 0;
  padding: 24px 26px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}
.subscribe h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.012em;
}
.subscribe > p {
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.subscribe form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.subscribe input[type="email"] {
  flex: 1 1 240px;
  min-height: 40px;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}
.subscribe input[type="email"]::placeholder { color: var(--ink-tertiary); }
.nl-status {
  margin-top: 10px;
  font-size: 14px;
  color: var(--ink-soft);
}
.nl-status:empty { display: none; }
.nl-note {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--ink-tertiary);
}
.nl-note a { color: inherit; }
