/* ==========================================================================
   Fabrevio EngiSales: system designu (2.2.0: barwy Fabrevio, wariant A)
   Jeden arkusz dla warstwy publicznej i panelu. Wszystkie kolory pochodzą
   z tokenów, więc motyw jasny/ciemny nie wymaga duplikowania komponentów.

   2.2.2: wspólny wygląd stron Fabrevio (decyzja właściciela z 01.12.2026).
   Krój i barwy bazowe biorą się ze zmiennych --fbw-* wspólnego zestawu
   (assets/fabrevio/fabrevio-wspolne.css, kopia, nie edytować), pasek i stopka
   to .fbw-pasek i .fbw-stopka z zestawu. Motyw domyślnie jasny jak pozostałe
   strony; ciemny tylko z wyboru (przełącznik w pasku).
   ========================================================================== */

/* --- Tokeny: motyw jasny jest bazą ------------------------------------- */
:root {
  color-scheme: light;

  --ground: var(--fbw-papier, #f4f2ee);
  --surface: var(--fbw-biel, #ffffff);
  --surface-sunk: #efece7;
  --surface-raised: #ffffff;

  --ink: var(--fbw-tekst, #15202b);
  --ink-2: var(--fbw-tekst2, #4a5663);
  --muted: #56616d;
  --faint: #8a9199;

  --rule: var(--fbw-linia, #d9d6cf);
  --rule-soft: #e7e4de;
  --rule-strong: #a8aeb5;

  --accent: var(--fbw-sygnal-tekst, #b8470b);
  --accent-hover: var(--fbw-grafit, #15202b);
  --accent-ink: #ffffff;
  --accent-soft: #fbe9dd;
  --accent-line: #f0c2a3;

  --data: #0d6f82;
  --data-soft: #e0f0f2;

  --ok: #1f6b4f;
  --ok-soft: #e4f1ea;
  --warn: #96600a;
  --warn-soft: #fbf1de;
  --crit: #a92a1f;
  --crit-soft: #fbeae8;

  --shadow-sm: 0 1px 2px rgba(10, 22, 32, .06), 0 1px 1px rgba(10, 22, 32, .04);
  --shadow-md: 0 4px 12px rgba(10, 22, 32, .07), 0 1px 3px rgba(10, 22, 32, .05);
  --shadow-lg: 0 18px 44px rgba(10, 22, 32, .12), 0 3px 10px rgba(10, 22, 32, .06);

  /* 2.2.2: kroje wspólnego zestawu Fabrevio (IBM Plex Sans, Space Grotesk, IBM Plex Mono; czcionki w paczce). */
  --sans: var(--fbw-font-tekst);
  --display: var(--fbw-font-naglowki);
  --mono: var(--fbw-font-mono);

  /* 2.2.2: zaokrąglenia mniejsze, bliżej prostokątnego paska i przycisków zestawu. */
  --r-sm: 2px;
  --r-md: 3px;
  --r-lg: 4px;
  --r-xl: 6px;

  --sidebar-w: 15.5rem;
  --topbar-h: 3.5rem;

  --step: 180ms;
}

/* 2.2.2: ciemny motyw tylko z wyboru (przełącznik w pasku), nie z ustawień systemu:
   pozostałe strony Fabrevio są jasne. */
:root[data-theme="dark"] {
  color-scheme: dark;

  --ground: #0d151c;
  --surface: #15202b;
  --surface-sunk: #111a23;
  --surface-raised: #1b2834;

  --ink: #f4f2ee;
  --ink-2: #c9cdd1;
  --muted: #9aa3ab;
  --faint: #77818a;

  --rule: #26333f;
  --rule-soft: #1c2833;
  --rule-strong: #364552;

  --accent: #ff8a4c;
  --accent-hover: #ffa877;
  --accent-ink: #15202b;
  --accent-soft: #2a1a10;
  --accent-line: #5a3218;

  --data: #4bb6c4;
  --data-soft: #0c2429;

  --ok: #62b894;
  --ok-soft: #0d2219;
  --warn: #d7a75a;
  --warn-soft: #241c0c;
  --crit: #ef8577;
  --crit-soft: #2a1310;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, .5);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, .6);
}

/* --- Reset --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -.019em;
  line-height: 1.18;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(1.6rem, 3.4vw, 2.35rem); letter-spacing: -.028em; }
h2 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); }
h3 { font-size: 1.06rem; }
h4 { font-size: .95rem; }

p { margin: 0; }
ul, ol { margin: 0; padding-left: 1.2em; }

a { color: var(--accent); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

code, kbd, samp, .mono { font-family: var(--mono); font-size: .88em; }

hr { border: 0; border-top: 1px solid var(--rule); margin: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; }
}

/* --- Pomocnicze ---------------------------------------------------------- */
.stack { display: flex; flex-direction: column; }
.stack-2 { gap: .5rem; } .stack-3 { gap: .75rem; } .stack-4 { gap: 1rem; }
.stack-5 { gap: 1.5rem; } .stack-6 { gap: 2rem; } .stack-7 { gap: 2.75rem; }

.row { display: flex; align-items: center; gap: .625rem; flex-wrap: wrap; }
.row-tight { gap: .375rem; }
/* Wiersz ikona + zdanie. Bez tego długie zdanie przechodzi pod ikonę: wiersz
   flex łamie się według szerokości maksymalnej pozycji, zanim zacznie ją ściskać. */
.row-nowrap { flex-wrap: nowrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.push { margin-left: auto; }

.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: .8125rem; }
.tiny { font-size: .75rem; }
.strong { font-weight: 650; color: var(--ink); }
.nowrap { white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.right { text-align: right; }
.prose { max-width: 68ch; line-height: 1.68; color: var(--ink-2); }
.prose-narrow { max-width: 56ch; }
.hidden { display: none !important; }

.eyebrow {
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.label-cap {
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.scroll-x { overflow-x: auto; }

/* Widoczne tylko dla czytników ekranu */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: .5rem; top: -3rem; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: .5rem .875rem; border-radius: var(--r-md); font-weight: 600;
  transition: top var(--step);
}
.skip-link:focus { top: .5rem; }

/* --- Powłoka publiczna --------------------------------------------------- */
.shell { min-height: 100vh; display: flex; flex-direction: column; }

/* 2.2.2: własna belka z sygnetem zastąpiona wspólnym paskiem Fabrevio (.fbw-pasek z zestawu).
   Menu narzędzi portalu ma własny wiersz pod paskiem i to on trzyma się góry przy przewijaniu. */
.podmenu {
  position: sticky; top: 0; z-index: 15;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.podmenu-w {
  width: min(100% - 2.5rem, var(--fbw-szerokosc)); margin-inline: auto;
  display: flex; align-items: center; gap: .5rem 1.25rem; flex-wrap: wrap;
  padding-block: .45rem;
}
@media (max-width: 47.5rem) {
  .podmenu { position: static; }
  .podmenu-w .push { margin-left: 0; }
}

/* Prawa strona wspólnego paska: ikony (motyw, konto) i formularz wylogowania.
   Pasek jest zawsze biały, więc barwy są stałe z zestawu, nie z motywu. */
.pasek-ikona {
  display: inline-grid; place-items: center; flex: none;
  width: 2.5rem; height: 2.5rem; padding: 0;
  border: 2px solid var(--fbw-linia); border-radius: 0;
  background: transparent; color: var(--fbw-grafit); cursor: pointer;
  transition: border-color var(--step);
}
.pasek-ikona:hover { border-color: var(--fbw-grafit); text-decoration: none; color: var(--fbw-grafit); }
.pasek-ikona:focus-visible { outline: 3px solid var(--fbw-sygnal); outline-offset: 3px; border-radius: 0; }
.pasek-formularz { display: contents; }
.fbw-pasek .fbw-przycisk .ic { display: block; }
.fbw-pasek a:hover, .fbw-stopka a:hover { text-decoration: none; }
.fbw-przycisk:focus-visible { outline: 3px solid var(--fbw-sygnal); outline-offset: 3px; border-radius: 0; }

/* --- Ikony --------------------------------------------------------------- */
/* Rysowane wektorowo, w barwie tekstu. Bez emoji i glifów systemowych —
   te rysuje system operacyjny, każdy inaczej i we własnych barwach. */
.ic { flex: none; vertical-align: -.15em; }
/* Ikona płynąca w zdaniu. Musi jawnie wrócić do toku wierszowego: wyżej
   `img, svg` dostają `display: block`, więc bez tego ikona zajmowała własny
   wiersz nad tekstem, a `vertical-align` nie miało na czym działać. */
.ic-inline { display: inline-block; vertical-align: -.18em; margin-right: .3em; }

.nav { display: flex; align-items: center; gap: .125rem; flex-wrap: wrap; }
.nav a {
  padding: .4rem .6rem; border-radius: var(--r-md);
  color: var(--ink-2); font-size: .875rem; font-weight: 550;
  transition: background var(--step), color var(--step);
}
.nav a:hover { background: var(--surface-sunk); color: var(--ink); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
/* Pod wspólnym paskiem bieżąca pozycja wygląda jak w pasku: kreska w barwie sygnału. */
.podmenu .nav { margin-left: -.6rem; }   /* napis pierwszej pozycji równo z logo w pasku */
.podmenu .nav a { border-radius: 0; }
.podmenu .nav a[aria-current="page"] { background: transparent; color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--fbw-sygnal); }

.main { flex: 1; width: 100%; }
/* 2.2.2: ta sama szerokość i te same marginesy co wspólny pasek, żeby treść zaczynała się pod logo. */
.wrap {
  width: min(100% - 2.5rem, var(--fbw-szerokosc)); margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) 0;
}
.wrap-narrow { max-width: 56rem; }
.wrap-tight { max-width: 34rem; }

/* --- Brama: belka i okno logowania --------------------------------------- */
/* Okno logowania (<dialog>, otwierane z app.js). Szerokość jednego słupka
   pól: adres e-mail ma być widoczny w całości, a okno nie może być szersze
   od telefonu. */
.login-okno {
  width: min(24rem, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem);
  padding: 0; overflow: auto;
  border: 1px solid var(--rule); border-radius: var(--r-lg);
  background: var(--surface-raised); color: var(--ink);
  box-shadow: var(--shadow-lg);
}
.login-okno::backdrop { background: rgba(10, 22, 32, .48); }
.login-okno[open] { animation: login-okno-wejscie 140ms ease-out; }
@keyframes login-okno-wejscie {
  from { opacity: 0; transform: translateY(.5rem); }
}

.login-okno-glowa {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: 1rem .75rem .25rem 1.25rem;
}
.login-okno-glowa h2 { font-size: 1.15rem; margin: 0; }
.login-okno-bledy { display: flex; flex-direction: column; gap: .5rem; padding: .5rem 1.25rem 0; }
.login-okno .login-form { padding: 1rem 1.25rem 1.25rem; }

/* Bez skryptu: odnośnik prowadzi na /logowanie#zaloguj, a okno pokazuje się
   w miejscu, nad stroną, bez przyciemnionego tła. Skrypt oznacza okno
   data-skrypt i od tej chwili otwiera je i zamyka sam. */
.login-okno:not([open]):not([data-skrypt]):is(:target, [data-otworz]) {
  display: block; position: fixed; inset: 0; z-index: 60;
  margin: auto; height: fit-content;
}

/* Ekran bramy: sama grafika, wyśrodkowana. Nie ma tu kolumny
   z tekstem, bo strona bramy niczego nie opowiada — opis produktu, spis
   narzędzi i zachęty zostały stąd usunięte świadomie. */
.gate {
  position: relative; overflow: hidden;
  background: var(--surface); border-bottom: 1px solid var(--rule);
  display: grid; place-items: center;
  padding: clamp(2rem, 6vw, 4.5rem) clamp(1rem, 3vw, 2rem);
}
.gate::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(var(--rule-soft) 1px, transparent 1px) 0 0 / 100% 3.5rem,
    linear-gradient(90deg, var(--rule-soft) 1px, transparent 1px) 0 0 / 3.5rem 100%;
  mask-image: radial-gradient(90% 90% at 50% 20%, #000 0%, transparent 72%);
  opacity: .85;
}

/* Arkusz rysunku w ramce — jak deska kreślarska, a nie obrazek wklejony w tekst.
   Szerokość ograniczona, żeby na dużym monitorze rysunek nie rozlał się
   na pół ekranu; proporcje trzyma sam viewBox. */
.gate-figure {
  position: relative;
  margin: 0; padding: .5rem;
  width: 100%; max-width: 40rem;
  background: var(--surface-sunk);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
}
.gate-art { display: block; }

/* --- Powłoka panelu ----------------------------------------------------- */
.app { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-w) 1fr; }
/* 2.2.2: nad panelem stoi wspólny pasek, więc przyklejone menu boczne (100vh) jest niższe niż kolumna;
   tło i kreska kolumny idą przez całą wysokość panelu. */
@media (min-width: 60.0625rem) {
  .app { background: linear-gradient(90deg, var(--surface) calc(var(--sidebar-w) - 1px), var(--rule) 0 var(--sidebar-w), transparent 0); }
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--rule);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-head { padding: 1rem 1.125rem .875rem; border-bottom: 1px solid var(--rule-soft); }
.sidebar-nav { padding: .75rem .625rem; display: flex; flex-direction: column; gap: .0625rem; flex: 1; }
.sidebar-group { margin-top: .875rem; }
.sidebar-group:first-child { margin-top: 0; }
.sidebar-group > .label-cap { padding: 0 .5rem .375rem; display: block; }

.sidebar-nav a {
  display: flex; align-items: center; gap: .5rem;
  padding: .45rem .55rem; border-radius: var(--r-md);
  color: var(--ink-2); font-size: .875rem; font-weight: 550;
  transition: background var(--step), color var(--step);
}
.sidebar-nav a:hover { background: var(--surface-sunk); color: var(--ink); text-decoration: none; }
.sidebar-nav a[aria-current="page"] {
  background: var(--accent-soft); color: var(--accent); font-weight: 650;
  box-shadow: inset 2px 0 0 var(--accent);
}
.sidebar-nav a .ic { opacity: .75; transition: opacity var(--step); }
.sidebar-nav a:hover .ic { opacity: 1; }
.sidebar-nav a[aria-current="page"] .ic { opacity: 1; }
.sidebar-foot { padding: .75rem; border-top: 1px solid var(--rule-soft); }

.app-main { min-width: 0; display: flex; flex-direction: column; }
.app-bar {
  position: sticky; top: 0; z-index: 20;
  min-height: var(--topbar-h);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
  padding: .625rem clamp(1rem, 2.5vw, 1.75rem);
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.app-bar-tytul { font-family: var(--display); font-size: 1rem; font-weight: 700; }
.app-body { padding: clamp(1.25rem, 2.5vw, 2rem) clamp(1rem, 2.5vw, 1.75rem) 4rem; }
.app-body > * + * { margin-top: 1.5rem; }

@media (max-width: 60rem) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: static; height: auto; border-right: 0;
    border-bottom: 1px solid var(--rule);
  }
  .sidebar-nav { flex-direction: row; flex-wrap: wrap; }
  .sidebar-group { margin-top: 0; }
  .sidebar-group > .label-cap { display: none; }
  .sidebar-nav a[aria-current="page"] { box-shadow: none; }
}

/* --- Nagłówek sekcji ----------------------------------------------------- */
.page-head { display: flex; flex-direction: column; gap: .5rem; margin-bottom: .5rem; }
.page-head .lede { color: var(--ink-2); max-width: 62ch; font-size: 1rem; }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  padding-bottom: .5rem; border-bottom: 1px solid var(--rule);
  margin-bottom: 1rem;
}

/* --- Karty --------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: clamp(1rem, 2vw, 1.375rem);
}
.card-flush { padding: 0; overflow: hidden; }
.card-sunk { background: var(--surface-sunk); }
.card-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: .75rem; flex-wrap: wrap; margin-bottom: .875rem;
}
.card-title { font-family: var(--display); font-size: 1rem; font-weight: 700; letter-spacing: -.012em; }
.card-foot { margin-top: 1rem; padding-top: .875rem; border-top: 1px solid var(--rule-soft); }

.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
.grid-sidebar { grid-template-columns: minmax(0, 1fr) 19rem; align-items: start; }
@media (max-width: 64rem) { .grid-sidebar { grid-template-columns: 1fr; } }

/* Karta-odnośnik do narzędzia */
.tool-card {
  display: flex; flex-direction: column; gap: .5rem;
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--r-lg); padding: 1.125rem;
  color: var(--ink);
  transition: border-color var(--step), box-shadow var(--step), transform var(--step);
}
.tool-card:hover {
  text-decoration: none; border-color: var(--accent-line);
  box-shadow: var(--shadow-md); transform: translateY(-1px);
}
.tool-card .ico {
  width: 2.25rem; height: 2.25rem; border-radius: var(--r-md);
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
  margin-bottom: .25rem;
  transition: background var(--step), color var(--step);
}
.tool-card:hover .ico { background: var(--accent); color: var(--accent-ink); }
.tool-card h3 { font-size: 1rem; }
.tool-card p { color: var(--muted); font-size: .875rem; line-height: 1.55; }
.tool-card .more {
  margin-top: auto; padding-top: .5rem;
  color: var(--accent); font-size: .8125rem; font-weight: 650;
}

/* --- Przyciski ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .5rem .9rem; min-height: 2.25rem;
  border: 1px solid transparent; border-radius: var(--r-md);
  background: var(--accent); color: var(--accent-ink);
  font-family: inherit; font-size: .875rem; font-weight: 650; line-height: 1;
  cursor: pointer; text-align: center;
  transition: background var(--step), border-color var(--step), color var(--step);
}
.btn:hover { background: var(--accent-hover); text-decoration: none; color: var(--accent-ink); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--rule-strong); }
.btn-ghost:hover { background: var(--surface-sunk); color: var(--ink); border-color: var(--rule-strong); }

.btn-quiet { background: transparent; color: var(--ink-2); border-color: transparent; }
.btn-quiet:hover { background: var(--surface-sunk); color: var(--ink); }

.btn-danger { background: var(--crit); color: #fff; }
.btn-danger:hover { background: var(--crit); filter: brightness(.92); color: #fff; }

.btn-sm { padding: .3rem .6rem; min-height: 1.85rem; font-size: .8125rem; }
/* Przycisk zawierający wyłącznie ikonę — kwadratowy, bez nadmiarowego światła. */
.btn-icon { padding: .35rem; min-width: 2.25rem; }
.btn-icon.btn-sm { padding: .3rem; min-width: 1.85rem; }
.btn-lg { padding: .65rem 1.2rem; min-height: 2.6rem; font-size: .95rem; }
.btn-block { width: 100%; }

.btn-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

/* --- Formularze ---------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.field > label, .field-label {
  font-size: .8125rem; font-weight: 650; color: var(--ink-2);
}
.field .hint { font-size: .75rem; color: var(--muted); line-height: 1.45; }
.field .err { font-size: .75rem; color: var(--crit); font-weight: 600; }

input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="search"], input[type="date"], input[type="url"], select, textarea {
  width: 100%; min-width: 0;
  padding: .48rem .6rem; min-height: 2.25rem;
  background: var(--surface);
  border: 1px solid var(--rule-strong); border-radius: var(--r-md);
  color: var(--ink); font-family: inherit; font-size: .875rem; line-height: 1.4;
  transition: border-color var(--step), box-shadow var(--step);
}
input:hover, select:hover, textarea:hover { border-color: var(--accent-line); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type="number"] { font-variant-numeric: tabular-nums; }
textarea { min-height: 5rem; resize: vertical; line-height: 1.55; }

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 49%, var(--muted) 50%),
                    linear-gradient(-45deg, transparent 49%, var(--muted) 50%);
  background-position: calc(100% - 1rem) 55%, calc(100% - .6rem) 55%;
  background-size: .3rem .3rem; background-repeat: no-repeat;
  padding-right: 2rem;
}

.form-grid { display: grid; gap: .875rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.form-grid-2 { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.form-actions {
  display: flex; gap: .5rem; flex-wrap: wrap; align-items: center;
  margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--rule-soft);
}

fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; font-size: .8125rem; font-weight: 650; color: var(--ink-2); margin-bottom: .4rem; }

.check { display: flex; align-items: flex-start; gap: .5rem; cursor: pointer; }
.check input { width: 1rem; height: 1rem; min-height: 0; margin: .22rem 0 0; flex: none; accent-color: var(--accent); }
.check span { font-size: .875rem; color: var(--ink-2); }
.check-list { display: flex; flex-direction: column; gap: .5rem; }

/* Grupa wyboru w formie segmentów */
.segment { display: inline-flex; background: var(--surface-sunk); border: 1px solid var(--rule); border-radius: var(--r-md); padding: .1875rem; gap: .1875rem; flex-wrap: wrap; }
.segment label { position: relative; }
.segment input { position: absolute; opacity: 0; width: 0; height: 0; }
.segment span {
  display: block; padding: .3rem .65rem; border-radius: var(--r-sm);
  font-size: .8125rem; font-weight: 600; color: var(--muted); cursor: pointer;
  transition: background var(--step), color var(--step);
}
.segment input:checked + span { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm); }
.segment input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Skala 0–4 w ankiecie */
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: .3rem; }
.scale label { position: relative; }
.scale input { position: absolute; opacity: 0; width: 0; height: 0; }
.scale span {
  display: flex; flex-direction: column; align-items: center; gap: .1rem;
  padding: .45rem .3rem; border: 1px solid var(--rule); border-radius: var(--r-md);
  background: var(--surface); cursor: pointer; text-align: center;
  font-size: .75rem; font-weight: 600; color: var(--muted); line-height: 1.25;
  transition: border-color var(--step), background var(--step), color var(--step);
}
.scale span b { font-family: var(--mono); font-size: .9rem; font-weight: 700; }
.scale label:hover span { border-color: var(--accent-line); }
.scale input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.scale input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }

/* --- Tabele -------------------------------------------------------------- */
.table-wrap {
  border: 1px solid var(--rule); border-radius: var(--r-lg);
  background: var(--surface); overflow-x: auto;
}
table.data { border-collapse: collapse; width: 100%; font-size: .875rem; }
table.data caption {
  text-align: left; padding: .75rem 1rem; color: var(--muted); font-size: .8125rem;
  border-bottom: 1px solid var(--rule);
}
table.data th, table.data td {
  text-align: left; padding: .6rem .875rem;
  border-bottom: 1px solid var(--rule-soft); vertical-align: middle;
}
table.data thead th {
  font-family: var(--mono); font-size: .66rem; letter-spacing: .11em;
  text-transform: uppercase; color: var(--muted); font-weight: 600;
  background: var(--surface-sunk); border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 1;
}
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--surface-sunk); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data .row-actions { display: flex; gap: .3rem; justify-content: flex-end; }
table.data tr.is-eliminated { opacity: .62; }

/* Pierwsza kolumna przyklejona w szerokich tabelach porównania */
table.compare th.sticky-col, table.compare td.sticky-col {
  position: sticky; left: 0; z-index: 2;
  background: var(--surface); border-right: 1px solid var(--rule);
  min-width: 13rem;
}
table.compare thead th.sticky-col { z-index: 3; background: var(--surface-sunk); }
table.compare tbody tr:hover td.sticky-col { background: var(--surface-sunk); }
table.compare tbody tr.group-row td {
  background: var(--surface-sunk); font-family: var(--mono);
  font-size: .66rem; letter-spacing: .11em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}

/* --- Odznaki i chipy ----------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .15rem .45rem; border-radius: var(--r-sm);
  font-size: .6875rem; font-weight: 700; line-height: 1.4;
  letter-spacing: .02em; white-space: nowrap;
  border: 1px solid transparent;
}
/* Odznaka ze zdaniem, nie z jednym słowem. Domyślne `nowrap` w .badge trzyma
   krótkie etykiety w jednej linii, ale przy dłuższym tekście rozpycha kartę
   szerzej niż ekran telefonu — szerokość minimalna niełamanego napisu. */
.badge-wrap { white-space: normal; text-align: right; }
.badge-owner { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.badge-admin { background: var(--data-soft); color: var(--data); }
.badge-pro { background: var(--ok-soft); color: var(--ok); }
.badge-collab { background: var(--warn-soft); color: var(--warn); }
.badge-user { background: var(--surface-sunk); color: var(--muted); border-color: var(--rule); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-crit { background: var(--crit-soft); color: var(--crit); }
.badge-neutral { background: var(--surface-sunk); color: var(--muted); border-color: var(--rule); }

.chip {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .2rem .5rem; border-radius: 999px;
  background: var(--surface-sunk); border: 1px solid var(--rule);
  font-size: .75rem; color: var(--ink-2); font-weight: 550;
}
.chip-mono { font-family: var(--mono); font-size: .7rem; }

.dot { width: .5rem; height: .5rem; border-radius: 50%; flex: none; }
.dot-ok { background: var(--ok); } .dot-warn { background: var(--warn); } .dot-crit { background: var(--crit); }

/* --- Kafle liczbowe ------------------------------------------------------ */
.tile {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--r-lg); padding: .9rem 1rem;
  display: flex; flex-direction: column; gap: .15rem;
}
.tile .k { font-size: .75rem; font-weight: 650; color: var(--muted); }
.tile .v {
  font-family: var(--display); font-size: 1.6rem; font-weight: 700;
  letter-spacing: -.03em; line-height: 1.15; font-variant-numeric: tabular-nums;
}
.tile .s { font-size: .75rem; color: var(--faint); line-height: 1.4; }
.tile-accent { border-top: 2px solid var(--accent); }
.tile-accent .v { color: var(--accent); }
.tile-ok { border-top: 2px solid var(--ok); } .tile-ok .v { color: var(--ok); }
.tile-warn { border-top: 2px solid var(--warn); } .tile-warn .v { color: var(--warn); }
.tile-crit { border-top: 2px solid var(--crit); } .tile-crit .v { color: var(--crit); }

/* --- Miernik i pierścień wyniku ----------------------------------------- */
.meter { display: flex; flex-direction: column; gap: .3rem; }
.meter-track {
  height: .4rem; border-radius: 999px; background: var(--surface-sunk);
  border: 1px solid var(--rule-soft); overflow: hidden;
}
.meter-fill { height: 100%; border-radius: 999px; background: var(--accent); transition: width var(--step); }
.meter-fill.is-ok { background: var(--ok); }
.meter-fill.is-warn { background: var(--warn); }
.meter-fill.is-crit { background: var(--crit); }
.meter-legend { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); }

.ring { display: grid; place-items: center; position: relative; width: 8.5rem; height: 8.5rem; }
.ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.ring-track { fill: none; stroke: var(--surface-sunk); stroke-width: 9; }
.ring-fill { fill: none; stroke: var(--accent); stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset var(--step); }
.ring-fill.is-ok { stroke: var(--ok); } .ring-fill.is-warn { stroke: var(--warn); } .ring-fill.is-crit { stroke: var(--crit); }
.ring-label { position: absolute; text-align: center; line-height: 1.1; }
.ring-label b {
  display: block; font-family: var(--display); font-size: 1.9rem;
  font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums;
}
.ring-label span { font-size: .7rem; color: var(--muted); font-weight: 600; }

/* Poziomy oceny 0–4 jako pasek kropek — czytelne bez koloru */
.level { display: inline-flex; gap: .1875rem; align-items: center; }
.level i {
  width: .4rem; height: .9rem; border-radius: 1px;
  background: var(--rule); display: block;
}
.level i.on { background: var(--accent); }
.level-num { font-family: var(--mono); font-size: .75rem; color: var(--muted); margin-left: .2rem; }

/* --- Komunikaty ---------------------------------------------------------- */
.alert {
  display: flex; gap: .625rem; align-items: flex-start;
  padding: .75rem .875rem; border-radius: var(--r-md);
  border: 1px solid var(--rule); border-left-width: 3px;
  background: var(--surface); font-size: .875rem; line-height: 1.55;
}
.alert .ico { flex: none; font-size: 1rem; line-height: 1.3; }
.alert strong { display: block; margin-bottom: .1rem; }
.alert-ok { border-left-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.alert-warn { border-left-color: var(--warn); background: var(--warn-soft); color: var(--warn); }
.alert-crit { border-left-color: var(--crit); background: var(--crit-soft); color: var(--crit); }
.alert-info { border-left-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.alert-ok a, .alert-warn a, .alert-crit a, .alert-info a { color: inherit; text-decoration: underline; }

.flash-area { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.25rem; }

.empty {
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  padding: 2.5rem 1.5rem; text-align: center;
  border: 1px dashed var(--rule-strong); border-radius: var(--r-lg);
  background: var(--surface-sunk); color: var(--muted);
}
.empty .ico { font-size: 1.5rem; opacity: .6; }
.empty h3 { color: var(--ink); }
.empty p { max-width: 42ch; font-size: .875rem; }

/* Lista plików w podglądzie aktualizacji — zwinięta, bo bywa długa. */
.changes summary { cursor: pointer; font-size: .875rem; font-weight: 550; }
.changes ul {
  margin: .5rem 0 0; padding: .6rem .9rem .6rem 1.9rem; max-height: 15rem; overflow: auto;
  background: var(--surface-sunk); border-radius: var(--r-md, 8px);
}

/* --- Hero na stronie głównej -------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--surface); border-bottom: 1px solid var(--rule);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(var(--rule-soft) 1px, transparent 1px) 0 0 / 100% 3.5rem,
    linear-gradient(90deg, var(--rule-soft) 1px, transparent 1px) 0 0 / 3.5rem 100%;
  mask-image: radial-gradient(120% 90% at 82% 8%, #000 0%, transparent 72%);
  opacity: .85;
}
.hero-inner {
  position: relative; width: min(100% - 2.5rem, var(--fbw-szerokosc)); margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem);
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
}
@media (max-width: 62rem) { .hero-inner { grid-template-columns: 1fr; } }

.hero h1 { font-size: clamp(1.85rem, 4.6vw, 3rem); margin: .625rem 0 .875rem; }
.hero .lede { font-size: clamp(1rem, 1.6vw, 1.125rem); color: var(--ink-2); max-width: 46ch; line-height: 1.6; }
.hero-actions { display: flex; gap: .625rem; flex-wrap: wrap; margin-top: 1.5rem; }
.hero-facts {
  display: flex; gap: 1.75rem; flex-wrap: wrap; margin-top: 2rem;
  padding-top: 1.25rem; border-top: 1px solid var(--rule);
}
.hero-fact { display: flex; flex-direction: column; }
.hero-fact b {
  font-family: var(--display); font-size: 1.35rem; font-weight: 700;
  letter-spacing: -.03em; font-variant-numeric: tabular-nums;
}
.hero-fact span { font-size: .75rem; color: var(--muted); font-weight: 600; }

/* Ścieżka decyzyjna — 4 kroki jako diagram */
.path { display: flex; flex-direction: column; gap: .5rem; }
.path-step {
  display: grid; grid-template-columns: 2rem 1fr; gap: .75rem; align-items: start;
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--r-md); padding: .75rem .875rem;
  position: relative;
}
.path-step + .path-step::before {
  content: ""; position: absolute; left: 1.875rem; top: -.5rem; height: .5rem;
  border-left: 2px dotted var(--rule-strong);
}
.path-step .n {
  width: 2rem; height: 2rem; border-radius: var(--r-sm);
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
  font-family: var(--mono); font-size: .8rem; font-weight: 700;
}
.path-step h4 { font-size: .9rem; margin-bottom: .1rem; }
.path-step p { font-size: .8125rem; color: var(--muted); line-height: 1.5; }
.path-step.is-done .n { background: var(--ok-soft); color: var(--ok); }

/* --- Zakładki ----------------------------------------------------------- */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--rule); flex-wrap: wrap; }
.tabs a {
  padding: .5rem .75rem; margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  color: var(--muted); font-size: .875rem; font-weight: 600;
}
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }

