/* ===================================================================
   haskell.quest — a celestial guide to pure functional programming
   Aesthetic: Muji + 1970s astronomy textbook + Baskerville
   =================================================================== */

:root {
    --midnight-amethyst: #1A0A2E;
    --midnight-deep:     #12082A;
    --kraft-parchment:   #F5ECD7;
    --sapphire-blue:     #1B4F8A;
    --ruby-red:          #9B1B30;
    --emerald-green:     #0D6B4F;
    --topaz-gold:        #C9952B;
    --dusty-lavender:    #8B7FA3;
    --celestial-cream:   #F0E8D8;

    --font-display: "Libre Baskerville", "Times New Roman", serif;
    --font-body:    "Source Sans 3", "Inter", system-ui, sans-serif;
    --font-mono:    "JetBrains Mono", "Menlo", monospace;

    --easing-overshoot: cubic-bezier(0.34, 1.56, 0.64, 1);
    --easing-quiet:     cubic-bezier(0.4, 0, 0.2, 1);

    --content-max: 38ch;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--celestial-cream);
    background: var(--midnight-amethyst);
    line-height: 1.75;
    letter-spacing: 0.01em;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

em { font-style: italic; }

/* ===================================================================
   Ambient starfield (page-wide)
   =================================================================== */
.starfield {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.starfield .star,
.overture-stars .star,
.coda-stars .star {
    position: absolute;
    left: var(--x, 50%);
    top: var(--y, 50%);
    width: var(--size, 2px);
    height: var(--size, 2px);
    background: var(--celestial-cream);
    border-radius: 50%;
    opacity: 0.8;
    animation: twinkle var(--duration, 5s) ease-in-out var(--delay, 0s) infinite;
    box-shadow: 0 0 4px rgba(240, 232, 216, 0.6);
}

.starfield .star.bright {
    box-shadow: 0 0 8px rgba(240, 232, 216, 0.9), 0 0 14px rgba(201, 149, 43, 0.4);
}

@keyframes twinkle {
    0%, 100% { opacity: 0.25; transform: scale(0.85); }
    50%      { opacity: 1;    transform: scale(1.05); }
}

/* Shooting star layer */
.shooting-star-layer {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.shooting-star {
    position: absolute;
    width: 140px;
    height: 1px;
    background: linear-gradient(90deg, rgba(240, 232, 216, 0) 0%, rgba(240, 232, 216, 0.85) 60%, rgba(201, 149, 43, 1) 100%);
    transform-origin: left center;
    opacity: 0;
    pointer-events: none;
    filter: drop-shadow(0 0 4px rgba(240, 232, 216, 0.6));
}

.shooting-star.run { animation: shoot 2s linear forwards; }

@keyframes shoot {
    0%   { opacity: 0; transform: translate(0, 0) rotate(var(--angle, 25deg)) scaleX(0.2); }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { opacity: 0; transform: translate(var(--dx, 600px), var(--dy, 300px)) rotate(var(--angle, 25deg)) scaleX(1); }
}

/* ===================================================================
   Progress rail
   =================================================================== */
.progress-rail {
    position: fixed;
    top: 50%;
    left: 28px;
    transform: translateY(-50%);
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.progress-line {
    position: relative;
    width: 1px;
    height: 220px;
    background: rgba(139, 127, 163, 0.35);
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0%;
    background: var(--sapphire-blue);
    transition: height 0.3s var(--easing-quiet);
    box-shadow: 0 0 6px rgba(27, 79, 138, 0.6);
}

.progress-dots {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.progress-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--dusty-lavender);
    opacity: 0.5;
    transition: transform 0.3s var(--easing-overshoot), opacity 0.3s var(--easing-quiet), background 0.3s var(--easing-quiet);
    cursor: pointer;
}

.progress-dot.active {
    transform: scale(1.5);
    opacity: 1;
    background: var(--topaz-gold);
    box-shadow: 0 0 10px rgba(201, 149, 43, 0.6);
}

@media (max-width: 720px) {
    .progress-rail { left: 12px; }
    .progress-line { height: 160px; }
}

/* ===================================================================
   Chapter base
   =================================================================== */
.chapter {
    position: relative;
    min-height: 100vh;
    display: grid;
    padding: 8vh 7vw;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.8s var(--easing-quiet);
}

.chapter.in-view { opacity: 1; }

.chapter-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--dusty-lavender);
    margin-bottom: 1.4rem;
}

