/* ============================================================
   TylkoFotografia — koncept redesignu „HUD wizjera"
   Język wizualny: interfejs aparatu — ramki AF, odczyty EXIF,
   licznik klatek, pokrętło trybów. Typografia zamiast stocków.
   ============================================================ */

:root {
  --bg: #f4f7fb;
  --bg-raise: #ffffff;
  --bg-panel: #e8eef6;
  --line: rgba(16, 26, 38, 0.10);
  --line-strong: rgba(16, 26, 38, 0.24);
  --text: #14202e;
  --text-dim: #4e6072;
  --text-faint: #8494a5;
  --hud: #1769c4;            /* błękit ekranu LCD */
  --hud-dim: rgba(23, 105, 196, 0.10);
  --focus: #0f4f96;          /* ciemniejszy błękit — wyniki */
  --font-display: "Archivo", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --w: min(1200px, calc(100vw - 48px));
}

/* Strefa ciemna: górna listwa + hero = „wizjer" aparatu.
   Reszta strony pozostaje jasna. */
.dark-zone {
  --bg: #0b0f14;
  --bg-raise: #10161d;
  --bg-panel: #151c25;
  --line: rgba(233, 240, 248, 0.10);
  --line-strong: rgba(233, 240, 248, 0.24);
  --text: #ecf2f8;
  --text-dim: #a2b1c0;
  --text-faint: #647382;
  --hud: #58a6ff;            /* jaśniejszy błękit na czerni */
  --hud-dim: rgba(88, 166, 255, 0.14);
  --focus: #58a6ff;
  background: var(--bg);
  color: var(--text);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--hud); color: #ffffff; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.wrap { width: var(--w); margin: 0 auto; }

/* ---------- typografia pomocnicza ---------- */

.mono {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hud-label { color: var(--hud); }

/* ============================================================
   PASEK GÓRNY — górna listwa wizjera
   ============================================================ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 64px;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.logo .rec {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--hud);
  box-shadow: 0 0 8px rgba(88, 166, 255, 0.5);
  animation: rec-blink 2.4s infinite;
}

@keyframes rec-blink { 0%, 78% { opacity: 1; } 82%, 92% { opacity: 0.25; } 100% { opacity: 1; } }

.logo em { font-style: normal; color: var(--text-dim); font-weight: 500; }

.topnav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.topnav a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 7px 12px;
  border: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.topnav a:hover, .topnav a[aria-current] {
  color: var(--hud);
  border-color: var(--line-strong);
}

/* odczyt ekspozycji w pasku (na stronie artykułu = postęp czytania) */
.meter {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-faint);
  letter-spacing: 0.08em;
}

.meter-scale {
  position: relative;
  width: 130px;
  height: 14px;
  border-left: 1px solid var(--line-strong);
  border-right: 1px solid var(--line-strong);
}

.meter-scale::before {
  content: "";
  position: absolute;
  inset: 6px 0;
  background-image: repeating-linear-gradient(to right, var(--line-strong) 0 1px, transparent 1px calc(100% / 8));
}

.meter-needle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0%;
  width: 3px;
  background: var(--hud);
  box-shadow: 0 0 6px rgba(88, 166, 255, 0.45);
  transition: left 0.08s linear;
}

/* ============================================================
   HERO — matówka wizjera
   ============================================================ */

.hero {
  position: relative;
  padding: 96px 0 80px;
  overflow: hidden;
}

/* siatka trójpodziału */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, transparent calc(33.33% - 1px), var(--line) 33.33%, transparent calc(33.33% + 1px)),
    linear-gradient(to right, transparent calc(66.66% - 1px), var(--line) 66.66%, transparent calc(66.66% + 1px)),
    linear-gradient(to bottom, transparent calc(33.33% - 1px), var(--line) 33.33%, transparent calc(33.33% + 1px)),
    linear-gradient(to bottom, transparent calc(66.66% - 1px), var(--line) 66.66%, transparent calc(66.66% + 1px));
  pointer-events: none;
}

