/* Strony publiczne (Sprint 144): /o-stronie/, /o-autorze/ — według makiet docs/rozwoj/briefy/podglad_144/.
   Nie dziedziczą po base.html (jak landing.html), mają własny komplet tokenów w obu motywach. Kolory, cienie
   i przezroczystości WYŁĄCZNIE z tokenów — strażnik config/test_style_literals.py pilnuje tego pliku. */

:root, :root[data-bs-theme="light"] {
  --page: #f4f2ec; --surface: #faf8f3; --border: #d8d3c4; --text: #3d3a33; --heading: #16181c; --muted: #676256;
  --accent: #1f6b6b; --accent-dim: rgba(31,107,107,.08); --accent-edge: rgba(31,107,107,.35); --on-accent: #ffffff;
  --sh1: #14595a; --sh2: #2a64b0; --sh3: #9a6a22; --sh4: #a8394f;
  --i-green: #2f7a4f; --i-red: #a8463c; --i-gold: #a8742a; --i-blue: #2f6fb8; --i-teal: #1f6b6b;
  --i-green-bg: #e3f0e6; --i-red-bg: #f6e1dd; --i-gold-bg: #f6ead6; --i-blue-bg: #e0ebf7; --i-teal-bg: #dcefee;
  --shadow: 0 18px 48px rgba(90,80,60,.12);
  --font-display: 'Newsreader', Georgia, serif; --font-label: 'Public Sans', system-ui, sans-serif;
  --font-read: 'Newsreader', Georgia, serif;
  --radius: 6px;
  --brand-font: 'Newsreader', Georgia, serif; --brand-weight: 600; --brand-ls: -.02em;
  --brand-stripes: none; --brand-fill: currentColor; --brand-a: #16181c; --brand-b: #1f6b6b;
  --fs-eyebrow: 12px; --fs-nav: 12.5px; --fs-chip: 14px; --fs-mod: 15px; --fs-body: 17px; --fs-lead: 19px;
  --fs-card-h: 21px; --fs-h3: 22px; --fs-closing: 24px; --fs-detail-h: 28px; --fs-h2: 30px; --fs-logo: 32px;
  --fs-why-h: 38px; --fs-hero: 56px;
}
:root[data-bs-theme="dark"] {
  --page: #0a0a0f; --surface: #12161f; --border: #222a38; --text: #dde4ef; --heading: #ffffff; --muted: #7c8ca0;
  --accent: #2eb8b8; --accent-dim: rgba(46,184,184,.1); --accent-edge: rgba(46,184,184,.4); --on-accent: #0a0a0f;
  --sh1: #2ee6e6; --sh2: #8a6bff; --sh3: #ff3fa4; --sh4: #ffb347;
  --i-green: #4fd08a; --i-red: #ff6b6b; --i-gold: #ffb347; --i-blue: #6aa8ff; --i-teal: #2ee6e6;
  --i-green-bg: rgba(79,208,138,.12); --i-red-bg: rgba(255,107,107,.12); --i-gold-bg: rgba(255,179,71,.12);
  --i-blue-bg: rgba(106,168,255,.12); --i-teal-bg: rgba(46,230,230,.12);
  --shadow: 0 24px 64px rgba(0,0,0,.5);
  --font-display: 'Space Grotesk', sans-serif; --font-label: 'Space Grotesk', sans-serif; --font-read: 'Inter', sans-serif;
  --radius: 2px;
  --brand-font: 'Space Grotesk', sans-serif; --brand-weight: 700; --brand-ls: -.055em;
  --brand-stripes: repeating-linear-gradient(180deg, #ff2d3f 0 2px, rgba(255,45,63,.42) 2px 3px);
  --brand-fill: transparent; --brand-a: #ff2d3f; --brand-b: #ff2d3f;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--page); color: var(--text); font-family: var(--font-read); }
a { color: var(--accent); }

/* ── Pasek górny: logo · menu na środku · motyw w rogu (jak na plakacie) ─────────────────────────────────── */
.topbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 22px 32px; }
.logo { font-family: var(--brand-font); font-weight: var(--brand-weight); font-size: var(--fs-logo); letter-spacing: var(--brand-ls);
        line-height: 1; text-decoration: none; white-space: nowrap; background-image: var(--brand-stripes);
        -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: var(--brand-fill); justify-self: start; }
.logo .brand-ai { color: var(--brand-a); }
.logo .brand-rico { color: var(--brand-b); }
.nav { display: flex; gap: 26px; font-family: var(--font-label); font-size: var(--fs-nav); letter-spacing: .14em; text-transform: uppercase; }
.nav a { color: var(--heading); text-decoration: none; padding-bottom: 4px; border-bottom: 2px solid transparent; white-space: nowrap; }
.nav a:hover { color: var(--accent); }
.nav a.active { color: var(--accent); border-bottom-color: var(--accent); }
.nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.theme-form { display: inline-flex; margin: 0; justify-self: end; }
.visually-hidden-lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.theme-seg { font-size: 16px; display: inline-grid; grid-template-columns: 1fr 1fr; height: 1.95em; border: 1px solid var(--border);
             border-radius: 999px; overflow: hidden; background: var(--surface); }
.ts-half { display: flex; align-items: center; justify-content: center; width: 2.4em; height: 100%; margin: 0; padding: 0; border: 0;
           background-color: transparent; color: var(--muted); font-size: inherit; line-height: 0; }
.ts-half + .ts-half { box-shadow: inset 1px 0 0 var(--border); }
.ts-half svg { display: block; width: .85em; height: .85em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ts-half.is-active { background-color: var(--accent); color: var(--on-accent); }
button.ts-half { cursor: pointer; transition: background-color .2s ease, color .2s ease; }
button.ts-half:hover { color: var(--accent); background-color: var(--accent-dim); }
button.ts-half:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }

.eyebrow { font-family: var(--font-label); font-size: var(--fs-eyebrow); letter-spacing: .28em; text-transform: uppercase; color: var(--muted); }
footer.pub-foot { text-align: center; margin-top: 64px; font: var(--fs-nav) var(--font-label); color: var(--muted); }

/* ── /o-stronie/ ─────────────────────────────────────────────────────────────────────────────────────── */
.about .wrap { max-width: 1440px; margin: 0 auto; padding: 0 32px 64px; }
.hero { text-align: center; padding: 18px 0 0; }
.hero h1 { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-hero); line-height: 1.1; color: var(--heading); margin-top: 10px; letter-spacing: -.01em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { font-size: var(--fs-lead); color: var(--muted); max-width: 760px; margin: 14px auto 0; line-height: 1.5; }

.diagram { position: relative; width: 1200px; height: 660px; margin: 8px auto 0; }
.diagram > svg.links { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.links line { stroke: var(--accent-edge); stroke-width: 1.4; stroke-dasharray: 2 7; transition: stroke .3s; }
.links line.on { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 6 6; animation: flow 1s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -12; } }
.links circle { fill: var(--accent); opacity: .6; }
.brain { position: absolute; left: 330px; top: 160px; width: 540px; height: 340px; overflow: visible; }
.brain-core { fill: var(--sh2); opacity: 0; animation: core 3.3s ease-in-out infinite; }
@keyframes core { 0%, 100% { opacity: 0; } 50% { opacity: .45; } }

.mod { --c: var(--accent); --c-bg: var(--accent-dim);   /* barwa obszaru — skrypt nadpisuje per obszar */
       position: absolute; transform: translate(-50%, -38px); width: 190px; text-align: center; background: none; border: 0; cursor: pointer;
       color: var(--heading); font: 600 var(--fs-mod)/1.3 var(--font-label); }
.mod .ic { width: 70px; height: 70px; border-radius: 50%; margin: 0 auto 10px; display: grid; place-items: center; background: var(--c-bg);
           color: var(--c); box-shadow: 0 0 0 6px var(--page), 0 0 0 7px var(--border); transition: transform .25s, box-shadow .25s; }
.mod .ic svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mod:hover .ic, .mod:focus-visible .ic { transform: scale(1.08); }
.mod:focus-visible { outline: none; }
.mod:focus-visible .lbl { outline: 2px solid var(--accent); }
.mod .lbl { background: var(--page); padding: 1px 6px; border-radius: 4px; }
.mod.on .ic { box-shadow: 0 0 0 6px var(--page), 0 0 0 8px var(--c); transform: scale(1.1); }
.mod.on { color: var(--c); }

.found { display: flex; justify-content: center; gap: 14px; margin-top: 4px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 10px; padding: 9px 18px 9px 10px; border: 1px solid var(--border); border-radius: 999px;
        background: var(--surface); font: 600 var(--fs-chip) var(--font-label); color: var(--heading); cursor: pointer; }
.chip i { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-dim); display: grid; place-items: center; color: var(--accent); font-style: normal; font-size: 13px; }
.chip.on { border-color: var(--accent); color: var(--accent); }
.chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.detail { max-width: 980px; margin: 30px auto 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
          box-shadow: var(--shadow); padding: 26px 32px; display: grid; grid-template-columns: 1fr 260px; gap: 28px; min-height: 150px; }
