/* outerloop.science — site layer.
   Tokens and the component kit (header, nav, drawer, buttons, boxes, stats,
   tables, pills, footer, base type) come from the lab's shared stylesheet,
   linked in index.html before this file:
     https://agenticlearning.ai/css/lab-tokens.css
     https://agenticlearning.ai/css/lab-components.css
   (canonical home: agentic-learning-ai-lab.github.io, css/). Only rules
   specific to this site live here. */
tr:last-child td { border-bottom: 0; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
.big { font-family: var(--mono); font-weight: 700; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dot.r { background: #ef6a5f; } .dot.y { background: #f5bd4f; } .dot.g { background: #61c655; }
.pane-title { font-family: var(--mono); font-size: 0.78rem; color: var(--fg-muted); margin-left: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pane-body { padding: 0.5rem 0; font-family: var(--mono); font-size: 0.82rem; }
.gh .ghrow { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr) 10.5rem 4.4rem; align-items: center; gap: 0.6rem; padding: 0.5rem 1rem; border-bottom: 1px solid var(--border-soft); }
.gh .ghnum { display: inline-flex; align-items: center; white-space: nowrap; }
.gh .ghtitle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gh .badge { justify-self: start; }
.gh .ghrow:last-child { border-bottom: 0; }
.gh .ghrow b { font-weight: 700; color: var(--accent); margin-right: 4px; }
.gh .badge { font-size: 0.7rem; padding: 1px 9px; border-radius: 999px; }
.gh .badge.merged { color: #fff; background: #8250df; }
.gh .badge.open { color: #fff; background: var(--good); }
.gh .badge.closed { color: #fff; background: var(--bad); }
.gh .ghmeta { font-size: 0.72rem; color: var(--fg-muted); }
.pane-body.term { white-space: pre; overflow-x: auto; padding: 0.85rem 1rem; line-height: 1.7; color: var(--fg); }
.term .c6 { color: var(--fg-muted); }
.term .run { color: var(--good); } .term .pend { color: var(--warn); }
@media (prefers-reduced-motion: no-preference) { .header-links, .button, .box { transition: border-color 0.2s, background-color 0.2s; } }

.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; margin: 0.5rem 0 1.5rem; padding: 3rem 3.25rem 2rem; background: var(--card-bg); border-radius: var(--radius-lg); }
.hero h1 { font-size: clamp(2.4rem, 4.6vw, 3.6rem); line-height: 1.1; font-weight: 500; margin: 0; max-width: 24ch; }
.hero p { max-width: 62ch; font-size: 1.1rem; margin: 1rem 0 1.5rem; }
svg.stages { width: 100%; height: auto; display: block; margin-top: 0.75rem; }
.stages .cluster { fill: var(--bg); stroke: var(--border-soft); stroke-width: 1; }
.stages .box, .stages .card { fill: var(--bg); stroke: var(--border-soft); stroke-width: 1.5; }
.stages .card { fill: color-mix(in srgb, var(--fg) 4%, var(--bg)); }
.stages .tile { fill: var(--bg); stroke: var(--border-soft); stroke-width: 1; }
.stages .divider { fill: var(--border-soft); }
.stages .bar { fill: color-mix(in srgb, var(--accent) 60%, var(--bg)); }
.stages .muted-bar { fill: color-mix(in srgb, var(--accent) 22%, var(--bg)); }
.stages .bench, .stages .head, .stages .foot { fill: var(--accent); }
.stages .b0 { opacity: 0.35; } .stages .b1 { opacity: 0.5; } .stages .b2 { opacity: 0.65; } .stages .b3 { opacity: 0.8; }
.stages .name { font-family: var(--mono); font-size: 19px; font-weight: 700; fill: var(--fg); }
.stages .sub { font-family: var(--serif); font-size: 14px; fill: var(--fg-muted); }
.stages .chip { font-family: var(--mono); font-size: 13px; fill: var(--fg-muted); }
.stages .pilltext { font-family: var(--mono); font-size: 11.5px; }
.stages .pill.pill-good { fill: color-mix(in srgb, var(--good) 15%, var(--bg)); }
.stages .pill.pill-accent { fill: color-mix(in srgb, var(--accent) 15%, var(--bg)); }
.stages .pill.pill-warn { fill: color-mix(in srgb, var(--warn) 15%, var(--bg)); }
.stages .pilltext.pill-good, .stages .pr-good { fill: var(--good); }
.stages .pilltext.pill-accent, .stages .pr-accent { fill: var(--accent); }
.stages .pilltext.pill-warn, .stages .pr-warn { fill: var(--warn); }
.stages .pr-muted { fill: var(--mark); }
.stages .ico { fill: var(--bg); stroke: var(--fg); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.stages .cluster-ico { stroke-width: 2.2; }
.stages .eye { fill: #0d0d0d; }
.stages .glass { fill: white; fill-opacity: 0.35; stroke: #0d0d0d; stroke-width: 3; }
.stages .glass-highlight { fill: none; stroke: white; stroke-opacity: 0.75; stroke-width: 1; stroke-linecap: round; }
.stages .frame { fill: none; stroke: #0d0d0d; stroke-width: 3; stroke-linecap: round; }
.stages .flow { fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.stages .flow.good { stroke: var(--good); }
.stages .mote.accent { fill: var(--accent); } .stages .mote.good { fill: var(--good); }
@media (prefers-reduced-motion: reduce) { .stages .motes { display: none; } }
.stages .prop-dark { fill: var(--fg-muted); stroke: var(--border); stroke-width: 1.5; }
.stages .prop-detail { fill: var(--border-soft); }
.stages .prop-paper { fill: var(--bg); stroke: var(--border-soft); stroke-width: 2; }
.stages .prop-lens { fill: var(--bg); stroke: var(--fg-muted); stroke-width: 2; }
.stages .prop-stroke { fill: none; stroke: var(--fg-muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stages .arm { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; }
.stages .grip { stroke-width: 8; }
.stages .laptop-lid { fill: color-mix(in srgb, var(--fg) 65%, var(--fg-muted)); }
.stages .laptop-base { fill: none; stroke: var(--fg-muted); stroke-width: 3; stroke-linecap: round; }
.stages .bulb-base { fill: var(--fg); }
.stages .bulb-rays { fill: none; stroke: var(--warn); stroke-width: 2; stroke-linecap: round; }
.stages .bulb { fill: color-mix(in srgb, var(--warn) 65%, var(--bg)); stroke: var(--warn); stroke-width: 1.5; }
.stages .check { fill: none; stroke: var(--good); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.stage-list { display: none; margin: 0; padding: 0 0 0 1.2rem; font-size: 1rem; line-height: 1.6; }
.stage-list li { margin: 0.35rem 0; } .stage-list b { font-family: var(--mono); font-weight: 700; }
.fleet-live { display: flex; align-items: flex-start; gap: 9px; margin-top: 0.9rem; padding-top: 0.8rem; border-top: 1px solid var(--border-soft); font-family: var(--mono); font-size: 0.8rem; line-height: 1.6; color: var(--fg-muted); }
.fleet-live .live-dot { margin-top: 0.45em; }
.live-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
@media (max-width: 860px) { .hero { padding: 2rem 1.5rem; } .hero h1 { font-size: clamp(2.2rem, 8vw, 3rem); } }
@media (max-width: 720px) { svg.stages { display: none; } .stage-list { display: block; } }
svg.chart { width: 100%; height: auto; display: block; }
svg.chart text { font-family: var(--mono); font-size: 11px; fill: var(--fg-muted); }
.results { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1.5rem; align-items: start; }
.big { font-size: clamp(2.4rem, 5vw, 3.6rem); }
@media (max-width: 860px) { .results { grid-template-columns: minmax(0, 1fr); } }

.button .btn-icon { width: 15px; height: 15px; margin-right: 7px; fill: currentColor; }

/* top bar: page sections, then the docs and the code */
.nav-sep { width: 1px; height: 1.4rem; background: var(--border); margin: 0 0.25rem; }
@media (max-width: 1023px) { .nav-sep { width: 3rem; height: 1px; margin: 0.4rem 12px; } }

/* research: one card per paper, first-page thumbnail beside the summary */
.papers { display: grid; gap: 1.5rem; }
.paper { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.paper .thumb img { display: block; width: 100%; height: auto; border: 1px solid var(--border-soft); border-radius: var(--radius-sm); background: #fff; }
.paper h3 { margin: 0.3rem 0 0.25rem; font-size: 1.2rem; line-height: 1.35; }
.paper h3 a { color: var(--fg); text-decoration: none; }
.paper h3 a:hover { color: var(--accent); }
.paper .authors { margin: 0 0 0.6rem; }
.paper p.muted { margin: 0 0 1rem; max-width: 68ch; }
.paper .cta { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: flex-start; }
.paper pre.cite { display: none; margin: 0.75rem 0 0; padding: 0.8rem 1rem; overflow-x: auto; font-family: var(--mono); font-size: 0.8rem; background: var(--bg); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); }
.paper.show-cite pre.cite { display: block; }
@media (max-width: 640px) { .paper { grid-template-columns: minmax(0, 1fr); } .paper .thumb { max-width: 12rem; } }