/* winieta wizjera */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 90% 80% at 50% 45%, transparent 55%, rgba(0, 0, 0, 0.45));
  pointer-events: none;
}

/* przyciski w ciemnej strefie: jasny błękit wymaga ciemnego tekstu */
.dark-zone .btn-primary { color: #0a1017; }
.dark-zone .btn-primary:hover { background: #79b8ff; border-color: #79b8ff; }

.hero-inner { position: relative; z-index: 1; }

.hero-readout {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  margin-bottom: 40px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--text-faint);
}

.hero-readout b { color: var(--hud); font-weight: 500; }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.1rem, 4.6vw, 3.7rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
}

.hero h1 .dim { color: var(--text-faint); }

/* hero z najnowszym wpisem: tekst + kadr w wizjerze */
.hero-split {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero-shot {
  position: relative;
  display: block;
  border: 1px solid var(--line-strong);
  overflow: hidden;
}

.hero-shot img { display: block; width: 100%; height: auto; }

/* siatka trójpodziału na samym kadrze */
.hero-shot::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, transparent calc(33.33% - 1px), rgba(255,255,255,0.22) 33.33%, transparent calc(33.33% + 1px)),
    linear-gradient(to right, transparent calc(66.66% - 1px), rgba(255,255,255,0.22) 66.66%, transparent calc(66.66% + 1px)),
    linear-gradient(to bottom, transparent calc(33.33% - 1px), rgba(255,255,255,0.22) 33.33%, transparent calc(33.33% + 1px)),
    linear-gradient(to bottom, transparent calc(66.66% - 1px), rgba(255,255,255,0.22) 66.66%, transparent calc(66.66% + 1px));
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}

.hero-shot:hover::before { opacity: 1; }

.shot-exif {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  background: rgba(6, 10, 15, 0.62);
  backdrop-filter: blur(6px);
  color: #c9d5e2;
}

.hero p.lead {
  margin-top: 28px;
  max-width: 52ch;
  font-size: 1.12rem;
  color: var(--text-dim);
}

.hero p.lead strong { color: var(--text); font-weight: 600; }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.btn-primary {
  background: var(--hud);
  border-color: var(--hud);
  color: #ffffff;
  font-weight: 500;
}

.btn-primary:hover { background: #1e7ee0; border-color: #1e7ee0; }
.btn-ghost:hover { border-color: var(--hud); color: var(--hud); }

/* narożne klamry AF wokół hero */
.af-corners { position: absolute; inset: 28px; pointer-events: none; }
.af-corners i {
  position: absolute;
  width: 26px; height: 26px;
  border: 0 solid var(--line-strong);
}
.af-corners i:nth-child(1) { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.af-corners i:nth-child(2) { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; }
.af-corners i:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; }
.af-corners i:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }

/* ============================================================
   POKRĘTŁO TRYBÓW — nawigacja po działach
   ============================================================ */

.section { padding: 84px 0; border-top: 1px solid var(--line); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 44px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  letter-spacing: -0.02em;
}

.section-head .mono { color: var(--text-faint); }

.dial {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.dial-mode {
  position: relative;
  background: var(--bg-raise);
  padding: 26px 22px 22px;
  display: block;
  transition: background 0.15s;
}

.dial-mode:hover { background: var(--bg-panel); }

.dial-mode .letter {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.1rem;
  line-height: 1;
  color: var(--text-faint);
  transition: color 0.15s;
}

.dial-mode:hover .letter { color: var(--hud); }

.dial-mode .name {
  display: block;
  margin-top: 12px;
  font-weight: 600;
  font-size: 0.95rem;
}

.dial-mode .count {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}

/* wskaźnik aktywnego trybu jak kreska przy pokrętle */
.dial-mode::after {
  content: "";
  position: absolute;
  top: 0; left: 22px;
  width: 22px; height: 3px;
  background: transparent;
  transition: background 0.15s;
}

.dial-mode:hover::after { background: var(--hud); }

/* ============================================================
   ŚCIEŻKA NAUKI — seria jak skala ekspozycji
   ============================================================ */

.path {
  border: 1px solid var(--line);
  background: var(--bg-raise);
  padding: 40px clamp(22px, 4vw, 48px);
}

.path-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 8px;
}