.chapter-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    line-height: 1.15;
    letter-spacing: 0.01em;
    color: var(--celestial-cream);
    margin-bottom: 1.6rem;
}

.chapter-title em {
    font-weight: 400;
    color: var(--topaz-gold);
}

.chapter-lede {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    color: var(--dusty-lavender);
    max-width: 56ch;
    line-height: 1.7;
}

/* ===================================================================
   Overture
   =================================================================== */
.overture {
    grid-template-rows: 1fr;
    align-items: center;
    justify-items: center;
    text-align: center;
    background: radial-gradient(ellipse at 50% 60%, rgba(27, 79, 138, 0.12) 0%, var(--midnight-amethyst) 60%);
    overflow: hidden;
    opacity: 1;
}

.overture-stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.lambda-watermark {
    position: absolute;
    right: 6vw;
    top: 12vh;
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(8rem, 20vw, 22rem);
    color: var(--topaz-gold);
    opacity: 0.05;
    pointer-events: none;
    line-height: 1;
}

.overture-inner {
    position: relative;
    z-index: 3;
    max-width: 60rem;
    padding: 0 6vw;
}

.overture-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--dusty-lavender);
    margin-bottom: 2.2rem;
}

.overture-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(3rem, 10vw, 9rem);
    line-height: 1;
    letter-spacing: 0.04em;
    color: var(--celestial-cream);
    margin-bottom: 1.8rem;
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
}

.ot-word { display: inline-block; }
.ot-word--accent {
    font-style: italic;
    font-weight: 400;
    color: var(--topaz-gold);
}
.ot-dot { color: var(--ruby-red); }

.overture-sub {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.05rem, 2vw, 1.4rem);
    color: var(--celestial-cream);
    margin-bottom: 4rem;
    letter-spacing: 0.02em;
}

.overture-meta {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--dusty-lavender);
    opacity: 0.7;
}

.overture-arrow {
    margin-top: 4rem;
    color: var(--topaz-gold);
    opacity: 0.7;
    animation: drift 4s ease-in-out infinite;
}

@keyframes drift {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(8px); }
}

/* ===================================================================
   Star Map (constellation chapter)
   =================================================================== */
.starmap {
    grid-template-rows: auto 1fr;
    gap: 4vh;
    align-content: start;
    padding-top: 14vh;
}

.chapter-head {
    max-width: 64ch;
}

.constellation-wrap {
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    aspect-ratio: 800 / 520;
}

.constellation {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.constellation-lines line {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 1.6s var(--easing-quiet);
}

.starmap.in-view .constellation-lines line {
    stroke-dashoffset: 0;
}

.constellation-stars {
    position: absolute;
    inset: 0;
}

.con-star {
    position: absolute;
    left: var(--cx);
    top: var(--cy);
    transform: translate(-50%, -50%);
    background: transparent;
    border: 0;
    color: var(--celestial-cream);
    font-family: var(--font-display);
    font-style: italic;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: transform 0.3s var(--easing-overshoot);
    padding: 6px;
}

.con-star:hover { transform: translate(-50%, -50%) scale(1.8); }

.cs-glyph {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--celestial-cream);
    box-shadow: 0 0 12px rgba(240, 232, 216, 0.7), 0 0 22px rgba(201, 149, 43, 0.35);
    transition: background 0.3s var(--easing-quiet), box-shadow 0.3s var(--easing-quiet);
}

.con-star:nth-child(1) .cs-glyph { background: var(--sapphire-blue); box-shadow: 0 0 12px rgba(27,79,138,0.85); }
.con-star:nth-child(2) .cs-glyph { background: var(--celestial-cream); }
.con-star:nth-child(3) .cs-glyph { background: var(--ruby-red); box-shadow: 0 0 12px rgba(155,27,48,0.8); }
.con-star:nth-child(4) .cs-glyph { background: var(--emerald-green); box-shadow: 0 0 12px rgba(13,107,79,0.8); }
.con-star:nth-child(5) .cs-glyph { background: var(--topaz-gold); box-shadow: 0 0 12px rgba(201,149,43,0.85); }
.con-star:nth-child(6) .cs-glyph { background: var(--dusty-lavender); }
.con-star:nth-child(7) .cs-glyph { background: var(--kraft-parchment); }