/* --- Lista definicji ---------------------------------------------------- */
.dl { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; font-size: .875rem; }
.dl dt { color: var(--muted); font-size: .8125rem; }
.dl dd { margin: 0; color: var(--ink-2); }
@media (max-width: 34rem) { .dl { grid-template-columns: 1fr; gap: .1rem; } .dl dd { margin-bottom: .5rem; } }

/* --- Lista pozycji ------------------------------------------------------ */
.list { display: flex; flex-direction: column; }
.list-item {
  display: flex; gap: .875rem; align-items: center;
  padding: .75rem 0; border-bottom: 1px solid var(--rule-soft);
}
.list-item:last-child { border-bottom: 0; }
.list-item .body { flex: 1; min-width: 0; }
.list-item .body h4 { font-size: .9rem; margin-bottom: .1rem; }
.list-item .body p { font-size: .8125rem; color: var(--muted); }

/* Pytanie w ankiecie */
.question {
  padding: 1rem 0; border-bottom: 1px solid var(--rule-soft);
  display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 1rem 1.5rem; align-items: start;
}
.question:last-child { border-bottom: 0; }
@media (max-width: 56rem) { .question { grid-template-columns: 1fr; } }
.question .q-id { font-family: var(--mono); font-size: .7rem; color: var(--faint); font-weight: 600; }
.question .q-text { font-size: .95rem; font-weight: 550; color: var(--ink); line-height: 1.5; margin: .2rem 0 .3rem; }
.question .q-why { font-size: .8125rem; color: var(--muted); line-height: 1.5; }

