/* AI × HI — The Symbiotic Mind
   Design pass v1 — editorial, reading-first
   References: Craig Mod (primary), Aeon Magazine (secondary)
   ---------------------------------------------------------- */

/* Fonts are loaded via a <link> in base.njk's <head> (not @import here):
   @import render-blocks and serializes style.css → font CSS → woff2. */

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

:root {
  /* Palette */
  --ink:        #141414;
  --ink-muted:  #6b6b6b;
  --ink-faint:  #a89e92;
  --paper:      #f6f2ea;
  --paper-off:  #ece6db;
  --border:     #e2dccf;
  --accent:       #7a1f1f; /* oxblood */
  --accent-hover: #5a1515;

  /* Typography */
  --serif:      'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans:       'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  /* Layout */
  --prose:      680px;
  --gap:        2rem;

  --gradient-pride: linear-gradient(90deg, #e40303, #ff8c00, #c8a200, #008026, #004dff, #750787);
}

/* Pride — year-round allyship signal in the footer (remove this block + the footer line to retire) */
.pride-signal {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  background: var(--gradient-pride);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Base ──────────────────────────────────────────────── */

html {
  font-size: 19px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--serif);
  font-feature-settings: "kern", "liga", "onum";
  font-optical-sizing: auto;
  background: var(--paper);
  background-image:
    radial-gradient(circle at 20% 10%, rgba(0,0,0,0.015), transparent 60%),
    radial-gradient(circle at 80% 90%, rgba(0,0,0,0.02), transparent 55%);
  color: var(--ink);
  line-height: 1.75;
  padding: 0 1.5rem;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(20, 20, 20, 0.35);
  transition: color 0.15s, text-decoration-color 0.15s;
}

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

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

/* ── The × mark — signature detail ─────────────────────── */

.times-mark {
  font-family: var(--sans);
  font-weight: 400;
  color: var(--ink-muted);
  letter-spacing: 0.05em;
}

/* ── Header ─────────────────────────────────────────────── */

.site-header {
  max-width: var(--prose);
  margin: 0 auto;
  padding: 2.5rem 0 1.75rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.site-logo {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  display: inline-flex;
  gap: 0.35ch;
  align-items: baseline;
}

.site-logo:hover { color: var(--ink); opacity: 0.65; }

.site-logo .logo-mark {
  color: var(--ink-muted);
  transition: transform 0.4s ease, color 0.3s ease;
  display: inline-block;
}

.site-logo:hover .logo-mark {
  transform: rotate(90deg);
  color: var(--accent);
}

nav {
  font-family: var(--sans);
  font-size: 0.82rem;
}

nav a {
  margin-left: 1.75rem;
  text-decoration: none;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}

nav a:hover {
  color: var(--ink);
  text-decoration: none;
}

nav a.active { color: var(--ink); }

/* ── Main column ─────────────────────────────────────────── */

main {
  max-width: var(--prose);
  margin: 0 auto;
  padding: 3.5rem 0 6rem;
}

/* ── Footer ─────────────────────────────────────────────── */

.site-footer {
  max-width: var(--prose);
  margin: 0 auto;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--border);
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--ink-faint);
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 720px) {
  .site-footer {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-start;
}

.footer-title { color: var(--ink-muted); }
.footer-sub { color: var(--ink-faint); }

/* ── Home — Hero ─────────────────────────────────────────── */

.hero {
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}

.hero-eyebrow {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

.hero h1 em {
  font-style: italic;
}

.hero-sub {
  font-size: 1rem;
  color: var(--ink-muted);
  max-width: 520px;
  line-height: 1.65;
}

/* ── Anchor quote ─────────────────────────────────────────── */

.anchor-quote {
  margin: 4rem auto;
  padding: 0;
  border-left: none;
  max-width: 560px;
  text-align: center;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-style: italic;
  color: var(--ink);
  line-height: 1.5;
}

.anchor-quote::before,
.anchor-quote::after {
  content: "";
  display: block;
  width: 40%;
  margin: 0 auto;
  border-top: 1px solid var(--ink);
}

.anchor-quote::before { margin-bottom: 1.75rem; }
.anchor-quote::after { margin-top: 1.75rem; }

/* ── Authors strip ────────────────────────────────────────── */

.authors-strip {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}

.author {
  flex: 1;
  padding: 1.5rem;
}

.author-name {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.author-role {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

.author-divider {
  width: 1px;
  background: var(--border);
  align-self: stretch;
  min-height: 3rem;
}

/* ── Latest posts (home) ──────────────────────────────────── */

.section-label {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  margin-bottom: 1.5rem;
  margin-top: 3rem;
}

.coming-soon {
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--ink-faint);
  font-style: italic;
}

/* ── Post list ────────────────────────────────────────────── */

.posts-header {
  margin-bottom: 2.5rem;
}

.posts-header h1 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--ink);
}

.post-list {
  list-style: none;
}

.post-list li {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.post-list li:first-child {
  border-top: 1px solid var(--border);
}

.post-meta {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--ink-faint);
  letter-spacing: 0.03em;
  margin-bottom: 0.4rem;
}

.post-list h2 {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 0.4rem;
  line-height: 1.4;
}

.post-list h2 a {
  text-decoration: none;
  color: inherit;
}

.post-list h2 a:hover {
  color: var(--accent);
}

.post-excerpt {
  font-size: 0.9rem;
  color: var(--ink-muted);
  line-height: 1.6;
}

/* ── Individual post ──────────────────────────────────────── */

.post-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.post-header .post-meta {
  margin-bottom: 1rem;
}

.post-header h1 {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 1rem;
}

.post-header .post-deck {
  font-size: 1.05rem;
  color: var(--ink-muted);
  font-style: italic;
  line-height: 1.65;
}

.post-body {
  font-size: 1rem;
  line-height: 1.8;
}

.post-body p {
  margin-bottom: 1.4rem;
}

.post-body h2 {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 2.5rem 0 0.75rem;
  color: var(--ink);
}

.post-body blockquote {
  margin: 2rem 0;
  padding: 1.25rem 0 1.25rem 1.5rem;
  border-left: 2px solid var(--border);
  font-style: italic;
  color: var(--ink-muted);
}

/* ── Video retell ─────────────────────────────────────────── */

.video-retell {
  margin: 3rem 0 0;
  padding: 2rem 0 0;
  border-top: 1px solid var(--border);
}

.video-retell-caption {
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--ink-muted);
  line-height: 1.65;
  margin-bottom: 1.25rem;
  font-style: italic;
}

