/* ============================================
   Editorial Design Layer
   Opt-in via <body data-design="editorial">.
   Does NOT touch shared tokens/components.
   To be lifted into tokens.css once every page
   is migrated and the attribute can be dropped.
   ============================================ */

/* ============================================
   1. TOKEN REMAP — single accent, warm neutrals
   ============================================ */
body[data-design="editorial"] {
    /* Warm neutrals (light is canonical for editorial) */
    --ink: #15151a;
    --ink-mute: #5c5c63;
    --ink-faint: #8a8a91;
    --paper: #fafaf7;
    --paper-raised: #f3f2ec;
    --rule: #e6e5dd;
    --rule-strong: #d3d2c9;

    /* Single accent — deep violet, used sparingly */
    --accent: #3a2fcc;
    --accent-soft: rgba(58, 47, 204, 0.08);

    /* Override shared tokens so existing markup inherits new values */
    --bg-deep: var(--paper);
    --bg-surface: var(--paper);
    --bg-elevated: var(--paper-raised);
    --bg-hover: #ebe9e1;

    --text-primary: var(--ink);
    --text-secondary: var(--ink-mute);
    --text-muted: var(--ink-faint);

    --border-subtle: var(--rule);
    --border-medium: var(--rule-strong);
    --border-strong: #bcbbb2;

    /* Collapse all 6 accents to ink (or accent for violet) */
    --accent-violet: var(--accent);
    --accent-violet-dim: #2a1f9c;
    --accent-cyan: var(--ink);
    --accent-emerald: var(--ink);
    --accent-gold: var(--ink);
    --accent-rose: var(--ink);
    --accent-amber: var(--accent);

    /* Kill gradients */
    --gradient-gold: var(--ink);
    --gradient-violet: var(--accent);
    --gradient-mesh: none;

    /* Soften shadows */
    --shadow-sm: 0 1px 1px rgba(20, 20, 25, 0.03);
    --shadow-md: 0 1px 2px rgba(20, 20, 25, 0.04);
    --shadow-lg: 0 4px 16px rgba(20, 20, 25, 0.06);
    --shadow-xl: 0 8px 32px rgba(20, 20, 25, 0.08);
    --shadow-2xl: 0 12px 40px rgba(20, 20, 25, 0.10);
    --shadow-glow-gold: none;
    --shadow-glow-violet: none;

    background: var(--paper);
}

/* Dark theme variant — keep editorial discipline, invert */
[data-theme="dark"] body[data-design="editorial"],
body[data-design="editorial"][data-theme="dark"] {
    --ink: #f3f1ea;
    --ink-mute: #a8a59c;
    --ink-faint: #6f6d65;
    --paper: #14130e;
    --paper-raised: #1d1c16;
    --rule: #2c2a23;
    --rule-strong: #3d3a31;
    --accent: #9b8eff;
    --accent-soft: rgba(155, 142, 255, 0.10);

    --bg-deep: var(--paper);
    --bg-surface: var(--paper);
    --bg-elevated: var(--paper-raised);
    --bg-hover: #25241c;
}

/* ============================================
   2. KILL BACKGROUND EFFECTS on homepage
   ============================================ */
