/* hal10k.dev: one terminal session on a black CRT */
:root {
  --bg: #000;
  --green: #39d353;      /* body text */
  --phos: #7dff9b;       /* bright phosphor: headings, highlights */
  --dim: #2a9a45;        /* comments, secondary text */
  --line: #1c5c2c;       /* borders */
  --white: #f4fff6;      /* logo name */
  /* accents, each with one meaning (green stays the main colour) */
  --cyan: #4dd9e8;       /* time, links, the visitor's own input */
  --blue: #4c8dff;       /* mail button */
  --violet: #b583ff;     /* choices: language, chat options, payment */
  --yellow: #ffd23f;     /* amber: waiting, coming soon, offline, low power */
  --red: #ff2a1a;        /* HAL's eye, errors, overclock, lives */
  --panel: #0a1220;      /* dark navy panels for depth (page stays black) */

  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;   /* terminal parts */
  --sans: "IBM Plex Sans", system-ui, sans-serif;            /* text people read */
  --pad: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; } /* phones must not enlarge long lines (the ./rynki "źródła" text grew) */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--green);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--phos); color: var(--bg); }
a { color: var(--phos); }
p, h1, h2, ul, ol, dl, pre { margin: 0; }

:focus-visible { outline: 2px solid var(--phos); outline-offset: 3px; }

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  padding: 8px 12px;
  background: var(--phos);
  color: var(--bg);
  z-index: 20;
}
.skip:focus { left: 8px; }

