/* ==========================================================================
   MX-CAD EngiSales — system designu
   Jeden arkusz dla warstwy publicznej i panelu. Wszystkie kolory pochodzą
   z tokenów, więc motyw jasny/ciemny nie wymaga duplikowania komponentów.
   ========================================================================== */

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

  --ground: #e9eef4;
  --surface: #ffffff;
  --surface-sunk: #f2f6fa;
  --surface-raised: #ffffff;

  --ink: #0a1620;
  --ink-2: #33475a;
  --muted: #5c6f7f;
  --faint: #8496a5;

  --rule: #d2dde7;
  --rule-soft: #e3ebf2;
  --rule-strong: #b9c8d6;

  --accent: #0f5f96;
  --accent-hover: #0c4f7e;
  --accent-ink: #ffffff;
  --accent-soft: #e2eef7;
  --accent-line: #b7d4e8;

  --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);

  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --display: "Segoe UI Variable Display", "Segoe UI Semibold", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --mono: "Cascadia Mono", "Cascadia Code", ui-monospace, Consolas, "SF Mono", Menlo, monospace;

  --r-sm: 4px;
  --r-md: 7px;
  --r-lg: 11px;
  --r-xl: 16px;

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

  --step: 180ms;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --ground: #070e14;
    --surface: #0f1a22;
    --surface-sunk: #0b141b;
    --surface-raised: #14212b;

    --ink: #e1ebf2;
    --ink-2: #b2c4d1;
    --muted: #8aa0af;
    --faint: #6b8090;

    --rule: #213240;
    --rule-soft: #182530;
    --rule-strong: #2e4453;

    --accent: #4fa8d8;
    --accent-hover: #6fbde7;
    --accent-ink: #04121c;
    --accent-soft: #102836;
    --accent-line: #1f4459;

    --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);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --ground: #070e14;
  --surface: #0f1a22;
  --surface-sunk: #0b141b;
  --surface-raised: #14212b;

  --ink: #e1ebf2;
  --ink-2: #b2c4d1;
  --muted: #8aa0af;
  --faint: #6b8090;

  --rule: #213240;
  --rule-soft: #182530;
  --rule-strong: #2e4453;

  --accent: #4fa8d8;
  --accent-hover: #6fbde7;
  --accent-ink: #04121c;
  --accent-soft: #102836;
  --accent-line: #1f4459;

  --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: 650;
  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; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--topbar-h);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
  display: flex; align-items: center;
}

.topbar-inner {
  width: 100%; max-width: 78rem; margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
  display: flex; align-items: center; gap: 1.25rem;
}

/* Poniżej tej szerokości menu nie mieści się w jednym wierszu. Pasek o stałej
   wysokości zostawiał je wtedy na wierzchu treści, więc tutaj rośnie razem z nim.
   Powyżej 64rem nic się nie zmienia — tam menu mieści się w jednym wierszu. */
@media (max-width: 64rem) {
  .topbar { height: auto; min-height: var(--topbar-h); }
  .topbar-inner { flex-wrap: wrap; padding-top: .5rem; padding-bottom: .5rem; }
  .nav { order: 3; width: 100%; }
  .nav.push { margin-left: 0; }
}

/* --- Sygnatura marki ----------------------------------------------------- */
.brand { display: flex; align-items: center; gap: .55rem; color: var(--ink); flex: none; }
.brand:hover { text-decoration: none; }
.brand:hover .brand-glyph-wrap { color: var(--accent-hover); }

.brand-glyph-wrap {
  display: grid; place-items: center; flex: none;
  color: var(--accent);
  transition: color var(--step);
}
.brand-glyph { display: block; }

.brand-text { display: flex; flex-direction: column; line-height: 1.12; min-width: 0; }
.brand-text strong {
  font-family: var(--display); font-size: .98rem; font-weight: 700;
  letter-spacing: -.026em; white-space: nowrap;
}
/* Dopełnienie nazwy — ten sam stopień, mniejsza waga i barwa akcentu. */
.brand-text strong em {
  font-style: normal; font-weight: 550; color: var(--accent);
  margin-left: .28em;
}
.brand-text > span {
  font-size: .6rem; text-transform: uppercase; letter-spacing: .13em;
  color: var(--muted); font-weight: 650;
}

/* --- 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); }

.main { flex: 1; width: 100%; }
.wrap {
  width: 100%; max-width: 78rem; margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 3vw, 2rem);
}
.wrap-narrow { max-width: 56rem; }
.wrap-tight { max-width: 34rem; }

.footer {
  border-top: 1px solid var(--rule);
  background: var(--surface);
  padding: 2rem clamp(1rem, 3vw, 2rem);
  color: var(--muted); font-size: .8125rem;
}
.footer-inner {
  max-width: 78rem; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between;
}
/* Bez sesji stopka nie ma czego prowadzić — wszystkie narzędzia są za bramą. */
.footer-slim { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.footer-slim .footer-inner { align-items: center; }
.footer-slim .sep { color: var(--rule-strong); }

/* --- Brama: pasek logowania i baner -------------------------------------- */
/* Bez sesji górna belka nie jest menu, tylko wejściem. Pola mają pełną
   wysokość formularza, a nie wzrost przycisków paska: pasek z polami
   ściśniętymi do rozmiaru guzika czyta się jak wyszukiwarka i nikt nie
   próbuje się w nim logować. */
.topbar-gate { height: auto; min-height: var(--topbar-h); }
.topbar-gate .topbar-inner { padding-top: .55rem; padding-bottom: .55rem; gap: 1rem; }

.login-bar { display: flex; align-items: flex-end; gap: .5rem; flex-wrap: wrap; }
.login-bar .field { gap: .2rem; }
.login-bar > .field > label {
  font-size: .625rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}
.login-bar input { min-width: 12.5rem; }
/* Równo z dolną krawędzią pól — przycisk i pole mają tę samą wysokość. */
.login-bar .btn { min-height: 2.25rem; }

/* Na wąskim ekranie formularz schodzi do własnego wiersza pod znakiem marki,
   a belka przestaje być przyklejona — pasek z dwoma polami i przyciskiem
   zabierałby jedną trzecią widoku telefonu przez cały czas czytania. */
@media (max-width: 60rem) {
  .topbar-gate { position: static; }
  .topbar-gate .topbar-inner { flex-wrap: wrap; }
  .topbar-gate .login-bar { order: 3; width: 100%; margin-left: 0; }
  .topbar-gate .login-bar .field { flex: 1 1 11rem; }
  .topbar-gate .login-bar input { min-width: 0; }
  .topbar-gate .login-bar-obok { order: 2; margin-left: auto; }
}

/* Na telefonie oba pola i przycisk idą w słupek, każde na pełną szerokość.
   Poniżej tej granicy dwa pola obok siebie mają po ~9 znaków widocznych —
   adres e-mail przewija się w polu i nie da się go wzrokiem sprawdzić. */
@media (max-width: 34rem) {
  .topbar-gate .login-bar { gap: .45rem; }
  .topbar-gate .login-bar .field { flex: 1 1 100%; }
  .topbar-gate .login-bar .btn { width: 100%; margin-top: .15rem; }
}

/* Ekran za paskiem logowania: 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; }

.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 1rem .75rem; 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-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: 650; 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; }

/* --- 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; max-width: 78rem; margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 3vw, 2rem) 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, .topbar, .app-bar, .footer, .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%; }
}
