/* Every family in its whole weight range, one variable file each, subsetted to
   the Latin range the site uses (about 220 glyphs incl. Λ and €, plus ł and → in all but Space Grotesk,
   and „ − ≈ in Inter Display and JetBrains Mono: Space Grotesk takes those from Inter; ▾ only JetBrains Mono has):
   Inter Display (Inter 4.1, rsms, pinned to its display optical size) 100 to
   900 with its tabular figures, 37 KB; Space Grotesk 300 to 700, 22 KB (it has
   no Λ of its own, so its V turned upside down was added as one: VΛIN in a
   heading keeps one height, not Inter's taller Λ; re-add it if the file is cut again);
   JetBrains Mono 100 to 800 without its coding ligatures and hinting, 20 KB.
   Self-hosted instead of a render-blocking Google Fonts @import. */
@font-face { font-family: 'Inter Display'; src: url('img/fonts/inter-display.woff2') format('woff2'); font-style: normal; font-weight: 100 900; font-display: block; }
@font-face { font-family: 'Space Grotesk'; src: url('img/fonts/space-grotesk.woff2') format('woff2'); font-style: normal; font-weight: 300 700; font-display: block; }
@font-face { font-family: 'JetBrains Mono'; src: url('img/fonts/jetbrains-mono.woff2') format('woff2'); font-style: normal; font-weight: 100 800; font-display: block; }
/* Polish letters (ą ć ę ł ń ś ź ż) for the Polish pages, cut from the same
   variable fonts: about 11 KB together, fetched only by a page that uses one
   of them. Defined last, so they win for these letters; the same weight range
   as the Latin file, or the browser keeps the two apart and falls back to a
   system font. */
@font-face { font-family: 'Inter Display'; src: url('img/fonts/inter-display-pl.woff2') format('woff2'); font-style: normal; font-weight: 100 900; font-display: block; unicode-range: U+0104-0107, U+0118-0119, U+0141-0144, U+015A-015B, U+0179-017C; }
@font-face { font-family: 'Space Grotesk'; src: url('img/fonts/space-grotesk-pl.woff2') format('woff2'); font-style: normal; font-weight: 300 700; font-display: block; unicode-range: U+0104-0107, U+0118-0119, U+0141-0144, U+015A-015B, U+0179-017C; }
@font-face { font-family: 'JetBrains Mono'; src: url('img/fonts/jetbrains-mono-pl.woff2') format('woff2'); font-style: normal; font-weight: 100 800; font-display: block; unicode-range: U+0104-0107, U+0118-0119, U+0141-0144, U+015A-015B, U+0179-017C; }

:root {
  --bg: #060608;
  --bg2: #0a0a0d;
  --surface: #101014;
  --border: #1c1c22;
  --border-bright: #26262e;
  --text: #c0c0cc;
  --text-dim: #a0a0b4;
  --text-bright: #eeeef2;
  --blue-bright: #3b82f6;
  --font-display: 'Space Grotesk', 'Inter Display', sans-serif;

  /* MOTION. One personality for the whole site: decisive, not bouncy. The
     expo-out curve carries ~80% of all motion; overshoot is kept for press
     release and the few "done" moments, never for content.
     Entrances ease out, exits ease in and run ~65% as long, things already
     on screen ease in-out. Loops are linear (rotation) or sine (breathing). */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.5, 0, 0.75, 0);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-hover: 90ms;   /* pointer enters: must feel instant */
  --dur-quick: 140ms;  /* press, exits of small things */
  --dur-base: 220ms;   /* hover exit, state changes */
  --dur-reveal: 520ms; /* content entering the viewport */
  /* Hover is asymmetric: fast in, slower out. Transitions read --t, and it
     drops to --dur-hover while an interactive element is under the pointer. */
  --t: var(--dur-base);
}
:is(a, button, summary):hover { --t: var(--dur-hover); }

/* Page changes: the old page leaves quickly, the new one settles in a beat
   later, and the nav holds still. Browsers without cross-document view
   transitions just load the page. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: vt-out 160ms var(--ease-in) both; }
  ::view-transition-new(root) { animation: vt-in 380ms var(--ease-out) 60ms both; }
}
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; translate: 0 10px; } }
body > nav { view-transition-name: site-nav; }

/* Rotating conic border for the card a page wants to point at. shared.js puts a
   ring in each .orbit card: the ring is masked to the card's 1px edge and a
   conic gradient spins inside it on transform alone, so the compositor turns it
   without restyling the card every frame (animating the gradient's angle did,
   and kept a phone's main thread busy even with the card off screen). The
   spinning square is sized to the card's diagonal so it always reaches the
   corners. The card needs position: relative, a border-radius and a 1px border:
   the ring lies on that border, so both follow the same curve at the corners
   (a ring inside the border bent tighter than it and stair-stepped there). */
.orbit-ring {
  position: absolute;
  inset: -1px;
  z-index: 4;
  padding: 1px;
  border-radius: inherit;
  /* The mask hides the spinning square but does not clip it from layout: without
     this it overhung the page and phones laid the page out wider than the screen. */
  overflow: hidden;
  pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.orbit-ring > i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--sweep, 200%);
  aspect-ratio: 1;
  translate: -50% -50%;
  background: conic-gradient(
    transparent 0deg,
    transparent 245deg,
    rgba(59,130,246,0.18) 278deg,
    rgba(96,165,250,0.95) 312deg,
    rgba(59,130,246,0.12) 342deg,
    transparent 360deg
  );
  animation: orbit-spin 5.5s linear infinite;
}
@keyframes orbit-spin { to { rotate: 360deg; } }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:focus-visible {
  outline: 2px solid var(--blue-bright);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: -100px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--surface);
  color: var(--text-bright);
  border: 1px solid var(--border-bright);
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform var(--dur-quick) var(--ease-in);
}
.skip-link:focus { transform: translateY(112px); transition: transform var(--dur-base) var(--ease-out); }
/* Fixed 60px nav would otherwise cover the jump target. */
main { scroll-margin-top: 72px; }
section[id] { scroll-margin-top: 60px; }

