/**
 * themes/signal/css/theme.css — Public layout for the Signal theme.
 * Tokens and shared components live in /assets/css/signal.css.
 */

body.site { display: flex; flex-direction: column; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; }
@media (min-width: 768px) { .wrap { padding: 0 2.25rem; } }

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 80;
    border-bottom: 1px solid transparent;
    transition: background 0.25s var(--ease), border-color 0.25s var(--ease), backdrop-filter 0.25s var(--ease);
}
.site-nav.is-scrolled, .site-nav.drawer-open {
    background: rgba(8, 8, 10, 0.78);
    backdrop-filter: saturate(140%) blur(14px);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
    border-bottom-color: var(--line);
}
.site-nav-inner { display: flex; align-items: center; gap: 2rem; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; font-weight: 600; font-size: 15px; letter-spacing: -0.015em; color: var(--fg); }
.brand img { width: 26px; height: 26px; border-radius: 7px; object-fit: cover; }
.nav-links { display: none; align-items: center; gap: 0.15rem; }
@media (min-width: 768px) { .nav-links { display: flex; } }
.nav-links a {
    position: relative;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    font-size: 13.5px;
    color: var(--fg-2);
    text-decoration: none;
    transition: color 0.18s var(--ease), background 0.18s var(--ease);
}
.nav-links a:hover { color: var(--fg); background: var(--ink-2); }
.nav-links a.is-active { color: var(--fg); }
.nav-links a.is-active::after {
    content: '';
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    bottom: -0.65rem;
    height: 2px;
    border-radius: 2px;
    background: var(--signal);
    box-shadow: 0 0 10px rgba(212, 255, 58, 0.6);
}
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 0.6rem; }
.nav-drawer { display: none; border-top: 1px solid var(--line); padding: 0.6rem 0 1rem; }
.nav-drawer a { display: block; padding: 0.7rem 0; font-size: 15px; color: var(--fg-2); text-decoration: none; border-bottom: 1px solid var(--line); }
.nav-drawer a.is-active { color: var(--signal); }
.site-nav.drawer-open .nav-drawer { display: block; }
@media (min-width: 768px) { .site-nav.drawer-open .nav-drawer { display: none; } }

main.site-main { flex: 1; }

/* ── Section scaffolding ────────────────────────────────────────────────── */
.section { padding: 4.5rem 0; }
.section + .section { border-top: 1px solid var(--line); }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 2rem; flex-wrap: wrap; }
.sec-title { margin-top: 0.7rem; font-size: clamp(26px, 3.2vw, 36px); font-weight: 600; letter-spacing: -0.035em; line-height: 1.05; }
.sec-title .serif { color: var(--signal); font-size: 1.1em; }
.link-arrow { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 13px; color: var(--fg-2); text-decoration: none; transition: color 0.18s var(--ease), gap 0.18s var(--ease); }
.link-arrow:hover { color: var(--signal); gap: 0.6rem; }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero { position: relative; padding: 5.5rem 0 3.5rem; overflow: hidden; }
.hero::before {
    content: '';
    position: absolute;
    inset: -20% -10% auto auto;
    width: 760px;
    height: 760px;
    pointer-events: none;
    background: radial-gradient(closest-side, rgba(212, 255, 58, 0.14), rgba(212, 255, 58, 0.03) 55%, transparent 75%);
    filter: blur(10px);
}
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 70% 70% at 70% 30%, #000 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 70% 70% at 70% 30%, #000 20%, transparent 75%);
    opacity: 0.6;
}
.hero > .wrap { position: relative; z-index: 1; }
.hero-title {
    margin-top: 1.4rem;
    max-width: 15ch;
    font-size: clamp(48px, 8.4vw, 116px);
    font-weight: 600;
    letter-spacing: -0.055em;
    line-height: 0.92;
    color: var(--fg);
}
.hero-title .serif { display: inline-block; color: var(--signal); font-size: 1.08em; letter-spacing: -0.03em; padding-right: 0.06em; }
.hero-lede { margin-top: 1.6rem; max-width: 52ch; font-size: 17px; line-height: 1.6; color: var(--fg-2); }
.hero-cta { margin-top: 2.2rem; display: flex; gap: 0.6rem; flex-wrap: wrap; }