.detail h2 { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-detail-h); color: var(--heading); }
.detail p { font-size: var(--fs-body); line-height: 1.6; margin-top: 8px; }
.detail.hint { display: block; text-align: center; color: var(--muted); box-shadow: none; background: none; border-style: dashed; min-height: 0;
               padding: 18px; font-family: var(--font-label); font-size: var(--fs-chip); }

.why { margin-top: 88px; }
.why .eyebrow { text-align: center; display: block; }
.why h2 { text-align: center; font-family: var(--font-display); font-weight: 500; font-size: var(--fs-why-h); color: var(--heading); margin: 8px 0 34px; }
.lead { max-width: 900px; margin: 0 auto 40px; font-size: var(--fs-lead); line-height: 1.65; text-align: center; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 26px; }
.card h3 { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-card-h); color: var(--heading); line-height: 1.25; }
.card p { font-size: 16px; line-height: 1.6; margin-top: 10px; }
.closing { text-align: center; margin-top: 56px; font-family: var(--font-display); font-size: var(--fs-closing); color: var(--heading); }
.closing a { display: inline-block; margin-top: 12px; font-family: var(--font-label); font-size: var(--fs-chip); text-decoration: none; }

/* ── /o-autorze/ ─────────────────────────────────────────────────────────────────────────────────────── */
.author .wrap { max-width: 1180px; margin: 40px auto 0; padding: 0 32px 64px; }
.author-card { display: grid; grid-template-columns: 320px 1fr; gap: 64px; }
.author-card aside { position: sticky; top: 32px; align-self: start; }
.author-card aside img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.author-card .name { font-family: var(--font-display); font-weight: 500; font-size: 34px; color: var(--heading); margin-top: 22px; }
.author-card .role { font-family: var(--font-label); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-top: 6px; }
.author-card article h2 { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-h2); color: var(--heading); margin: 8px 0 20px; }
.author-card article h3 { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-h3); color: var(--heading); margin: 34px 0 6px; }
.author-card article p { font-size: 18px; line-height: 1.7; margin-top: 14px; max-width: 72ch; }
.author-card article .sign { font-style: italic; color: var(--heading); }
.author-card .back { display: inline-block; margin-top: 36px; font-family: var(--font-label); font-size: var(--fs-chip); text-decoration: none; }
.author footer.pub-foot { margin-top: 24px; }

