/* =========================================================
   TOKENS — LIGHT (default)
   ========================================================= */
:root,
[data-theme="light"] {
    --tyrian: #630330;
    --tyrian-deep: #4a0224;
    --tyrian-rich: #7a0a3f;
    --tyrian-mid: #9b1f4d;
    --tyrian-soft: #c68299;
    --tyrian-mist: #f1e5ea;

    --gold: #b8924a;
    --gold-soft: #d9b97e;
    --gold-deep: #8c6a2f;

    --bg: #faf6f0;
    --bg-alt: #f2ebe2;
    --surface: #ffffff;
    --surface-alt: #fbf7f2;
    --border: #e5ddd5;
    --border-strong: #c9bbb1;

    --ink: #1a0a12;
    --ink-soft: #4a2f38;
    --ink-mute: #7a6168;
    --ink-faint: #b8a6ab;
    --on-tyrian: #faf6f0;

    --success: #4a6b4f;
    --success-soft: #dde7dd;
    --warn: #a57a2d;
    --warn-soft: #f2e6cc;
    --danger: #a52a2a;
    --danger-soft: #f2dcdc;

    --shadow-sm: 0 1px 2px rgba(26, 10, 18, 0.05);
    --shadow-md: 0 4px 16px rgba(26, 10, 18, 0.08);
    --shadow-lg: 0 12px 40px rgba(99, 3, 48, 0.12);

    --grain-opacity: 0.05;
    --grain-blend: multiply;

    /* Pathway graph — node kind colours (light, picked for ≥4.5:1 vs white) */
    --node-enzyme:       #5a3e8f;
    --node-transporter:  #1f6b54;
    --node-receptor:     #94530f;
    --node-hormone:      #9c2956;
    --node-substrate:    #6e4fb0;
    --node-process:      #5a6473;
    --node-compartment:  #6f5f51;
    --node-regulator:    #7a5912;
    --node-label-color:  #ffffff;
    /* Pathway graph — overlay halos (light) */
    --halo-warning:      var(--danger);
    --halo-caution:      var(--warn);
    --halo-tracked:      var(--tyrian);
    --halo-genotyped:    var(--ink-mute);
    /* Pathway graph — edges */
    --edge-default:      var(--ink-faint);
    --edge-inhibits:     var(--danger);
    --edge-activates:    var(--success);

    color-scheme: light;
}

/* =========================================================
   TOKENS — DARK
   primary lifts for legibility; deep Tyrian remains as anchor
   ========================================================= */
[data-theme="dark"] {
    --tyrian: #c12865;
    --tyrian-deep: #630330;
    --tyrian-rich: #9b1f4d;
    --tyrian-mid: #d14a82;
    --tyrian-soft: #6b2540;
    --tyrian-mist: #2a1019;

    --gold: #d9b97e;
    --gold-soft: #ebd3a4;
    --gold-deep: #b8924a;

    --bg: #14070d;
    --bg-alt: #1c0c13;
    --surface: #211019;
    --surface-alt: #2a141e;
    --border: #3a1f2a;
    --border-strong: #553244;

    --ink: #f4eae7;
    --ink-soft: #d4c2c8;
    --ink-mute: #9a848c;
    --ink-faint: #5c4750;
    --on-tyrian: #ffffff;

    --success: #8ab58f;
    --success-soft: #2a3d2d;
    --warn: #e0b860;
    --warn-soft: #3d2f18;
    --danger: #e07070;
    --danger-soft: #3d1f1f;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.7);

    --grain-opacity: 0.07;
    --grain-blend: screen;

    /* Pathway graph — node kind colours (dark, lifted; labels use dark ink) */
    --node-enzyme:       #a48bdc;
    --node-transporter:  #5dc4a0;
    --node-receptor:     #e8a358;
    --node-hormone:      #e57aa3;
    --node-substrate:    #c0a8e8;
    --node-process:      #94a3b8;
    --node-compartment:  #c9b8c0;
    --node-regulator:    #e8c168;
    --node-label-color:  #14070d;
    /* Pathway graph — overlay halos (dark) */
    --halo-warning:      var(--danger);
    --halo-caution:      var(--warn);
    --halo-tracked:      var(--tyrian);
    --halo-genotyped:    var(--ink-mute);
    /* Pathway graph — edges (dark) */
    --edge-default:      var(--ink-faint);
    --edge-inhibits:     var(--danger);
    --edge-activates:    var(--success);

    color-scheme: dark;
}