.telemetry {
    margin-top: 4rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: rgba(14, 14, 17, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    overflow: hidden;
}
@media (min-width: 900px) { .telemetry { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.telemetry > div { padding: 1.15rem 1.3rem; border-color: var(--line); border-style: solid; border-width: 0; }
.telemetry > div:nth-child(odd) { border-right-width: 1px; }
.telemetry > div:nth-child(-n+2) { border-bottom-width: 1px; }
@media (min-width: 900px) {
    .telemetry > div { border-right-width: 1px; border-bottom-width: 0 !important; }
    .telemetry > div:last-child { border-right-width: 0; }
}
.tel-label { display: flex; align-items: center; gap: 0.45rem; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-3); }
.tel-value { margin-top: 0.55rem; font-family: var(--f-mono); font-size: 26px; font-weight: 500; letter-spacing: -0.04em; color: var(--fg); font-variant-numeric: tabular-nums; }
.tel-value small { font-size: 14px; color: var(--fg-3); }

/* ── Project index ──────────────────────────────────────────────────────── */
.index-list { border-top: 1px solid var(--line-2); }
.index-row {
    position: relative;
    display: grid;
    grid-template-columns: 2.4rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.25rem;
    padding: 1.4rem 0.25rem;
    border-bottom: 1px solid var(--line-2);
    text-decoration: none;
    color: inherit;
    transition: padding 0.35s var(--ease), background 0.35s var(--ease);
}
@media (min-width: 900px) { .index-row { grid-template-columns: 3rem minmax(0, 1fr) minmax(0, 1.35fr) 12.5rem; gap: 2rem; } }
.index-row::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(212, 255, 58, 0.06), transparent 60%);
    opacity: 0;
    transition: opacity 0.35s var(--ease);
    pointer-events: none;
}
.index-row:hover { padding-left: 1rem; }
.index-row:hover::before { opacity: 1; }
.idx-num { font-family: var(--f-mono); font-size: 12px; color: var(--fg-3); padding-top: 0.15rem; }
.index-row:hover .idx-num { color: var(--signal); }
.idx-name { font-size: clamp(20px, 2.2vw, 26px); font-weight: 550; letter-spacing: -0.03em; line-height: 1.15; color: var(--fg); }
.idx-host { margin-top: 0.3rem; font-family: var(--f-mono); font-size: 12px; color: var(--fg-3); }
.idx-desc { display: none; font-size: 14px; line-height: 1.55; color: var(--fg-2); }
@media (min-width: 900px) { .idx-desc { display: block; } }
.idx-meta { display: flex; align-items: center; justify-content: flex-end; gap: 0.75rem; }
.idx-ver { display: none; font-family: var(--f-mono); font-size: 11.5px; color: var(--fg-3); }
@media (min-width: 640px) { .idx-ver { display: inline; } }
.idx-arrow {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--line-2);
    color: var(--fg-2);
    transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.idx-arrow svg { width: 14px; height: 14px; }
.index-row:hover .idx-arrow { background: var(--signal); border-color: var(--signal); color: var(--signal-ink); transform: rotate(-45deg); }
.idx-tech { margin-top: 0.6rem; font-family: var(--f-mono); font-size: 11.5px; line-height: 1.55; color: var(--fg-3); }

/* ── Log feed + queue ───────────────────────────────────────────────────── */
.split { display: grid; gap: 3rem; }
@media (min-width: 960px) { .split { grid-template-columns: 1.35fr 1fr; gap: 4rem; } }

.log { position: relative; }
.log-item { position: relative; display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 1.25rem; padding: 1.15rem 0; border-bottom: 1px solid var(--line); }
.log-item:first-child { padding-top: 0.25rem; }
.log-when { font-family: var(--f-mono); font-size: 11.5px; color: var(--fg-3); padding-top: 0.2rem; }
.log-title { font-size: 15.5px; font-weight: 550; letter-spacing: -0.015em; color: var(--fg); }
.log-body { margin-top: 0.35rem; font-size: 13.5px; line-height: 1.6; color: var(--fg-2); }
.log-cat { margin-bottom: 0.5rem; }

