/*
Theme Name: Workflow Lab
Description: An editorial theme for X-Agent Lab and its research archive.
Version: 1.0.0
License: GPL-2.0-or-later
*/
@font-face { font-family: 'Manrope'; src: url('manrope-latin.woff2') format('woff2'); font-weight: 400 800; font-display: swap; }
:root {
    color-scheme: light;
    --surface: #f2f5fc;
    --paper: #fff;
    --ink: #111b34;
    --secondary: #435170;
    --blue: #2044cc;
    --line: #dce4f4;
    --heading: 'Manrope', system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--surface); font: 1rem/1.62 system-ui, sans-serif; }
html { scroll-behavior: smooth; }
a { color: inherit; text-underline-offset: .23em; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
[hidden] { display: none !important; }
.shell { width: min(1160px, calc(100% - 70px)); margin-inline: auto; }
.skip { position: fixed; top: 8px; left: 8px; padding: 8px 16px; z-index: 20; transform: translateY(-130%); color: #fff; background: var(--blue); }
.skip:focus { transform: none; }
.masthead { border-bottom: 1px solid var(--line); background: #f8faff; }
.mast-inner { min-height: 74px; display: flex; justify-content: space-between; align-items: center; gap: .75rem 1.8rem; }
.wordmark { display: inline-flex; align-items: center; gap: .53rem; white-space: nowrap; text-decoration: none; font: 800 1.23rem/1 var(--heading); letter-spacing: -.04em; }
.lab { margin-left: -.27rem; color: var(--blue); }
.mark { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 10px; background: var(--blue); }
.mark span { width: 17px; height: 17px; border: 1.7px solid #fff; border-radius: 4px; transform: rotate(45deg); }
.mast-inner nav, .footer nav { display: flex; gap: clamp(.8rem, 3.6vw, 2.6rem); }
.mast-inner nav a, .footer nav a, .top-about { display: inline-flex; align-items: center; min-height: 44px; color: var(--secondary); text-decoration: none; font-size: .89rem; font-weight: 700; }
.mast-inner nav a:hover, .footer nav a:hover, .top-about:hover { color: var(--blue); text-decoration: underline; }
.top-about { gap: .48rem; padding-inline: 13px; border: 1px solid #dce4f7; border-radius: 10px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: clamp(2.5rem, 6.4vw, 6rem); min-height: 590px; padding-block: 4.4rem; align-items: center; }
h1,h2,h3 { font-family: var(--heading); font-weight: 800; letter-spacing: -.06em; line-height: 1.04; }
.hero h1 { margin: 0; font-size: clamp(3.1rem, 5.6vw, 5.24rem); text-wrap: balance; }
.hero h1 span { color: var(--blue); }
.hero-copy p { max-width: 41ch; margin: 1.45rem 0 1.85rem; color: var(--secondary); font-size: 1.15rem; }
.hero-links { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.3rem; }
.button { color: #fff; background: var(--blue); display: inline-flex; align-items: center; gap: .65rem; min-height: 48px; padding: .62rem 1rem; border-radius: 11px; font-weight: 700; text-decoration: none; }
.button:hover { background: #1837b4; }
.quiet-link { font-weight: 720; color: var(--blue); display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; }
.example { position: relative; padding: clamp(1.15rem, 3vw, 2.12rem); border: 1px solid #d9e2f6; border-radius: 24px; background: radial-gradient(circle at 90% 16%, #e1e8ff, transparent 52%), linear-gradient(180deg,#fafcff,#eff3fc); box-shadow: 0 19px 42px #243e8912; scroll-margin-top: 1.2rem; }
.example-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.1rem; }
.example-head p, .story-topic { margin: 0 0 .2rem; color: #2546b1; font-size: .79rem; font-weight: 740; }
.example h2 { margin: 0; font-size: 1.95rem; }
.example-symbol { display: flex; gap: 7px; align-items: center; padding: 0 3px; }
.example-symbol i { width: 10px; height: 10px; background: #98aef9; border-radius: 3px; transform: rotate(45deg); }
.example-symbol i:nth-child(2) { background: #5d79e7; }.example-symbol i:nth-child(3) { background: var(--blue); }
.scenario { display: flex; gap: .34rem; flex-wrap: wrap; margin: 0 0 1.15rem; }
.scenario button { min-height: 36px; padding: .35rem .58rem; border: 1px solid #d5dff6; border-radius: 8px; cursor: pointer; color: #324369; background: #f9fbff; font-size: .76rem; font-weight: 720; }
.scenario button[aria-pressed=true] { background: #e1e8ff; border-color: #aabaf1; color: #1637b2; }
.scenario button:hover { border-color: var(--blue); }
.flow { list-style: none; display: grid; gap: 12px; padding: 0; margin: 0; position: relative; }
.flow::before { content: ''; position: absolute; z-index: 0; top: 28px; bottom: 28px; left: 30px; width: 2px; background: #9eb2f1; }
.flow-step { position: relative; display: grid; grid-template-columns: 33px 1fr; gap: 14px; align-items: start; padding: .75rem .85rem; border: 1px solid #dce5f7; border-radius: 13px; background: #fff; }
.flow-step b { font-size: .92rem; }
.flow-step p { margin: .15rem 0 0; color: var(--secondary); line-height: 1.42; font-size: .87rem; }
.flow-work { border-color: #c7d4ff; }
.flow-output { background: #edf1ff; border-color: #c6d3ff; }
.node-square,.node-diamond,.node-result { width: 32px; height: 32px; background: #e8eeff; border-radius: 8px; display: grid; place-items: center; color: var(--blue); }
.node-square i { width: 12px; height: 12px; border: 2px solid currentColor; border-radius: 3px; }
.node-diamond i { width: 12px; height: 12px; transform: rotate(45deg); border: 2px solid currentColor; border-radius: 2px; }
.node-result i { width: 13px; height: 8px; border: solid currentColor; border-width: 0 0 2px 2px; transform: rotate(-45deg) translateY(-1px); }
.example-note { color: #495975; font-size: .78rem; margin: .95rem 0 0; }
.field-section { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper); padding-block: 3.7rem 4.75rem; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .24rem 1.5rem; margin-bottom: 1.6rem; }
.section-head h2,.archive-promo h2 { margin: 0; font-size: clamp(2.2rem, 4.2vw, 3.3rem); }
.section-head p,.archive-promo p { margin: 0; color: var(--secondary); }
.stories { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%),1fr)); gap: 1.08rem; }
.story a { display: flex; flex-direction: column; min-height: 100%; overflow: hidden; border-radius: 17px; border: 1px solid var(--line); background: #fcfdff; text-decoration: none; }
.story a:hover { border-color: #94a6ea; }
.story a:hover h3 { text-decoration: underline; }
.story figure { display: block; margin: 0; aspect-ratio: 2.4; background: #e6edff; overflow: hidden; }
.story img { width: 100%; height: 100%; object-fit: cover; }
.story-caption { padding: 1rem 1.12rem 1.28rem; }
.story h3 { margin: .32rem 0 .48rem; font-size: 1.35rem; letter-spacing: -.035em; }
.story-caption p:last-child { margin: 0; color: var(--secondary); font-size: .92rem; }
.archive-promo { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 3.4rem; }
.archive-promo h2 { font-size: clamp(1.8rem,3.65vw,2.9rem); margin-bottom: .45rem; }
.footer { border-top: 1px solid var(--line); background: #eaf0fb; }
.footer-inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: .5rem 1rem; color: var(--secondary); }
.footer p { margin: 0; font-size: .89rem; }
.reading { padding-block: clamp(2.5rem, 6vw, 5.5rem); max-width: 940px; min-height: 65vh; }
.reading h1 { margin: .32rem 0 1rem; max-width: 19ch; font-size: clamp(2.7rem, 6.2vw, 4.9rem); }
.article-head,.prose { max-width: 740px; margin-inline: auto; }
.dek { font-size: 1.16rem; color: var(--secondary); }
.article-head time { color: var(--secondary); font-size: .86rem; }
.article-cover { margin: 1.6rem 0 1.8rem; border-radius: 20px; border: 1px solid var(--line); overflow: hidden; }
.article-cover img { width: 100%; }
.prose { font-size: 1.06rem; }
.prose h2 { margin: 1.7rem 0 .6rem; font-size: clamp(1.5rem,4vw,2.16rem); letter-spacing: -.037em; }
.prose p,.prose ul { margin-block: .65rem 1rem; }
.prose a { color: var(--blue); overflow-wrap: anywhere; }
.prose pre { max-width: 100%; overflow: auto; padding: .8rem; background: #e8eeff; border-radius: 9px; }
@media(max-width: 850px) {
    .shell { width: calc(100% - 44px); }
    .hero { grid-template-columns: 1fr; min-height: 0; padding-block: 2.8rem 3.2rem; gap: 1.7rem; }
    .hero h1 { max-width: 13ch; }
    .example { max-width: 640px; }
}
@media(max-width: 510px) {
    .shell { width: calc(100% - 30px); }
    .mast-inner { min-height: 61px; flex-wrap: wrap; gap: .1rem 1rem; padding-block: .58rem .1rem; }
    .mast-inner nav { gap: .8rem; }
    .mast-inner nav a { font-size: .77rem; }
    .top-about { display: none; }
    .mark { width: 28px; height: 28px; }
    .mark span { width: 12px; height: 12px; }
    .wordmark { font-size: 1.1rem; }
    .hero { padding-block: 2rem 2.5rem; }
    .hero h1 { font-size: clamp(2.95rem, 10.6vw, 3.72rem); }
    .hero-copy p { font-size: 1rem; margin: .92rem 0 1.1rem; }
    .hero-links { gap: .3rem .8rem; }
    .hero-links a { font-size: .83rem; }
    .field-section { padding-block: 2.55rem 3.4rem; }
    .archive-promo,.footer-inner { align-items: flex-start; flex-direction: column; }
    .footer-inner { padding-block: .9rem; }
}
@media(prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