/* =========================================================
   BASE
   ========================================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: "DM Sans", system-ui, sans-serif;
    background: var(--bg);
    color: var(--ink);
    font-size: 16px;
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    transition:
        background-color 0.4s ease,
        color 0.4s ease;
    position: relative;
    overflow-x: hidden;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1000;
    opacity: var(--grain-opacity);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    mix-blend-mode: var(--grain-blend);
}

/* =========================================================
   THEME TOGGLE
   ========================================================= */
.theme-toggle {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 100px;
    font-family: "DM Sans", sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--ink);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}
.theme-toggle:hover {
    background: var(--tyrian);
    color: var(--on-tyrian);
    border-color: var(--tyrian);
}
.theme-toggle::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    display: inline-block;
}

main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* =========================================================
   COVER
   ========================================================= */
.cover {
    min-height: 95vh;
    display: grid;
    grid-template-columns: 1fr;
    align-content: center;
    padding: 8rem 0 6rem;
    position: relative;
}
.cover-eyebrow {
    font-family: "DM Sans", sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    color: var(--tyrian);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
}
.cover-eyebrow::before,
.cover-eyebrow::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--tyrian);
    opacity: 0.4;
    max-width: 80px;
}
.cover h1 {
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(4rem, 13vw, 12rem);
    font-weight: 400;
    line-height: 0.9;
    letter-spacing: -0.04em;
    color: var(--tyrian);
    text-align: center;
    margin-bottom: 1rem;
}
.cover h1 em {
    font-style: italic;
    font-weight: 300;
    color: var(--ink);
}
.cover-sub {
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(1.15rem, 1.8vw, 1.55rem);
    font-style: italic;
    font-weight: 400;
    text-align: center;
    color: var(--ink-soft);
    max-width: 660px;
    margin: 0 auto;
    line-height: 1.55;
}
.cover-meta {
    margin-top: 5rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 2rem 0;
}
.meta-cell {
    text-align: center;
}
.meta-cell dt {
    font-family: "DM Sans", sans-serif;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--ink-mute);
    margin-bottom: 0.5rem;
}
.meta-cell dd {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.4rem;
    color: var(--tyrian);
    font-weight: 500;
}
.meta-cell dd em {
    font-style: italic;
}

/* The murex motif — a faint signature */
.murex-mark {
    position: absolute;
    bottom: 3rem;
    right: 2rem;
    width: 140px;
    height: 140px;
    opacity: 0.07;
    pointer-events: none;
    color: var(--tyrian);
}

/* =========================================================
   SECTIONS
   ========================================================= */
section {
    padding: 7rem 0;
    border-top: 1px solid var(--border);
    position: relative;
}
.section-header {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3rem;
    align-items: baseline;
    margin-bottom: 4rem;
}
.section-roman {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-weight: 300;
    font-size: 4.5rem;
    color: var(--gold);
    line-height: 1;
}
.section-title {
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    color: var(--ink);
    line-height: 1.1;
}
.section-title em {
    font-style: italic;
    color: var(--tyrian);
}
.section-desc {
    grid-column: 2;
    margin-top: 1rem;
    max-width: 580px;
    color: var(--ink-soft);
    font-size: 1.05rem;
    line-height: 1.65;
}

/* =========================================================
   COLOR — hero swatch + grid
   ========================================================= */
