:root {
    --paper: #0e1628;
    --ink: #e6ecf5;
    --ink-dim: #8a96b0;
    --ink-faint: #4a5470;
    --accent-pulse: #6fb7ff;
    --accent-mark: #f4d35e;
    --step-gap: 12rem;
    --rail-x: 24px;
}

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

html {
    background: var(--paper);
}

body {
    background: var(--paper);
    color: var(--ink);
    font-family: "JetBrains Mono", monospace;
    font-weight: 400;
    font-size: 0.92rem;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

/* ---- Manual header ---- */
.manual-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--paper);
    padding: 1.6rem 2rem 1.4rem 4rem;
    max-width: 640px;
    margin: 0 auto;
}

.hdr-line {
    font-family: "JetBrains Mono", monospace;
}

.hdr-title {
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--ink);
}

.hdr-sub {
    font-size: 0.78rem;
    color: var(--ink-dim);
    opacity: 0.6;
    margin-top: 0.2rem;
}

.hdr-rev {
    font-size: 0.78rem;
    color: var(--ink-dim);
    margin-top: 0.2rem;
    font-feature-settings: "tnum" 1, "zero" 1;
}

/* ---- Article / rail ---- */
main {
    position: relative;
}

.day-rail {
    position: relative;
    max-width: 640px;
    margin: 0 auto;
    padding: 8rem 2rem 12rem 4rem;
    border-left: 1px solid var(--ink-faint);
}

/* ---- Step section ---- */
.step {
    position: relative;
    margin-bottom: var(--step-gap);
}

.step:last-of-type {
    margin-bottom: 6rem;
}

/* tick: open ring by default */
.step::before {
    content: "";
    position: absolute;
    left: calc(-4rem - 0.5px);
    top: 0.55rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: 1px solid var(--ink-dim);
    background: transparent;
    transform: translateX(-3px);
}

/* perpendicular hairline tick */
.step::after {
    content: "";
    position: absolute;
    left: calc(-4rem + 0.5px);
    top: 0.78rem;
    width: 8px;
    height: 1px;
    background: var(--ink-faint);
}

/* the live "now" tick */
.step.pulse::before {
    background: var(--accent-pulse);
    border-color: var(--accent-pulse);
    animation: pulse-attention 1.4s ease-in-out infinite;
}

@keyframes pulse-attention {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
    .step.pulse::before { animation: none; opacity: 1; }
}

/* step numeral */
.step-num {
    font-family: "JetBrains Mono", monospace;
    font-weight: 500;
    font-size: 1.4rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink);
    line-height: 1.2;
}

/* timestamp, sits to the left of the rail */
.step-time {
    display: block;
    position: absolute;
    left: -4rem;
    top: -2.6rem;
    transform: translateX(-100%);
    padding-right: 1rem;
    font-family: "JetBrains Mono", monospace;
    font-weight: 500;
    font-size: 2.4rem;
    letter-spacing: 0.02em;
    color: var(--ink-dim);
    font-feature-settings: "tnum" 1, "zero" 1;
    white-space: nowrap;
}

/* body paragraph */
.step-body {
    margin-top: 1.4rem;
    font-size: 0.92rem;
    line-height: 1.75;
    color: var(--ink);
    max-width: 34rem;
}

/* labeled value block */
.value-block {
    display: grid;
    grid-template-columns: 9rem 1fr;
    row-gap: 0.4rem;
    margin-top: 1.8rem;
    font-feature-settings: "tnum" 1, "zero" 1;
    max-width: 30rem;
}

.value-block dt {
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-dim);
}

.value-block dd {
    font-size: 0.92rem;
    color: var(--ink);
}

.value-block dd .u {
    color: var(--ink-dim);
}

/* the vellum-yellow handwritten line */
.mark {
    margin-top: 1.6rem;
    font-family: "IBM Plex Sans", sans-serif;
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--accent-mark);
    opacity: 0.9;
    max-width: 32rem;
}

/* margin notes in the right gutter */
.note {
    position: absolute;
    right: -2rem;
    top: 4.5rem;
    transform: translateX(100%);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    width: 14rem;
    font-size: 0.78rem;
    line-height: 1.6;
    color: var(--ink-dim);
}

/* closing seal */
.closing-seal {
    margin-top: 4rem;
    text-align: center;
    font-family: "JetBrains Mono", monospace;
    font-size: 1.05rem;
    letter-spacing: 0.6em;
    color: var(--ink-faint);
}

/* ---- narrower viewports: drop the gutter notes inline ---- */
@media (max-width: 1100px) {
    .note {
        position: static;
        transform: none;
        width: auto;
        margin-top: 1.4rem;
    }
}

@media (max-width: 640px) {
    .day-rail {
        padding: 6rem 1.25rem 8rem 3rem;
    }
    .manual-header {
        padding: 1.2rem 1.25rem 1.1rem 3rem;
    }
    .step::before {
        left: -3rem;
    }
    .step::after {
        left: calc(-3rem + 1.5px);
    }
    .step-time {
        position: static;
        transform: none;
        padding-right: 0;
        font-size: 1.8rem;
        margin-bottom: 0.4rem;
    }
    .step-body, .mark, .value-block {
        max-width: 100%;
    }
}