.video-retell-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  border-radius: 4px;
  overflow: hidden;
  background: var(--paper-off);
  box-shadow: 0 1px 4px 0 rgba(63, 69, 81, 0.08);
}

.video-retell-frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-retell-frame-pending {
  background:
    repeating-linear-gradient(
      135deg,
      var(--paper-off),
      var(--paper-off) 12px,
      var(--border) 12px,
      var(--border) 13px
    );
}

.video-retell-pending-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink-muted);
  background: var(--paper);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  box-shadow: 0 1px 4px 0 rgba(63, 69, 81, 0.08);
}

/* ── Post credit / colophon ───────────────────────────────── */

.post-credit {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--ink-muted);
  line-height: 1.6;
}

.post-credit strong {
  color: var(--ink);
  font-weight: 600;
}

.me-ai {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink-muted);
  line-height: 1.7;
}

.me-ai strong { color: var(--ink); font-weight: 600; }

/* ── About ────────────────────────────────────────────────── */

.about-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.about-header h1 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.about-header .about-sub {
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.about-body p {
  margin-bottom: 1.4rem;
  color: var(--ink);
}

.about-body h2 {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 2.5rem 0 0.75rem;
}

/* ── Author link ─────────────────────────────────────────── */

.author-link {
  margin-top: 0.35rem;
  font-family: var(--sans);
  font-size: 0.78rem;
}

/* ── Homepage post teaser ────────────────────────────────── */

.homepage-post {
  max-width: var(--prose);
  margin: 0 auto;
}

.homepage-post .post-meta {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 0.4rem;
}

.homepage-post h2 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.25;
}

/* ── LinkedIn preview section ────────────────────────────── */

.linkedin-preview {
  max-width: var(--prose);
  margin: 4rem auto 2rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.linkedin-preview-label {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 2rem;
}

.linkedin-post {
  background: var(--paper-off);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
}

.linkedin-post-header {
  margin-bottom: 1.25rem;
}

.linkedin-post-author {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}

.linkedin-post-role {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--ink-muted);
  margin-top: 0.2rem;
}

.linkedin-post-body p {
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 0.75rem;
  color: var(--ink);
}

.linkedin-post-body p:last-child {
  margin-bottom: 0;
}