.hero-swatch {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-md);
}
@media (max-width: 720px) {
    .hero-swatch {
        grid-template-columns: 1fr;
    }
}
.hero-swatch-color {
    aspect-ratio: 16/9;
    background: #630330;
    position: relative;
}
.hero-swatch-color::before {
    content: "#630330";
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    font-family: "JetBrains Mono", monospace;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
}
.hero-swatch-color::after {
    content: "TYRIVS";
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    color: rgba(255, 255, 255, 0.55);
    font-size: 1.3rem;
    letter-spacing: 0.2em;
}
.hero-swatch-info {
    padding: 2.5rem;
    background: var(--surface);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
}
.hero-swatch-info h3 {
    font-family: "Cormorant Garamond", serif;
    font-size: 2rem;
    color: var(--ink);
    font-weight: 400;
    line-height: 1.1;
}
.hero-swatch-info h3 em {
    font-style: italic;
    color: var(--tyrian);
}
.hero-swatch-info p {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: var(--ink-soft);
    line-height: 1.65;
}
.hero-swatch-figures {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.fig {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.7rem;
}
.fig-val {
    color: var(--tyrian);
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
}
.fig-label {
    color: var(--ink-mute);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.6rem;
}

.swatch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem 1.5rem;
}
.swatch-group-title {
    grid-column: 1 / -1;
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-size: 1.25rem;
    color: var(--ink-mute);
    margin-top: 1.5rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: baseline;
    gap: 1rem;
}
.swatch-group-title:first-child {
    margin-top: 0;
}
.swatch-group-title small {
    font-family: "DM Sans", sans-serif;
    font-style: normal;
    font-size: 0.65rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--gold);
}
.swatch {
    display: flex;
    flex-direction: column;
}
.swatch-color {
    aspect-ratio: 5 / 3;
    border-radius: 2px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}
.swatch:hover .swatch-color {
    transform: translateY(-2px);
}
.swatch-color::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        transparent 60%,
        rgba(255, 255, 255, 0.06)
    );
    pointer-events: none;
}
.swatch-meta {
    margin-top: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
}
.swatch-name {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.1rem;
    color: var(--ink);
}
.swatch-hex {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.7rem;
    color: var(--ink-mute);
    text-transform: uppercase;
}

/* =========================================================
   TYPOGRAPHY
   ========================================================= */
.type-grid {
    display: grid;
    gap: 0;
}
.type-row {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 3rem;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border);
    align-items: baseline;
}
.type-row:last-child {
    border-bottom: none;
}
.type-meta {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.7rem;
    color: var(--ink-mute);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.type-meta span:first-child {
    color: var(--tyrian);
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-size: 1rem;
    letter-spacing: 0;
    text-transform: none;
}
.type-sample.display {
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1;
    font-weight: 400;
    letter-spacing: -0.02em;
    color: var(--ink);
}
.type-sample.display em {
    font-style: italic;
    color: var(--tyrian);
}
.type-sample.h1 {
    font-family: "Cormorant Garamond", serif;
    font-size: 2.5rem;
    line-height: 1.1;
    font-weight: 500;
    color: var(--ink);
}
.type-sample.h2 {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.75rem;
    line-height: 1.2;
    font-weight: 500;
    color: var(--ink);
}
.type-sample.lede {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-size: 1.35rem;
    line-height: 1.5;
    color: var(--ink-soft);
    font-weight: 400;
}
.type-sample.body {
    font-family: "DM Sans", sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--ink);
    max-width: 56ch;
}
.type-sample.small {
    font-family: "DM Sans", sans-serif;
    font-size: 0.85rem;
    color: var(--ink-mute);
}
.type-sample.label {
    font-family: "DM Sans", sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--tyrian);
    font-weight: 600;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.btn-cell {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    align-items: flex-start;
}
.btn-cell-label {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.65rem;
    color: var(--ink-mute);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 0.5rem;
    width: 100%;
    padding-bottom: 0.75rem;
    border-bottom: 1px dotted var(--border);
}
.btn-cell-label::before {
    content: "·  ";
    color: var(--gold);
}