/* --- Kalkulatory --------------------------------------------------------- */
/* Panel parametrów obok wyników — układ znany z programów obliczeniowych:
   po lewej to, co się zmienia, po prawej to, co z tego wychodzi. */
.calc-layout {
  display: grid;
  grid-template-columns: 20.5rem minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 66rem) { .calc-layout { grid-template-columns: 1fr; } }

.calc-panel { position: sticky; top: calc(var(--topbar-h) + 1rem); }
@media (max-width: 66rem) { .calc-panel { position: static; } }

.calc-basis {
  background: var(--surface-sunk);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent-line);
  border-radius: var(--r-md);
  padding: .7rem .9rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .9rem;
}
.calc-basis .label-cap { flex: none; }
.calc-basis p { color: var(--ink-2); flex: 1; min-width: 14rem; line-height: 1.5; }
.calc-basis-actions { display: flex; gap: .375rem; flex-wrap: wrap; margin-left: auto; }

/* Węższe kolumny wewnątrz panelu parametrów */
.form-grid-tight { grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: .75rem; }

/* Kafel z dłuższą liczbą — pełny stopień rozjeżdżałby siatkę */
.tile .v.v-sm { font-size: 1.15rem; letter-spacing: -.02em; }

table.data tbody tr.is-current { background: var(--accent-soft); }
table.data tbody tr.is-current:hover { background: var(--accent-soft); }

