/* ========================================
   /research/ — Strom Research
   Loaded only on /research/ and /research/help/, after style.css (shared
   variables, header, buttons, section headers, footer, the #preview
   gallery) and
   help.css (sections, hero, switch, steps, tables).
   ======================================== */

.logo-tag {
    align-self: center;
    margin-left: 2px;
    padding: 2px 8px;
    border: 1px solid var(--color-mint);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-sage);
}

/* ---------- Sections: paper → cream → paper → cream → paper → forest → cream → paper → cream → paper → cream → … → cream ---------- */

/* Links from strom and the app land on the "agent already in use" column */
#have-agent {
    scroll-margin-top: calc(var(--header-height) + var(--space-md));
}

.r-forest {
    background: var(--color-forest);
    color: #fff;
}

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

.r-hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

@media (min-width: 1025px) {
    .r-hero-grid {
        grid-template-columns: 1.05fr 1fr;
        gap: var(--space-4xl);
    }
}

.r-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
}

.r-hero-points {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-border);
}

.r-hero-points dt {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-forest);
    margin-bottom: 4px;
}

.r-hero-points dd {
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--color-muted);
}

@media (max-width: 560px) {
    .r-hero-points {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
}

/* Phones: the research runs on a computer */
.desktop-note {
    display: none;
}

@media (max-width: 700px) {
    .desktop-note {
        display: block;
        margin-bottom: var(--space-lg);
        padding: var(--space-sm) var(--space-md);
        background: var(--color-cream);
        border: 1px solid var(--color-border);
        border-left: 3px solid var(--color-sage);
        border-radius: var(--radius-sm);
        font-size: 0.875rem;
        line-height: 1.5;
        color: var(--color-ink);
    }

    .desktop-note .text-link {
        display: inline-block;
        margin-top: 2px;
    }
}

/* Hero illustration: a conversation and a growing tree (HTML placeholder) */
.ill-card {
    max-width: 480px;
    margin: 0 auto;
    padding: var(--space-xl);
    background: var(--color-cream);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
}

.ill-chat {
    display: grid;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
}

.ill-msg {
    max-width: 88%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.875rem;
    line-height: 1.5;
}

.ill-msg-you {
    justify-self: end;
    background: var(--color-forest);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.ill-msg-agent {
    justify-self: start;
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    border-bottom-left-radius: 4px;
}

.ill-tree {
    color: var(--color-branch-faded);
}

.ill-row {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
}

.ill-lines {
    display: block;
    width: 50%;
    height: 28px;
    margin: 0 auto;
}

.ill-person {
    position: relative;
    flex: 0 1 180px;
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    color: var(--color-muted);
    text-align: center;
}

.ill-person strong {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-ink);
}

.ill-new {
    border: 2px solid var(--color-sage);
    box-shadow: 0 0 0 4px rgba(74, 124, 89, 0.12);
}

.ill-badge {
    position: absolute;
    top: -9px;
    right: 8px;
    padding: 1px 7px;
    background: var(--color-sage);
    color: #fff;
    border-radius: 20px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ill-found {
    flex-basis: 260px;
}

.ill-source {
    margin-top: 4px;
    font-size: 0.75rem;
    font-style: italic;
    color: var(--color-sage);
}

/* Under the illustration: the way without AI, a link to #modes */
.r-hero-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    max-width: 480px;
    margin: var(--space-md) auto 0;
    padding: 14px 20px;
    background: var(--color-cream);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    color: var(--color-ink);
    font-size: 0.9375rem;
    line-height: 1.5;
    transition: border-color var(--transition-fast);
}

.r-hero-strip:hover,
.r-hero-strip:focus-visible {
    border-color: var(--color-sage);
}

.r-hero-strip:focus-visible {
    outline: 2px solid var(--color-sage);
    outline-offset: 2px;
}

.r-hero-strip-text {
    display: flex;
    align-items: center;
    gap: 12px;
}

.r-hero-strip-text svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--color-sage);
}

.r-hero-strip strong {
    font-weight: 600;
}

.r-hero-strip-more {
    flex-shrink: 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-forest);
    white-space: nowrap;
}

/* ---------- #what ---------- */

.what-diagram {
    list-style: none;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-3xl);
}

.what-node {
    flex: 0 1 180px;
    display: grid;
    justify-items: center;
    gap: 4px;
    text-align: center;
}

.what-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: var(--space-sm);
    border-radius: 50%;
    background: var(--color-cream);
    border: 1px solid var(--color-border);
    color: var(--color-forest);
}