.btn {
    font-family: "DM Sans", sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    padding: 0.85rem 1.75rem;
    border: 1px solid transparent;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}
.btn-primary {
    background: var(--tyrian);
    color: var(--on-tyrian);
    border-color: var(--tyrian);
}
.btn-primary:hover {
    background: var(--tyrian-deep);
    border-color: var(--tyrian-deep);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.btn-secondary {
    background: transparent;
    color: var(--tyrian);
    border-color: var(--tyrian);
}
.btn-secondary:hover {
    background: var(--tyrian);
    color: var(--on-tyrian);
}
.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
}
.btn-ghost {
    background: transparent;
    color: var(--ink);
    border-color: transparent;
    text-decoration: underline;
    text-decoration-color: var(--gold);
    text-underline-offset: 6px;
    text-decoration-thickness: 1px;
    padding: 0.85rem 0.5rem;
}
.btn-ghost:hover {
    text-decoration-color: var(--tyrian);
    color: var(--tyrian);
}
.btn-gold {
    background: var(--gold);
    color: #1a0a12;
    border-color: var(--gold);
}
.btn-gold:hover {
    background: var(--gold-deep);
    border-color: var(--gold-deep);
    color: var(--on-tyrian);
}
.btn-sm {
    font-size: 0.75rem;
    padding: 0.6rem 1.25rem;
}
.btn-lg {
    font-size: 1rem;
    padding: 1.05rem 2.25rem;
}
.btn-arrow {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    margin-left: 0.4rem;
    transition: transform 0.25s;
    font-size: 1.05em;
}
.btn:hover .btn-arrow {
    transform: translateX(4px);
}

/* =========================================================
   BADGES
   ========================================================= */
.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px dotted var(--border);
}
.badge {
    font-family: "DM Sans", sans-serif;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    padding: 0.4rem 0.95rem;
    border-radius: 100px;
    border: 1px solid;
    font-weight: 500;
}
.badge-tyrian {
    background: var(--tyrian);
    color: var(--on-tyrian);
    border-color: var(--tyrian);
}
.badge-outline {
    background: transparent;
    color: var(--tyrian);
    border-color: var(--tyrian);
}
.badge-gold {
    background: var(--gold);
    color: #1a0a12;
    border-color: var(--gold);
}
.badge-soft {
    background: var(--tyrian-mist);
    color: var(--tyrian);
    border-color: var(--tyrian-mist);
}
.badge-success {
    background: var(--success-soft);
    color: var(--success);
    border-color: var(--success-soft);
}

/* =========================================================
   FORMS
   ========================================================= */
.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 3rem;
    border-radius: 2px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
    box-shadow: var(--shadow-md);
}
@media (max-width: 720px) {
    .form-card {
        grid-template-columns: 1fr;
        padding: 2rem;
    }
}
.form-card h3 {
    grid-column: 1 / -1;
    font-family: "Cormorant Garamond", serif;
    font-size: 1.9rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.form-card h3 em {
    color: var(--tyrian);
    font-style: italic;
}
.form-card h3 small {
    font-family: "DM Sans", sans-serif;
    font-size: 0.65rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 500;
}
.field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.field.full {
    grid-column: 1 / -1;
}
.field label {
    font-family: "DM Sans", sans-serif;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--ink-mute);
    font-weight: 500;
}
.field input,
.field select,
.field textarea {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.1rem;
    padding: 0.7rem 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-strong);
    color: var(--ink);
    outline: none;
    transition: border-color 0.2s;
    resize: none;
    font-weight: 400;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--tyrian);
}
.field input::placeholder,
.field textarea::placeholder {
    color: var(--ink-faint);
    font-style: italic;
}
.field-row {
    grid-column: 1 / -1;
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}
.field-row.end {
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}
.checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--ink-soft);
}
.checkbox-wrap input {
    width: 18px;
    height: 18px;
    accent-color: var(--tyrian);
    cursor: pointer;
}

