/*
Theme Name:        Spectral TAC
Theme URI:         https://codeberg.org/ishrikantbhosale
Author:            Shrikant Bhosale
Author URI:        https://codeberg.org/ishrikantbhosale
Description:       A WordPress theme built on TAC (Thermodynamic Automaton Computer) mathematics and the Spectral Set Classifier. 7 SEO models built-in. Permutation-invariant by construction. The theme that falls toward insight.
Version:           1.0.0
Requires at least: 6.0
Tested up to:      6.7
Requires PHP:      8.0
License:           MIT
License URI:       https://opensource.org/licenses/MIT
Text Domain:       spectral-tac
Tags:              light, blog, mathematical, seo, thermodynamic
*/

/* ════════════════════════════════════════════════════════════════════════
   SPECTRAL TAC DESIGN SYSTEM
   Built on: W(x) = A·x + B·mean(x)   [Schur's Lemma, 1905]
   The equilibrium state is the output. Every style reaches there.
   ════════════════════════════════════════════════════════════════════════ */

/* ── 1. Design Tokens ──────────────────────────────────────────────────── */
:root {
    /* Sepia: the thermodynamic substrate */
    --void:            #fdf6e3;
    --void-alt:        #fef8e7;
    --deep:            #faf6ea;
    --surface:         #fffdf5;
    --surface-alt:     #f9f4e8;
    --surface-raised:  #f2ead6;
    --border:          #d4b886;
    --border-bright:   #c49a5a;
    --muted-bg:        #ede4c8;

    /* Text */
    --text:            #2c1a0e;
    --text-dim:        #6b4e2c;
    --text-dimmer:     #a07840;
    --text-inverse:    #fdf6e3;

    /* Spectral primary: Saffron */
    --violet:          #c8710a;
    --violet-bright:   #e8890c;
    --violet-dim:      #7a3d05;
    --violet-glow:     rgba(200, 113, 10, 0.20);
    --violet-glow-sm:  rgba(200, 113, 10, 0.10);

    /* Spectral accents */
    --cyan:            #b84c2e;
    --cyan-bright:     #d4623d;
    --cyan-dim:        #7a2c15;
    --cyan-glow:       rgba(184, 76, 46, 0.15);

    --amber:           #d4900a;
    --amber-bright:    #f0a820;
    --amber-dim:       #5e3005;
    --amber-glow:      rgba(212, 144, 10, 0.18);

    --emerald:         #2d7a3a;
    --emerald-bright:  #3d9e4d;
    --emerald-dim:     #1a4d22;
    --emerald-glow:    rgba(45, 122, 58, 0.18);

    --rose:            #c0272d;
    --rose-bright:     #d94444;
    --rose-dim:        #7a1020;
    --rose-glow:       rgba(192, 39, 45, 0.15);

    --blue:            #1a5fa8;
    --blue-bright:     #2475c4;
    --blue-dim:        #0e3460;
    --blue-glow:       rgba(26, 95, 168, 0.15);

    /* 6 Intent Colors — the SERP intent taxonomy */
    --intent-0:        #c8710a;   /* Informational — saffron */
    --intent-1:        #d4900a;   /* Commercial Investigation — amber */
    --intent-2:        #2d7a3a;   /* Transactional — forest green */
    --intent-3:        #1a5fa8;   /* Navigational — blue */
    --intent-4:        #b84c2e;   /* Local — rust */
    --intent-5:        #c0272d;   /* Visual / Media — rose */

    /* TAC freshness states */
    --fresh:           #2d7a3a;
    --stale:           #c0272d;
    --trending:        #d4900a;

    /* Typography */
    --font-sans:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-mono:       'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;
    --font-display:    'Inter', system-ui, sans-serif;

    /* Type scale */
    --text-xs:         0.75rem;
    --text-sm:         0.875rem;
    --text-base:       1rem;
    --text-lg:         1.125rem;
    --text-xl:         1.25rem;
    --text-2xl:        1.5rem;
    --text-3xl:        1.875rem;
    --text-4xl:        2.25rem;
    --text-5xl:        3rem;
    --text-6xl:        3.75rem;

    /* Spacing */
    --space-1:  0.25rem;
    --space-2:  0.5rem;
    --space-3:  0.75rem;
    --space-4:  1rem;
    --space-5:  1.25rem;
    --space-6:  1.5rem;
    --space-8:  2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* Layout */
    --max-width:       1280px;
    --reading-width:   720px;
    --wide-width:      1024px;

    /* Radius */
    --radius-sm:   4px;
    --radius:      8px;
    --radius-md:   12px;
    --radius-lg:   16px;
    --radius-xl:   24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm:  0 1px 3px rgba(60,30,0,0.12);
    --shadow:     0 4px 16px rgba(60,30,0,0.15);
    --shadow-lg:  0 8px 32px rgba(60,30,0,0.18);
    --shadow-xl:  0 16px 48px rgba(60,30,0,0.22);

    /* Glow effects */
    --glow-violet: 0 0 20px rgba(200,113,10,0.30), 0 0 60px rgba(200,113,10,0.10);
    --glow-cyan:   0 0 20px rgba(184,76,46,0.30), 0 0 60px rgba(184,76,46,0.10);
    --glow-amber:  0 0 20px rgba(212,144,10,0.30), 0 0 60px rgba(212,144,10,0.10);

    /* Transitions */
    --transition-fast:   150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition:        250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow:   400ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.75;
    color: var(--text);
    background-color: var(--void);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    position: relative;
}