.what-icon svg {
    width: 28px;
    height: 28px;
}

.what-node strong {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
}

.what-node span:last-child {
    font-size: 0.875rem;
    color: var(--color-muted);
}

.what-arrow {
    align-self: flex-start;
    margin-top: 18px;
    font-size: 1.5rem;
    color: var(--color-branch-faded);
}

@media (max-width: 700px) {
    .what-diagram {
        flex-direction: column;
        align-items: center;
        gap: var(--space-lg);
    }

    .what-node {
        flex-basis: auto;
    }

    .what-arrow {
        display: none;
    }
}

.what-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2xl) var(--space-3xl);
    max-width: 1000px;
    margin: 0 auto;
}

@media (max-width: 800px) {
    .what-grid {
        grid-template-columns: 1fr;
    }
}

.what-grid h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-forest);
    margin-bottom: var(--space-sm);
}

.what-grid p,
.what-start {
    color: var(--color-muted);
    line-height: 1.7;
}

.what-start ol {
    margin: 0 0 var(--space-md) 1.25rem;
}

.what-start li {
    padding-left: 4px;
    margin-bottom: 4px;
}

/* ---------- #modes: with an agent, or an archive ---------- */

#modes .r-narrow,
#sync .r-narrow {
    max-width: 1000px;
}

.modes-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-lg);
    align-items: stretch;
}

@media (max-width: 720px) {
    .modes-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
}

.mode-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 40px 32px 28px;
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

/* As .agent-recommended: 1px and a ring */
.mode-agent {
    border-color: var(--color-forest);
    box-shadow: 0 0 0 1px var(--color-forest);
}

.mode-card h3 {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.2;
}

.mode-tag {
    position: absolute;
    top: -12px;
    left: 32px;
    max-width: calc(100% - 48px);
    padding: 3px 12px;
    background: var(--color-forest);
    color: #fff;
    border: 1px solid var(--color-forest);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.mode-archive .mode-tag {
    background: var(--color-paper);
    border-color: var(--color-sage);
    color: var(--color-forest);
}

.mode-points,
.sync-promises {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mode-points li,
.sync-promises li {
    display: flex;
    gap: 10px;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.mode-check {
    flex: none;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    color: var(--color-sage);
}

.mode-foot {
    margin-top: auto;
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
    font-size: 0.875rem;
    color: var(--color-muted);
}

.modes-switch {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px 16px;
    margin-top: var(--space-2xl);
    font-size: 0.9375rem;
    text-align: center;
}

.modes-switch-cmds {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.modes-switch code {
    padding: 4px 10px;
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    white-space: nowrap;
}

@media (max-width: 560px) {
    .mode-card {
        padding: 32px 20px 20px;
    }

    .mode-tag {
        left: 20px;
    }
}

/* ---------- #how ---------- */

.how-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-lg);
}

.how-card {
    display: flex;
    flex-direction: column;
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.how-img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: top;
    border-bottom: 1px solid var(--color-border);
}

/* A terminal shot whose point is at its end (the choice) */
.how-img-end {
    object-position: bottom;
}

.how-ill {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 10;
    background: var(--color-cream);
    border-bottom: 1px solid var(--color-border);
    color: var(--color-branch-faded);
}

.how-ill svg {
    width: 70%;
    height: auto;
}

.how-ill .fill-forest { fill: var(--color-forest); stroke: var(--color-forest); }
.how-ill .fill-paper { fill: var(--color-paper); }
.how-ill .fill-cream { fill: var(--color-cream); }
.how-ill .stroke-paper { stroke: var(--color-paper); }
.how-ill .stroke-sage { stroke: var(--color-sage); stroke-width: 2.5; }

.how-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-xl);
    flex: 1;
}

.how-body h3 {
    font-size: 1.35rem;
    font-weight: 600;
}

.how-body p {
    font-size: 0.9375rem;
    color: var(--color-muted);
    line-height: 1.6;
}

.how-link {
    margin-top: auto;
    padding-top: var(--space-sm);
    align-self: flex-start;
}

/* ---------- #live (dark) ---------- */

.r-live-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

@media (min-width: 1025px) {
    .r-live-grid {
        grid-template-columns: 0.8fr 1.2fr;
    }
}

.live-cap {
    margin-top: var(--space-md);
    font-size: 0.875rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.78);
}

.r-forest .section-eyebrow {
    color: var(--color-mint);
}

.r-forest .section-title {
    color: #fff;
    margin-bottom: var(--space-md);
}