.path-title h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.path > p { color: var(--text-dim); max-width: 62ch; }

.path-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 36px;
  position: relative;
}

/* linia łącząca — skala */
.path-steps::before {
  content: "";
  position: absolute;
  top: 21px; left: 40px; right: 40px;
  height: 1px;
  background: var(--line-strong);
}

.path-step { position: relative; padding: 0 16px 0 0; }

.path-step .tick {
  position: relative;
  z-index: 1;
  width: 42px; height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--bg-raise);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--hud);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.path-step:hover .tick { border-color: var(--hud); box-shadow: 0 0 12px var(--hud-dim); }

.path-step h4 {
  margin-top: 18px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.path-step .sym {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  display: block;
  margin-top: 6px;
}

.path-step p { margin-top: 10px; font-size: 0.88rem; color: var(--text-dim); }

/* ============================================================
   LISTA ARTYKUŁÓW — licznik klatek, zero miniaturek
   ============================================================ */

.frames { border-top: 1px solid var(--line); }

.frame {
  position: relative;
  display: grid;
  grid-template-columns: 74px 240px 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 26px 8px;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s;
}

/* miniatura jak klatka na stykówce: cz-b, kolor po „złapaniu ostrości" */
.frame-thumb {
  width: 240px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border: 1px solid var(--line-strong);
  filter: grayscale(1) contrast(1.05);
  transition: filter 0.25s;
}

.frame .excerpt {
  margin-top: 8px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-dim);
  max-width: 62ch;
}

.frame:hover .frame-thumb { filter: grayscale(0) contrast(1); }

.frame:hover { background: var(--bg-raise); }

.frame .no {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
  letter-spacing: 0.06em;
}

.frame:hover .no { color: var(--hud); }

.frame h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.frame .exif {
  display: block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.frame .exif b { color: var(--text-dim); font-weight: 500; }

.frame .go {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-faint);
  transition: color 0.15s, transform 0.15s;
}

.frame:hover .go { color: var(--hud); transform: translateX(4px); }

/* klamry AF przy hoverze wiersza */
.frame::before, .frame::after {
  content: "";
  position: absolute;
  top: 10px; bottom: 10px;
  width: 14px;
  border: 0 solid var(--hud);
  opacity: 0;
  transition: opacity 0.15s;
}
.frame::before { left: -14px; border-top-width: 2px; border-left-width: 2px; border-bottom-width: 2px; }
.frame::after { right: -14px; border-top-width: 2px; border-right-width: 2px; border-bottom-width: 2px; }
.frame:hover::before, .frame:hover::after { opacity: 1; }

.frames-more { display: flex; justify-content: center; padding: 36px 0 0; }

/* ============================================================
   NARZĘDZIA — karty kalkulatorów + żywe demo
   ============================================================ */

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.tool-card {
  border: 1px solid var(--line);
  background: var(--bg-raise);
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.15s;
}

.tool-card:hover { border-color: var(--line-strong); }

.tool-card .tool-id {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--hud);
}

.tool-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.tool-card p { font-size: 0.92rem; color: var(--text-dim); flex: 1; }

.tool-card .btn { align-self: flex-start; }

/* żywe demo DoF na stronie głównej */
.dof-demo {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed var(--line-strong);
}

.dof-demo label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 8px;
}

.dof-demo output { color: var(--hud); }

input[type="range"] {
  width: 100%;
  appearance: none;
  height: 2px;
  background: var(--line-strong);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--hud);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--hud);
  cursor: pointer;
}

.dof-readout {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
}

.dof-readout b { color: var(--focus); font-weight: 500; }

/* ============================================================
   O STRONIE / MANIFEST
   ============================================================ */