body[data-design="editorial"] .bg-mesh { display: none; }
body[data-design="editorial"] .bg-grid {
    background-image:
        linear-gradient(rgba(20, 20, 25, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(20, 20, 25, 0.025) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse 60% 40% at 50% 0%, black 50%, transparent 100%);
}
[data-theme="dark"] body[data-design="editorial"] .bg-grid {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
}

/* ============================================
   3. HEADER — restraint
   ============================================ */
body[data-design="editorial"] .header {
    background: rgba(250, 250, 247, 0.85);
    border-bottom: 1px solid var(--rule);
    backdrop-filter: blur(12px);
}
[data-theme="dark"] body[data-design="editorial"] .header {
    background: rgba(20, 19, 14, 0.85);
}
body[data-design="editorial"] .header.scrolled {
    background: rgba(250, 250, 247, 0.95);
    box-shadow: 0 1px 0 var(--rule);
}
[data-theme="dark"] body[data-design="editorial"] .header.scrolled {
    background: rgba(20, 19, 14, 0.95);
}
body[data-design="editorial"] .logo span {
    font-family: var(--font-display) !important;
    font-weight: 400 !important;
    font-size: 1.5rem !important;
    letter-spacing: -0.02em;
}
body[data-design="editorial"] .nav-link {
    font-weight: 400;
    color: var(--ink-mute);
}
body[data-design="editorial"] .nav-link:hover { color: var(--ink); }
body[data-design="editorial"] .nav-link::after { background: var(--ink); height: 1px; }
body[data-design="editorial"] .theme-toggle {
    background: transparent;
    border-color: var(--rule);
    color: var(--ink-mute);
}
body[data-design="editorial"] .theme-toggle:hover {
    border-color: var(--ink);
    color: var(--ink);
}

/* ============================================
   4. HERO
   ============================================ */
body[data-design="editorial"] .hero {
    min-height: auto;
    padding: calc(var(--header-height) + 6rem) var(--space-6) 4rem;
    align-items: flex-start;
    text-align: left;
    display: block;
}
body[data-design="editorial"] .hero-split {
    grid-template-columns: 1.18fr 0.82fr;
    gap: 4.5rem;
    max-width: 1080px;
    align-items: start;
}
body[data-design="editorial"] .hero-figure {
    margin: 0;
    position: sticky;
    top: calc(var(--header-height) + 2rem);
}
body[data-design="editorial"] .hero-photo {
    display: block;
    width: 100%;
    max-width: 360px;
    aspect-ratio: 1;
    border-radius: 6px;
    border: 1px solid var(--rule-strong);
    box-shadow: 0 18px 48px rgba(20, 20, 25, 0.10);
    filter: saturate(1.02);
}
body[data-design="editorial"] .hero-figcaption {
    max-width: 360px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 0.875rem;
    border-top: 1px solid var(--rule);
}
body[data-design="editorial"] .hero-figcaption-name {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.0625rem;
    color: var(--ink);
    letter-spacing: 0.005em;
}
body[data-design="editorial"] .hero-figcaption-meta {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-faint);
    white-space: nowrap;
}
body[data-design="editorial"] .hero-name {
    font-family: var(--font-display);
    font-size: clamp(2.75rem, 5.5vw, 4.25rem);
    font-weight: 400;
    line-height: 1.02;
    letter-spacing: -0.025em;
    color: var(--ink);
    background: none;
    -webkit-text-fill-color: var(--ink);
    margin-bottom: 1.25rem;
}
body[data-design="editorial"] .hero-title {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--ink-mute);
    letter-spacing: 0.01em;
    margin-bottom: 0.25rem;
    font-style: normal;
}
body[data-design="editorial"] .hero-role {
    font-family: var(--font-body) !important;
    font-size: 0.9375rem !important;
    font-weight: 400 !important;
    color: var(--ink-mute) !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    margin-top: 0 !important;
    margin-bottom: 1.75rem;
}
body[data-design="editorial"] .hero-tagline {
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--ink);
    max-width: 52ch;
    margin-bottom: 0;
    font-weight: 400;
}

/* Featured Writing block — editorial card */
body[data-design="editorial"] .featured-writing {
    display: block;
    margin-top: 2.5rem;
    padding: 1.5rem 1.75rem;
    background: transparent;
    border: 1px solid var(--rule);
    border-radius: 6px;
    border-left: 3px solid var(--ink);
    text-decoration: none;
    color: inherit;
    max-width: 52ch;
    transition: border-color 200ms ease, background 200ms ease;
}
body[data-design="editorial"] .featured-writing:hover {
    border-color: var(--accent);
    border-left-color: var(--accent);
    background: var(--accent-soft);
}
body[data-design="editorial"] .featured-writing-label {
    font-family: var(--font-body);
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--ink-mute);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}
body[data-design="editorial"] .featured-writing-title {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 400;
    line-height: 1.25;
    color: var(--ink);
    letter-spacing: -0.01em;
    margin-bottom: 0.625rem;
}
body[data-design="editorial"] .featured-writing-excerpt {
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--ink-mute);
    margin-bottom: 0.875rem;
}
body[data-design="editorial"] .featured-writing-link {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.01em;
}

/* Hero open-source repos — editorial list, GitHub-anchored */
body[data-design="editorial"] .hero-oss {
    margin-top: 2.5rem;
    max-width: 52ch;
    border-top: 1px solid var(--rule);
    padding-top: 1.5rem;
}
body[data-design="editorial"] .hero-oss-head {
    margin-bottom: 1rem;
}
body[data-design="editorial"] .hero-oss-label {
    display: block;
    font-family: var(--font-body);
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--ink-mute);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}
body[data-design="editorial"] .hero-oss-intro {
    display: block;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--ink-mute);
}
body[data-design="editorial"] .hero-oss-item {
    display: grid;
    grid-template-columns: 4.25rem 1fr auto;
    align-items: baseline;
    gap: 0.75rem 1rem;
    padding: 0.875rem 0;
    border-top: 1px solid var(--rule);
    text-decoration: none;
    color: inherit;
    transition: border-color 200ms ease;
}
body[data-design="editorial"] .hero-oss-item:hover {
    border-top-color: var(--accent);
}
body[data-design="editorial"] .hero-oss-name {
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--ink);
    letter-spacing: -0.01em;
}
body[data-design="editorial"] .hero-oss-item:hover .hero-oss-name { color: var(--accent); }
body[data-design="editorial"] .hero-oss-desc {
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--ink-mute);
}
body[data-design="editorial"] .hero-oss-gh {
    align-self: center;
    color: var(--ink-mute);
    opacity: 0.55;
    transition: opacity 150ms ease, color 150ms ease;
    flex: none;
}
body[data-design="editorial"] .hero-oss-item:hover .hero-oss-gh {
    opacity: 1;
    color: var(--accent);
}