.r-live-text p {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    max-width: 480px;
}

.r-live-text .r-live-offer {
    margin: var(--space-md) 0 var(--space-xl);
    color: #fff;
    font-weight: 500;
}

.r-live-text .r-live-browser {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: var(--space-xl);
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(168, 213, 186, 0.35);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    line-height: 1.55;
    color: #fff;
}

.r-live-browser svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    color: var(--color-mint);
}

.r-live-text .r-live-archive {
    margin: calc(-1 * var(--space-md)) 0 var(--space-xl);
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.75);
}

/* "Open the Strom app" and, beside it, how to install it (on /data/) */
.r-live-text .r-live-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-md) var(--space-lg);
    max-width: none;
}

.r-live-install {
    color: var(--color-mint);
    font-size: 0.9375rem;
    text-decoration: underline;
    text-decoration-color: rgba(168, 213, 186, 0.5);
    text-underline-offset: 4px;
}

.r-live-install:hover,
.r-live-install:focus-visible {
    color: #fff;
    text-decoration-color: currentColor;
}

.r-forest .showcase-frame {
    border-color: rgba(255, 255, 255, 0.18);
}

.r-forest .showcase-bar {
    background: var(--color-moss);
}

/* ---------- #sync: edits from the app to the research ---------- */

/* "trial", as in the app: small, not a warning */
.trial-tag {
    display: inline-block;
    margin-top: var(--space-sm);
    padding: 2px 10px;
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-muted);
}

/* The three modes: a picture of the choice, nothing to click */
.sync-modes {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-md);
}

@media (max-width: 859px) {
    .sync-modes {
        grid-template-columns: 1fr;
    }
}

.sync-mode {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-lg);
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    border-radius: 12px;
}

.sync-mode-rec {
    border-color: var(--color-forest);
}

.sync-mode-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
}

.sync-mode-head strong {
    font-size: 1.0625rem;
}

.sync-mode-tag {
    padding: 2px 10px;
    background: var(--color-forest);
    color: #fff;
    border-radius: 20px;
    font-size: 0.6875rem;
    font-weight: 600;
}

.sync-mode p {
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--color-muted);
}

.sync-choose {
    margin-top: var(--space-md);
    font-size: 0.875rem;
    color: var(--color-muted);
    text-align: center;
}

/* The bridge, with the app's bar while it is down */
.sync-bridge {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-lg);
    align-items: center;
    margin-top: var(--space-3xl);
    padding: 20px var(--space-lg);
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    border-radius: 12px;
}

.sync-bridge > p {
    font-size: 0.9375rem;
    line-height: 1.6;
}

.sync-bridge-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px 10px 16px;
    background: var(--color-cream);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    white-space: nowrap;
}

.sync-bridge-dot {
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #c9a24a;
}

.sync-bridge-pending {
    font-size: 0.8125rem;
    color: var(--color-muted);
}

.sync-bridge-btn {
    padding: 6px 12px;
    background: var(--color-forest);
    color: #fff;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
}

@media (max-width: 720px) {
    .sync-bridge {
        grid-template-columns: 1fr;
    }

    .sync-bridge-bar {
        justify-self: start;
        max-width: 100%;
        flex-wrap: wrap;
        white-space: normal;
    }
}

.sync-steps-block {
    margin-top: var(--space-3xl);
}

.sync-sub {
    font-size: 1.625rem;
    font-weight: 600;
    margin-bottom: var(--space-lg);
}

/* Numbered steps in a row (#sync, way A of #start); a shot above each once
   it exists (<template data-pending-shot> in the HTML until then) */
.step-cards {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-lg);
}

@media (max-width: 720px) {
    .step-cards {
        grid-template-columns: 1fr;
    }
}

.step-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.step-shot {
    margin: 0;
}

.step-shot .shot-zoom {
    display: block;
    overflow: hidden;
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    border-radius: 12px;
}

.step-shot img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: top;
}

.step-text {
    display: flex;
    gap: 12px;
    align-items: baseline;
}

.step-text .how-num {
    flex: none;
}

.step-text p {
    font-size: 0.9375rem;
    line-height: 1.55;
}

/* Promises beside the conflict */
.sync-promises-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-2xl);
    align-items: start;
    margin-top: var(--space-3xl);
}

@media (max-width: 720px) {
    .sync-promises-grid {
        grid-template-columns: 1fr;
    }
}

.sync-promises {
    gap: 20px;
}

.sync-promise-aside {
    color: var(--color-muted);
}