.manifest {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.manifest h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.manifest h2 .hud-label { color: var(--hud); }

.manifest-body p { color: var(--text-dim); }
.manifest-body p + p { margin-top: 16px; }
.manifest-body strong { color: var(--text); }

.manifest-figure {
  margin-top: 26px;
  border: 1px solid var(--line);
  background: var(--bg-raise);
}

.manifest-figure img { display: block; width: 100%; height: auto; }

.manifest-figure figcaption {
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.manifest-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 34px;
}

.stat { background: var(--bg-raise); padding: 20px 18px; }

.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--hud);
  letter-spacing: -0.02em;
}

.stat span {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ============================================================
   STOPKA — perforacja kliszy
   ============================================================ */

footer.site {
  border-top: 1px solid var(--line);
  padding: 0 0 48px;
}

.film-edge {
  height: 34px;
  border-bottom: 1px solid var(--line);
  background-image: repeating-linear-gradient(
    to right,
    transparent 0 14px,
    var(--line-strong) 14px 26px,
    transparent 26px 40px
  );
  background-size: 40px 12px;
  background-repeat: repeat-x;
  background-position: 0 center;
  opacity: 0.7;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
  padding-top: 36px;
}

.footer-inner .mono { color: var(--text-faint); }
.footer-links { display: flex; gap: 22px; }
.footer-links a { color: var(--text-dim); font-size: 0.85rem; }
.footer-links a:hover { color: var(--hud); }

/* ============================================================
   STRONA ARTYKUŁU
   ============================================================ */

.article-hud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 30px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.article-hud b { color: var(--hud); font-weight: 500; }

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 72px;
  padding: 64px 0 96px;
}

.article-header h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  max-width: 20ch;
}

.article-header .standfirst {
  margin-top: 24px;
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 56ch;
}

.article-body { margin-top: 48px; max-width: 68ch; }

.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 52px 0 18px;
  scroll-margin-top: 90px;
}

.article-body h2 .h-index {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--hud);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 8px;
}

.article-body p { margin: 0 0 18px; color: #33414f; }
.article-body strong { color: var(--text); }

/* ramka informacyjna jak pozycja menu aparatu */
.cam-note {
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--hud);
  background: var(--bg-raise);
  padding: 20px 22px;
  margin: 28px 0;
}

.cam-note .mono { color: var(--hud); display: block; margin-bottom: 8px; }
.cam-note p { margin: 0; font-size: 0.92rem; }

/* figura ze zdjęciem — klatka z podpisem EXIF */
.cam-figure {
  margin: 32px 0;
  border: 1px solid var(--line-strong);
  background: var(--bg-raise);
}

.cam-figure img { display: block; width: 100%; height: auto; }

.cam-figure figcaption {
  padding: 14px 18px;
  font-size: 0.86rem;
  color: var(--text-dim);
  border-top: 1px solid var(--line);
}

.cam-figure figcaption .mono {
  display: block;
  color: var(--hud);
  margin-bottom: 6px;
}

/* tabela parametrów jak ekran ustawień */
.cam-table { width: 100%; border-collapse: collapse; margin: 28px 0; font-size: 0.9rem; }
.cam-table th, .cam-table td { border: 1px solid var(--line); padding: 11px 14px; text-align: left; }
.cam-table th {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  background: var(--bg-raise);
  font-weight: 500;
}
.cam-table td b { color: var(--hud); font-weight: 600; }

/* boczne MENU (spis treści) */
.article-aside { position: relative; }

.toc {
  position: sticky;
  top: 96px;
  border: 1px solid var(--line);
  background: var(--bg-raise);
}

.toc-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--hud);
}

.toc a {
  display: flex;
  gap: 12px;
  padding: 12px 18px;
  font-size: 0.86rem;
  color: var(--text-dim);
  border-bottom: 1px solid var(--line);
  transition: background 0.12s, color 0.12s;
}

.toc a:last-child { border-bottom: 0; }
.toc a:hover, .toc a.active { background: var(--bg-panel); color: var(--text); }
.toc a .idx { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-faint); padding-top: 2px; }
.toc a.active .idx { color: var(--hud); }