/* Hero quick links — text only, no icons */
body[data-design="editorial"] .hero-links {
    display: flex;
    gap: 1.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}
body[data-design="editorial"] .hero-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ink-mute);
    text-decoration: none;
    position: relative;
    transition: color 150ms ease;
}
body[data-design="editorial"] .hero-links a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 1px;
    background: var(--ink);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 200ms ease;
}
body[data-design="editorial"] .hero-links a:hover { color: var(--ink); }
body[data-design="editorial"] .hero-links a:hover::after { transform: scaleX(1); }

/* ============================================
   5. SECTION RHYTHM
   ============================================ */
body[data-design="editorial"] .section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--ink-mute);
    font-weight: 600;
    font-size: 0.6875rem;
    letter-spacing: 0.18em;
    margin-bottom: 1.25rem;
}
body[data-design="editorial"] .section-eyebrow::before {
    content: '';
    width: 28px;
    height: 1px;
    background: var(--accent);
}
body[data-design="editorial"] .section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--ink);
    margin-bottom: 1rem;
}
body[data-design="editorial"] .section-subtitle {
    font-size: 1rem;
    color: var(--ink-mute);
    max-width: 480px;
    line-height: 1.55;
}

body[data-design="editorial"] .editorial-section {
    max-width: 1080px;
    margin: 0 auto;
    padding: 4.5rem var(--space-6);
}
body[data-design="editorial"] .editorial-section--tight { padding: 2.5rem var(--space-6); }
body[data-design="editorial"] .editorial-section--loose { padding: 5.5rem var(--space-6); }

body[data-design="editorial"] .section-divider {
    max-width: 1080px;
    margin: 0 auto;
    border-top: 1px solid var(--rule);
}

/* ============================================
   6. STATS — typography only, no cards
   ============================================ */
body[data-design="editorial"] .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    max-width: 1080px;
    margin: 0 auto;
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--rule);
}
body[data-design="editorial"] .stat-card {
    background: transparent;
    border: none;
    text-align: left;
    border-left: 1px solid var(--rule);
    padding: 1.75rem 1.75rem 1.75rem 1.75rem;
}
body[data-design="editorial"] .stat-card:hover {
    transform: none;
    border-color: var(--rule);
    background: var(--paper-raised);
}
body[data-design="editorial"] .stat-card:first-child {
    border-left: none;
}
body[data-design="editorial"] .stat-number {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 4.4vw, 3.5rem);
    font-weight: 400;
    line-height: 1;
    color: var(--ink) !important;
    margin-bottom: 0.625rem;
    letter-spacing: -0.02em;
}
body[data-design="editorial"] .stat-number.violet,
body[data-design="editorial"] .stat-number.cyan,
body[data-design="editorial"] .stat-number.emerald,
body[data-design="editorial"] .stat-number.gold {
    color: var(--ink) !important;
}
body[data-design="editorial"] .stat-label {
    font-size: 0.8125rem;
    color: var(--ink-mute);
    line-height: 1.4;
    letter-spacing: 0.01em;
}

/* ============================================
   7. QUOTE — pull quote serif
   ============================================ */
body[data-design="editorial"] .quote-block {
    position: relative;
    background: transparent;
    border: none;
    border-left: 2px solid var(--accent);
    border-radius: 0;
    padding: 0.5rem 0 0.5rem 2.5rem;
    margin: 2.5rem auto;
    max-width: 760px;
}
body[data-design="editorial"] .quote-block::before {
    display: block;
    content: '\201C';
    position: absolute;
    left: 1.25rem;
    top: -0.75rem;
    font-family: var(--font-display);
    font-size: 5rem;
    line-height: 1;
    color: var(--accent-soft);
    pointer-events: none;
    z-index: 0;
}
body[data-design="editorial"] .quote-block > * { position: relative; z-index: 1; }
body[data-design="editorial"] .quote-text {
    font-family: var(--font-display);
    font-size: clamp(1.375rem, 2.4vw, 1.75rem);
    font-style: normal;
    font-weight: 400;
    line-height: 1.35;
    color: var(--ink);
    letter-spacing: -0.01em;
    margin-bottom: 0.875rem;
}
body[data-design="editorial"] .quote-author {
    font-size: 0.8125rem;
    color: var(--ink-mute);
    letter-spacing: 0.02em;
}