.con-star:hover .cs-glyph {
    box-shadow: 0 0 18px rgba(201, 149, 43, 0.9), 0 0 30px rgba(240, 232, 216, 0.55);
}

.cs-label {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 0.78rem;
    color: var(--dusty-lavender);
    letter-spacing: 0.04em;
    transition: color 0.3s var(--easing-quiet);
    white-space: nowrap;
}

.con-star:hover .cs-label { color: var(--celestial-cream); }

.con-tooltip {
    position: absolute;
    left: 50%;
    bottom: -6%;
    transform: translateX(-50%);
    max-width: 38ch;
    padding: 1.2rem 1.5rem;
    background: var(--kraft-parchment);
    color: var(--midnight-amethyst);
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
    background-image: repeating-conic-gradient(rgba(26, 10, 46, 0.03) 0deg 1deg, transparent 1deg 4deg);
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: center;
    transition: opacity 0.3s var(--easing-quiet);
    opacity: 0.9;
}

.ct-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.04em;
    color: var(--ruby-red);
    margin-bottom: 0.4rem;
}

.ct-desc {
    color: var(--midnight-amethyst);
    font-weight: 300;
}

/* ===================================================================
   Concept chapters (asymmetric two-zone)
   =================================================================== */
.chapter-concept {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 6vw;
    align-items: center;
}

.chapter--text-left .concept-text  { grid-column: 1; padding-left: 2vw; }
.chapter--text-left .concept-canvas{ grid-column: 2; }
.chapter--text-right .concept-text  { grid-column: 2; padding-right: 2vw; }
.chapter--text-right .concept-canvas{ grid-column: 1; }

@media (max-width: 900px) {
    .chapter-concept {
        grid-template-columns: 1fr;
        gap: 4vh;
    }
    .chapter--text-left .concept-text,
    .chapter--text-right .concept-text,
    .chapter--text-left .concept-canvas,
    .chapter--text-right .concept-canvas {
        grid-column: 1;
        padding: 0;
    }
}

.concept-text {
    max-width: var(--content-max);
    justify-self: start;
}

.chapter--text-right .concept-text { justify-self: end; }

.concept-prose {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: clamp(1rem, 1.55vw, 1.15rem);
    line-height: 1.8;
    color: var(--celestial-cream);
    margin-bottom: 1.4rem;
}

.concept-prose em {
    font-family: var(--font-display);
    font-style: italic;
    color: var(--topaz-gold);
}

/* Code block */
.code-block {
    margin-top: 2rem;
    padding: 2rem;
    background: var(--midnight-deep);
    border-left: 1px solid var(--ruby-red);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9em;
    line-height: 1.6;
    color: var(--celestial-cream);
    overflow-x: auto;
    background-image: repeating-conic-gradient(rgba(245, 236, 215, 0.02) 0deg 1deg, transparent 1deg 4deg);
    transition: transform 0.3s var(--easing-quiet), box-shadow 0.3s var(--easing-quiet), border-color 0.3s var(--easing-quiet);
}

.code-block:hover {
    transform: scale(1.02);
    box-shadow: 0 0 0 1px rgba(201, 149, 43, 0.5), 0 0 24px rgba(201, 149, 43, 0.18);
}

.code-block code { font-family: inherit; }

.c-comment { color: var(--dusty-lavender); font-style: italic; }
.c-keyword { color: var(--sapphire-blue); font-weight: 500; }
.c-type    { color: var(--emerald-green); }
.c-class   { color: var(--emerald-green); font-weight: 500; }
.c-string  { color: var(--ruby-red); }
.c-num     { color: var(--topaz-gold); }
.c-fn      { color: var(--celestial-cream); }
.c-arg     { color: var(--kraft-parchment); }
.c-op      { color: var(--dusty-lavender); }

/* ===================================================================
   Concept canvas (blob illustrations)
   =================================================================== */
.concept-canvas {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 520px;
    justify-self: center;
    align-self: center;
}

.canvas-orbit {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    animation: spin 90s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.canvas-label {
    position: absolute;
    bottom: -2rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--dusty-lavender);
    white-space: nowrap;
}

.canvas-label em {
    font-family: var(--font-display);
    font-style: italic;
    color: var(--topaz-gold);
    text-transform: none;
    letter-spacing: 0;
}