/* Thermodynamic substrate — the background field */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 20%, rgba(200,113,10,0.06) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 80%, rgba(140,80,20,0.04) 0%, transparent 60%),
        radial-gradient(ellipse 50% 60% at 50% 50%, rgba(253,250,235,0.8) 0%, var(--void) 100%);
    pointer-events: none;
    z-index: -2;
}

img { max-width: 100%; height: auto; display: block; }
svg { display: block; }
a { color: var(--violet-bright); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--cyan-bright); }

/* ── 3. Typography ─────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
    color: var(--text);
}

h1 { font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl)); }
h2 { font-size: clamp(var(--text-2xl), 3.5vw, var(--text-4xl)); }
h3 { font-size: clamp(var(--text-xl), 2.5vw, var(--text-3xl)); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p { margin-bottom: var(--space-4); color: var(--text); }

code, kbd, samp, pre {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

:not(pre) > code {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    padding: 0.15em 0.45em;
    border-radius: var(--radius-sm);
    color: var(--cyan-bright);
    font-size: 0.85em;
}

pre {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--violet);
    border-radius: var(--radius);
    padding: var(--space-6);
    overflow-x: auto;
    margin: var(--space-8) 0;
    position: relative;
}

pre code {
    color: var(--text);
    background: none;
    border: none;
    padding: 0;
    font-size: var(--text-sm);
}

pre::before {
    content: 'STATE T=' attr(data-layer);
    position: absolute;
    top: var(--space-2);
    right: var(--space-3);
    font-size: var(--text-xs);
    color: var(--text-dimmer);
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
}

blockquote {
    margin: var(--space-8) 0;
    padding: var(--space-6) var(--space-8);
    background: linear-gradient(135deg, var(--surface) 0%, rgba(200,113,10,0.05) 100%);
    border-left: 3px solid var(--violet);
    border-radius: 0 var(--radius) var(--radius) 0;
    position: relative;
}

blockquote::before {
    content: 'THEOREM';
    position: absolute;
    top: var(--space-3);
    right: var(--space-4);
    font-size: var(--text-xs);
    font-family: var(--font-mono);
    color: var(--violet);
    letter-spacing: 0.1em;
    font-weight: 600;
    opacity: 0.7;
}

blockquote p {
    font-style: italic;
    color: var(--text);
    font-size: var(--text-lg);
    margin: 0;
}

blockquote cite {
    display: block;
    margin-top: var(--space-3);
    font-size: var(--text-sm);
    color: var(--text-dim);
    font-style: normal;
}

blockquote cite::before { content: '— '; }

ul, ol {
    padding-left: var(--space-6);
    margin-bottom: var(--space-4);
}

li { margin-bottom: var(--space-2); }

hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--border-bright) 30%, var(--violet-dim) 50%, var(--border-bright) 70%, transparent 100%);
    margin: var(--space-12) 0;
    position: relative;
}

hr::after {
    content: '⬡';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--void);
    padding: 0 var(--space-3);
    color: var(--violet);
    font-size: var(--text-xs);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-8) 0;
    font-size: var(--text-sm);
}

thead tr {
    background: var(--surface-raised);
    border-bottom: 2px solid var(--violet-dim);
}

th {
    padding: var(--space-3) var(--space-4);
    text-align: left;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.05em;
    font-size: var(--text-xs);
    text-transform: uppercase;
}

td {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border);
    color: var(--text-dim);
}

tr:hover td { background: var(--surface); color: var(--text); transition: all var(--transition-fast); }

/* ── 4. Layout ─────────────────────────────────────────────────────────── */
.spectral-wrap {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.spectral-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--space-12);
    align-items: start;
    padding: var(--space-12) 0;
}

.spectral-layout.no-sidebar {
    grid-template-columns: 1fr;
    max-width: var(--reading-width);
    margin: 0 auto;
}

.spectral-main { min-width: 0; }
.spectral-sidebar { position: sticky; top: calc(var(--space-6) + 72px); }