/* Wybór gotowego pasowania */
.preset-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: .375rem; }
.preset {
  display: flex; flex-direction: column; gap: .05rem;
  padding: .4rem .55rem; border-radius: var(--r-sm);
  border: 1px solid var(--rule); background: var(--surface);
  color: var(--ink-2); line-height: 1.3;
  transition: border-color var(--step), background var(--step);
}
.preset:hover { text-decoration: none; border-color: var(--accent-line); background: var(--surface-sunk); }
.preset b { font-size: .8125rem; color: var(--ink); }
.preset span { font-size: .6875rem; color: var(--muted); }
.preset.is-on { border-color: var(--accent); background: var(--accent-soft); }
.preset.is-on b { color: var(--accent); }

/* Położenie pól tolerancji wobec linii zerowej */
.zone { display: flex; flex-direction: column; gap: .5rem; }
.zone-row { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: .625rem; align-items: center; }
.zone-label { font-size: .8125rem; font-weight: 650; color: var(--ink-2); text-align: right; }
.zone-track {
  position: relative; height: 1.75rem;
  background: var(--surface-sunk);
  border: 1px solid var(--rule-soft); border-radius: var(--r-sm);
}
.zone-zero {
  position: absolute; left: 50%; top: -.15rem; bottom: -.15rem; width: 1px;
  background: var(--rule-strong);
}
.zone-bar {
  position: absolute; top: .3rem; bottom: .3rem;
  border-radius: 2px; min-width: 2px;
}
.zone-bar.is-hole { background: var(--accent); }
.zone-bar.is-shaft { background: var(--data); }
.zone-scale {
  display: flex; justify-content: space-between;
  padding-left: 4.125rem;
  font-family: var(--mono); font-size: .6875rem; color: var(--faint);
}