/* nawigacja klatek prev/next */
.frame-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 72px;
}

.frame-nav a {
  background: var(--bg-raise);
  padding: 24px 26px;
  transition: background 0.15s;
}

.frame-nav a:hover { background: var(--bg-panel); }
.frame-nav a:last-child { text-align: right; }
.frame-nav .mono { color: var(--text-faint); display: block; margin-bottom: 8px; }
.frame-nav b { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; letter-spacing: -0.01em; }

/* ============================================================
   STRONA NARZĘDZI — kalkulatory
   ============================================================ */

.calc {
  border: 1px solid var(--line);
  background: var(--bg-raise);
  margin-bottom: 40px;
}

.calc-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 18px;
  padding: 24px 30px;
  border-bottom: 1px solid var(--line);
}

.calc-head h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.calc-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.calc-inputs { padding: 30px; border-right: 1px solid var(--line); display: grid; gap: 22px; align-content: start; }

.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 8px;
}

.field select, .field input[type="number"] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.86rem;
  padding: 11px 13px;
  outline: none;
}

.field select:focus, .field input:focus { border-color: var(--hud); }

.field .range-row { display: flex; align-items: center; gap: 14px; }
.field .range-row output { font-family: var(--font-mono); font-size: 0.86rem; color: var(--hud); min-width: 64px; text-align: right; }

.calc-results { padding: 30px; display: grid; gap: 1px; align-content: start; background: var(--line); }

.result-row {
  background: var(--bg-raise);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 4px;
}

.result-row span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.result-row b {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--focus);
}

.result-row.highlight b { color: var(--hud); font-size: 1.3rem; }

.page-title { padding: 72px 0 40px; }
.page-title h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  letter-spacing: -0.025em;
}
.page-title p { margin-top: 16px; color: var(--text-dim); max-width: 60ch; font-size: 1.05rem; }

/* ============================================================
   RESPONSYWNOŚĆ
   ============================================================ */

@media (max-width: 960px) {
  .article-layout { grid-template-columns: 1fr; gap: 40px; }
  .article-aside { order: -1; }
  .toc { position: static; }
  .manifest { grid-template-columns: 1fr; gap: 36px; }
  .hero-split { grid-template-columns: 1fr; gap: 36px; }
  .frame { grid-template-columns: 74px 180px 1fr; }
  .frame-thumb { width: 180px; }
  .frame .go { display: none; }
  .calc-body { grid-template-columns: 1fr; }
  .calc-inputs { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 720px) {
  .topnav { display: none; }
  .meter { margin-left: auto; }
  .hero { padding: 64px 0 56px; }
  .frame { grid-template-columns: 1fr; gap: 10px; }
  .frame .no { font-size: 0.7rem; }
  .frame-thumb { width: 100%; }
  .path-steps { grid-template-columns: 1fr; gap: 28px; }
  .path-steps::before { display: none; }
  .newsletter form { flex-direction: column; }
  .manifest-stats { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   WARSTWA WORDPRESS — treść z Gutenberga, listy, paginacja
   ============================================================ */

/* dostępność */
.screen-reader-text {
  position: absolute;
  width: 1px; height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

/* miniatura-zaślepka, gdy wpis nie ma obrazka wyróżniającego */
.frame-thumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-panel);
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
}

/* okładka wpisu nad treścią */
.article-cover { margin: 40px 0 0; }

/* numeracja nagłówków H2 w treści (odpowiednik h-index z prototypu) */
.entry-content { counter-reset: tf-h2; }

.entry-content h2::before {
  counter-increment: tf-h2;
  content: counter(tf-h2, decimal-leading-zero) " /";
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--hud);
}

/* typografia treści z edytora */
.entry-content a { color: var(--hud); text-decoration: underline; text-underline-offset: 3px; }
.entry-content a:hover { color: var(--focus); }
.entry-content ul, .entry-content ol { margin: 0 0 18px 22px; color: #33414f; }
.entry-content li { margin-bottom: 6px; }
.entry-content h3 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; margin: 36px 0 14px; }

/* obrazy i podpisy jak klatki z EXIF */
.entry-content figure.wp-block-image,
.entry-content .wp-block-gallery {
  margin: 32px 0;
}

.entry-content figure.wp-block-image img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line-strong);
}