/* ── 5. TAC Canvas Background ──────────────────────────────────────────── */
#tac-field {
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0.6;
    pointer-events: none;
}

/* ── 6. Site Header ────────────────────────────────────────────────────── */
.spectral-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(253, 246, 227, 0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    height: 72px;
}

.spectral-header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-6);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-8);
}

/* Site branding */
.spectral-brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
}

.spectral-brand-mark {
    width: 38px;
    height: 38px;
    position: relative;
    flex-shrink: 0;
}

.spectral-brand-mark svg {
    width: 100%;
    height: 100%;
}

.spectral-brand-name {
    font-weight: 700;
    font-size: var(--text-lg);
    color: var(--text);
    letter-spacing: -0.03em;
    line-height: 1;
}

.spectral-brand-tagline {
    font-size: var(--text-xs);
    color: var(--text-dimmer);
    font-family: var(--font-mono);
    margin-top: 2px;
}

/* Main nav */
.spectral-nav {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.spectral-nav a {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-dim);
    transition: all var(--transition-fast);
}

.spectral-nav a:hover,
.spectral-nav a.current-menu-item,
.spectral-nav li.current-menu-item > a {
    background: var(--surface-raised);
    color: var(--text);
}

.spectral-nav a.current-menu-item,
.spectral-nav li.current-menu-item > a {
    color: var(--violet-bright);
}

/* wp_nav_menu outputs <ul><li> — strip defaults so it renders as flex row */
.spectral-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--space-1);
    flex-wrap: wrap;
}

.spectral-nav ul li {
    margin: 0;
    padding: 0;
    position: relative;
}

/* Highlight current category / page ancestor in nav */
.spectral-nav .current-menu-item > a,
.spectral-nav .current-menu-ancestor > a,
.spectral-nav .current-page-ancestor > a,
.spectral-nav .current-post-ancestor > a,
.spectral-nav .current-category-ancestor > a {
    color: var(--violet-bright);
    background: var(--surface-raised);
}

/* Header TAC status */
.spectral-header-status {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.tac-status-node {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-family: var(--font-mono);
    color: var(--text-dim);
}

.tac-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--emerald);
    animation: tac-pulse 2s ease-in-out infinite;
}

@keyframes tac-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(45,122,58,0.40); }
    50% { opacity: 0.8; box-shadow: 0 0 0 4px rgba(45,122,58,0); }
}

/* Mobile menu toggle */
.spectral-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: var(--space-2);
    border-radius: var(--radius);
}

/* ── 7. Breadcrumbs ────────────────────────────────────────────────────── */
.spectral-breadcrumbs {
    padding: var(--space-4) 0 var(--space-2);
}

.breadcrumb-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    font-size: var(--text-xs);
    font-family: var(--font-mono);
    color: var(--text-dimmer);
    letter-spacing: 0.04em;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.breadcrumb-item a {
    color: var(--text-dim);
    text-decoration: none;
    border-bottom: none;
    padding: 2px 4px;
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast);
}

.breadcrumb-item a:hover { color: var(--violet-bright); }

.breadcrumb-item.current span {
    color: var(--violet-bright);
    padding: 2px 4px;
}

.breadcrumb-sep {
    color: var(--text-dimmer);
    font-size: var(--text-xs);
    padding: 0 2px;
    user-select: none;
    list-style: none;
}

/* ── 8. Reading Progress ───────────────────────────────────────────────── */
.spectral-progress {
    position: fixed;
    top: 72px;
    left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, var(--violet) 0%, var(--cyan) 100%);
    z-index: 99;
    transition: width 100ms linear;
    box-shadow: 0 0 8px var(--violet-glow);
}

/* ── 8. Hero / Page Header ─────────────────────────────────────────────── */
.spectral-hero {
    padding: var(--space-24) var(--space-6) var(--space-16);
    text-align: center;
    position: relative;
}

.spectral-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--violet), var(--cyan), transparent);
}

.spectral-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
    font-family: var(--font-mono);
    color: var(--violet-bright);
    letter-spacing: 0.08em;
    margin-bottom: var(--space-6);
}

.spectral-hero-eyebrow::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--violet-bright);
    animation: tac-pulse 2s ease-in-out infinite;
}

.spectral-hero h1 {
    max-width: 800px;
    margin: 0 auto var(--space-6);
    background: linear-gradient(135deg, var(--text) 0%, var(--text-dim) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.spectral-hero-desc {
    max-width: 580px;
    margin: 0 auto var(--space-8);
    color: var(--text-dim);
    font-size: var(--text-lg);
    line-height: 1.6;
}

/* ── 9. Cards ──────────────────────────────────────────────────────────── */
.spectral-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.spectral-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--violet-glow-sm), transparent);
    opacity: 0;
    transition: opacity var(--transition);
}

.spectral-card:hover {
    border-color: var(--border-bright);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(200,113,10,0.08);
}