/* =========================================================
   CARDS — Doctor & Appointment
   ========================================================= */
.card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
@media (max-width: 720px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
}

.doctor-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}
.doctor-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}
.doctor-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 60%;
    background: var(--tyrian);
}
.doctor-portrait {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--tyrian-mist), var(--tyrian-soft));
    border: 1px solid var(--border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Cormorant Garamond", serif;
    font-size: 2.5rem;
    font-style: italic;
    font-weight: 500;
    color: var(--tyrian);
    margin-bottom: 1.5rem;
}
.doctor-name {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.8rem;
    color: var(--ink);
    font-weight: 400;
    line-height: 1.1;
}
.doctor-name em {
    font-style: italic;
}
.doctor-spec {
    font-family: "DM Sans", sans-serif;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--gold);
    margin-top: 0.4rem;
    margin-bottom: 1.2rem;
}
.doctor-bio {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-size: 1rem;
    color: var(--ink-soft);
    line-height: 1.6;
    border-left: 1px solid var(--gold);
    padding-left: 1rem;
    margin-bottom: 1.5rem;
}
.doctor-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.doctor-stat {
    text-align: center;
}
.doctor-stat-num {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.7rem;
    color: var(--tyrian);
    font-weight: 500;
    line-height: 1;
}
.doctor-stat-num em {
    font-style: italic;
}
.doctor-stat-lbl {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--ink-mute);
    margin-top: 0.4rem;
}

/* Appointment card — kept deep Tyrian in both modes */
.appt-card {
    background: #630330;
    color: #faf6f0;
    border-radius: 2px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}