.queue-item { display: flex; align-items: flex-start; gap: 0.85rem; padding: 0.95rem 0; border-bottom: 1px solid var(--line); }
.queue-mark { margin-top: 0.45rem; width: 8px; height: 8px; border-radius: 2px; border: 1.5px solid var(--fg-3); flex-shrink: 0; }
.queue-mark.active { border-color: var(--signal); background: var(--signal); box-shadow: 0 0 10px rgba(212, 255, 58, 0.5); }
.queue-mark.testing { border-color: var(--info); background: var(--info); }
.queue-title { font-size: 14px; font-weight: 500; color: var(--fg); line-height: 1.4; }
.queue-meta { margin-top: 0.25rem; font-family: var(--f-mono); font-size: 11px; color: var(--fg-3); letter-spacing: 0.02em; }

/* ── Status CTA band ────────────────────────────────────────────────────── */
.band {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 1.6rem 1.75rem;
    border-radius: var(--r-xl);
    border: 1px solid var(--line-2);
    background: radial-gradient(500px 160px at 0% 50%, rgba(61, 220, 151, 0.09), transparent 70%), var(--ink-1);
}
.band.degraded { background: radial-gradient(500px 160px at 0% 50%, rgba(255, 95, 87, 0.12), transparent 70%), var(--ink-1); }
.band-title { font-size: 20px; font-weight: 600; letter-spacing: -0.025em; }
.band-sub { margin-top: 0.2rem; font-size: 13px; color: var(--fg-2); }

/* ── Page header (inner pages) ──────────────────────────────────────────── */
.page-hero { position: relative; padding: 4.25rem 0 2.75rem; overflow: hidden; }
.page-hero::before {
    content: '';
    position: absolute;
    inset: -40% auto auto -10%;
    width: 640px;
    height: 640px;
    pointer-events: none;
    background: radial-gradient(closest-side, rgba(212, 255, 58, 0.08), transparent 70%);
}
.page-hero > .wrap { position: relative; }
.page-hero h1 { margin-top: 1rem; font-size: clamp(40px, 6.4vw, 78px); font-weight: 600; letter-spacing: -0.05em; line-height: 0.98; }
.page-hero h1 .serif { color: var(--signal); font-size: 1.06em; }
.page-hero .lede { margin-top: 1.1rem; max-width: 56ch; font-size: 16px; color: var(--fg-2); line-height: 1.6; }
.back-link { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 13px; color: var(--fg-3); text-decoration: none; }
.back-link:hover { color: var(--fg); }

.stat-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--ink-1); }
.stat-strip > div { padding: 1rem 1.2rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
@media (min-width: 768px) {
    .stat-strip { grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); }
    .stat-strip > div { border-bottom: 0; }
    .stat-strip > div:last-child { border-right: 0; }
}

/* ── Status page ────────────────────────────────────────────────────────── */
.status-hero h1 .ok { color: var(--ok); }
.status-hero h1 .bad { color: var(--err); }
.pulse-orb { position: relative; display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; }
.pulse-orb::before, .pulse-orb::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 1px solid currentColor; animation: sig-ping 2.6s var(--ease) infinite; }
.pulse-orb::after { animation-delay: 1.3s; }
.pulse-orb span { width: 14px; height: 14px; border-radius: 50%; background: currentColor; box-shadow: 0 0 22px currentColor; }

.svc { padding: 1.15rem 1.3rem 1rem; }
.svc + .svc { border-top: 1px solid var(--line); }
.svc-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.85rem; }
.svc-name { font-size: 14.5px; font-weight: 550; letter-spacing: -0.01em; }
.svc-host { font-family: var(--f-mono); font-size: 11.5px; color: var(--fg-3); }
.svc-pct { margin-left: auto; font-family: var(--f-mono); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.svc-axis { display: flex; justify-content: space-between; margin-top: 0.5rem; font-family: var(--f-mono); font-size: 10.5px; color: var(--fg-3); }

.gs-card { padding: 1.1rem 1.2rem; }
.kv { display: flex; justify-content: space-between; gap: 1rem; padding: 0.4rem 0; font-size: 12.5px; border-top: 1px dashed var(--line); }
.kv span:first-child { color: var(--fg-3); }
.kv span:last-child { font-family: var(--f-mono); color: var(--fg-2); }

.incident { position: relative; padding: 1.1rem 1.25rem 1.1rem 1.6rem; }
.incident + .incident { border-top: 1px solid var(--line); }
.incident::before { content: ''; position: absolute; left: 0; top: 1.1rem; bottom: 1.1rem; width: 2px; border-radius: 2px; background: var(--sev, var(--info)); }

/* ── Roadmap ────────────────────────────────────────────────────────────── */
.rm-card {
    display: block;
    padding: 1.4rem 1.4rem 1.2rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), background 0.25s var(--ease);
}
.rm-card:hover { border-color: var(--line-3); transform: translateY(-2px); }
.rm-card h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.025em; }
.rm-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.rm-nums dt { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-3); }
.rm-nums dd { margin-top: 0.2rem; font-family: var(--f-mono); font-size: 16px; color: var(--fg); }