.spectral-card:hover::before {
    opacity: 1;
}

/* Post card */
.post-card {
    display: grid;
    grid-template-rows: auto 1fr auto;
}

.post-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
    gap: var(--space-3);
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.post-card-title {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text);
    margin: 0 0 var(--space-3);
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.post-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.post-card-title a:hover { color: var(--violet-bright); }

.post-card-excerpt {
    color: var(--text-dim);
    font-size: var(--text-sm);
    line-height: 1.7;
    margin: 0 0 var(--space-4);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-4);
    border-top: 1px solid var(--border);
}

/* Featured post card */
.post-card-featured {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--surface) 0%, rgba(200,113,10,0.05) 100%);
    border-color: var(--border-bright);
}

.post-card-featured .post-card-title {
    font-size: var(--text-2xl);
}

/* Post grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--space-6);
}

/* ── 10. Intent Badges ─────────────────────────────────────────────────── */
.intent-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1px solid currentColor;
}

.intent-badge-icon {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.8;
}

.intent-0 { color: var(--violet);  background: rgba(200,113,10,0.10);  border-color: rgba(200,113,10,0.30); }
.intent-1 { color: var(--amber);   background: rgba(212,144,10,0.10);  border-color: rgba(212,144,10,0.30); }
.intent-2 { color: var(--emerald); background: rgba(45,122,58,0.10);   border-color: rgba(45,122,58,0.30); }
.intent-3 { color: var(--blue);    background: rgba(26,95,168,0.10);   border-color: rgba(26,95,168,0.30); }
.intent-4 { color: var(--cyan);    background: rgba(184,76,46,0.10);   border-color: rgba(184,76,46,0.30); }
.intent-5 { color: var(--rose);    background: rgba(192,39,45,0.10);   border-color: rgba(192,39,45,0.30); }

/* Freshness badges */
.freshness-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-family: var(--font-mono);
    font-weight: 600;
}

.freshness-badge.fresh    { color: var(--emerald); background: rgba(45,122,58,0.10); }
.freshness-badge.stale    { color: var(--rose);    background: rgba(192,39,45,0.10); }
.freshness-badge.trending { color: var(--amber);   background: rgba(212,144,10,0.10); }
.freshness-badge::before  { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* ── 11. Spectral Score Ring ───────────────────────────────────────────── */
.spectral-score-ring {
    position: relative;
    width: 80px;
    height: 80px;
}

.spectral-score-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.spectral-score-ring .ring-bg {
    fill: none;
    stroke: var(--border);
    stroke-width: 6;
}

.spectral-score-ring .ring-fill {
    fill: none;
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.spectral-score-ring .ring-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
}

.spectral-score-ring .ring-value {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

.spectral-score-ring .ring-max {
    font-size: var(--text-xs);
    color: var(--text-dimmer);
}

/* ── 12. Single Post Layout ────────────────────────────────────────────── */
.post-header {
    padding: var(--space-16) 0 var(--space-10);
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--space-10);
}

.post-state-vector {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-bottom: var(--space-6);
}

.post-state-label {
    font-size: var(--text-xs);
    font-family: var(--font-mono);
    color: var(--text-dimmer);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.post-title {
    font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
    margin: 0 0 var(--space-6);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.post-description {
    font-size: var(--text-xl);
    color: var(--text-dim);
    margin: 0 0 var(--space-6);
    line-height: 1.6;
    max-width: 680px;
}

.post-meta-bar {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex-wrap: wrap;
    font-size: var(--text-sm);
    color: var(--text-dim);
}

.post-meta-separator {
    color: var(--text-dimmer);
}

.post-author {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.post-author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border-bright);
    overflow: hidden;
    background: var(--surface-raised);
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-author-name {
    font-weight: 500;
    color: var(--text);
}

.reading-time {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
}

/* ── 13. Post Content ──────────────────────────────────────────────────── */
.entry-content {
    max-width: var(--reading-width);
    font-size: var(--text-base);
    line-height: 1.8;
}

.entry-content h2 {
    margin: var(--space-12) 0 var(--space-4);
    font-size: var(--text-3xl);
    position: relative;
    padding-top: var(--space-8);
}

.entry-content h2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--violet), var(--cyan));
    border-radius: 2px;
}

.entry-content h3 {
    margin: var(--space-10) 0 var(--space-3);
    font-size: var(--text-2xl);
}

.entry-content h4 {
    margin: var(--space-8) 0 var(--space-3);
    font-size: var(--text-xl);
    color: var(--text-dim);
}

.entry-content strong {
    color: var(--text);
    font-weight: 600;
    position: relative;
}

/* Spectral highlight on key terms */
.entry-content strong.spectral-term {
    color: var(--violet-bright);
    text-shadow: 0 0 20px rgba(200,113,10,0.30);
}