/* Rzuty modelu 3D */
.views { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
.view { margin: 0; display: flex; flex-direction: column; gap: .3rem; }
.view img {
  display: block; margin: 0 auto; max-width: 100%; height: auto;
  background: var(--surface-sunk);
  border: 1px solid var(--rule-soft); border-radius: var(--r-md);
}
.view.is-main { grid-column: 1 / -1; }
.view.is-main img { width: min(100%, 24rem); }
.view figcaption {
  text-align: center;
  font-family: var(--mono); font-size: .66rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); font-weight: 600;
}

input[type="file"] {
  width: 100%; padding: .4rem .5rem;
  background: var(--surface-sunk);
  border: 1px dashed var(--rule-strong); border-radius: var(--r-md);
  color: var(--ink-2); font-family: inherit; font-size: .8125rem;
}
input[type="file"]:hover { border-color: var(--accent-line); }
input[type="file"]::file-selector-button {
  margin-right: .625rem; padding: .3rem .6rem;
  border: 1px solid var(--rule-strong); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink-2);
  font-family: inherit; font-size: .8125rem; font-weight: 600; cursor: pointer;
}


/* --- Dodatki do Fusion: rysunki, ikony i wstążka ------------------------- */

/* Rysunek poglądowy. Kreska rysunku technicznego w tokenach motywu, więc
   ta sama grafika działa na jasnym i ciemnym tle bez drugiego kompletu plików. */