/* ============================================
   8. PRODUCTS GRID — uniform editorial cards
   ============================================ */
body[data-design="editorial"] .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
    border-radius: 8px;
    overflow: hidden;
    max-width: 1080px !important;
    counter-reset: product;
}
body[data-design="editorial"] .product-card {
    position: relative;
    background: var(--paper) !important;
    border: none !important;
    border-radius: 0;
    padding: 2rem 1.75rem 1.75rem;
    counter-increment: product;
    transition: background 200ms ease;
}
body[data-design="editorial"] .product-card::before {
    content: counter(product, decimal-leading-zero);
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.06em;
    color: var(--ink-faint);
    transition: color 200ms ease;
}
body[data-design="editorial"] .product-card::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 220ms ease;
}
body[data-design="editorial"] .product-card:hover {
    transform: none;
    background: var(--paper-raised) !important;
    box-shadow: none;
}
body[data-design="editorial"] .product-card:hover::after { transform: scaleY(1); }
body[data-design="editorial"] .product-card:hover::before { color: var(--accent); }
body[data-design="editorial"] .product-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: 1px solid var(--rule-strong);
    border-radius: 8px;
    color: var(--ink) !important;
    margin-bottom: 1.5rem;
    padding: 0;
    transition: border-color 200ms ease, color 200ms ease;
}
body[data-design="editorial"] .product-card:hover .product-icon {
    border-color: var(--accent);
    color: var(--accent) !important;
}
body[data-design="editorial"] .product-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor !important;
}
body[data-design="editorial"] .product-name {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 400;
    color: var(--ink);
    letter-spacing: -0.01em;
    margin-bottom: 0.75rem;
}
body[data-design="editorial"] .product-description {
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--ink-mute);
    margin-bottom: 1.5rem;
}
body[data-design="editorial"] .product-link {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ink) !important;
    letter-spacing: 0.01em;
    position: relative;
    transition: color 150ms ease;
}
body[data-design="editorial"] .product-card:hover .product-link {
    color: var(--accent) !important;
}

/* ============================================
   9. COMPANIES ROW
   ============================================ */
body[data-design="editorial"] .companies-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    align-items: stretch;
    max-width: 1080px;
    margin: 0 auto;
    border: 1px solid var(--rule);
    border-radius: 8px;
    overflow: hidden;
}
body[data-design="editorial"] .companies-row a {
    text-align: center;
    text-decoration: none;
    color: var(--ink-mute);
    transition: color 150ms ease, background 200ms ease;
    padding: 2.5rem 1.5rem;
    border-left: 1px solid var(--rule);
}
body[data-design="editorial"] .companies-row a:first-child { border-left: none; }
body[data-design="editorial"] .companies-row a:hover { color: var(--ink); background: var(--paper-raised); }
body[data-design="editorial"] .companies-row svg {
    width: 30px;
    height: 30px;
    margin-bottom: 1rem;
    stroke-width: 1.5;
    color: var(--accent);
}
body[data-design="editorial"] .companies-row .company-name {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--ink);
    margin-bottom: 0.25rem;
}
body[data-design="editorial"] .companies-row .company-loc {
    font-size: 0.75rem;
    color: var(--ink-faint);
    letter-spacing: 0.02em;
}

/* ============================================
   10. CTA — restrained editorial
   ============================================ */
body[data-design="editorial"] .editorial-cta {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    padding: 4rem 2rem;
    background: var(--paper-raised);
    border: 1px solid var(--rule);
    border-top: 2px solid var(--accent);
    border-radius: 8px;
}
body[data-design="editorial"] .editorial-cta-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 400;
    color: var(--ink);
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 0.875rem;
}
body[data-design="editorial"] .editorial-cta-text {
    font-size: 1rem;
    color: var(--ink-mute);
    line-height: 1.55;
    max-width: 48ch;
    margin: 0 auto 2rem;
}
body[data-design="editorial"] .editorial-cta a.btn,
body[data-design="editorial"] .btn-editorial {
    display: inline-block;
    padding: 0.875rem 1.75rem;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    border: 1px solid var(--ink);
    border-radius: 4px;
    text-decoration: none;
    transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
}
body[data-design="editorial"] .editorial-cta a.btn:hover,
body[data-design="editorial"] .btn-editorial:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--paper);
    transform: none;
    box-shadow: none;
}