.entry-content a {
    color: var(--violet-bright);
    border-bottom: 1px solid rgba(200,113,10,0.30);
    transition: all var(--transition-fast);
}

.entry-content a:hover {
    color: var(--cyan-bright);
    border-color: rgba(184,76,46,0.50);
}

.entry-content ul, .entry-content ol {
    margin-bottom: var(--space-6);
}

.entry-content li {
    margin-bottom: var(--space-2);
    padding-left: var(--space-2);
}

.entry-content ul li::marker {
    color: var(--violet);
}

/* ── 14. TOC — Orbital Navigator ───────────────────────────────────────── */
.spectral-toc {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin-bottom: var(--space-6);
}

.spectral-toc-title {
    font-size: var(--text-xs);
    font-family: var(--font-mono);
    color: var(--text-dimmer);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.spectral-toc-title::before {
    content: '';
    width: 8px;
    height: 8px;
    border: 2px solid var(--violet);
    border-radius: 50%;
}

.spectral-toc ol, .spectral-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.spectral-toc li { margin: 0; }

.spectral-toc a {
    display: block;
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    color: var(--text-dim);
    border-left: 2px solid transparent;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    transition: all var(--transition-fast);
    line-height: 1.4;
}

.spectral-toc a:hover,
.spectral-toc a.toc-active {
    color: var(--violet-bright);
    border-color: var(--violet);
    background: var(--violet-glow-sm);
}

.spectral-toc .toc-h3 > a {
    padding-left: var(--space-6);
    font-size: var(--text-xs);
}

/* ── 15. Sidebar ───────────────────────────────────────────────────────── */
.sidebar-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin-bottom: var(--space-5);
}

.sidebar-section-title {
    font-size: var(--text-xs);
    font-family: var(--font-mono);
    color: var(--text-dimmer);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-section-title .title-badge {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 1px 8px;
    font-size: 10px;
    color: var(--violet-bright);
}

/* Spectral audit panel */
.spectral-audit-panel .audit-score-row {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}

.spectral-audit-panel .audit-gaps {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.audit-gap-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3);
    background: var(--surface-raised);
    border-radius: var(--radius);
    border-left: 2px solid var(--rose);
}

.audit-gap-icon {
    font-size: var(--text-sm);
    flex-shrink: 0;
    margin-top: 1px;
}

.audit-gap-text {
    font-size: var(--text-xs);
    color: var(--text-dim);
    line-height: 1.4;
}

.audit-gap-text strong {
    display: block;
    color: var(--text);
    margin-bottom: 2px;
}

/* Authority meter */
.authority-meter {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.authority-bar-row {
    display: grid;
    grid-template-columns: 100px 1fr 32px;
    gap: var(--space-3);
    align-items: center;
    font-size: var(--text-xs);
}

.authority-bar-label { color: var(--text-dim); }

.authority-bar-track {
    height: 4px;
    background: var(--border);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.authority-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--violet) 0%, var(--cyan) 100%);
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.authority-bar-value {
    color: var(--text-dim);
    font-family: var(--font-mono);
    text-align: right;
}

/* ── 16. Spectral Math Block ───────────────────────────────────────────── */
.spectral-math {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-6) var(--space-8);
    margin: var(--space-8) 0;
    position: relative;
    overflow: hidden;
    font-family: var(--font-mono);
}

.spectral-math::before {
    content: attr(data-label);
    position: absolute;
    top: var(--space-3);
    right: var(--space-4);
    font-size: var(--text-xs);
    color: var(--violet-bright);
    letter-spacing: 0.08em;
    font-weight: 600;
    text-transform: uppercase;
}

.spectral-math::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--violet) 0%, var(--cyan) 100%);
}

.spectral-math p {
    margin: 0;
    color: var(--cyan-bright);
    font-size: var(--text-base);
    line-height: 2;
}

/* ── 17. TAC State Display (for posts) ─────────────────────────────────── */
.tac-state-display {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin-bottom: var(--space-6);
}

.tac-state-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
}

.tac-state-title {
    font-size: var(--text-xs);
    font-family: var(--font-mono);
    color: var(--text-dimmer);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.tac-state-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
}

.tac-state-item {
    background: var(--surface-raised);
    border-radius: var(--radius);
    padding: var(--space-3);
}

.tac-state-key {
    font-size: var(--text-xs);
    color: var(--text-dimmer);
    font-family: var(--font-mono);
    margin-bottom: var(--space-1);
    letter-spacing: 0.05em;
}

.tac-state-value {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

/* ── 18. Content Templates ─────────────────────────────────────────────── */

/* Informational template */
.template-informational .entry-content h2 { color: var(--violet-bright); }
.template-informational .post-header { border-color: rgba(200,113,10,0.20); }

/* Comparison template */
.template-comparison .comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
    margin: var(--space-8) 0;
}

