/* ============================================================
   ER KNOB — page styles, on top of /styles.css (tokens, nav,
   sections, figures, form, footer).
   ============================================================ */

.kn .prose__lead em { font-style: normal; color: var(--accent); }

/* Grid children may shrink below their content's natural width: the video
   (720 px) and the demo canvas would otherwise widen the page on phones. */
.kn .grid-2 > *, .kn-hero__grid > *, .demo__stage > * { min-width: 0; }
.kn video, .kn canvas, .kn img { max-width: 100%; }

/* ── Hero ───────────────────────────────────────────────── */

.kn-hero { padding: 84px 0 96px; border-bottom: 1px solid var(--line); }
.kn-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 56px;
    align-items: center;
}
.kn-hero__title { font-size: clamp(38px, 5.4vw, 72px); max-width: 15ch; }
.status {
    display: inline-block;
    margin-left: 6px;
    padding: 3px 9px;
    border: 1px solid var(--accent-dim);
    color: var(--accent-hi);
    font-size: 10.5px;
    letter-spacing: 0.14em;
}

.kn-hero__media { margin: 0; }
.kn-frame {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--ink-900);
    border: 1px solid var(--line);
    overflow: hidden;
}
.kn-frame video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.85) contrast(1.04);
}
.kn-cap {
    margin-top: 12px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: 0.06em;
    color: var(--steel-500);
}

/* ── Photos ─────────────────────────────────────────────── */

.kn-photo {
    background: var(--ink-900);
    border: 1px solid var(--line);
    overflow: hidden;
    aspect-ratio: 4 / 3;
}
.kn-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.82) contrast(1.04);
}
.kn-photo--tall { aspect-ratio: 3 / 4; max-width: 520px; }
.kn-frame--wide { aspect-ratio: 16 / 9; }
.kn-pair.kn-pair--flush { margin-top: 0; }
.kn-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 40px;
}

/* ── Steps and timeline ─────────────────────────────────── */

.kn-steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    counter-reset: step;
}
.kn-steps li {
    background: var(--ink-800);
    padding: 22px 22px 26px;
    counter-increment: step;
}
.kn-steps li::before {
    content: '0' counter(step);
    display: block;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.14em;
    color: var(--accent);
    margin-bottom: 14px;
}
.kn-steps h3 {
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--steel-100);
    margin-bottom: 8px;
}
.kn-steps p { font-size: 15px; line-height: 1.6; color: var(--steel-400); }

.kn-timeline {
    list-style: none;
    border-left: 1px solid var(--line-hi);
    margin-top: 8px;
}
.kn-timeline li {
    position: relative;
    padding: 0 0 22px 26px;
    color: var(--steel-400);
    font-size: 16px;
    max-width: 60ch;
}
.kn-timeline li:last-child { padding-bottom: 0; }
.kn-timeline li::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 9px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ink-700);
    border: 1px solid var(--accent);
}
.kn-timeline li:last-child::before { background: var(--accent); }
.kn-timeline b {
    display: block;
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--steel-100);
    margin-bottom: 4px;
}

/* ── App screens ────────────────────────────────────────── */

.kn-screens {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 40px;
    max-width: 640px;
}
.kn-screens figure { margin: 0; }
.kn-screens figcaption {
    margin-top: 10px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--steel-500);
}
.kn-screen {
    position: relative;
    aspect-ratio: 9 / 19.5;
    border-radius: 22px;
    border: 1px solid var(--line-hi);
    background: var(--ink-900);
    overflow: hidden;
}
.kn-screen img { display: block; width: 100%; height: 100%; object-fit: cover; }
.kn-screen:not(:has(img))::before {
    content: attr(data-src);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--steel-500);
}

/* ── Specs ──────────────────────────────────────────────── */

.kn-specs { grid-template-columns: repeat(2, 1fr); margin: 0 0 8px; }
.kn-specs dd { font-family: var(--font-display); font-size: 15px; line-height: 1.45; }

/* ── Demo ───────────────────────────────────────────────── */

.demo {
    margin-top: 40px;
    padding: 24px;
    background: var(--ink-800);
    border: 1px solid var(--line);
}
.demo__modes {
    display: inline-flex;
    border: 1px solid var(--line-hi);
}
.demo__modes button {
    appearance: none;
    background: transparent;
    border: 0;
    border-right: 1px solid var(--line-hi);
    color: var(--steel-400);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    padding: 10px 18px;
    cursor: pointer;
    transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.demo__modes button:last-child { border-right: 0; }
.demo__modes button:hover { color: var(--steel-100); }
.demo__modes button[aria-selected="true"] { background: var(--steel-100); color: var(--ink-900); }

.demo__stage {
    display: grid;
    grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
    gap: 32px;
    align-items: center;
    margin-top: 22px;
}
.demo__knob {
    display: block;
    width: 100%;
    max-width: 340px;
    aspect-ratio: 1 / 1;
    touch-action: none;
    cursor: grab;
    -webkit-tap-highlight-color: transparent;
}
.demo__knob:active { cursor: grabbing; }

.demo__readout {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--steel-100);
    min-height: 1.4em;
}
.demo__bar {
    margin-top: 14px;
    height: 4px;
    background: var(--line);
    max-width: 280px;
}
.demo__bar span {
    display: block;
    height: 100%;
    width: 50%;
    background: var(--accent);
    transition: width 0.15s var(--ease);
}
.demo__hint {
    margin-top: 18px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--steel-400);
    max-width: 34ch;
}
.demo__phone {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
}
.demo__phone[hidden] { display: none; }
.demo__phone-label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--steel-500);
    margin-right: 6px;
}
.demo__phone button {
    width: 44px;
    height: 44px;
    border: 1px solid var(--line-hi);
    background: var(--ink-700);
    color: var(--steel-100);
    font-family: var(--font-mono);
    font-size: 20px;
    cursor: pointer;
}
.demo__phone button:hover { border-color: var(--accent); color: var(--accent-hi); }