/* A conflict at a person, drawn in HTML so it follows the language */
.sync-conflict {
    margin: 0;
}

.conflict-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    border-radius: 12px;
}

.conflict-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
}

.conflict-head strong {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
}

.conflict-tag {
    padding: 2px 10px;
    background: #f6ead7;
    color: #7a4e14;
    border-radius: 20px;
    font-size: 0.6875rem;
    font-weight: 600;
}

/* Like a <dt> in the agent cards */
.conflict-fact {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-sage);
}

.conflict-versions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.conflict-version {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.conflict-research {
    border-color: var(--color-sage);
}

.conflict-version span {
    font-size: 0.75rem;
    color: var(--color-muted);
}

.conflict-version strong {
    font-size: 0.9375rem;
    font-weight: 600;
}

.conflict-cmd {
    font-size: 0.75rem;
    color: var(--color-muted);
    overflow-wrap: anywhere;
}

.sync-conflict figcaption {
    margin-top: 10px;
    font-size: 0.8125rem;
    color: var(--color-muted);
}

.sync-foot {
    display: grid;
    gap: var(--space-sm);
    margin-top: var(--space-3xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--color-muted);
}

/* ---------- #start ---------- */

.r-start {
    max-width: 1000px;
}

.start-small {
    margin-top: var(--space-sm);
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--color-muted);
}

/* Other ways: folded, three columns when open */
.start-other {
    margin-top: var(--space-xl);
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.start-other > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    cursor: pointer;
    list-style: none;
}

.start-other > summary::-webkit-details-marker {
    display: none;
}

.start-other > summary::after {
    content: '▾';
    flex-shrink: 0;
    color: var(--color-forest);
    transition: transform var(--transition-fast);
}

.start-other[open] > summary::after {
    transform: rotate(180deg);
}

.start-other > summary:focus-visible {
    outline: 2px solid var(--color-sage);
    outline-offset: 2px;
    border-radius: var(--radius-lg);
}

.start-other-head {
    display: grid;
    gap: 2px;
}

.start-other-head strong {
    font-size: 1.0625rem;
    color: var(--color-forest);
}

.start-other-head span {
    font-size: 0.875rem;
    color: var(--color-muted);
}

.start-other-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-lg);
    padding: 0 var(--space-lg) var(--space-lg);
}

@media (max-width: 900px) {
    .start-other-grid {
        grid-template-columns: 1fr;
    }
}

.other-col {
    min-width: 0;
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
    font-size: 0.9375rem;
    line-height: 1.55;
}

.other-col h3 {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-ink);
    margin-bottom: var(--space-xs);
}

.other-col > p {
    color: var(--color-muted);
}

.other-col .sentence-box {
    margin-top: var(--space-sm);
    padding: var(--space-md);
}

.other-link {
    display: inline-block;
    margin-top: var(--space-md);
    font-size: 0.875rem;
}

/* Phones (and touch without a mouse): the research runs on a computer.
   The command lines hide; the box offers the link by e-mail. */
@media (max-width: 767px), (pointer: coarse) and (hover: none) {
    #start .cmd {
        display: none;
    }

}

/* The gallery, folded: its title opens it */
.r-fold-eyebrow {
    margin-bottom: var(--space-sm);
}

.r-fold > summary {
    display: block;
    text-align: center;
    cursor: pointer;
    list-style: none;
}

.r-fold > summary::-webkit-details-marker {
    display: none;
}

.r-fold > summary .section-title {
    display: inline;
}

.r-fold > summary::after {
    content: '▾';
    display: inline-block;
    margin-left: 0.4em;
    font-size: 1.25rem;
    color: var(--color-forest);
    transition: transform var(--transition-fast);
}

.r-fold[open] > summary::after {
    transform: rotate(180deg);
}

.r-fold > summary:focus-visible {
    outline: 2px solid var(--color-sage);
    outline-offset: 4px;
    border-radius: var(--radius-sm);
}

.r-fold[open] > summary {
    margin-bottom: var(--space-md);
}

/* In the gallery's groups: the advanced ones behind one more click */
.r-advanced {
    display: contents;
}

.r-advanced > summary {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 6px 14px;
    border: 1px dashed var(--color-border);
    border-radius: 999px;
    font-size: 0.875rem;
    color: var(--color-muted);
    cursor: pointer;
    list-style: none;
    white-space: nowrap;
}

.r-advanced > summary::-webkit-details-marker {
    display: none;
}

.r-advanced > summary::after {
    content: ' ▸';
    white-space: pre;
}