.comparison-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
}

.comparison-card.winner {
    border-color: var(--emerald);
    background: linear-gradient(135deg, var(--surface), rgba(45,122,58,0.05));
}

.comparison-card.winner::before {
    content: 'RECOMMENDED';
    display: block;
    font-size: var(--text-xs);
    font-family: var(--font-mono);
    color: var(--emerald);
    letter-spacing: 0.1em;
    margin-bottom: var(--space-3);
}

.comparison-pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    margin: var(--space-6) 0;
}

.pros-col, .cons-col {
    background: var(--surface);
    border-radius: var(--radius);
    padding: var(--space-4);
}

.pros-col { border-left: 3px solid var(--emerald); }
.cons-col { border-left: 3px solid var(--rose); }

.pros-col h4 { color: var(--emerald); font-size: var(--text-sm); margin-bottom: var(--space-3); }
.cons-col h4 { color: var(--rose);    font-size: var(--text-sm); margin-bottom: var(--space-3); }

/* Transactional template */
.template-transactional .buy-cta-box {
    background: linear-gradient(135deg, var(--surface) 0%, rgba(45,122,58,0.06) 100%);
    border: 1px solid rgba(45,122,58,0.30);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    margin: var(--space-10) 0;
    text-align: center;
}

/* Visual template */
.template-visual .entry-content figure {
    margin: var(--space-8) 0;
    position: relative;
}

.template-visual .entry-content figure img {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    width: 100%;
}

.template-visual .entry-content figure figcaption {
    text-align: center;
    font-size: var(--text-sm);
    color: var(--text-dimmer);
    margin-top: var(--space-2);
    font-style: italic;
}

/* ── 19. Buttons ───────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: var(--text-sm);
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    background: var(--violet);
    color: #fff;
    box-shadow: 0 0 20px rgba(200,113,10,0.30);
}

.btn-primary:hover {
    background: var(--violet-bright);
    color: #fff;
    box-shadow: 0 0 30px rgba(200,113,10,0.50), 0 4px 12px rgba(60,30,0,0.15);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--surface-raised);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--border-bright);
    background: var(--muted-bg);
    color: var(--text);
}

.btn-ghost {
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border-bright);
}

.btn-sm { padding: var(--space-2) var(--space-4); font-size: var(--text-xs); }
.btn-lg { padding: var(--space-4) var(--space-8); font-size: var(--text-base); }

/* ── 20. Category Pills ────────────────────────────────────────────────── */
.cat-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 12px;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--text-dim);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.cat-pill:hover {
    border-color: var(--violet);
    color: var(--violet-bright);
    background: var(--violet-glow-sm);
}

/* ── 21. Post Navigation ───────────────────────────────────────────────── */
.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    margin: var(--space-16) 0;
    padding: var(--space-8) 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.post-nav-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    transition: all var(--transition);
    text-decoration: none;
}

.post-nav-item:hover {
    border-color: var(--violet);
    background: linear-gradient(135deg, var(--surface), var(--violet-glow-sm));
}

.post-nav-direction {
    font-size: var(--text-xs);
    font-family: var(--font-mono);
    color: var(--text-dimmer);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: var(--space-2);
}

.post-nav-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
}

.post-nav-item.next { text-align: right; }

/* ── 22. Comments ──────────────────────────────────────────────────────── */
.spectral-comments {
    margin-top: var(--space-16);
    padding-top: var(--space-10);
    border-top: 1px solid var(--border);
}

.comment-list { list-style: none; padding: 0; margin: 0 0 var(--space-8); }

.comment {
    margin-bottom: var(--space-6);
    padding: var(--space-5);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border-bright);
    overflow: hidden;
}

.comment-author { font-weight: 600; font-size: var(--text-sm); color: var(--text); }
.comment-date   { font-size: var(--text-xs); color: var(--text-dimmer); font-family: var(--font-mono); }

.comment-content p { font-size: var(--text-sm); color: var(--text-dim); margin-bottom: var(--space-2); }

.comment-reply a {
    font-size: var(--text-xs);
    font-family: var(--font-mono);
    color: var(--violet-bright);
    letter-spacing: 0.05em;
}

/* Comment form */
.comment-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
}

.comment-form label {
    display: block;
    font-size: var(--text-xs);
    font-family: var(--font-mono);
    color: var(--text-dimmer);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: var(--space-2);
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-3) var(--space-4);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    transition: border-color var(--transition-fast);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--violet);
    box-shadow: 0 0 0 3px var(--violet-glow-sm);
}

.comment-form textarea { min-height: 120px; resize: vertical; }

.comment-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.comment-form .form-group { margin-bottom: var(--space-4); }