/* Telefon: /o-stronie/ ma części „O aplikacji” i „O autorze” z przełącznikiem u góry (decyzja właściciela
   2026-10-26). Na szerszym ekranie obie są ukryte — „O autorze” ma tam własną stronę. */
.about-tabs, .about-author { display: none; }
.detail .basis { border-left: 1px solid var(--border); padding-left: 24px; font-family: var(--font-label); font-size: 13px; color: var(--muted); }
.detail .basis b { display: block; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 8px; font-weight: 600; }
.detail .basis span { display: block; color: var(--heading); font-size: 13px; font-weight: 600; line-height: 1.35; margin-bottom: 5px; }
.detail.single { grid-template-columns: 1fr; }
/* Ramka nie zmienia wysokości przy przechodzeniu między obszarami (najechanie) — inaczej treść niżej skacze. */
@media (min-width: 1261px) {
  .detail:not(.hint) { min-height: 240px; }   /* najwyższa ramka: Klasyfikacja AI Act (pięć pozycji podstawy) */
  .detail:not(.hint):not(.single) { grid-template-columns: 1fr 330px; }
}

/* ── Telefon i wąskie okna ───────────────────────────────────────────────────────────────────────────── */
@media (max-width: 1260px) {
  .topbar { grid-template-columns: 1fr auto; padding: 16px; }
  .nav { grid-column: 1 / -1; grid-row: 2; justify-content: center; gap: 16px; font-size: 11px; margin-top: 4px; flex-wrap: wrap; }
  .about .wrap { padding: 0 16px 48px; }
  .hero h1 { font-size: 34px; }
  .hero p { font-size: 16px; }
  .diagram { width: 100%; height: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
  .diagram > svg.links { display: none; }
  .brain { position: static; grid-column: 1 / -1; width: 100%; height: 200px; margin: 6px 0 4px; }
  .mod { position: static; transform: none; width: auto; display: flex; align-items: center; gap: 10px; text-align: left; background: var(--surface);
         border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; font-size: 13.5px; }
  .mod .ic { width: 40px; height: 40px; margin: 0; flex: none; box-shadow: none; }
  .mod .ic svg { width: 20px; height: 20px; }
  .mod .lbl { background: none; padding: 0; }
  .mod.on { border-color: var(--c); }
  .mod.on .ic { box-shadow: none; transform: none; }
  .found { margin-top: 14px; gap: 8px; }
  .chip { font-size: 12.5px; padding: 6px 12px 6px 6px; }
  .detail { grid-template-columns: 1fr; padding: 20px; gap: 14px; }
  .diagram > .detail { grid-column: 1 / -1; margin: 0; max-width: none; }   /* ramka pod wierszem dotkniętego kafelka */
  .detail .basis { border-left: 0; padding-left: 0; border-top: 1px solid var(--border); padding-top: 12px; }
  .detail h2 { font-size: 23px; }
  .detail p { font-size: 16px; }
  .why { margin-top: 56px; }
  .why h2 { font-size: 28px; }
  .lead { font-size: 16px; text-align: left; }
  .cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; }
  .author .wrap { padding: 0 16px 48px; margin-top: 20px; }
  .author-card { grid-template-columns: 1fr; gap: 24px; }
  .author-card aside { position: static; text-align: center; }
  .author-card aside img { width: 180px; }
  .author-card article p { font-size: 16px; }
  .nav .nav-wide { display: none; }
  .about-tabs { display: flex; justify-content: center; gap: 8px; margin: 4px 0 18px; }
  .about-tabs a { font: 600 var(--fs-chip) var(--font-label); text-decoration: none; color: var(--heading); padding: 8px 16px;
                  border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
  .about-tabs a.on { border-color: var(--accent); color: var(--accent); }
  .about-author { display: block; margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--border); scroll-margin-top: 16px; }
  #o-aplikacji { scroll-margin-top: 16px; }
  .logo { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .brain-core, .links line.on { animation: none; }
  .mod .ic, button.ts-half { transition: none; }
}