.r-advanced[open] > summary::after {
    content: ' ▾';
}

.r-advanced > summary:focus-visible {
    outline: 2px solid var(--color-sage);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .start-other > summary::after,
    .r-fold > summary::after {
        transition: none;
    }
}

/* The price under "What does it cost?" */
.what-grid .what-price {
    margin-top: var(--space-xs);
    font-size: 0.8125rem;
    color: var(--color-muted);
}

.modes-setup {
    max-width: 760px;
    margin: var(--space-xl) auto 0;
    text-align: center;
    color: var(--color-muted);
    line-height: 1.6;
}

/* The sentence for the agent */
.sentence-box {
    display: grid;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--color-cream);
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-sage);
    border-radius: var(--radius-md);
}

.sentence {
    font-size: 0.9375rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.copy-btn {
    justify-self: start;
    padding: 8px 16px;
    background: var(--color-forest);
    color: #fff;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    transition: background var(--transition-fast);
}

.copy-btn:hover {
    background: var(--color-moss);
}

.copy-btn.copied {
    background: var(--color-sage);
}

.copy-btn:focus-visible,
.os-tabs button:focus-visible,
.faq-list summary:focus-visible,
.for-agents summary:focus-visible {
    outline: 2px solid var(--color-sage);
    outline-offset: 2px;
}

/* A command line: dark, monospace, wraps anywhere, Copy stuck to the right */
.cmd {
    display: flex;
    align-items: stretch;
    margin-top: var(--space-sm);
    background: var(--color-forest);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.cmd code {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    color: #fff;
    font-size: 0.8125rem;
    line-height: 1.5;
    word-break: break-all;
}

.cmd .copy-btn {
    flex-shrink: 0;
    border-radius: 0;
    background: var(--color-moss);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.cmd .copy-btn:hover {
    background: var(--color-sage);
}

/* The second way in (cmd / without curl): lighter, below the main line */
.cmd-alt-label {
    margin-top: var(--space-md);
    font-size: 0.8125rem;
    color: var(--color-muted);
}

.cmd-alt {
    margin-top: 4px;
    background: var(--color-cream);
    border: 1px solid var(--color-border);
}

.cmd-alt code {
    color: var(--color-ink);
}

.cmd-alt .copy-btn {
    background: var(--color-paper);
    color: var(--color-forest);
    border-left: 1px solid var(--color-border);
}

.cmd-alt .copy-btn:hover {
    background: var(--color-mint);
}

.cmd-alt .copy-btn.copied {
    background: var(--color-sage);
    color: #fff;
}

/* The setup wizard's questions as small numbered chips */
.wizard-chips {
    list-style: none;
    counter-reset: wiz;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: var(--space-sm) 0;
}

.wizard-chips li {
    counter-increment: wiz;
    padding: 3px 10px;
    background: var(--color-cream);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    font-size: 0.8125rem;
    color: var(--color-ink);
}

.wizard-chips li::before {
    content: counter(wiz) " ";
    font-weight: 600;
    color: var(--color-sage);
}

/* Phones: the long GitHub address needs the full width; Copy goes below */
@media (max-width: 480px) {
    .cmd {
        flex-direction: column;
    }

    .cmd .copy-btn {
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
    }

    .cmd-alt .copy-btn {
        border-top-color: var(--color-border);
    }
}

/* ---------- #agents ---------- */

.model-box {
    display: grid;
    gap: 4px;
    max-width: 820px;
    margin: 0 auto var(--space-2xl);
    padding: var(--space-lg) var(--space-xl);
    background: var(--color-forest);
    color: rgba(255, 255, 255, 0.85);
    border-radius: var(--radius-lg);
    text-align: center;
}

.model-box strong {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
}

.agent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: var(--space-lg);
}

/* Two columns: the odd last agent takes the whole row. */
@media (min-width: 560px) and (max-width: 899px) {
    .agent-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .agent-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}

/* Five agents: three in the first row, two wider ones under them. */
@media (min-width: 900px) {
    .agent-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .agent-card {
        grid-column: span 2;
    }

    .agent-card:nth-child(n+4) {
        grid-column: span 3;
    }
}

.agent-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: var(--space-xl);
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.agent-recommended {
    /* 1px + a ring: the content sits on the same lines as in the other cards */
    border: 1px solid var(--color-forest);
    box-shadow: 0 0 0 1px var(--color-forest);
}

/* /research/help/: the download page is a flat page screenshot, give it a frame */
.help-shot .shot-link[href*="download"] {
    overflow: hidden;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-soft);
}

/* The "Recommended" pill on the Claude card */
.path-tag {
    position: absolute;
    top: -12px;
    left: var(--space-xl);
    padding: 3px 12px;
    background: var(--color-forest);
    color: #fff;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.agent-card h3 {
    font-size: 1.6rem;
    font-weight: 600;
}

.agent-maker {
    font-size: 0.8125rem;
    color: var(--color-muted);
    margin-bottom: var(--space-md);
}

.agent-card h3 + .agent-maker {
    margin-bottom: 0;
    padding-bottom: 20px;
}

.agent-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding-bottom: 20px;
}