.demo__curve { margin: 26px 0 0; }
.demo__curve svg {
    display: block;
    width: 100%;
    height: 120px;
    background: var(--ink-900);
    border: 1px solid var(--line);
}
.demo__curve .axis { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.demo__curve .axis--mid { stroke-dasharray: 3 4; }
.demo__curve .curve {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
    stroke-linejoin: round;
}
.demo__curve .marker { fill: var(--steel-100); }
.demo__curve-cap {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--steel-500);
}

/* ── Waitlist ───────────────────────────────────────────── */

.kn-sub { color: var(--steel-400); max-width: 58ch; }
.kn-form { margin-top: 28px; }
.field input[type="text"],
.field input[type="email"] { min-height: 48px; }

.kn-err {
    display: none;
    margin-top: 7px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: #c98682;
}
.field.is-invalid .kn-err,
.kn-consent.is-invalid .kn-err { display: block; }

.kn-phone { border: 0; padding: 0; margin: 0; min-width: 0; }
.kn-phone legend {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--steel-500);
    margin-bottom: 9px;
    padding: 0;
}
.kn-seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); }
.kn-seg label { position: relative; display: block; margin: 0; cursor: pointer; }
.kn-seg label + label { border-left: 1px solid var(--line); }
.kn-seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.kn-seg span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    background: var(--ink-900);
    color: var(--steel-400);
    font-family: var(--font-display);
    font-size: 15px;
    letter-spacing: 0;
    text-transform: none;
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.kn-seg input:checked + span { background: var(--steel-100); color: var(--ink-900); }
.kn-seg input:focus-visible + span { outline: 2px solid var(--accent-hi); outline-offset: -2px; }
.field.is-invalid .kn-seg { border-color: #b5645f; }

.kn-consent {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 12px;
    align-items: start;
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--steel-400);
    cursor: pointer;
}
.kn-consent input {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    margin: 2px 0 0;
    border: 1px solid var(--line-hi);
    background: var(--ink-900);
    display: grid;
    place-content: center;
    cursor: pointer;
}
.kn-consent input::before {
    content: '';
    width: 10px;
    height: 6px;
    border-left: 2px solid var(--ink-900);
    border-bottom: 2px solid var(--ink-900);
    transform: translateY(-1px) rotate(-45deg);
    opacity: 0;
}
.kn-consent input:checked { background: var(--accent); border-color: var(--accent); }
.kn-consent input:checked::before { opacity: 1; }
.kn-consent input:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; }
.kn-consent.is-invalid input { border-color: #b5645f; }
.kn-consent a { color: var(--accent-hi); border-bottom: 1px solid var(--line-hi); }
.kn-consent .kn-err { grid-column: 2; margin-top: 0; }

.kn-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.kn-done { margin-top: 28px; }
.kn-done:focus { outline: none; }

/* ── FAQ ────────────────────────────────────────────────── */

.kn-faq { border-top: 1px solid var(--line); }
.kn-faq details { border-bottom: 1px solid var(--line); }
.kn-faq summary {
    list-style: none;
    cursor: pointer;
    padding: 20px 36px 20px 0;
    position: relative;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--steel-100);
}
.kn-faq summary::-webkit-details-marker { display: none; }
.kn-faq summary::after {
    content: '+';
    position: absolute;
    right: 4px;
    top: 18px;
    font-family: var(--font-mono);
    font-size: 20px;
    color: var(--accent);
    transition: transform 0.2s var(--ease);
}
.kn-faq details[open] summary::after { transform: rotate(45deg); }
.kn-faq details p {
    padding: 0 0 22px;
    color: var(--steel-400);
    max-width: 62ch;
}

/* ── Privacy ────────────────────────────────────────────── */

.kn-privacy .prose p { font-size: 15px; }
.kn-privacy strong { color: var(--steel-200); font-weight: 500; }
.kn-privacy a { color: var(--accent-hi); border-bottom: 1px solid var(--line-hi); }

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 900px) {
    .kn-hero { padding: 64px 0 72px; }
    .kn-hero__grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
    .kn-hero__media { max-width: 480px; }
    .demo__stage { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 18px; }
    .demo__side { width: 100%; text-align: center; }
    .demo__bar, .demo__hint { margin-left: auto; margin-right: auto; }
    .demo__phone { justify-content: center; }
}

@media (max-width: 620px) {
    .kn-wide { display: none; }
    .kn .nav__cta { white-space: nowrap; text-transform: capitalize; }
    .kn-steps { grid-template-columns: 1fr; }
    .kn-specs { grid-template-columns: 1fr; }
    .kn-pair { grid-template-columns: 1fr; }
    .kn-screens { gap: 10px; }
    .demo { padding: 16px; }
    .demo__modes { display: flex; }
    .demo__modes button { flex: 1; padding: 10px 6px; }
    .demo__curve-cap span:nth-child(2) { display: none; }
}