/* ============================================
   11. FOOTER — minimal
   ============================================ */
body[data-design="editorial"] .footer {
    background: transparent;
    border-top: 1px solid var(--rule);
    padding: 3rem var(--space-6) 2.5rem;
    margin-top: 4rem;
}
body[data-design="editorial"] .footer-container {
    max-width: 1080px;
    text-align: center;
}
body[data-design="editorial"] .footer-tagline {
    font-family: var(--font-display);
    font-size: 1rem;
    font-style: italic;
    color: var(--ink-mute);
    margin-bottom: 1rem;
}
body[data-design="editorial"] .footer-bottom {
    border-top: none;
    padding-top: 0;
    color: var(--ink-faint);
    font-size: 0.8125rem;
    justify-content: center;
}

/* ============================================
   12. PAGE HERO — shared across non-home pages
   ============================================ */
body[data-design="editorial"] .page-hero {
    padding: calc(var(--header-height) + 5rem) var(--space-6) 3rem;
    text-align: left;
    max-width: 1080px;
    margin: 0 auto;
}
body[data-design="editorial"] .page-hero .container {
    padding: 0;
    max-width: 1080px;
}
body[data-design="editorial"] .page-hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 3.75rem);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.025em;
    color: var(--ink);
    margin-bottom: 1.25rem;
}
body[data-design="editorial"] .page-hero-subtitle {
    font-size: 1.0625rem;
    line-height: 1.55;
    color: var(--ink-mute);
    max-width: 56ch;
    margin: 0;
}

/* ============================================
   13. CARD — flatten to editorial paper-raised
   ============================================ */
body[data-design="editorial"] .card {
    background: var(--paper-raised);
    border: 1px solid var(--rule);
    box-shadow: none;
    border-radius: 8px;
    transition: border-color 200ms ease, background 200ms ease;
}
body[data-design="editorial"] .card:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--rule-strong);
}
body[data-design="editorial"] .card h2,
body[data-design="editorial"] .card h3 {
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: -0.015em;
    color: var(--ink);
}

/* ============================================
   14. FOUNDER NOTE — strip dark gradient
   ============================================ */
body[data-design="editorial"] .founder-note {
    background: var(--paper-raised);
    border: 1px solid var(--rule);
    border-radius: 8px;
    padding: 3.5rem 3rem;
    overflow: visible;
}
body[data-design="editorial"] .founder-note::before { display: none; }
body[data-design="editorial"] .manuscript-text,
body[data-design="editorial"] .manuscript-text p {
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 1.1875rem;
    line-height: 1.65;
    font-style: italic;
}
body[data-design="editorial"] .manuscript-signature {
    font-family: 'Caveat', cursive;
    color: var(--accent);
    font-size: 2rem;
    margin-top: 2rem;
}

/* ============================================
   15. SKILL TAG — underline on hover
   ============================================ */
body[data-design="editorial"] .skill-tag {
    background: transparent;
    border: 1px solid var(--rule);
    color: var(--ink-mute);
    transition: color 150ms ease, border-color 150ms ease;
}
body[data-design="editorial"] .skill-tag:hover {
    border-color: var(--ink);
    color: var(--ink);
    transform: none;
}

/* ============================================
   16. CONTACT FORM
   ============================================ */
body[data-design="editorial"] .form-label {
    color: var(--ink-mute);
    font-family: var(--font-body);
    font-weight: 500;
    letter-spacing: 0.02em;
}
body[data-design="editorial"] .form-input,
body[data-design="editorial"] .form-textarea {
    background: var(--paper);
    border: 1px solid var(--rule-strong);
    border-radius: 4px;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}