.agent-card .agent-row dt {
    margin-top: 0;
}

/* The terminal way is the side path */
.agent-row-pro {
    padding-top: var(--space-md);
    padding-bottom: var(--space-lg);
    border-top: 1px dashed var(--color-border);
}

.agent-card dt {
    margin-top: var(--space-sm);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-sage);
}

.agent-card dd {
    font-size: 0.875rem;
    line-height: 1.5;
}

/* The links under "App" (a small button, the main one) and "For the experienced" */
.agent-card .agent-get .btn {
    margin-top: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
}

.agent-card .agent-get-cli {
    margin-top: var(--space-xs);
    font-size: 0.8125rem;
}

.agent-where-lead {
    max-width: 640px;
    margin: 0 auto var(--space-2xl);
    font-size: 0.9375rem;
    text-align: center;
}

.agent-app-note {
    margin-top: var(--space-sm);
    font-size: 0.8125rem;
    color: var(--color-muted);
}

/* Side by side, the cards' blocks line up: head, 4 rows, footer */
@media (min-width: 560px) {
    .agent-card {
        display: grid;
        grid-template-rows: subgrid;
        grid-row: span 6;
        row-gap: 0;
    }

    .agent-card dl {
        display: contents;
    }

    .agent-links {
        align-self: end;
    }
}

.agent-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm) var(--space-lg);
    margin-top: auto;
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
    font-size: 0.875rem;
}

.agent-note {
    margin-top: var(--space-xl);
    text-align: center;
    font-size: 0.875rem;
    color: var(--color-muted);
}

/* ---------- #privacy ---------- */

.privacy-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
    align-items: start;
}

@media (min-width: 1025px) {
    .privacy-grid {
        grid-template-columns: 1.5fr 1fr;
    }
}

.privacy-cards {
    list-style: none;
    display: grid;
    gap: var(--space-md);
}

.privacy-card {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.privacy-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--color-cream);
    color: var(--color-forest);
}

.privacy-icon svg {
    width: 22px;
    height: 22px;
}

.privacy-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.privacy-card p {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--color-muted);
}

.perm-panel {
    padding: var(--space-xl);
    background: var(--color-cream);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.perm-panel h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: var(--space-lg);
}

.perm-levels {
    list-style: none;
    display: grid;
    gap: var(--space-md);
}

.perm-levels li {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
}

.perm-levels strong {
    display: block;
    color: var(--color-forest);
}

.perm-levels span:not(.perm-meter) {
    font-size: 0.875rem;
    color: var(--color-muted);
}

.perm-meter {
    flex-shrink: 0;
    display: flex;
    gap: 3px;
    margin-top: 6px;
}

.perm-meter i {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    border: 1px solid var(--color-sage);
    background: transparent;
}

.perm-meter i.on {
    background: var(--color-sage);
}

.perm-note {
    margin-top: var(--space-lg);
    font-size: 0.8125rem;
    color: var(--color-muted);
}

.trust-list {
    list-style: none;
    display: grid;
    gap: 6px;
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-forest);
}

.trust-list li::before {
    content: '✓';
    margin-right: 8px;
    color: var(--color-sage);
    font-weight: 700;
}

.trust-list a {
    text-decoration: underline;
    text-decoration-color: var(--color-mint);
    text-underline-offset: 3px;
}

/* ---------- #faq ---------- */

.faq-list {
    display: grid;
    gap: var(--space-sm);
}

.faq-list details {
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.faq-list details[open] {
    border-color: var(--color-sage);
}

/* Block, not flex: a question with a command in it (`strom` is not
   recognised) would split into separate items pushed apart. The +/× mark
   sits at the right edge. */
.faq-list summary {
    list-style: none;
    display: block;
    position: relative;
    padding: var(--space-md) calc(var(--space-lg) + 1.75rem) var(--space-md) var(--space-lg);
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    border-radius: var(--radius-md);
}

.faq-list summary::-webkit-details-marker {
    display: none;
}

.faq-list summary::after {
    content: '+';
    position: absolute;
    right: var(--space-lg);
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-body);
    font-size: 1.25rem;
    color: var(--color-sage);
    transition: transform var(--transition-fast);
}