html {
  scrollbar-gutter: stable; /* prevents layout shift when scrollbar appears/disappears */
  scrollbar-color: var(--border-bright) var(--bg);
  accent-color: var(--blue-bright);
}
::selection { background: rgba(59,130,246,0.35); color: var(--text-bright); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter Display', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
/* No widows: headings break into even lines, and the last line of a paragraph never
   holds one word alone (browsers without text-wrap wrap as before). The one-letter
   words and numbers stay with the next word through shared.js (tie). */
h1, h2, h3, h4 { text-wrap: balance; }
p, li, dd, dt, figcaption, summary, blockquote { text-wrap: pretty; }

/* Starfield: four tiles of stars drawn once by shared.js, drifting up at four
   speeds (parallax) and twinkling out of step. Only transform and
   opacity move, so the compositor runs it and the main thread stays idle; the
   old canvas redrew every star every frame. */
.starfield { opacity: 0.6; position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.starfield i {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: calc(100% + var(--tile));
  background-image: var(--stars);
  background-size: var(--tile) var(--tile);
}
@media (prefers-reduced-motion: no-preference) {
  .starfield i { will-change: transform; animation: star-drift var(--drift) linear infinite, star-twinkle var(--twinkle) ease-in-out infinite alternate; }
}
@keyframes star-drift { to { transform: translateY(calc(-1 * var(--tile))); } }
@keyframes star-twinkle { to { opacity: 0.5; } }

/* NAV – 3-column grid so links are always truly centered.
   body > nav, not nav: the guide section tabs are a <nav> too and picked up
   this height and padding. */
body > nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  column-gap: 16px;
  align-items: center;
  padding: 0 40px;
  height: 60px;
  background: rgba(6,6,8,0.72);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
/* The Boost mark (the favicon) and the drawn VΛIN wordmark; phones keep the mark only. */
.nav-logo {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 11px;
  border-radius: 10px;
}
.nav-logo img { display: block; }
/* The links sit in a glass capsule, the active one under a glass lens. */
.nav-links {
  position: relative;
  display: flex;
  gap: 2px;
  list-style: none;
  align-items: center;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  /* It is a popover (the phone menu); this keeps the UA's overflow: auto off
     the row, where it clipped the lens's shadow. */
  overflow: visible;
}
/* Phones only: opens the link row as a menu (see the 600px step below). */
.nav-burger { display: none; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 10px; background: none; color: var(--text); cursor: pointer; transition: color var(--t) var(--ease-out); }
.nav-burger:hover { color: var(--text-bright); }
.nav-burger .burger-close, body:has(.nav-links:popover-open) .nav-burger .burger-open { display: none; }
body:has(.nav-links:popover-open) .nav-burger .burger-close { display: inline; }

/* LIQUID GLASS INDICATOR. One glass lens behind a row of links (the header
   nav, a guide's section bar) that glides to the active link. shared.js sets
   only its two edges, --x1 and --x2. They are registered so they animate, and
   the leading edge travels faster than the trailing one, so the lens stretches
   toward where it is going and settles as it lands, squashing a touch on the
   way, like Apple's liquid glass tabs. */
@property --x1 { syntax: '<length>'; inherits: true; initial-value: 0px; }
@property --x2 { syntax: '<length>'; inherits: true; initial-value: 0px; }
.nav-links::before, .guide-toc::before, .bench-tabs::before {
  content: '';
  position: absolute;
  z-index: 0;
  left: var(--x1);
  width: calc(var(--x2) - var(--x1));
  opacity: 0;
  pointer-events: none;
  border: 1px solid rgba(255,255,255,0.09);
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.015) 55%, rgba(255,255,255,0.035));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), inset 0 -1px 0 rgba(255,255,255,0.04), 0 6px 16px rgba(0,0,0,0.35);
  -webkit-backdrop-filter: blur(8px) saturate(180%);
  backdrop-filter: blur(8px) saturate(180%);
  transition: scale 280ms var(--ease-out), opacity var(--dur-base) var(--ease-out);
}
.nav-links::before, .bench-tabs::before { top: 4px; bottom: 4px; border-radius: 999px; }
.nav-links.has-indicator::before, .guide-toc.has-indicator::before, .bench-tabs.has-indicator::before { opacity: 1; }
.nav-links.is-sliding, .guide-toc.is-sliding, .bench-tabs.is-sliding { transition: --x1 520ms var(--ease-out), --x2 280ms var(--ease-out); }
.nav-links.is-sliding.to-left, .guide-toc.is-sliding.to-left, .bench-tabs.is-sliding.to-left { transition: --x1 280ms var(--ease-out), --x2 520ms var(--ease-out); }
.nav-links.is-moving::before, .guide-toc.is-moving::before, .bench-tabs.is-moving::before { scale: 1 0.86; }
/* A row scrolled sideways on a phone fades the edges that hide more items (set in shared.js). */
:is(.nav-links, .bench-tabs):is(.more-start, .more-end) {
  --fade-start: 0px;
  --fade-end: 0px;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--fade-start), #000 calc(100% - var(--fade-end)), transparent);
  mask-image: linear-gradient(to right, transparent, #000 var(--fade-start), #000 calc(100% - var(--fade-end)), transparent);
}
:is(.nav-links, .bench-tabs).more-start { --fade-start: 28px; }
:is(.nav-links, .bench-tabs).more-end { --fade-end: 28px; }
/* The capsule itself, for tab rows outside the header (the nav has its own above). */
.bench-tabs {
  position: relative;
  display: flex;
  gap: 2px;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 16px;
  padding: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  border-radius: 999px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.bench-tabs::-webkit-scrollbar { display: none; }
/* The same capsule as a list of choices (the playbook's tools, the pages that
   show one screenshot at a time). On a wide screen it runs downwards beside
   the picture, each name with a line under it, and the lens travels up and
   down between --y1 and --y2. On a phone it stays the row above the picture:
   names only, scrolling sideways like the games' tabs. */
@property --y1 { syntax: '<length>'; inherits: true; initial-value: 0px; }
@property --y2 { syntax: '<length>'; inherits: true; initial-value: 0px; }
.pbx-tabs { margin: 0; }
.pbx-tab { position: relative; z-index: 1; flex: none; padding: 7px 15px; font: inherit; font-size: 0.92rem; font-weight: 600; white-space: nowrap; color: var(--text-dim); background: none; border: 0; border-radius: 999px; cursor: pointer; transition: color var(--t) var(--ease-out), background-color var(--t) var(--ease-out); }
.pbx-tab b { font-weight: inherit; transition: color var(--t) var(--ease-out); }
.pbx-tab span { display: none; }
.pbx-tab:hover { color: var(--text-bright); background: rgba(255,255,255,0.05); }
.pbx-tab[aria-selected="true"] { color: var(--blue-bright); background: none; cursor: default; }
/* The tab chosen as the page opens (tools.html#governor) is blue at once, like the lens that jumps there. */
.pbx-tabs:not(.is-sliding) :is(.pbx-tab, .pbx-tab b) { transition: none; }
@media (pointer: coarse) { .pbx-tab { padding-block: 11px; } }
@media (min-width: 901px) {
  .pbx-tabs { flex-direction: column; gap: 2px; width: auto; padding: 6px; overflow: visible; border-radius: 22px; }
  .pbx-tabs::before { top: var(--y1); bottom: auto; left: 6px; right: 6px; width: auto; height: calc(var(--y2) - var(--y1)); border-radius: 16px; }
  .pbx-tab { display: grid; gap: 4px; padding: 15px 18px 16px; text-align: left; font-size: inherit; font-weight: inherit; white-space: normal; border-radius: 16px; }
  .pbx-tab b { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; color: var(--text-bright); }
  .pbx-tab span { display: block; font-size: 0.9rem; line-height: 1.6; }
  .pbx-tab:hover { color: var(--text-dim); background: rgba(255,255,255,0.04); }
  .pbx-tab[aria-selected="true"] { color: var(--text); background: none; }
  .pbx-tab[aria-selected="true"] b { color: var(--blue-bright); }
}
@media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
  .pbx-tabs.is-sliding { transition: --y1 520ms var(--ease-out), --y2 280ms var(--ease-out); }
  .pbx-tabs.is-sliding.to-left { transition: --y1 280ms var(--ease-out), --y2 520ms var(--ease-out); }
  .pbx-tabs.is-moving::before { scale: 0.985 1; }
  /* While the lens travels, a tab the pointer passes gets no shade of its own over it. */
  .pbx-tabs.is-gliding .pbx-tab:hover { background: none; }
}
.nav-links.has-indicator a.active { background: transparent; }
.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-dim);
  text-decoration: none;
  padding: 5px 12px;
  border-radius: 999px;
  position: relative;
  z-index: 1;
  transition: color var(--t) var(--ease-out), background-color var(--t) var(--ease-out);
}
.nav-links a:hover { color: var(--text-bright); background: rgba(255,255,255,0.05); }
/* The active link takes the site blue; the lens behind it stays faint. */
.nav-links a.active { color: var(--blue-bright); background: rgba(255,255,255,0.07); }
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: flex-end;
}
/* The one action in the bar. On phones the floating button takes over. */
.nav-cta {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  background: linear-gradient(#2f6fec, #1f5bd8);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}
.nav-cta:hover { background: linear-gradient(#2d6bec, #2563eb); }
@media (min-width: 1001px) {
  body:has(.nav-cta) .book-float { display: none; }
}
/* Donate and Discord: the size of the nav links; the booking action floats at
   the bottom instead. */
.nav-discord, .nav-donate {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: color var(--t) var(--ease-out);
}
.nav-discord svg, .nav-donate svg { width: 17px; height: 17px; }
.nav-discord:hover, .nav-donate:hover { color: var(--text-bright); }
.nav-donate-heart { color: var(--blue-bright); transition: scale var(--t) var(--ease-back); }
.nav-donate:hover .nav-donate-heart { scale: 1.18; }
/* Floating Book a session. Solid, since it sits over content. shared.js keeps it
   hidden at the top of the page (the hero has its own action) and over the footer. */
.book-float {
  position: fixed;
  right: 24px;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(#2f6fec, #1f5bd8);
  border: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 12px 32px rgba(0,0,0,0.55), 0 2px 6px rgba(0,0,0,0.4);
  /* Arrives (340ms, decelerating) slower than it leaves (200ms, accelerating). */
  transition: opacity 340ms var(--ease-out), transform 340ms var(--ease-out), scale var(--dur-base) var(--ease-back), visibility 0s;
}
.book-float:hover { background: linear-gradient(#2d6bec, #2563eb); }
.book-float:active { scale: 0.97; transition-duration: 340ms, 340ms, 60ms, 0s; }
.book-float svg { transition: translate var(--t) var(--ease-out); }
.book-float:hover svg { translate: 3px 0; }
.book-float.is-hidden {
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  visibility: hidden;
  transition: opacity 200ms var(--ease-in), transform 200ms var(--ease-in), visibility 0s 200ms;
}
/* Guides: the way back to the playbook, pinned to the bottom centre so it is
   there at any depth. Dark glass with a blue rim, a step quieter than the
   solid blue booking pill. It takes no room in the page: when the footer
   comes up under it, shared.js lifts it (--lift) to ride just above the
   footer's line, so it never covers the last links and never goes away. */
.guide-float {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 90;
  translate: -50% calc(-1 * var(--lift, 0px));
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px 12px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #dbeafe;
  text-decoration: none;
  white-space: nowrap;
  background: rgba(16,16,20,0.78);
  border: 1px solid rgba(96,165,250,0.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 12px 32px rgba(0,0,0,0.55);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: background-color var(--t) var(--ease-out), border-color var(--t) var(--ease-out), scale var(--dur-base) var(--ease-back);
}
.guide-float:hover { background: rgba(30,58,138,0.6); border-color: rgba(147,197,253,0.6); }
.guide-float:active { scale: 0.97; }
.guide-float svg { color: var(--blue-bright); transition: translate var(--t) var(--ease-out); }
.guide-float:hover svg { translate: -3px 0; }

/* Currency switch: the new figure drops in from above, so the change is seen,
   not just swapped. shared.js adds the class, only on a user switch. */
.price-swap { animation: price-swap var(--dur-base) var(--ease-out); }
@keyframes price-swap { from { opacity: 0; translate: 0 -6px; } }
.price-unit {
  font-size: 0.62em;
  font-weight: 500;
  letter-spacing: 0;
}

/* Language and currency (every page): one capsule in the bar, "PL · PLN", and a
   small menu under it with both choices, the chosen ones ticked (shared.js
   places it under the button). */
.nav-region {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 6px 12px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 999px;
  background: rgba(255,255,255,0.035);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: color var(--t) var(--ease-out), background-color var(--t) var(--ease-out);
}
.nav-region:hover, .nav-region:has(+ :popover-open) { color: var(--text-bright); background-color: rgba(255,255,255,0.06); }
.nav-region > span[aria-hidden], .nav-region svg { color: var(--text-dim); }
.nav-region svg { transition: rotate var(--t) var(--ease-out); }
.nav-region:has(+ :popover-open) svg { rotate: 180deg; }
.nav-region-menu {
  position: fixed;
  inset: var(--top, 68px) var(--right, 12px) auto auto;
  margin: 0;
  min-width: 200px;
  padding: 6px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background: rgba(10,10,13,0.94);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 20px 48px rgba(0,0,0,0.6);
  color: var(--text);
}
@media (prefers-reduced-motion: no-preference) {
  .nav-region-menu { transition: opacity 140ms var(--ease-in), translate 140ms var(--ease-in), overlay 140ms allow-discrete, display 140ms allow-discrete; }
  .nav-region-menu:popover-open { transition-duration: 220ms; transition-timing-function: var(--ease-out); }
  .nav-region-menu:not(:popover-open) { opacity: 0; translate: 0 -6px; }
  @starting-style { .nav-region-menu:popover-open { opacity: 0; translate: 0 -6px; } }
}
.nav-region-menu [role="group"] + [role="group"], .nav-region-note { margin-top: 4px; padding-top: 4px; border-top: 1px solid rgba(255,255,255,0.06); }
.nav-region-label { padding: 6px 10px 4px; font-size: 0.75rem; font-weight: 500; color: var(--text-dim); }
.nav-region-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--t) var(--ease-out), color var(--t) var(--ease-out);
}
.nav-region-item:hover { background: rgba(255,255,255,0.05); color: var(--text-bright); }
.nav-region-item:is([aria-current], [aria-pressed="true"]) { color: var(--text-bright); }
.nav-region-item[aria-current] { cursor: default; background: none; }
.nav-region-item:is([aria-current], [aria-pressed="true"])::after {
  content: '';
  flex: none;
  width: 14px;
  height: 14px;
  background: var(--blue-bright);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.nav-region-note { padding: 8px 10px 4px; font-size: 0.75rem; color: var(--text-dim); }

/* On touch screens the liquid rows' items grow toward a 40px target. */
@media (pointer: coarse) {
  .nav-links a { padding-block: 9px; }
  .nav-region { padding-block: 9px; }
}

/* BUTTONS */
.btn {
  font-family: 'Inter Display', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  padding: 9px 20px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  border: none;
  /* Named properties, not 'all'. The press rides on `scale` so it stacks with
     the hover lift on `transform`. */
  transition: color var(--t) var(--ease-out), background-color var(--t) var(--ease-out), border-color var(--t) var(--ease-out), box-shadow var(--t) var(--ease-out), transform var(--t) var(--ease-out), scale var(--dur-base) var(--ease-back);
  white-space: nowrap;
}
/* Press: dip 3% fast, release with a small spring back. */
.btn:active { scale: 0.97; transition-duration: var(--t), var(--t), var(--t), var(--t), var(--t), 60ms; }
.btn-primary {
  background: linear-gradient(to bottom, #111113, #0a0a0c);
  color: #e8eaed;
  border: 1px solid #2a2a30;
  box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset;
}
.btn-primary:hover {
  background: linear-gradient(to bottom, #1a1a1e, #111114);
  border-color: #38383f;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.6), 0 1px 0 rgba(255,255,255,0.05) inset;
}
.btn-secondary {
  background: var(--surface);
  color: var(--text-bright);
  border: 1px solid var(--border-bright);
}
.btn-secondary:hover {
  background: #16161c;
  border-color: #3a3a46;
  transform: translateY(-1px);
}
/* Tinted blue, the same treatment as the nav Donate button. The one "primary"
   action on a page uses this; btn-primary is the quiet dark default. */
.btn-accent {
  color: #93c5fd;
  background: rgba(59,130,246,0.07);
  border: 1px solid rgba(59,130,246,0.2);
}
.btn-accent:hover {
  color: #dbeafe;
  background: rgba(59,130,246,0.12);
  border-color: rgba(59,130,246,0.34);
  transform: translateY(-1px);
}
.btn-accent svg { color: var(--blue-bright); }
/* Booking: the site's one solid blue, the same in the hero, on the featured
   package and on the floating pill. Stronger than btn-accent, so a page's paid
   action outranks its download. Both stops keep white text above 4.5:1. */
.btn-book {
  color: #fff;
  background: linear-gradient(#2f6fec, #1f5bd8);
  border: 1px solid transparent;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 10px 24px -12px rgba(59,130,246,0.8);
}
.btn-book:hover {
  background: linear-gradient(#2d6bec, #2563eb);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.24), 0 14px 28px -12px rgba(59,130,246,0.9);
  transform: translateY(-1px);
}

/* FIELD: the blue glow and dot grid, as a band behind a section and inside cards. */
/* The hero's blue field and dot grid as a full-width band behind a section,
   coming up stronger toward the bottom (in "How deep it goes", the deeper the
   layers go) and faded out at both ends so the band has no hard edge. */
.field-band { position: relative; }
/* The same band, turned down, behind a section that should not compete with the services. */
.field-band.is-soft::before { opacity: 0.8; }
.field-band::before {
  content: '';
  position: absolute;
  inset: 0 calc(50% - 50vw);
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 50% 78%, rgba(59,130,246,0.28) 0%, rgba(59,130,246,0.08) 50%, transparent 80%),
    radial-gradient(circle, rgba(59,130,246,0.26) 1px, transparent 1px);
  background-size: 100% 100%, 30px 30px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, rgba(0,0,0,0.6) 22%, black 70%, transparent);
  mask-image:         linear-gradient(to bottom, transparent, rgba(0,0,0,0.6) 22%, black 70%, transparent);
}

/* A card lying on a field band shows the band's dots through its glass and
   draws none of its own, so two dot grids never overlap; its glow stays. */
.field-band :is(.gains li, .compat) { --field-dots: 0; }

/* The "How deep it goes" field, inside a card (home and guides): the dot grid and a blue glow
   coming up toward the bottom edge. Each card sets how strong it runs. */
.package, .svc-rows, .build, .client, .gains li, .next-guide-cta, .compat, .member, .ft, .bench-panel, .dl-dialog, .step-body, .faq-group { isolation: isolate; }
.package::after, .svc-rows::after, .build::after, .client::after, .gains li::after, .next-guide-cta::after, .compat::after, .member::after, .ft::after, .bench-panel::after, .dl-dialog::after, .step-body::after, .faq-group::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(ellipse 75% 60% at var(--field-at, 50% 100%), rgb(59 130 246 / calc(var(--field-glow) * 0.4)), transparent 78%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.2), black 85%);
  mask-image:         linear-gradient(to bottom, rgba(0,0,0,0.2), black 85%);
}
/* The players, team and service cards keep the dot grid under the glow
   (each card's --field-dots sets how strong). */
:is(.client, .member, .package, .svc-rows, .build)::after {
  background:
    radial-gradient(ellipse 75% 60% at var(--field-at, 50% 100%), rgb(59 130 246 / calc(var(--field-glow) * 0.4)), transparent 78%),
    radial-gradient(circle, rgb(59 130 246 / var(--field-dots)) 1px, transparent 1px);
  background-size: 100% 100%, 22px 22px;
  background-position: 0 0, 11px 11px;
}

/* PAGE HEADER (non-hero pages) */
.page-header {
  padding: 120px 40px 60px;
  text-align: center;
}
/* A page shorter than the window keeps its footer at the window's bottom. */
body:has(> footer) { display: flex; flex-direction: column; min-height: 100svh; }
body:has(> footer) > main { flex: 1 0 auto; }
/* A page with a single message (404): the message in the middle of the window. */
main.is-alone { display: grid; align-content: center; }
main.is-alone .page-header { padding-block: 96px; }
.page-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  color: var(--text-bright);
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.page-sub {
  font-size: 0.975rem;
  color: var(--text-dim);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.75;
}

/* SECTION */
section { padding: 72px 40px; max-width: 1160px; margin: 0 auto; }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  color: var(--text-bright);
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 12px;
}
.section-sub {
  font-size: 0.92rem;
  color: var(--text-dim);
  font-weight: 400;
  max-width: 440px;
  margin: 0 0 40px;
  line-height: 1.7;
}


.btn-lg { padding: 13px 26px; font-size: 0.95rem; line-height: 1.6; border-radius: 11px; }

/* FOOTER: its line and text keep to the page's column, 1320px and 40px clear of the window's edges. */
.footer-bottom {
  max-width: 1320px;
  margin: 0 auto;
  padding: 16px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px 32px;
  border-top: 1px solid var(--border);
}
/* A step quieter than --text-dim (about 6:1 on --bg, still well over AA), so the legal line sits back. */
.footer-copy { font-size: 0.875rem; color: #868698; text-wrap: balance; }
/* The payment methods, which Przelewy24 wants in every page's footer: "Payments by" their
   logo, then the methods, each on an even badge (.pay-methods, the same in the order form). */
.footer-pay { max-width: 1320px; width: calc(100% - 80px); margin: 0 auto; padding: 28px 0 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.footer-pay-by { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 0.875rem; color: var(--text-dim); }
.footer-pay-by img { display: block; width: auto; height: 22px; }
.pay-methods { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pay-methods li { display: grid; place-items: center; min-width: 58px; height: 34px; padding: 0 12px; border: 1px solid var(--border-bright); border-radius: 8px; background: rgba(255,255,255,0.03); }
.pay-methods img { display: block; }
@media (max-width: 600px) {
  .footer-pay { flex-direction: column; width: auto; padding: 28px 20px 12px; }
  .pay-methods { justify-content: center; }
  /* All five on one line, even on a narrow phone. */
  .footer-pay .pay-methods { flex-wrap: nowrap; }
  .footer-pay .pay-methods li { min-width: 0; padding: 0 9px; }
}
/* The links keep to one line; the copyright line is the one that wraps. */
@media (min-width: 601px) {
  .footer-bottom { width: calc(100% - 80px); padding-inline: 0; }
  .footer-copy:last-child { flex: none; }
}
.footer-copy a { display: inline-block; padding: 6px 0; color: inherit; text-decoration: none; }
.footer-copy a:hover { color: var(--text); }
/* Wrapped onto several lines, the links lose their dots, so none hangs at a line's end:
   the separators shrink to nothing and the links keep apart by their margins. */
@media (max-width: 760px) {
  .footer-copy:has(> a) { display: flex; flex-wrap: wrap; justify-content: center; font-size: 0; }
  .footer-copy > a { margin: 0 9px; font-size: 0.875rem; }
}

/* REVEAL: the site's one entrance. Rise 16px and fade in, decelerating.
   Blocks that arrive together are staggered by shared.js (--reveal-delay,
   70ms apart), and a .stagger list reveals its items one by one (--i, an
   eased index, so the gaps shrink from 60ms), so no batch takes more than
   ~400ms to start landing.
   Uses `translate`, not `transform`, so it never fights a hover transform. */
.fade-in {
  opacity: 0;
  translate: 0 16px;
  transition: opacity var(--dur-reveal) var(--ease-out), translate var(--dur-reveal) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.fade-in.visible { opacity: 1; translate: none; }
.fade-in.stagger { opacity: 1; translate: none; }
.fade-in.stagger > * { opacity: 0; }
.fade-in.stagger.visible > * {
  opacity: 1;
  animation: reveal var(--dur-reveal) var(--ease-out) both;
  animation-delay: calc(var(--reveal-delay, 0ms) + var(--i, 0) * 60ms);
}
@keyframes reveal { from { opacity: 0; translate: 0 16px; } }
/* Arriving from the other language at the same place: what is on screen is simply there. */
/* Only a stagger's children carry the reveal animation; other children keep their own
   (the client strip's drift stopped when the page opened with it on screen). */
.fade-in.is-instant, .fade-in.stagger.is-instant > * { transition: none; animation: none; }

/* Open dialogs (lightbox, notices) keep the page behind them still. */
html:has(dialog[open]) { overflow: hidden; }

/* Notice dialog: the download notice on the home page, and the dialogs
   shared.js builds on it (the order form, the withdrawal form, and the "soon"
   notice the order and donate buttons show while payments are off). */
.dl-dialog {
  --field-glow: 0.18;
  --field-dots: 0.18;
  margin: auto;
  width: min(460px, calc(100vw - 32px));
  padding: 0;
  background: rgba(16,16,20,0.82);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  color: var(--text);
  border: 1px solid var(--border-bright);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 24px 60px rgba(0,0,0,0.6);
}
.dl-dialog::backdrop { background: rgba(0,0,0,0.72); backdrop-filter: blur(6px); }
@media (prefers-reduced-motion: no-preference) {
  .dl-dialog {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
    transition: opacity 180ms var(--ease-in), transform 180ms var(--ease-in), overlay 180ms allow-discrete, display 180ms allow-discrete;
  }
  .dl-dialog[open] {
    opacity: 1;
    transform: none;
    transition: opacity 340ms var(--ease-out) 50ms, transform 340ms var(--ease-out) 50ms, overlay 340ms allow-discrete, display 340ms allow-discrete;
  }
  .dl-dialog::backdrop { opacity: 0; transition: opacity 180ms var(--ease-in), overlay 180ms allow-discrete, display 180ms allow-discrete; }
  .dl-dialog[open]::backdrop { opacity: 1; transition: opacity 220ms var(--ease-out), overlay 220ms allow-discrete, display 220ms allow-discrete; }
  @starting-style {
    .dl-dialog[open] { opacity: 0; transform: translateY(14px) scale(0.95); }
    .dl-dialog[open]::backdrop { opacity: 0; }
  }
  .dl-dialog[open] .dl-dialog-body > * { animation: reveal 300ms var(--ease-out) both; }
  .dl-dialog[open] .dl-dialog-body > :nth-child(2) { animation-delay: 150ms; }
  .dl-dialog[open] .dl-dialog-body > :nth-child(3) { animation-delay: 200ms; }
  .dl-dialog[open] .dl-dialog-body > :nth-child(4) { animation-delay: 250ms; }
  .dl-dialog[open] .dl-dialog-body > :first-child { animation-delay: 100ms; }
}
.dl-dialog-body { padding: 26px 26px 24px; }
.dl-dialog-kicker { font-family: 'JetBrains Mono', monospace; font-size: 0.8125rem; font-weight: 500; color: var(--text-dim); margin-bottom: 8px; }
.dl-dialog-close { position: absolute; top: 14px; right: 14px; display: flex; padding: 6px; border: 0; border-radius: 8px; background: none; color: var(--text-dim); cursor: pointer; transition: color var(--t) var(--ease-out), background-color var(--t) var(--ease-out); }
.dl-dialog-close:hover { color: var(--text-bright); background: rgba(255,255,255,0.05); }
.dl-dialog-title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; letter-spacing: -0.02em; color: var(--text-bright); margin-bottom: 10px; }
.dl-dialog-text { font-size: 0.875rem; line-height: 1.7; color: var(--text-dim); margin-bottom: 22px; }
.dl-dialog-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ORDER: the order form (a notice dialog that scrolls), the queue line under
   Services, and the order panel (panel.html). */
.order-dialog { width: min(640px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; }
.order-form .dl-dialog-actions { margin-top: 18px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; font-size: 0.8125rem; color: var(--text-dim); }
.field :is(input, textarea), .admin :is(input:not([type="checkbox"]), textarea) {
  width: 100%;
  font: inherit;
  font-size: 0.92rem;
  color: var(--text-bright);
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border-bright);
  border-radius: 9px;
  padding: 9px 12px;
  transition: border-color var(--t) var(--ease-out);
}
.field textarea { resize: vertical; min-height: 76px; }
:is(.field, .admin) :is(input, textarea):focus-visible { outline: 2px solid rgba(59,130,246,0.55); outline-offset: 1px; border-color: transparent; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; font-size: 0.8125rem; line-height: 1.6; color: var(--text); cursor: pointer; }
/* Required fields carry an asterisk, also the ones the invoice box makes required. */
:is(.field, .check):has(:required) > span::after { content: ' *'; color: var(--blue-bright); }
.order-help { margin: 0 0 12px; font-size: 0.8125rem; line-height: 1.7; color: var(--text-dim); }
/* Two fields side by side (the invoice address and NIP), one under the other on a phone. */
.order-row { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; }
@media (max-width: 600px) { .order-row { grid-template-columns: 1fr; } }
.order-form .field { margin-bottom: 12px; }
/* Donation amounts: radio buttons drawn as chips, the chosen one tinted blue. */
.donate-amounts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; padding: 0; border: 0; }
.donate-amounts label { position: relative; cursor: pointer; }
.donate-amounts input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.donate-amounts span { display: block; padding: 8px 16px; border: 1px solid var(--border); border-radius: 10px; background: rgba(255,255,255,0.03); font-size: 0.875rem; font-weight: 600; color: var(--text); transition: background-color var(--t) var(--ease-out), border-color var(--t) var(--ease-out); }
.donate-amounts label:hover span { background: rgba(255,255,255,0.07); }
.donate-amounts input:checked + span { border-color: rgba(59,130,246,0.6); background: rgba(59,130,246,0.15); color: var(--text-bright); }
.donate-amounts input:focus-visible + span { outline: 2px solid var(--blue-bright); outline-offset: 2px; }
.order-link { padding: 0; border: 0; background: none; font: inherit; font-size: 0.8125rem; color: var(--text-bright); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.order-required { align-self: center; font-size: 0.75rem; color: var(--text-dim); }
.check input { margin-top: 2px; }
/* Checkboxes in the site's own look: a dark box like the fields, filled with the
   buttons' blue and a white tick once ticked. */
input[type="checkbox"] { appearance: none; flex: none; width: 18px; height: 18px; margin: 0; border: 1px solid var(--border-bright); border-radius: 5px; background: #0c0c10 center / 14px no-repeat; cursor: pointer; transition: background-color var(--dur-quick) var(--ease-out), border-color var(--dur-quick) var(--ease-out); }
input[type="checkbox"]:hover { border-color: rgba(59,130,246,0.6); }
input[type="checkbox"]:checked { border-color: var(--blue-bright); background-color: var(--blue-bright); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E"); }
input[type="checkbox"]:focus-visible { outline: 2px solid rgba(59,130,246,0.55); outline-offset: 2px; }
@media (forced-colors: active) { input[type="checkbox"] { appearance: auto; } }
.check a { color: var(--text-bright); text-underline-offset: 3px; }
.order-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.order-error { font-size: 0.8125rem; line-height: 1.6; color: #fca5a5; margin-top: 10px; }
/* The order form, in the order of the task: the service, its price and what it covers;
   the hardware it needs and what happens if that falls short; contact; the date (when
   it suits them, dual boot, the priority queue); the request to start early; a note or
   an invoice; and paying. One accent, the blue (the button, the chosen answer, links),
   on the neutral greys, without the dialog's glow. On a phone it fills the screen and
   the total with the button stays at the bottom. */
#order-dialog { --field-glow: 0; width: min(560px, calc(100vw - 32px)); background: rgba(14,14,18,0.96); }
#order-dialog .order-form svg { stroke-width: 1.5; }
.order-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; padding-right: 34px; }
.order-head .dl-dialog-title { margin: 0; font-size: 1.375rem; font-weight: 500; letter-spacing: -0.01em; }
.order-eur { margin: -14px 0 22px; font-size: 0.75rem; line-height: 1.6; color: var(--text-dim); }
.order-consent a { color: #93c5fd; text-underline-offset: 3px; }
#order-dialog .field { gap: 8px; margin-bottom: 16px; }
#order-dialog .field > span, .order-when legend { font-size: 0.875rem; font-weight: 500; color: var(--text-bright); }
#order-dialog .field:has(:required) > span::after { color: var(--text-bright); }
#order-dialog .field input { height: 44px; padding: 0 14px; border-radius: 10px; }
#order-dialog .field input:hover:not(:focus) { border-color: #34343e; }
#order-dialog .field.is-invalid input { border-color: #f87171; }
#order-dialog .field.is-invalid .field-hint { display: none; }
/* The country's list (shared.js): always under the field, over what follows it. */
.field.is-combo { position: relative; }
/* The dialog's blocks keep their entrance animation (fill: both), so each is a layer of its own and the
   later ones (the pay button) would paint over the list: the block holding it goes on top. */
#order-dialog .order-more:has(.is-combo) { position: relative; z-index: 2; }
#order-dialog .field.is-combo input { padding-right: 38px; }
.field.is-combo:not(.is-invalid)::after { content: ''; position: absolute; right: 17px; bottom: 19px; width: 7px; height: 7px; border-right: 1.5px solid var(--text-dim); border-bottom: 1.5px solid var(--text-dim); rotate: 45deg; pointer-events: none; }
.combo-list { position: absolute; z-index: 5; top: calc(100% + 4px); left: 0; right: 0; max-height: 182px; overflow-y: auto; margin: 0; padding: 4px; list-style: none; border: 1px solid var(--border-bright); border-radius: 10px; background: #15151b; box-shadow: 0 16px 40px rgba(0,0,0,0.55); }
.combo-list[hidden] { display: none; }
.combo-list li { padding: 6px 10px; border-radius: 7px; font-size: 0.875rem; color: var(--text); cursor: pointer; }
.combo-list li:hover, .combo-list [aria-selected="true"] { background: rgba(59,130,246,0.14); color: var(--text-bright); }
.field-hint { font-size: 0.75rem; line-height: 1.5; color: var(--text-dim); }
/* What a field is for, at the right end of its label's line (the order form's contact fields). */
.field.has-side { grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; }
.field.has-side > :is(input, .field-error) { grid-column: 1 / -1; }
.field-side { grid-area: 1 / 2; align-self: end; text-align: right; font-size: 0.75rem; line-height: 1.5; color: var(--text-dim); }
/* An "i" in a circle with a line that shows on hover, on focus and on a tap. The line spans the row it sits in (.order-date), so it never runs out of the dialog. */
.tip button { display: inline-grid; place-items: center; width: 24px; height: 24px; margin: -4px 0 -4px 4px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--text-dim); vertical-align: middle; cursor: help; transition: color var(--t) var(--ease-out); }
.tip button:hover, .tip button:focus-visible { color: var(--text-bright); }
.tip-text { position: absolute; z-index: 5; top: 30px; left: 0; right: 0; padding: 10px 12px; border: 1px solid var(--border-bright); border-radius: 10px; background: #1b1b22; box-shadow: 0 12px 32px rgba(0,0,0,0.5); font-size: 0.75rem; line-height: 1.5; color: var(--text); opacity: 0; visibility: hidden; transition: opacity 120ms var(--ease-out), visibility 0s 120ms; }
.tip:hover .tip-text, .tip:focus-within .tip-text { opacity: 1; visibility: visible; transition-delay: 0s; }
.field-error { font-size: 0.75rem; line-height: 1.5; color: #fca5a5; }
.field-error[hidden] { display: none; }
/* Above the blocks after it: each of the form's blocks is a layer of its own (the entrance animation), and the date's tip opens over the next ones. */
.order-date { position: relative; z-index: 1; display: flex; align-items: flex-start; gap: 10px; margin: 20px 0 18px; }
.order-date[hidden] { display: none; }
.order-date > svg { flex: none; margin-top: 2px; color: var(--text-dim); }
.order-date p { margin: 0; font-size: 0.9375rem; color: var(--text); }
.order-date strong { font-weight: 600; color: var(--text-bright); }
.order-date small { display: block; margin-top: 2px; font-size: 0.75rem; color: var(--text-dim); }
.order-when { margin: 18px 0 16px; padding: 0; border: 0; }
.order-when legend { margin-bottom: 10px; padding: 0; }
.order-when legend small { margin-left: 4px; font-size: 0.75rem; font-weight: 400; color: var(--text-dim); }
.order-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.order-chip { position: relative; cursor: pointer; }
.order-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.order-chip span { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border: 1px solid var(--border-bright); border-radius: 10px; font-size: 0.875rem; color: var(--text); transition: background-color var(--t) var(--ease-out), border-color var(--t) var(--ease-out), color var(--t) var(--ease-out); }
.order-chip:hover span { background: rgba(255,255,255,0.04); }
.order-chip input:checked + span { border-color: var(--blue-bright); background: rgba(59,130,246,0.12); color: var(--text-bright); }
.order-chip input:focus-visible + span { outline: 2px solid var(--blue-bright); outline-offset: 2px; }
.order-option { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 10px; padding: 14px 16px; border: 1px solid var(--border-bright); border-radius: 12px; cursor: pointer; transition: border-color var(--t) var(--ease-out); }
.order-option[hidden] { display: none; }
.order-option:hover { border-color: #34343e; }
.order-option span { flex: 1; min-width: 0; }
.order-option strong { display: block; font-size: 0.875rem; font-weight: 500; color: var(--text-bright); }
.order-option small { display: block; margin-top: 2px; font-size: 0.8125rem; line-height: 1.5; color: var(--text-dim); }
.order-option b { flex: none; font-size: 0.875rem; font-weight: 500; color: var(--text-bright); font-variant-numeric: tabular-nums; }
/* Big enough to hit: the box 24 px, and the whole row with its words clickable. */
#order-dialog input[type="checkbox"] { width: 24px; height: 24px; border-radius: 6px; background-size: 16px; }
.order-consent { display: flex; align-items: flex-start; gap: 12px; margin: 22px 0 0; padding-top: 20px; border-top: 1px solid var(--border); font-size: 0.875rem; line-height: 1.55; color: var(--text); cursor: pointer; }
.order-consent .field-error:not([hidden]) { display: block; margin-top: 6px; }
/* The two boxes (the terms, the request to start early) under one line. */
.order-consent + .order-consent { margin-top: 14px; padding-top: 0; border-top: 0; }
#order-dialog .order-consent input[aria-invalid="true"] { border-color: #f87171; }
#order-dialog .order-more { margin-top: 12px; }
/* The note's field sits right under its box, clear of the invoice box after it. */
#order-dialog .order-more[data-for="note"] { margin: 0 0 12px; }
/* Until payments are live: the forms can be looked through, this line says why paying is off. */
.order-soon { margin: 0 0 14px; padding: 10px 12px; border: 1px solid rgba(59,130,246,0.3); border-radius: 10px; background: rgba(59,130,246,0.08); font-size: 0.8125rem; line-height: 1.5; color: var(--text-bright); }
.order-soon[hidden] { display: none; }
.order-soon a { color: #93c5fd; text-underline-offset: 3px; }
.order-dialog .btn:disabled:not(.is-busy) { opacity: 0.5; cursor: not-allowed; box-shadow: none; filter: saturate(0.6); }
/* "Fill in from GUS" under the tax ID, with what the search found beside it. */
#order-dialog .order-nip-find { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: -8px 0 16px; }
#order-dialog .order-nip-find[hidden] { display: none; }
#order-dialog .order-nip-find small { font-size: 0.75rem; color: var(--text-dim); }
#order-dialog .order-more textarea { width: 100%; padding: 10px 14px; border: 1px solid var(--border-bright); border-radius: 10px; background: rgba(0,0,0,0.35); font: inherit; font-size: 0.92rem; color: var(--text-bright); resize: vertical; }
#order-dialog .order-more textarea:focus-visible { outline: 2px solid rgba(59,130,246,0.55); outline-offset: 1px; border-color: transparent; }
.order-pay { margin-top: 22px; }
.order-go { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 52px; padding: 0 16px; font-size: 1rem; }
#order-dialog .order-go, #order-dialog .order-go:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,0.16); }
.order-go:disabled { cursor: progress; opacity: 0.85; transform: none; }
.order-go.is-busy svg { display: none; }
.order-go.is-busy::before { content: ''; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.35); border-top-color: #fff; border-radius: 50%; animation: orbit-spin 0.8s linear infinite; }
.order-pay .pay-methods { justify-content: center; margin-top: 14px; }
@media (max-width: 600px) {
  #order-dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; }
  #order-dialog .dl-dialog-body { padding: 20px 20px 0; }
  .order-head .dl-dialog-title { font-size: 1.25rem; }
  .order-pay .pay-methods { display: none; }
  .order-pay { position: sticky; bottom: 0; z-index: 1; margin: 22px -20px 0; padding: 12px 20px 14px; border-top: 1px solid var(--border); background: #0e0e12; }
}
/* The order panel after paying: a tick over the title, the four steps, who messages
   them on Discord, and the card for the PC's specs (a command to run, or the parts
   typed in, and what the board allows). */
.panel-ok { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 50%; background: rgba(74,222,128,0.14); color: #4ade80; }
.panel-steps { display: flex; align-items: center; margin: 0 0 14px; padding: 14px 16px; list-style: none; border: 1px solid var(--border-bright); border-radius: 14px; background: rgba(16,16,20,0.7); font-size: 0.8125rem; color: var(--text-dim); }
.panel-steps li { flex: 1; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.panel-steps li:last-child { flex: none; }
.panel-steps li:not(:last-child)::after { content: ''; flex: 1; min-width: 12px; height: 1px; margin: 0 10px 0 2px; background: var(--border-bright); }
.panel-steps span { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border: 1px solid var(--border-bright); border-radius: 50%; font-size: 0.6875rem; font-weight: 700; }
.panel-steps .is-done { color: #4ade80; }
.panel-steps .is-done span { border-color: #22c55e; background: #22c55e; color: #052e16; }
.panel-steps .is-now { font-weight: 600; color: var(--text-bright); }
.panel-steps .is-now span { border-color: var(--blue-bright); background: var(--blue-bright); color: #fff; }
.panel-dm { display: flex; gap: 14px; align-items: flex-start; margin: 0 0 14px; padding: 16px 18px; border: 1px solid rgba(99,102,241,0.45); border-radius: 14px; background: rgba(99,102,241,0.08); }
.panel-dm > svg { flex: none; margin-top: 2px; color: #a5b4fc; }
.panel-dm strong { font-size: 0.9375rem; color: var(--text-bright); }
.panel-dm p { margin: 2px 0 0; font-size: 0.8125rem; line-height: 1.6; color: var(--text-dim); }
.panel-specs { border-color: rgba(59,130,246,0.55); }
.panel-time { margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: rgba(59,130,246,0.18); font-family: inherit; font-size: 0.75rem; font-weight: 600; letter-spacing: 0; vertical-align: middle; color: #93c5fd; }
.panel-specs .dl-dialog-text { margin-bottom: 16px; }
.panel-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 0 16px; padding: 4px; border: 1px solid var(--border); border-radius: 10px; background: rgba(0,0,0,0.3); }
.panel-tabs button { padding: 8px; border: 0; border-radius: 7px; background: none; font: inherit; font-size: 0.8125rem; font-weight: 600; color: var(--text-dim); cursor: pointer; }
.panel-tabs [aria-selected="true"] { background: rgba(255,255,255,0.08); color: var(--text-bright); }
.panel-run-steps { counter-reset: step; display: grid; gap: 10px; margin: 0 0 14px; padding: 0; list-style: none; font-size: 0.875rem; color: var(--text); }
.panel-run-steps li { counter-increment: step; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.panel-run-steps li::before { content: counter(step); display: grid; place-items: center; width: 22px; height: 22px; margin-right: 6px; border-radius: 50%; background: rgba(255,255,255,0.06); font-size: 0.6875rem; font-weight: 700; color: var(--text-dim); }
.panel-run-steps kbd { padding: 1px 7px; border: 1px solid var(--border-bright); border-radius: 6px; background: rgba(255,255,255,0.06); font-family: inherit; font-size: 0.75rem; font-weight: 600; color: var(--text-bright); }
.panel-copy { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: 0.8125rem; }
.panel-output, .panel-parts input { width: 100%; padding: 10px 12px; border: 1px solid var(--border-bright); border-radius: 10px; background: rgba(0,0,0,0.35); font: inherit; font-size: 0.875rem; line-height: 1.6; color: var(--text-bright); }
.panel-output { resize: vertical; }
.panel-specs:has(.panel-verdict.is-ok) .panel-output { border-color: rgba(74,222,128,0.6); }
:is(.panel-output, .panel-parts input):focus-visible { outline: 2px solid rgba(59,130,246,0.55); outline-offset: 1px; border-color: transparent; }
.panel-parts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.panel-verdict { display: flex; gap: 8px; margin: 12px 0; padding: 10px 14px; border-radius: 10px; font-size: 0.8125rem; font-weight: 600; line-height: 1.5; }
.panel-verdict[hidden] { display: none; }
.panel-verdict.is-ok { background: rgba(34,197,94,0.12); color: #86efac; }
.panel-verdict.is-ok::before { content: '✓'; }
.panel-verdict.is-warn { background: rgba(139,92,246,0.14); color: #c4b5fd; }
.panel-verdict.is-check { background: rgba(59,130,246,0.12); color: #93c5fd; }
.panel-what { margin: 0 0 16px; font-size: 0.75rem; color: var(--text-dim); }
.panel-send { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.panel-later { display: grid; padding: 0; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.panel-later strong { font-size: 0.875rem; color: var(--text-bright); }
.panel-later small { font-size: 0.75rem; color: var(--text-dim); }
@media (max-width: 600px) {
  .panel-steps { flex-wrap: wrap; gap: 6px 12px; font-size: 0.75rem; }
  .panel-steps li, .panel-steps li:last-child { flex: none; }
  .panel-steps li:not(:last-child)::after { content: '→'; flex: none; min-width: 0; height: auto; margin: 0 0 0 4px; background: none; }
  .panel-parts { grid-template-columns: 1fr; }
  .panel-specs .dl-dialog-actions .btn { flex: 1 1 100%; }
}
.panel { max-width: 800px; padding-top: 0; }
.panel-card { position: relative; background: rgba(16,16,20,0.7); border: 1px solid var(--border-bright); border-radius: 14px; padding: 22px 24px; margin-bottom: 14px; }
.panel-card > :last-child { margin-bottom: 0; }
/* Withdrawal sits at the foot of the help card, smaller than the rest, but always there while it is allowed. */
.panel-withdraw { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.panel-withdraw .dl-dialog-text { font-size: 0.8125rem; margin-bottom: 10px; }
.panel-withdraw-title { margin: 0 0 4px; font-size: 0.875rem; font-weight: 600; color: var(--text-bright); }
.panel-withdraw .btn { padding: 7px 14px; font-size: 0.8125rem; }
.panel-when { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; color: var(--text-bright); margin-bottom: 10px; }
.panel-list { padding-left: 20px; font-size: 0.875rem; line-height: 1.7; color: var(--text-dim); }
.panel-list li + li { margin-top: 6px; }

/* ADMIN (admin/index.php): the staff panel (planner, Klienci, Rozliczenia). */
.admin main { padding: 0 0 80px; }
/* Signed in: the menu on the left, the page beside it. */
.admin main:has(> .admin-nav) { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; padding: 0; }
/* Folding the menu makes room for the planner only; the other pages stay where they are. */
.admin main:has(.plan-app) { grid-template-columns: auto minmax(0, 1fr); }
.admin-page { min-width: 0; padding: 28px 28px 80px; }
/* On a wide screen the tables sit in the middle, up to 1680px (the menu stays at the
   left edge); the planner takes the whole width. */
.admin-page > .admin-section { width: 100%; max-width: 1680px; margin-inline: auto; }
.admin-nav { position: sticky; top: 0; z-index: 30; display: flex; flex-direction: column; gap: 2px; width: 236px; height: 100vh; padding: 14px 10px; border-right: 1px solid var(--border); background: #0b0b0e; }
.admin-brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 12px; font-size: 0.9375rem; font-weight: 700; color: var(--text-bright); }
.admin-logo { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 7px; background: #22c55e; font-size: 0.875rem; font-weight: 800; color: #052e16; }
.admin-fold { margin-left: auto; padding: 2px 8px; border: 0; border-radius: 6px; background: none; font: inherit; font-size: 1rem; color: var(--text-dim); cursor: pointer; transition: rotate var(--dur-base) var(--ease-out); }
.admin-fold:hover { background: rgba(255,255,255,0.07); color: var(--text-bright); }
.admin-find { position: relative; display: flex; align-items: center; margin: 0 0 10px; }
.admin-find svg { position: absolute; left: 10px; pointer-events: none; }
.admin .admin-find input[type="search"] { width: 100%; padding: 7px 52px 7px 32px; }
.admin-find kbd { position: absolute; right: 8px; padding: 1px 5px; border: 1px solid var(--border-bright); border-radius: 4px; font: inherit; font-size: 0.6875rem; color: var(--text-dim); pointer-events: none; }
.admin-links { display: contents; }
.admin-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 0.875rem; font-weight: 600; color: var(--text); text-decoration: none; }
.admin-link:hover { background: rgba(255,255,255,0.05); color: var(--text-bright); }
.admin-link.is-active { background: rgba(255,255,255,0.08); color: var(--text-bright); }
.admin-link .admin-count { margin-left: auto; }
:is(.admin-link, .admin-find) svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.admin-find svg { color: var(--text-dim); }
/* The search's palette (admin.js, Ctrl K): every order that matches, what matched and where it opens. */
.find-dialog { width: min(680px, calc(100vw - 32px)); max-width: none; max-height: min(620px, calc(100dvh - 24vh)); margin: 12vh auto 0; padding: 0; border: 1px solid var(--border-bright); border-radius: 14px; background: #111116; color: var(--text); box-shadow: 0 24px 64px rgba(0,0,0,0.6); }
.find-dialog[open] { display: flex; flex-direction: column; }
.find-dialog::backdrop { background: rgba(6,6,8,0.7); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.find-box { position: relative; display: flex; align-items: center; border-bottom: 1px solid var(--border); }
.find-box svg { position: absolute; left: 16px; width: 18px; height: 18px; fill: none; stroke: var(--text-dim); stroke-width: 1.8; stroke-linecap: round; pointer-events: none; }
.admin .find-box input[type="search"] { width: 100%; padding: 15px 60px 15px 44px; border: 0; border-radius: 14px 14px 0 0; background: none; font-size: 0.9375rem; }
.admin .find-box input[type="search"]:focus-visible { outline: none; }
.find-box input::-webkit-search-cancel-button { display: none; }
.find-box kbd { position: absolute; right: 14px; padding: 1px 6px; border: 1px solid var(--border-bright); border-radius: 4px; font: inherit; font-size: 0.6875rem; color: var(--text-dim); pointer-events: none; }
.find-list { overflow-y: auto; padding: 6px; list-style: none; }
.find-list:empty { display: none; }
.find-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 16px; padding: 9px 12px; border-radius: 9px; color: inherit; text-decoration: none; }
.find-list [aria-selected="true"] a { background: rgba(59,130,246,0.14); }
.find-line { display: flex; align-items: baseline; gap: 10px; min-width: 0; font-size: 0.875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.find-line > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.find-dim { display: block; grid-column: 1; font-size: 0.8125rem; color: var(--text-dim); }
.find-ref { font-weight: 700; color: var(--text-bright); font-variant-numeric: tabular-nums; }
.find-list mark { border-radius: 3px; background: rgba(59,130,246,0.3); color: var(--text-bright); }
.find-state { padding: 0 7px; border-radius: 99px; background: rgba(255,255,255,0.07); font-size: 0.75rem; color: var(--text-dim); }
.find-state:is(.is-queued, .is-scheduled) { background: rgba(59,130,246,0.16); color: #93c5fd; }
.find-state.is-done { background: rgba(74,222,128,0.14); color: #86efac; }
.find-state.is-pending { background: rgba(250,204,21,0.14); color: #fde68a; }
.find-state:is(.is-withdrawn, .is-cancelled) { background: rgba(248,113,113,0.14); color: #fca5a5; }
.find-place { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 0.8125rem; color: var(--text-dim); }
.find-list [aria-selected="true"] .find-place { color: var(--text-bright); }
.find-list [aria-disabled="true"] a { opacity: 0.55; cursor: default; }
.find-empty { padding: 12px 18px; font-size: 0.8125rem; color: var(--text-dim); }
.find-empty:empty { display: none; }
.admin-sublinks { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 4px; }
.admin-sublinks a { display: flex; justify-content: space-between; padding: 6px 10px 6px 38px; border-radius: 7px; font-size: 0.8125rem; color: var(--text-dim); text-decoration: none; }
.admin-sublinks a:hover { color: var(--text-bright); }
.admin-sublinks a.is-active { background: rgba(255,255,255,0.05); font-weight: 600; color: var(--text-bright); }
.admin-nav-end { display: flex; flex-direction: column; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }
.admin-nav .admin-next { padding: 0 6px; font-size: 0.75rem; color: var(--text-dim); }
.admin-nav .admin-next strong { color: var(--text-bright); }
.admin-nav .admin-next small { display: block; margin-top: 2px; font-size: 0.6875rem; }
.admin-nav .admin-user > summary { display: flex; padding: 8px 10px; border: 1px solid var(--border-bright); border-radius: 9px; }
.admin-nav .admin-user .admin-menu { top: auto; bottom: calc(100% + 6px); left: 0; right: auto; }
/* Folded: the icons alone (and a dot for who is signed in). */
.admin-nav.is-folded { width: 64px; }
.admin-nav.is-folded :is(.admin-label, .admin-sublinks, .admin-link .admin-count, .admin-find input, .admin-find kbd) { display: none; }
.admin-nav.is-folded .admin-brand { flex-direction: column; gap: 8px; padding-inline: 0; }
.admin-nav.is-folded .admin-fold { margin: 0; rotate: 180deg; }
.admin-nav.is-folded .admin-link { justify-content: center; padding: 9px 0; }
.admin-nav.is-folded .admin-find { justify-content: center; height: 36px; border-radius: 8px; cursor: pointer; }
.admin-nav.is-folded .admin-find:hover { background: rgba(255,255,255,0.05); }
.admin-nav.is-folded .admin-find svg { position: static; }
.admin-nav.is-folded .admin-user > summary { justify-content: center; padding: 8px 0; }
.admin-nav.is-folded .admin-user .admin-person { font-size: 0; gap: 0; }
@media (max-width: 900px) {
  /* The menu as tall as it is; the page gets the rest (Notes fills the window). */
  .admin main:has(> .admin-nav) { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .data-tabs { flex-wrap: wrap; }
  /* One row on top: the logo, the search and the user; the pages are the tab bar below. */
  .admin-nav, .admin-nav.is-folded { position: static; width: auto; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--border); }
  .admin-nav :is(.admin-next, .admin-fold, .admin-sublinks, .admin-find input, .admin-find kbd), .admin-brand .admin-label { display: none; }
  .admin-nav .admin-link .admin-label { display: inline; }
  .admin-brand { padding: 0; }
  /* The search as its icon: a tap opens the palette (admin.js). */
  .admin-nav .admin-find { margin: 0 0 0 auto; justify-content: center; width: 36px; height: 36px; border-radius: 8px; cursor: pointer; }
  .admin-nav .admin-find svg { position: static; }
  .admin-nav-end { flex-direction: row; align-items: center; margin: 0; padding: 0; border: 0; }
  .admin-nav .admin-user .admin-menu { top: calc(100% + 6px); bottom: auto; left: auto; right: 0; }
  /* The pages as a floating tab bar of liquid glass at the bottom, under the thumb: the
     page shows through blurred and brightened, a light edge on top, the page open on a
     lighter pill, each page its icon with a short name under it and its count on the icon.
     .admin .admin-nav … outranks the folded menu's rules, a desktop setting that does not apply here. */
  .admin .admin-nav .admin-links { position: fixed; z-index: 45; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); display: flex; gap: 2px; padding: 5px; border: 1px solid rgba(255,255,255,0.12); border-radius: 30px; background: rgba(24,24,30,0.5); -webkit-backdrop-filter: blur(20px) saturate(1.8) brightness(1.1); backdrop-filter: blur(20px) saturate(1.8) brightness(1.1); box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), inset 0 -1px 0 rgba(255,255,255,0.04), 0 14px 34px rgba(0,0,0,0.55); }
  .admin .admin-nav .admin-links .admin-link { position: relative; flex: 1 1 0; min-width: 0; flex-direction: column; justify-content: center; gap: 3px; padding: 7px 2px 6px; border-radius: 24px; color: var(--text-dim); transition: background var(--t) var(--ease-out), color var(--t) var(--ease-out); }
  .admin .admin-nav .admin-links .admin-link.is-active { background: rgba(255,255,255,0.11); box-shadow: inset 0 1px 0 rgba(255,255,255,0.18); color: var(--text-bright); }
  .admin .admin-nav .admin-links .admin-link .admin-label { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.625rem; font-weight: 600; }
  .admin .admin-nav .admin-links .admin-link .admin-count { display: block; position: absolute; top: 2px; left: calc(50% + 5px); margin: 0; padding: 0 5px; font-size: 0.625rem; line-height: 15px; background: rgba(59,130,246,0.85); color: #fff; }
  .admin .admin-nav .admin-links .admin-link .admin-count.is-due { background: #ef4444; color: #fff; }
  /* Room under the page for the bar, and the notes after an action float over it. */
  .admin main:has(> .admin-nav) { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .admin-notice { bottom: calc(90px + env(safe-area-inset-bottom)); }
  @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .admin .admin-nav .admin-links { background: rgba(20,20,26,0.96); }
  }
  .admin-page { padding: 16px; }
}
.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.cal-nav h3 { font-size: 0.9375rem; font-weight: 600; color: var(--text-bright); }
.cal-nav .btn, .admin-dayhead .btn { padding: 4px 12px; font-size: 1rem; }
.admin-dayhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.admin-dayhead .dl-dialog-title { margin: 0; }
.admin input:not([type="checkbox"]), .admin textarea { width: auto; font-size: 0.875rem; padding: 7px 10px; }
.admin select { font: inherit; font-size: 0.875rem; color: var(--text-bright); background: #0c0c10; border: 1px solid var(--border-bright); border-radius: 9px; padding: 7px 10px; }
.admin .field input { width: 100%; }
.admin-login { max-width: 360px; margin: 18vh auto 0; }
/* Small menus that open under their button (who is signed in, ⋯, sorting, + Nieobecność). */
:is(.admin-user, .plan-menu) { position: relative; }
:is(.admin-user, .plan-menu) > summary { list-style: none; cursor: pointer; }
:is(.admin-user, .plan-menu) > summary::-webkit-details-marker { display: none; }
.admin-user > summary::after, .plan-sort > summary::after { content: ' ▾'; font-size: 0.75rem; color: var(--text-dim); }
.admin-menu { position: absolute; z-index: 40; top: calc(100% + 6px); right: 0; display: flex; flex-direction: column; gap: 2px; min-width: 190px; padding: 6px; border: 1px solid var(--border-bright); border-radius: 10px; background: var(--surface); box-shadow: 0 16px 40px rgba(0,0,0,0.55); }
.plan-side .admin-menu { left: 0; right: auto; }
.admin-menu form { margin: 0; }
.admin-menu :is(a, button, .btn) { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 7px; background: none; box-shadow: none; font: inherit; font-size: 0.875rem; font-weight: 500; text-align: left; color: var(--text-bright); text-decoration: none; cursor: pointer; }
.admin-menu :is(a, button, .btn):hover { background: rgba(255,255,255,0.07); }
.admin-menu input { width: 100%; margin: 4px 0; }
.admin-section { padding: 0; margin-bottom: 32px; max-width: none; }
/* Each person's colour, the same in the queue, the calendar and the absences. */
.who-0 { --who: #60a5fa; }
.who-1 { --who: #c084fc; }
.who-2 { --who: #4ade80; }
.who-3 { --who: #fbbf24; }
.who-4 { --who: #f472b6; }
.who-5 { --who: #22d3ee; }
.admin-person { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--text-bright); }
.admin-person::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--who, var(--text-dim)); }
.admin-count { padding: 1px 8px; border-radius: 999px; background: rgba(255,255,255,0.08); font-size: 0.75rem; font-weight: 600; }
.admin-time { font-family: 'JetBrains Mono', monospace; font-weight: 700; color: var(--text-bright); }
.admin-what { flex: 1 1 18em; min-width: 0; }
.admin-actions .admin-hint { margin: 0; }
.admin-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 14px 0; font-size: 0.8125rem; }
.admin-dl dt { color: var(--text-dim); }
.admin-dl dd { color: var(--text-bright); overflow-wrap: anywhere; }
.admin-actions, .admin-actions form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.admin-actions form { margin-top: 0; }
/* The note after an action floats at the bottom and fades after a few seconds;
   one saying something was not done stays until clicked or the next action. */
.admin-notice { position: fixed; left: 50%; bottom: 24px; z-index: 50; translate: -50% 0; width: max-content; max-width: min(560px, calc(100vw - 32px)); margin: 0; padding: 12px 18px; border: 1px solid var(--border-bright); border-radius: 12px; background: var(--surface); box-shadow: 0 12px 32px rgba(0,0,0,0.5); font-size: 0.875rem; color: var(--text-bright); cursor: pointer; animation: admin-notice-out var(--dur-base) var(--ease-out) 6s forwards; }
.admin-notice.is-error { border-color: rgba(248,113,113,0.55); animation: none; }
@keyframes admin-notice-out { to { opacity: 0; visibility: hidden; } }
.admin .field textarea { width: 100%; }
.admin-sessions a { color: var(--text-bright); }
.admin-sessions { list-style: none; margin-bottom: 14px; font-size: 0.875rem; }
.admin-sessions li { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.admin-sessions .btn { padding: 5px 12px; font-size: 0.8125rem; }
.admin-subhead { font-size: 0.875rem; font-weight: 600; color: var(--text-bright); margin: 18px 0 8px; }
/* Klienci, like an online shop's orders: the title and its buttons, the month at a
   glance, then one card with the tabs, search and filters over the table, pages
   and the sum under it, and a bar at the bottom for the rows ticked. */
.data-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.data-head h1 { font-size: 1.5rem; font-weight: 800; color: var(--text-bright); }
.data-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.data-head-actions .btn { padding: 8px 14px; font-size: 0.875rem; }
/* The same height in every tab (the one of Wykonane, with its lines), so nothing below it jumps. */
.data-kpis { display: flex; flex-wrap: wrap; align-items: stretch; min-height: 110px; margin-bottom: 16px; border: 1px solid var(--border-bright); border-radius: 14px; background: var(--surface); }
.data-period { align-self: center; margin: 12px 14px; }
/* One width for every month and "Cały czas" (the longest, "Październik 2026", fits), the arrow at its end. */
.data-period > summary.btn { display: flex; justify-content: space-between; width: 172px; padding: 7px 12px; font-size: 0.8125rem; }
.data-period > summary::after { content: ' ▾'; font-size: 0.75rem; color: var(--text-dim); }
.data-period .admin-menu { left: 0; right: auto; }
.data-kpi { flex: 1 1 180px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-left: 1px solid var(--border); }
.data-kpi > div > span, .data-split > span { display: block; font-size: 0.75rem; font-weight: 600; color: var(--text-dim); text-decoration: underline dotted rgba(255,255,255,0.25); text-underline-offset: 3px; }
.data-kpi strong { display: block; margin-top: 2px; white-space: nowrap; font-size: 1.125rem; font-weight: 800; color: var(--text-bright); font-variant-numeric: tabular-nums; }
.data-spark { flex: 0 1 90px; min-width: 40px; height: 28px; }
.data-spark polyline { fill: none; stroke: var(--blue-bright); stroke-width: 1.5; stroke-linejoin: round; }
.data-split { flex: 1.4 1 240px; flex-direction: column; align-items: stretch; justify-content: center; gap: 6px; }
.data-split-bar { display: flex; gap: 2px; height: 8px; overflow: hidden; border-radius: 4px; background: rgba(255,255,255,0.06); }
.data-split-bar i { background: var(--who); }
.data-split p { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 0.75rem; }
.data-split .admin-person { font-size: 0.75rem; color: var(--text-dim); text-decoration: none; }
.data-table input[type="checkbox"] { vertical-align: middle; }
.data-card { position: relative; border: 1px solid var(--border-bright); border-radius: 14px; background: var(--surface); }
/* Maile: every mail by its group; then one mail as sent, its code beside it while edited. */
.mail-page .mail-intro { margin: -6px 0 18px; }
.mail-group { margin-bottom: 14px; overflow: hidden; }
.mail-group-title { margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 0.875rem; font-weight: 600; color: var(--text-bright); }
.mail-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: inherit; text-decoration: none; }
.mail-row + .mail-row { border-top: 1px solid var(--border); }
.mail-row:hover { background: rgba(255,255,255,0.03); }
.mail-row:focus-visible { outline: 2px solid rgba(59,130,246,0.55); outline-offset: -2px; }
.mail-row-text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.mail-row strong { font-size: 0.875rem; font-weight: 500; color: var(--text-bright); }
.mail-row small { font-size: 0.8125rem; color: var(--text-dim); }
.mail-row svg { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--text-dim); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mail-tag { flex: none; padding: 2px 8px; border: 1px solid var(--border-bright); border-radius: 999px; font-size: 0.6875rem; color: var(--blue-bright); }
.mail-back { display: inline-block; margin-bottom: 8px; font-size: 0.8125rem; color: var(--text-dim); text-decoration: none; }
.mail-back:hover { color: var(--text-bright); }
/* The list and a preview in one centred column; the code and its preview take the page. */
.admin-section.mail-page { max-width: 880px; margin-inline: auto; }
.admin-section.mail-page.is-coding { max-width: none; }
.mail-detail { display: grid; gap: 16px; align-items: start; }
.mail-detail.is-coding { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.mail-view { overflow: hidden; min-width: 0; }
.mail-view-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--border); }
.mail-view-bar > strong { margin-right: auto; font-size: 0.875rem; color: var(--text-bright); }
.mail-view-pick { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.admin .mail-view-pick select { max-width: 100%; }
.mail-view-line { margin: 0; padding: 10px 16px; border-bottom: 1px solid var(--border); font-size: 0.8125rem; color: var(--text-dim); overflow-wrap: anywhere; }
.mail-view-line span { color: var(--text-bright); }
.mail-frame { display: block; width: 100%; height: 640px; border: 0; background: #060608; }
.mail-form { display: grid; gap: 14px; padding: 16px; min-width: 0; }
.mail-form .admin-hint { margin: 0; }
.mail-part { display: grid; gap: 6px; }
.mail-part .field { margin: 0; }
.mail-part code, .mail-vars button { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; }
.mail-part code { color: var(--text-dim); }
.admin .mail-part :is(input, textarea) { width: 100%; }
.admin .mail-part textarea.mail-code { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; line-height: 1.6; resize: vertical; tab-size: 2; }
.mail-reset { justify-self: start; padding: 0; border: 0; background: none; font: inherit; font-size: 0.75rem; color: var(--text-dim); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.mail-reset:hover { color: var(--text-bright); }
.mail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.mail-vars .earn-note { margin: 0; }
.mail-vars ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.mail-vars li span { display: none; }
.mail-vars button { padding: 3px 8px; border: 1px solid var(--border-bright); border-radius: 6px; background: none; color: var(--text-bright); cursor: pointer; }
.mail-vars button:hover { border-color: var(--blue-bright); }
.mail-error { margin: 0; font-size: 0.8125rem; color: #f87171; }
@media (max-width: 1100px) { .mail-detail.is-coding { grid-template-columns: minmax(0, 1fr); } }
/* Notes: the team's pages on the left, the one open beside it, written like a document:
   a title, then blocks of text and tables with no field borders. A block's buttons sit in
   the gap over it and show while the pointer or the cursor is in the block. */
.note-page { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
.note-side { position: sticky; top: 28px; display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 56px); padding: 14px; }
.note-side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.note-side-head h1 { font-size: 1.125rem; font-weight: 800; color: var(--text-bright); }
.note-side-head form { margin: 0; }
.note-side-head .btn { padding: 7px 12px; font-size: 0.8125rem; }
.admin .note-side .data-search input { width: 100%; }
.note-list { display: flex; flex-direction: column; gap: 1px; min-height: 0; margin: 0 -6px; overflow-y: auto; }
.note-list .admin-empty { margin: 6px; }
.note-row { display: grid; gap: 1px; padding: 8px 10px; border-radius: 8px; color: inherit; text-decoration: none; }
.note-row:hover { background: rgba(255,255,255,0.04); }
.note-row.is-active { background: rgba(255,255,255,0.08); }
.note-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.875rem; font-weight: 600; color: var(--text-bright); }
.note-row small { font-size: 0.75rem; color: var(--text-dim); }
.note-bin { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 0; border-top: 1px solid var(--border); font-size: 0.8125rem; color: var(--text-dim); text-decoration: none; }
.note-bin:hover, .note-bin.is-active { color: var(--text-bright); }
.note-doc { min-width: 0; padding: 22px 28px 28px; }
.note-none { display: grid; place-items: center; min-height: 280px; }
.note-none .admin-empty { max-width: 44ch; margin: 0; text-align: center; }
.note-back { display: none; }
.note-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 6px; }
.admin .note-head .note-title { flex: 1 1 12em; min-width: 0; padding: 4px 0; border: 0; border-radius: 0; background: none; font-family: var(--font-display); font-size: 1.625rem; font-weight: 700; color: var(--text-bright); }
.admin .note-head .note-title:focus-visible { outline: none; box-shadow: 0 1px 0 var(--border-bright); }
.note-status { font-size: 0.75rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.note-status.is-error { color: #fca5a5; }
.note-head .btn { padding: 6px 12px; font-size: 0.8125rem; }
.note-clash { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; padding: 10px 12px; border: 1px solid rgba(251,191,36,0.4); border-radius: 10px; background: rgba(251,191,36,0.07); font-size: 0.8125rem; color: var(--text-bright); }
.note-clash[hidden] { display: none; }
.note-clash span { flex: 1 1 18em; }
.note-clash .btn { padding: 6px 12px; font-size: 0.8125rem; }
.note-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; min-height: 30px; padding: 2px 0; transition: opacity var(--dur-base) var(--ease-out); }
.note-tools-end { display: flex; gap: 2px; margin-left: auto; }
.note-tools button { padding: 3px 8px; border: 0; border-radius: 6px; background: none; font: inherit; font-size: 0.75rem; font-weight: 500; color: var(--text-dim); cursor: pointer; }
.note-tools button:hover { background: rgba(255,255,255,0.07); color: var(--text-bright); }
.note-tools button:focus-visible { outline: 2px solid rgba(59,130,246,0.55); outline-offset: -1px; }
@media (hover: hover) { .note-block:not(:hover, :focus-within) .note-tools { opacity: 0; } }
.admin .note-block textarea { display: block; width: 100%; max-width: 92ch; padding: 0; border: 0; border-radius: 0; background: none; font-size: 0.9375rem; line-height: 1.7; color: var(--text); resize: none; overflow: hidden; }
.admin .note-doc .note-block textarea:focus-visible { outline: none; color: var(--text-bright); }
/* As wide as what is in it: a cell breaks its line only past 44 characters (or at Shift+Enter), and a table wider than the page scrolls. */
.note-table { width: max-content; border-collapse: collapse; font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.note-table td { min-width: 72px; max-width: 44ch; height: 33px; padding: 6px 10px; border: 1px solid var(--border-bright); white-space: pre-wrap; overflow-wrap: break-word; vertical-align: top; color: var(--text-bright); }
.note-table tr:first-child td { background: rgba(255,255,255,0.04); font-weight: 600; }
.note-table tr:first-child td:empty::before { content: 'Nagłówek'; font-weight: 400; color: var(--text-dim); opacity: 0.6; pointer-events: none; }
.note-table td:focus { outline: 2px solid rgba(59,130,246,0.7); outline-offset: -2px; background: rgba(59,130,246,0.06); }
/* A table's own controls are on the table. The handles: a pill across the top edge of the
   column and one down the left edge of the row in use, half over the border; each opens a
   small menu. "+" along the right and the bottom edge adds one more at the end. */
.note-grid { position: relative; display: grid; grid-template-columns: minmax(0, max-content) 20px; gap: 4px; }
.note-grid > .data-scroll { grid-area: 1 / 1; }
.note-plus { padding: 0; border: 0; border-radius: 6px; background: rgba(255,255,255,0.04); font: inherit; font-size: 0.875rem; line-height: 1; color: var(--text-dim); cursor: pointer; transition: opacity var(--dur-base) var(--ease-out), background-color var(--t) var(--ease-out); }
.note-plus:hover { background: rgba(255,255,255,0.1); color: var(--text-bright); }
.note-plus:focus-visible { outline: 2px solid rgba(59,130,246,0.55); outline-offset: -1px; }
.note-plus.is-col { grid-area: 1 / 2; }
.note-plus.is-row { grid-area: 2 / 1; height: 20px; }
.note-grid .note-handle { position: absolute; z-index: 5; top: 0; left: 36px; translate: -50% -50%; transition: opacity var(--dur-base) var(--ease-out); }
.note-grid .note-handle.is-row { top: 17px; left: 0; }
.note-grid .note-handle[open] { z-index: 41; }
.note-grid .note-handle.plan-menu > summary { display: grid; place-items: center; width: 30px; height: 12px; padding: 0; border: 1px solid var(--border-bright); border-radius: 6px; background: #1b1b22; color: var(--text-dim); }
.note-grid .note-handle.is-row.plan-menu > summary { width: 12px; height: 30px; }
.note-handle > summary::before { content: ''; width: 15px; height: 3px; background: radial-gradient(circle, currentColor 1px, transparent 1.5px) 0 0 / 5px 3px; }
.note-handle.is-row > summary::before { width: 3px; height: 15px; background-size: 3px 5px; }
.note-grid .note-handle.plan-menu:is(:hover, [open]) > summary { border-color: rgba(59,130,246,0.7); background: #1d2a44; color: var(--text-bright); }
.note-handle > summary:focus-visible { outline: 2px solid rgba(59,130,246,0.7); outline-offset: 1px; }
.note-handle .admin-menu { left: 0; right: auto; }
.note-handle.is-end .admin-menu { left: auto; right: 0; }
.note-handle .admin-menu button { white-space: nowrap; }
.note-handle .is-danger { color: #fca5a5; }
@media (hover: hover) { .note-grid:not(:hover, :focus-within) :is(.note-handle:not([open]), .note-plus) { opacity: 0; } }
@media (pointer: coarse) {
  .note-grid .note-handle.plan-menu > summary { width: 40px; height: 18px; border-radius: 9px; }
  .note-grid .note-handle.is-row.plan-menu > summary { width: 18px; height: 40px; }
}
.note-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.note-add .btn { padding: 6px 12px; font-size: 0.8125rem; }
.note-doc > .admin-hint { margin: 0 0 14px; }
.note-bin-actions { display: flex; gap: 6px; justify-content: flex-end; }
:is(.note-bin-actions form, form.note-bin-actions) { margin: 0; }
.note-bin-actions .btn { padding: 5px 12px; font-size: 0.8125rem; }
/* On a phone: the list, or the page with a way back to it. */
@media (max-width: 900px) {
  .note-page { grid-template-columns: minmax(0, 1fr); }
  .note-side { position: static; max-height: none; }
  .note-page.is-open .note-side, .note-page:not(.is-open) .note-doc { display: none; }
  .note-back { display: inline-block; }
  .note-doc { padding: 16px; }
  .admin .note-head .note-title { flex-basis: 100%; font-size: 1.375rem; }
}
.data-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.data-tabs { display: flex; gap: 4px; margin-right: auto; }
.data-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; font-size: 0.8125rem; font-weight: 600; color: var(--text-dim); text-decoration: none; }
.data-tabs a:hover { color: var(--text-bright); }
.data-tabs a.is-active { background: rgba(255,255,255,0.08); color: var(--text-bright); }
.data-search { margin: 0; }
.admin .data-search input { width: 260px; padding: 7px 10px 7px 30px; background: #0c0c10 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23a0a0b4' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='4.5'/%3E%3Cpath d='M10.5 10.5 14 14'/%3E%3C/svg%3E") 10px center / 14px no-repeat; }
.data-chip > summary { padding: 6px 12px; border: 1px dashed var(--border-bright); border-radius: 999px; font-size: 0.8125rem; color: var(--text-dim); }
.data-chip > summary::after { content: ' ▾'; font-size: 0.75rem; }
.data-chip.is-set > summary { border-style: solid; border-color: rgba(59,130,246,0.55); background: rgba(59,130,246,0.1); color: #bfdbfe; }
.data-sort > summary.btn { padding: 6px 10px; font-size: 0.875rem; }
.data-clear { font-size: 0.8125rem; color: var(--text-dim); }
.admin-menu a[aria-current="true"] { background: rgba(255,255,255,0.07); }
.data-scroll { position: relative; overflow-x: auto; }  /* relative: an absolute child (.sr-only) stays inside the scroll, not past the page's edge */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.data-table th { padding: 10px 12px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.02); font-weight: 600; text-align: left; white-space: nowrap; color: var(--text-dim); }
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; color: var(--text); }
.data-table .num { text-align: right; color: var(--text-bright); }
.data-table .data-check { width: 36px; padding-right: 0; }
.data-row:hover > td { background: rgba(255,255,255,0.025); }
.data-row.is-picked > td, .data-row.is-open > td { background: rgba(59,130,246,0.08); }
.data-ref { font-weight: 700; color: var(--text-bright); text-decoration: none; }
/* A row opens anywhere it is clicked: its details, the specs and our note (✎ when there is one). */
.data-row:has(.data-ref) { cursor: pointer; }
.data-note { margin-left: 4px; font-size: 0.8125rem; color: #c4b5fd; }
.data-table .data-more-col { width: 36px; padding-left: 0; text-align: center; }
.data-open { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 0.9375rem; line-height: 1; color: var(--text-dim); text-decoration: none; }
.data-open:hover, .data-open[aria-expanded="true"] { background: rgba(255,255,255,0.08); color: var(--text-bright); }
.data-ref:hover { text-decoration: underline; text-underline-offset: 3px; }
.data-dim { color: var(--text-dim); }
.data-table td.data-wrap { min-width: 220px; white-space: normal; }
.data-pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--who) 15%, transparent); font-size: 0.75rem; font-weight: 600; color: color-mix(in srgb, var(--who) 65%, white); }
.data-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--who); }
.data-status { font-size: 0.75rem; color: #fca5a5; }
.data-more > td { padding: 14px 16px 18px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.02); }
.data-empty { padding: 28px 16px; font-size: 0.875rem; text-align: center; color: var(--text-dim); }
.data-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 0 0 14px 14px; background: rgba(255,255,255,0.02); font-size: 0.8125rem; color: var(--text-dim); }
.data-foot strong { color: var(--text-bright); }
.data-pages { display: flex; align-items: center; gap: 6px; }
.data-pages .btn { padding: 3px 10px; font-size: 0.875rem; }
.data-pages .btn.is-off { opacity: 0.4; pointer-events: none; }
.data-bulk { position: fixed; z-index: 45; left: 50%; bottom: 24px; translate: -50% 0; display: flex; align-items: center; gap: 4px; padding: 6px; border: 1px solid var(--border-bright); border-radius: 12px; background: #1b1b22; box-shadow: 0 16px 40px rgba(0,0,0,0.6); font-size: 0.8125rem; }
.data-bulk[hidden] { display: none; }
.data-bulk span { padding: 0 10px; font-weight: 600; color: var(--text-bright); }
.data-bulk button { padding: 6px 12px; border: 0; border-radius: 8px; background: rgba(255,255,255,0.07); font: inherit; font-weight: 600; color: var(--text-bright); cursor: pointer; }
.data-bulk button:hover { background: rgba(255,255,255,0.12); }
.data-bulk .is-danger { color: #fca5a5; }
.data-bulk .is-danger:hover { background: rgba(248,113,113,0.15); }
@media (max-width: 720px) { .admin .data-search input { width: 100%; } .data-search { flex: 1 1 100%; } .data-kpi { border-left: 0; border-top: 1px solid var(--border); } }
/* Rozliczenia, like the Klienci page: the month with its state and buttons; a
   card for each person (what they get, made of what, paid out or not) and the
   month's total; the sessions beside the costs, who shares them and the
   donations' split; the rates in a drawer from the right. */
.earn-when { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.earn-month { display: flex; align-items: stretch; border: 1px solid var(--border-bright); border-radius: 9px; background: var(--surface); }
.earn-month > a { display: grid; place-items: center; width: 32px; color: var(--text-bright); text-decoration: none; }
.earn-month > a:hover { background: rgba(255,255,255,0.06); }
.earn-month > a.is-off { opacity: 0.35; pointer-events: none; }
.earn-month > details { border-inline: 1px solid var(--border); }
.earn-month summary { width: 172px; padding: 7px 12px; font-size: 0.875rem; font-weight: 600; text-align: center; color: var(--text-bright); }
.earn-month summary::after { content: ' ▾'; font-size: 0.75rem; color: var(--text-dim); }
.earn-month .admin-menu { left: 0; right: auto; max-height: 320px; overflow-y: auto; }
.earn-badge { padding: 2px 8px; border-radius: 6px; background: rgba(139,92,246,0.16); font-size: 0.75rem; font-weight: 600; white-space: nowrap; color: #c4b5fd; }
.earn-badge.is-paid, .earn-badge.is-closed { background: rgba(74,222,128,0.12); color: #86efac; }
.earn-badge.is-none { background: rgba(255,255,255,0.07); color: var(--text-dim); }
.earn-icon { width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.data-head-actions form { margin: 0; }
.admin-page > .earn-page { container-type: inline-size; }
.earn-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin-bottom: 16px; }
/* A member's month: Klienci's strip, without the period (it is in the title row). */
.earn-kpis .data-kpi:first-child { border-left: 0; }
.earn-card { display: flex; flex-direction: column; padding: 16px 18px; border: 1px solid var(--border-bright); border-radius: 14px; background: var(--surface); }
.earn-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; font-size: 0.9375rem; font-weight: 700; color: var(--text-bright); }
.earn-card > small { margin-top: 14px; font-size: 0.75rem; color: var(--text-dim); }
.earn-big { font-size: 1.625rem; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; color: var(--text-bright); font-variant-numeric: tabular-nums; }
.earn-lines { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; margin: 12px 0 14px; font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.earn-lines dt { color: var(--text-dim); }
.earn-lines dd { text-align: right; color: var(--text-bright); }
.is-minus { color: #f87171 !important; }
.earn-pay { margin-top: auto; }
.earn-pay .btn { width: 100%; padding: 7px 12px; font-size: 0.8125rem; }
.earn-undo { padding: 0; border: 0; background: none; font: inherit; font-size: 0.75rem; color: var(--text-dim); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.earn-undo:hover { color: var(--text-bright); }
.earn-note { margin: 0; font-size: 0.75rem; color: var(--text-dim); }
.earn-owed { margin-top: auto; font-size: 0.8125rem; font-weight: 600; color: #c4b5fd; }
.earn-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 16px; align-items: stretch; }
.earn-grid.is-single { grid-template-columns: minmax(0, 1fr); }
.earn-sessions { display: flex; flex-direction: column; }
.earn-sessions .data-scroll { flex: 1; }
.earn-title { display: flex; align-items: center; gap: 8px; margin-right: auto; font-size: 0.9375rem; font-weight: 700; color: var(--text-bright); }
.earn-ref { font-weight: 700; color: var(--text-bright) !important; }
.earn-mine { color: #93c5fd !important; }
.earn-sessions .data-search { margin-left: auto; }
.earn-sessions .earn-title { margin-right: 0; }
/* A long service name takes two lines rather than pushing the amounts out of the card. */
.earn-sessions td:nth-child(4) { min-width: 12em; white-space: normal; }
.earn-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.earn-box { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; }
.earn-box h2 { font-size: 0.9375rem; font-weight: 700; color: var(--text-bright); }
.earn-box-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.earn-box-head strong { font-size: 0.9375rem; font-weight: 800; white-space: nowrap; color: var(--text-bright); font-variant-numeric: tabular-nums; }
.earn-cost { display: flex; align-items: center; gap: 8px; min-height: 30px; font-size: 0.875rem; }
.earn-cost-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.earn-cost strong { font-weight: 600; white-space: nowrap; color: var(--text-bright); font-variant-numeric: tabular-nums; }
.earn-chip { padding: 1px 8px; border-radius: 999px; background: rgba(255,255,255,0.07); font-size: 0.75rem; white-space: nowrap; color: var(--text-dim); }
.earn-more > summary { padding: 0 6px; border-radius: 6px; font-size: 1rem; line-height: 1.5; color: var(--text-dim); }
.earn-more > summary:hover, .earn-more[open] > summary { background: rgba(255,255,255,0.08); color: var(--text-bright); }
.earn-more .is-danger { color: #fca5a5; }
.earn-add > summary { width: max-content; list-style: none; font-size: 0.875rem; font-weight: 600; color: #93c5fd; cursor: pointer; }
.earn-add > summary::-webkit-details-marker { display: none; }
.earn-add[open] > summary { margin-bottom: 8px; }
.earn-add form { display: grid; grid-template-columns: minmax(0, 1fr) 6.5em; gap: 8px; }
.admin .earn-add input { width: 100%; }
.earn-add input[name="amount"] { text-align: right; }
.earn-add .btn { padding: 7px 14px; font-size: 0.875rem; }
.earn-ticks { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.earn-tick { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border-bright); border-radius: 9px; font-size: 0.875rem; cursor: pointer; }
.earn-tick:has(:checked) { border-color: rgba(59,130,246,0.6); background: rgba(59,130,246,0.1); }
.earn-tick:has(:disabled) { cursor: default; opacity: 0.6; }
.earn-bar { height: 6px; }
.earn-parts { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; }
.earn-parts label { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 0.75rem; color: var(--text-dim); }
/* A percent field with its % inside the box (rates, the donations' split). */
.earn-pct { display: inline-flex; align-items: center; border: 1px solid var(--border-bright); border-radius: 8px; background: #0c0c10; }
.earn-pct:focus-within { border-color: rgba(59,130,246,0.7); }
.admin .earn-pct input { width: 100%; min-width: 0; padding: 6px 2px 6px 10px; border: 0; background: none; box-shadow: none; outline: 0; font-weight: 600; }
.earn-pct i { padding-right: 9px; font-size: 0.75rem; font-style: normal; color: var(--text-dim); }
.earn-pct.is-rest { border-style: dashed; }
.earn-pct.is-rest input { color: var(--text-dim); }
.earn-drawer { position: fixed; inset: 0 0 0 auto; width: min(680px, 100vw); max-width: none; height: 100vh; max-height: none; margin: 0; padding: 0; border: 0; border-left: 1px solid var(--border-bright); background: #111116; color: var(--text); }
.earn-drawer[open] { animation: earn-in var(--dur-base) var(--ease-out); }
.earn-drawer::backdrop { background: rgba(6,6,8,0.8); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
/* The planner's "Zwrot i dane": a form, so narrower than the rates' table. */
.plan-drawer { width: min(480px, 100vw); }
.plan-drawer .earn-drawer-body .plan-label:first-child { margin-top: 0; }
@keyframes earn-in { from { translate: 100% 0; } }
.earn-drawer > form { display: flex; flex-direction: column; height: 100%; }
.earn-drawer-head { position: relative; padding: 20px 56px 14px 20px; }
.earn-drawer-head h2 { font-size: 1.125rem; font-weight: 800; color: var(--text-bright); }
.earn-drawer-head p { margin-top: 4px; font-size: 0.8125rem; color: var(--text-dim); }
.earn-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; font-size: 1.375rem; color: var(--text-dim); cursor: pointer; }
.earn-close:hover { background: rgba(255,255,255,0.07); color: var(--text-bright); }
.earn-drawer-body { flex: 1; overflow-y: auto; padding: 0 20px 20px; }
.earn-rates th:first-child, .earn-rates td:first-child { white-space: normal; }
.earn-rates td { padding-block: 7px; }
.earn-rates td .earn-pct { width: 64px; }
.earn-rates input:placeholder-shown { font-weight: 400; }
.earn-rates .earn-pct:has(input:placeholder-shown) { border-style: dashed; background: none; }
.earn-hint { display: inline-block; min-width: 5.5em; margin-left: 6px; font-size: 0.75rem; color: var(--text-dim); }
.earn-drawer-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); }
.earn-drawer-foot span { margin-right: auto; font-size: 0.75rem; color: var(--text-dim); }
.earn-drawer-foot .btn { padding: 8px 16px; font-size: 0.875rem; }
.earn-sessions .data-table td { padding-block: 7px; }
.earn-sessions :is(.data-pill, .earn-badge) { padding-block: 0; }
.earn-sessions .data-pages .btn:disabled { opacity: 0.4; pointer-events: none; }
.earn-sessions .data-pages .btn[hidden] { display: none; }
/* Beside the costs, the sessions' columns keep set widths and the service takes the rest. */
@container (min-width: 1576px) {
  /* The cards follow the grid under them: the people over the sessions, the month's total over the costs. */
  .earn-cards { display: flex; }
  .earn-card { flex: 1 1 0; min-width: 0; }
  .earn-card:last-child { flex: 0 0 400px; margin-left: 4px; }
  .earn-sessions .data-table { table-layout: fixed; }
  .earn-sessions th:nth-child(1) { width: 110px; }
  .earn-sessions th:nth-child(2) { width: 120px; }
  .earn-sessions th:nth-child(3) { width: 140px; }
  .earn-sessions th:nth-child(5) { width: 130px; }
  .earn-sessions th:nth-child(6) { width: 90px; }
  .earn-sessions th:nth-child(7) { width: 130px; }
  .earn-sessions th:nth-child(8) { width: 120px; }
  .earn-sessions th:last-child { width: 132px; }
  .earn-sessions td { overflow: hidden; text-overflow: ellipsis; }
  .earn-sessions td:nth-child(4) { white-space: nowrap; }
}
/* Too narrow for the sessions' nine columns beside the costs: the costs go under them, side by side. */
@container (max-width: 1575px) {
  .earn-grid { grid-template-columns: minmax(0, 1fr); }
  .earn-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
}
@media (max-width: 600px) { .earn-rates :is(th, td):nth-child(2), .earn-hint { display: none; } }
.admin-more-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 24px; align-items: start; }
.admin-more-grid .admin-dl { margin: 0; }
@media (max-width: 900px) { .admin-more-grid { grid-template-columns: minmax(0, 1fr); } }
/* Płatności: one table, a list of money to see to picked over it; a count on the menu link while any is open. */
.admin-count.is-due { background: rgba(248,113,113,0.16); color: #fca5a5; }
.pay-page .data-tabs { flex-wrap: wrap; }
/* Its lists keep their columns in the same places: the number, who, the amount, then what differs, and the action at the right edge, in rows of one height.
   The widths hold while the table has room; a narrow window squeezes them before it scrolls. */
.pay-page .data-table th { box-sizing: border-box; }
.pay-page .data-table th:first-child { width: 150px; }
.pay-page .data-table th:nth-child(2) { width: 200px; }
.pay-page .data-table th.num { width: 120px; }
.pay-page .data-table td { height: 56px; padding-block: 6px; }
.pay-page .data-table td:nth-child(2) { min-width: 0; }
.pay-page .data-table :is(th, td):last-child { width: 1%; text-align: right; }
.pay-page td:last-child .btn { min-width: 184px; }
.pay-page td:last-child .pay-inline { flex-wrap: nowrap; justify-content: flex-end; }
.pay-page td:last-child .pay-inline .btn { min-width: 0; }
.pay-inline { display: flex; align-items: center; gap: 8px; margin: 0; }
.admin .pay-inline input[type="number"] { width: 6em; padding-block: 5px; }
.pay-inline .btn, .pay-page td .btn { padding: 5px 12px; font-size: 0.8125rem; }
.pay-page td form { margin: 0; }
.data-table td.pay-late { color: #fca5a5; font-weight: 600; }
.pay-done > td { opacity: 0.55; }
/* "Wyślij klientowi maila" by the refund field. */
.admin-check { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 0.8125rem; color: var(--text-dim); cursor: pointer; }
.pay-inline .admin-check { margin: 0; white-space: nowrap; }
/* The refund calculator by "Zwrócono": a link that opens the order's parts in a panel over the page (admin.js places it), so nothing around it moves. */
.refund-parts { margin: -6px 0 14px; }
.refund-parts > button { padding: 0; border: 0; background: none; font: inherit; font-size: 0.8125rem; color: var(--text-dim); text-decoration: underline dotted; text-underline-offset: 3px; cursor: pointer; }
.refund-parts > button:hover { color: var(--text-bright); }
.refund-panel { position: fixed; inset: auto; box-sizing: border-box; width: 360px; margin: 0; padding: 12px 14px; border: 1px solid var(--border-bright); border-radius: 10px; background: var(--surface); box-shadow: 0 16px 40px rgba(0,0,0,0.55); font-size: 0.8125rem; white-space: normal; color: var(--text); }
.refund-panel > p:first-child { margin: 0 0 6px; font-weight: 700; color: var(--text-bright); }
.refund-panel .admin-check { margin: 0; padding: 5px 0; white-space: normal; color: var(--text); }
.refund-panel .admin-check span { margin-left: auto; white-space: nowrap; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.refund-panel .admin-check:last-of-type { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--border); }
.refund-panel .admin-hint { margin: 8px 0 0; }
.pay-inline { flex-wrap: wrap; }
.pay-inline .refund-parts { margin: 0; }
/* Payments against a stand-in for Przelewy24: a word in the menu on every page, so test money is never taken for real. */
.admin-nav .admin-test { padding: 0 6px; font-size: 0.75rem; font-weight: 700; color: #fcd34d; cursor: help; }
.admin-list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.875rem; }
.admin-list-row:last-of-type { border-bottom: 0; }
.admin-list-row .btn { padding: 5px 12px; font-size: 0.8125rem; }
/* While the next page is fetched nothing can be clicked twice; the page dims only when the answer is slow (over 0.4 s), so a quick click does not flash. */
[aria-busy="true"] { opacity: 0.6; pointer-events: none; transition: opacity 150ms 400ms; }
.admin-hint, .admin-empty { font-size: 0.8125rem; color: var(--text-dim); margin-bottom: 12px; }
.admin-hint a { color: var(--text-bright); }
.admin-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 10px; }
.admin-legend > span:not(.admin-person) { flex-basis: 100%; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-head { font-size: 0.6875rem; text-align: center; color: var(--text-dim); padding-bottom: 2px; }
.cal-day { display: grid; place-items: center; padding: 5px 0; border: 1px solid var(--border); border-radius: 7px; background: rgba(255,255,255,0.03); text-decoration: none; color: var(--text); line-height: 1.25; }
.cal-day b { font-size: 0.8125rem; font-weight: 600; }
a.cal-day:hover { border-color: var(--border-bright); background: rgba(255,255,255,0.06); }
.cal .is-off { background: repeating-linear-gradient(135deg, rgba(255,255,255,0.06) 0 4px, transparent 4px 8px); }
button.cal-day { width: 100%; font: inherit; cursor: pointer; }
button.cal-day:hover:not(:disabled) { border-color: var(--border-bright); background-color: rgba(255,255,255,0.06); }
.cal .is-today { outline: 1px solid var(--text-dim); outline-offset: 1px; }
.cal .is-selected { outline: 2px solid var(--blue-bright); outline-offset: 1px; }
.cal .is-past { opacity: 0.35; }
/* Each day: a dot per session in the colour of whoever runs it, a crossed-out initial per person away. */
.cal-marks { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2px 3px; min-height: 13px; }
.cal-marks i { width: 6px; height: 6px; border-radius: 50%; background: var(--who); }
.cal-marks em { font-style: normal; font-size: 0.625rem; color: var(--text-dim); }
.cal-marks s { font-size: 0.625rem; font-weight: 700; line-height: 1; color: var(--who); text-decoration-thickness: 1.5px; }
/* Marking someone's absences: the calendar takes their colour, and a banner over it says whose days these are. */
.admin-mode { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 12px; padding: 9px 12px; border: 1px solid var(--who, rgba(59,130,246,0.6)); border-radius: 10px; background: color-mix(in srgb, var(--who, #3b82f6) 12%, transparent); font-size: 0.8125rem; color: var(--text-bright); }
.admin-mode > span { flex: 1 1 14em; }
.admin-mode .btn { margin-left: auto; padding: 4px 12px; font-size: 0.8125rem; }
.admin-calendar.is-marking { border-color: var(--who); box-shadow: 0 0 0 1px color-mix(in srgb, var(--who) 35%, transparent); }
.cal .is-mine { border-color: var(--who); background-color: color-mix(in srgb, var(--who) 24%, transparent); }

/* The planner (the admin's queue page): what waits for a date on the left, the
   week on the right with a row for each person. It fills the window on a wide
   screen, each side scrolling on its own. */
.admin-page:has(> .plan-app) { display: flex; flex-direction: column; height: 100vh; padding: 0; }
.plan-app { flex: 1; min-height: 0; display: grid; grid-template-columns: 320px minmax(0, 1fr); }
.plan-side { min-height: 0; overflow-y: auto; padding: 20px 18px; border-right: 1px solid var(--border); }
.plan-main { min-width: 0; min-height: 0; max-width: none; margin: 0; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; padding: 20px 24px; }
@media (max-width: 900px) {
  .admin-page:has(> .plan-app) { height: auto; }
  .plan-app { display: block; }
  .plan-side { border-right: 0; border-bottom: 1px solid var(--border); }
  .plan-main { overflow: visible; padding: 16px; }
  .plan-main .plan-bar { top: 0; margin: -10px -16px 0; padding: 10px 16px; }  /* .plan-main: the base rule comes later in the file */
}

/* The list: two tabs, groups by how urgent, a card per order. */
.plan-side-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.plan-side-head h2 { font-size: 1.125rem; font-weight: 700; color: var(--text-bright); }
.plan-sort > summary { font-size: 0.8125rem; color: var(--text-dim); }
/* At the list's right edge, so its menu opens leftwards: the list scrolls and would cut off one opening past it. */
.plan-sort .admin-menu { left: auto; right: 0; }
.plan-tabs { display: flex; gap: 4px; margin-bottom: 12px; padding: 4px; border: 1px solid var(--border); border-radius: 10px; background: rgba(255,255,255,0.02); }
.plan-tabs a { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 7px 4px; border-radius: 7px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; color: var(--text-dim); text-decoration: none; }
.plan-tabs a.is-active { background: rgba(255,255,255,0.08); color: var(--text-bright); }
.plan-group { margin: 16px 0 8px; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); }
.plan-group.is-late { color: #f87171; }
.plan-group.is-soon { color: #a78bfa; }
.plan-task { margin-bottom: 10px; border: 1px solid var(--border-bright); border-radius: 12px; background: var(--surface); cursor: grab; transition: border-color var(--dur-quick) var(--ease-out); }
.plan-task:hover { border-color: rgba(255,255,255,0.18); }
.plan-task.is-open { border-color: rgba(59,130,246,0.6); background: rgba(59,130,246,0.06); }
.plan-task.is-dragging { opacity: 0.45; }
/* A card reads top down by weight: the service, the client (and who has it), the hardware, then the labels (the date
   promised, priority in blue) with the order's number. Each is one line in the same place on every card, cut short over wrapping. */
.plan-task-main { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; color: var(--text); text-decoration: none; }
.plan-task-main > span { display: flex; align-items: center; gap: 8px; min-width: 0; }
:is(.plan-task-head, .plan-task-sub, .plan-task-hw) > :first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-task-head b { font-size: 1rem; font-weight: 700; color: var(--text-bright); }
.plan-task-sub { font-size: 0.875rem; font-weight: 500; }
.plan-task-hw { font-size: 0.75rem; color: var(--text-dim); }
.plan-task-foot { margin-top: 6px; font-size: 0.75rem; color: var(--text-dim); }
.plan-task-foot strong { flex: none; margin-left: auto; white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; }
.plan-due { padding: 1px 8px; border-radius: 999px; background: rgba(255,255,255,0.06); font-size: 0.75rem; white-space: nowrap; color: var(--text-dim); }
.plan-due.is-late { background: rgba(248,113,113,0.14); color: #fca5a5; }
.plan-due.is-soon { background: rgba(139,92,246,0.14); color: #c4b5fd; }
.plan-task-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 12px; }
.plan-task-actions form { margin: 0; }
/* Who asked for an order nobody has yet; a member's look at those orders cannot be dragged. */
.plan-task-main > .plan-wants { flex-wrap: wrap; gap: 4px 10px; font-size: 0.75rem; color: #93c5fd; }
.plan-wants .admin-person { font-size: 0.75rem; }
.plan-task.is-preview { cursor: default; }
.plan-task-note { flex-basis: 100%; margin: 0; font-size: 0.75rem; color: var(--text-dim); }
/* Someone without a rate for the service: they would get nothing of it. */
.plan-norate { margin-left: 6px; padding: 1px 6px; border-radius: 5px; background: rgba(248,113,113,0.12); font-size: 0.6875rem; font-weight: 600; color: #fca5a5; }
.plan-task-actions .btn, .plan-task-actions summary.btn { padding: 6px 12px; font-size: 0.8125rem; }
.admin-priority { padding: 1px 8px; border-radius: 999px; background: rgba(59,130,246,0.18); font-size: 0.75rem; font-weight: 600; white-space: nowrap; color: #93c5fd; }

/* The panel for the order being given a date. */
.plan-panel-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.plan-back { font-size: 0.8125rem; color: var(--text-dim); text-decoration: none; }
.plan-back:hover { color: var(--text-bright); }
.plan-back kbd { margin-left: 4px; padding: 0 5px; border: 1px solid var(--border-bright); border-radius: 4px; font: inherit; font-size: 0.6875rem; }
.plan-menu > summary[aria-label] { padding: 0 8px; border-radius: 7px; font-size: 1.25rem; line-height: 1.4; color: var(--text-dim); }
.plan-panel-top .admin-menu { left: auto; right: 0; }
.plan-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 1.5rem; font-weight: 800; color: var(--text-bright); }
.plan-badge { padding: 2px 9px; border-radius: 999px; background: rgba(255,255,255,0.08); font-size: 0.75rem; font-weight: 600; color: var(--text-bright); }
.plan-badge.is-due { background: rgba(139,92,246,0.16); color: #c4b5fd; }
.plan-badge.is-done { background: rgba(74,222,128,0.14); color: #86efac; }
.plan-badge.is-live { background: rgba(59,130,246,0.18); color: #93c5fd; }
.plan-service { margin: 6px 0 2px; font-size: 0.9375rem; color: var(--text-bright); }
.plan-client { font-size: 0.8125rem; color: var(--text-dim); }
.plan-promise { margin: 12px 0; padding: 9px 12px; border: 1px solid var(--border-bright); border-radius: 10px; font-size: 0.8125rem; color: var(--text-bright); }
.plan-promise::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: currentColor; vertical-align: 1px; }
.plan-promise.is-late { border-color: rgba(248,113,113,0.5); background: rgba(248,113,113,0.08); color: #fca5a5; }
.plan-side .admin-dl { margin: 0 0 12px; }
.plan-label { display: flex; justify-content: space-between; gap: 8px; margin: 16px 0 8px; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); }
.plan-label small { font-weight: 400; letter-spacing: 0; text-transform: none; }
.plan-who { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; padding: 10px 12px; border: 1px solid var(--border-bright); border-radius: 10px; cursor: pointer; }
.plan-who:has(:checked) { border-color: rgba(59,130,246,0.65); background: rgba(59,130,246,0.08); }
.plan-who input { appearance: none; flex: none; width: 18px; height: 18px; margin: 1px 0 0; border: 1px solid var(--border-bright); border-radius: 50%; background: #0c0c10; cursor: pointer; }
.plan-who input:checked { border-color: var(--blue-bright); background: radial-gradient(circle, var(--blue-bright) 0 4px, #0c0c10 5px); }
.plan-who input:focus-visible { outline: 2px solid rgba(59,130,246,0.55); outline-offset: 2px; }
.plan-who small { display: block; margin-top: 3px; font-size: 0.75rem; color: var(--text-dim); }
.plan-least { padding: 1px 7px; border-radius: 999px; background: rgba(74,222,128,0.14); font-size: 0.6875rem; font-style: normal; font-weight: 600; color: #86efac; }
.plan-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 6px; margin-bottom: 12px; }
.plan-day { position: relative; }
.plan-day input { position: absolute; opacity: 0; pointer-events: none; }
.plan-day span { display: block; padding: 7px 4px; border: 1px solid var(--border-bright); border-radius: 8px; font-size: 0.8125rem; text-align: center; white-space: nowrap; color: var(--text-bright); cursor: pointer; }
.plan-day input:checked + span { border-color: rgba(59,130,246,0.7); background: rgba(59,130,246,0.16); color: #bfdbfe; }
.plan-day input:focus-visible + span { outline: 2px solid rgba(59,130,246,0.55); outline-offset: 2px; }
/* The day and hour picked in the planner, said in one line; their fields are for a phone, or a browser without admin.js. */
.plan-when { margin: 0 0 8px; padding: 10px 12px; border: 1px dashed var(--border-bright); border-radius: 10px; font-size: 0.9375rem; font-weight: 600; color: var(--text-bright); }
.plan-when.is-missing { border-color: rgba(248,113,113,0.6); color: #fca5a5; }
@media (min-width: 901px) and (scripting: enabled) { .plan-typed { display: none; } }
@media (max-width: 900px), (scripting: none) { .plan-when { display: none; } }
.plan-form .plan-zone { margin: 0 0 12px; }
/* A part folded under its name: the invoice in "Zwrot i dane", the withdrawal in the panel's menu. */
.plan-fold > summary { display: flex; align-items: baseline; gap: 8px; padding: 8px 0; list-style: none; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); cursor: pointer; }
.plan-fold > summary::-webkit-details-marker { display: none; }
.plan-fold > summary::after { content: '▾'; margin-left: auto; }
.plan-fold[open] > summary::after { content: '▴'; }
.plan-fold > summary small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.75rem; font-weight: 400; letter-spacing: 0; text-transform: none; }
.plan-fold[open] > summary { margin-bottom: 6px; }
.plan-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.admin-menu .plan-fold > summary { padding: 8px 10px; white-space: nowrap; border-radius: 7px; font-size: 0.875rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text-bright); }
.admin-menu .plan-fold > summary:hover { background: rgba(255,255,255,0.07); }
.admin-menu .plan-fold form { padding: 0 10px 6px; }
.admin-menu .plan-fold .field { margin-bottom: 6px; }
.plan-go, .plan-only { width: 100%; margin-top: 6px; }
.plan-only { padding: 9px 14px; font-size: 0.875rem; }
.plan-form .admin-hint { margin: 10px 0 0; }
.plan-history { margin-top: 16px; font-size: 0.75rem; color: var(--text-dim); }

/* Over the week: what needs a look, then the week's controls. */
.plan-banner { --tone: var(--who, #3b82f6); display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 16px; border: 1px solid color-mix(in srgb, var(--tone) 55%, transparent); border-radius: 12px; background: color-mix(in srgb, var(--tone) 9%, transparent); font-size: 0.875rem; }
.plan-banner > span { flex: 1 1 24em; }
.plan-banner > span::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 10px; border-radius: 50%; background: var(--tone); vertical-align: 1px; }
.plan-banner strong { margin-right: 6px; color: color-mix(in srgb, var(--tone) 55%, white); }
.plan-banner > a:not(.btn) { font-weight: 600; color: color-mix(in srgb, var(--tone) 55%, white); text-decoration: none; }
.plan-banner > a:not(.btn):hover { text-decoration: underline; }
.plan-banner form { margin: 0; }
.plan-banner .btn { padding: 6px 12px; font-size: 0.8125rem; }
/* The week's controls stay on top while the week scrolls under them. */
.plan-bar { position: sticky; top: -20px; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -10px -24px 0; padding: 10px 24px; background: var(--bg); }
:is(.plan-session, .admin-sessions li)[draggable="true"] { cursor: grab; }
.plan-bar [data-week-nav].is-drop, .cal-day.is-drop { outline: 2px dashed var(--blue-bright); outline-offset: 2px; }
.plan-bar .btn, .plan-bar summary.btn { padding: 6px 10px; font-size: 0.8125rem; }
.plan-range { margin: 0 4px; font-size: 1.125rem; font-weight: 700; white-space: nowrap; color: var(--text-bright); }
.plan-bar-gap { flex: 1; }
.plan-due-menu > summary { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; white-space: nowrap; border: 1px solid rgba(139,92,246,0.55); border-radius: 999px; background: rgba(139,92,246,0.12); font-size: 0.8125rem; font-weight: 600; color: #c4b5fd; }
.plan-due-menu > summary::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #8b5cf6; }
.plan-due-menu > summary::after { content: '▾'; font-size: 0.75rem; }
.plan-due-menu .admin-menu { left: 0; right: auto; min-width: 280px; }
.plan-due-days { padding: 6px 10px 8px; font-size: 0.8125rem; color: var(--text-dim); }
.plan-people { display: flex; align-items: center; }
.plan-people > summary { display: inline-flex; align-items: center; gap: 4px; color: var(--text-dim); }
.plan-people > summary::after { content: '▾'; font-size: 0.6875rem; }
.plan-people > summary:hover { color: var(--text-bright); }
.plan-people .admin-menu { left: 0; right: auto; top: calc(100% + 2px); }
.plan-people .admin-menu a { display: flex; align-items: center; gap: 8px; }
.plan-tick { width: 12px; font-size: 0.75rem; color: var(--blue-bright); }
.plan-view { display: flex; padding: 3px; border: 1px solid var(--border-bright); border-radius: 9px; }
.plan-view a { padding: 4px 10px; border-radius: 6px; font-size: 0.8125rem; color: var(--text-dim); text-decoration: none; }
.plan-view a.is-active { background: rgba(255,255,255,0.08); font-weight: 600; color: var(--text-bright); }

/* A week: a row for each person, a column for each day, and in each day its
   hours from 00:00 at the top to 23:30 at the bottom. A session sits at its hour. */
.plan-scroll { flex: 1 0 auto; min-height: 480px; overflow-x: auto; }
.plan { display: grid; grid-template-columns: 96px repeat(var(--days), minmax(74px, 1fr)); grid-template-rows: auto repeat(var(--rows), minmax(440px, 1fr)); row-gap: 10px; min-width: 640px; height: 100%; }
/* Each row is a band of its own (the days on top, then one per person), apart from the next. */
:is(.plan-corner, .plan-dayhead, .plan-person, .plan-cell) { border-top: 1px solid var(--border-bright); border-bottom: 1px solid var(--border-bright); background-color: rgba(255,255,255,0.02); }
:is(.plan-corner, .plan-person) { border-left: 1px solid var(--border-bright); border-radius: 12px 0 0 12px; }
:is(.plan-dayhead, .plan-cell).is-end { border-right: 1px solid var(--border-bright); border-radius: 0 12px 12px 0; }
.plan-person { background-color: color-mix(in srgb, var(--who) 9%, #0e0e12); }
.plan-corner, .plan-dayhead { padding: 9px 6px; font-size: 0.75rem; color: var(--text-dim); }
.plan-dayhead { border-left: 1px solid var(--border); text-align: center; white-space: nowrap; }
.plan-corner { display: flex; align-items: center; }
.plan-dayhead b { font-size: 0.875rem; color: var(--text-bright); }
/* Saturday and Sunday in red, in the days' row only. */
.plan-dayhead.is-weekend, .plan-dayhead.is-weekend b { background-color: rgba(248,113,113,0.1); color: #f87171; }
.plan-dayhead.is-today, .plan-dayhead.is-today b { background: rgba(59,130,246,0.08); color: #93c5fd; }
.plan-person { position: relative; padding: 12px 30px 12px 10px; }
.plan-person small { display: block; margin-top: 4px; font-size: 0.75rem; color: var(--text-dim); }
.plan-ruler { position: absolute; top: 6px; bottom: 6px; right: 6px; width: 22px; }
.plan-ruler i { position: absolute; top: calc(var(--at) * 100%); right: 0; font-size: 0.625rem; font-style: normal; line-height: 1; color: var(--text-dim); }
.plan-cell { position: relative; min-width: 0; border-left: 1px solid var(--border); }
/* Every day on black, like the days gone by, but today, which is lit. */
.plan-cell { background-color: rgba(0,0,0,0.25); }
.plan-cell.is-today { background-color: rgba(59,130,246,0.07); }
.plan-cell.is-off { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.04) 0 6px, transparent 6px 12px); }
.plan-cell.is-marking { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--who) 45%, transparent); }
.plan-cell.is-drop { box-shadow: inset 0 0 0 2px var(--blue-bright); background-color: rgba(59,130,246,0.07); }
/* The day's hours: a faint line every six hours, the present moment in red. */
.plan-axis { position: absolute; inset: 6px 3px; background: repeating-linear-gradient(to bottom, transparent 0 calc(25% - 1px), rgba(255,255,255,0.05) calc(25% - 1px) 25%); }
.plan-now { position: absolute; z-index: 3; left: -3px; right: -3px; top: calc(var(--at) * 100%); height: 2px; background: #ef4444; }
/* Today, the hours gone by: greyed out over the places to click (after them, on the
   same layer), so no date can be set there; the sessions stay on top, to open. */
.plan-past { position: absolute; z-index: 1; inset: 0 0 auto; height: calc(var(--at) * 100%); border-radius: 6px 6px 0 0; background: repeating-linear-gradient(135deg, rgba(255,255,255,0.04) 0 6px, transparent 6px 12px), rgba(6,6,8,0.55); cursor: not-allowed; }
.plan-session { position: absolute; z-index: 2; top: min(calc(var(--at) * 100%), calc(100% - 20px)); left: calc(var(--lane) * 100% / var(--lanes)); width: calc(100% / var(--lanes) - 2px); height: 20px; display: flex; align-items: center; gap: 4px; padding: 0 5px; overflow: hidden; border: 1px solid var(--border-bright); border-left: 3px solid var(--who); border-radius: 0; background: #17171d; font-size: 0.8125rem; line-height: 1; white-space: nowrap; color: var(--text); text-decoration: none; }
.plan-session b { font-family: 'JetBrains Mono', monospace; color: var(--text-bright); }
/* The order's number in full (VAIN-0004) where the tile is wide enough, #0004 where it is not. */
.plan-session { container-type: inline-size; }
.plan-ref i { display: none; font-style: normal; }
.plan-ref::before { content: '#'; }
@container (min-width: 140px) {
  .plan-ref i { display: inline; }
  .plan-ref::before { content: none; }
}
.plan-session span { overflow: hidden; text-overflow: ellipsis; color: var(--text-dim); }
.plan-session em { margin-left: auto; font-style: normal; color: #86efac; }
a.plan-session:hover { z-index: 4; background: #1f1f27; }
.plan-session[draggable="true"] { cursor: grab; }
.plan-session.is-priority { box-shadow: 0 0 0 1px rgba(147,197,253,0.7); }
.plan-session.is-due { border: 1px dashed rgba(139,92,246,0.85); border-left: 3px solid var(--who); background: #1c1630; }
.plan-session.is-done { border-color: rgba(74,222,128,0.4); border-left-color: var(--who); background: #10201a; }
.plan-session.is-live { border-color: rgba(59,130,246,0.85); border-left: 3px solid var(--who); background: #121c30; }
.plan-session.is-missed { border-color: rgba(248,113,113,0.45); border-left-color: var(--who); background: #241414; }
.plan-session.is-missed :is(b, span) { text-decoration: line-through; }
.plan-session.is-active { z-index: 5; outline: 2px solid var(--blue-bright); outline-offset: 1px; }
/* Max and Complete: three hours tall, a line each for the service, the hour with the client, and their board
   (the rows' least height is what three hours need for those lines). */
.plan-session.is-tall { top: min(calc(var(--at) * 100%), calc(100% - var(--span) * 100%)); height: calc(var(--span) * 100%); min-height: 52px; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; padding: 2px 6px; line-height: 1.2; }
.plan-session.is-tall > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-session.is-tall > .plan-session-top { display: flex; align-items: center; gap: 4px; }
.plan-session.is-tall .plan-session-what { font-weight: 600; color: var(--text-bright); }
.plan-session.is-tall .plan-session-top span { min-width: 0; color: var(--text); }
/* A free day: on hover, a session or an absence for it, in the night hours at the top and under the sessions, never over them. */
.plan-add { position: absolute; z-index: 3; top: 3px; right: 3px; margin: 0; opacity: 0; transition: opacity var(--dur-quick) var(--ease-out); }
.plan-cell:hover .plan-add, .plan-add:focus-within { opacity: 1; }
.plan-add button { padding: 1px 6px; border: 1px solid var(--border-bright); border-radius: 5px; background: var(--surface); font: inherit; font-size: 0.625rem; color: var(--text-dim); cursor: pointer; }
.plan-add button:hover { border-color: rgba(248,113,113,0.6); color: #fca5a5; }
/* A day away: the whole day says so (and, for the owner or the person, clicking it takes it back). */
.plan-mark { position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center; text-align: center; }
.plan-mark button, .plan-mark > span { width: 100%; height: 100%; padding: 4px; border: 0; background: none; font: inherit; font-size: 0.75rem; font-weight: 600; color: var(--text-dim); cursor: pointer; }
.plan-mark > span { display: flex; align-items: center; justify-content: center; cursor: default; }
.plan-mark small { display: block; font-size: 0.6875rem; font-weight: 400; }
.plan-mark button:hover { color: var(--text-bright); }
.plan-mark.is-cover button { border: 1px dashed color-mix(in srgb, var(--who) 50%, transparent); border-radius: 6px; }
.plan-mark.is-cover button:hover { background: color-mix(in srgb, var(--who) 12%, transparent); }
/* Setting a date: the whole free day takes a click, a line shows the hour under the mouse, and the place picked shows the order. */
.plan-slot { position: absolute; inset: 0; z-index: 1; border-radius: 6px; cursor: crosshair; }
.plan-slot:hover { background: rgba(59,130,246,0.06); }
.plan-ghost { position: absolute; z-index: 6; left: -2px; right: -2px; top: calc(var(--at) * 100%); height: 0; border-top: 2px solid var(--blue-bright); pointer-events: none; }
.plan-ghost span { position: absolute; left: 2px; top: -9px; padding: 1px 5px; border-radius: 4px; background: var(--blue-bright); font-family: 'JetBrains Mono', monospace; font-size: 0.6875rem; font-weight: 700; color: #fff; }
.plan-picked { position: absolute; z-index: 4; left: 0; right: 0; top: min(calc(var(--at) * 100%), calc(100% - 20px)); height: 20px; display: flex; align-items: center; padding: 0 5px; overflow: hidden; border: 1px solid #818cf8; border-radius: 0; background: rgba(129,140,248,0.3); font-size: 0.6875rem; font-weight: 700; white-space: nowrap; color: #e0e7ff; pointer-events: none; }

/* "Jak poszło?": the session opened, in a box beside it. */
.plan-pop { position: absolute; z-index: 30; top: calc(var(--at) * 100%); left: calc(100% + 4px); width: 400px; max-height: 520px; overflow-y: auto; padding: 16px; border: 1px solid var(--border-bright); border-radius: 14px; background: var(--surface); box-shadow: 0 18px 50px rgba(0,0,0,0.6); font-size: 0.8125rem; }
.plan-cell.is-flip .plan-pop { left: auto; right: calc(100% + 4px); }
.plan-pop.is-up { top: auto; bottom: calc((1 - var(--at)) * 100% - 20px); }
.plan-pop-head { display: flex; align-items: center; gap: 8px; }
.plan-pop-head strong { font-size: 1.0625rem; color: var(--text-bright); }
.plan-pop-close { margin-left: auto; font-size: 1.25rem; line-height: 1; color: var(--text-dim); text-decoration: none; }
.plan-pop-what { margin-top: 6px; color: var(--text-bright); }
.plan-pop-when { margin-top: 2px; color: var(--text-dim); }
.plan-pop .plan-label { margin-top: 14px; }
/* The client's data in it: what they said suits them, their zone, e-mail, specs, invoice, our note, the payment. */
.plan-pop .admin-dl { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--border); white-space: normal; }
.plan-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.plan-seg label { position: relative; flex: 1 1 auto; }
.plan-seg input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.plan-seg :is(span, a) { display: block; padding: 7px 8px; border: 1px solid var(--border-bright); border-radius: 8px; font-size: 0.78rem; text-align: center; white-space: nowrap; color: var(--text-bright); text-decoration: none; cursor: pointer; }
.plan-seg a { flex: 1 1 auto; }
.plan-seg:not(.plan-durations) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.plan-seg:not(.plan-durations) :is(span, a) { padding: 7px 4px; white-space: normal; }
.plan-seg input:checked + span { border-color: rgba(74,222,128,0.6); background: rgba(74,222,128,0.12); color: #86efac; }
.plan-seg input[value="missed"]:checked + span { border-color: rgba(248,113,113,0.6); background: rgba(248,113,113,0.1); color: #fca5a5; }
.plan-seg input:focus-visible + span { outline: 2px solid rgba(59,130,246,0.55); outline-offset: 2px; }
.admin .plan-durations input[name="duration_other"] { flex: 1 1 5em; min-width: 0; padding: 7px 8px; text-align: center; }
.plan-pop .admin-hint { margin: 8px 0 0; }
.admin input.plan-pop-note { width: 100%; margin-top: 10px; }
/* "Zmień termin" and "Usuń termin": two buttons of one size, side by side. */
.plan-pop-actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin-top: 12px; }
.plan-pop-actions form { display: flex; margin: 0; }
.plan-pop-actions .btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 36px; padding: 0 12px; font-size: 0.8125rem; line-height: 1; }
/* "Wykonane wcześniej": the outcome form, folded, for a session whose hour has not come yet. */
.plan-early { margin-top: 12px; }
.plan-early > summary { width: max-content; list-style: none; font-size: 0.8125rem; font-weight: 600; color: #93c5fd; cursor: pointer; }
.plan-early > summary::-webkit-details-marker { display: none; }
.plan-pop-done { margin-top: 10px; font-weight: 600; color: #86efac; }

/* Under the week: what the colours mean. The month view: the calendar and the day beside it. */
.plan-legend { font-size: 0.75rem; color: var(--text-dim); }
.plan-key { display: inline-block; width: 14px; height: 10px; margin: 0 6px 0 14px; border-radius: 3px; vertical-align: -1px; }
.plan-key:first-child { margin-left: 0; }
.plan-key.is-planned { background: rgba(59,130,246,0.4); }
.plan-key.is-due { border: 1px dashed #8b5cf6; }
.plan-key.is-off { background: repeating-linear-gradient(135deg, rgba(255,255,255,0.25) 0 2px, transparent 2px 4px); }
.plan-key.is-done { background: rgba(74,222,128,0.4); }
.plan-key.is-missed { border: 1px solid rgba(248,113,113,0.7); }
.plan-month { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.plan-month-side > * + * { margin-top: 16px; }
@media (max-width: 1200px) { .plan-month { grid-template-columns: minmax(0, 1fr); } }

@media (prefers-reduced-motion: reduce) {
  /* Content still fades in, faster and without sliding; nothing springs. */
  :root { --dur-reveal: 240ms; --ease-back: var(--ease-out); }
  .fade-in { translate: none; }
  .fade-in.stagger.visible > * { animation-name: reveal-still; }
  .orbit-ring > i { animation: none; }
  .book-float.is-hidden { transform: none; }
  .btn:active, .book-float:active, .guide-float:active { scale: none; }
  .nav-links.is-sliding, .guide-toc.is-sliding, .bench-tabs.is-sliding { transition: none; }
  .nav-links.is-moving::before, .guide-toc.is-moving::before, .bench-tabs.is-moving::before { scale: none; }
  .price-swap { animation-name: reveal-still; }
  .earn-drawer[open] { animation: none; }
}
@keyframes reveal-still { from { opacity: 0; } }

/* Less transparency asked for by the system: the glass bars and dialogs go solid. */
@media (prefers-reduced-transparency: reduce) {
  body > nav, .nav-links:popover-open, .guide-toc, .guide-float, .dl-dialog, .admin .admin-nav .admin-links {
    background: var(--bg2);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* The bar folds in steps as the screen narrows. First Donate and Discord keep
   only their icons (the words stay for screen readers, the tap area grows to
   40px); then the links scroll inside their capsule and Book a session moves to
   the floating button; on phones the wordmark goes too. */
@media (max-width: 1360px) {
  .nav-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .nav-discord, .nav-donate { min-width: 40px; min-height: 40px; justify-content: center; }
  .nav-right { gap: 8px; }
}
@media (max-width: 1000px) {
  /* minmax(0,1fr) lets the link row shrink below its content width, which is what
     makes it scrollable. Without the 0 floor the grid item refuses to shrink. */
  body > nav {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 16px;
    padding: 0 40px;
  }
  .nav-links {
    justify-self: center;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    gap: 2px;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { white-space: nowrap; }
  .nav-cta { display: none; }
}
@media (max-width: 600px) {
  body > nav { gap: 10px; padding: 0 20px; }
  /* The link row folds into a menu under the hamburger: a glass panel under
     the bar, one link per line, the open section tinted. */
  .nav-burger { display: grid; }
  .nav-links:not(:popover-open) { display: none; }
  .nav-links {
    position: fixed;
    inset: 68px 12px auto;
    /* stretch, not the 1000px step's center: on a positioned box that would
       shrink the panel to its words. */
    justify-self: stretch;
    width: auto;
    max-width: none;
    flex-direction: column;
    align-items: stretch;
    padding: 6px;
    overflow: visible;
    border-radius: 18px;
    background: rgba(10,10,13,0.94);
    border-color: rgba(255,255,255,0.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 20px 48px rgba(0,0,0,0.6);
  }
  .nav-links::before { display: none; }
  .nav-links a { display: block; padding: 12px 16px; border-radius: 12px; font-size: 1rem; }
  .nav-links.has-indicator a.active, .nav-links a.active { background: rgba(59,130,246,0.1); }
  @media (prefers-reduced-motion: no-preference) {
    .nav-links { transition: opacity 140ms var(--ease-in), translate 140ms var(--ease-in), overlay 140ms allow-discrete, display 140ms allow-discrete; }
    .nav-links:popover-open { transition-duration: 260ms; transition-timing-function: var(--ease-out); }
    .nav-links:not(:popover-open) { opacity: 0; translate: 0 -8px; }
    @starting-style { .nav-links:popover-open { opacity: 0; translate: 0 -8px; } }
  }
  .nav-right { gap: 4px; }
  .nav-logo .nav-wordmark { display: none; }
  .book-float { left: 16px; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); justify-content: center; }
  .guide-float { bottom: max(16px, env(safe-area-inset-bottom)); }
  .book-float:has(~ .guide-float) { display: none; }
  .nav-region-menu { inset: 68px 12px auto; width: auto; border-radius: 18px; }
  .nav-region-item { min-height: 44px; font-size: 1rem; }
  section { padding: 48px 20px; }
  .page-header { padding: 100px 20px 48px; }
  .footer-bottom { flex-direction: column; gap: 8px; padding: 14px 20px; text-align: center; }
}

/* ─────────────────────────────────────────────────────────────
   GUIDE PAGES
   Shared by every guide-*.html.
   ───────────────────────────────────────────────────────────── */
.guide-wrap { max-width: 1320px; margin: 0 auto; counter-reset: fig; }
/* A guide that opens straight on its section bar: the section starts where the
   bar's pin sticks (under the 60px nav), so it sits at the top from the first frame. */
.guide-start { padding-top: 60px; }

/* Sticky section tabs: a floating glass bar the content blurs behind, with
   the same gliding lens as the header nav, tinted blue. Crossing into a new
   section moves the lens to its tab. */
/* The pin holds the bar 10px under the 60px nav. Its background is the page
   colour in exactly two places: the gap above the bar and the two corners
   outside the bar's rounded top, so text scrolling up never shows between the
   nav and the bar while the bar itself stays glass. */
.guide-toc-pin {
  position: sticky;
  top: 60px;
  z-index: 50;
  padding-top: 10px;
  margin: 0 0 30px;
  background:
    linear-gradient(var(--bg), var(--bg)) top / 100% 10px no-repeat,
    radial-gradient(circle at 100% 100%, transparent 15.5px, var(--bg) 16px) 0 10px / 16px 16px no-repeat,
    radial-gradient(circle at 0 100%, transparent 15.5px, var(--bg) 16px) 100% 10px / 16px 16px no-repeat;
}
.guide-toc {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 4px;
  padding: 5px;
  background: rgba(10,10,13,0.72);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 14px 32px rgba(0,0,0,0.5);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
}
.guide-toc::before {
  top: 5px;
  bottom: 5px;
  border-radius: 11px;
  border-color: rgba(147,197,253,0.35);
  background: linear-gradient(180deg, rgba(96,165,250,0.24), rgba(59,130,246,0.08) 55%, rgba(59,130,246,0.14));
  box-shadow: inset 0 1px 0 rgba(191,219,254,0.4), inset 0 -1px 0 rgba(147,197,253,0.1), 0 6px 18px rgba(0,0,0,0.45);
}
.guide-toc::-webkit-scrollbar { display: none; }
.guide-toc a {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  border-radius: 11px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dim);
  text-decoration: none;
  transition: color var(--t) var(--ease-out), background-color var(--t) var(--ease-out);
}
.toc-n {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  opacity: 0.85;
  transition: color var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out);
}
.guide-toc a:hover { color: var(--text-bright); background: rgba(255,255,255,0.03); }
.guide-toc a.active { color: var(--blue-bright); }
.guide-toc a.active .toc-n { color: var(--blue-bright); opacity: 1; }
/* Fixed nav (60px) + this floating bar must not cover the heading a jump lands on. */
.guide-section-label[id] { scroll-margin-top: 150px; }


/* Steps: each one a glass card like the home page's, on a numbered rail. The
   number sits level with the card's title; the rail runs from one number to
   the next, 4px clear of each. */
.steps { display: flex; flex-direction: column; }
.step { display: flex; gap: 24px; position: relative; }
.step:not(:last-child) { padding-bottom: 16px; }
.step:not(:last-child)::before,
.step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 19px;
  top: 62px;
  bottom: -14px;
  width: 1px;
  background: var(--border);
}
/* Reading progress: shared.js marks a step reached when it crosses the upper
   part of the screen. Its number lights up with a small pop, and the rail to
   it fills downward, so the page shows how far you've got. */
.step:not(:last-child)::after {
  background: rgba(59,130,246,0.6);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 600ms var(--ease-in-out);
}
.step:has(+ .step.is-reached)::after { transform: none; }
.step-left { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; padding-top: 18px; }
.step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(16,16,20,0.6);
  border: 1px solid var(--border-bright);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-bright);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: border-color var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}
.step.is-reached .step-num {
  border-color: rgba(96,165,250,0.55);
  background: linear-gradient(180deg, rgba(96,165,250,0.24), rgba(59,130,246,0.08));
  box-shadow: inset 0 1px 0 rgba(191,219,254,0.35);
  color: #dbeafe;
  animation: step-pop 380ms var(--ease-back);
}
@keyframes step-pop { 40% { scale: 1.1; } }
/* Every guide block is a glass card like the home page's: install steps on
   their rail, first steps and FAQ answers stacked 16px apart. */
.step-body {
  --field-glow: 0.14;
  --field-dots: 0.15;
  position: relative;
  flex: 1;
  min-width: 0;
  padding: 26px 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 30px;
  align-items: start;
  background: rgba(16,16,20,0.45);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.step-body + .step-body { margin-top: 16px; }
/* Steps with nothing to show on the right keep the full width. */
.step-body:not(:has(.step-media)) { display: block; }
.step-text { min-width: 0; }
.step-media { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.step-fig { margin: 0; counter-increment: fig; }
/* The number hangs in the left padding, so a caption with bold or code in it
   still wraps as one sentence. */
.step-cap {
  position: relative;
  margin-top: 8px;
  padding-left: 24px;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-dim);
}
.step-cap::before {
  content: counter(fig, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--blue-bright);
  opacity: 0.8;
}
.step-cap strong { color: var(--text); font-weight: 600; }
.step-cap .cmd { font-size: 0.8125rem; padding: 0 5px; }
.step-title { font-size: 1rem; font-weight: 700; color: var(--text-bright); margin-bottom: 8px; letter-spacing: -0.01em; line-height: 1.35; }
.step-desc { font-size: 0.92rem; color: var(--text-dim); line-height: 1.75; }
.step-desc strong { color: var(--text); }
.step-desc a { color: var(--text-bright); text-underline-offset: 3px; text-decoration-color: var(--border-bright); }
.step-desc a:hover { text-decoration-color: var(--blue-bright); }
.step-desc + .step-note { margin-top: 14px; }

/* Images */
.step-img {
  width: 100%;
  /* Required: with width set in CSS and a height attribute on the tag, the
     browser uses the attribute value literally and the picture stretches. */
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: block;
  transition: border-color var(--t) var(--ease-out), transform var(--t) var(--ease-out);
  background: var(--surface);
}
.step-img:hover { border-color: var(--border-bright); transform: scale(1.01); }

/* Zoomable image: <a class="zoom" href="full image"><img></a>. A plain link, so
   it opens without JS and takes Enter natively; shared.js turns it into the lightbox. */
.zoom { display: block; cursor: zoom-in; border-radius: 10px; }

/* A page that shows one thing at a time (Modded BIOS, the tools, first steps,
   the installation guide), all in one frame: on the left a panel of one fixed
   shape with what the chosen entry shows, on the right the glass list that
   chooses, across the bottom the chosen entry's text. The panels lie in one
   cell, and so do the texts (except the guide's, which differ too much in
   length), the unchosen ones invisible, so nothing moves when the choice
   changes. A phone stacks them: the row of names, the panel, the text. */
section:has(> .guide-wrap) { max-width: 1400px; }
/* The header's own bottom padding is the gap to the page under it, on every page. */
.page-header + section { padding-top: 0; }
.tour { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px 24px; align-items: start; }
.tour > .pbx-tabs { grid-area: 1 / 2; }
.tour .tour-text { grid-area: 2 / 1 / 3 / -1; margin-top: 0; }
.tour [hidden] { visibility: hidden; }
/* The panel: 16:9, or as tall as the list beside it when the list is taller.
   A screenshot is drawn in it at its own size, or smaller when it does not fit. */
.tour-shot { grid-area: 1 / 1; align-self: stretch; position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 0; overflow: hidden; display: grid; place-items: center; margin: 0; background: rgba(16,16,20,0.45); border: 1px solid var(--border); border-radius: 16px; }
/* Every picture keeps the same margin inside the panel, so windows cut to their own outline never touch its edge. */
.tour-shot .zoom { position: absolute; inset: 20px; }
.tour-shot .step-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: scale-down; border: 0; border-radius: 0; background: none; }
/* The boot menu with each board's key to open it, in one row under the picture. */
.tour-shot.has-keys .zoom { inset: 20px 20px 92px; }
.tour-shot.has-keys .step-img { object-position: 50% 100%; }
.boot-keys { position: absolute; inset: auto 20px 20px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.boot-keys li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px 10px 16px; border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,0.03); font-size: 0.9375rem; font-weight: 600; color: var(--text); }
.boot-keys kbd { min-width: 38px; padding: 4px 8px; border: 1px solid var(--border-bright); border-bottom-width: 3px; border-radius: 7px; background: rgba(255,255,255,0.06); font-family: 'JetBrains Mono', monospace; font-size: 0.8125rem; font-weight: 700; text-align: center; color: var(--text-bright); }
/* Going online, drawn rather than shot: the port, and the order that leads to it. */
.net-card { display: grid; justify-items: center; gap: 14px; width: min(100% - 48px, 560px); text-align: center; }
.net-icon { display: grid; place-items: center; width: 84px; height: 84px; border: 1px solid rgba(59,130,246,0.3); border-radius: 22px; background: rgba(59,130,246,0.08); color: var(--blue-bright); }
.net-title { margin: 0; font-size: 1.25rem; font-weight: 700; color: var(--text-bright); }
.net-order { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; width: 100%; margin: 6px 0 0; padding: 0; list-style: none; }
.net-order li { position: relative; display: grid; justify-items: center; gap: 4px; font-size: 0.8125rem; font-weight: 600; color: var(--text); }
.net-order li + li::before { content: ''; position: absolute; top: 13px; right: calc(50% + 18px); width: calc(100% - 36px + 8px); height: 1px; background: var(--border-bright); }
.net-order span { display: grid; place-items: center; width: 26px; height: 26px; margin-bottom: 4px; border: 1px solid var(--border-bright); border-radius: 50%; background: rgba(255,255,255,0.04); font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--blue-bright); }
.net-order small { font-size: 0.75rem; font-weight: 500; color: var(--text-dim); }
.net-order .is-now span { border-color: var(--blue-bright); background: #2563eb; color: #fff; }
.net-order .is-now { color: var(--blue-bright); }
/* An entry with more than one picture: two arrows and the count between them,
   in the panel's bottom right corner (shared.js steps through, round and round). */
.tour-nav { grid-area: 1 / 1; align-self: end; justify-self: end; z-index: 2; display: flex; align-items: center; gap: 12px; margin: 0 18px 14px 0; font-family: 'JetBrains Mono', monospace; font-size: 0.8125rem; font-variant-numeric: tabular-nums; color: #fff; }
.tour-nav button { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid rgba(255,255,255,0.16); border-radius: 999px; background: rgba(255,255,255,0.1); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #fff; cursor: pointer; transition: background-color var(--t) var(--ease-out); }
.tour-nav button:hover { background-color: rgba(255,255,255,0.2); }
.tour-nav span { min-width: 5ch; text-align: center; }
/* A card of short texts side by side, as many columns as fit. */
.guide-wrap .step-body.step-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.step-cols .step-text { max-width: 72ch; }
@media (prefers-reduced-motion: no-preference) {
  .tour-shot:not([hidden]) img { animation: vt-in 320ms var(--ease-out); }
}
@media (min-width: 901px) {
  /* What lies on the panel's bottom edge, the arrows and a picture's caption,
     is white over a black fade that starts at 95% and thins out upwards with
     no visible end. Only a panel that carries one of them gets the fade, and
     clicks through it still reach the picture. */
  .tour-shot:has(.step-cap)::after, .tour:has(> .tour-nav:not([hidden])) > .tour-shot::after { content: ''; position: absolute; inset: auto 0 0; height: 104px; background: linear-gradient(to top, rgb(0 0 0 / 0.95), rgb(0 0 0 / 0.74) 35%, rgb(0 0 0 / 0.36) 68%, rgb(0 0 0 / 0)); pointer-events: none; }
  .tour-shot .step-cap { position: absolute; z-index: 1; inset: auto 190px 24px 24px; margin: 0; padding: 0; font-size: 0.875rem; color: #fff; pointer-events: none; }
  .tour-shot .step-cap::before { content: none; }
  .tour-shot .step-cap strong { color: #fff; }
}
@media (max-width: 900px) {
  .tour { grid-template-columns: minmax(0, 1fr); }
  .tour > .pbx-tabs { grid-area: 1 / 1; }
  .tour-shot { grid-area: 2 / 1; }
  .tour-shot .zoom { inset: 8px; }
  /* The panel is too small here to carry the arrows: they go under it, at the same right edge. */
  .tour-nav { grid-area: 3 / 1; margin: 0; color: var(--text-dim); }
  .tour-nav button { border-color: rgba(255,255,255,0.07); background: rgba(255,255,255,0.035); color: var(--text); }
  .tour .tour-text { grid-area: 4 / 1; }
  .tour [hidden], .guide-wrap .tour .tour-text[hidden] { display: none; }
}

/* The installation guide: its ten steps are the list. */
.step-n { margin-right: 10px; font-family: 'JetBrains Mono', monospace; font-size: 0.8125rem; font-style: normal; font-weight: 700; letter-spacing: 0.04em; color: var(--blue-bright); }
.pbx-tab .step-n { color: var(--text-dim); }
.tour-guide > .guide-section-label { display: none; }
@media (min-width: 901px) {
  /* Eight names, some long: a size smaller than the other lists, so each stays on one line. */
  .tour-guide .pbx-tab b { font-size: 1.05rem; }
  /* The list is as tall as the panel beside it, its steps spread evenly down it. */
  .tour-guide > .pbx-tabs { align-self: stretch; }
  .tour-guide .pbx-tab { flex: 1 1 0; align-content: center; }
  .guide-wrap .tour-guide .tour-text[hidden] { display: none; }
}
/* On a phone, or with no script to work the list, the guide is read top to
   bottom: every step in the page under the section names, each picture at its
   own size with no panel around it and its numbered caption under it. */
@media (max-width: 900px), (scripting: none) {
  .guide-wrap .tour-guide { display: block; }
  .tour-guide > .pbx-tabs, .tour-guide > .tour-nav { display: none; }
  .tour-guide > .guide-section-label { display: block; }
  .tour-guide > .guide-section-label:first-of-type { margin-top: 0; }
  .guide-wrap .tour-guide .tour-text[hidden], .guide-wrap .tour-guide .tour-shot[hidden] { display: block; visibility: visible; }
  .tour-guide > .tour-text { margin-top: 28px; }
  .tour-guide > .tour-shot { display: block; aspect-ratio: auto; overflow: visible; margin-top: 16px; background: none; border: 0; border-radius: 0; }
  .tour-guide .tour-shot .zoom { position: static; }
  .tour-guide .tour-shot .step-img { position: static; width: auto; max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
  .tour-guide .boot-keys { position: static; margin-top: 10px; gap: 8px; }
  .tour-guide .boot-keys li { flex-direction: column; gap: 6px; padding: 10px 4px; font-size: 0.8125rem; }
}

/* A list of questions in one glass panel, each opening its answer in place
   (the home page's Questions, the playbook FAQ). */
:root {
  --plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
}
.faq-group { position: relative; display: grid; gap: 2px; padding: 6px; background: rgba(255,255,255,0.035); border: 1px solid rgba(255,255,255,0.07); border-radius: 22px; box-shadow: inset 0 1px 0 rgba(255,255,255,0.05); --field-glow: 0.1; }
.faq-item { border: 1px solid transparent; border-radius: 16px; transition: background-color var(--t) var(--ease-out), border-color var(--t) var(--ease-out), box-shadow var(--t) var(--ease-out); }
.faq-item[open] { border-color: rgba(255,255,255,0.09); background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.015) 55%, rgba(255,255,255,0.035)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 6px 16px rgba(0,0,0,0.35); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 17px;
  border-radius: 15px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-bright);
  transition: color var(--t) var(--ease-out), background-color var(--t) var(--ease-out);
}
.faq-item summary::-webkit-details-marker { display: none; }
/* A drawn plus, like the site's other icons; it turns into a cross when open. */
.faq-item summary::after { content: ''; flex-shrink: 0; width: 14px; height: 14px; background: var(--blue-bright); -webkit-mask: var(--plus) center / contain no-repeat; mask: var(--plus) center / contain no-repeat; transition: rotate var(--dur-base) var(--ease-out); }
.faq-item[open] summary::after { rotate: 45deg; }
.faq-item:not([open]) summary:hover { background: rgba(255,255,255,0.04); }
.faq-item[open] summary { color: var(--blue-bright); }
/* Browsers that can animate to height:auto open the answer (260ms,
   decelerating) and close it faster (180ms, accelerating). Others snap. */
@supports (interpolate-size: allow-keywords) {
  .faq-group { interpolate-size: allow-keywords; }
  .faq-item::details-content {
    block-size: 0;
    overflow: clip;
    transition: block-size 180ms var(--ease-in), content-visibility 180ms allow-discrete;
  }
  .faq-item[open]::details-content { block-size: auto; transition: block-size 260ms var(--ease-out), content-visibility 260ms allow-discrete; }
}
@media (prefers-reduced-motion: no-preference) {
  .faq-item[open] .faq-answer { animation: faq-in 320ms var(--ease-out) 40ms both; }
}
@keyframes faq-in { from { opacity: 0; translate: 0 -6px; } }
.faq-answer { padding: 0 17px 17px; font-size: 0.92rem; color: var(--text-dim); line-height: 1.7; max-width: 68ch; }
.faq-answer strong { color: var(--text); font-weight: 600; }
@media (prefers-reduced-motion: reduce) {
  .faq-item summary::after { transition: none; }
  .faq-item::details-content, .faq-item[open]::details-content { transition: none; }
}
.guide-wrap > .guide-section-label:first-child { margin-top: 0; }

/* Info / warning / tip */
.step-note { border-radius: 10px; padding: 11px 16px; display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; }
.step-note-warn { background: rgba(234,179,8,0.05); border: 1px solid rgba(234,179,8,0.18); }
.step-note-info { background: rgba(59,130,246,0.05); border: 1px solid rgba(59,130,246,0.15); }
.step-note-icon { display: flex; flex-shrink: 0; margin-top: 3px; }
.step-note-text { font-size: 0.8125rem; color: var(--text-dim); line-height: 1.65; }
.step-note-text strong { color: var(--text); font-weight: 600; }

/* Code inline */
.cmd { font-family: 'JetBrains Mono', monospace; font-size: 0.8125rem; background: rgba(255,255,255,0.06); border: 1px solid var(--border); border-radius: 5px; padding: 1px 7px; color: var(--text-bright); white-space: nowrap; }

/* Key table */

/* A guide's section heading, in the voice of the home page's subheads: the display font, sentence case, bright. */
.guide-section-label { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text-bright); margin: 38px 0 24px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }

/* Lightbox: a modal <dialog> built by shared.js, so Esc, the focus trap and the
   top layer come from the browser. */
#lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: zoom-out;
}
#lightbox[open] { display: flex; align-items: center; justify-content: center; }
#lightbox::backdrop { background: rgba(0,0,0,0.88); transition: opacity 300ms var(--ease-out); }
/* shared.js grows the image out of its thumbnail and shrinks it back on close. */
#lightbox.is-closing::backdrop { opacity: 0; transition: opacity 220ms var(--ease-in); }
@starting-style { #lightbox[open]::backdrop { opacity: 0; } }
#lightbox-img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 10px;
  border: 1px solid var(--border-bright);
  object-fit: contain;
  pointer-events: none;
  transform-origin: 0 0;
}
/* On a phone 92vw is no bigger than the thumbnail: the image comes at its own size and is
   moved around with a finger ("safe" keeps a wider one's left edge reachable). */
@media (max-width: 760px) {
  #lightbox[open] { overflow: auto; justify-content: safe center; align-items: safe center; }
  #lightbox-img { max-width: none; max-height: none; flex: none; }
}
#lightbox-close {
  position: fixed;
  display: flex;
  top: 20px;
  right: 24px;
  border: 0;
  background: none;
  color: var(--text-dim);
  cursor: pointer;
  line-height: 1;
  transition: color var(--t) var(--ease-out), rotate var(--t) var(--ease-out);
}
#lightbox-close:hover { color: var(--text-bright); rotate: 90deg; }

/* Next guide CTA */
.next-guide-cta {
  --field-glow: 0.2;
  --field-dots: 0.2;
  margin-top: 56px;
  padding: 32px 36px;
  background: rgba(16,16,20,0.45);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  overflow: hidden;
}
.next-guide-cta::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59,130,246,0.55), transparent);
}
.next-guide-left { display: flex; flex-direction: column; }
.next-guide-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.next-guide-desc {
  font-size: 0.875rem;
  color: var(--text-dim);
  line-height: 1.7;
  max-width: 440px;
  margin-bottom: 22px;
}
.next-guide-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-bright);
  text-decoration: none;
  background: linear-gradient(to bottom, #111113, #0a0a0c);
  border: 1px solid #2a2a30;
  border-radius: 10px;
  padding: 9px 18px;
  transition: border-color var(--t) var(--ease-out), transform var(--t) var(--ease-out), box-shadow var(--t) var(--ease-out);
  align-self: flex-start;
}
.next-guide-btn:hover {
  border-color: #38383f;
  transform: translateX(3px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}

@media (prefers-reduced-motion: reduce) {
  .step:not(:last-child)::after { transition: none; }
  .step.is-reached .step-num { animation: none; }
  #lightbox-close:hover { rotate: none; }
}

@media (max-width: 900px) {
  .step-body { grid-template-columns: 1fr; gap: 18px; }
  .guide-toc {
    display: flex;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .guide-toc a { flex: 1 0 auto; white-space: nowrap; }
}
@media (max-width: 600px) {
  .step { gap: 0; }
  .step::before, .step::after { display: none; }
  .step-left { position: absolute; top: 17px; left: 19px; z-index: 2; padding-top: 0; }
  .step-num { width: 30px; height: 30px; font-size: 0.8125rem; }
  .step-body { padding: 20px 18px; }
  .step .step-text > .step-title:first-child { min-height: 22px; padding-left: 42px; }
  /* Long setting names ("Hardware Accelerated GPU Scheduling (HAGS)") ran
     off a phone screen; let them wrap between words. */
  .cmd { white-space: normal; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
  .next-guide-cta { flex-direction: column; padding: 26px 22px; }
}

/* ─────────────────────────────────────────────────────────────
   LEGAL PAGES
   terms.html, regulamin.html, privacy.html and polityka-prywatnosci.html: one reading column.
   ───────────────────────────────────────────────────────────── */
.legal { max-width: 720px; margin: 0 auto; font-size: 0.9rem; line-height: 1.75; }
/* The text opens right under the page header. */
.legal > :first-child { margin-top: 0; }
.legal h2 { font-size: 1.25rem; font-weight: 700; color: var(--text-bright); margin: 30px 0 8px; }
.legal h3 { font-size: 1rem; font-weight: 600; color: var(--text-bright); margin: 18px 0 6px; }
.legal p, .legal ul, .legal ol { margin-bottom: 12px; }
.legal ul, .legal ol { padding-left: 20px; }
.legal li + li { margin-top: 6px; }
.legal strong { color: var(--text-bright); font-weight: 600; }
.legal a { color: var(--text-bright); text-underline-offset: 3px; text-decoration-color: var(--border-bright); }
.legal a:hover { text-decoration-color: var(--blue-bright); }
.legal-form { border: 1px solid var(--border); border-radius: 9px; padding: 16px 18px; color: var(--text-dim); }
.legal-form p:last-child { margin-bottom: 0; }
/* The refund values in point 5: part and value, a package's name over its parts. */
.legal table { width: 100%; margin-bottom: 12px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.legal :is(th, td) { padding: 6px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.legal td:last-child { text-align: right; white-space: nowrap; color: var(--text-bright); }
.legal tbody th { padding-top: 14px; font-weight: 600; color: var(--text-bright); }