.art-wrap {
  background: var(--surface-sunk);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: .35rem;
}
.art { width: 100%; height: auto; }
.art-siatka { stroke: var(--rule-soft); }
.art-kresk { stroke: var(--ink-2); }
.art-cienka { stroke: var(--muted); }
.art-wymiar { stroke: var(--faint); }
.art-akcent { stroke: var(--accent); }
.art-wezly { fill: var(--accent); }
.art-wyroz { fill: var(--accent-soft); }
.art-wyroz-mocny { fill: var(--surface); }
.art-siatka-mes { stroke: var(--rule); }
.art-podzialowa { stroke: var(--faint); }
/* Mapa wytężenia lekko przygaszona — pełne nasycenie krzyczy obok reszty strony. */
.art-pas-1, .art-pas-2, .art-pas-3, .art-pas-4 { opacity: .88; }
.art-pas-1 { fill: var(--crit); } .art-pas-2 { fill: var(--warn); }
.art-pas-3 { fill: var(--ok); }   .art-pas-4 { fill: var(--data); }
.art-opis { fill: var(--muted); font-family: var(--mono); font-size: 10.5px; stroke: none; }
.art-srodek { text-anchor: middle; }
.art-mini { font-size: 8.5px; }

/* Ikony poleceń są prawdziwymi plikami dodatku: grafit na przezroczystym tle,
   rysowany pod jasną wstążkę Fusion. Dlatego siedzą na własnej jasnej podkładce
   w obu motywach — na ciemnym tle portalu grafit sam z siebie zszedłby do szumu. */