body[data-design="editorial"] .form-input:focus,
body[data-design="editorial"] .form-textarea:focus {
    outline: none;
    border-color: var(--ink);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ============================================
   17. SOCIAL LINKS — neutralize
   ============================================ */
body[data-design="editorial"] .social-link {
    background: transparent;
    border: 1px solid var(--rule);
    color: var(--ink-mute);
    transition: color 150ms ease, border-color 150ms ease;
}
body[data-design="editorial"] .social-link:hover {
    border-color: var(--ink);
    color: var(--ink);
    transform: none;
}

/* ============================================
   18. GRADIENT TEXT — collapse to ink
   ============================================ */
body[data-design="editorial"] .gradient-text,
body[data-design="editorial"] .gradient-text-violet {
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    -webkit-text-fill-color: var(--ink);
    color: var(--ink);
}

/* ============================================
   19. BUTTONS — editorial defaults
   ============================================ */
body[data-design="editorial"] .btn,
body[data-design="editorial"] .btn-primary,
body[data-design="editorial"] .btn-secondary {
    display: inline-block;
    padding: 0.875rem 1.75rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    border-radius: 4px;
    text-decoration: none;
    transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
}
body[data-design="editorial"] .btn-primary {
    background: var(--ink);
    color: var(--paper);
    border: 1px solid var(--ink);
}
body[data-design="editorial"] .btn-primary:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--paper);
    transform: none;
    box-shadow: none;
}
body[data-design="editorial"] .btn-secondary {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--rule-strong);
}
body[data-design="editorial"] .btn-secondary:hover {
    border-color: var(--ink);
    background: transparent;
    color: var(--ink);
    transform: none;
}

/* ============================================
   19b. PRINCIPLES GRID — text columns (no card)
   ============================================ */
body[data-design="editorial"] .principles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    max-width: 1080px;
    margin: 0 auto;
}
body[data-design="editorial"] .principle {
    padding-left: 1.5rem;
    border-left: 1px solid var(--rule);
}
body[data-design="editorial"] .principle:first-child {
    border-left-color: var(--ink);
}
body[data-design="editorial"] .principle-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--ink);
    letter-spacing: -0.015em;
    margin-bottom: 0.625rem;
}
body[data-design="editorial"] .principle-text {
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--ink-mute);
}
@media (max-width: 720px) {
    body[data-design="editorial"] .principles-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }
}

/* ============================================
   19c. COMPANY CARDS — editorial flat
   ============================================ */
body[data-design="editorial"] .company-card {
    background: var(--paper-raised);
    border: 1px solid var(--rule);
    border-radius: 8px;
    padding: 2.5rem 2.25rem;
    margin-bottom: 1.5rem;
}
body[data-design="editorial"] .company-card.primary {
    background: var(--paper-raised);
    border: 1px solid var(--ink);
}
body[data-design="editorial"] .company-header {
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}
body[data-design="editorial"] .company-logo {
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid var(--rule-strong);
    border-radius: 6px;
    color: var(--ink);
}
body[data-design="editorial"] .company-logo svg {
    width: 22px;
    height: 22px;
    stroke: var(--ink);
}
body[data-design="editorial"] .company-name {
    font-family: var(--font-display);
    font-size: 1.625rem;
    font-weight: 400;
    color: var(--ink);
    letter-spacing: -0.015em;
}
body[data-design="editorial"] .company-type {
    font-family: var(--font-body);
    font-size: 0.8125rem;
    color: var(--ink-mute);
    letter-spacing: 0.02em;
    margin-top: 0.25rem;
}

body[data-design="editorial"] .company-blurb {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ink);
    margin-bottom: 2rem;
    max-width: 60ch;
}
body[data-design="editorial"] .company-blurb strong {
    color: var(--ink);
    font-weight: 600;
}
body[data-design="editorial"] .inline-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    margin-bottom: 2rem;
    padding: 1.25rem 0;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}
body[data-design="editorial"] .inline-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
body[data-design="editorial"] .inline-stat-number {
    font-family: var(--font-display);
    font-size: 1.625rem;
    font-weight: 400;
    color: var(--ink);
    letter-spacing: -0.015em;
    line-height: 1.1;
}
body[data-design="editorial"] .inline-stat-label {
    font-size: 0.75rem;
    color: var(--ink-mute);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
body[data-design="editorial"] .skills-grid {
    margin-top: 0.75rem;
    margin-bottom: 1.75rem;
    gap: 0.5rem;
}
body[data-design="editorial"] .skill-tag {
    padding: 0.375rem 0.875rem;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.8125rem;
    letter-spacing: 0.01em;
}

/* ============================================
   19e. PRODUCT FEATURE — flagship product block
   ============================================ */
body[data-design="editorial"] .product-feature {
    background: var(--paper-raised);
    border: 1px solid var(--rule);
    border-radius: 8px;
    padding: 3rem 2.5rem;
    margin-bottom: 2rem;
    max-width: 1080px;
    margin-left: auto;
    margin-right: auto;
}
body[data-design="editorial"] .product-feature.flagship {
    border: 1px solid var(--ink);
}
body[data-design="editorial"] .product-feature-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}
body[data-design="editorial"] .product-feature-logo {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--rule-strong);
    border-radius: 6px;
    color: var(--ink);
}
body[data-design="editorial"] .product-feature-logo svg {
    width: 22px;
    height: 22px;
    stroke: var(--ink);
}
body[data-design="editorial"] .product-feature-eyebrow {
    font-family: var(--font-body);
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--ink-mute);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 0.375rem;
}
body[data-design="editorial"] .product-feature-name {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.5vw, 2.5rem);
    font-weight: 400;
    color: var(--ink);
    letter-spacing: -0.02em;
    line-height: 1.05;
}
body[data-design="editorial"] .product-feature-tagline {
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--ink);
    margin-bottom: 1.25rem;
    max-width: 60ch;
}
body[data-design="editorial"] .product-feature-meta {
    font-family: var(--font-body);
    font-size: 0.8125rem;
    color: var(--ink-mute);
    letter-spacing: 0.02em;
    margin-bottom: 2rem;
}
body[data-design="editorial"] .product-feature-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}
body[data-design="editorial"] .code-sample {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 4px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--ink);
    overflow-x: auto;
}
body[data-design="editorial"] .code-sample .code-comment {
    color: var(--ink-faint);
    font-style: italic;
}

