:root {
    --orange: #ffad12;
    --orange-soft: #ffc95e;
    --ink: #101010;
    --muted: #6b6b6b;
    --paper: #fffdf9;
    --cream: #fff6e8;
    --line: #ece7de;
    --panel: #fffaf2;
    --max: 1180px;
    --radius: 26px;
    --shadow: 0 20px 60px rgba(38, 27, 8, 0.06);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: radial-gradient(circle at 85% 7%, rgba(255, 173, 18, .08), transparent 22%), var(--paper);
    color: var(--ink);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

.container {
    width: min(calc(100% - 40px), var(--max));
    margin-inline: auto;
}

.site-header {
    display: flex;
    align-items: center;
    min-height: 104px;
}

.brand img {
    width: 190px;
    height: auto;
}

.mono {
    font-family: "DM Mono", monospace;
}

.eyebrow {
    color: #777;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .92rem;
    margin-bottom: 10px;
}

.hero {
    min-height: 620px;
    display: grid;
    grid-template-columns: 1.02fr .98fr;
    align-items: center;
    gap: clamp(40px, 7vw, 90px);
    padding-block: 60px 90px;
}

.hero h1 {
    font-size: clamp(3.5rem, 8vw, 7rem);
    line-height: .86;
    letter-spacing: -.075em;
    margin: 0 0 32px;
    max-width: 760px;
}

.hero h1>span {
    display: block;
}

.hero h1>span:last-child {
    font-size: .55em;
    letter-spacing: -.05em;
    margin-top: 14px;
}

.error-code {
    font-weight: 900;
}

.accent {
    color: var(--orange);
}

.hero-lead {
    font-size: clamp(1.08rem, 2vw, 1.35rem);
    line-height: 1.6;
    max-width: 680px;
    margin: 0 0 24px;
}

.status-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
    color: #555;
    font-size: .95rem;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--orange);
    box-shadow: 0 0 0 7px rgba(255, 173, 18, .16);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
    font-weight: 800;
    border-radius: 14px;
    padding: 16px 20px;
    transition: transform .2s ease, box-shadow .2s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button-primary {
    background: var(--orange);
    box-shadow: 0 12px 30px rgba(255, 173, 18, .24);
}

.button-dark {
    background: var(--ink);
    color: white;
}

.hero-visual {
    position: relative;
    min-height: 470px;
    display: grid;
    place-items: center;
}

.hero-visual::before {
    content: "";
    position: absolute;
    width: 92%;
    aspect-ratio: 1;
    border-radius: 42% 58% 59% 41% / 48% 38% 62% 52%;
    background: linear-gradient(135deg, #fff3d3, #ffe4a4);
    transform: rotate(-6deg);
}

.hero-visual::after {
    content: "";
    position: absolute;
    width: 63%;
    height: 42%;
    right: -5%;
    top: 18%;
    background: var(--orange);
    clip-path: polygon(0 50%, 100% 0, 100% 100%);
    opacity: .9;
}

.sleep-card {
    position: relative;
    z-index: 2;
    width: min(440px, 90%);
    border: 1px solid rgba(16, 16, 16, .08);
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(10px);
    border-radius: 28px;
    padding: 34px;
    box-shadow: var(--shadow);
}

.sleep-icon {
    font-size: clamp(5rem, 11vw, 8.5rem);
    text-align: center;
    margin-bottom: 14px;
    filter: grayscale(1);
}

.loader {
    height: 18px;
    padding: 3px;
    border: 2px solid var(--ink);
    border-radius: 999px;
    background: white;
    overflow: hidden;
}

.loader-fill {
    width: 12%;
    height: 100%;
    border-radius: 999px;
    background: var(--orange);
    transition: width 700ms ease;
}

.loader-meta {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 12px;
    font-size: .9rem;
}

.loader-sub {
    color: #8a8a8a;
    margin-top: 7px;
    font-size: .82rem;
}

.moon,
.zzz {
    position: absolute;
    z-index: 3;
    font-weight: 900;
}

.moon {
    top: 5%;
    right: 9%;
    font-size: 5rem;
    transform: rotate(-15deg);
}

.zzz {
    font-family: "DM Mono", monospace;
    font-size: 2rem;
}

.z1 {
    top: 20%;
    left: 18%;
    transform: rotate(-9deg);
}

.z2 {
    top: 13%;
    left: 25%;
    transform: rotate(7deg);
}

.z3 {
    top: 9%;
    left: 33%;
    transform: rotate(-3deg);
}

.section {
    padding-block: 72px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;
    margin-bottom: 28px;
}

.section-heading h2,
.tips-panel h2 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    letter-spacing: -.055em;
    margin: 0;
}

.section-heading p {
    font-size: 1.2rem;
    margin: 8px 0 0;
}

.scribble {
    font-family: "Comic Sans MS", "Bradley Hand", cursive;
    font-size: 1.4rem;
    transform: rotate(-6deg);
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: rgba(255, 255, 255, .75);
}