.faq-list details[open] summary::after {
    transform: translateY(-50%) rotate(45deg);
}

.faq-list details p {
    padding: 0 var(--space-lg) var(--space-lg);
    color: var(--color-muted);
    line-height: 1.7;
}

.faq-more {
    margin-top: var(--space-xl);
    text-align: center;
}

/* ---------- #for-agents ---------- */

.for-agents summary {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    cursor: pointer;
    border-radius: var(--radius-sm);
}

.for-agents summary::-webkit-details-marker {
    display: none;
}

.fa-human {
    font-size: 1.0625rem;
    color: var(--color-ink);
}

.fa-toggle {
    padding: 8px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-paper);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-forest);
}

.for-agents .fa-hide,
.for-agents[open] .fa-show {
    display: none;
}

.for-agents[open] .fa-hide {
    display: inline;
}

.agents-text {
    margin-top: var(--space-lg);
    padding: var(--space-lg);
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8125rem;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* ---------- Header: the research pages' nav ---------- */

/* A little smaller and closer than on the other pages. */
@media (min-width: 900px) {
    .research-page .nav-links {
        gap: clamp(0.625rem, 1vw, 1rem);
    }

    .research-page .nav-links a {
        font-size: 0.875rem;
    }
}

/* The manual has six links plus the way back and Launch: in German they
   fit from 1200 px, below that its links go to the menu button. */
@media (min-width: 900px) and (max-width: 1199px) {
    .help-page .nav-links {
        display: none;
    }

    .help-page .mobile-menu-btn {
        display: flex;
    }

    .help-page .nav-actions {
        margin-left: auto;
    }

    .help-page .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--color-paper);
        padding: var(--space-lg);
        border-bottom: 1px solid var(--color-border);
        gap: var(--space-md);
    }

    .help-page .nav-links.active a {
        padding: var(--space-md);
        text-align: center;
    }
}

/* A gallery group without shots stays hidden (gallery.js) */
.gallery-group[hidden] {
    display: none;
}

@media (max-width: 640px) {
    .logo-tag {
        font-size: 0.6875rem;
        padding: 1px 6px;
    }
}

/* At phone widths the logo, its tag, the language switcher, the launch (or
   back) button and the menu button do not fit in one bar: the menu button
   ended up off-screen. The tree icon alone stays as the link home. */
@media (max-width: 480px) {
    .research-page .logo-text,
    .research-page .logo-tag {
        display: none;
    }
}

/* ========================================
   /research/help/
   ======================================== */

/* The page's system switch: html[data-os] (set by research.js) hides the
   other systems' text. No JS → no attribute → everything shows. */
html[data-os="win"] [data-os-show]:not([data-os-show~="win"]),
html[data-os="mac"] [data-os-show]:not([data-os-show~="mac"]),
html[data-os="linux"] [data-os-show]:not([data-os-show~="linux"]) {
    display: none !important;
}

/* Without JS each block says which system it is for */
.os-nojs-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-sage);
}

html[data-os] .os-nojs-tag {
    display: none;
}

/* "← Strom Research": outlined, it leads back rather than on */
.btn-nav-outline {
    background: var(--color-paper);
    color: var(--color-forest);
    border: 1px solid var(--color-border);
}

.btn-nav-outline:hover {
    background: var(--color-cream);
    border-color: var(--color-sage);
}

.os-req {
    font-size: 0.9375rem;
    color: var(--color-muted);
}

html:not([data-os]) .os-req span {
    display: block;
}

.help-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
    gap: var(--space-md);
}

.help-tile {
    display: grid;
    align-content: start;
    gap: 4px;
    padding: var(--space-lg);
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.help-tile:hover,
.help-tile:focus-visible {
    border-color: var(--color-sage);
    box-shadow: var(--shadow-medium);
}

.help-tile strong {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-ink);
}

.help-tile span {
    font-size: 0.875rem;
    color: var(--color-muted);
}