/* ============================================
   19f. PRODUCT GRID OVERRIDES — apply on every page
   ============================================ */
body[data-design="editorial"] .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
    border-radius: 8px;
    overflow: hidden;
    max-width: 1080px;
    margin: 0 auto;
}
body[data-design="editorial"] .product-card {
    background: var(--paper) !important;
    border: none !important;
    border-radius: 0;
    padding: 2rem 1.75rem 1.75rem;
    transition: background 200ms ease;
    color: var(--ink) !important;
}
body[data-design="editorial"] .product-card:hover {
    transform: none;
    background: var(--paper-raised) !important;
    box-shadow: none;
}
body[data-design="editorial"] .product-card .product-icon {
    width: 32px;
    height: 32px;
    background: transparent !important;
    border-radius: 0;
    color: var(--ink) !important;
    margin-bottom: 1.5rem;
}
body[data-design="editorial"] .product-card .product-icon svg {
    width: 100%;
    height: 100%;
    stroke: var(--ink) !important;
}
body[data-design="editorial"] .product-card .product-name {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 400;
    color: var(--ink);
    letter-spacing: -0.01em;
    margin-bottom: 0.75rem;
}
body[data-design="editorial"] .product-card .product-description {
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--ink-mute);
    margin-bottom: 1.5rem;
}
body[data-design="editorial"] .product-card .product-link {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ink) !important;
    letter-spacing: 0.01em;
    position: relative;
    transition: color 150ms ease;
}
body[data-design="editorial"] .product-card:hover .product-link {
    color: var(--accent) !important;
}

/* ============================================
   19g. FEATURE LIST — capabilities / implications
   ============================================ */
body[data-design="editorial"] .feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem 3rem;
    max-width: 1080px;
    margin: 0 auto;
}
body[data-design="editorial"] .feature-item {
    border-top: 1px solid var(--ink);
    padding-top: 1.5rem;
}
body[data-design="editorial"] .feature-item-header {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 0.875rem;
}
body[data-design="editorial"] .feature-item-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
}
body[data-design="editorial"] .feature-item-icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--ink);
}
body[data-design="editorial"] .feature-item-title {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 400;
    color: var(--ink);
    letter-spacing: -0.015em;
}
body[data-design="editorial"] .feature-item-text {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--ink-mute);
}

/* ============================================
   19h. HIGHLIGHT TEXT — pull quote inline
   ============================================ */
body[data-design="editorial"] .highlight-text {
    color: var(--ink);
    font-family: var(--font-display);
    font-size: clamp(1.375rem, 2.4vw, 1.75rem);
    line-height: 1.4;
    font-weight: 400;
    letter-spacing: -0.01em;
    border-left: 2px solid var(--ink);
    padding: 0.5rem 0 0.5rem 2rem;
    margin: 3rem auto;
    max-width: 720px;
}
body[data-design="editorial"] .highlight-text strong {
    font-weight: 500;
    color: var(--ink);
}

/* ============================================
   19i. SCREENSHOT — editorial framed image
   ============================================ */
body[data-design="editorial"] .screenshot-container {
    max-width: 1080px;
    margin: 3rem auto;
    border: 1px solid var(--rule);
    border-radius: 6px;
    overflow: hidden;
    background: var(--paper);
}
body[data-design="editorial"] .screenshot-container img {
    width: 100%;
    height: auto;
    display: block;
}
body[data-design="editorial"] .screenshot-caption {
    padding: 1rem 1.25rem;
    background: var(--paper-raised);
    border-top: 1px solid var(--rule);
    color: var(--ink-mute);
    font-size: 0.8125rem;
    text-align: center;
    line-height: 1.5;
}

