/* MonitorControl. One stylesheet, no framework, no build step. */

:root {
    color-scheme: dark light;

    --bg: #09090b;
    --panel: #18181b;
    --line: #27272a;
    --line-strong: #3f3f46;
    --text: #fafafa;
    --muted: #a1a1aa;
    --faint: #8b8b93;
    --on-solid: #09090b;
    --solid: #fafafa;
    --solid-hover: #e4e4e7;
    --ok: #4ade80;

    --radius: 8px;
    --radius-sm: 6px;
    --measure: 62ch;
    --shell: 1080px;
    --gap: 96px;

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Inter, system-ui, sans-serif;
    --mono: "Cascadia Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

@media (prefers-color-scheme: light) {
    :root {
        --bg: #ffffff;
        --panel: #f4f4f5;
        --line: #e4e4e7;
        --line-strong: #d4d4d8;
        --text: #09090b;
        --muted: #52525b;
        --faint: #71717a;
        --on-solid: #fafafa;
        --solid: #18181b;
        --solid-hover: #27272a;
        --ok: #16a34a;
    }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.wrap { width: min(100% - 3rem, var(--shell)); margin-inline: auto; }

a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; border-radius: 3px; }

h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.75rem); }
h3 { font-size: 1rem; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }
p, li { max-width: var(--measure); }

code {
    font-family: var(--mono);
    font-size: 0.86em;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 0.1em 0.36em;
}

pre {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem 1.15rem;
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.65;
    margin: 0 0 1rem;
}
pre code { background: none; border: 0; padding: 0; font-size: inherit; }

/* ---------- Skip link ---------- */
.skip { position: absolute; left: -9999px; background: var(--solid); color: var(--on-solid); padding: 0.6rem 1rem; border-radius: var(--radius-sm); z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid transparent; transition: border-color 0.15s; }
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; height: 56px; }

.brand { display: flex; align-items: center; gap: 0.55rem; font-weight: 600; letter-spacing: -0.01em; text-decoration: none; }
.brand img { width: 22px; height: 22px; }
.brand .mark-dark { display: none; }
@media (prefers-color-scheme: light) {
    .brand .mark-light { display: none; }
    .brand .mark-dark { display: block; }
}

.site-nav { margin-left: auto; display: flex; align-items: center; gap: 1.5rem; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.site-nav a:hover { color: var(--text); }
@media (max-width: 720px) { .site-nav .hide-narrow { display: none; } }

/* ---------- Buttons ---------- */
.button {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.625rem 1rem; min-height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-strong);
    background: transparent; color: var(--text);
    font-weight: 500; font-size: 0.9rem;
    text-decoration: none; white-space: nowrap;
}
.button:hover { background: var(--panel); }
.button--primary { background: var(--solid); border-color: var(--solid); color: var(--on-solid); }
.button--primary:hover { background: var(--solid-hover); border-color: var(--solid-hover); color: var(--on-solid); }
.button svg { width: 16px; height: 16px; flex: none; }

/* ---------- Hero ---------- */
.hero { padding: clamp(4rem, 9vw, 7rem) 0 2rem; }
.hero h1 { margin-bottom: 1rem; max-width: 17ch; }
.hero .lead { font-size: 1.05rem; color: var(--muted); max-width: 56ch; margin-bottom: 1.75rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.hero-note { color: var(--faint); font-size: 0.85rem; margin: 1rem 0 0; }

.eyebrow { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; color: var(--faint); margin-bottom: 1rem; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }

/* ---------- Screenshots ---------- */
figure { margin: 0; }
.shot { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: var(--radius); }
figcaption { color: var(--faint); font-size: 0.82rem; margin-top: 0.65rem; }

/* ---------- Sections ---------- */
section { padding: var(--gap) 0; }
@media (max-width: 720px) { :root { --gap: 64px; } }
section > .wrap > h2 { margin-bottom: 0.5rem; }
.section-lead { color: var(--muted); margin-bottom: 2.5rem; }
.rule { border-top: 1px solid var(--line); }

/* ---------- Feature grid: one shared hairline, not eight boxes ---------- */
.features { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1px; background: var(--line); }
.features > div { background: var(--bg); padding: 1.5rem; }
.features h3 { margin-bottom: 0.4rem; }
.features p { color: var(--muted); font-size: 0.9rem; margin: 0; max-width: none; }

.split { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }
.gallery { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }

/* ---------- Lists ---------- */
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding-left: 1.35rem; position: relative; margin-bottom: 0.75rem; color: var(--muted); font-size: 0.95rem; }
ul.plain li::before { content: ""; position: absolute; left: 0.2rem; top: 0.66em; width: 4px; height: 4px; border-radius: 50%; background: var(--faint); }
ul.plain strong { color: var(--text); font-weight: 500; }

/* ---------- Table ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { color: var(--faint); font-weight: 500; font-size: 0.8rem; }
td { color: var(--muted); }
td code { white-space: nowrap; }

/* ---------- Note ---------- */
.note { border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); padding: 1.1rem 1.25rem; font-size: 0.92rem; color: var(--muted); }
.note strong { color: var(--text); font-weight: 500; }
.note p { max-width: none; }
.note p:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 2.5rem 0 3.5rem; color: var(--faint); font-size: 0.88rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.25rem; }
