/* Ploynir — public site. Hand-written, no build step. */

@font-face {
    font-family: "Schibsted Grotesk";
    src: url("../fonts/schibsted-grotesk.woff2") format("woff2");
    font-weight: 400 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Instrument Serif";
    src: url("../fonts/instrument-serif.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "JetBrains Mono";
    src: url("../fonts/jetbrains-mono.woff2") format("woff2");
    font-weight: 100 800;
    font-style: normal;
    font-display: swap;
}

:root {
    color-scheme: dark;

    --bg: #000;
    --bg-raised: #0a0a0b;
    --bg-raised-2: #121314;
    --bg-input: #0c0d0e;
    --line: rgba(255, 255, 255, 0.09);
    --line-strong: rgba(255, 255, 255, 0.16);
    --line-dash: rgba(255, 255, 255, 0.14);
    --text: #f0f0f0;
    --text-2: #a1a4a5;
    --text-3: #7d8184;
    --accent: #f4b13e;
    --accent-soft: rgba(244, 177, 62, 0.12);
    --ok: #3ecf6e;
    --ok-dim: rgba(62, 207, 110, 0.55);
    --bad: #f87171;

    --sans: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --serif: "Instrument Serif", ui-serif, Georgia, "Times New Roman", serif;
    --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

    --radius: 14px;
    --radius-sm: 10px;
    --wrap: 1120px;
    --prose: 640px;
    --gutter: 20px;
}

@media (min-width: 720px) {
    :root { --gutter: 32px; }
}

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 84px;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text-2);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

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

a { color: inherit; }

p { margin: 0 0 1.1em; }

strong, b { color: var(--text); font-weight: 500; }

h1, h2, h3 {
    margin: 0;
    color: var(--text);
    font-weight: 500;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

code, pre, kbd { font-family: var(--mono); }

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

::selection { background: rgba(255, 255, 255, 0.22); color: #fff; }

.sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute;
    left: 16px; top: -60px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    background: var(--text);
    color: #000;
    font-weight: 600;
    text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap {
    width: 100%;
    max-width: calc(var(--wrap) + 2 * var(--gutter));
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.muted { color: var(--text-2); }

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid transparent;
    background: rgba(0, 0, 0, 0.7);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    transition: border-color 0.2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.site-header .wrap {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 64px;
}

.wordmark {
    display: inline-flex;
    align-items: baseline;
    color: var(--text);
    font-family: var(--mono);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.04em;
    text-decoration: none;
}
.wordmark span { color: var(--accent); }

.nav {
    display: none;
    margin-left: auto;
    gap: 2px;
}
.nav a {
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--text-2);
    font-size: 14.5px;
    text-decoration: none;
    transition: color 0.15s ease;
}
.nav a:hover { color: var(--text); }

.header-cta { margin-left: auto; }

@media (min-width: 900px) {
    .nav { display: flex; }
    .header-cta { margin-left: 8px; }
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15.5px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
    background: var(--text);
    color: #000;
}
.btn-primary:hover { background: #fff; }

.btn-ghost {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
}
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.06); }

.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14.5px; border-radius: 10px; }

.chev { font-size: 1.25em; line-height: 0.6; opacity: 0.6; transition: transform 0.15s ease; }
.btn:hover .chev { transform: translateX(2px); }

/* ---------- Hero ---------- */

.hero {
    position: relative;
    padding: 88px 0 0;
    overflow: hidden;
    text-align: center;
}
@media (min-width: 900px) { .hero { padding-top: 140px; } }

.hero::before {
    content: "";
    position: absolute;
    left: 50%; top: -260px;
    width: 1100px; height: 700px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.07), transparent 60%);
    pointer-events: none;
}

.hero-inner { position: relative; z-index: 1; }