.znak {
  background: #f2f5f8; border: 1px solid #dde4ec;
  border-radius: var(--r-md); padding: .3rem;
  display: grid; place-items: center; flex: none;
}
.znak img { width: 2rem; height: 2rem; image-rendering: -webkit-optimize-contrast; }

.addins { display: grid; grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr)); gap: .75rem; }
.addin-tile {
  display: flex; gap: .7rem; align-items: center;
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--r-lg); padding: .8rem; color: var(--ink);
  transition: border-color var(--step), box-shadow var(--step), transform var(--step);
}
.addin-tile:hover {
  text-decoration: none; border-color: var(--accent-line);
  box-shadow: var(--shadow-md); transform: translateY(-1px);
}
.addin-tile b { font-size: .9rem; font-weight: 650; display: block; }
.addin-tile span { font-size: .75rem; color: var(--muted); display: block; line-height: 1.4; }

/* Podgląd panelu na wstążce MX-CAD. Panel jest jasny w obu motywach —
   pokazuje pasek narzędzi Fusion, a nie fragment tej strony. */
.wstazka {
  background: #f2f5f8; border: 1px solid #dde4ec;
  border-radius: var(--r-lg); padding: .5rem .6rem .35rem;
}
.wstazka-pasek {
  display: flex; align-items: center; gap: .5rem;
  padding-bottom: .4rem; margin-bottom: .4rem;
  border-bottom: 1px solid #dde4ec;
}
.wstazka-zakladka {
  font-family: var(--mono); font-size: .6875rem; letter-spacing: .1em;
  text-transform: uppercase; color: #0f5f96; font-weight: 700;
  border-bottom: 2px solid #0f5f96; padding: 0 .1rem .25rem;
}
.wstazka-panel { font-size: .6875rem; color: #6b7a89; }
.wstazka-polecenia { display: flex; flex-wrap: wrap; gap: .1rem; }

/* Pasek sześciu paneli: w Fusion nazwa panelu stoi pod jego poleceniami. */
.wstazka-grupy { display: flex; align-items: stretch; min-width: max-content; }
.wstazka-grupa {
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
  padding: .35rem .9rem .1rem; border-right: 1px solid #dde4ec;
}
.wstazka-grupa:last-child { border-right: 0; }
.wstazka-ikony { display: flex; gap: .45rem; }
.wstazka-ikony img { width: 1.625rem; height: 1.625rem; }
.wstazka-tytul { font-size: .65rem; color: #6b7a89; white-space: nowrap; }
.wstazka-polecenie {
  width: 5.4rem; padding: .35rem .2rem .3rem;
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
  border-radius: var(--r-md); text-align: center;
  font-size: .65rem; line-height: 1.25; color: #2e3945;
}
.wstazka-polecenie img { width: 1.75rem; height: 1.75rem; }
.wstazka-polecenie:hover { background: #e4ebf3; }

/* Granica między tym, co leży na wierzchu panelu, a tym, co Fusion chowa pod
   jego strzałką. Bez niej strona obiecywała sześć przycisków widocznych naraz,
   a widać trzy. */
.wstazka-strzalka {
  display: flex; align-items: center; gap: .3rem;
  margin: .45rem .2rem .1rem; padding-top: .4rem;
  border-top: 1px dashed #ccd6e0;
  font-size: .625rem; color: #8c949d;
}
.wstazka-strzalka svg { display: block; flex: none; }
.wstazka-schowane { opacity: .72; }

@media (max-width: 30rem) {
  .wstazka-polecenie { width: 4.6rem; font-size: .6rem; }
}

/* --- Wydruk ------------------------------------------------------------- */
@media print {
  :root { --ground: #fff; --surface: #fff; --surface-sunk: #fff; }
  .sidebar, .podmenu, .app-bar, .no-print, .btn { display: none !important; }
  .app { grid-template-columns: 1fr; }
  .app-body, .wrap { padding: 0; }
  .card, .table-wrap, .tile { border-color: #bbb; break-inside: avoid; }
  body { font-size: 11pt; }
  a { color: inherit; text-decoration: none; }
  /* Na papierze panel parametrów jest udokumentowaniem wyniku, nie formularzem. */
  .calc-layout { grid-template-columns: 1fr; }
  .calc-panel { position: static; }
  .calc-basis { border-left-color: #bbb; }
  .views { grid-template-columns: repeat(4, 1fr); }
  .view.is-main { grid-column: auto; }
  .view.is-main img { width: 100%; }
}