.canvas-label--top    { bottom: auto; top: -2rem; }
.canvas-label--bottom { bottom: -2rem; top: auto; }

/* Blob base */
.blob {
    position: absolute;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    transition: transform 0.6s var(--easing-quiet);
    box-shadow: 0 0 40px rgba(201, 149, 43, 0.15);
    cursor: default;
}

.concept-canvas:hover .blob {
    transform: scale(1.05);
}

@keyframes morph-a {
    0%   { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    25%  { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50%  { border-radius: 50% 50% 70% 30% / 40% 60% 40% 60%; }
    75%  { border-radius: 70% 30% 50% 50% / 30% 70% 30% 70%; }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}

@keyframes morph-b {
    0%   { border-radius: 70% 30% 60% 40% / 50% 50% 50% 50%; }
    33%  { border-radius: 40% 60% 30% 70% / 70% 30% 70% 30%; }
    66%  { border-radius: 30% 70% 50% 50% / 40% 60% 40% 60%; }
    100% { border-radius: 70% 30% 60% 40% / 50% 50% 50% 50%; }
}

@keyframes morph-c {
    0%   { border-radius: 50% 50% 30% 70% / 60% 40% 60% 40%; }
    50%  { border-radius: 30% 70% 60% 40% / 40% 70% 30% 60%; }
    100% { border-radius: 50% 50% 30% 70% / 60% 40% 60% 40%; }
}

/* Types canvas: two blobs as sets connected by orbit */
.blob--types.blob-a {
    width: 48%;
    height: 48%;
    left: 8%;
    top: 18%;
    background: radial-gradient(circle at 35% 35%, var(--sapphire-blue) 0%, var(--midnight-amethyst) 80%);
    animation: morph-a 17s ease-in-out infinite;
    opacity: 0.85;
}

.blob--types.blob-b {
    width: 42%;
    height: 42%;
    right: 6%;
    bottom: 16%;
    background: radial-gradient(circle at 60% 60%, var(--emerald-green) 0%, var(--midnight-amethyst) 80%);
    animation: morph-b 19s ease-in-out infinite;
    opacity: 0.85;
}

/* Functor canvas: outer blob containing inner blob */
.blob--functor-outer {
    width: 80%;
    height: 80%;
    left: 10%;
    top: 10%;
    background: radial-gradient(circle at 40% 40%, var(--sapphire-blue) 0%, var(--emerald-green) 70%, var(--midnight-amethyst) 100%);
    animation: morph-a 20s ease-in-out infinite;
    opacity: 0.55;
}

.blob--functor-inner {
    width: 36%;
    height: 36%;
    left: 32%;
    top: 32%;
    background: radial-gradient(circle at 50% 50%, var(--ruby-red) 0%, var(--topaz-gold) 90%);
    animation: morph-b 14s ease-in-out infinite;
    box-shadow: 0 0 50px rgba(201, 149, 43, 0.4);
}

.tendril {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

/* Monad canvas: three nested blobs */
.blob--monad-1 {
    width: 90%;
    height: 90%;
    left: 5%;
    top: 5%;
    background: radial-gradient(circle at 40% 40%, rgba(27, 79, 138, 0.7) 0%, rgba(26, 10, 46, 0.9) 80%);
    animation: morph-a 21s ease-in-out infinite;
    opacity: 0.7;
}

.blob--monad-2 {
    width: 60%;
    height: 60%;
    left: 20%;
    top: 20%;
    background: radial-gradient(circle at 50% 50%, var(--emerald-green) 0%, var(--sapphire-blue) 85%);
    animation: morph-b 16s ease-in-out infinite;
    opacity: 0.85;
}

.blob--monad-3 {
    width: 28%;
    height: 28%;
    left: 36%;
    top: 36%;
    background: radial-gradient(circle at 50% 50%, var(--topaz-gold) 0%, var(--ruby-red) 90%);
    animation: morph-c 12s ease-in-out infinite;
    box-shadow: 0 0 60px rgba(201, 149, 43, 0.5);
}

/* Type Class canvas: orbiting cluster */
.tc-orbit {
    position: absolute;
    inset: 0;
    animation: spin 60s linear infinite;
}

.tc-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: var(--midnight-deep);
    border: 1px solid var(--topaz-gold);
    display: grid;
    place-items: center;
    color: var(--topaz-gold);
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.6rem;
    box-shadow: 0 0 30px rgba(201, 149, 43, 0.25);
    animation: spin 60s linear infinite reverse; /* keep label upright */
}

.blob--tc {
    width: 22%;
    height: 22%;
    background: radial-gradient(circle at 50% 50%, var(--sapphire-blue) 0%, var(--emerald-green) 90%);
    animation: morph-a 14s ease-in-out infinite;
    opacity: 0.85;
}

.tc-1 { left: 8%;  top: 18%;  background: radial-gradient(circle at 50% 50%, var(--sapphire-blue) 0%, var(--midnight-amethyst) 90%); }
.tc-2 { right: 10%; top: 12%; background: radial-gradient(circle at 50% 50%, var(--emerald-green) 0%, var(--midnight-amethyst) 90%); animation-duration: 17s; }
.tc-3 { right: 4%; bottom: 28%; background: radial-gradient(circle at 50% 50%, var(--ruby-red) 0%, var(--midnight-amethyst) 90%); animation-duration: 18s; }
.tc-4 { left: 12%; bottom: 14%; background: radial-gradient(circle at 50% 50%, var(--topaz-gold) 0%, var(--midnight-amethyst) 90%); animation-duration: 19s; }
.tc-5 { left: 4%;  top: 50%;   background: radial-gradient(circle at 50% 50%, var(--dusty-lavender) 0%, var(--midnight-amethyst) 90%); animation-duration: 16s; }

/* Lazy canvas: blob with dissolving edge */
.blob--lazy {
    width: 60%;
    height: 60%;
    left: 12%;
    top: 20%;
    background: radial-gradient(circle at 40% 40%, var(--ruby-red) 0%, var(--sapphire-blue) 90%);
    animation: morph-a 18s ease-in-out infinite;
    opacity: 0.85;
}

.blob--lazy-ghost {
    width: 50%;
    height: 50%;
    right: 8%;
    bottom: 14%;
    border-radius: 50%;
    background: transparent;
    border: 1px dashed var(--dusty-lavender);
    box-shadow: none;
    animation: morph-b 22s ease-in-out infinite, fade-in-out 7s ease-in-out infinite;
    opacity: 0.5;
}

@keyframes fade-in-out {
    0%, 100% { opacity: 0.2; }
    50%      { opacity: 0.7; }
}

/* ===================================================================
   Coda
   =================================================================== */
.coda {
    grid-template-rows: 1fr;
    align-items: center;
    justify-items: center;
    text-align: center;
    background: radial-gradient(ellipse at 50% 40%, rgba(201, 149, 43, 0.08) 0%, var(--midnight-amethyst) 60%);
    overflow: hidden;
    padding: 12vh 7vw;
}

.coda-stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.coda-inner {
    position: relative;
    z-index: 3;
    max-width: 60rem;
    display: grid;
    justify-items: center;
    gap: 1.6rem;
}

.coda-title {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(5rem, 14vw, 11rem);
    color: var(--topaz-gold);
    line-height: 1;
    text-shadow: 0 0 40px rgba(201, 149, 43, 0.4);
}

.lambda-constellation {
    width: clamp(220px, 32vw, 380px);
    height: auto;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.lambda-constellation .lc-lines line {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 1.8s var(--easing-quiet);
}

.coda.in-view .lambda-constellation .lc-lines line {
    stroke-dashoffset: 0;
}

.lc-star {
    filter: drop-shadow(0 0 4px rgba(240, 232, 216, 0.7));
    animation: twinkle 4s ease-in-out infinite;
}

.lc-star--bright {
    fill: var(--topaz-gold);
    filter: drop-shadow(0 0 10px rgba(201, 149, 43, 0.8));
}

.coda-line {
    font-family: var(--font-mono);
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    color: var(--celestial-cream);
    letter-spacing: 0.06em;
}

.coda-line em {
    font-family: var(--font-display);
    font-style: italic;
    color: var(--topaz-gold);
}

.coda-prose {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: clamp(1rem, 1.5vw, 1.1rem);
    line-height: 1.8;
    color: var(--dusty-lavender);
    max-width: 38ch;
    margin: 0 auto;
}

.coda-meta {
    margin-top: 3rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--dusty-lavender);
    opacity: 0.6;
}

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