.display {
    font-family: var(--serif);
    font-size: clamp(3rem, 9vw, 5.6rem);
    font-weight: 400;
    line-height: 0.98;
    letter-spacing: -0.015em;
    background: linear-gradient(to right bottom, #fff 30%, rgba(255, 255, 255, 0.5));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    padding-bottom: 0.06em;
}

.lead {
    max-width: 34rem;
    margin: 26px auto 0;
    color: var(--text-2);
    font-size: clamp(1.05rem, 1.6vw, 1.15rem);
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 34px;
}

/* The stage: terminal with signal bars on both sides */

.stage {
    position: relative;
    margin-top: 72px;
    padding-bottom: 96px;
}
@media (min-width: 900px) { .stage { margin-top: 88px; padding-bottom: 128px; } }

.stage .wrap { position: relative; z-index: 1; }
.stage .terminal { max-width: 640px; margin: 0 auto; text-align: left; }

.signal {
    position: absolute;
    top: 40px;
    display: flex;
    align-items: flex-end;
    gap: 5px;
    height: 120px;
    width: 34vw;
    max-width: 460px;
    -webkit-mask-image: linear-gradient(to var(--fade, right), transparent, #000 40%);
    mask-image: linear-gradient(to var(--fade, right), transparent, #000 40%);
    pointer-events: none;
}
.signal-left { left: 0; --fade: right; }
.signal-right { right: 0; --fade: left; flex-direction: row-reverse; }
.signal i {
    flex: 1;
    height: var(--h, 50%);
    min-width: 3px;
    background: linear-gradient(to top, var(--ok-dim), rgba(62, 207, 110, 0.12));
    border-radius: 2px 2px 0 0;
    transform-origin: bottom;
    animation: pulse 3.2s ease-in-out infinite;
    animation-delay: var(--d, 0s);
}
@keyframes pulse {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.55); }
}
@media (max-width: 899px) { .signal { display: none; } }

.signal i:nth-child(1) { --h: 38%; --d: -0.1s; }
.signal i:nth-child(2) { --h: 52%; --d: -0.4s; }
.signal i:nth-child(3) { --h: 44%; --d: -0.9s; }
.signal i:nth-child(4) { --h: 70%; --d: -1.3s; }
.signal i:nth-child(5) { --h: 58%; --d: -0.2s; }
.signal i:nth-child(6) { --h: 82%; --d: -1.7s; }
.signal i:nth-child(7) { --h: 64%; --d: -2.1s; }
.signal i:nth-child(8) { --h: 90%; --d: -0.6s; }
.signal i:nth-child(9) { --h: 72%; --d: -2.5s; }
.signal i:nth-child(10) { --h: 60%; --d: -1.1s; }
.signal i:nth-child(11) { --h: 78%; --d: -2.9s; }
.signal i:nth-child(12) { --h: 96%; --d: -0.3s; }
.signal i:nth-child(13) { --h: 84%; --d: -1.9s; }
.signal i:nth-child(14) { --h: 66%; --d: -0.8s; }
.signal i:nth-child(15) { --h: 74%; --d: -2.3s; }
.signal i:nth-child(16) { --h: 88%; --d: -1.5s; }
.signal i:nth-child(17) { --h: 56%; --d: -0.5s; }
.signal i:nth-child(18) { --h: 68%; --d: -2.7s; }
.signal i:nth-child(19) { --h: 92%; --d: -1.2s; }
.signal i:nth-child(20) { --h: 80%; --d: -0.7s; }
.signal i:nth-child(21) { --h: 62%; --d: -2.0s; }
.signal i:nth-child(22) { --h: 76%; --d: -1.6s; }
.signal i:nth-child(23) { --h: 86%; --d: -0.95s; }
.signal i:nth-child(24) { --h: 70%; --d: -2.4s; }

/* ---------- Terminal ---------- */

.terminal {
    position: relative;
    margin: 0;
    min-width: 0;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: linear-gradient(180deg, #111214 0%, #0a0a0b 100%);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.6),
        0 40px 100px -40px rgba(0, 0, 0, 1),
        0 0 140px -60px rgba(255, 255, 255, 0.18);
    overflow: hidden;
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
}
.terminal-bar i {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #26282b;
}
.terminal-bar span {
    margin-left: 10px;
    color: var(--text-3);
    font-family: var(--mono);
    font-size: 12px;
}

.terminal pre {
    margin: 0;
    padding: 20px 20px 24px;
    overflow-x: auto;
    color: var(--text-2);
    font-size: 13px;
    line-height: 1.75;
}
@media (min-width: 480px) { .terminal pre { font-size: 13.5px; padding: 22px 24px 26px; } }

.terminal .ln { display: block; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (min-width: 600px) { .terminal .ln { white-space: pre; overflow-wrap: normal; } }

.t-prompt { color: var(--accent); }
.t-cmd { color: var(--text); }
.t-dim { color: #62666a; }
.t-ok { color: var(--ok); }
.t-bad { color: var(--bad); }
.t-key { color: var(--text); }
.t-url { color: var(--text); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.35); text-underline-offset: 3px; }
.t-you { color: #9db4ff; }
.t-agent { color: var(--accent); }

.terminal.is-animated .ln {
    opacity: 0;
    transform: translateY(4px);
    animation: line-in 0.35s ease forwards;
    animation-delay: calc(var(--i, 0) * 0.32s + 0.3s);
}
.terminal.is-waiting .ln { animation-play-state: paused; }
@keyframes line-in { to { opacity: 1; transform: none; } }

.cursor {
    display: inline-block;
    width: 0.6em; height: 1.1em;
    margin-left: 2px;
    vertical-align: -0.2em;
    background: var(--text-2);
    animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Sections ---------- */

.section { padding: 72px 0; }
@media (min-width: 900px) { .section { padding: 112px 0; } }

.section-intro { padding-top: 24px; }
@media (min-width: 900px) { .section-intro { padding-top: 32px; } }

.prose-col {
    max-width: var(--prose);
    margin: 0 auto;
    font-size: 18px;
    line-height: 1.65;
}
.prose-col h2 { margin-bottom: 22px; }
.prose-col + .panel, .panel + .prose-col { margin-top: 48px; }
.prose-col:last-child p:last-child { margin-bottom: 0; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    color: var(--text-3);
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.eyebrow::before {
    content: "";
    width: 7px; height: 7px;
    background: var(--accent);
}

h2 {
    font-size: clamp(1.75rem, 3.6vw, 2.35rem);
    line-height: 1.12;
}

.h-code {
    font-size: 0.82em;
    font-weight: 500;
    letter-spacing: -0.03em;
    color: var(--text);
}

.section-head { max-width: 44rem; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { margin: 16px 0 0; color: var(--text-2); font-size: 1.05rem; }

code.inline {
    padding: 2px 6px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--bg-raised-2);
    color: var(--text);
    font-size: 0.84em;
    white-space: nowrap;
}

/* ---------- Panels (dashed frames with corner marks) ---------- */

.panel {
    position: relative;
    border: 1px dashed var(--line-dash);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.005));
}
.panel::before,
.panel::after {
    content: "";
    position: absolute;
    width: 9px; height: 9px;
    background:
        linear-gradient(45deg, transparent 45%, var(--line-strong) 45%, var(--line-strong) 55%, transparent 55%),
        linear-gradient(-45deg, transparent 45%, var(--line-strong) 45%, var(--line-strong) 55%, transparent 55%);
}
.panel::before { left: -5px; top: -5px; }
.panel::after { right: -5px; bottom: -5px; }

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px dashed var(--line-dash);
    color: var(--text-3);
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: 0.08em;
}
.panel-head .arrows {
    flex: 1;
    overflow: hidden;
    color: rgba(62, 207, 110, 0.45);
    letter-spacing: 0.35em;
    text-align: center;
    white-space: nowrap;
}
@media (max-width: 600px) { .panel-head .arrows { display: none; } }

.label {
    display: block;
    color: var(--text-3);
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: 0.08em;
}

/* ---------- Features ---------- */

.features {
    display: grid;
}
@media (min-width: 680px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .features { grid-template-columns: repeat(3, 1fr); } }

.feature {
    padding: 28px 24px 30px;
    border-bottom: 1px dashed var(--line-dash);
}
@media (min-width: 680px) {
    .feature { border-right: 1px dashed var(--line-dash); }
    .feature:nth-child(2n) { border-right: 0; }
    .feature:nth-last-child(-n+1) { border-bottom: 0; }
}
@media (min-width: 1000px) {
    .feature:nth-child(2n) { border-right: 1px dashed var(--line-dash); }
    .feature:nth-child(3n) { border-right: 0; }
    .feature:nth-last-child(-n+3) { border-bottom: 0; }
}
@media (max-width: 679px) { .feature:last-child { border-bottom: 0; } }

.feature .label { margin-bottom: 18px; color: var(--accent); }
.feature h3 { margin-bottom: 8px; font-size: 1.08rem; }
.feature p { margin: 0; font-size: 15.5px; }
.feature code.inline { white-space: normal; }

/* ---------- Lifecycle ---------- */

.lifecycle { display: grid; }
@media (min-width: 680px) { .lifecycle { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .lifecycle { grid-template-columns: repeat(4, 1fr); } }

.phase {
    display: flex;
    flex-direction: column;
    padding: 26px 22px 24px;
    border-bottom: 1px dashed var(--line-dash);
}
.phase:last-child { border-bottom: 0; }
@media (min-width: 680px) {
    .phase { border-right: 1px dashed var(--line-dash); }
    .phase:nth-child(2n) { border-right: 0; }
    .phase:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (min-width: 1100px) {
    .phase { border-bottom: 0; }
    .phase:nth-child(2n) { border-right: 1px dashed var(--line-dash); }
    .phase:last-child { border-right: 0; }
}
.phase-top { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.phase-top .num { color: var(--text-3); font-family: var(--mono); font-size: 13px; }
.phase-top .label { color: var(--ok); }
.phase h3 { margin-bottom: 8px; font-size: 1.12rem; }
.phase p { margin: 0 0 20px; font-size: 15.5px; }
.phase .cmd {
    margin-top: auto;
    align-self: flex-start;
    max-width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg-raised-2);
    color: var(--text);
    font-family: var(--mono);
    font-size: 13px;
    overflow-wrap: anywhere;
}
.phase .cmd::before { content: "$ "; color: var(--accent); }

/* ---------- Timeline ---------- */

.timeline ol {
    margin: 0;
    padding: 0;
    list-style: none;
}
.timeline li {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 4px 14px;
    padding: 20px;
    border-bottom: 1px dashed var(--line-dash);
}
.timeline li:last-child { border-bottom: 0; }
.timeline .num { grid-row: span 2; color: var(--text-3); font-family: var(--mono); font-size: 13px; padding-top: 1px; }
.timeline .label { color: var(--ok); }
.timeline p { margin: 0; color: var(--text-2); font-size: 15.5px; }
@media (min-width: 800px) {
    .timeline li { grid-template-columns: 44px 150px 1fr; align-items: baseline; padding: 20px 24px; }
    .timeline .num { grid-row: auto; }
}

/* ---------- Stats ---------- */

.stats { margin-top: 48px; }
.stats-grid { display: grid; }
@media (min-width: 800px) { .stats-grid { grid-template-columns: 1fr 1fr 2fr; } }
.stat {
    padding: 22px 24px 24px;
    border-bottom: 1px dashed var(--line-dash);
}
@media (min-width: 800px) {
    .stat { border-bottom: 0; border-right: 1px dashed var(--line-dash); }
    .stat:last-child { border-right: 0; }
}
.stat:last-child { border-bottom: 0; }
.stat .big {
    display: block;
    margin: 10px 0 4px;
    color: var(--text);
    font-size: clamp(2.2rem, 4vw, 2.8rem);
    font-weight: 400;
    letter-spacing: -0.04em;
    line-height: 1;
}
.stat .big small { margin-left: 2px; color: var(--text-3); font-size: 0.42em; letter-spacing: 0; }
.stat .sub { color: var(--text-3); font-size: 14px; }
.stack-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}
.stack-list li {
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--bg-raised-2);
    color: var(--text);
    font-family: var(--mono);
    font-size: 13px;
}

/* ---------- Agent band ---------- */

.band {
    background:
        radial-gradient(ellipse 60% 80% at 100% 0%, rgba(255, 255, 255, 0.04), transparent 70%),
        var(--bg-raised);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.split {
    display: grid;
    gap: 40px;
    align-items: center;
}
@media (min-width: 1000px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 64px; } }
.split h2 { margin-bottom: 20px; }

.checks {
    display: grid;
    gap: 10px;
    margin: 26px 0 0;
    padding: 0;
    list-style: none;
}
.checks li { display: flex; gap: 12px; color: var(--text-2); }
.checks li::before {
    content: "";
    flex: none;
    width: 18px; height: 18px;
    margin-top: 4px;
    border-radius: 50%;
    background: rgba(62, 207, 110, 0.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%233ecf6e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 8.5 2.5 2.5L12 5.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.agent-line {
    margin-top: 28px;
    padding: 16px 18px;
    border: 1px dashed var(--line-dash);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.5);
}
.agent-line small {
    display: block;
    margin-bottom: 6px;
    color: var(--text-3);
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.agent-line code { color: var(--text); font-size: 13.5px; word-break: break-word; }

/* ---------- Facts ---------- */

.facts { margin: 0; }
.facts div {
    display: grid;
    gap: 6px;
    padding: 20px;
    border-bottom: 1px dashed var(--line-dash);
}
.facts div:last-child { border-bottom: 0; }
@media (min-width: 760px) {
    .facts div { grid-template-columns: 14rem 1fr; gap: 32px; padding: 20px 24px; }
}
.facts dt { color: var(--text); font-weight: 500; }
.facts dd { margin: 0; color: var(--text-2); }

/* ---------- Pricing ---------- */

.price-body {
    display: grid;
    gap: 32px;
    padding: 28px 20px;
}
@media (min-width: 900px) {
    .price-body { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 48px; padding: 36px; align-items: center; }
}
.price-body .btn { margin-top: 8px; }

.limits {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--line);
    overflow: hidden;
}
@media (min-width: 600px) { .limits { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.limits div { padding: 18px 18px 16px; background: var(--bg); }
.limits dt {
    color: var(--text);
    font-size: clamp(1.7rem, 3vw, 2.1rem);
    font-weight: 400;
    letter-spacing: -0.04em;
    line-height: 1.1;
}
.limits dt small { margin-left: 2px; color: var(--text-3); font-size: 0.45em; letter-spacing: 0; }
.limits dd { margin: 2px 0 0; color: var(--text-3); font-size: 14px; }

/* ---------- FAQ ---------- */

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
    position: relative;
    padding: 22px 44px 22px 0;
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 500;
    list-style: none;
    cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "";
    position: absolute;
    right: 4px; top: 50%;
    width: 14px; height: 14px;
    margin-top: -7px;
    background:
        linear-gradient(var(--text-3), var(--text-3)) center / 14px 1.5px no-repeat,
        linear-gradient(var(--text-3), var(--text-3)) center / 1.5px 14px no-repeat;
    transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: #fff; }
.faq .answer { max-width: 46rem; padding: 0 0 24px; color: var(--text-2); }
.faq .answer p:last-child { margin-bottom: 0; }

.two-col { display: grid; gap: 40px; }
@media (min-width: 1000px) {
    .two-col { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 64px; }
    .two-col .section-head { position: sticky; top: 104px; align-self: start; }
}

/* ---------- Form ---------- */

.request { display: grid; gap: 40px; }
@media (min-width: 1000px) {
    .request { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 64px; align-items: start; }
}

.form-card {
    padding: 28px 20px;
    border: 1px solid var(--line-strong);
    border-radius: calc(var(--radius) + 4px);
    background: var(--bg);
    box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.9);
}
@media (min-width: 600px) { .form-card { padding: 36px; } }

.field { margin-bottom: 22px; }
.field-row { display: grid; gap: 0 18px; }
@media (min-width: 600px) { .field-row { grid-template-columns: 1fr 1fr; } }

.field label,
.field legend {
    display: block;
    margin-bottom: 8px;
    padding: 0;
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
}
.field .opt { color: var(--text-3); font-weight: 400; }

.field input[type="text"],
.field input[type="email"],
.field input[type="url"],
.field textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text);
    font-family: inherit;
    font-size: 16px;
    line-height: 1.45;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: #575b5e; }
.field input:hover,
.field textarea:hover { border-color: rgba(255, 255, 255, 0.24); }
.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.55);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08);
}
.field [aria-invalid="true"] { border-color: var(--bad); }

.hint { margin: 8px 0 0; color: var(--text-3); font-size: 14px; }
.error { margin: 8px 0 0; color: var(--bad); font-size: 14px; font-weight: 500; }

.form-error {
    margin: 0 0 22px;
    padding: 14px 16px;
    border: 1px solid rgba(248, 113, 113, 0.35);
    border-radius: var(--radius-sm);
    background: rgba(248, 113, 113, 0.08);
    color: #fecaca;
    font-size: 15px;
}

fieldset.field { margin: 0 0 22px; padding: 0; border: 0; min-width: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--bg-input);
    color: var(--text-2);
    font-size: 14.5px;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.chip span:hover { border-color: rgba(255, 255, 255, 0.3); color: var(--text); }
.chip input:checked + span { border-color: var(--text); background: rgba(255, 255, 255, 0.08); color: var(--text); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.trap { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

.form-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 20px;
    margin-top: 8px;
}
.form-foot p { flex: 1 1 16rem; margin: 0; color: var(--text-3); font-size: 14px; }
.form-foot a { color: var(--text-2); }
.form-foot .btn { flex: none; }

.turnstile { margin-bottom: 22px; min-height: 65px; }

.promise { display: grid; gap: 18px; margin: 32px 0 0; padding: 0; list-style: none; }
.promise li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; color: var(--text-2); }
.promise b { color: var(--text); font-weight: 500; }
.promise .n {
    display: grid;
    place-items: center;
    width: 28px; height: 28px;
    border: 1px dashed var(--line-dash);
    border-radius: 8px;
    color: var(--ok);
    font-family: var(--mono);
    font-size: 13px;
}

.btn[disabled] { opacity: 0.7; cursor: progress; }

/* ---------- Simple pages (confirm, legal, errors) ---------- */

.page { min-height: calc(100vh - 64px - 220px); padding: 72px 0 96px; }
@media (min-width: 900px) { .page { padding: 112px 0 128px; } }

.page-narrow { max-width: 40rem; }

.page h1 {
    font-family: var(--serif);
    font-size: clamp(2.4rem, 6vw, 3.4rem);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.01em;
}
.page .lead { margin: 20px 0 0; text-align: left; }
.page .hero-note { margin-top: 18px; color: var(--text-3); font-size: 14.5px; }
.page .hero-note a { color: var(--text-2); }
.page .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.page .eyebrow { margin-bottom: 14px; }

.status-icon {
    display: grid;
    place-items: center;
    width: 54px; height: 54px;
    margin-bottom: 28px;
    border: 1px dashed var(--line-dash);
    border-radius: 14px;
    background: var(--bg-raised);
    color: var(--text);
}
.status-icon svg { width: 24px; height: 24px; }
.status-icon.ok { color: var(--ok); }

.prose { max-width: 44rem; color: var(--text-2); }
.prose h1 { margin-bottom: 12px; }
.prose h2 { margin: 48px 0 14px; font-size: 1.35rem; }
.prose h3 { margin: 28px 0 10px; font-size: 1.1rem; }
.prose a { color: var(--text); text-underline-offset: 3px; }
.prose ul { padding-left: 1.25em; margin: 0 0 1em; }
.prose li { margin-bottom: 6px; }
.prose .meta { color: var(--text-3); font-size: 15px; }
.prose table { width: 100%; margin: 0 0 1.25em; border-collapse: collapse; font-size: 15.5px; }
.prose th, .prose td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { color: var(--text); font-weight: 500; }
.table-scroll { overflow-x: auto; }

/* ---------- Footer ---------- */

.site-footer {
    border-top: 1px solid var(--line);
    padding: 56px 0 40px;
    color: var(--text-3);
    font-size: 14.5px;
}
.site-footer .wrap { display: grid; gap: 32px; }
@media (min-width: 900px) { .site-footer .wrap { grid-template-columns: 1fr auto; align-items: end; } }
.ascii {
    margin: 0 0 18px;
    color: #4d5154;
    font-size: 11px;
    line-height: 1.25;
    white-space: pre;
    overflow-x: auto;
}
.ascii span { color: var(--text-3); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; list-style: none; }
.footer-links a { color: var(--text-2); text-decoration: none; }
.footer-links a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.site-footer p { margin: 0; }

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .terminal.is-animated .ln { opacity: 1; transform: none; }
    .cursor { animation: none; }
}