.comment-form .submit input[type="submit"] {
    width: auto;
    background: var(--violet);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    padding: var(--space-3) var(--space-8);
}

.comment-form .submit input[type="submit"]:hover {
    background: var(--violet-bright);
    box-shadow: var(--glow-violet);
}

/* ── 23. Search ────────────────────────────────────────────────────────── */
.search-form {
    display: flex;
    gap: var(--space-3);
    max-width: 480px;
}

.search-field {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-3) var(--space-4);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    outline: none;
    transition: border-color var(--transition-fast);
}

.search-field:focus {
    border-color: var(--violet);
    box-shadow: 0 0 0 3px var(--violet-glow-sm);
}

.search-field::placeholder { color: var(--text-dimmer); }

/* ── 24. Pagination ────────────────────────────────────────────────────── */
.spectral-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    margin: var(--space-12) 0;
}

.spectral-pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-dim);
    background: var(--surface);
    border: 1px solid var(--border);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.spectral-pagination .page-numbers:hover,
.spectral-pagination .page-numbers.current {
    background: var(--violet);
    border-color: var(--violet);
    color: #fff;
    box-shadow: 0 0 12px rgba(200,113,10,0.40);
}

/* ── 25. 404 Page ──────────────────────────────────────────────────────── */
.spectral-404 {
    text-align: center;
    padding: var(--space-24) var(--space-6);
    max-width: 600px;
    margin: 0 auto;
}

.spectral-404 .error-code {
    font-size: clamp(80px, 20vw, 160px);
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, var(--violet) 0%, var(--cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-4);
    display: block;
    letter-spacing: -0.05em;
}

.spectral-404-equation {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--text-dimmer);
    margin-bottom: var(--space-8);
    padding: var(--space-3) var(--space-6);
    background: var(--surface);
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    display: inline-block;
}

/* ── 26. Footer ────────────────────────────────────────────────────────── */
.spectral-footer {
    border-top: 1px solid var(--border);
    padding: var(--space-16) 0 var(--space-8);
    margin-top: var(--space-24);
    position: relative;
}

.spectral-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--violet), var(--cyan), transparent);
}

.spectral-footer-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-6);
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-12);
    margin-bottom: var(--space-12);
}

.footer-brand { }

.footer-brand-name {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text);
    margin-bottom: var(--space-3);
    letter-spacing: -0.03em;
}

.footer-brand-desc {
    font-size: var(--text-sm);
    color: var(--text-dimmer);
    line-height: 1.7;
    margin-bottom: var(--space-4);
    max-width: 280px;
}

.footer-manifesto {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-dimmer);
    line-height: 1.8;
    border-left: 2px solid var(--violet-dim);
    padding-left: var(--space-4);
    margin-top: var(--space-4);
}

.footer-col-title {
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: var(--space-4);
    font-family: var(--font-mono);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li { margin-bottom: var(--space-2); }

.footer-links a {
    font-size: var(--text-sm);
    color: var(--text-dimmer);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-links a:hover { color: var(--violet-bright); }

.spectral-footer-bottom {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--space-6) var(--space-6) 0;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.footer-bottom-text {
    font-size: var(--text-xs);
    color: var(--text-dimmer);
    font-family: var(--font-mono);
}

.footer-schur {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--violet-bright);
    opacity: 0.6;
}

/* ── 27. TAC Dashboard Indicators ──────────────────────────────────────── */
.tac-equilibrium-bar {
    position: relative;
    height: 6px;
    background: var(--border);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin: var(--space-3) 0;
}

.tac-equilibrium-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--rose) 0%, var(--amber) 40%, var(--emerald) 80%, var(--cyan) 100%);
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.tac-entropy-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--text-xs);
    font-family: var(--font-mono);
    color: var(--text-dimmer);
}

/* ── 28. Spectral Cluster Map ───────────────────────────────────────────── */
.cluster-map {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-3);
}

.cluster-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-family: var(--font-mono);
    background: var(--surface-raised);
    border: 1px solid var(--border);
    color: var(--text-dim);
    transition: all var(--transition-fast);
    cursor: default;
}

.cluster-pill.covered {
    background: rgba(45,122,58,0.08);
    border-color: rgba(45,122,58,0.30);
    color: var(--emerald);
}

.cluster-pill.gap {
    background: rgba(192,39,45,0.08);
    border-color: rgba(192,39,45,0.30);
    color: var(--rose);
}

/* ── 29. Related Posts ──────────────────────────────────────────────────── */
.related-posts {
    margin-top: var(--space-16);
    padding-top: var(--space-10);
    border-top: 1px solid var(--border);
}

.related-posts-title {
    font-size: var(--text-xs);
    font-family: var(--font-mono);
    color: var(--text-dimmer);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: var(--space-6);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.related-posts-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
}