/* ============================================
   19j. ANTHROPIC REF — editorial inline note
   ============================================ */
body[data-design="editorial"] .anthropic-ref {
    background: var(--paper-raised);
    border: 1px solid var(--rule);
    border-left: 3px solid var(--accent);
    border-radius: 4px;
    padding: 1.5rem 1.75rem;
    max-width: 720px;
    margin: 3rem auto;
}
body[data-design="editorial"] .anthropic-ref p {
    color: var(--ink);
    font-size: 0.9375rem;
    line-height: 1.65;
}

/* ============================================
   19d. EXPERTISE — editorial categories
   ============================================ */
body[data-design="editorial"] .expertise-category {
    margin-bottom: 3rem;
}
body[data-design="editorial"] .expertise-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--ink);
    letter-spacing: -0.015em;
    border-bottom: 1px solid var(--ink);
    padding-bottom: 0.5rem;
    margin-bottom: 1.25rem;
}
body[data-design="editorial"] .expertise-blurb {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ink);
    max-width: 60ch;
    margin-bottom: 1.75rem;
}

/* ============================================
   20. PROSE — long-form editorial body
   ============================================ */
body[data-design="editorial"] .prose {
    max-width: 65ch;
    margin: 0;
}
body[data-design="editorial"] .prose p {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--ink);
    margin-bottom: 1.5rem;
}
body[data-design="editorial"] .prose h2 {
    font-family: var(--font-display);
    font-size: clamp(1.625rem, 2.6vw, 2rem);
    font-weight: 400;
    letter-spacing: -0.015em;
    color: var(--ink);
    margin: 3rem 0 1rem;
}
body[data-design="editorial"] .prose h3 {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 400;
    color: var(--ink);
    margin: 2rem 0 0.75rem;
}

/* ============================================
   21. RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    body[data-design="editorial"] .hero-split {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: left;
    }
    body[data-design="editorial"] .hero-split > div { text-align: left; }
    body[data-design="editorial"] .hero-figure { position: static; top: auto; order: -1; }
    body[data-design="editorial"] .hero-photo { max-width: 260px; margin: 0; }
    body[data-design="editorial"] .hero-figcaption { max-width: 260px; }
    body[data-design="editorial"] .hero-tagline { margin-left: 0; }
    body[data-design="editorial"] .featured-writing { margin-left: 0; }
    /* stats: clean 2×2 bordered grid */
    body[data-design="editorial"] .stats-grid { grid-template-columns: repeat(2, 1fr); }
    body[data-design="editorial"] .stat-card:nth-child(odd) { border-left: none; }
    body[data-design="editorial"] .stat-card:nth-child(n+3) { border-top: 1px solid var(--rule); }
    body[data-design="editorial"] .editorial-section { padding: 3.5rem var(--space-6); }
    body[data-design="editorial"] .editorial-section--loose { padding: 4rem var(--space-6); }
    body[data-design="editorial"] .page-hero { padding: calc(var(--header-height) + 3rem) var(--space-5) 2rem; }
    body[data-design="editorial"] .founder-note { padding: 2.5rem 1.75rem; }
}

@media (max-width: 560px) {
    body[data-design="editorial"] .hero {
        padding: calc(var(--header-height) + 3rem) var(--space-5) 3rem;
    }
    body[data-design="editorial"] .hero-name {
        font-size: clamp(2.25rem, 9vw, 3rem);
    }
    body[data-design="editorial"] .hero-oss-item {
        grid-template-columns: 1fr auto;
        gap: 0.25rem 1rem;
    }
    body[data-design="editorial"] .hero-oss-name { grid-row: 1; }
    body[data-design="editorial"] .hero-oss-gh { grid-row: 1; grid-column: 2; }
    body[data-design="editorial"] .hero-oss-desc { grid-column: 1 / -1; }
    /* stats: single column, row dividers */
    body[data-design="editorial"] .stats-grid { grid-template-columns: 1fr; }
    body[data-design="editorial"] .stat-card { border-left: none; border-top: 1px solid var(--rule); }
    body[data-design="editorial"] .stat-card:first-child { border-top: none; }
    body[data-design="editorial"] .stat-card:nth-child(n+3) { border-top: 1px solid var(--rule); }
    /* companies: stack with row dividers */
    body[data-design="editorial"] .companies-row { grid-template-columns: 1fr; }
    body[data-design="editorial"] .companies-row a { border-left: none; border-top: 1px solid var(--rule); padding: 2rem 1.5rem; }
    body[data-design="editorial"] .companies-row a:first-child { border-top: none; }
}