/* ---------- Min side ---------- */

.login-form { margin-top: 32px; max-width: 26rem; }

.account { padding-top: 56px; }
@media (min-width: 900px) { .account { padding-top: 80px; } }

.account-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}
.account-head h1 { font-family: var(--mono); font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 600; letter-spacing: -0.04em; }
.account-head .muted { margin: 6px 0 0; }

.tabs {
    display: flex;
    gap: 4px;
    margin: 32px 0 28px;
    border-bottom: 1px solid var(--line);
}
.tabs a {
    margin-bottom: -1px;
    padding: 10px 14px;
    border-bottom: 2px solid transparent;
    color: var(--text-2);
    font-size: 15px;
    text-decoration: none;
}
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { border-bottom-color: var(--text); color: var(--text); }

.account .notice { margin-bottom: 24px; }

.meters { display: grid; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 800px) { .meters { grid-template-columns: repeat(4, 1fr); } }
.meter { padding: 18px 20px 20px; border-right: 1px dashed var(--line-dash); border-bottom: 1px dashed var(--line-dash); }
.meter:nth-child(2n) { border-right: 0; }
@media (min-width: 800px) {
    .meter { border-bottom: 0; }
    .meter:nth-child(2n) { border-right: 1px dashed var(--line-dash); }
    .meter:last-child { border-right: 0; }
}
@media (max-width: 799px) { .meter:nth-last-child(-n+2) { border-bottom: 0; } }
.meter-value { display: block; margin: 8px 0 10px; color: var(--text); font-size: 1.8rem; letter-spacing: -0.04em; line-height: 1; }
.meter-value small { color: var(--text-3); font-size: 0.55em; letter-spacing: 0; }
.meter meter { width: 100%; height: 6px; -webkit-appearance: none; appearance: none; }
.meter meter::-webkit-meter-bar { background: rgba(255, 255, 255, 0.08); border: 0; border-radius: 3px; height: 6px; }
.meter meter::-webkit-meter-optimum-value { background: var(--ok); border-radius: 3px; }
.meter meter::-webkit-meter-suboptimum-value { background: var(--accent); border-radius: 3px; }
.meter meter::-moz-meter-bar { background: var(--ok); border-radius: 3px; }

