:root { --ink:#172033; --muted:#626b7c; --accent:#3563e9; --line:#dce2ef; --surface:#fff; --background:#f5f7fb; }
* { box-sizing:border-box; }
body { margin:0; min-height:100vh; display:flex; flex-direction:column; background:var(--background); color:var(--ink); font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
a { color:inherit; }
.site-header { width:min(1120px,calc(100% - 48px)); min-height:88px; margin:0 auto; display:flex; align-items:center; gap:36px; border-bottom:1px solid var(--line); }
.logo { margin-right:auto; font-size:1.25rem; font-weight:800; text-decoration:none; }
.navigation-toggle { display:none; }
.site-header nav[hidden] { display:none; }
nav { display:flex; align-items:center; gap:24px; }
nav a { padding:12px 0; color:var(--muted); font-size:.95rem; font-weight:600; text-decoration:none; white-space:nowrap; }
nav a:hover, nav a.active { color:var(--accent); }
.language-picker label { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
select { padding:8px 12px; border:1px solid var(--line); border-radius:10px; background:var(--surface); color:var(--ink); font:inherit; cursor:pointer; }
main { width:min(1120px,calc(100% - 48px)); margin:0 auto; flex:1; }
.hero { padding:72px 0; display:grid; grid-template-columns:minmax(0,1.2fr) minmax(280px,.8fr); align-items:center; gap:clamp(40px,7vw,88px); }
.hero-copy { max-width:680px; }
.hero-image { display:block; width:100%; height:min(620px,65vw); min-height:440px; object-fit:cover; border-radius:24px; }
.page-intro { max-width:760px; padding:112px 0 72px; }
.page-intro { padding-bottom:56px; }
.eyebrow { margin:0 0 18px; color:var(--accent); font-size:.8rem; font-weight:800; letter-spacing:.14em; text-transform:uppercase; }
h1 { margin:0 0 24px; font-size:clamp(3rem,9vw,6.5rem); line-height:.95; letter-spacing:-.06em; }
.hero h1 { line-height:1.08; }
h2 { margin:0 0 12px; font-size:clamp(1.4rem,3vw,2rem); }
.lead,.content-card p { color:var(--muted); font-size:1.15rem; line-height:1.7; }
.scroll-story { margin:72px 0 120px; display:grid; grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr); gap:clamp(48px,8vw,104px); }
.story-stage { position:sticky; top:24px; height:calc(100svh - 48px); min-height:540px; align-self:start; overflow:hidden; border-radius:28px; background:var(--ink); box-shadow:0 28px 70px rgba(23,32,51,.16); }
.story-visual { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:0; transform:scale(1.045); transition:opacity .75s ease,transform 1.15s ease; }
.story-visual-controller { object-fit:cover; object-position:center; background:#f2f1ef; }
.story-visual-sprayer { object-position:center bottom; transform-origin:center bottom; }
.story-visual-irrigation { object-position:34% center; }
.story-visual-tap { object-position:58% center; }
.story-visual.is-active { opacity:1; transform:scale(1); }
.story-step { min-height:100svh; display:flex; align-items:center; transition:opacity .4s ease,transform .55s ease; }
.has-scroll-story .story-step { opacity:1; transform:translateY(22px); }
.has-scroll-story .story-step.is-active { opacity:1; transform:translateY(0); }
.story-card { width:100%; padding:clamp(28px,4vw,48px); border:1px solid var(--line); border-radius:24px; background:rgba(255,255,255,.92); box-shadow:0 22px 60px rgba(23,32,51,.08); backdrop-filter:blur(12px); }
.story-number { display:block; margin-bottom:24px; color:var(--accent); font-size:.75rem; font-weight:850; letter-spacing:.16em; }
.story-card h2 { margin-bottom:26px; font-size:clamp(2rem,4vw,3.6rem); line-height:1.08; letter-spacing:-.04em; }
.story-card p { margin:0 0 20px; color:var(--muted); font-size:1.04rem; line-height:1.75; }
.story-card p:last-child { margin-bottom:0; }
.story-questions { margin:0; padding:0; list-style:none; }
.story-questions li { padding:17px 0 17px 34px; position:relative; border-top:1px solid var(--line); color:var(--ink); font-weight:650; line-height:1.5; }
.story-questions li:last-child { border-bottom:1px solid var(--line); }
.story-questions li::before { content:"?"; position:absolute; top:17px; left:0; color:var(--accent); font-weight:850; }
.story-card .story-answer { margin:28px 0 0; color:var(--accent); font-size:1.18rem; font-weight:750; line-height:1.5; }
.story-card .story-followup { margin-top:12px; }
.about-project-cta { margin:0 0 96px; display:flex; justify-content:center; }
.about-project-link { width:fit-content; max-width:100%; padding:14px 20px; display:flex; align-items:center; gap:14px; border-radius:12px; background:var(--accent); color:#fff; font-size:.95rem; font-weight:750; line-height:1.4; text-decoration:none; box-shadow:0 10px 24px rgba(53,99,233,.2); transition:background-color .2s ease,box-shadow .2s ease,transform .2s ease; }
.about-project-link:hover { background:#244fc9; box-shadow:0 14px 30px rgba(53,99,233,.28); transform:translateY(-2px); }
.about-project-link:focus-visible { outline:3px solid rgba(53,99,233,.3); outline-offset:3px; }
.about-project-link span:last-child { font-size:1.15rem; transition:transform .2s ease; }
.about-project-link:hover span:last-child { transform:translateX(3px); }
.next-page { display:flex; justify-content:flex-end; margin:48px 0; }
.next-page-link { display:inline-flex; align-items:center; justify-content:space-between; gap:20px; max-width:100%; min-height:48px; padding:14px 20px; border-radius:12px; background:var(--accent); color:#fff; font-weight:700; line-height:1.5; text-decoration:none; }
.next-page-link:hover { background:#244fc9; }
.next-page-link:focus-visible { outline:3px solid var(--accent); outline-offset:4px; }
@media (max-width:760px) { .next-page-link { width:100%; } }
.about-page { position:relative; }
.about-hero { min-height:680px; padding:96px 0 120px; position:relative; display:grid; grid-template-columns:minmax(0,1fr) minmax(360px,.82fr); align-items:center; gap:clamp(52px,8vw,110px); }
.about-hero::before { content:""; position:absolute; z-index:-1; top:8%; right:-9%; width:440px; height:440px; border-radius:50%; background:radial-gradient(circle,rgba(53,99,233,.14),rgba(53,99,233,0) 70%); pointer-events:none; }
.about-intro { max-width:660px; }
.about-intro h1 { text-wrap:balance; }
.about-intro .lead { max-width:560px; margin-bottom:0; }
.about-hero-image { min-height:530px; margin:0; position:relative; isolation:isolate; }
.about-hero-image::after { content:""; position:absolute; z-index:-1; inset:32px -24px -28px 32px; border:1px solid rgba(53,99,233,.22); border-radius:32px; }
.about-hero-image img { display:block; width:100%; height:530px; object-fit:cover; object-position:center 62%; border-radius:28px; box-shadow:0 30px 80px rgba(23,32,51,.2); }
.about-hero-image.about-hero-image-portrait { width:min(100%,360px); min-height:0; justify-self:center; }
.about-hero-image .about-controller-photo { height:auto; object-fit:contain; object-position:center; aspect-ratio:941/1672; }
.about-hero-orbit { position:absolute; z-index:2; border:1px solid rgba(255,255,255,.7); border-radius:50%; box-shadow:0 0 0 10px rgba(255,255,255,.1); pointer-events:none; }
.about-hero-orbit::after { content:""; position:absolute; top:50%; left:50%; width:10px; height:10px; border-radius:50%; background:#fff; box-shadow:0 0 22px rgba(255,255,255,.9); transform:translate(-50%,-50%); }
.about-hero-orbit-large { right:-22px; bottom:54px; width:112px; height:112px; animation:about-float 6s ease-in-out infinite; }
.about-hero-orbit-small { top:56px; left:-18px; width:58px; height:58px; animation:about-float 5s ease-in-out -2s infinite reverse; }
.about-quick-facts { max-width:1000px; margin:0 auto 136px; }
.about-quick-facts-heading { margin-bottom:42px; display:grid; grid-template-columns:minmax(0,1.1fr) minmax(280px,.9fr); column-gap:clamp(48px,8vw,96px); }
.about-quick-facts-heading .eyebrow { grid-column:1; }
.about-quick-facts-heading h2 { grid-column:1; margin-bottom:0; font-size:clamp(2rem,5vw,3.7rem); line-height:1.08; letter-spacing:-.04em; }
.about-quick-facts-heading > p:last-child { grid-column:2; grid-row:1 / span 2; align-self:end; margin:0; color:var(--muted); font-size:1.08rem; line-height:1.7; }
.about-pop-sections { display:grid; gap:12px; }
.about-pop-section { overflow:hidden; border:1px solid var(--line); border-radius:18px; background:rgba(255,255,255,.82); box-shadow:0 8px 24px rgba(23,32,51,.035); interpolate-size:allow-keywords; transition:border-color .25s ease,box-shadow .25s ease,background-color .25s ease; }
.about-pop-section:hover { border-color:#c3cde0; background:var(--surface); box-shadow:0 12px 30px rgba(23,32,51,.055); }
.about-pop-section[open] { border-color:#bfcdf4; background:var(--surface); box-shadow:0 16px 44px rgba(53,99,233,.075); }
.about-pop-section::details-content { height:0; opacity:0; overflow:clip; transition:height .4s cubic-bezier(.22,1,.36,1),opacity .3s ease,content-visibility .4s allow-discrete; }
.about-pop-section[open]::details-content { height:auto; opacity:1; }
.about-pop-section summary { padding:25px 28px; display:grid; grid-template-columns:minmax(0,1fr) 28px; align-items:center; gap:16px; color:var(--ink); font-size:clamp(1.15rem,2.5vw,1.4rem); font-weight:750; line-height:1.35; cursor:pointer; list-style:none; }
.about-pop-section summary::-webkit-details-marker { display:none; }
.about-pop-section summary:focus-visible { outline:3px solid rgba(53,99,233,.3); outline-offset:-3px; border-radius:18px; }
.about-pop-icon { position:relative; width:24px; height:24px; }
.about-pop-icon::before,.about-pop-icon::after { content:""; position:absolute; top:11px; left:3px; width:18px; height:2px; border-radius:2px; background:var(--accent); transition:transform .25s ease; }
.about-pop-icon::after { transform:rotate(90deg); }
.about-pop-section[open] .about-pop-icon::after { transform:rotate(0); }
.about-pop-content { padding:0 28px 32px; }
.about-pop-content p { max-width:720px; margin:0; color:var(--muted); font-size:1.06rem; line-height:1.75; }
.about-use-cases { margin:32px 0 20px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); border-top:1px solid var(--line); border-left:1px solid var(--line); border-radius:18px; overflow:hidden; }
.about-use-case { min-height:100%; padding:28px; position:relative; border-right:1px solid var(--line); border-bottom:1px solid var(--line); background:var(--surface); transition:background-color .25s ease; }
.about-use-case:hover { background:#f8faff; }
.about-use-case h3 { max-width:320px; margin:0 0 10px; font-size:1.16rem; line-height:1.35; }
.about-use-case p { margin-bottom:14px; font-size:.94rem; line-height:1.6; }
.about-use-case ul { margin:0; padding-left:18px; color:var(--muted); font-size:.92rem; line-height:1.6; }
.about-use-case li { padding:2px 0 2px 3px; }
.about-use-case li::marker { color:var(--accent); }
.about-use-case-note { padding:24px 26px; display:grid; grid-template-columns:minmax(180px,.55fr) minmax(0,1fr); gap:10px 32px; border-radius:16px; background:#eef3ff; }
.about-use-case-note strong { display:block; margin-bottom:8px; color:var(--accent); font-size:1.05rem; }
.about-use-case-note p { color:#46526a; font-size:.92rem; line-height:1.65; }
.about-story { max-width:1000px; margin:0 auto 112px; padding:clamp(36px,7vw,80px); overflow:hidden; position:relative; border-radius:32px; background:var(--ink); color:var(--surface); box-shadow:0 30px 80px rgba(23,32,51,.18); }
.about-story::after { content:""; position:absolute; top:-160px; right:-150px; width:420px; height:420px; border:1px solid rgba(255,255,255,.1); border-radius:50%; box-shadow:0 0 0 70px rgba(255,255,255,.025),0 0 0 140px rgba(255,255,255,.018); pointer-events:none; }
.about-gallery { max-width:1000px; margin:0 auto 80px; padding:32px 0 24px; position:relative; isolation:isolate; overflow:hidden; border:1px solid var(--line); border-radius:32px; background:radial-gradient(ellipse at 25% 30%,rgba(53,99,233,.22),transparent 60%),radial-gradient(ellipse at 85% 80%,rgba(27,178,166,.18),transparent 55%),var(--surface); }
.about-gallery::before { content:""; position:absolute; z-index:-1; width:540px; height:540px; top:50%; left:50%; transform:translate(-50%,-50%); border:1px solid rgba(53,99,233,.2); border-radius:50%; box-shadow:0 0 0 55px rgba(53,99,233,.045),0 0 0 110px rgba(53,99,233,.025); pointer-events:none; }
.about-gallery-track { display:flex; overflow-x:auto; scroll-snap-type:x mandatory; overscroll-behavior-x:contain; }
.about-gallery-slide { flex:0 0 100%; min-width:0; margin:0; padding:8px 24px 20px; scroll-snap-align:center; }
.about-gallery-slide img { display:block; width:min(100%,320px); height:auto; margin:0 auto; border-radius:20px; box-shadow:0 18px 36px rgba(23,32,51,.2); }
.about-gallery-slide figcaption { margin:24px 0 0; text-align:center; font-weight:650; color:var(--ink); }
.about-gallery-controls { display:flex; justify-content:center; align-items:center; gap:24px; margin-top:16px; }
.about-gallery-controls[hidden] { display:none; }
.about-gallery-controls button { width:48px; height:48px; border:1px solid var(--line); border-radius:50%; background:var(--surface); color:var(--ink); font-size:1.4rem; cursor:pointer; }
.about-gallery-controls button:hover { background:#3563e9; color:#fff; }
.about-gallery-controls button:focus-visible,.about-gallery-track:focus-visible { outline:3px solid var(--accent); outline-offset:-3px; }
.about-story-heading { max-width:700px; margin-bottom:64px; position:relative; z-index:1; }
.about-story-heading .eyebrow { color:#9bb6ff; }
.about-story-heading h2 { margin-bottom:18px; font-size:clamp(2.25rem,5vw,4.3rem); line-height:1.03; letter-spacing:-.045em; text-wrap:balance; }
.about-story-heading > p:last-child { max-width:580px; margin:0; color:#bdc6d8; font-size:1.08rem; line-height:1.7; }
.about-timeline { position:relative; }
.about-chapter { padding:0 0 64px; position:relative; display:grid; grid-template-columns:minmax(0,1fr); gap:28px; }
.about-chapter:last-child { padding-bottom:0; }
.about-chapter > div { padding:30px clamp(24px,4vw,40px); border:1px solid rgba(255,255,255,.1); border-radius:22px; background:rgba(255,255,255,.055); backdrop-filter:blur(12px); transition:transform .3s ease,border-color .3s ease,background-color .3s ease; }
.about-chapter > div:hover { transform:translateX(6px); border-color:rgba(158,183,255,.34); background:rgba(255,255,255,.075); }
.about-chapter h2 { margin-bottom:24px; font-size:clamp(1.7rem,4vw,2.8rem); line-height:1.08; letter-spacing:-.035em; }
.about-chapter p { margin:0 0 22px; color:#bdc6d8; font-size:1.05rem; line-height:1.75; }
.about-chapter p:first-of-type { color:#eef2fb; font-size:1.13rem; }
.about-chapter p:last-child { margin-bottom:0; }
.has-reveal [data-reveal] { opacity:0; transform:translateY(30px); transition:opacity .75s cubic-bezier(.22,1,.36,1),transform .75s cubic-bezier(.22,1,.36,1); transition-delay:calc(var(--reveal-delay,0) * 110ms); }
.has-reveal [data-reveal].is-revealed { opacity:1; transform:translateY(0); }
@keyframes about-float { 0%,100% { transform:translate3d(0,0,0) rotate(0deg); } 50% { transform:translate3d(0,-14px,0) rotate(8deg); } }
.visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
.questions { margin-bottom:96px; }
.questions ul { margin:0; padding:0; list-style:none; border-top:1px solid var(--line); }
.questions li { padding:24px 0 24px 42px; position:relative; border-bottom:1px solid var(--line); font-size:clamp(1.1rem,2.5vw,1.45rem); font-weight:650; line-height:1.45; }
.questions li::before { content:"?"; position:absolute; left:0; top:24px; color:var(--accent); font-weight:850; }
.answer { max-width:820px; margin:40px 0 0; color:var(--accent); font-size:clamp(1.35rem,3vw,2rem); font-weight:750; line-height:1.4; }
.accordion-section { border-top:1px solid var(--line); }
.accordion-section:last-of-type { border-bottom:1px solid var(--line); margin-bottom:72px; }
.build-sections { margin-bottom:72px; }
.build-sections .accordion-section:last-of-type { margin-bottom:0; }
.section-heading { padding:40px 0; display:grid; grid-template-columns:48px 1fr 32px; align-items:center; gap:18px; cursor:pointer; list-style:none; }
.section-heading::-webkit-details-marker { display:none; }
.section-heading > span:first-child { width:48px; height:48px; display:grid; place-items:center; border:1px solid var(--line); border-radius:14px; background:var(--surface); color:var(--accent); font-size:.88rem; font-weight:750; font-variant-numeric:tabular-nums; letter-spacing:.04em; box-shadow:0 3px 10px rgba(23,32,51,.04); transition:background-color .2s ease,color .2s ease,border-color .2s ease; }
.section-heading:hover > span:first-child { border-color:var(--accent); }
.accordion-section[open] > .section-heading > span:first-child { background:var(--accent); border-color:var(--accent); color:var(--surface); }
.section-heading:focus-visible { outline:2px solid var(--accent); outline-offset:6px; border-radius:14px; }
.section-heading h2 { margin:0; font-size:clamp(1.8rem,4vw,3rem); line-height:1.1; }
.accordion-icon { position:relative; width:24px; height:24px; }
.accordion-icon::before,.accordion-icon::after { content:""; position:absolute; top:11px; left:3px; width:18px; height:2px; background:var(--accent); transition:transform .25s ease; }
.accordion-icon::after { transform:rotate(90deg); }
.accordion-section[open] .accordion-icon::after,.manual-chapter[open] .accordion-icon::after { transform:rotate(0); }
.accordion-section[open] .section-heading { padding-bottom:28px; }
.accordion-content { margin-left:66px; padding:0 0 64px; }
.text-block { max-width:720px; }
.text-block p { margin:0 0 24px; color:var(--muted); font-size:1.08rem; line-height:1.8; }
.text-block p:first-child { color:var(--ink); font-size:1.2rem; }
.technical-guide { max-width:820px; }
.technical-guide h3 { margin:52px 0 18px; font-size:clamp(1.35rem,3vw,1.8rem); line-height:1.3; }
.technical-guide h4 { margin:34px 0 14px; font-size:1.15rem; }
.technical-guide ul,.technical-guide ol:not(.selection-checklist) { margin:0 0 28px; padding-left:24px; color:var(--muted); font-size:1.05rem; line-height:1.8; }
.technical-guide li { padding-left:5px; }
.table-scroll { margin:30px 0 42px; overflow-x:auto; border:1px solid var(--line); border-radius:16px; background:var(--surface); }
.technical-guide table { width:100%; border-collapse:collapse; min-width:600px; font-variant-numeric:tabular-nums; }
.technical-guide caption { padding:18px 20px; color:var(--ink); font-weight:750; text-align:left; }
.technical-guide th,.technical-guide td { padding:13px 20px; border-top:1px solid var(--line); text-align:left; }
.technical-guide th { color:var(--muted); background:#f8faff; font-size:.78rem; letter-spacing:.05em; text-transform:uppercase; }
.technical-guide th:not(:first-child),.technical-guide td:not(:first-child) { text-align:right; }
.technical-guide .yf-spec-table th { width:52%; font-size:.92rem; letter-spacing:0; text-transform:none; }
.technical-guide .yf-spec-table code { color:var(--ink); font-size:.9rem; white-space:nowrap; }
.technical-guide .meter-wiring-table th,.technical-guide .meter-wiring-table td { text-align:left; }
.technical-guide .meter-wiring-table td:first-child { width:90px; color:var(--accent); }
.technical-guide .table-note { margin:-26px 0 36px; font-size:.9rem; line-height:1.6; }
.featured-row { background:#eef3ff; color:var(--accent); }
.dimension-highlight { margin:30px 0!important; padding:24px; display:grid; gap:8px; border-left:4px solid var(--accent); border-radius:0 14px 14px 0; background:#eef3ff; }
.dimension-highlight strong { color:var(--accent); font-size:clamp(1.3rem,3vw,1.7rem); }
.dimension-highlight span { color:var(--ink); font-size:1rem; line-height:1.6; }
.guide-note { margin:28px 0; padding:24px; display:grid; grid-template-columns:auto 1fr; gap:20px; border:1px solid var(--line); border-radius:16px; background:var(--surface); }
.guide-note > strong { color:var(--accent); font-size:1.25rem; }
.guide-note p { margin:0; font-size:1rem; }
.literary-note { margin:28px 0; padding:20px 24px; border:1px dashed #b9c3d7; border-radius:16px; background:#f8faff; }
.literary-note strong { display:block; margin-bottom:6px; color:var(--accent); }
.literary-note p { margin:0; font-size:.98rem; }
.guide-figure { margin:30px 0 36px; overflow:hidden; border:1px solid var(--line); border-radius:18px; background:var(--surface); }
.guide-figure img { display:block; width:100%; height:auto; aspect-ratio:3/2; object-fit:cover; }
.guide-figure-contain img { aspect-ratio:auto; object-fit:contain; background:#f8faff; }
.guide-figure-small { max-width:440px; margin-right:auto; margin-left:auto; }
.guide-figure figcaption { padding:14px 18px; color:var(--muted); font-size:.9rem; line-height:1.5; }
.guide-figure a { color:var(--accent); font-weight:700; text-decoration:none; }
.guide-figure a:hover { text-decoration:underline; }
.contact-bounce-chart svg { display:block; width:100%; height:auto; background:#fbfcff; }
.contact-bounce-chart text { font-family:Inter,system-ui,sans-serif; }
.contact-bounce-chart .bounce-axis { stroke:var(--ink); stroke-width:2.5; }
.contact-bounce-chart .bounce-axis + .bounce-axis { stroke-width:2; }
.contact-bounce-chart .bounce-reference,.contact-bounce-chart .bounce-boundary { stroke:#647087; stroke-width:1.6; stroke-dasharray:7 7; }
.contact-bounce-chart .bounce-waveform { fill:none; stroke:#dc4545; stroke-width:4; stroke-linecap:round; stroke-linejoin:round; }
.contact-bounce-chart .bounce-duration { stroke:var(--accent); stroke-width:1.8; }
.contact-bounce-chart .bounce-label { fill:var(--accent); font-size:18px; font-weight:750; }
.contact-bounce-chart .bounce-state-label { fill:var(--muted); font-size:13px; font-weight:650; }
.contact-bounce-chart .bounce-duration-label { fill:var(--accent); font-size:14px; font-weight:700; }
.contact-bounce-chart #bounce-axis-arrow path { fill:var(--ink); }
.contact-bounce-chart #bounce-time-arrow path { fill:var(--accent); }
.relay-switch-animation svg { display:block; width:100%; height:auto; background:#fbfcff; }
.relay-switch-animation text { font-family:Inter,system-ui,sans-serif; }
.relay-switch-animation .relay-wire { fill:none; stroke:#475169; stroke-width:6; stroke-linecap:round; stroke-linejoin:round; }
.relay-switch-animation .relay-body { fill:#fff0a8; stroke:#30394d; stroke-width:5; }
.relay-switch-animation .relay-body-label { fill:#30394d; font-size:19px; font-weight:800; }
.relay-switch-animation .relay-terminal { fill:#30394d; }
.relay-switch-animation .relay-terminal-nc { animation:relay-nc-state 5s ease-in-out infinite; }
.relay-switch-animation .relay-terminal-no { animation:relay-no-state 5s ease-in-out infinite; }
.relay-switch-animation .relay-terminal-label { fill:#30394d; font-size:24px; font-weight:850; }
.relay-switch-animation .relay-arm { stroke:var(--accent); stroke-width:9; stroke-linecap:round; transform-origin:650px 400px; animation:relay-arm-switch 5s ease-in-out infinite; }
.relay-switch-animation .relay-mechanical-link { stroke:#68738a; stroke-width:3; stroke-dasharray:8 8; }
.relay-switch-animation .relay-coil-core { fill:#fff7d1; stroke:#30394d; stroke-width:5; animation:relay-coil-state 5s ease-in-out infinite; }
.relay-switch-animation .relay-coil-winding { fill:none; stroke:#30394d; stroke-width:5; stroke-linecap:round; }
.relay-switch-animation .relay-coil-diagonal { fill:none; stroke:#000; stroke-width:6; }
.relay-switch-animation .relay-ac-wave-new { fill-rule:nonzero; stroke:#000; }
.relay-switch-animation .relay-coil text { fill:#30394d; font-size:17px; font-weight:750; }
.relay-switch-animation .relay-switch-terminal { fill:#30394d; }
.relay-switch-animation .relay-switch-blade { stroke:#30394d; stroke-width:7; stroke-linecap:round; transform-origin:250px 190px; animation:relay-control-switch 5s ease-in-out infinite; }
.relay-switch-animation .relay-battery-long,.relay-switch-animation .relay-battery-short { stroke:#30394d; stroke-width:6; stroke-linecap:round; }
.relay-switch-animation .relay-polarity { fill:#30394d; font-size:26px; font-weight:700; }
.relay-switch-animation .relay-source-label,.relay-switch-animation .relay-load-label { fill:var(--muted); font-size:18px; font-weight:750; }
.relay-switch-animation .relay-lamp-bulb { stroke:#30394d; stroke-width:5; }
.relay-switch-animation .relay-lamp-nc { fill:#ffd95a; animation:relay-lamp-nc-state 5s ease-in-out infinite; }
.relay-switch-animation .relay-lamp-no { fill:#eef1f6; animation:relay-lamp-no-state 5s ease-in-out infinite; }
.relay-switch-animation .relay-lamp-filament,.relay-switch-animation .relay-ac-wave { fill:none; stroke:#30394d; stroke-width:6; stroke-linecap:round; }
.relay-switch-animation .relay-lamp-rays line { stroke:#e0a527; stroke-width:5; stroke-linecap:round; }
.relay-switch-animation .relay-lamp-rays-nc line { animation:relay-lamp-rays-nc 5s ease-in-out infinite; }
.relay-switch-animation .relay-lamp-rays-no line { opacity:0; animation:relay-lamp-rays-no 5s ease-in-out infinite; }
.relay-switch-animation .relay-ac-source { fill:#fff0a8; stroke:#30394d; stroke-width:5; }
.relay-switch-animation .relay-current-path { fill:none; stroke:#e0a527; stroke-width:11; stroke-linecap:round; stroke-linejoin:round; }
.relay-switch-animation .relay-current-path-control { opacity:0; animation:relay-current-path-control 5s ease-in-out infinite; }
.relay-switch-animation .relay-current-path-nc { opacity:.28; animation:relay-current-path-nc 5s ease-in-out infinite; }
.relay-switch-animation .relay-current-path-no { opacity:0; animation:relay-current-path-no 5s ease-in-out infinite; }
.relay-switch-animation .relay-state-title { fill:var(--ink); font-size:23px; font-weight:800; }
.relay-switch-animation .relay-state-path { fill:var(--accent); font-size:20px; font-weight:850; }
.relay-switch-animation .relay-state-resting { animation:relay-resting-label 5s ease-in-out infinite; }
.relay-switch-animation .relay-state-energized { opacity:0; animation:relay-energized-label 5s ease-in-out infinite; }
.relay-animation-controls { padding:16px 18px; display:flex; justify-content:center; border-top:1px solid var(--line); background:#fbfcff; }
.relay-toggle { min-width:170px; padding:11px 18px; border:1px solid var(--accent); border-radius:10px; background:var(--accent); color:#fff; font:inherit; font-weight:750; cursor:pointer; transition:background-color .2s ease,box-shadow .2s ease,transform .2s ease; }
.relay-toggle:hover { background:#244fc9; }
.relay-toggle:focus-visible { outline:3px solid rgba(53,99,233,.3); outline-offset:3px; }
.relay-toggle:active { transform:translateY(1px); }
.relay-toggle-label-off { display:none; }
.relay-toggle[aria-pressed="true"] .relay-toggle-label-on { display:none; }
.relay-toggle[aria-pressed="true"] .relay-toggle-label-off { display:inline; }
.relay-switch-animation.is-interactive .relay-arm,.relay-switch-animation.is-interactive .relay-switch-blade,.relay-switch-animation.is-interactive .relay-coil-core,.relay-switch-animation.is-interactive .relay-terminal-nc,.relay-switch-animation.is-interactive .relay-terminal-no,.relay-switch-animation.is-interactive .relay-lamp-bulb,.relay-switch-animation.is-interactive .relay-lamp-rays line,.relay-switch-animation.is-interactive .relay-current-path,.relay-switch-animation.is-interactive .relay-state-resting,.relay-switch-animation.is-interactive .relay-state-energized { animation:none; transition:fill .4s ease,opacity .4s ease,transform .4s ease; }
.relay-switch-animation.is-interactive .relay-terminal-nc { fill:var(--accent); }
.relay-switch-animation.is-interactive .relay-terminal-no { fill:#30394d; }
.relay-switch-animation.is-interactive.is-energized .relay-arm { transform:rotate(45.9deg); }
.relay-switch-animation.is-interactive.is-energized .relay-switch-blade { transform:rotate(20.5deg); }
.relay-switch-animation.is-interactive.is-energized .relay-coil-core { fill:#bcd0ff; }
.relay-switch-animation.is-interactive.is-energized .relay-terminal-nc { fill:#30394d; }
.relay-switch-animation.is-interactive.is-energized .relay-terminal-no { fill:var(--accent); }
.relay-switch-animation.is-interactive.is-energized .relay-lamp-nc { fill:#eef1f6; }
.relay-switch-animation.is-interactive.is-energized .relay-lamp-no { fill:#ffd95a; }
.relay-switch-animation.is-interactive.is-energized .relay-lamp-rays-nc line,.relay-switch-animation.is-interactive.is-energized .relay-current-path-nc,.relay-switch-animation.is-interactive.is-energized .relay-state-resting { opacity:0; }
.relay-switch-animation.is-interactive.is-energized .relay-lamp-rays-no line { opacity:1; }
.relay-switch-animation.is-interactive.is-energized .relay-current-path-control { opacity:.28; }
.relay-switch-animation.is-interactive.is-energized .relay-current-path-no { opacity:.28; }
.relay-switch-animation.is-interactive.is-energized .relay-state-energized { opacity:1; }
@keyframes relay-arm-switch { 0%,40%,100% { transform:rotate(0deg); } 50%,90% { transform:rotate(45.9deg); } }
@keyframes relay-control-switch { 0%,40%,100% { transform:rotate(0deg); } 50%,90% { transform:rotate(20.5deg); } }
@keyframes relay-coil-state { 0%,40%,100% { fill:#fff7d1; } 50%,90% { fill:#bcd0ff; } }
@keyframes relay-nc-state { 0%,40%,100% { fill:var(--accent); } 50%,90% { fill:#30394d; } }
@keyframes relay-no-state { 0%,40%,100% { fill:#30394d; } 50%,90% { fill:var(--accent); } }
@keyframes relay-lamp-nc-state { 0%,40%,100% { fill:#ffd95a; } 50%,90% { fill:#eef1f6; } }
@keyframes relay-lamp-no-state { 0%,40%,100% { fill:#eef1f6; } 50%,90% { fill:#ffd95a; } }
@keyframes relay-lamp-rays-nc { 0%,40%,100% { opacity:1; } 50%,90% { opacity:0; } }
@keyframes relay-lamp-rays-no { 0%,40%,100% { opacity:0; } 50%,90% { opacity:1; } }
@keyframes relay-current-path-control { 0%,40%,100% { opacity:0; } 50%,90% { opacity:.28; } }
@keyframes relay-current-path-nc { 0%,40%,100% { opacity:.28; } 50%,90% { opacity:0; } }
@keyframes relay-current-path-no { 0%,40%,100% { opacity:0; } 50%,90% { opacity:.28; } }
@keyframes relay-resting-label { 0%,40%,100% { opacity:1; } 46%,94% { opacity:0; } }
@keyframes relay-energized-label { 0%,40%,100% { opacity:0; } 50%,90% { opacity:1; } }
@media (prefers-reduced-motion:reduce) {
  .story-visual,.story-step { transition:none; }
  .relay-switch-animation .relay-arm,.relay-switch-animation .relay-switch-blade,.relay-switch-animation .relay-coil-core,.relay-switch-animation .relay-terminal-nc,.relay-switch-animation .relay-terminal-no,.relay-switch-animation .relay-lamp-bulb,.relay-switch-animation .relay-lamp-rays line,.relay-switch-animation .relay-current-path,.relay-switch-animation .relay-state-resting,.relay-switch-animation .relay-state-energized { animation:none; }
  .relay-switch-animation .relay-terminal-nc { fill:var(--accent); }
  .relay-switch-animation.is-interactive * { transition:none; }
}
.flow-definitions { margin:28px 0 36px; display:grid; gap:12px; }
.flow-definitions > div { padding:20px 22px; display:grid; grid-template-columns:54px 1fr; gap:16px; border:1px solid var(--line); border-radius:14px; background:var(--surface); }
.flow-definitions dt { color:var(--accent); font-size:1.3rem; font-weight:850; }
.flow-definitions dd { margin:0; display:grid; gap:5px; color:var(--muted); line-height:1.55; }
.flow-definitions dd strong { color:var(--ink); }
.orientation-list { margin:26px 0 36px!important; padding:0!important; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; list-style:none; }
.orientation-list li { padding:18px 20px; display:grid; grid-template-columns:48px 1fr; gap:10px; border:1px solid var(--line); border-radius:14px; background:var(--surface); }
.orientation-list strong { color:var(--accent); font-size:1.15rem; }
.formula-card { margin:26px 0!important; padding:24px; display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:14px; border-radius:16px; background:var(--ink); color:var(--surface)!important; }
.formula-card code { color:var(--surface); font-size:clamp(1.05rem,3vw,1.35rem); font-weight:750; }
.formula-card span { color:#bdc6d8; font-size:.95rem; }
.calculation-table strong { white-space:nowrap; }
.selection-checklist { margin:28px 0 36px!important; padding:0!important; display:grid; gap:12px; list-style:none; counter-reset:selection; }
.selection-checklist li { padding:20px 22px 20px 64px; position:relative; display:grid; gap:5px; border:1px solid var(--line); border-radius:14px; background:var(--surface); counter-increment:selection; }
.selection-checklist li::before { content:counter(selection,decimal-leading-zero); position:absolute; top:21px; left:20px; color:var(--accent); font-size:.78rem; font-weight:800; }
.selection-checklist strong { color:var(--ink); }
.selection-checklist span { line-height:1.55; }
.key-rule { margin:32px 0!important; padding:24px; border-radius:16px; background:var(--ink); color:var(--surface)!important; font-size:1.12rem!important; font-weight:700; }
.guide-caveat { padding-left:20px; border-left:3px solid #e0a527; }
.localized-shot { display:none; }
html[lang="pl"] .localized-shot.lang-pl,html[lang="en"] .localized-shot.lang-en { display:block; }
.manual-shot-grid { margin:28px 0 38px; display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:18px; }
.manual-shot-grid .guide-figure { margin:0; }
.text-link { display:inline-block; margin-top:8px; color:var(--accent); font-weight:750; text-decoration:none; }
.text-link:hover { text-decoration:underline; }
.guide-action { margin:36px 0 8px; display:flex; }
.manual-intro { padding-bottom:40px; }
.manual-document { margin-bottom:96px; }
.manual-actions { margin-bottom:24px; display:flex; align-items:center; flex-wrap:wrap; gap:20px; }
.manual-download-link { color:var(--accent); font-weight:750; text-decoration:none; }
.manual-download-link:hover { text-decoration:underline; }
.manual-toc { margin:36px 0 48px; display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); align-items:stretch; gap:10px; }
.manual-toc a { padding:14px 16px; display:flex; align-items:center; border:1px solid var(--line); border-radius:12px; background:var(--surface); color:var(--ink); font-size:.92rem; font-weight:700; line-height:1.4; text-decoration:none; transition:border-color .2s ease,color .2s ease,transform .2s ease; }
.manual-toc a:hover { border-color:var(--accent); color:var(--accent); transform:translateY(-2px); }
.manual-chapters { display:grid; gap:14px; }
.manual-chapter { scroll-margin-top:24px; overflow:hidden; border:1px solid var(--line); border-radius:18px; background:var(--surface); }
.manual-chapter[open] { border-color:#bfcdf4; box-shadow:0 16px 44px rgba(53,99,233,.075); }
.manual-chapter-heading { padding:24px 26px; display:grid; grid-template-columns:minmax(0,1fr) 28px; align-items:center; gap:18px; cursor:pointer; list-style:none; }
.manual-chapter-heading::-webkit-details-marker { display:none; }
.manual-chapter-heading h2 { margin:0; font-size:clamp(1.25rem,3vw,1.65rem); }
.manual-chapter-content { padding:4px 28px 34px; color:var(--muted); font-size:1rem; line-height:1.72; }
.manual-chapter-content h3 { margin:40px 0 14px; color:var(--ink); font-size:1.3rem; }
.manual-chapter-content h4 { margin:32px 0 12px; color:var(--ink); font-size:1.1rem; }
.manual-chapter-content strong { color:var(--ink); }
.manual-chapter-content code,.manual-chapter-content pre { color:var(--ink); }
.manual-chapter-content pre { width:fit-content; max-width:100%; padding:18px; overflow-x:auto; border-radius:12px; background:#f5f7fb; }
.manual-chapter-content figure { margin:28px 0 36px; text-align:center; }
.manual-chapter-content figure img { display:block; width:min(100%,760px); height:auto; margin:0 auto; border:1px solid var(--line); border-radius:14px; }
.manual-chapter-content figcaption { margin-top:10px; font-size:.9rem; }
.manual-chapter-content table { width:100%; margin:26px 0 34px; border-collapse:collapse; color:var(--ink); }
.manual-chapter-content th,.manual-chapter-content td { padding:12px 14px; border:1px solid var(--line); text-align:left!important; }
.manual-chapter-content th { background:#f8faff; }
.manual-chapter-content > :last-child { margin-bottom:0; }
.content-card { margin-bottom:72px; padding:40px; display:grid; grid-template-columns:64px 1fr; gap:24px; border:1px solid var(--line); border-radius:24px; background:var(--surface); }
.content-card .section-number { margin:4px 0 0; color:var(--accent); font-size:.9rem; font-weight:800; }
.content-card p { max-width:720px; margin:0; }
.placeholder-grid,.gallery { display:grid; grid-template-columns:repeat(3,1fr); gap:20px; margin-bottom:72px; }
.placeholder-card { min-height:210px; padding:28px; display:flex; flex-direction:column; justify-content:space-between; border:1px solid var(--line); border-radius:20px; background:var(--surface); }
.placeholder-card span { color:var(--accent); font-size:.85rem; font-weight:800; }
.placeholder-card h2 { color:var(--muted); font-size:1.1rem; }
.gallery { grid-template-columns:repeat(2,1fr); }
.photo-placeholder { aspect-ratio:4/3; display:grid; place-items:center; border:1px dashed #b9c3d7; border-radius:20px; background:#edf1f8; color:var(--muted); }
.contact-card { margin-bottom:72px; padding:40px; display:flex; flex-direction:column; gap:12px; border:1px solid var(--line); border-radius:24px; background:var(--surface); }
.contact-card p { margin:4px 0 0; color:var(--muted); line-height:1.7; }
.contact-details { margin-bottom:64px; }
.contact-details h2 { margin:0 0 16px; }
.contact-details > p { max-width:760px; color:var(--muted); line-height:1.7; }
.contact-topics { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr)); gap:24px; margin:28px 0 0; }
.contact-topics > div { padding:24px; border:1px solid var(--line); border-radius:20px; background:var(--surface); }
.contact-topics dt { margin-bottom:12px; font-size:1.1rem; font-weight:750; }
.contact-topics dd { margin:0; color:var(--muted); line-height:1.7; }
.contact-card span { color:var(--muted); font-size:.85rem; font-weight:700; letter-spacing:.1em; text-transform:uppercase; }
.contact-card a, .contact-card .contact-email { color:var(--accent); font-size:clamp(1.4rem,5vw,2.5rem); font-weight:750; text-decoration:none; }
footer { width:min(1120px,calc(100% - 48px)); margin:0 auto; padding:28px 0; display:flex; justify-content:space-between; gap:20px; border-top:1px solid var(--line); color:var(--muted); font-size:.9rem; }
footer a { text-decoration:none; }
@media (max-width:900px) {
  .about-hero { min-height:0; grid-template-columns:1fr; }
  .about-intro { max-width:760px; }
  .about-hero-image { min-height:0; width:min(680px,100%); }
  .about-hero-image img { height:auto; aspect-ratio:16/10; }
  .about-quick-facts { grid-template-columns:1fr; gap:36px; }
  .about-quick-facts-heading { position:static; }
}
@media (max-width:760px) {
  .site-header { padding:20px 0; flex-wrap:wrap; gap:16px; }
  nav { order:3; width:100%; gap:18px; overflow-x:auto; }
  .hero { padding-top:56px; grid-template-columns:1fr; gap:40px; }
  .hero-image { height:auto; min-height:0; aspect-ratio:4/5; }
  .page-intro { padding-top:72px; }
  .scroll-story { margin:48px 0 88px; display:block; }
  .story-stage { top:12px; z-index:1; height:46svh; min-height:300px; border-radius:20px; }
  .story-chapters { position:relative; z-index:2; margin-top:-12svh; }
  .story-step { min-height:88svh; padding:0 12px 5svh; align-items:flex-end; }
  .story-card { padding:28px 24px; border-radius:20px; }
  .story-card h2 { font-size:clamp(1.8rem,9vw,2.7rem); }
  .about-hero { padding:72px 0 88px; gap:44px; }
  .about-hero::before { right:-45%; width:340px; height:340px; }
  .about-hero-image img { border-radius:20px; }
  .about-hero-image::after { inset:20px -12px -16px 20px; border-radius:24px; }
  .about-hero-orbit-large { right:-8px; bottom:28px; width:82px; height:82px; }
  .about-hero-orbit-small { top:28px; left:-10px; width:46px; height:46px; }
  .about-quick-facts { margin-bottom:80px; }
  .about-quick-facts-heading { margin-bottom:32px; display:block; }
  .about-quick-facts-heading h2 { margin-bottom:16px; }
  .about-pop-section summary { padding:22px 20px; grid-template-columns:minmax(0,1fr) 24px; gap:10px; }
  .about-pop-content { padding:0 20px 24px; }
  .about-use-cases { grid-template-columns:1fr; }
  .about-use-case { padding:20px; }
  .about-use-case-note { padding:20px; display:block; }
  .about-use-case-note strong { margin-bottom:10px; }
  .about-story { margin-bottom:80px; border-radius:24px; }
  .about-story-heading { margin-bottom:48px; }
  .about-chapter { padding-bottom:44px; }
  .about-chapter > div { padding:26px 22px; }
  .content-card { padding:28px; grid-template-columns:1fr; }
  .questions { margin-bottom:64px; }
  .section-heading { padding:32px 0; grid-template-columns:34px 1fr 28px; gap:10px; }
  .section-heading > span:first-child { width:34px; height:34px; border-radius:10px; font-size:.72rem; }
  .accordion-content { margin-left:44px; padding-bottom:48px; }
  .technical-guide { max-width:calc(100vw - 68px); }
  .guide-note { grid-template-columns:1fr; gap:8px; }
  .orientation-list { grid-template-columns:1fr; }
  .about-project-cta { margin-bottom:72px; }
  .about-project-link { white-space:normal; overflow-wrap:anywhere; }
  .manual-document { margin-bottom:72px; }
  .manual-toc { grid-template-columns:1fr; }
  .manual-chapter-heading { padding:20px; }
  .manual-chapter-content { padding:2px 20px 28px; }
  .placeholder-grid,.gallery { grid-template-columns:1fr; }
  footer { flex-direction:column; }
}
@media (prefers-reduced-motion:reduce) {
  .section-heading > span:first-child { transition:none; }
  .about-hero-orbit { animation:none; }
  .about-project-link,.about-project-link span:last-child,.about-pop-section,.about-pop-section::details-content,.about-pop-icon::before,.about-pop-icon::after,.about-chapter > div,.has-reveal [data-reveal] { transition:none; }
  .has-reveal [data-reveal] { opacity:1; transform:none; }
}

/* Theme controls and night palette. Keep technical illustrations in their original colours. */
:root { color-scheme:light; }
:root[data-theme="dark"] { color-scheme:dark; --ink:#e5eaf5; --muted:#b0bbce; --accent:#9bb6ff; --line:#35425a; --surface:#1a2435; --background:#101725; }
.theme-toggle { flex-shrink:0; display:inline-flex; gap:3px; padding:4px; border:1px solid var(--line); border-radius:12px; background:var(--surface); color:var(--muted); font:inherit; font-size:.85rem; cursor:pointer; }
.theme-toggle[hidden] { display:none; }
.theme-toggle span { display:grid; place-items:center; padding:7px 9px; border-radius:8px; }
.theme-toggle .theme-day { background:var(--accent); color:#fff; }
[data-theme="dark"] .theme-toggle .theme-day { background:transparent; color:var(--muted); }
[data-theme="dark"] .theme-toggle .theme-night { background:var(--accent); color:#101725; }
.theme-toggle:focus-visible { outline:3px solid var(--accent); outline-offset:4px; }
[data-theme="dark"] .story-card,[data-theme="dark"] .about-pop-section { background:var(--surface); }
[data-theme="dark"] :is(.about-use-case-note,.about-use-case:hover,.technical-guide th,.manual-chapter-content th,.manual-chapter-content pre,.photo-placeholder,.relay-animation-controls,.dimension-highlight,.literary-note,.guide-note) { background:#243149; }
[data-theme="dark"] :is(.about-story,.formula-card,.key-rule) { background:#243149; color:var(--ink)!important; }
[data-theme="dark"] :is(.about-project-link,.relay-toggle,.next-page-link) { background:#3563e9; color:#fff; }
[data-theme="dark"] .featured-row td { background:#243149; }
[data-theme="dark"] .formula-card code { color:var(--ink); }
.table-scroll:focus-visible,.manual-chapter-content :is(table,pre):focus-visible { outline:3px solid var(--accent); outline-offset:2px; }
@media (min-width:761px) { .site-header { flex-wrap:wrap; gap:18px; padding:18px 0; } .site-header nav { order:3; width:100%; flex-wrap:wrap; } }
@media print { .theme-toggle { display:none; } :root[data-theme="dark"] { color-scheme:light; --ink:#172033; --muted:#626b7c; --accent:#3563e9; --line:#dce2ef; --surface:#fff; --background:#fff; } }

.youtube-channel { display:flex; align-items:center; gap:16px; width:fit-content; max-width:100%; margin-top:28px; padding:18px 20px; border:1px solid var(--line); border-radius:18px; background:var(--surface); color:var(--ink); text-decoration:none; box-shadow:0 8px 24px rgba(23,32,51,.06); transition:border-color .2s ease,box-shadow .2s ease,transform .2s ease; }
.youtube-channel-icon { display:grid; place-items:center; flex:0 0 48px; height:48px; border-radius:14px; background:rgba(255,0,0,.08); color:#f03; }
.youtube-channel-copy { display:grid; gap:5px; min-width:0; }
.youtube-channel-label { color:var(--muted); font-size:.75rem; font-weight:650; letter-spacing:.03em; }
.youtube-channel-title { font-size:.95rem; font-weight:750; line-height:1.4; }
.youtube-channel-arrow { flex-shrink:0; margin-left:8px; color:var(--muted); transition:transform .2s ease,color .2s ease; }
.youtube-channel:hover { border-color:#f03; box-shadow:0 12px 30px rgba(255,0,51,.1); transform:translateY(-2px); }
.youtube-channel:hover .youtube-channel-arrow { color:#f03; transform:translate(2px,-2px); }
.youtube-channel:focus-visible { outline:3px solid var(--accent); outline-offset:4px; }
@media (max-width:480px) { .youtube-channel { width:100%; gap:12px; padding:16px; } .youtube-channel-arrow { margin-left:auto; } }
@media (prefers-reduced-motion:reduce) { .youtube-channel,.youtube-channel-arrow { transition:none; } .youtube-channel:hover,.youtube-channel:hover .youtube-channel-arrow { transform:none; } }

.projects-intro { max-width:900px; padding-bottom:40px; }
.projects-resources { display:flex; flex-wrap:wrap; gap:12px; margin-top:28px; }
.projects-resources a { display:flex; align-items:center; gap:12px; padding:14px 18px; border:1px solid var(--line); border-radius:14px; background:var(--surface); text-decoration:none; font-size:.9rem; font-weight:650; }
.projects-resources a:hover { border-color:var(--accent); color:var(--accent); }
.project-resource-icon { color:#f03; }
.projects-collection { margin-bottom:96px; }
.projects-empty { padding:clamp(28px,6vw,64px); border:1px solid var(--line); border-radius:24px; background:var(--surface); }
.projects-empty .eyebrow { display:block; }
.projects-empty h2 { max-width:650px; font-size:clamp(1.8rem,4vw,3rem); letter-spacing:-.04em; }
.projects-empty p { max-width:580px; color:var(--muted); line-height:1.75; }
.project-contact { display:inline-block; margin-top:12px; color:var(--accent); font-weight:700; text-underline-offset:5px; }
.projects-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:28px; }
.project-card { overflow:hidden; border:1px solid var(--line); border-radius:24px; background:var(--surface); box-shadow:0 12px 32px rgba(23,32,51,.05); }
.project-cover { display:block; overflow:hidden; background:var(--line); }
.project-cover img { display:block; width:100%; height:auto; aspect-ratio:16/9; object-fit:cover; transition:transform .25s ease; }
.project-card-link:hover img { transform:scale(1.025); }
.project-copy { padding:clamp(22px,3vw,32px); overflow-wrap:anywhere; }
.project-copy h2 { margin:12px 0; font-size:1.65rem; letter-spacing:-.035em; line-height:1.2; }
.project-description { padding-top:8px; }
.project-gallery { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:20px; }
.project-gallery img { display:block; width:100%; height:auto; aspect-ratio:4/3; object-fit:cover; border-radius:12px; }
.projects-collection a:focus-visible,.projects-resources a:focus-visible,.project-page a:focus-visible { outline:3px solid var(--accent); outline-offset:4px; }
.project-card-link:focus-visible { outline-offset:-4px!important; }
@media (max-width:700px) { .projects-grid { grid-template-columns:1fr; } .projects-resources { flex-direction:column; align-items:stretch; } .projects-resources a { justify-content:space-between; } }
@media (prefers-reduced-motion:reduce) { .project-cover img { transition:none; } .project-card-link:hover img { transform:none; } }

.project-card-link { display:block; color:inherit; text-decoration:none; }
.project-card-link .project-copy { display:flex; align-items:center; justify-content:space-between; gap:20px; }
.project-card-link h2 { margin:0; }
.project-card-link .project-copy > span { color:var(--accent); font-size:1.4rem; }
.project-card-link:hover h2 { color:var(--accent); }
.project-page { padding-top:40px; padding-bottom:72px; }
.project-back { display:inline-flex; align-items:center; gap:10px; min-height:44px; padding:12px 18px; border:1px solid var(--line); border-radius:12px; background:var(--surface); font-weight:650; text-decoration:none; }
.project-back:hover { border-color:var(--accent); color:var(--accent); }
.project-heading { max-width:840px; padding:48px 0 28px; }
.project-heading time { color:var(--muted); font-size:.9rem; }
.project-heading h1 { margin-top:18px; font-size:clamp(2.4rem,6vw,4.5rem); line-height:1.08; overflow-wrap:anywhere; }
.project-hero-image { display:block; width:100%; height:auto; max-height:720px; object-fit:contain; background:var(--surface); border-radius:24px; }
.project-page .project-description { max-width:760px; margin:32px auto; font-size:1.1rem; line-height:1.85; overflow-wrap:anywhere; }
.project-page .project-gallery { margin:32px 0 48px; gap:20px; }
.project-page > .project-back:last-child { margin-top:24px; }
@media (max-width:600px) { .project-page .project-gallery { grid-template-columns:1fr; } .project-heading { padding-top:32px; } }

.project-inline-image { width:100%; margin:32px auto; }
.project-inline-image img { display:block; width:100%; height:auto; border:1px solid var(--line); border-radius:18px; background:var(--surface); }
.project-inline-image figcaption { margin-top:12px; color:var(--muted); font-size:.9rem; line-height:1.6; text-align:center; }

.hero-media { margin:0; min-width:0; }
.image-provenance { display:block; padding:9px 14px; color:var(--muted); font-size:.75rem; font-weight:500; line-height:1.5; letter-spacing:normal; text-align:left; }
.story-visual + .image-provenance { position:absolute; z-index:2; left:20px; right:20px; bottom:44px; width:fit-content; border-radius:8px; background:rgba(16,23,37,.88); color:#fff; opacity:0; pointer-events:none; }
.story-visual.is-active + .image-provenance { opacity:1; }
.project-inline-image .image-provenance { text-align:center; }

/* Phones: keep navigation visible and let long-form content use the full width. */
.story-mobile-media { display:none; }
@media (max-width:760px) {
  .site-header,main,footer { width:calc(100% - 32px); }
  .site-header { gap:12px; padding:16px 0; }
  .logo { flex:1 0 100%; }
  .navigation-toggle { display:inline-flex; align-items:center; justify-content:center; gap:10px; min-height:44px; padding:10px 14px; border:1px solid var(--line); border-radius:10px; background:var(--surface); color:var(--ink); font:inherit; font-weight:600; cursor:pointer; }
  .navigation-toggle::before { content:"☰"; font-size:1.2rem; line-height:1; }
  .navigation-toggle[aria-expanded="true"]::before { content:"×"; }
  .navigation-toggle:focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
  .language-picker { margin-right:auto; }
  .language-picker select,.theme-toggle { min-height:44px; }
  .site-header nav { display:flex; flex-wrap:wrap; gap:4px 8px; overflow:visible; }
  .site-header nav a { min-height:44px; padding:12px; border-radius:10px; white-space:normal; line-height:1.4; }
  .site-header nav a.active { background:var(--surface); box-shadow:inset 0 0 0 1px var(--line); }
  main { min-width:0; overflow-wrap:anywhere; }
  h1 { font-size:clamp(2.25rem,10vw,4rem); line-height:1.05; }
  .hero,.about-hero { padding:40px 0 56px; gap:28px; }
  .hero-image { max-height:520px; object-fit:contain; background:var(--surface); border-radius:20px; }
  .page-intro { padding:48px 0 32px; }
  .lead,.content-card p { font-size:1.05rem; line-height:1.7; }
  .scroll-story { margin:16px 0 48px; }
  .story-stage { display:none; }
  .story-chapters { margin:0; display:grid; gap:28px; }
  .story-step { display:block; min-height:0; padding:0; }
  .has-scroll-story .story-step { opacity:1; transform:none; }
  .story-mobile-media { display:block; margin:0; overflow:hidden; border:1px solid var(--line); border-bottom:0; border-radius:20px 20px 0 0; background:var(--surface); }
  .story-mobile-media img { display:block; width:100%; height:auto; aspect-ratio:3/2; object-fit:cover; }
  .story-step:first-child .story-mobile-media img { object-position:center bottom; }
  .story-card { padding:24px 20px; border-radius:0 0 20px 20px; box-shadow:none; }
  .story-card h2 { margin-bottom:20px; }
  .about-hero::before { right:0; max-width:100%; }
  .about-story { padding:28px 20px; }
  .about-chapter > div { padding:22px 16px; }
  .section-heading { grid-template-columns:34px minmax(0,1fr) 24px; }
  .section-heading h2 { font-size:clamp(1.4rem,6vw,2rem); }
  .accordion-content { margin-left:0; }
  .technical-guide { max-width:100%; min-width:0; }
  .manual-shot-grid { grid-template-columns:minmax(0,1fr); }
  .manual-chapter-heading { padding:18px 16px; gap:12px; }
  .manual-chapter-content { padding:2px 16px 24px; }
  .manual-chapter-content table { display:block; max-width:100%; overflow-x:auto; }
  .manual-chapter-content ul,.manual-chapter-content ol { padding-left:22px; }
  .table-scroll { max-width:100%; }
  .formula-card code { white-space:normal; overflow-wrap:anywhere; }
  .flow-definitions > div { padding:18px 16px; grid-template-columns:40px minmax(0,1fr); gap:12px; }
  .contact-card,.content-card { padding:24px 20px; }
  .contact-card a, .contact-card .contact-email { font-size:clamp(1.15rem,5.5vw,2rem); }
  .projects-resources a { min-width:0; }
  .projects-resources svg { flex-shrink:0; }
  .manual-download-link,.text-link,footer a { padding-top:12px; padding-bottom:12px; min-height:44px; }
  footer { gap:4px; }
}
/* Phone chapters: photo first, then the card and its staggered copy. */
@media (max-width:760px) and (prefers-reduced-motion:no-preference) {
  .has-mobile-story .story-chapters { gap:48px; }
  .has-mobile-story .story-mobile-media { opacity:0; transform:translateY(28px) scale(.96); transition:opacity .6s ease,transform .85s cubic-bezier(.16,1,.3,1); }
  .has-mobile-story .story-mobile-media img { transform:scale(1.12); transition:transform 1.3s cubic-bezier(.16,1,.3,1); }
  .has-mobile-story .story-card { opacity:0; transform:translateY(24px); transition:opacity .55s ease .5s,transform .75s cubic-bezier(.16,1,.3,1) .5s; }
  .has-mobile-story .story-card > * { opacity:0; transform:translateY(12px); transition:opacity .45s ease .62s,transform .6s cubic-bezier(.16,1,.3,1) .62s; }
  .has-mobile-story .story-card > :nth-child(2) { transition-delay:.74s; }
  .has-mobile-story .story-card > :nth-child(3) { transition-delay:.86s; }
  .has-mobile-story .is-introduced .story-mobile-media,
  .has-mobile-story .is-introduced .story-card,
  .has-mobile-story .is-introduced .story-card > * { opacity:1; transform:none; }
  .has-mobile-story .is-introduced .story-mobile-media img { transform:scale(1); }
}
@media (prefers-reduced-motion:reduce) {
  .story-step,.story-visual { transition:none; }
}
@media (min-width:761px) and (max-width:900px) {

  .about-hero::before { right:0; }
  .manual-chapter-content table { display:block; max-width:100%; overflow-x:auto; }
}

@media (max-width:900px) { .manual-toc a { white-space:normal; overflow-wrap:anywhere; } }