/* obrazek przeskalowany w edytorze wypełnia swoją figurę */
.entry-content .wp-block-image.is-resized img { width: 100%; }

.entry-content figure.wp-block-image figcaption {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-top: 0;
  background: var(--bg-raise);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: var(--text-faint);
  margin: 0;
}

/* ---- wyrównania Gutenberga: obrazek opływany tekstem ---- */
.entry-content .alignright {
  float: right;
  margin: 6px 0 20px 28px;
  max-width: min(46%, 420px);
}

.entry-content .alignleft {
  float: left;
  margin: 6px 28px 20px 0;
  max-width: min(46%, 420px);
}

.entry-content .aligncenter {
  margin-left: auto;
  margin-right: auto;
}

.entry-content figure.aligncenter img { margin: 0 auto; }

/* nagłówki i koniec treści nie wchodzą pod pływające obrazki */
.entry-content h2 { clear: both; }
.entry-content::after { content: ""; display: block; clear: both; }

@media (max-width: 720px) {
  .entry-content .alignright,
  .entry-content .alignleft {
    float: none;
    margin: 24px auto;
    max-width: 100%;
  }
}

/* cytat jak komunikat z menu aparatu */
.entry-content blockquote {
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--hud);
  background: var(--bg-raise);
  padding: 20px 22px;
  margin: 28px 0;
  font-style: normal;
}

.entry-content blockquote p:last-child { margin-bottom: 0; }

/* tabele jak ekran ustawień */
.entry-content table { width: 100%; border-collapse: collapse; margin: 28px 0; font-size: 0.9rem; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 11px 14px; text-align: left; }
.entry-content th {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  background: var(--bg-raise);
  font-weight: 500;
}

/* kod */
.entry-content code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-panel);
  padding: 2px 6px;
}

.entry-content pre {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  padding: 18px 20px;
  overflow-x: auto;
  margin: 28px 0;
}

.entry-content pre code { background: none; padding: 0; }

/* paginacja list */
.pagination { padding: 40px 0 96px; }

.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.pagination .page-numbers {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  color: var(--text-dim);
}

.pagination .page-numbers.current { background: var(--hud); border-color: var(--hud); color: #fff; }
.pagination a.page-numbers:hover { border-color: var(--hud); color: var(--hud); }

/* wyszukiwarka HUD */
.tf-search label { display: block; color: var(--hud); margin-bottom: 10px; }
.tf-search-row { display: flex; gap: 10px; }

.tf-search input[type="search"] {
  flex: 1;
  background: var(--bg-raise);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.86rem;
  padding: 12px 14px;
  outline: none;
}

.tf-search input[type="search"]:focus { border-color: var(--hud); }

/* komentarze — minimalnie, w stylu menu aparatu */
.comments-area { margin-top: 72px; border-top: 1px solid var(--line); padding-top: 40px; }
.comments-area .comments-title { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 24px; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .comment { border: 1px solid var(--line); background: var(--bg-raise); padding: 18px 20px; margin-bottom: 14px; }
.comment-meta { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 10px; }
.comment-content { font-size: 0.95rem; color: #33414f; }
.comment-respond input, .comment-respond textarea {
  width: 100%;
  background: var(--bg-raise);
  border: 1px solid var(--line-strong);
  padding: 11px 13px;
  font: inherit;
  color: var(--text);
  margin-bottom: 12px;
}

/* notka przy kalkulatorze */
.calc-note { font-size: 0.85rem; color: var(--text-dim); }

/* strona (page) bez sidebara — pełna szerokość wrap (1200 px),
   bez pustego pasa po prawej, gdzie na wpisach siedzi TOC */
.page-body {
  padding-bottom: 96px;
  max-width: none;
  margin-top: 0;
}