.apps { display: grid; gap: 20px; margin-top: 24px; }
@media (min-width: 900px) { .apps { grid-template-columns: repeat(2, 1fr); } }
.app { padding: 22px 22px 18px; }
.app-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.app-name { font-family: var(--mono); font-size: 1.15rem; font-weight: 600; letter-spacing: -0.02em; }
.status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 13px;
    white-space: nowrap;
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-ok { color: var(--ok); }
.status-bad { color: var(--bad); }
.status-idle { color: var(--text-3); }
.app-url { margin: 0 0 4px; font-family: var(--mono); font-size: 14px; overflow-wrap: anywhere; }
.app-url a { color: var(--text); text-decoration-color: rgba(255, 255, 255, 0.3); text-underline-offset: 3px; }
.app-url.secondary a { color: var(--text-2); }
.tag { margin-left: 8px; color: var(--accent); font-family: var(--sans); font-size: 12.5px; }
.app-facts { margin: 16px 0 0; border-top: 1px dashed var(--line-dash); }
.app-facts div { display: grid; grid-template-columns: 9.5rem 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line-dash); font-size: 14.5px; }
.app-facts div:last-child { border-bottom: 0; }
.app-facts dt { color: var(--text-3); }
.app-facts dd { margin: 0; color: var(--text-2); }
.app-facts code.inline { white-space: normal; }
.proc { display: inline-block; margin-right: 10px; font-family: var(--mono); font-size: 13px; color: var(--text); }
.ok-text { color: var(--ok); }
.bad-text { color: var(--bad); }

.empty { padding: 40px 0; max-width: 40rem; }
.empty h2 { margin-bottom: 12px; font-size: 1.5rem; }
.empty .cmd { display: inline-flex; margin-top: 8px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-raised-2); color: var(--text); font-family: var(--mono); font-size: 14px; }
.empty .cmd::before { content: "$ "; color: var(--accent); white-space: pre; }

.nav-login { margin-left: auto; color: var(--text-2); font-size: 14.5px; text-decoration: none; }
.nav-login:hover { color: var(--text); }
@media (min-width: 900px) { .nav-login { margin-left: 8px; } }
.nav-login + .header-cta { margin-left: 12px; }
@media (max-width: 420px) { .header-cta.btn-primary { display: none; } }