.lane-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.85rem; }
.lane-head .count { margin-left: auto; font-family: var(--f-mono); font-size: 11px; color: var(--fg-3); }
.task { padding: 0.95rem 1.05rem; }
.task + .task { margin-top: 0.5rem; }
.task-title { font-size: 14px; font-weight: 550; letter-spacing: -0.01em; line-height: 1.4; }
.task-desc { margin-top: 0.35rem; font-size: 12.5px; line-height: 1.55; color: var(--fg-2); }
.task-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin-bottom: 0.55rem; }
.done-row { display: grid; grid-template-columns: 1rem minmax(0, 1fr) auto; gap: 0.75rem; align-items: baseline; padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.done-row .check { color: var(--ok); font-size: 12px; }

/* ── Changelog ──────────────────────────────────────────────────────────── */
.cl-month { display: grid; gap: 1.5rem; padding: 2.5rem 0; border-top: 1px solid var(--line); }
@media (min-width: 900px) { .cl-month { grid-template-columns: 220px minmax(0, 1fr); gap: 3rem; } }
.cl-label { position: sticky; top: 88px; align-self: start; }
.cl-label h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.03em; }
.cl-label h2 .serif { color: var(--fg-2); }
.cl-entry { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.3rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.cl-entry:first-child { padding-top: 0; }
.cl-entry:last-child { border-bottom: 0; }
.cl-top { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.cl-date { margin-left: auto; font-family: var(--f-mono); font-size: 11px; color: var(--fg-3); }
.cl-title { margin-top: 0.35rem; font-size: 15.5px; font-weight: 550; letter-spacing: -0.015em; color: var(--fg); }
.cl-desc { font-size: 13.5px; line-height: 1.65; color: var(--fg-2); }
.cl-filter { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.cl-filter button {
    height: 30px;
    padding: 0 0.8rem;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    background: transparent;
    color: var(--fg-2);
    font-family: var(--f-sans);
    font-size: 12.5px;
    cursor: pointer;
    transition: all 0.18s var(--ease);
}
.cl-filter button:hover { color: var(--fg); border-color: var(--line-3); }
.cl-filter button.on { background: var(--signal); border-color: var(--signal); color: var(--signal-ink); font-weight: 600; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-foot { margin-top: 5rem; border-top: 1px solid var(--line); padding: 3.5rem 0 1.75rem; background: linear-gradient(180deg, transparent, rgba(212, 255, 58, 0.015)); }
.foot-grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr 1fr; }
@media (min-width: 768px) { .foot-grid { grid-template-columns: 2fr 1fr 1fr; } }
.foot-grid > :first-child { grid-column: 1 / -1; }
@media (min-width: 768px) { .foot-grid > :first-child { grid-column: auto; } }
.foot-mark { font-size: clamp(36px, 5vw, 56px); font-weight: 600; letter-spacing: -0.05em; line-height: 1; text-decoration: none; color: var(--fg); }
.foot-tag { margin-top: 0.75rem; font-size: 14px; color: var(--fg-3); }
.foot-col { display: flex; flex-direction: column; gap: 0.55rem; }
.foot-head { margin-bottom: 0.3rem; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-3); }
.foot-col a { font-size: 14px; color: var(--fg-2); text-decoration: none; transition: color 0.18s var(--ease); }
.foot-col a:hover { color: var(--signal); }
.foot-bar { display: flex; flex-wrap: wrap; gap: 0.75rem 1.75rem; margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-family: var(--f-mono); font-size: 11.5px; color: var(--fg-3); }
.foot-bar > :last-child { margin-left: auto; }