/* Details table: the chosen system's column, or all three */
.help-details {
    margin-top: var(--space-3xl);
    padding: var(--space-xl);
    background: var(--color-cream);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.help-details-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.help-details-head h3 {
    font-size: 1.4rem;
    font-weight: 600;
}

.help-compare {
    cursor: pointer;
}

html:not([data-os]) .help-compare,
.help-compare .compare-on,
.help-details.compare-all .help-compare .compare-off {
    display: none;
}

.help-details.compare-all .help-compare .compare-on {
    display: inline;
}

html[data-os="win"] .help-details:not(.compare-all) [data-os-col]:not([data-os-col="win"]),
html[data-os="mac"] .help-details:not(.compare-all) [data-os-col]:not([data-os-col="mac"]),
html[data-os="linux"] .help-details:not(.compare-all) [data-os-col]:not([data-os-col="linux"]) {
    display: none;
}

.help-details:not(.compare-all) thead {
    display: none;
}

html:not([data-os]) .help-details thead {
    display: table-header-group;
}

@media (max-width: 640px) {
    /* One system: the row label above its value, so nothing is squeezed */
    html[data-os] .help-details:not(.compare-all) .help-table tr,
    html[data-os] .help-details:not(.compare-all) .help-table th,
    html[data-os] .help-details:not(.compare-all) .help-table td {
        display: block;
        width: auto;
    }

    html[data-os] .help-details:not(.compare-all) .help-table tbody th {
        padding-bottom: 0;
    }

    html[data-os] .help-details:not(.compare-all) .help-table td {
        border-top: 0;
        padding-top: 4px;
    }

    html[data-os="win"] .help-details:not(.compare-all) [data-os-col]:not([data-os-col="win"]),
    html[data-os="mac"] .help-details:not(.compare-all) [data-os-col]:not([data-os-col="mac"]),
    html[data-os="linux"] .help-details:not(.compare-all) [data-os-col]:not([data-os-col="linux"]) {
        display: none;
    }

    .help-details {
        padding: var(--space-lg);
    }

    .help-details.compare-all .help-table,
    html:not([data-os]) .help-table {
        min-width: 560px;
    }
}

/* strom doctor: a dark box on top of the problems */
.doctor-box {
    display: grid;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    padding: var(--space-xl);
    background: var(--color-forest);
    color: rgba(255, 255, 255, 0.85);
    border-radius: var(--radius-lg);
}

.doctor-box strong {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    color: #fff;
}

.doctor-box .cmd {
    background: rgba(0, 0, 0, 0.25);
    max-width: 420px;
}

.help-more {
    margin-top: var(--space-xl);
    font-size: 0.9375rem;
    color: var(--color-muted);
}

.help-more strong {
    color: var(--color-ink);
    margin-right: 4px;
}

.uninstall-box {
    padding: var(--space-xl);
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.uninstall-box .cmd {
    max-width: 420px;
}

.help-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-2xl);
}

/* ---------- The web as a guide (2026-10) ---------- */

/* #start: under the guide, two folded columns */
.start-other-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 900px) {
    .start-other-grid--two {
        grid-template-columns: 1fr;
    }
}

/* #agents: the cards from the guide's data (js/guide.js agentsHtml) */
.agent-maker .agent-expert {
    font-weight: 600;
    color: var(--color-sage);
}

.agent-card .agent-pro {
    margin-top: var(--space-sm);
    font-weight: 600;
}

.agent-card .agent-cmd {
    width: 100%;
    margin-top: var(--space-sm);
}

.agent-cmd-os {
    display: block;
    font-size: 0.8125rem;
    color: var(--color-muted);
}

.agent-cmd .cmd {
    margin-top: 4px;
}

.agent-cmd .agent-app-note {
    display: block;
}

/* The computer's system (research.js sets data-os): its own line only;
   OpenCode only on Mac and Linux. Without JS every line shows. */
.agent-grid[data-os="win"] .ag-unix,
.agent-grid[data-os="mac"] .ag-win,
.agent-grid[data-os="linux"] .ag-win {
    display: none;
}

/* Windows: four cards, two by two */
@media (min-width: 900px) {
    .agent-grid[data-os="win"] .agent-card {
        grid-column: span 3;
    }
}

@media (min-width: 560px) and (max-width: 899px) {
    .agent-grid[data-os="win"] .agent-card:last-child:nth-child(odd) {
        grid-column: auto;
    }
}

/* /research/help/ as the manual: the way to the guide at the top */
.help-to-guide {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    margin: 1.25rem 0 0;
    font-weight: 500;
}

/* On a phone the manual's bar keeps Launch; the way back is the logo. */
@media (max-width: 640px) {
    .help-page .nav-actions .btn-nav-outline {
        display: none;
    }
}