.appt-card::after {
    content: "";
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.appt-card::before {
    content: "";
    position: absolute;
    bottom: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.appt-eyebrow {
    font-family: "DM Sans", sans-serif;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.appt-eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold-soft);
    box-shadow: 0 0 0 3px rgba(217, 185, 126, 0.2);
}
.appt-date {
    font-family: "Cormorant Garamond", serif;
    font-size: 3rem;
    font-weight: 300;
    line-height: 1;
    margin-bottom: 0.5rem;
}
.appt-date em {
    font-style: italic;
    color: #d9b97e;
}
.appt-time {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 0.18em;
    margin-bottom: 2rem;
}
.appt-with {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.88);
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    margin-bottom: 1.5rem;
    line-height: 1.55;
}
.appt-with strong {
    font-style: normal;
    color: #d9b97e;
    font-weight: 500;
}
.appt-actions {
    display: flex;
    gap: 0.75rem;
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
}
.btn-on-dark {
    background: #d9b97e;
    color: #4a0224;
    border-color: #d9b97e;
}
.btn-on-dark:hover {
    background: #faf6f0;
    border-color: #faf6f0;
}
.btn-on-dark-ghost {
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
}
.btn-on-dark-ghost:hover {
    border-color: white;
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

/* =========================================================
   ALERTS
   ========================================================= */
.alert-stack {
    display: grid;
    gap: 1rem;
}
.alert {
    padding: 1.1rem 1.5rem;
    border-radius: 2px;
    border-left: 3px solid;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.1rem;
    align-items: center;
    font-size: 0.95rem;
    background: var(--surface);
}
.alert-icon {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-size: 1.7rem;
    line-height: 1;
    font-weight: 500;
    width: 30px;
    text-align: center;
}
.alert-info {
    background: var(--tyrian-mist);
    border-color: var(--tyrian);
    color: var(--ink);
}
.alert-info .alert-icon {
    color: var(--tyrian);
}
.alert-success {
    background: var(--success-soft);
    border-color: var(--success);
    color: var(--ink);
}
.alert-success .alert-icon {
    color: var(--success);
}
.alert-warn {
    background: var(--warn-soft);
    border-color: var(--warn);
    color: var(--ink);
}
.alert-warn .alert-icon {
    color: var(--warn);
}
.alert-danger {
    background: var(--danger-soft);
    border-color: var(--danger);
    color: var(--ink);
}
.alert-danger .alert-icon {
    color: var(--danger);
}
.alert-close {
    background: none;
    border: none;
    color: var(--ink-mute);
    cursor: pointer;
    font-family: "Cormorant Garamond", serif;
    font-size: 1.3rem;
    padding: 0 0.4rem;
    line-height: 1;
}
.alert-close:hover {
    color: var(--ink);
}

/* =========================================================
   SAMPLE COMPOSITION
   ========================================================= */
.sample {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 2px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.sample-nav {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    background: var(--surface-alt);
}
.sample-logo {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-size: 1.4rem;
    color: var(--tyrian);
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-weight: 500;
}
.sample-logo-mark {
    display: inline-block;
    width: 26px;
    height: 26px;
    background: var(--tyrian);
    border-radius: 50%;
    position: relative;
}
.sample-logo-mark::after {
    content: "";
    position: absolute;
    inset: 5px;
    border: 1px solid var(--gold-soft);
    border-radius: 50%;
}
.sample-nav-links {
    display: flex;
    gap: 2rem;
    font-size: 0.8rem;
}
.sample-nav-links a {
    color: var(--ink-soft);
    text-decoration: none;
    font-family: "DM Sans", sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.2s;
}
.sample-nav-links a:hover {
    color: var(--tyrian);
}
@media (max-width: 720px) {
    .sample-nav-links {
        display: none;
    }
}

.sample-hero {
    padding: 5rem 2rem;
    background:
        radial-gradient(
            ellipse at top right,
            var(--tyrian-mist),
            transparent 60%
        ),
        linear-gradient(180deg, var(--surface), var(--bg-alt));
    text-align: center;
    position: relative;
}
.sample-hero-eyebrow {
    font-family: "DM Sans", sans-serif;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.32em;
    color: var(--gold);
    margin-bottom: 1.5rem;
}
.sample-hero h1 {
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 400;
    line-height: 1.05;
    color: var(--ink);
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}
.sample-hero h1 em {
    font-style: italic;
    color: var(--tyrian);
}
.sample-hero p {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-size: 1.25rem;
    color: var(--ink-soft);
    max-width: 540px;
    margin: 0 auto 2.5rem;
    line-height: 1.55;
}
.sample-hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* =========================================================
   FOOTER
   ========================================================= */
footer {
    padding: 4rem 0 3rem;
    border-top: 1px solid var(--border);
    margin-top: 6rem;
    color: var(--ink-mute);
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
footer em {
    font-family: "Cormorant Garamond", serif;
    color: var(--tyrian);
    font-style: italic;
}
footer .latin {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    color: var(--ink-soft);
    font-size: 0.95rem;
}

/* =========================================================
   ANIMATIONS
   ========================================================= */
@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.cover-eyebrow {
    animation: rise 1.2s ease-out 0.1s backwards;
}
.cover h1 {
    animation: rise 1.2s ease-out 0s backwards;
}
.cover-sub {
    animation: rise 1.2s ease-out 0.25s backwards;
}
.cover-meta {
    animation: rise 1.2s ease-out 0.4s backwards;
}

/* =========================================================
   MOBILE
   ========================================================= */
@media (max-width: 720px) {
    .section-header {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    .section-desc {
        grid-column: 1;
    }
    .type-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 1.5rem 0;
    }
    .cover-meta {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    main {
        padding: 0 1.25rem;
    }
    section {
        padding: 5rem 0;
    }
    .theme-toggle {
        top: 1rem;
        right: 1rem;
    }
}