.linkedin-credit {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin-top: 1rem !important;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 640px) {
  html { font-size: 17px; }
  .hero h1 { font-size: 1.9rem; }
  .authors-strip { flex-direction: column; gap: 1.25rem; }
  .author { padding: 0; }
  .author-divider { display: none; }
}

/* ── Post cover ──────────────────────────────────────────── */

.post-cover {
  margin: 0 0 2.5rem;
  padding: 0;
  overflow: hidden;
}

.post-cover img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

/* ── RSS link ────────────────────────────────────────────── */

.rss-link {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: #e07020;
  text-decoration: none;
  border: 1px solid rgba(224, 112, 32, 0.35);
  border-radius: 3px;
  padding: 2px 6px;
  white-space: nowrap;
  align-self: flex-start;
}

.rss-link:hover {
  color: #c05010;
  border-color: rgba(192, 80, 16, 0.5);
  text-decoration: none;
}

/* ── Comments ────────────────────────────────────────────── */

.post-comments {
  max-width: var(--prose);
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border, #e5e7eb);
}

/* -------------------------------------------------------------------------- */
/* Additions for: newsletter, author/tag pages, search, accessibility helpers */
/* These styles are append-only and namespaced; original rules are untouched. */
/* -------------------------------------------------------------------------- */

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.newsletter {
  max-width: 640px;
  margin: 4rem auto 2rem;
  padding: 2rem;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 4px;
  background: rgba(0,0,0,0.02);
}
.newsletter-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  opacity: 0.7;
  margin: 0 0 0.5rem;
}
.newsletter-title { margin: 0 0 0.5rem; font-size: 1.25rem; }
.newsletter-sub { margin: 0 0 1rem; opacity: 0.8; }
.newsletter-form {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-bottom: 1rem;
}
.newsletter-form input[type="email"] {
  flex: 1 1 220px;
  padding: 0.6rem 0.75rem;
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 3px;
  font: inherit;
}
.newsletter-form button {
  padding: 0.6rem 1rem;
  border: 0;
  border-radius: 3px;
  background: #111;
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.newsletter-provider { font-size: 0.75rem; opacity: 0.6; margin: 0; flex-basis: 100%; }

.post-tags { margin: 2rem 0 1rem; }
.post-tag {
  display: inline-block;
  margin-right: 0.5rem;
  font-size: 0.85rem;
  opacity: 0.75;
  text-decoration: none;
}
.post-tag:hover { opacity: 1; }

.post-reply {
  margin: 1rem 0 3rem;
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Pagefind UI tuning */
#search { margin: 2rem 0 4rem; }
.pagefind-ui { --pagefind-ui-primary: #111; --pagefind-ui-text: #111; }

.heading-anchor {
  color: inherit;
  text-decoration: none;
}
.heading-anchor:hover { text-decoration: underline; }

/* ── Substack embed (newsletter provider "substack", 2026-06-11) ── */
.newsletter-form-substack { display: block; }
.newsletter-substack-frame {
  width: 100%;
  max-width: 480px;
  height: 150px;
  border: 0;
  background: transparent;
}

/* ── /start-here doors (reach plan Track B2, 2026-06-11) ── */
.start-doors {
  display: grid;
  gap: 1.25rem;
  margin: 2rem 0;
}
.start-door {
  display: block;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border, #e2e2e2);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease;
}
.start-door:hover { border-color: var(--accent, #888); }
.start-door h3 { margin: 0.25rem 0 0.5rem; }
.start-door .post-excerpt { margin: 0; }
.start-all { margin: 1.5rem 0 2.5rem; }

/* ── Related essays (curated cluster links, 2026-06-11) ── */
.related-item { margin-bottom: 1rem; }
.related-item:last-child { margin-bottom: 0; }
.related-item h3 { margin: 0.15rem 0 0; }

/* -------------------------------------------------------------------------- */
/* Editorial refresh (2026-06-12): post header, drop cap, reading progress,   */
/* accessibility. Append-only.                                                */
/* -------------------------------------------------------------------------- */

/* ── Post header — kicker, display title, deck, byline ───── */

.post-kicker {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.post-header .post-byline {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-top: 1.25rem;
}

.post-byline a {
  color: inherit;
  text-decoration: none;
}

.post-byline a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

.byline-sep {
  margin: 0 0.4rem;
  color: var(--ink-faint);
}

/* ── Drop cap (opt-out via `dropCap: false` frontmatter) ──── */

.post-body > p:first-of-type::first-letter {
  float: left;
  font-family: var(--serif);
  font-size: 4.2rem;
  line-height: 0.85;
  padding: 0.35rem 0.6rem 0 0;
  font-weight: 600;
  color: var(--ink);
}

.post-body.no-dropcap > p:first-of-type::first-letter {
  all: unset;
}

/* ── Accessibility — reduced motion ───────────────────────── */

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

/* ── Reading progress bar (CSS-only, scroll-driven) ───────── */

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: var(--accent);
  z-index: 50;
}

@supports (animation-timeline: scroll()) {
  .reading-progress {
    animation: progress linear;
    animation-timeline: scroll(root);
  }
  @keyframes progress {
    to { transform: scaleX(1); }
  }
}

/* ── AI×HI Diagnostic (/diagnostic/, 2026-06-12) ──────────── */

.diagnostic-privacy {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin-top: 0.75rem;
}

.diagnostic-noscript {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}

.diagnostic-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem 1.75rem;
  margin: 2.5rem 0;
  background: rgba(255, 255, 255, 0.35);
}

.diagnostic-count {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 1.25rem;
}

.diagnostic-btn {
  display: inline-block;
  font: inherit;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--paper);
  background: var(--ink);
  border: 0;
  border-radius: 6px;
  padding: 0.7rem 1.4rem;
  cursor: pointer;
  text-decoration: none;
}

.diagnostic-btn:hover { background: var(--accent); color: var(--paper); }

.diagnostic-progress {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  margin-bottom: 0.75rem;
}

.diagnostic-prompt {
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.4;
  margin-bottom: 1.5rem;
}

.diagnostic-options { display: grid; gap: 0.6rem; }

.diagnostic-option {
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: left;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.diagnostic-option:hover { border-color: var(--accent); }
.diagnostic-option.selected { border-color: var(--accent); background: rgba(122, 31, 31, 0.05); }

.diagnostic-own { margin-top: 1.25rem; }

.diagnostic-own-toggle {
  font: inherit;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink-muted);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.diagnostic-own-toggle:hover { color: var(--accent); }

.diagnostic-own-form { margin-top: 0.85rem; }

.diagnostic-own-text {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  margin-bottom: 0.75rem;
  resize: vertical;
}

.diagnostic-nav { margin-top: 1.5rem; }

.diagnostic-back {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink-muted);
  text-decoration: none;
}

.diagnostic-back:hover { color: var(--accent); }

.diagnostic-result-name {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.diagnostic-tagline {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 1rem;
}

.diagnostic-reading {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.diagnostic-nuance {
  list-style: none;
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--ink-muted);
  margin-bottom: 1.5rem;
}

.diagnostic-nuance li { margin-bottom: 0.4rem; }

.diagnostic-matrix-wrap { position: relative; max-width: 420px; margin: 0 0 2rem; padding: 0 0 1.5rem 1.5rem; }

.diagnostic-matrix {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  border: 1px solid var(--border);
  aspect-ratio: 1 / 1;
}

.matrix-cell {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
  border: 1px solid var(--border);
  padding: 0.5rem 0.6rem;
  display: flex;
  align-items: flex-start;
}

.matrix-cell.active { color: var(--ink); background: rgba(122, 31, 31, 0.06); }

.matrix-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(122, 31, 31, 0.18);
}

.matrix-axis-x,
.matrix-axis-y {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  font-variant-caps: all-small-caps;
  color: var(--ink-faint);
}

.matrix-axis-x { text-align: center; margin-top: 0.4rem; }

.matrix-axis-y {
  position: absolute;
  left: 0;
  top: 50%;
  transform: rotate(180deg) translateX(50%);
  writing-mode: vertical-rl;
}

.diagnostic-ownwords { margin-bottom: 1rem; }

.diagnostic-ownword {
  margin: 0 0 1rem;
  padding: 0.75rem 0 0.75rem 1.25rem;
  border-left: 2px solid var(--border);
  font-style: italic;
}

.diagnostic-ownword-label {
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.75rem;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 0.25rem;
}

.diagnostic-cta { display: block; text-align: center; margin: 2rem 0 1.25rem; }

.diagnostic-tools { display: flex; gap: 1.5rem; justify-content: center; }

.diagnostic-link-btn {
  font: inherit;
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--ink-muted);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.diagnostic-link-btn:hover { color: var(--accent); }

.diagnostic-why {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.diagnostic-why p { font-size: 0.95rem; color: var(--ink); margin-bottom: 1rem; }

.diagnostic-lineage {
  list-style: none;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.diagnostic-lineage li { margin-bottom: 0.45rem; }