/* ---------- terminal window ---------- */
.term {
  max-width: 1040px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- top bar: live clock, monitor count, mail, language ---------- */
.topbar {
  position: relative;
  z-index: 1; /* language menu drops over the logo row */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px var(--pad);
  border-bottom: 1px solid var(--line);
  font: 400 0.8125rem/1 var(--mono);
  color: var(--dim);
}
.tb-left, .tb-right { display: flex; align-items: center; gap: 20px; min-width: 0; }
.tb-right { gap: 10px; }
.tb-item { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.tb-time { color: var(--cyan); }
.tb-time time { color: var(--cyan); font-variant-numeric: tabular-nums; }
.tb-tz { margin-left: -2px; }
.tb-mon .dot { margin: 0; }
.tb-ok { color: var(--phos); }
.chip-ok { padding: 5px 9px; border: 1px solid #39d35366; background: #39d3531a; } /* status chip */

.ico {
  width: 14px;
  height: 14px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.flag { width: 16px; height: 10px; flex: none; outline: 1px solid #ffffff26; }

.tb-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  background: none;
  color: var(--green);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
.tb-btn:hover, .tb-btn[aria-expanded="true"] { border-color: var(--phos); color: var(--phos); }
.tb-mail { border-color: #4c8dff88; color: var(--blue); background: #4c8dff14; }
.tb-mail:hover { border-color: var(--blue); color: #9ec0ff; }
.tb-lang { border-color: #b583ff88; color: var(--violet); background: #b583ff14; }
.tb-lang:hover, .tb-lang[aria-expanded="true"] { border-color: var(--violet); color: #d6bbff; }
.chev { transition: transform .15s; }
.tb-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }

.lang { position: relative; }
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 100%;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: var(--bg);
  border: 1px solid var(--phos);
}
.lang-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  color: var(--green);
  text-decoration: none;
  white-space: nowrap;
}
.lang-menu a:hover, .lang-menu a:focus-visible { background: var(--violet); color: var(--bg); outline: none; }
.lang-menu a[aria-current]::after { content: "*"; margin-left: auto; padding-left: 12px; }

@media (max-width: 900px) {
  .tb-label { display: none; }
}
@media (max-width: 760px) {
  .tb-date, .tb-label, .tb-k, .tb-tz, .tb-sys { display: none; }
  .tb-left { gap: 14px; }
}
@media (max-width: 420px) {
  .tb-time .ico { display: none; }
  .tb-left { gap: 12px; }
}
@media (max-width: 360px) {
  .topbar { gap: 8px; font-size: 0.75rem; }
  .tb-left, .tb-right { gap: 8px; }
  .tb-btn { padding: 6px 8px; gap: 6px; }
}

.head {
  position: sticky;
  top: 0;
  z-index: 12;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.head.scrolled { border-bottom-color: #1c5c2c99; } /* thin, barely visible: marks where the header ends while scrolling */

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 14px var(--pad);
  background: var(--bg);
}

.logo {
  font: 600 clamp(1.5rem, 8vw, 2.75rem)/1 var(--mono);
  letter-spacing: -0.02em;
  color: var(--green);
  text-decoration: none;
  white-space: nowrap;
}
.logo .u { color: var(--dim); } /* "root@" stays in the background, the name leads */
.logo .dollar { color: var(--dim); }
.logo .h { color: var(--white); }
/* hover: only "hal10k" runs hot, red like the kawa_index overclock zone; ".dev" stays white, cursor stays green */
.logo .h-name { transition: color .2s, text-shadow .2s; }
.logo:hover .h-name, .logo:focus-visible .h-name { color: var(--red); text-shadow: 0 0 10px #ff2a1acc, 0 0 22px #ff2a1a66; }

.cursor {
  display: inline-block;
  width: 0.5em;
  height: 0.9em;
  margin-left: 0.25em;
  vertical-align: -0.1em;
  background: var(--phos);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid var(--phos);
  background: var(--phos);
  color: var(--bg);
  font: 600 1rem/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--bg); color: var(--phos); }
.btn-line { background: var(--bg); color: var(--phos); }
.btn-line:hover { background: var(--phos); color: var(--bg); }
.btn small.addr { margin-left: 0.6em; color: var(--cyan); font: 400 1em var(--mono); } /* same size as ./mail */ /* address next to ./mail, like "wkrótce" next to ./whatsapp */
.btn-line:hover small.addr { color: var(--bg); }
.btn-soon, .btn-soon:hover { border-color: var(--line); background: var(--bg); color: var(--dim); cursor: default; } /* not clickable yet */
.btn-soon small.soon { margin-left: 0.6em; color: var(--yellow); font: 400 0.75rem var(--mono); } /* plain amber text, no pill */

/* ---------- hero ---------- */
.hero {
  padding: clamp(32px, 6vw, 64px) var(--pad);
}

.boot {
  font: 400 0.875rem/1.6 var(--mono);
  color: var(--dim);
  white-space: pre-wrap;
  min-height: 12.8em; /* 8 lines: no jump while typing */
}
@media (max-width: 360px) { .boot { font-size: 0.75rem; } } /* longest line fits: no wrap, no jump */
.boot .cmd::before { content: "> "; color: var(--dim); }
.boot .cmd { color: var(--cyan); }
.boot .ver { color: var(--yellow); } /* version tag */
.boot .ok { color: var(--phos); }

h1 {
  font: 600 clamp(1.25rem, 7.2vw, 3.5rem)/1.12 var(--mono); /* as big as fits: each phrase on one line, down to 320px */
  letter-spacing: -0.03em;
  color: var(--phos);
}
h1 span { display: block; white-space: nowrap; } /* one phrase per line */

.lead { margin-top: 24px; max-width: 34em; font-size: 1.1875rem; color: #c9f5d4; }

.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* boot log on the left, the eye watching from the right */
.boot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 40px;
}

/* ---------- talk-to-hal: chat-style contact form under the hero buttons ---------- */
.chat {
  max-width: 38em;
  background: var(--panel);
  margin-top: 28px;
  padding: 14px 16px 12px;
  border: 1px solid var(--line);
  font-family: var(--mono);
}
.chat-log {
  height: 11.5em;           /* fixed: the page doesn't grow while chatting, the log scrolls */
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  margin-top: 8px;
  font-size: 0.875rem;
  line-height: 1.55;
}
.chat-line { margin: 0 0 4px; }
.chat-hal { color: var(--phos); }
.chat-hal b { color: var(--dim); font-weight: 400; }
.chat-you { color: var(--cyan); }
.chat-you b { color: var(--dim); font-weight: 400; }
.chat-again { margin-top: 6px; padding: 0; border: 0; background: none; color: var(--green); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.chat-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chat-chips button, .chat-form button {
  padding: 6px 10px;
  border: 1px solid var(--line);
  background: none;
  color: var(--green);
  font: 400 0.8125rem/1.2 var(--mono);
  cursor: pointer;
}
.chat-chips button:hover, .chat-form button:hover { border-color: var(--phos); color: var(--phos); }
.chat-chips button { border-color: #b583ff88; color: var(--violet); background: #b583ff14; }
.chat-chips button:hover { border-color: var(--violet); color: #d6bbff; }
.chat-form button { border-color: #4dd9e888; color: var(--cyan); }
.chat-form button:hover { border-color: var(--cyan); color: #a8f1f8; }
.chat-form { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.chat-ps { color: var(--phos); }
.chat-form input {
  /* the visitor types in cyan, like their answers */
  flex: 1;
  min-width: 0;
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--cyan);
  font: 400 0.9375rem var(--mono);
  caret-color: var(--cyan);
}
.chat-form input:focus { outline: none; }
.chat-form:focus-within { border-top-color: var(--phos); }
.chat-form input:disabled { opacity: .5; }
.chat-fine { margin-top: 6px; font-size: 0.6875rem; color: var(--dim); }

/* the eye: a red lens in a dark metal ring */
.eye-panel { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; flex: none; }

.eye {
  position: relative;
  width: 140px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, #000 0 56%, #3a3a3a 58%, #9a9a9a 61%, #2b2b2b 64%, #141414 70%, #000 71%);
}
.lens {
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: radial-gradient(circle, #fff1b0 0 3%, #ffb347 6%, var(--red) 14%, #a80000 34%, #3d0000 58%, #000 72%);
  box-shadow: 0 0 40px #ff2a1a66;
  transform: translate(var(--lx, 0px), var(--ly, 0px)); /* HAL watches the mouse (script.js) */
  transition: transform .45s cubic-bezier(.2, .7, .3, 1);
}
.eye::after { /* CRT scanlines, only on the eye */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-linear-gradient(transparent 0 2px, #0000002e 2px 3px);
  pointer-events: none;
}
.lens::after { /* glass reflection */
  content: "";
  position: absolute;
  top: 14%;
  left: 22%;
  width: 30%;
  height: 18%;
  border-radius: 50%;
  background: #ffffff1f;
  transform: translate(calc(var(--lx, 0px) * -1), calc(var(--ly, 0px) * -1)) rotate(-30deg); /* stays on the glass */
  transition: transform .45s cubic-bezier(.2, .7, .3, 1);
}
.eye.sleep .lens { filter: brightness(0.15); box-shadow: none; }
.eye.wake .lens { animation: wake 1.4s ease-out both, pulse 4s ease-in-out 1.4s infinite; }
@keyframes wake {
  0% { filter: brightness(0.15); box-shadow: none; }
  40% { filter: brightness(1.4); }
  100% { filter: brightness(1); box-shadow: 0 0 40px #ff2a1a66; }
}
@keyframes pulse { /* slow breathing glow */
  0%, 100% { filter: hue-rotate(var(--hue, 0deg)) brightness(1); box-shadow: 0 0 40px #ff2a1a66; }
  50% { filter: hue-rotate(var(--hue, 0deg)) brightness(1.25); box-shadow: 0 0 64px #ff2a1aaa; }
}

/* after "sudo install hal10000": glitch, then the eye turns terminal green */
.eye.glitch .lens { animation: glitch .9s steps(1) both; }
.eye.green .lens { --hue: 115deg; filter: hue-rotate(115deg); animation: pulse 4s ease-in-out infinite; }
@keyframes glitch {
  0% { filter: brightness(1.7); }
  15% { filter: brightness(.2); }
  30% { filter: hue-rotate(115deg) brightness(1.5); }
  45% { filter: brightness(.25); }
  60% { filter: hue-rotate(60deg) brightness(1.2); }
  75% { filter: brightness(.15); }
  100% { filter: hue-rotate(115deg) brightness(1); }
}

/* the dialogue under the eye, typed like real input.
   Full text is always laid out (untyped part transparent), so nothing moves while typing. */
.eye-say {
  width: max-content; /* as wide as the longest line: lines start together, the block is centred under the eye */
  font: 400 0.75rem/1.5 var(--mono);
  color: var(--dim);
  text-align: left;
}
.dlg { display: grid; }
.dlg-screen { grid-area: 1 / 1; display: block; } /* act 1 and act 2 share one spot: clearing moves nothing */
.dlg-line { display: block; white-space: pre-wrap; }
.dlg-line:not(.dlg-hal)::before { content: "> "; color: transparent; }
.dlg-line.on::before { color: inherit; } /* prompt appears when the line starts */
.dlg-hal { color: var(--phos); }
.dlg-line:not(.dlg-hal) { color: var(--cyan); } /* Dave / the user: cyan, HAL: green */
.dlg-line .rest { color: transparent; }
.tcur { /* block cursor covering the next character */
  background: var(--phos);
  color: transparent;
  animation: blink 1.1s steps(1) infinite;
}
.tcur.typing { animation: none; } /* solid while typing, blinks while waiting */
.tcur.ended { animation: blink-end 1.1s steps(1) 4; } /* end of dialogue: 4 blinks, then steady */
@keyframes blink-end { 50% { opacity: 0; } }
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 760px) {
  .boot-row { flex-direction: column-reverse; align-items: flex-start; gap: 24px; }
  .eye-panel { flex-direction: row; text-align: left; align-self: stretch; }
  .eye { width: 72px; }
  .eye-say { width: auto; flex: 1; }
}

/* ---------- two tables: status (5 cells) and fun (kawa_index + retro_game) ---------- */
.dash {
  font-family: var(--mono);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;                       /* the gaps show the line colour: 1px table lines */
  margin: 0 var(--pad) clamp(32px, 6vw, 64px); /* same as the space above the status table (hero bottom padding) */
  border: 1px solid var(--line);
  background: var(--line);
}
.dash-fun { grid-template-columns: 1fr 1fr; }
.cell { padding: 16px 18px; background: var(--panel); min-width: 0; }
.sub a { color: var(--cyan); text-underline-offset: 3px; transition: color .15s, text-shadow .15s; }
.sub a:hover, .sub a:focus-visible { color: #a8f1f8; text-decoration-thickness: 2px; text-shadow: 0 0 8px #4dd9e899; }
.c-cyan { color: var(--cyan); }
.c-violet { color: var(--violet); }
.v.is-offline { color: var(--yellow); } /* dostępność: amber when offline */
.v.is-online { color: var(--violet); }  /* violet when online, like the language button frame */
.v-dot { display: flex; gap: 0.4em; } /* text wraps next to the dot, not under it */
.v-dot .dot { flex: none; margin: 0.45em 0 0; } /* centred on the first line */
/* other status values start where "przyjmuję zlecenia" starts (after the dot: .45em dot + .4em gap at .v size) */
.dash-status .cell:not(:first-child):not(.cell-cup) :is(.v, .sub) { padding-left: calc(1.0625rem * 0.85); }
.k { font-size: 0.8125rem; color: var(--dim); }
.k::before { content: "./"; } /* every label looks like a command: ./status, ./kawa_index */
.v { font-size: 1.0625rem; line-height: 1.35; font-weight: 600; color: var(--phos); margin-top: 6px; }
.sub { font-size: 0.8125rem; color: var(--dim); margin-top: 4px; }
#avail-note { text-wrap: balance; } /* "odpiszę w poniedziałek" may need 2 lines in narrow cells */
.dot {
  display: inline-block;
  width: 0.45em;
  height: 0.45em;
  margin-right: 0.4em;
  vertical-align: 0.1em;
  background: var(--phos);
  box-shadow: 0 0 8px var(--phos);
}
/* ---------- kawa_index: daily coffee gauge ---------- */
.cell-coffee { display: flex; flex-direction: column; }
.kawa { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; margin-top: 8px; } /* centred in its cell, also vertically */
.gauge { display: block; width: min(100%, 360px); height: auto; overflow: visible; }
.zone { stroke-width: 1.5; }
.zone-y { fill: #ffd23f22; stroke: var(--yellow); filter: drop-shadow(0 0 4px #ffd23f88); }
.zone-g { fill: #7dff9b22; stroke: var(--phos); filter: drop-shadow(0 0 4px #7dff9b88); }
.zone-r { fill: #ff2a1a22; stroke: var(--red); filter: drop-shadow(0 0 4px #ff2a1a88); }
.zl { font: 600 9px var(--mono); text-anchor: middle; letter-spacing: 0.04em; }
.zl-y { fill: var(--yellow); } .zl-g { fill: var(--phos); } .zl-r { fill: var(--red); }
.ticks text { font: 400 8px var(--mono); fill: var(--dim); text-anchor: middle; dominant-baseline: middle; }
.needle {
  stroke: var(--zone, var(--phos));
  stroke-width: 3;
  stroke-linecap: round;
  filter: drop-shadow(0 0 4px var(--zone, var(--phos)));
  transform-box: view-box;
  transform-origin: 120px 120px;
  transform: rotate(-90deg);                                /* parked at 0 until it comes into view */
  transition: transform 1.6s cubic-bezier(.3, 1.45, .5, 1); /* swing with a small overshoot */
}
.hub { fill: var(--bg); stroke: var(--zone, var(--phos)); stroke-width: 2; }
.kawa-num { margin-top: 8px; font: 600 2rem/1 var(--mono); color: var(--zone, var(--phos)); }
.kawa-num #kawa-unit, .kawa-today { font-size: 0.875rem; font-weight: 400; }
.kawa-today { color: var(--dim); }
.kawa-status { margin-top: 8px; font-size: 0.875rem; color: var(--dim); }
.kawa-status b { color: var(--zone, var(--phos)); font-weight: 600; }
.kawa-fine { margin-top: 2px; font-size: 0.6875rem; color: var(--dim); opacity: .7; }
.kawa[data-zone="y"] { --zone: var(--yellow); }
.kawa[data-zone="g"] { --zone: var(--phos); }
.kawa[data-zone="r"] { --zone: var(--red); }
@media (prefers-reduced-motion: reduce) { .needle { transition: none; } }

/* ---------- ./kawa: pixel cup, steam, hover wobble, 1UP on click ---------- */
.cup {
  position: relative;
  display: block;
  margin: 4px auto 0; /* cup centred in its cell (label stays left like the others) */
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.cup svg { display: block; width: 56px; height: 56px; overflow: visible; }
.cup:focus-visible { outline: 2px solid var(--phos); outline-offset: 4px; }
.steam { fill: var(--dim); opacity: 0; transform-box: fill-box; animation: steam 2.4s ease-in-out infinite; }
.steam.s2 { animation-delay: .8s; }
.steam.s3 { animation-delay: 1.6s; }
@keyframes steam { /* a wisp rises and fades: hot coffee */
  0% { opacity: 0; transform: translateY(2px); }
  35% { opacity: .95; }
  100% { opacity: 0; transform: translateY(-3px); }
}
.cup:hover .cup-body, .cup:focus-visible .cup-body { transform-box: fill-box; transform-origin: 50% 100%; animation: wobble .5s steps(2) infinite; }
@keyframes wobble { 0% { transform: rotate(-5deg); } 100% { transform: rotate(5deg); } } /* stepped, like an old game sprite */
.oneup {
  position: absolute;
  left: 28px;
  top: 0;
  transform: translate(-50%, 0);
  opacity: 0;
  font: 600 0.8125rem var(--mono);
  color: var(--yellow);
  text-shadow: 0 0 6px #ffd23faa;
  pointer-events: none;
}
.cup.up .oneup { animation: oneup .9s steps(6) forwards; }
@keyframes oneup { 0% { opacity: 1; transform: translate(-50%, 0); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -30px); } }
.cup-say { margin-top: 6px; text-align: center; }
.pix-heart { width: 1.05em; height: 0.9em; vertical-align: -0.1em; margin-left: 2px; filter: drop-shadow(0 0 3px #ff2a1a99); } /* retro game heart */
@media (prefers-reduced-motion: reduce) {
  .steam { animation: none; opacity: .8; }
  .cup:hover .cup-body { animation: none; }
  .cup.up .oneup { animation: oneup-still 1.2s forwards; }
}
@keyframes oneup-still { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- retro_game: 4 games, one canvas, picker on top ---------- */
.arcade { display: flex; flex-direction: column; gap: 8px; width: min(100%, 440px); margin: 8px auto 0; }
.arcade-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
@media (max-width: 420px) { .arcade-pick { grid-template-columns: 1fr 1fr; } } /* 2 x 2 on narrow phones */
.arcade-pick button {
  padding: 6px 8px;
  border: 1px solid var(--line);
  background: none;
  color: var(--dim);
  font: 400 0.75rem/1.2 var(--mono);
  cursor: pointer;
  white-space: nowrap;
}
.arcade-pick [data-game="snake"] { --g: var(--yellow); }
.arcade-pick [data-game="bounce"] { --g: var(--red); }
.arcade-pick [data-game="defender"] { --g: var(--cyan); }
.arcade-pick [data-game="run"] { --g: var(--violet); }
.arcade-pick button:hover { border-color: var(--g); color: var(--g); }
.arcade-pick button[aria-pressed="true"] { border-color: var(--g); color: var(--bg); background: var(--g); font-weight: 600; }
#game {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 440 / 264;
  border: 1px solid var(--line);
  touch-action: none; /* swipes on the game don't scroll the page */
  cursor: pointer;
}
#game[data-state="play"]:focus-visible { outline: none; } /* focus frame helps find the game, not while playing */
.arcade-score { font-size: 0.8125rem; color: var(--green); }
.arcade-help { font-size: 0.6875rem; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* always one line: switching games never resizes the table */
@media (max-width: 400px) { /* very narrow: lines may wrap, so both always reserve 2 lines (height never changes) */
  .arcade-help { white-space: normal; min-height: 3.2em; }
  .arcade-score { min-height: 3.2em; } /* exactly 2 lines at line-height 1.6 */
}

@media (max-width: 900px) { /* 5 columns don't fit: two per row, the 5th full width; fun table stacks */
  .dash-status { grid-template-columns: 1fr 1fr; }
  .dash-fun { grid-template-columns: 1fr; }
}

/* ---------- tools table (assets/tabs.js): 6 tabs on top, the table takes the height of the open tab ---------- */
.dash-tabs { grid-template-columns: 1fr; }
.tabs-bar { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; } /* the gaps show the line colour, like the table */
.tabs-bar button {
  padding: 10px 6px;
  border: 0;
  border-top: 2px solid transparent;
  background: var(--bg);
  color: var(--dim);
  font: 400 0.8125rem/1.2 var(--mono);
  white-space: nowrap;
  cursor: pointer;
  transition: color .15s;
}
.tabs-bar button:hover { color: var(--violet); }
.tabs-bar [aria-selected="true"] { border-top-color: var(--violet); background: var(--panel); color: var(--violet); font-weight: 600; } /* the open tab joins its panel */
.tabs-bar button:focus-visible { outline-offset: -3px; }
@media (max-width: 700px) { .tabs-bar { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 420px) { .tabs-bar button { font-size: 0.75rem; padding: 9px 2px; } }
.tabs-panel { padding: 18px 18px 20px; }
.tabs-panel[hidden] { display: none; }
.tabs-lead { margin-bottom: 12px; font: 400 0.9375rem/1.5 var(--sans); color: #c9f5d4; }
.tabs-fine { font: 400 0.75rem var(--mono); color: var(--dim); white-space: nowrap; }
.tabs-btn { padding: 6px 10px; border: 1px solid #39d35380; background: #39d35314; color: var(--phos); font: 400 0.8125rem/1.2 var(--mono); cursor: pointer; transition: border-color .15s, text-shadow .15s; }
.tabs-btn:hover, .tabs-btn:focus-visible { border-color: currentColor; text-shadow: 0 0 8px currentColor; }
.t-ok { color: var(--phos); } .t-warn { color: var(--yellow); } .t-bad { color: var(--red); } .t-dim { color: var(--dim); }

/* ./autodiagnoza: questions left, boot log right (stacked on phones) */
.diag { display: grid; grid-template-columns: 1.15fr 1fr; gap: 12px 28px; align-items: start; }
.diag-q { margin: 0; padding: 0; list-style: none; }
.diag-q li { display: flex; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 6px 0; border-bottom: 1px solid #1c5c2c55; }
.diag-q li > span:first-child { font: 400 0.875rem/1.4 var(--sans); color: #c9f5d4; }
.diag-yn { display: flex; gap: 6px; flex: none; }
.diag-yn button { padding: 4px 10px; border: 1px solid #b583ff80; background: #b583ff14; color: var(--violet); font: 400 0.8125rem/1.2 var(--mono); cursor: pointer; }
.diag-yn button:hover { border-color: var(--violet); }
.diag-yn [aria-pressed="true"] { background: var(--violet); border-color: var(--violet); color: var(--bg); font-weight: 600; }
.diag-out { font: 400 0.8125rem/1.7 var(--mono); color: var(--green); }
.diag-out > div { padding-left: 7ch; text-indent: -7ch; } /* wrapped text sits after "[WARN] " */
.diag-out .diag-end { margin-top: 10px; font-size: 0.875rem; }
.diag-out .tabs-btn { display: inline-block; margin-top: 10px; text-decoration: none; }
@media (max-width: 760px) { .diag { grid-template-columns: 1fr; } }

/* ./przed_po: an old and a new mock of a fictional site, the slider clips the new one */
.pp { position: relative; height: 280px; overflow: hidden; border: 1px solid var(--line); user-select: none; -webkit-user-select: none; cursor: default; }
.pp-side { position: absolute; inset: 0; padding: 18px; }
.pp-side p { margin: 0; }
.pp-old { padding-right: calc(50% + 18px); background: #c0c0c0; color: #000080; font: 13px/1.5 "Times New Roman", serif; text-align: center; }
.pp-old-h { font-size: clamp(16px, 4vw, 26px); line-height: 1.2; color: #800000; text-decoration: underline; }
.pp-old .pp-mq { margin: 8px 0; padding: 2px; background: #ff0; color: #f00; font: bold 12px "Comic Sans MS", cursive; }
.pp-cnt { display: inline-block; margin-top: 6px; padding: 1px 4px; background: #000; color: #0f0; font: 11px monospace; }
.pp-new { padding-left: calc(50% + 18px); background: radial-gradient(120% 90% at 78% 110%, #5a341466, transparent 60%), radial-gradient(60% 50% at 75% 0%, #c9a77c1f, transparent 70%), #14110f; color: #c8bba9; font: 400 13px/1.5 var(--sans); text-align: center; clip-path: inset(0 0 0 50%); } /* centred in its half, like the old one */
.pp-nav { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 12px; color: #c9a77c; letter-spacing: .22em; }
.pp-wheat { width: 11px; height: 17px; flex: none; }
.pp-new-h em { font-style: italic; font-weight: 400; color: #e2c497; }
.pp-stars { margin-top: 10px !important; font-size: 11px; color: #a39582; }
.pp-stars span { color: #e2b54a; letter-spacing: .1em; }
.pp-stars b { color: #f3ebe1; }
.pp-loaf { position: absolute; right: 16px; top: 26px; width: 66px; filter: drop-shadow(0 6px 10px #0008); }
.pp-steam path { opacity: 0; animation: pp-steam 3s ease-out infinite; }
.pp-steam path:nth-child(2) { animation-delay: 1s; }
.pp-steam path:nth-child(3) { animation-delay: 2s; }
@keyframes pp-steam { 0% { opacity: 0; transform: translateY(6px); } 30% { opacity: .8; } 100% { opacity: 0; transform: translateY(-8px); } }
.pp-new::before { content: ""; position: absolute; inset: 0; background: radial-gradient(50% 40% at 80% 100%, #e08a3c22, transparent 70%); animation: pp-oven 5s ease-in-out infinite; pointer-events: none; } /* warm oven glow */
@keyframes pp-oven { 50% { opacity: .35; } }
.pp-new-h { margin: 30px 0 6px !important; font: 600 clamp(16px, 4vw, 28px)/1.1 Georgia, serif; color: #f3ebe1; }
.pp-cta { position: relative; z-index: 0; overflow: hidden; display: inline-block; margin-top: 14px; padding: 8px 14px; border-radius: 99px; background: linear-gradient(180deg, #e2c497, #c9a77c); color: #14110f; font-size: 12px; font-weight: 600; white-space: nowrap; box-shadow: 0 4px 14px #c9a77c26, inset 0 1px 0 #fff6; transition: transform .45s cubic-bezier(.2,.7,.2,1), box-shadow .45s cubic-bezier(.2,.7,.2,1); }
.pp-cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, #f3dcb6, #d9b98c); opacity: 0; transition: opacity .45s ease; } /* lighter layer that fades in: a gradient can't fade to a flat colour */
.pp-cta::after { content: ""; position: absolute; top: 0; bottom: 0; left: -70%; width: 45%; background: linear-gradient(100deg, transparent, #ffffff99, transparent); transform: skewX(-18deg); transition: left 0s; } /* one light sweep per hover */
.pp-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 26px -6px #c9a77c66, 0 0 0 1px #e2c49755, inset 0 1px 0 #fff8; } /* only a picture of a button: hover, no click */
.pp-cta:hover::before { opacity: 1; }
.pp-cta:hover::after { left: 130%; transition: left .9s cubic-bezier(.2,.7,.2,1); }
.pp-line { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: var(--phos); box-shadow: 0 0 10px var(--phos); pointer-events: none; }
.pp-tag { position: absolute; bottom: 8px; padding: 2px 6px; background: #000c; font: 400 11px var(--mono); }
.pp-tag-old { left: 8px; color: var(--yellow); }
.pp-tag-new { right: 8px; color: var(--phos); }
@media (max-width: 520px) { .pp { height: 340px; } .pp-old .pp-mq { font-size: 10px; } .pp-cta { padding: 6px 9px; font-size: 11px; } .pp-loaf, .pp-stars { display: none; } .pp-nav { letter-spacing: .12em; } } /* narrow half: keep it clean */
@media (prefers-reduced-motion: reduce) { .pp-steam path, .pp-new::before { animation: none; } .pp-cta::after { display: none; } .pp-steam path { opacity: .4; } }

/* ./faq: man page, <details> open without JS */
.man { font: 400 0.875rem/1.45 var(--mono); color: var(--green); }
.man-top { color: var(--dim); }
.man-sec { margin-top: 8px; color: var(--phos); font-weight: 600; }
.man-ind { padding-left: 4ch; font: 400 0.9375rem/1.45 var(--sans); color: #c9f5d4; }
.man details { padding-left: 4ch; }
.man summary { margin-left: -2ch; color: var(--cyan); cursor: pointer; list-style: none; }
.man summary::-webkit-details-marker { display: none; }
.man summary::before { content: "▸ "; color: var(--dim); }
.man details[open] summary::before { content: "▾ "; }
.man summary:hover { color: #a8f1f8; }
.man details p { padding: 0 0 4px; font: 400 0.9375rem/1.45 var(--sans); color: #c9f5d4; }
.man-link { color: var(--cyan); text-underline-offset: 3px; }
.man-link:hover { color: #a8f1f8; text-shadow: 0 0 8px #4dd9e899; }

/* ./tracker: steps like a parcel + progress bar (amber until done, green at 100 %) */
.trk-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font: 400 0.8125rem var(--mono); color: var(--dim); }
.trk-form input { width: 10em; padding: 6px 8px; border: 1px solid var(--line); background: var(--bg); color: var(--cyan); font: 400 0.9375rem var(--mono); text-transform: uppercase; }
.trk-form input:focus { outline: 1px solid var(--cyan); }
.trk-log { margin-top: 14px; min-height: 11em; font: 400 0.8125rem/1.7 var(--mono); color: var(--green); }
.trk-tag { display: inline-block; width: 8ch; white-space: pre; text-indent: 0; } /* keeps "[    ]" as wide as "[ OK ]" */
.trk-step { padding-left: 8ch; text-indent: -8ch; } /* wrapped text sits under the step, not under the tag */
.trk-site { margin-bottom: 4px; }
.trk-link { color: var(--cyan); text-underline-offset: 3px; transition: color .15s, text-shadow .15s; }
.trk-link:hover, .trk-link:focus-visible { color: #a8f1f8; text-shadow: 0 0 8px #4dd9e899; }
.trk-prog { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; margin-bottom: 10px; }
.trk-track { height: 12px; background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 8px); } /* the part still to do */
.trk-bar { height: 100%; width: var(--p, 0%); background: repeating-linear-gradient(90deg, currentColor 0 6px, transparent 6px 8px); }
.trk-blink { animation: blink 1s steps(1) infinite; }

/* ---------- ./projekty_wykonane: one line per online project (tabs.js reads projekty.js), "więcej wkrótce" last ---------- */
.dash-proj { grid-template-columns: 1fr; }
.dash-proj[hidden] { display: none; }
.proj-list { margin: 10px 0 0; padding: 0; list-style: none; font: 400 0.875rem/1.5 var(--mono); }
.proj-list li { display: grid; grid-template-columns: 15ch minmax(14ch, max-content) 1fr auto; /* 15ch: "[ .. ] w drodze" is the widest badge */ align-items: baseline; gap: 2px 16px; padding: 8px 0; border-top: 1px solid #1c5c2c80; }
.proj-list li:first-child { border-top: 0; }
.proj-tag { white-space: pre; }
.proj-name { color: var(--phos); font-weight: 600; }
.proj-about { color: var(--dim); }
.proj-more .proj-name { font-weight: 400; color: var(--yellow); } /* amber = coming soon */
@media (max-width: 700px) { /* phones: tag on the left, name / about / link stacked after it */
  .proj-list li { grid-template-columns: 1fr; gap: 2px 0; }
  .proj-list li > * { grid-column: 1; } /* badge on its own line, then name / about / link */
}

/* ./osiągnięcia: list left, own ASCII pod bay right */
.ach { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 28px; align-items: start; }
.ach-n { color: var(--phos); font: 600 0.9375rem var(--mono); }
.ach-bar { margin: -6px 0 8px; color: var(--phos); font: 400 0.875rem var(--mono); letter-spacing: 1px; }
.ach-list { margin: 0; padding: 0; list-style: none; font: 400 0.8125rem/1.75 var(--mono); }
.ach-list li { padding-left: 4ch; text-indent: -4ch; color: var(--dim); } /* wrapped lines sit under the name, not under [x] */
.ach-list .on { color: #c9f5d4; }
.ach-list .on b { color: var(--phos); }
.ach-list b { font-weight: 400; }
.pod { min-width: 0; align-self: center; display: flex; flex-direction: column; align-items: center; text-align: center; } /* centred in the right half */
.pod-say { min-height: 1.6em; margin-top: 8px; font: 400 0.8125rem var(--mono); color: var(--phos); }
.pod-pre { margin: 6px 0 0; font: 400 clamp(0.5rem, 1.9vw, 0.8125rem)/1.15 var(--mono); color: var(--line); overflow: hidden; }
.pod-pre .w { color: var(--white); } .pod-pre .r { color: var(--red); } .pod-pre .s { color: var(--dim); } .pod-pre .f { color: var(--green); }
@media (max-width: 760px) { .ach { grid-template-columns: 1fr; } }

/* ./hacker_typer */
.hx-box { display: flex; flex-direction: column; justify-content: flex-end; height: 180px; padding: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); color: var(--green); font: 400 0.8125rem/1.45 var(--mono); white-space: pre-wrap; word-break: break-all; cursor: text; }
.hx-box:focus-visible { outline: 1px solid var(--phos); outline-offset: 0; }
.hx-cur { display: inline-block; width: .6em; height: 1.1em; vertical-align: -.2em; background: var(--phos); animation: blink 1s steps(1) infinite; }
.hx-msg { margin-top: 8px; min-height: 1.6em; font: 400 0.8125rem var(--mono); }
@media (prefers-reduced-motion: reduce) { .trk-blink, .hx-cur { animation: none; } .pp-cta, .pp-cta::before { transition: none; } .pp-cta:hover { transform: none; } }

/* ---------- sections ---------- */
.sec { padding: clamp(48px, 7vw, 80px) var(--pad); border-bottom: 1px solid var(--line); }

.prompt { font: 400 0.9375rem/1.6 var(--mono); color: var(--phos); overflow-wrap: anywhere; }
.ps { color: var(--green); }

.sec h2 {
  margin-top: 8px;
  font: 600 clamp(1.625rem, 4vw, 2.5rem)/1.15 var(--mono);
  letter-spacing: -0.03em;
  color: var(--phos);
}

.sec strong { color: var(--phos); font-weight: 600; }

.list { margin-top: 28px; padding: 0; list-style: none; max-width: 44em; }
.list li { position: relative; padding: 6px 0 6px 2ch; }
.list li::before { content: "-"; position: absolute; left: 0; color: var(--dim); }

.steps { margin-top: 28px; padding: 0; list-style: none; max-width: 44em; }
.steps li { position: relative; padding: 8px 0 8px 7ch; }
.steps .n { position: absolute; left: 0; color: var(--dim); font-family: var(--mono); }
.steps-done { margin-top: 20px; color: var(--dim); }
.steps-done::before { content: "> "; color: var(--phos); }

.price { margin-top: 28px; max-width: 44em; font-family: var(--mono); }
.price div { display: flex; align-items: baseline; gap: 1ch; padding: 6px 0; }
.price dt { white-space: nowrap; }
.price div::after { /* dot leader between term and value */
  content: "";
  order: 1;
  flex: 1;
  min-width: 2ch;
  border-bottom: 2px dotted var(--line);
}
.price dd { order: 2; margin: 0; color: var(--phos); text-align: right; }
@media (max-width: 600px) {
  .price div { flex-direction: column; gap: 0; }
  .price div::after { display: none; }
  .price dd { text-align: left; }
}

.faq { margin-top: 28px; max-width: 44em; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  padding: 14px 0;
  font-family: var(--mono);
  cursor: pointer;
  color: var(--phos);
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "[+] "; color: var(--dim); }
.faq details[open] summary::before { content: "[-] "; }
.faq details p { padding: 0 0 16px 4ch; }

/* contact */
.mail {
  display: inline-block;
  margin-top: 24px;
  font: 600 clamp(1.75rem, 8vw, 3.5rem)/1.1 var(--mono);
  letter-spacing: -0.03em;
  color: var(--phos);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.mail:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }
.copied { color: var(--dim); font-size: 0.875rem; }
.hint { margin-top: 20px; color: var(--dim); max-width: 40em; }

/* ---------- footer ---------- */
.foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px var(--pad) calc(20px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  font: 400 0.9375rem/1.5 var(--sans);
  color: var(--green);
}
.foot { position: relative; }
/* own pixel ship on the footer line: script.js adds .fly now and then; never with reduced motion */
.ship-lane { position: absolute; left: 0; right: 0; top: -17px; height: 16px; overflow: hidden; pointer-events: none; }
.ship { position: absolute; left: 0; top: 1px; width: 48px; height: 14px; visibility: hidden; transform: translateX(-56px); filter: drop-shadow(0 0 3px #ffd23f44); }
.ship.fly { visibility: visible; animation: ship-fly var(--fly, 9s) linear forwards, ship-bob .6s steps(1) infinite; }
.ship.fly .f1 { animation: flame-a .16s steps(1) infinite; } /* two flame frames take turns */
.ship.fly .f2 { animation: flame-b .16s steps(1) infinite; }
@keyframes ship-fly { to { transform: translateX(var(--lane, 100vw)); } }
@keyframes ship-bob { 50% { top: 0; } }
@keyframes flame-a { 0% { visibility: visible; } 50% { visibility: hidden; } }
@keyframes flame-b { 0% { visibility: hidden; } 50% { visibility: visible; } }
@media (prefers-reduced-motion: reduce) { .ship { display: none; } }
.foot-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; }
.foot .sep { color: var(--dim); margin: 0 0.4em; }
.foot-copy span { white-space: nowrap; }
.foot-link {
  padding: 0;
  border: 0;
  background: none;
  color: #4dd9e8bb;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: color .15s, text-decoration-color .15s, text-shadow .15s;
}
.foot-link:hover, .foot-link:focus-visible { color: #a8f1f8; text-decoration-color: currentColor; text-shadow: 0 0 8px #4dd9e899; }

/* ---------- privacy policy pop-up ---------- */
.policy {
  width: min(680px, calc(100vw - 32px));
  max-height: min(80vh, 760px);
  padding: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--green);
  font: 400 0.9375rem/1.6 var(--sans);
}
.policy::backdrop { background: #000000bb; }
.policy[open] { display: flex; flex-direction: column; }
.policy-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  font: 400 0.8125rem var(--mono);
  color: var(--dim);
}
.policy-close { padding: 2px 6px; border: 1px solid transparent; background: none; color: var(--green); font: inherit; cursor: pointer; }
.policy-close:hover, .policy-close:focus-visible { border-color: var(--phos); color: var(--phos); }
.policy-body { overflow-y: auto; padding: 18px 22px 24px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.policy-body h2 { margin: 0; font: 600 1.375rem/1.2 var(--mono); color: var(--phos); letter-spacing: -0.02em; }
.policy-date { margin-top: 4px; font: 400 0.75rem var(--mono); color: var(--dim); }
.policy-body h3 { margin: 22px 0 6px; font: 600 0.9375rem var(--mono); color: var(--phos); }
.policy-body p { margin: 0 0 10px; color: #c9f5d4; }
.policy-body b { color: var(--phos); font-weight: 600; }
.policy-body a { color: var(--cyan); text-underline-offset: 3px; transition: color .15s, text-shadow .15s; }
.policy-body a:hover, .policy-body a:focus-visible { color: #a8f1f8; text-decoration-thickness: 2px; text-shadow: 0 0 8px #4dd9e899; } /* same hover as the mail link on the page */

/* "czytaj więcej" in ./płatność: a link look, opens the how-it-works pop-up */
.sub-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--cyan);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .15s, text-shadow .15s;
}
.sub-link:hover, .sub-link:focus-visible { color: #a8f1f8; text-decoration-thickness: 2px; text-shadow: 0 0 8px #4dd9e899; }

/* ---------- how-it-works pop-up: 7 steps, each with an own 8x8 pixel emoji ---------- */
.howto-list { margin: 16px 0 0; padding: 0; list-style: none; }
.howto-list > li { padding: 12px 0; border-top: 1px solid #1c5c2c80; } /* > : the changelog's own items stay plain */
.howto-list > li:first-child { border-top: 0; padding-top: 4px; }
/* [08] changelog: terminal lines, tag colours keep their meaning (fix = success, new = the visitor, known issue = amber) */
.howto-log { margin: 0; padding: 0; list-style: none; font: 400 0.8125rem/1.7 var(--mono); color: #c9f5d4; }
.howto-log li { padding-left: 2ch; text-indent: -2ch; } /* wrapped lines sit indented, so each item stays separate on phones */
.log-fix { color: var(--phos); }
.log-new { color: var(--cyan); }
.log-known { color: var(--yellow); }
.howto-h { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font: 400 0.9375rem var(--mono); }
.howto-h b { color: var(--phos); font-weight: 600; }
/* [02] the 3 project versions: violet = a choice (the client picks one), pizzint chip next to the title */
.howto-tag { padding: 2px 7px; border: 1px solid #b583ff80; background: #b583ff14; color: var(--violet); font: 400 0.75rem/1.3 var(--mono); white-space: nowrap; }
.policy-body .howto-hl { color: var(--violet); } /* .policy-body b is green: beat it */
.howto-3v { margin: 2px 0 10px; }
.v3-n { color: var(--violet); }
.howto-n { color: var(--dim); }
.pix-ico { flex: none; width: 18px; height: 18px; }
/* [03] sample contract: a bar that rolls out (<details>, no JS) */
.contract { margin-top: 10px; border: 1px solid var(--line); background: #000; }
.contract summary { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font: 400 0.8125rem var(--mono); color: var(--phos); cursor: pointer; list-style: none; }
.contract summary::-webkit-details-marker { display: none; }
.contract summary::before { content: "▸"; color: var(--dim); transition: transform .15s; }
.contract[open] summary::before { transform: rotate(90deg); }
.contract summary:hover, .contract summary:focus-visible { background: #39d3531a; outline: none; }
.contract summary:focus-visible { box-shadow: inset 0 0 0 1px var(--phos); }
.contract-body { padding: 4px 16px 16px; border-top: 1px solid var(--line); animation: roll .25s ease-out; }
@keyframes roll { from { opacity: 0; transform: translateY(-6px); } }
.contract-note { margin-top: 12px; font: 400 0.75rem/1.5 var(--mono); color: var(--yellow); }
.policy-body .contract h4 { margin: 16px 0 8px; font: 600 1rem var(--mono); color: var(--phos); }
.policy-body .contract h5 { margin: 14px 0 4px; font: 600 0.8125rem var(--mono); color: var(--phos); }
.policy-body .contract p { margin: 0 0 6px; font-size: 0.875rem; }
.policy-body .contract .contract-code { margin: -2px 0 12px; font: 400 0.8125rem/1.5 var(--mono); color: var(--phos); }
.contract-code span { color: var(--dim); }
.policy-body .contract .contract-party { padding-left: 2ch; } /* each party on its own line */
.policy-body .contract .contract-list { padding-left: 2ch; }
.contract-sign { display: flex; justify-content: space-between; gap: 24px; margin-top: 28px !important; }
.contract-sign span { flex: 1; max-width: 200px; padding-top: 6px; border-top: 1px dashed var(--dim); text-align: center; font: 400 0.75rem var(--mono); color: var(--dim); }
@media (prefers-reduced-motion: reduce) { .contract-body { animation: none; } .contract summary::before { transition: none; } }

/* [01] ./mail + [02] example sites: small chips, like the game picker */
.howto-ex { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; font: 400 0.8125rem/1.2 var(--mono); }
.policy-body .howto-ex span { color: var(--dim); margin-right: 2px; }
@media (max-width: 520px) { /* phones: label on its own line, chips in a 2×2 grid with one left edge (remonty under kosmetyczka) */
  .howto-ex4 { display: grid; grid-template-columns: auto auto; justify-content: start; }
  .howto-ex4 > span { grid-column: 1 / -1; }
}
.policy-body .ex-btn { padding: 6px 10px; border: 1px solid; text-decoration: none; transition: color .15s, border-color .15s, text-shadow .15s; }
.policy-body .ex-violet { color: var(--violet); border-color: #b583ff88; background: #b583ff14; }
.policy-body .ex-red { color: var(--red); border-color: #ff2a1a88; background: #ff2a1a14; }
.policy-body .ex-cyan { color: var(--cyan); border-color: #4dd9e888; background: #4dd9e814; }
.policy-body .ex-amber { color: var(--yellow); border-color: #ffd23f88; background: #ffd23f14; }
.policy-body .ex-mail { color: var(--phos); border-color: #39d35388; background: #39d35314; } /* [01] ./mail chip: green like the hero button, address cyan */
.policy-body .howto-ex .ex-addr { margin-left: 0.4em; color: var(--cyan); }
.policy-body .ex-btn:hover, .policy-body .ex-btn:focus-visible { border-color: currentColor; text-shadow: 0 0 8px currentColor; }
.policy-body .ex-violet:hover, .policy-body .ex-violet:focus-visible { color: #d6bbff; } /* own hover colours: the pop-up's cyan link hover must not win */
.policy-body .ex-red:hover, .policy-body .ex-red:focus-visible { color: #ff7a6e; }
.policy-body .ex-cyan:hover, .policy-body .ex-cyan:focus-visible { color: #a8f1f8; }
.policy-body .ex-amber:hover, .policy-body .ex-amber:focus-visible { color: #ffe58a; }
.policy-body .ex-mail:hover, .policy-body .ex-mail:focus-visible { color: #b6ffc6; }
.policy-body .howto-ex .ex-soon, .policy-body .howto-ex .ex-soon:hover { margin-right: 0; color: var(--dim); border-color: var(--line); text-shadow: none; cursor: default; } /* ./whatsapp: not clickable until the number exists, like the hero button */
.policy-body .howto-ex .ex-soon-t { margin: 0 0 0 0.4em; color: var(--yellow); }
@media (max-width: 520px) {
  .foot-copy { display: flex; flex-direction: column; }
  .foot .sep { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cursor, .tcur { animation: none; }
  .eye.wake .lens, .eye.glitch .lens, .eye.green .lens { animation: none; }
}

/* ---------- ./news: one-column table under the fun table, filled by assets/news.js (daily) ---------- */
.dash-news { grid-template-columns: 1fr; margin-bottom: clamp(48px, 7vw, 80px); } /* the last table: more air before the footer */
/* ./rynki: one scrolling line of prices in the 2nd row of the ./news table (script.js, data from assets/rynki.js) */
.tick { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 10px 18px; background: var(--panel); font: 400 0.8125rem/1 var(--mono); }
.tick[hidden] { display: none; }
.tick .k { flex: none; }
.tick-view { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
.tick-run { display: inline-flex; white-space: nowrap; animation: tick 45s linear infinite; }
.tick:hover .tick-run { animation-play-state: paused; } /* hover = stop and read */
.tick-set { display: inline-flex; gap: 28px; padding-right: 28px; }
.tick-i b { font-weight: 400; color: var(--green); }
.tick-v { margin-left: .5em; color: #c9f5d4; }
.tick-i .tick-up, .tick-i .tick-dn { margin-left: .5em; }
.tick-i .tick-up { color: var(--phos); }
.tick-i .tick-dn { color: var(--red); }
.tick-src { color: var(--dim); }
@keyframes tick { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { /* no motion: scroll it by hand */
  .tick-view { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .tick-run { animation: none; }
  .tick-set + .tick-set { display: none; }
}
.nhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* threat chip (pizzint style), colour = the day's most serious story: red high · amber raised · green low */
.nlevel { display: inline-flex; align-items: center; gap: 7px; padding: 4px 9px; font-size: 0.75rem; white-space: nowrap; border: 1px solid; }
.nlevel[hidden] { display: none; } /* until the data arrives */
.nlevel .dot { margin: 0; }
.nlevel[data-level="3"] { color: var(--red); border-color: #ff2a1a80; background: #ff2a1a14; }
.nlevel[data-level="3"] .dot { background: var(--red); box-shadow: 0 0 8px var(--red); }
.nlevel[data-level="2"] { color: var(--yellow); border-color: #ffd23f80; background: #ffd23f14; }
.nlevel[data-level="2"] .dot { background: var(--yellow); box-shadow: 0 0 8px var(--yellow); }
.nlevel[data-level="1"], .nlevel[data-level="0"] { color: var(--phos); border-color: #39d35366; background: #39d3531a; }

/* tags: breach red (errors), patch / scam amber (act now), ai green (HAL's own kind), tech dim */
.ntag { display: inline-block; justify-self: start; padding: 1px 6px; font: 400 0.75rem/1.5 var(--mono); white-space: nowrap; border: 1px solid; }
.ntag-breach { color: var(--red); border-color: #ff2a1a80; background: #ff2a1a14; }
.ntag-patch, .ntag-scam { color: var(--yellow); border-color: #ffd23f80; background: #ffd23f14; }
.ntag-ai { color: var(--phos); border-color: #39d35366; background: #39d3531a; }
.ntag-tech { color: var(--dim); border-color: var(--line); }

/* the log: > tail, 3 lines (date · tag · headline + source), HAL's comment under each */
.nlog-cmd { margin-top: 8px; font-size: 0.8125rem; color: var(--dim); }
.nlog-cmd span { color: var(--phos); }
.nlog { margin: 10px 0 0; padding: 0; list-style: none; font-size: 0.8125rem; line-height: 1.6; }
.nlog li { display: grid; grid-template-columns: auto auto 1fr; gap: 2px 12px; align-items: baseline; padding: 8px 0; border-top: 1px dashed #1c5c2c80; }
.nlog li:first-child { border-top: 0; }
.nlog time { color: var(--dim); white-space: nowrap; font-variant-numeric: tabular-nums; }
.nlog .nh { color: #c9f5d4; }
.nsrc { font-size: 0.75rem; color: var(--cyan); text-underline-offset: 3px; white-space: nowrap; transition: color .15s, text-shadow .15s; }
.nsrc:hover, .nsrc:focus-visible { color: #a8f1f8; text-decoration-thickness: 2px; text-shadow: 0 0 8px #4dd9e899; }
.nhal { grid-column: 3; color: var(--phos); }
.nhal b { color: var(--dim); font-weight: 400; }
.nlog .nempty { display: block; color: var(--yellow); }
.nfine { margin-top: 12px; font-size: 0.6875rem; color: var(--dim); opacity: .7; }
@media (max-width: 600px) {
  .nlog li { grid-template-columns: auto 1fr; }
  .nlog .nh, .nhal { grid-column: 1 / -1; }
}

/* ---------- easter eggs (assets/eggs.js): toast, overclock, signal + monolith, screensaver ---------- */

/* toast: one terminal line pinned bottom-left, navy panel like the chat box */
.egg-toast {
  position: fixed;
  left: max(var(--pad), calc((100vw - 1040px) / 2 + var(--pad))); /* lines up with the page content, like .term */
  bottom: 16px;
  z-index: 30;
  max-width: calc(100vw - 2 * var(--pad));
  padding: 10px 14px;
  background: var(--panel);
  border: 1px solid #39d35366;
  font: 400 0.8125rem/1.4 var(--mono);
  color: var(--phos);
}
.egg-toast::before { content: "> "; color: var(--dim); }
.egg-rest { color: transparent; } /* untyped part keeps its space */
.egg-toast.egg-red { color: var(--red); border-color: #ff2a1a80; }
.egg-toast.egg-amber { color: var(--yellow); border-color: #ffd23f80; }
.egg-toast.egg-cyan { color: var(--cyan); border-color: #4dd9e880; }

/* 1. overclock: needle pinned at 6 (beats the inline drift), logo flickers red, status chip turns red */
.kawa.egg-oc .needle { transform: rotate(90deg) !important; }
.logo.egg-oc .h-name { color: var(--red); text-shadow: 0 0 10px #ff2a1acc, 0 0 22px #ff2a1a66; animation: egg-flicker 1.2s steps(2) infinite; }
@keyframes egg-flicker { 50% { text-shadow: 0 0 4px #ff2a1a88; } }
.chip-ok.egg-oc { border-color: #ff2a1a80; background: #ff2a1a14; }
.chip-ok.egg-oc .tb-ok { color: var(--red); }
.chip-ok.egg-oc .dot { background: var(--red); box-shadow: 0 0 6px var(--red); }

/* 2. signal: the eye slowly brightens with the rising music (filter on .eye, so the lens keeps its own pulse) */
.eye.egg-rise { filter: brightness(1.7) saturate(1.2); transition: filter var(--egg-dur, 8s) ease-in; }
/* …then a black 4:9 slab appears in the lens, thin green edge like the screensaver's monolith */
.egg-slab {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14%;
  aspect-ratio: 4 / 9;
  translate: -50% -50%;
  background: #000;
  outline: 1px solid var(--dim);
  box-shadow: 0 0 12px #000;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  pointer-events: none;
}
.eye.egg-mono .egg-slab { opacity: 1; }

/* bonus Daisy Bell (chat `daisy`): the whole eye dims for as long as the song lasts, then wakes */
.eye.egg-daisy { filter: brightness(0.12) saturate(0.4); transition: filter var(--egg-dur, 15s) linear; }
.eye.egg-wake { transition: filter 1.2s ease-out; }

/* 5. screensaver */
.egg-saver { position: fixed; inset: 0; z-index: 40; background: #000; cursor: none; }
/* 7. superuser: full-screen terminal when all achievements are found */
.egg-su { position: fixed; inset: 0; z-index: 41; display: flex; align-items: center; justify-content: center; padding: var(--pad); background: #000; }
.egg-su-box { width: min(100%, 640px); font: 400 0.9375rem/1.6 var(--mono); color: var(--green); }
.egg-su-box p { margin: 0; min-height: 1.6em; }
.egg-su .su-cmd { color: var(--cyan); }
.egg-su .su-dim { color: var(--dim); }
.egg-su .su-ok { color: var(--phos); }
.egg-su .su-hal { color: var(--phos); }
.egg-su .su-amber { color: var(--yellow); }
.egg-su .su-hint { margin-top: 14px; font-size: 0.75rem; }
.egg-su-ban { margin: 16px 0; font: 400 min(1rem, 2.6vw)/1 var(--mono); color: var(--phos); text-shadow: 0 0 8px #7dff9b88; clip-path: inset(0 100% 0 0); }
.egg-su-ban.go { animation: su-sweep 1.2s steps(53) forwards, su-glow 2.4s ease-in-out 1.2s infinite; }
@keyframes su-sweep { to { clip-path: inset(0 0 0 0); } }
@keyframes su-glow { 50% { text-shadow: 0 0 18px #7dff9bcc, 0 0 2px #f4fff6; } }
@media (prefers-reduced-motion: reduce) { .egg-su-ban.go { animation: none; clip-path: none; } }
.ach-reset { margin-top: 10px; padding: 2px 0; border: 0; background: none; color: var(--dim); font: 400 0.75rem var(--mono); cursor: pointer; opacity: .7; transition: opacity .15s, color .15s; }
.ach-reset:hover, .ach-reset:focus-visible { opacity: 1; color: var(--yellow); }
.ach-reset.is-armed { opacity: 1; color: var(--yellow); }
.ach-su { margin: -2px 0 10px; font: 400 0.8125rem var(--mono); color: var(--dim); }
.ach-su b { color: var(--phos); font-weight: 600; }
.ach-su .tabs-btn { margin-left: 8px; }
/* 6. bug storm: full-screen canvas over the page and the toast (the ship must stay visible on phones), clicks go through */
.egg-bugs { position: fixed; inset: 0; z-index: 31; width: 100%; height: 100%; pointer-events: none; transition: opacity .5s; }
.egg-bugs.egg-out { opacity: 0; }
.egg-saver canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.egg-saver p {
  position: absolute;
  left: var(--pad);
  right: var(--pad);
  bottom: 18%;
  margin: 0;
  text-align: center;
  font: 400 var(--say)/1.6 var(--mono);
  color: var(--phos);
  white-space: nowrap;
}
.egg-saver { --say: min(0.9375rem, 3.4vw); } /* HAL's lines shrink on narrow phones so each stays on one line */
.egg-saver .egg-say2 { bottom: calc(18% - var(--say) * 1.6); } /* HAL's second line, right under the first */
.egg-saver .egg-hint { bottom: calc(18% - var(--say) * 1.6 - 30px); font-size: min(0.75rem, 3vw); color: var(--dim); }

@media (prefers-reduced-motion: reduce) {
  .logo.egg-oc .h-name { animation: none; }
  .eye.egg-rise, .eye.egg-daisy, .eye.egg-wake { filter: none; transition: none; }
  .egg-slab { transition: none; }
}

/* ---------- own footer badge (O1 ./wake, 2026-11-02): HAL's lens sleeps; on hover it wakes (flash, flicker, ring ping, green pulse),
   the chip turns violet (= a choice), "HAL" goes green, it slides open to "zrobione przy kawie" and the cup (same pixels as the client
   badge C7) gets a brown stream, fills in 3 steps and keeps steaming (amber). Client sites use C7 (CLAUDE.md). ---------- */
.h10k-own { display: inline-flex; align-items: center; padding: 6px 10px 6px 8px; border: 1px solid #39d35380; background: #39d35314; color: var(--green); font: 400 0.8125rem/1 var(--mono); text-decoration: none; opacity: .9; transition: opacity .2s, border-color .3s, background-color .3s; }
.h10k-own b { font-weight: 600; color: var(--white); }
.own-h { font-style: normal; transition: color .25s, text-shadow .25s; }
.own-d { font-style: normal; opacity: .6; }
.own-txt { white-space: nowrap; } /* one inline run: flex would drop the spaces between the pieces */
.own-p { margin-right: .4em; color: var(--phos); }
.own-eye { position: relative; flex: none; width: 11px; height: 11px; margin-right: .65em; }
.own-lens { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, #f0fff4 0 10%, #7dff9b 24%, #1f8a3a 52%, #052e12 72%); box-shadow: 0 0 0 1.5px #8a8f98; filter: grayscale(1) brightness(.45); transition: filter .2s; } /* asleep */
.own-eye::after { content: ""; position: absolute; inset: -1px; border-radius: 50%; border: 1px solid #7dff9b; opacity: 0; pointer-events: none; } /* the wake-up ring */
.own-more { display: inline-flex; align-items: center; gap: .5em; max-width: 0; overflow: hidden; overflow: clip visible; white-space: nowrap; opacity: 0; color: #c9f5d4; transition: max-width .45s ease .15s, opacity .3s .15s; } /* clip only sideways: the steam may rise above */
.own-more::before { content: "·"; margin: 0 .1em 0 .6em; color: var(--dim); }
.own-cup { flex: none; width: 16px; height: 16px; margin: -3px 0 0 .1em; color: var(--white); }
.own-fill { fill: #a0652d; transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(0); }
.own-pour { fill: #a0652d; opacity: 0; }
.own-st { opacity: 0; fill: var(--yellow); }
@media (hover: hover) { /* phones have no hover: a tap only scrolls to the top, the chip never opens */
  .h10k-own:hover { opacity: 1; border-color: #b583ffcc; background: #b583ff14; }
  .h10k-own:hover .own-h { color: var(--phos); text-shadow: 0 0 8px #7dff9b99; }
  .h10k-own:hover .own-more { max-width: 16em; opacity: 1; }
  .h10k-own:hover .own-lens { filter: none; animation: own-wake .7s steps(6) both, own-pulse 1.6s ease-in-out .7s infinite; }
  .h10k-own:hover .own-eye::after { animation: own-ping .7s ease-out .15s; }
  .h10k-own:hover .own-pour { animation: own-pour .65s linear .65s; }
  .h10k-own:hover .own-fill { animation: own-fill .6s steps(3) .7s forwards; }
  .h10k-own:hover .own-st { animation: own-st 1.2s steps(1) 1.35s infinite; }
  .h10k-own:hover .own-st2 { animation-delay: 1.75s; }
}
.h10k-own:focus-visible { opacity: 1; border-color: #b583ffcc; background: #b583ff14; }
.h10k-own:focus-visible .own-h { color: var(--phos); text-shadow: 0 0 8px #7dff9b99; }
.h10k-own:focus-visible .own-more { max-width: 16em; opacity: 1; }
.h10k-own:focus-visible .own-lens { filter: none; animation: own-wake .7s steps(6) both, own-pulse 1.6s ease-in-out .7s infinite; }
.h10k-own:focus-visible .own-eye::after { animation: own-ping .7s ease-out .15s; }
.h10k-own:focus-visible .own-pour { animation: own-pour .65s linear .65s; }
.h10k-own:focus-visible .own-fill { animation: own-fill .6s steps(3) .7s forwards; }
.h10k-own:focus-visible .own-st { animation: own-st 1.2s steps(1) 1.35s infinite; }
.h10k-own:focus-visible .own-st2 { animation-delay: 1.75s; }
@keyframes own-wake { 0% { filter: grayscale(1) brightness(.45); } 20% { filter: brightness(2.2); box-shadow: 0 0 0 1.5px #8a8f98, 0 0 14px 4px #7dff9b; } 40% { filter: brightness(.6); } 60% { filter: brightness(1.6); } 100% { filter: none; } }
@keyframes own-pulse { 50% { box-shadow: 0 0 0 1.5px #8a8f98, 0 0 9px 2px #7dff9b; } }
@keyframes own-ping { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(2.6); } }
@keyframes own-pour { 0%, 99% { opacity: 1; } 100% { opacity: 0; } }
@keyframes own-fill { to { transform: none; } }
@keyframes own-st { 0% { opacity: 1; } 66% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { /* still: awake lens, full cup, steam shown, nothing moves */
  .h10k-own, .h10k-own *, .h10k-own *::before, .h10k-own *::after { animation: none !important; transition: none !important; }
  .h10k-own:is(:hover, :focus-visible) .own-lens { filter: none; }
  .own-fill { transform: none; } .own-st { opacity: 1; } .own-pour { opacity: 0; }
}