.stat-card {
    padding: 28px;
    min-height: 170px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-card+.stat-card {
    border-left: 1px solid var(--line);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 24px;
}

.stat-label {
    color: var(--muted);
    font-size: .9rem;
    margin-bottom: 6px;
}

.stat-card strong {
    font-size: 1.25rem;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.panel {
    border-radius: var(--radius);
    padding: clamp(24px, 4vw, 44px);
    min-height: 520px;
}

.code-panel {
    background: #f6f7f8;
    border: 1px solid #e7e9eb;
}

.panel-kicker {
    margin-bottom: 28px;
}

pre {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-family: "DM Mono", monospace;
    line-height: 1.8;
    font-size: .94rem;
}

code {
    color: #1c1c1c;
}

.tips-panel {
    background: linear-gradient(135deg, #fffaf0, #fff0c8);
    border: 1px solid #f6e2b2;
}

.tip-heading {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 25px;
}

.tip-bulb {
    font-size: 2rem;
    color: var(--orange);
}

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

.tips-list li {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 14px;
    padding: 18px 0;
    border-top: 1px solid rgba(16, 16, 16, .1);
}

.tips-list li>span {
    font-family: "DM Mono", monospace;
    color: #9a7b33;
}

.tips-list strong {
    font-size: 1.08rem;
}

.tips-list p {
    color: #5e5a51;
    margin: 6px 0 0;
    line-height: 1.55;
}

.tiny-note {
    color: #736e64;
    font-size: .8rem;
    line-height: 1.5;
    margin: 22px 0 0;
}

.support-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.support-card {
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 32px;
    background: rgba(255, 255, 255, .72);
    min-height: 280px;
}

.support-card h3 {
    font-size: 1.55rem;
    margin: 10px 0;
}

.support-card p {
    line-height: 1.6;
}

.support-icon {
    font-size: 2.2rem;
    margin-bottom: 26px;
}

.quote-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.quote-mark {
    font-size: 4rem;
    line-height: .6;
    color: var(--orange);
}

.quote-card p {
    font-family: "DM Mono", monospace;
    font-size: 1.16rem;
}

.quote-card span {
    color: var(--muted);
    font-size: .9rem;
}

.cta-card {
    background: var(--cream);
}

.mini-logo {
    width: 170px;
    margin-bottom: 24px;
}

.cta-card .button {
    margin-top: 14px;
    width: 100%;
}

footer {
    margin-top: 60px;
    padding: 25px 0;
    background: linear-gradient(155deg, var(--orange), #ffc850);
    overflow: hidden;
    position: relative;
}

.footer-inner {
    display: flex;
    justify-content: center;
}

.footer-logo {
    width: 160px;
}

@media (max-width: 900px) {
    .site-header {
        min-height: 86px;
    }
    .brand img {
        width: 155px;
    }
    .hero {
        grid-template-columns: 1fr;
        padding-top: 30px;
    }
    .hero-visual {
        min-height: 400px;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .stat-card:nth-child(3) {
        border-left: 0;
        border-top: 1px solid var(--line);
    }
    .stat-card:nth-child(4) {
        border-top: 1px solid var(--line);
    }
    .two-col,
    .support-grid {
        grid-template-columns: 1fr;
    }
    .panel {
        min-height: auto;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(calc(100% - 28px), var(--max));
    }
    .hero {
        min-height: auto;
        padding-bottom: 60px;
    }
    .hero h1 {
        font-size: clamp(3.4rem, 19vw, 5rem);
    }
    .hero h1>span:last-child {
        font-size: .47em;
        line-height: 1.05;
    }
    .hero-visual {
        min-height: 340px;
    }
    .sleep-card {
        padding: 24px;
    }
    .moon {
        font-size: 3.8rem;
        right: 2%;
    }
    .section {
        padding-block: 50px;
    }
    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }
    .scribble {
        align-self: flex-end;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .stat-card+.stat-card {
        border-left: 0;
        border-top: 1px solid var(--line);
    }
    .support-card,
    .panel {
        padding: 24px;
    }
    .button {
        width: 100%;
    }
}


/* Current Build card */

.build-card {
    background: var(--cream);
}

.build-card h3 {
    font-size: 2rem;
    margin: 8px 0 24px;
}

.system-status {
    display: grid;
    gap: 0;
}

.system-status>div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 13px 0;
    border-bottom: 1px solid rgba(16, 16, 16, .08);
}

.system-status span {
    font-size: .9rem;
}

.system-status strong {
    font-size: .8rem;
    font-weight: 500;
}

.build-update {
    margin: 22px 0 0;
    color: var(--muted);
    font-size: .8rem;
}

/* Password protected site: logout link */
.secure-logout {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 999;
    padding: 9px 12px;
    border: 1px solid rgba(16,16,16,.12);
    border-radius: 999px;
    background: rgba(255,255,255,.9);
    backdrop-filter: blur(8px);
    text-decoration: none;
    font-size: .72rem;
    box-shadow: 0 8px 24px rgba(0,0,0,.05);
}
.secure-logout:hover { transform: translateY(-1px); }
@media (max-width: 560px) {
    .secure-logout { top: 12px; right: 12px; }
}