.related-post-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    transition: all var(--transition);
    text-decoration: none;
}

.related-post-card:hover {
    border-color: var(--border-bright);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.related-post-category {
    display: block;
    font-size: 10px;
    font-family: var(--font-mono);
    color: var(--violet-bright);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: var(--space-2);
}

.related-post-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    margin: 0;
}

/* ── 30. Admin: TAC Metabox ─────────────────────────────────────────────── */
.tac-metabox-wrap { padding: 12px; }

.tac-score-display {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding: 12px;
    background: #faf6ea;
    border-radius: 8px;
    border: 1px solid #d4b886;
}

.tac-score-number {
    font-size: 36px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    color: #2c1a0e;
    line-height: 1;
}

.tac-score-label {
    font-size: 11px;
    color: #a07840;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tac-gaps-list { list-style: none; padding: 0; margin: 0; }

.tac-gap-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 8px 10px;
    margin-bottom: 4px;
    background: #fffdf5;
    border-radius: 6px;
    border-left: 2px solid #c0272d;
    font-size: 12px;
}

.tac-gap-item.medium { border-left-color: #d4900a; }
.tac-gap-item.low    { border-left-color: #2d7a3a; }

.tac-gap-label { color: #2c1a0e; font-weight: 600; }
.tac-gap-desc  { color: #6b4e2c; margin-top: 2px; }

.tac-writing-checklist { margin-top: 12px; }

.tac-check-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #d4b886;
    font-size: 12px;
    color: #6b4e2c;
}

.tac-check-item.passed { color: #2d7a3a; }
.tac-check-item.failed { color: #c0272d; }

.tac-check-icon { font-size: 14px; flex-shrink: 0; }

/* ── 31. Animations ─────────────────────────────────────────────────────── */
@keyframes spectral-enter {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spectral-float {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-6px); }
}

@keyframes spectral-glow-pulse {
    0%, 100% { box-shadow: 0 0 10px rgba(200,113,10,0.20); }
    50%       { box-shadow: 0 0 20px rgba(200,113,10,0.40), 0 0 40px rgba(200,113,10,0.10); }
}

@keyframes thermal-relax {
    from {
        background-position: 0% 50%;
    }
    to {
        background-position: 100% 50%;
    }
}

.animate-enter { animation: spectral-enter 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards; }

/* Staggered animation for post cards */
.posts-grid .spectral-card:nth-child(1) { animation: spectral-enter 0.4s 0.1s both; }
.posts-grid .spectral-card:nth-child(2) { animation: spectral-enter 0.4s 0.2s both; }
.posts-grid .spectral-card:nth-child(3) { animation: spectral-enter 0.4s 0.3s both; }
.posts-grid .spectral-card:nth-child(n+4) { animation: spectral-enter 0.4s 0.4s both; }

/* ── 32. Utility Classes ────────────────────────────────────────────────── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.text-violet  { color: var(--violet-bright); }
.text-cyan    { color: var(--cyan-bright); }
.text-amber   { color: var(--amber); }
.text-emerald { color: var(--emerald); }
.text-rose    { color: var(--rose); }
.text-dim     { color: var(--text-dim); }
.text-mono    { font-family: var(--font-mono); }
.text-xs      { font-size: var(--text-xs); }
.text-sm      { font-size: var(--text-sm); }
.text-lg      { font-size: var(--text-lg); }
.text-center  { text-align: center; }

.mt-0  { margin-top: 0; }
.mb-0  { margin-bottom: 0; }
.mb-4  { margin-bottom: var(--space-4); }
.mb-6  { margin-bottom: var(--space-6); }
.mb-8  { margin-bottom: var(--space-8); }

.flex           { display: flex; }
.items-center   { align-items: center; }
.gap-2          { gap: var(--space-2); }
.gap-3          { gap: var(--space-3); }
.gap-4          { gap: var(--space-4); }
.flex-wrap      { flex-wrap: wrap; }

/* ── 33. Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .spectral-layout {
        grid-template-columns: 1fr;
    }

    .spectral-sidebar {
        position: static;
    }

    .spectral-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-8);
    }

    .related-posts-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --text-base: 0.9375rem;
    }

    .spectral-nav { display: none; }
    .spectral-menu-toggle { display: block; }

    .spectral-nav.open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--deep);
        border-bottom: 1px solid var(--border);
        padding: var(--space-4);
        z-index: 99;
        gap: var(--space-1);
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .spectral-footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .post-nav {
        grid-template-columns: 1fr;
    }

    .comparison-grid,
    .comparison-pros-cons {
        grid-template-columns: 1fr;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
    }

    .comment-form .form-row {
        grid-template-columns: 1fr;
    }

    .spectral-footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: var(--space-3);
    }
}
