/* JARVIS Portal — HUD. Zawsze ciemny: cyjan dla interfejsu, złoto dla „myślę” i „czeka”, czerwień dla zaległych
   i błędów, zieleń wyłącznie dla „wykonane”. Kontrast tekstu policzony na --bg-0: od 7,1:1 (--muted) do 17,6:1.
   Bez zewnętrznych zasobów (CSP), bez atrybutów style= (dynamika rdzenia przez CSSOM: --level). */

/* ---------- Font (OFL, lokalnie): Instrument Sans — szeroki w treści, wąski (75%) w etykietach HUD ---------- */
@font-face {
  font-family: "Instrument Sans"; font-style: normal; font-display: swap; font-weight: 400 700; font-stretch: 75% 100%;
  src: url("fonts/instrument-sans-latin-wdth-normal.woff2") format("woff2-variations"), url("fonts/instrument-sans-latin-wdth-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Sans"; font-style: normal; font-display: swap; font-weight: 400 700; font-stretch: 75% 100%;
  src: url("fonts/instrument-sans-latin-ext-wdth-normal.woff2") format("woff2-variations"), url("fonts/instrument-sans-latin-ext-wdth-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokeny ---------- */
:root {
  color-scheme: dark;
  --bg-0: #02060A;
  --bg-1: #06111A;
  --surface: #071622;          /* pola, karty (nieprzezroczyste — czytelność ponad efekt) */
  --surface-2: #0C2232;
  --panel: rgba(9, 30, 44, .62);
  --panel-hi: rgba(16, 52, 72, .52);
  --line: rgba(120, 222, 255, .16);
  --line-2: rgba(120, 222, 255, .34);
  --line-3: rgba(160, 236, 255, .72);
  --cyan: #63E1FF;
  --cyan-hi: #DFFBFF;
  --cyan-ink: #02121A;         /* tekst na cyjanie: 12:1 */
  --text: #E4F5FB;             /* 17,6:1 */
  --text-2: #AFCAD6;           /* 11,4:1 */
  --muted: #86A5B3;            /* 7,1:1, na panelu > 5,5:1 */
  --gold: #FFC857;             /* myślę, czeka na potwierdzenie — 12:1 */
  --red: #FF7A6B;              /* zaległe, błąd — 7,4:1 */
  --ok: #6DF2B4;               /* wykonane — 13:1 */
  --gold-soft: rgba(255, 200, 87, .1);
  --red-soft: rgba(255, 122, 107, .1);
  --ok-soft: rgba(109, 242, 180, .1);
  --cyan-soft: rgba(99, 225, 255, .1);
  --scrim: rgba(2, 6, 10, .9);
  --shadow: 0 18px 40px -22px rgba(0, 0, 0, .9);
  --glow: 0 0 18px rgba(99, 225, 255, .35);
  --state-rgb: 99, 225, 255;

  --font-ui: "Instrument Sans", -apple-system, "SF Pro Text", system-ui, sans-serif;
  --font-data: ui-monospace, "SF Mono", Menlo, Consolas, monospace;  /* na iPhonie i Macu: SF Mono, bez pliku fontu */

  --r-lg: 14px;
  --r: 10px;
  --r-sm: 6px;
  --cut: 12px;                 /* ścięty róg paneli HUD */
  --gutter: 16px;
  --topbar-h: 56px;
  --tabbar-h: 62px;
  --content-w: 760px;
  --core: min(72vw, 42vh, 400px);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

/* ---------- Baza ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg-0);
  /* Element z fokusem (Tab) nie chowa się pod nagłówkiem ani pod paskiem zakładek. */
  scroll-padding-top: calc(var(--topbar-h) + env(safe-area-inset-top) + 8px);
  scroll-padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px);
}
body {
  margin: 0;
  min-height: 100dvh;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  font-stretch: 100%;
  background:
    radial-gradient(110% 60% at 50% 22%, rgba(43, 184, 230, .12), transparent 62%),
    radial-gradient(90% 50% at 50% 115%, rgba(43, 184, 230, .07), transparent 70%),
    var(--bg-0);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}
/* Siatka HUD i linie skanu — statyczne, zero kosztu animacji. */
body::before, body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; }
body::before {
  background-image: linear-gradient(rgba(120, 222, 255, .045) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(120, 222, 255, .045) 1px, transparent 1px);
  background-size: 44px 44px; background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 85% 60% at 50% 30%, #000 25%, transparent 80%);
          mask-image: radial-gradient(ellipse 85% 60% at 50% 30%, #000 25%, transparent 80%);
}
body::after {
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .014) 0 1px, transparent 1px 3px),
              radial-gradient(ellipse at 50% 40%, transparent 55%, rgba(0, 0, 0, .55));
}
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
::selection { background: rgba(99, 225, 255, .3); color: var(--cyan-hi); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 16px; height: 16px; }
.mark-dot { fill: currentColor; stroke: none; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 12px; top: calc(env(safe-area-inset-top) + 10px); z-index: 100;
  background: var(--cyan); color: var(--cyan-ink); padding: 10px 14px; border-radius: var(--r-sm);
  text-decoration: none; font-weight: 600;
}
/* Niewidoczny (także w zrzutach całej strony i przy „gumowym” przewijaniu iOS), dopóki nie dostanie fokusu. */
.skip-link:not(:focus) { clip-path: inset(50%); width: 1px; height: 1px; padding: 0; overflow: hidden; white-space: nowrap; }

:focus-visible { outline: 2px solid var(--cyan-hi); outline-offset: 3px; border-radius: 6px; }
.main:focus { outline: none; }

.tnum { font-variant-numeric: tabular-nums; }
.label, .hud-label {
  font-size: 12px; font-weight: 600; font-stretch: 75%; letter-spacing: .2em; text-transform: uppercase; color: var(--text-2);
}
.mono { font-family: var(--font-data); font-variant-numeric: tabular-nums; }

/* ---------- Ekran startu ---------- */
.boot {
  position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 16px;
  z-index: 1; padding: var(--gutter);
}
.boot-mark { width: 52px; height: 52px; color: var(--cyan); filter: drop-shadow(0 0 10px rgba(99, 225, 255, .6)); animation: breathe 1.6s var(--ease-in-out) infinite; }
.boot-text { color: var(--text-2); font-size: 15px; text-align: center; max-width: 30ch; }

/* ---------- Logowanie ---------- */
.login {
  position: relative; z-index: 1; min-height: 100dvh; display: grid; place-items: center;
  padding: calc(env(safe-area-inset-top) + 32px) var(--gutter) calc(env(safe-area-inset-bottom) + 32px);
}
.login-wrap { width: 100%; max-width: 380px; }
.login-brand { margin-bottom: 32px; text-align: center; }
.login-mark { width: 72px; height: 72px; color: var(--cyan); margin-bottom: 22px; filter: drop-shadow(0 0 14px rgba(99, 225, 255, .6)); }
.login-title {
  font-size: clamp(34px, 11vw, 48px); font-weight: 600; font-stretch: 75%; line-height: 1;
  letter-spacing: .34em; padding-left: .34em; text-transform: uppercase; color: var(--cyan-hi);
  text-shadow: 0 0 22px rgba(99, 225, 255, .45);
}
.login-lede { margin-top: 14px; color: var(--text-2); font-size: 16px; }
.login-form { display: grid; gap: 10px; }
.login-foot { margin-top: 10px; color: var(--muted); font-size: 13px; text-align: center; }
.login-form.shake { animation: shake 320ms var(--ease-out); }

/* ---------- Pola i przyciski ---------- */
.field-label { font-size: 13px; font-weight: 600; font-stretch: 80%; letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); }
.input, .textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; font-size: 16px; /* ≥16px: iOS nie przybliża pola */
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line-2); border-radius: var(--r);
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
  appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--muted); opacity: 1; }
.input:focus, .textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(99, 225, 255, .22); }
.input[aria-invalid="true"] { border-color: var(--red); }
.select {
  padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2386A5B3' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.field-pass { position: relative; }
.field-pass .input { padding-right: 52px; }
.field-pass .icon-btn { position: absolute; right: 2px; top: 2px; }
.form-error { color: var(--red); font-size: 14px; font-weight: 500; }
.form-note { color: var(--muted); font-size: 13.5px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
  font-size: 15px; font-weight: 600; letter-spacing: .01em; text-decoration: none; white-space: nowrap;
  transition: transform 140ms var(--ease-out), background-color 160ms ease, border-color 160ms ease, color 160ms ease, opacity 160ms ease, box-shadow 160ms ease;
  user-select: none; -webkit-user-select: none;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--cyan); color: var(--cyan-ink); box-shadow: var(--glow); }
.btn-quiet { background: rgba(8, 26, 38, .7); color: var(--text); border-color: var(--line-2); }
.btn-ghost { background: transparent; color: var(--text-2); padding: 0 12px; }
.btn-block { width: 100%; min-height: 50px; font-size: 16px; margin-top: 6px; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; }

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px;
  border: 0; background: transparent; color: var(--text-2); text-decoration: none;
  transition: transform 140ms var(--ease-out), background-color 160ms ease, color 160ms ease;
}
.icon-btn:active { transform: scale(.94); }

.spinner {
  display: inline-block; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: spin 600ms linear infinite;
}

/* ---------- Powłoka aplikacji ---------- */
.shell { position: relative; z-index: 1; min-height: 100dvh; }
/* Nagłówek bez transform/filter/backdrop-filter: zawiera pasek zakładek, którego position: fixed ma liczyć się
   od ekranu (te właściwości zrobiłyby z nagłówka blok zawierający). */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: calc(var(--topbar-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left));
  background: var(--bg-0); /* pełne tło: przewijana treść nie prześwituje pod paskiem stanu iPhone'a */
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); min-height: 44px; }
.brand-mark { width: 24px; height: 24px; color: var(--cyan); filter: drop-shadow(0 0 6px rgba(99, 225, 255, .55)); }
.brand-word { font-size: 15px; font-weight: 600; font-stretch: 75%; letter-spacing: .34em; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.clock-time { font-family: var(--font-data); font-size: 16px; color: var(--text); letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.net-badge {
  font-size: 11px; font-weight: 600; font-stretch: 80%; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold); border: 1px solid rgba(255, 200, 87, .45); padding: 3px 8px; border-radius: 4px;
}

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 0 max(4px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(4px, env(safe-area-inset-left));
  background: var(--bg-0); /* pełne tło: treść pod paskiem zakładek nie prześwituje */
  border-top: 1px solid var(--line);
  transition: transform 220ms var(--ease-out);
}
.nav-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); height: var(--tabbar-h); }
.nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  height: 100%; text-decoration: none; color: var(--muted);
  font-size: 10.5px; font-weight: 600; font-stretch: 80%; letter-spacing: .1em; text-transform: uppercase;
  transition: color 160ms ease, transform 140ms var(--ease-out);
}
.nav-item span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item:active { transform: scale(.94); }
.nav-item .icon { width: 22px; height: 22px; stroke-width: 1.6; }
.nav-item[aria-current] { color: var(--cyan-hi); }
.nav-item[aria-current] .icon { filter: drop-shadow(0 0 6px rgba(99, 225, 255, .7)); }
body.composing .nav { transform: translateY(110%); }

.main {
  position: relative;
  padding: 8px max(var(--gutter), env(safe-area-inset-right)) calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 32px) max(var(--gutter), env(safe-area-inset-left));
}
.view { max-width: var(--content-w); margin: 0 auto; }

/* ---------- Nagłówki widoków ---------- */
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 18px 0 16px; }
.view-head > div:first-child { min-width: 0; }
.view-title {
  font-size: clamp(26px, 8vw, 34px); font-weight: 600; font-stretch: 75%; line-height: 1.05;
  letter-spacing: .14em; text-transform: uppercase; color: var(--cyan-hi);
  text-shadow: 0 0 18px rgba(99, 225, 255, .35); overflow-wrap: anywhere;
}
.view-title:focus { outline: none; }
.view-sub { color: var(--muted); font-size: 15px; margin-top: 8px; }
.view-tools { display: flex; gap: 2px; align-items: center; flex: none; }

.section { margin-top: 28px; }
.section:first-of-type { margin-top: 10px; }
.section-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 6px; scroll-margin-top: calc(var(--topbar-h) + env(safe-area-inset-top) + 12px);
}
.section-head .label { flex: none; }
.section-head::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); order: 2; }
.section-count { order: 3; font-family: var(--font-data); font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.section-head.is-signal .label, .section-head.is-signal .section-count { color: var(--red); }

/* ---------- Panele HUD (wspólne) ---------- */
.card, .holo {
  position: relative; min-width: 0;
  background: linear-gradient(180deg, var(--panel-hi), var(--panel));
  border: 1px solid var(--line);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
/* Narożniki HUD: jaśniejsze klamry w dwóch rogach. */
.card::before, .card::after, .holo::before, .holo::after { content: ""; position: absolute; width: 18px; height: 18px; pointer-events: none; }
.card::before, .holo::before { top: 0; right: 0; border-top: 1.5px solid var(--line-3); border-right: 1.5px solid var(--line-3); }
.card::after, .holo::after { bottom: 0; left: 0; border-bottom: 1.5px solid var(--line-3); border-left: 1.5px solid var(--line-3); }
.card-pad { padding: 16px; }

/* ---------- Rdzeń ---------- */
.core-view { --state-rgb: 99, 225, 255; }
.core-view[data-state="listening"] { --state-rgb: 200, 246, 255; }
.core-view[data-state="thinking"] { --state-rgb: 255, 200, 87; }
.core-view[data-state="speaking"] { --state-rgb: 120, 232, 255; }

.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 4px 0 2px; }
.link {
  position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 2px 10px;
  border: 1px solid var(--line); border-radius: 13px; background: rgba(8, 26, 38, .6);
  font-size: 11px; font-weight: 600; font-stretch: 80%; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2);
}
.link .dot { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--muted); flex: none; }
.link.is-on .dot { background: var(--ok); border-color: var(--ok); box-shadow: 0 0 8px rgba(109, 242, 180, .7); }
.link.is-off { color: var(--muted); }

.core-zone { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6px 0 14px; min-width: 0; }
.core-greet { margin: 8px 0 4px; color: var(--muted); }
.core {
  position: relative; width: var(--core); height: var(--core); flex: none; border: 0; padding: 0; border-radius: 50%;
  background: transparent; color: inherit; touch-action: manipulation; --level: 0; margin-top: 4px;
}
.core:focus-visible { outline-offset: 6px; border-radius: 50%; }
.core-halo {
  position: absolute; inset: 14%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(var(--state-rgb), .42) 0%, rgba(var(--state-rgb), .12) 45%, transparent 70%);
  opacity: calc(.45 + var(--level) * .55); transform: scale(calc(1 + var(--level) * .22));
  transition: background .6s var(--ease-out);
}
.core-bars, .core-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.core-svg { overflow: visible; }
.core-svg .spin { transform-box: view-box; transform-origin: 200px 200px; animation: spin linear infinite; }
.ring-ticks { animation-duration: 240s !important; }
.ring-dash { animation-duration: 90s !important; }
.ring-seg { animation-duration: 140s !important; animation-direction: reverse !important; }
.ring-scan { animation-duration: 1.4s !important; }
.tick { stroke: rgba(var(--state-rgb), .28); stroke-width: 1.2; transition: stroke .6s; }
.tick.major { stroke: rgba(var(--state-rgb), .7); stroke-width: 1.6; }
.ring-outer { fill: none; stroke: rgba(var(--state-rgb), .32); stroke-width: 1; transition: stroke .6s; }
.ring-dash circle { fill: none; stroke: rgba(var(--state-rgb), .55); stroke-width: 2; stroke-dasharray: 2 7; transition: stroke .6s; }
.ring-seg circle { fill: none; stroke: rgba(var(--state-rgb), .5); stroke-width: 9; stroke-dasharray: 70 14.195; transition: stroke .6s; }
.ring-scan circle { fill: none; stroke: var(--gold); stroke-width: 11; stroke-dasharray: 90 751.95; stroke-linecap: round; opacity: 0; transition: opacity .4s; }
.ring-thin { fill: none; stroke: rgba(var(--state-rgb), .4); stroke-width: 1.2; stroke-dasharray: 160 20 40 20; transition: stroke .6s; }
.coil { fill: rgba(var(--state-rgb), .2); stroke: rgba(var(--state-rgb), .85); stroke-width: 1.4; transition: fill .6s, stroke .6s; }
.heart { transform-box: view-box; transform-origin: 200px 200px; transform: scale(calc(1 + var(--level) * .1)); }
.core-ring { fill: none; stroke: rgba(var(--state-rgb), .95); stroke-width: 2.5; transition: stroke .6s; }
.core-fill { fill: url(#g-core); }
.g-a { stop-color: #FFFFFF; }
.g-b { stop-color: rgb(var(--state-rgb)); stop-opacity: .85; transition: stop-color .6s; }
.g-c { stop-color: rgb(var(--state-rgb)); stop-opacity: 0; transition: stop-color .6s; }
.core-center { fill: #FFFFFF; opacity: calc(.75 + var(--level) * .25); }
.ripple { fill: none; stroke: rgba(var(--state-rgb), .6); stroke-width: 1.5; opacity: 0; transform-box: view-box; transform-origin: 200px 200px; }
.core-view[data-state="listening"] .ripple { animation: ripple 2.2s var(--ease-out) infinite; }
.core-view[data-state="listening"] .ripple-2 { animation-delay: 1.1s; }
.core-view[data-state="thinking"] .ring-scan circle { opacity: 1; }
.core-view[data-state="listening"] .ring-seg circle, .core-view[data-state="speaking"] .ring-seg circle { stroke: rgba(var(--state-rgb), .78); }
.core-view[data-state="listening"] .ring-outer, .core-view[data-state="speaking"] .ring-outer { stroke: rgba(var(--state-rgb), .6); }
.core-view[data-state="idle"] .heart-glow { animation: breathe 4.8s ease-in-out infinite; }

.state {
  margin-top: 12px; min-height: 38px; font-size: 26px; font-weight: 600; font-stretch: 75%; letter-spacing: .34em;
  text-transform: uppercase; padding-left: .34em; color: rgb(var(--state-rgb));
  text-shadow: 0 0 18px rgba(var(--state-rgb), .45); transition: color .4s, text-shadow .4s;
}
.state.swap { animation: swap .38s var(--ease-out); }
.state-sub { min-height: 22px; margin-top: 2px; font-size: 14px; color: var(--muted); max-width: 36ch; overflow-wrap: anywhere; }
.caption { width: 100%; max-width: 38ch; min-height: 64px; margin-top: 14px; }
.caption-who { margin-bottom: 4px; }
.caption-text { font-size: 19px; line-height: 1.4; color: var(--text); text-wrap: pretty; overflow-wrap: anywhere; }
.caption-text.is-error { color: var(--red); font-size: 16px; }
.caption-text .w { transition: color .25s, opacity .25s; }
.caption-text .w.future { opacity: .4; }
.caption-text .w.now { color: var(--cyan-hi); text-shadow: 0 0 12px rgba(99, 225, 255, .6); }
.caption-text .interim { color: var(--muted); }
.suggest { margin-top: 14px; width: 100%; }
.suggest-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
.sug {
  min-height: 44px; max-width: 100%; padding: 8px 16px; border-radius: 22px; border: 1px solid var(--line);
  background: rgba(10, 34, 48, .55); color: var(--text); font-size: 14.5px; line-height: 1.3; overflow-wrap: anywhere;
  transition: border-color 160ms ease, transform 140ms var(--ease-out);
}
.sug:active { transform: scale(.97); }
.core-actions { display: flex; gap: 8px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.chip-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 22px;
  border: 1px solid var(--line-2); background: rgba(8, 26, 38, .7); color: var(--text-2); font-size: 14px;
  transition: border-color 160ms ease, color 160ms ease, transform 140ms var(--ease-out);
}
.chip-btn:active { transform: scale(.97); }
.chip-btn[aria-expanded="true"], .chip-btn[aria-pressed="true"] { border-color: var(--line-3); color: var(--text); }
.core-composer { display: flex; gap: 8px; width: 100%; max-width: 520px; margin-top: 12px; }
.core-composer .input { flex: 1; min-width: 0; border-radius: 24px; padding: 0 16px; background: rgba(4, 16, 24, .9); }
.core-composer .btn { flex: none; padding: 0 16px; }
.core-note {
  margin-top: 12px; max-width: 42ch; padding: 10px 14px; font-size: 14px; color: var(--text);
  border: 1px solid rgba(255, 200, 87, .4); border-radius: var(--r); background: var(--gold-soft); overflow-wrap: anywhere;
}
/* Mowa bez „Jarvis” (nie pójdzie): przygaszona kolorem, bez przezroczystości — 19 px tekstu musi mieć ≥ 4,5:1 (muted: 7,1:1). */
.caption-text.is-ignored { color: var(--muted); }

/* W trakcie słuchania: „Wyślij teraz” / „Anuluj”. */
.listen-ctl { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }

/* Rozmowa bez rąk: wskaźnik mikrofonu (kropka + opis) i wyłącznik. Kropka: cyjan — słucham, przygaszona — czuwam,
   złota — JARVIS odpowiada (mikrofon czeka), pusta — wstrzymane / czeka na stuknięcie. */
.hf-bar {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%; min-height: 52px; margin-top: 12px;
  padding: 4px 4px 4px 14px; border: 1px solid var(--line-2); border-radius: 26px; background: rgba(8, 26, 38, .78);
  font-size: 13.5px; line-height: 1.35; color: var(--text-2); text-align: left;
}
.hf-text { min-width: 0; overflow-wrap: anywhere; }
.hf-dot { position: relative; flex: none; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--muted); }
.hf-bar[data-hf="listening"] { border-color: rgba(99, 225, 255, .6); color: var(--text); }
.hf-bar[data-hf="listening"] .hf-dot { background: var(--cyan-hi); border-color: var(--cyan-hi); box-shadow: 0 0 10px rgba(99, 225, 255, .8); }
.hf-bar[data-hf="listening"] .hf-dot::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1.5px solid rgba(99, 225, 255, .7);
  animation: ring 1.6s var(--ease-out) infinite;
}
.hf-bar[data-hf="standby"] .hf-dot { background: rgba(99, 225, 255, .35); border-color: rgba(99, 225, 255, .6); }
.hf-bar[data-hf="deaf"] .hf-dot { background: var(--gold); border-color: var(--gold); }
.hf-bar[data-hf="paused"], .hf-bar[data-hf="gesture"] { border-color: rgba(255, 200, 87, .5); }
.hf-off {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 22px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-size: 14px;
  transition: border-color 160ms ease, transform 140ms var(--ease-out);
}
.hf-off:active { transform: scale(.97); }
#hf-toggle[aria-pressed="true"] { border-color: var(--cyan); color: var(--text); background: rgba(99, 225, 255, .12); }
.select-narrow { width: auto; flex: none; min-width: 150px; }

.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 2px 10px; }
.sec-head .hud-label { min-width: 0; overflow-wrap: anywhere; }
.sec-link {
  flex: none; font-size: 12px; font-weight: 600; font-stretch: 80%; letter-spacing: .12em; text-transform: uppercase;
  color: var(--cyan); text-decoration: none; padding: 8px 0;
}
.day { margin-top: 18px; min-width: 0; }
.day, .log { scroll-margin-top: calc(var(--topbar-h) + env(safe-area-inset-top) + 8px); }
.holo-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.holo { padding: 14px; animation: materialize .7s var(--ease-out) both; }
.holo:nth-child(2) { animation-delay: .08s; }
.holo:nth-child(3) { animation-delay: .16s; }
.holo.is-loading { min-height: 96px; animation: none; }
.holo.is-loading .sk { margin-top: 18px; }
.holo-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.holo-meta { font-size: 12px; color: var(--muted); }
.holo-num { margin: 6px 0 6px; }
.holo-num .num { font-family: var(--font-data); font-size: 32px; line-height: 1; color: var(--cyan-hi); text-shadow: 0 0 14px rgba(99, 225, 255, .5); }
.holo.is-signal .holo-num .num { color: var(--red); text-shadow: 0 0 14px rgba(255, 122, 107, .45); }
.holo-list li {
  display: grid; grid-template-columns: minmax(46px, auto) minmax(0, 1fr); gap: 10px; padding: 7px 0;
  border-top: 1px solid var(--line); font-size: 14.5px; line-height: 1.35;
}
.holo-list li > span:last-child, .t-title { min-width: 0; overflow-wrap: anywhere; }
.t-title small { color: var(--muted); font-size: 13px; }
.t-time { font-family: var(--font-data); font-size: 12.5px; color: var(--muted); padding-top: 2px; white-space: nowrap; }
.holo-list li.is-overdue .t-time { color: var(--red); }
.holo-empty { color: var(--muted); font-size: 14px; padding-top: 2px; }
.holo-more { display: inline-block; margin-top: 6px; font-size: 13px; color: var(--cyan); text-decoration: none; padding: 6px 0; }
.holo.is-off { background: linear-gradient(180deg, rgba(14, 30, 40, .45), rgba(8, 20, 28, .5)); }
.holo.is-off::before, .holo.is-off::after { border-color: var(--line-2); }
.holo-off { margin-top: 10px; font-size: 14px; color: var(--text-2); overflow-wrap: anywhere; }
.holo-off b { color: var(--gold); font-weight: 600; }

.log { margin-top: 22px; min-width: 0; }
.log-list { display: flex; flex-direction: column; gap: 10px; }
.ex { padding: 12px 14px; border-left: 2px solid var(--line-2); background: linear-gradient(90deg, rgba(12, 40, 56, .45), transparent); min-width: 0; }
.ex-you { font-size: 14px; color: var(--muted); margin-bottom: 8px; overflow-wrap: anywhere; }
.ex-tag { font-size: 11px; font-weight: 600; font-stretch: 75%; letter-spacing: .16em; text-transform: uppercase; }
.ex .msg-jarvis { padding-left: 0; border-left: 0; }
.ex .msg-text { font-size: 15.5px; }

/* ---------- Dziś (pełny widok) ---------- */
.today-hero { padding: 20px 0 4px; }
.today-weekday {
  font-size: clamp(34px, 11vw, 52px); font-weight: 600; font-stretch: 75%; line-height: 1; letter-spacing: .12em;
  text-transform: uppercase; color: var(--cyan-hi); text-shadow: 0 0 22px rgba(99, 225, 255, .4);
}
.today-date { margin-top: 10px; color: var(--text-2); font-size: 16px; }
.today-greet { color: var(--muted); }
.today-line { margin-top: 16px; font-size: 18px; line-height: 1.45; color: var(--text); max-width: 40ch; text-wrap: pretty; }
.today-line .hl { color: var(--red); font-weight: 600; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 20px; }
.stat {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 10px; min-width: 0;
  background: linear-gradient(180deg, var(--panel-hi), var(--panel)); border: 1px solid var(--line); border-radius: var(--r-sm);
  text-align: left; color: inherit; min-height: 76px; transition: transform 140ms var(--ease-out), border-color 160ms ease;
}
.stat:active { transform: scale(.97); }
.stat-num { font-family: var(--font-data); font-size: 30px; line-height: 1; color: var(--cyan-hi); font-variant-numeric: tabular-nums; }
.stat-label { font-size: 10.5px; font-weight: 600; font-stretch: 75%; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); max-width: 100%; overflow-wrap: anywhere; }
.stat.is-signal .stat-num { color: var(--red); }
.stat.is-zero .stat-num { color: var(--muted); opacity: .7; }
.stat.is-unknown .stat-num { color: var(--muted); font-size: 24px; }

.brief-details { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 4px; }
.brief-details summary {
  display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; list-style: none;
  font-size: 14px; font-weight: 600; color: var(--text-2);
}
.brief-details summary::-webkit-details-marker { display: none; }
.brief-details summary .icon { width: 16px; height: 16px; transition: transform 200ms var(--ease-out); }
.brief-details[open] summary .icon { transform: rotate(90deg); }
.brief-text {
  white-space: pre-wrap; font-size: 14.5px; line-height: 1.6; color: var(--text-2); font-family: var(--font-ui);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin: 0 0 8px;
}

/* ---------- Wiersze list ---------- */
.rows { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line);
  transition: opacity 200ms ease, transform 220ms var(--ease-out);
}
.row:last-child { border-bottom: 0; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 16px; font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }
.row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 3px; font-size: 13.5px; color: var(--muted); }
.row-meta .is-overdue { color: var(--red); font-weight: 600; }
.row-meta .with-icon { display: inline-flex; align-items: center; gap: 4px; }
.row-meta .with-icon .icon { width: 14px; height: 14px; }
.row-desc { margin-top: 4px; font-size: 14px; color: var(--text-2); overflow-wrap: anywhere; }
.prio { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--gold); }
.row.is-leaving { opacity: 0; transform: translateX(14px); }
.row.is-pending .row-title { color: var(--muted); }
.row.is-done .row-title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-2); }

/* Checkbox: prawdziwy input (czytniki ekranu, klawiatura), duży cel dotyku. */
.check { position: relative; flex: none; width: 44px; height: 44px; margin: -10px -6px -10px -10px; display: grid; place-items: center; }
.check input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.check .box {
  pointer-events: none; /* dotyk zawsze trafia w input, także w środek kwadratu z ikoną */
  width: 22px; height: 22px; border-radius: 6px; border: 1.6px solid var(--line-2); background: var(--surface);
  display: grid; place-items: center; color: var(--cyan-ink);
  transition: background-color 160ms ease, border-color 160ms ease, transform 140ms var(--ease-out);
}
.check .box .icon { width: 15px; height: 15px; stroke-width: 2.6; opacity: 0; transform: scale(.7); transition: opacity 160ms ease, transform 200ms var(--ease-out); }
.check input:checked + .box { background: var(--ok); border-color: var(--ok); }
.check input:checked + .box .icon { opacity: 1; transform: scale(1); }
.check input:active + .box { transform: scale(.9); }
.check input:focus-visible + .box { outline: 2px solid var(--cyan-hi); outline-offset: 2px; }
.check input:disabled { cursor: default; }
.row.is-pending .check .box { background: var(--surface-2); border-color: var(--ok); }
.row.is-pending .check .box .icon { opacity: .6; transform: scale(1); color: var(--ok); }

.undo-bar { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 13.5px; color: var(--ok); font-weight: 600; }
.undo-bar .btn { min-height: 32px; padding: 0 12px; font-size: 13px; }

.chip {
  display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 0 9px;
  border-radius: 4px; border: 1px solid var(--line); background: rgba(8, 26, 38, .6); color: var(--text-2); font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.chip-signal { color: var(--red); border-color: rgba(255, 122, 107, .4); background: var(--red-soft); }

/* ---------- Stany: pustka, błąd, ładowanie ---------- */
.empty { padding: 24px 0 8px; }
.empty-title { font-size: 20px; font-weight: 600; font-stretch: 85%; line-height: 1.25; letter-spacing: .02em; color: var(--text); }
.empty-text { margin-top: 6px; color: var(--muted); font-size: 15px; max-width: 46ch; }
.empty-sm { padding: 10px 0 4px; color: var(--muted); font-size: 14.5px; }

.state-error {
  display: flex; gap: 12px; align-items: flex-start; margin-top: 12px; padding: 14px 16px;
  background: var(--red-soft); color: var(--text); border: 1px solid rgba(255, 122, 107, .35); border-radius: var(--r);
}
.state-error .icon { color: var(--red); margin-top: 1px; }
.state-error p { font-size: 14.5px; }
.state-error .btn { margin-top: 10px; }
.state-warn { background: var(--gold-soft); border-color: rgba(255, 200, 87, .35); }
.state-warn .icon { color: var(--gold); }

.skeleton { display: flex; flex-direction: column; gap: 0; }
.sk-row { display: flex; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.sk { height: 12px; border-radius: 6px; background: var(--surface-2); position: relative; overflow: hidden; }
.sk::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(99, 225, 255, .12), transparent);
  animation: shimmer 1.3s linear infinite;
}
.sk-box { width: 22px; height: 22px; border-radius: 6px; flex: none; }
.sk-line { flex: 1; display: grid; gap: 8px; }
.sk-w60 { width: 60%; } .sk-w40 { width: 40%; } .sk-w80 { width: 80%; } .sk-w30 { width: 30%; }

/* ---------- Segmenty, wyszukiwarka, filtry ---------- */
.toolbar { display: grid; gap: 12px; margin-bottom: 8px; }
.segmented {
  display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 3px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; width: 100%; max-width: 380px;
}
.segmented button {
  min-height: 36px; border: 0; border-radius: 999px; background: transparent; color: var(--text-2);
  font-size: 14px; font-weight: 600; transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}
.segmented button[aria-pressed="true"] { background: rgba(99, 225, 255, .16); color: var(--cyan-hi); box-shadow: inset 0 0 0 1px var(--line-2); }
.search { position: relative; }
.search .icon { position: absolute; left: 13px; top: 50%; translate: 0 -50%; color: var(--muted); width: 19px; height: 19px; pointer-events: none; }
.search .input { padding-left: 42px; border-radius: 999px; }
.filters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter); }
.filters::-webkit-scrollbar { display: none; }
.filter {
  flex: none; min-height: 36px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line-2);
  background: transparent; color: var(--text-2); font-size: 13.5px; font-weight: 600;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 140ms var(--ease-out);
}
.filter:active { transform: scale(.96); }
.filter[aria-pressed="true"] { background: rgba(99, 225, 255, .16); border-color: var(--cyan); color: var(--cyan-hi); }

/* ---------- Zadania: szybkie dodawanie ---------- */
.quick { padding: 14px; margin-bottom: 22px; }
.quick-grid { display: grid; gap: 10px; }
.quick-when { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.quick .input { background: rgba(2, 10, 16, .85); }
.quick-hints { display: flex; flex-wrap: wrap; gap: 6px; }
.hint {
  min-height: 34px; padding: 0 11px; border-radius: 999px; border: 1px dashed var(--line-2);
  background: transparent; color: var(--text-2); font-size: 13px; font-weight: 500;
  transition: transform 140ms var(--ease-out), border-color 160ms ease, color 160ms ease;
}
.hint:active { transform: scale(.96); }
.quick-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.quick-result { font-size: 14px; color: var(--ok); font-weight: 500; }
.quick-result .note { display: block; color: var(--muted); font-weight: 400; margin-top: 2px; }
.link-btn { background: none; border: 0; padding: 8px 0; color: var(--cyan); font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }

/* ---------- Pamięć i projekty ---------- */
.mem { padding: 14px 0; border-bottom: 1px solid var(--line); }
.mem:last-child { border-bottom: 0; }
.mem-type { font-size: 11px; font-weight: 600; font-stretch: 75%; letter-spacing: .18em; text-transform: uppercase; color: var(--cyan); }
.mem-text { margin-top: 4px; font-size: 16px; line-height: 1.45; overflow-wrap: anywhere; }
.mem-meta { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; color: var(--muted); }

.projects { display: grid; gap: 12px; }
.project { padding: 16px; }
.project-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.project-name { font-size: 19px; font-weight: 600; font-stretch: 85%; line-height: 1.25; letter-spacing: .02em; overflow-wrap: anywhere; min-width: 0; }
.project-next { margin-top: 8px; font-size: 15px; color: var(--text-2); }
.project-next b { font-weight: 600; color: var(--text); }
.project-next.is-missing { color: var(--gold); font-weight: 500; }
.project-meta { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.project-reasons { margin-top: 10px; display: grid; gap: 4px; font-size: 14px; color: var(--red); font-weight: 500; }
.project-reasons li { display: flex; gap: 8px; align-items: flex-start; }
.project-reasons li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-top: 8px; flex: none; }
.project.is-attention { border-color: rgba(255, 122, 107, .4); }
.more { margin-top: 18px; }
.more summary { min-height: 44px; display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; color: var(--text-2); list-style: none; }
.more summary::-webkit-details-marker { display: none; }
.more summary .icon { width: 16px; height: 16px; transition: transform 200ms var(--ease-out); }
.more[open] summary .icon { transform: rotate(90deg); }

/* ---------- Ustawienia ---------- */
.kv { display: grid; }
.kv-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.kv-row:last-child { border-bottom: 0; }
.kv-key { font-size: 15px; color: var(--text); flex: 1; }
.kv-key small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.kv-val { font-size: 15px; font-weight: 600; color: var(--text-2); text-align: right; font-variant-numeric: tabular-nums; }
.kv-stack { flex-direction: column; align-items: stretch; gap: 10px; }
.kv-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kv-controls .select { flex: 1; min-width: 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 4px; font-size: 12px; font-weight: 600; font-stretch: 80%; letter-spacing: .1em; text-transform: uppercase; border: 1px solid currentColor; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-on { color: var(--ok); background: var(--ok-soft); }
.pill-off { color: var(--muted); }
.settings-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.howto { font-size: 14.5px; color: var(--text-2); }
.howto ol { list-style: decimal; padding-left: 22px; display: grid; gap: 6px; margin-top: 8px; }
.howto strong { color: var(--text); }

/* Przełącznik (checkbox z role="switch"): cały obszar klikalny, 44 px celu. */
.switch { position: relative; flex: none; width: 52px; height: 44px; display: grid; place-items: center; }
.switch input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.switch-track { pointer-events: none; width: 46px; height: 28px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); position: relative; transition: background-color 160ms ease, border-color 160ms ease; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: transform 180ms var(--ease-out), background-color 160ms ease; }
.switch input:checked + .switch-track { background: rgba(99, 225, 255, .22); border-color: var(--cyan); }
.switch input:checked + .switch-track::after { transform: translateX(18px); background: var(--cyan-hi); box-shadow: var(--glow); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--cyan-hi); outline-offset: 2px; }

/* ---------- Więcej i Skróty ---------- */
.menu { display: grid; gap: 10px; margin-top: 6px; }
.menu-item {
  display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 12px 14px; text-decoration: none; color: var(--text);
  background: linear-gradient(90deg, rgba(12, 40, 56, .5), rgba(8, 24, 34, .35)); border: 1px solid var(--line); border-radius: var(--r);
  transition: border-color 160ms ease, transform 140ms var(--ease-out);
}
.menu-item:active { transform: scale(.98); }
.menu-item > .icon { color: var(--cyan); }
.menu-text { flex: 1; min-width: 0; display: grid; gap: 2px; overflow-wrap: anywhere; }
.menu-label { font-weight: 600; }
.menu-text small { color: var(--muted); font-size: 13.5px; }
.menu-chevron { color: var(--muted); }

.shortcuts { display: grid; gap: 12px; }
.shortcut { padding: 16px; display: grid; gap: 10px; }
.shortcut-head { display: flex; gap: 12px; align-items: center; }
.shortcut-head > .icon { color: var(--cyan); }
.shortcut-name { font-size: 18px; font-weight: 600; font-stretch: 85%; letter-spacing: .04em; }
.shortcut-lead { font-size: 13px; color: var(--cyan); }
.shortcut-text { font-size: 14.5px; color: var(--text-2); overflow-wrap: anywhere; }
.shortcut-btn { justify-self: start; max-width: 100%; white-space: normal; text-align: center; }
.shortcut-missing { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.notes-list { display: grid; gap: 8px; font-size: 14.5px; color: var(--text-2); }
.notes-list li { display: flex; gap: 10px; align-items: flex-start; overflow-wrap: anywhere; }
.notes-list li::before { content: ""; width: 6px; height: 6px; margin-top: 9px; border-radius: 50%; background: var(--cyan); flex: none; }

/* ---------- Pomysły (bank pomysłów i Rada) ---------- */
/* Zakładka w nagłówku tylko na komputerze; na telefonie pasek ma 5 pól, a Pomysły są w „Więcej” i w Rdzeniu. */
.nav-wide { display: none; }
.ideas-toolbar { margin-bottom: 14px; }
.filter-count { margin-left: 7px; font-family: var(--font-data); font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.filter[aria-pressed="true"] .filter-count { color: var(--cyan-hi); }
.ideas { display: grid; gap: 10px; }
.idea-card { padding: 6px 14px 14px; display: grid; gap: 6px; transition: border-color 160ms ease; }
.idea-card.is-awaiting { border-color: rgba(255, 200, 87, .5); }
.idea-card.is-awaiting::before, .idea-card.is-awaiting::after { border-color: var(--gold); }
/* Cały obszar karty prowadzi do szczegółów (link rozciągnięty pseudo-elementem), czytnik słyszy jeden link. */
.idea-link { display: flex; align-items: baseline; gap: 10px; min-height: 44px; padding-top: 10px; text-decoration: none; color: var(--text); }
.idea-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.idea-link:focus-visible { outline: none; }
.idea-link:focus-visible::after { outline: 2px solid var(--cyan-hi); outline-offset: -4px; }
.idea-no { flex: none; min-width: 2.1em; font-size: 14px; color: var(--cyan); }
.idea-card.is-awaiting .idea-no { color: var(--gold); }
.idea-title { min-width: 0; font-size: 17px; font-weight: 600; line-height: 1.3; }
.idea-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 13px; color: var(--muted); }
.idea-when { font-size: 13px; color: var(--muted); }
.idea-excerpt {
  font-size: 14.5px; line-height: 1.45; color: var(--text-2);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; line-clamp: 3; overflow: hidden;
}
.ipill {
  display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 4px; border: 1px solid currentColor;
  font-size: 11px; font-weight: 600; font-stretch: 80%; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; color: var(--text-2);
}
.ipill-council, .ipill-in_progress { color: var(--cyan); background: var(--cyan-soft); }
.ipill-awaiting { color: var(--gold); background: var(--gold-soft); }
.ipill-approved { color: var(--cyan-hi); background: rgba(99, 225, 255, .16); }
.ipill-done { color: var(--ok); background: var(--ok-soft); }
.ipill-parked { color: var(--muted); }
.ipill-rejected { color: var(--red); background: var(--red-soft); }
.verdict {
  display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 4px; border: 1px solid var(--line-2);
  font-size: 12.5px; font-weight: 600; white-space: nowrap; color: var(--text);
}
.verdict-go { color: var(--cyan-hi); border-color: rgba(99, 225, 255, .5); background: var(--cyan-soft); }
.verdict-go_zmiany { color: var(--gold); border-color: rgba(255, 200, 87, .45); background: var(--gold-soft); }
.verdict-no_go { color: var(--red); border-color: rgba(255, 122, 107, .45); background: var(--red-soft); }
.verdict-needs_input { color: var(--text-2); border-style: dashed; }

/* Tablica (od 1080 px): kolumny według statusów; „Czeka na Ciebie” wyróżniona złotem. */
.board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; align-items: start; }
.board-col { min-width: 0; padding: 10px 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: rgba(6, 20, 30, .45); }
.board-col.is-awaiting { border-color: rgba(255, 200, 87, .45); background: linear-gradient(180deg, var(--gold-soft), rgba(6, 20, 30, .45)); }
.board-col.is-awaiting .label, .board-col.is-awaiting .section-count { color: var(--gold); }
.board-col .section-head { margin-bottom: 10px; }
.board-col .label { overflow-wrap: anywhere; flex: 0 1 auto; min-width: 0; }
.board .ideas { gap: 8px; }
.board .idea-card { padding: 4px 10px 10px; }
.board .idea-title { font-size: 15px; }
.board .idea-no { font-size: 13px; }
.ideas-grid { grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.ideas-capped { margin-top: 14px; }

/* Szczegóły pomysłu */
.idea-detail { max-width: 860px; margin: 0 auto; }
.back-link {
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin-top: 6px; padding-right: 10px;
  color: var(--cyan); text-decoration: none; font-size: 14px; font-weight: 600;
}
.idea-head { display: grid; gap: 8px; padding: 4px 0 6px; }
.idea-kicker { color: var(--cyan); }
.idea-h1 { font-size: clamp(22px, 6.2vw, 30px); font-stretch: 85%; letter-spacing: .02em; text-transform: none; line-height: 1.2; }
.idea-decide { padding: 14px; margin-top: 16px; display: grid; gap: 12px; }
/* Telefon: dwa przyciski w rzędzie (na wąskim iPhonie SE jeden), główny na całą szerokość; od 720 px zwykły rząd. */
.idea-buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.idea-buttons .btn-primary { grid-column: 1 / -1; }
.idea-buttons .btn, .form-actions .btn { white-space: normal; text-align: center; line-height: 1.2; padding: 6px 14px; }
@media (min-width: 720px) {
  .idea-buttons { display: flex; flex-wrap: wrap; }
}
.btn-danger { background: var(--red-soft); color: var(--red); border-color: rgba(255, 122, 107, .55); }
.idea-note { font-size: 14.5px; color: var(--text-2); }
.idea-form { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.idea-form .input, .idea-form .textarea { background: rgba(2, 10, 16, .85); }
.idea-form .input[type="date"] { max-width: 240px; }
.textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.textarea[aria-invalid="true"] { border-color: var(--red); }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.idea-result:empty { display: none; }
.form-note.is-limit { color: var(--gold); }
.callout-ok { background: var(--ok-soft); border-color: rgba(109, 242, 180, .35); }
.callout-ok .callout-head { color: var(--ok); }
.idea-tasks { display: grid; }
.idea-tasks li { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px; }
.idea-tasks li:first-child { border-top: 0; }
.idea-tasks .icon { color: var(--cyan); margin-top: 3px; }
.idea-tasks li.is-done .icon { color: var(--ok); }
.idea-tasks li.is-done .idea-task-title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-2); }
.idea-task-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.idea-result .msg-jarvis { margin-top: 2px; }
.idea-result .state-error { margin-top: 0; }
.idea-body {
  margin: 0; padding: 12px 14px; border-left: 2px solid var(--line-2); background: linear-gradient(90deg, rgba(12, 40, 56, .45), transparent);
  font-size: 16px; line-height: 1.55; white-space: pre-wrap;
}
.idea-untrusted {
  display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; padding: 10px 12px; font-size: 14px;
  border: 1px solid rgba(255, 200, 87, .4); border-radius: var(--r); background: var(--gold-soft);
}
.idea-untrusted .icon { color: var(--gold); width: 18px; height: 18px; margin-top: 1px; }
.report { display: grid; gap: 4px; }
.idea-verdict { font-size: 19px; font-weight: 500; font-stretch: 90%; }
.idea-verdict b { font-weight: 700; }
.verdict-text-go b { color: var(--cyan-hi); }
.verdict-text-go_zmiany b { color: var(--gold); }
.verdict-text-no_go b { color: var(--red); }
.report-summary, .report-text { font-size: 15.5px; line-height: 1.5; color: var(--text); }
.report-block { margin-top: 12px; }
.report-label { margin-bottom: 4px; font-size: 12px; font-weight: 600; font-stretch: 75%; letter-spacing: .18em; text-transform: uppercase; color: var(--text-2); }
.report-list { display: grid; gap: 4px; font-size: 15px; color: var(--text); }
.report-list li { display: flex; gap: 10px; align-items: flex-start; }
.report-list li::before { content: ""; width: 6px; height: 6px; margin-top: 9px; border-radius: 50%; background: var(--cyan); flex: none; }
.report-steps { list-style: decimal; padding-left: 22px; display: grid; gap: 8px; font-size: 15px; }
.report-steps li::marker { color: var(--cyan); font-family: var(--font-data); }
.step-who { display: block; font-size: 12.5px; font-weight: 600; color: var(--cyan); }
.step-text { display: block; }
.step-done { display: block; color: var(--muted); font-size: 13px; }
.roles { border-bottom: 1px solid var(--line); }
.role { border-top: 1px solid var(--line); }
.role summary { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 44px; cursor: pointer; list-style: none; font-weight: 600; font-size: 15px; }
.role summary::-webkit-details-marker { display: none; }
.role summary .icon { transition: transform 200ms var(--ease-out); color: var(--muted); }
.role[open] summary .icon { transform: rotate(90deg); }
.role-name { min-width: 0; }
.role-body { padding: 0 0 12px 24px; display: grid; gap: 6px; }
.role-text { white-space: pre-wrap; font-size: 14.5px; line-height: 1.5; color: var(--text-2); }
.report-md {
  margin: 0 0 8px; padding: 14px 16px; white-space: pre-wrap; font-family: var(--font-ui); font-size: 14px; line-height: 1.55;
  color: var(--text-2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
}
.report-meta { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.report-running { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; color: var(--gold); font-size: 15px; }
.report-running .spinner { flex: none; margin-top: 2px; }
.older-reports { display: grid; gap: 10px; padding-bottom: 6px; }
.older-report { padding: 10px 12px; border-left: 2px solid var(--line-2); }
.idea-timeline li {
  display: grid; grid-template-columns: minmax(88px, auto) minmax(0, 1fr); gap: 12px; padding: 8px 0;
  border-top: 1px solid var(--line); font-size: 14.5px; line-height: 1.4;
}
.idea-timeline li:first-child { border-top: 0; }
.idea-timeline time { font-family: var(--font-data); font-size: 12.5px; color: var(--muted); padding-top: 2px; white-space: nowrap; }

/* Rdzeń: „Czeka na Twoją decyzję (N)” — widoczne tylko, gdy coś czeka */
.decide {
  margin-top: 12px; padding: 10px 14px 4px; min-width: 0;
  border: 1px solid rgba(255, 200, 87, .4); border-radius: var(--r); background: linear-gradient(180deg, var(--gold-soft), rgba(6, 20, 30, .4));
}
.decide .sec-head { margin-bottom: 0; }
.decide .hud-label, .decide-count { color: var(--gold); }
.decide-item {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 0; border-top: 1px solid rgba(255, 200, 87, .2);
  color: var(--text); text-decoration: none; font-size: 14.5px; line-height: 1.35;
}
.decide-no { flex: none; min-width: 2em; font-size: 13px; color: var(--gold); }
.decide-title { flex: 1; min-width: 0; }
.decide-more { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; color: var(--cyan); text-decoration: none; }

/* ---------- Czat ---------- */
.chat { display: flex; flex-direction: column; min-height: calc(100dvh - var(--topbar-h) - env(safe-area-inset-top) - var(--tabbar-h) - env(safe-area-inset-bottom) - 48px); }
.chat-log { flex: 1; display: flex; flex-direction: column; gap: 18px; padding: 12px 0 18px; }
.chat-intro { padding: 10px 0; }
.chat-intro .suggest { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chat-intro .suggest button {
  min-height: 44px; padding: 8px 14px; border-radius: 14px; border: 1px solid var(--line-2);
  background: rgba(8, 26, 38, .7); color: var(--text); font-size: 14.5px; text-align: left; line-height: 1.3;
  transition: transform 140ms var(--ease-out), border-color 160ms ease;
}
.chat-intro .suggest button:active { transform: scale(.97); }

.msg { display: flex; flex-direction: column; max-width: 100%; min-width: 0; }
.msg.is-new { animation: msg-in 220ms var(--ease-out) both; }
.msg-user { align-items: flex-end; }
.msg-user .bubble {
  max-width: min(86%, 560px); background: rgba(99, 225, 255, .12); color: var(--text); border: 1px solid var(--line-2);
  padding: 10px 14px; border-radius: 16px 16px 4px 16px; font-size: 16px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere;
}
.msg-time { margin-top: 4px; font-family: var(--font-data); font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.msg-jarvis { align-items: flex-start; padding-left: 14px; border-left: 2px solid var(--line-2); }
.msg-jarvis.tone-executed { border-left-color: var(--ok); }
.msg-jarvis.tone-pending { border-left-color: var(--gold); }
.msg-jarvis.tone-question { border-left-color: var(--cyan); }
.msg-jarvis.tone-error { border-left-color: var(--red); }
.stamps { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.stamp {
  display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 0 8px 0 6px; border-radius: 4px;
  font-size: 11px; font-weight: 600; font-stretch: 80%; letter-spacing: .1em; text-transform: uppercase;
  border: 1px solid currentColor;
}
.stamp .icon { width: 14px; height: 14px; stroke-width: 2.2; }
.stamp-executed { color: var(--ok); background: var(--ok-soft); }
.stamp-pending { color: var(--gold); background: var(--gold-soft); }
.stamp-question { color: var(--cyan); background: var(--cyan-soft); }
.stamp-error { color: var(--red); background: var(--red-soft); }
.stamp-info { color: var(--muted); }
.msg-text { font-size: 16.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 62ch; }
.callout {
  margin-top: 10px; padding: 12px 14px; border-radius: var(--r); background: var(--gold-soft); color: var(--text);
  border: 1px solid rgba(255, 200, 87, .35); display: grid; gap: 6px; max-width: 62ch; font-size: 14.5px;
}
.callout-head { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--gold); }
.callout-head .icon { width: 18px; height: 18px; }
.callout-item { padding-top: 6px; border-top: 1px solid rgba(255, 200, 87, .22); white-space: pre-wrap; }
.callout-item small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.callout-error { background: var(--red-soft); border-color: rgba(255, 122, 107, .35); }
.callout-error .callout-head { color: var(--red); }
.callout-error .callout-item { border-top-color: rgba(255, 122, 107, .22); }
.actions-list { margin-top: 10px; display: grid; gap: 4px; font-size: 14px; color: var(--text-2); max-width: 62ch; }
.actions-list li { display: flex; gap: 8px; align-items: flex-start; }
.actions-list .icon { width: 16px; height: 16px; margin-top: 2px; stroke-width: 2.2; }
.actions-list .ok { color: var(--ok); }
.actions-list .no { color: var(--muted); }
.notes { margin-top: 8px; display: grid; gap: 4px; font-size: 13.5px; color: var(--gold); max-width: 62ch; }
.msg-foot { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.msg-foot .btn { min-height: 36px; font-size: 13.5px; padding: 0 12px; }

/* ---------- Długie tokeny: linki, adresy e-mail, identyfikatory ---------- */
/* Treść z JARVIS-a i z Core łamie się w dowolnym miejscu, zamiast poszerzać stronę na telefonie (poziome przewijanie).
   overflow-wrap dziedziczy się, więc wystarczy kontener; „anywhere” (a nie „break-word”) zmniejsza też min-content,
   dzięki czemu elementy flex/grid mogą się zwęzić. min-width: 0 — dla elementów flex obok ikon. */
.callout, .actions-list, .notes, .project-next, .project-reasons, .row-meta, .mem-meta, .kv-row, .brief-text,
.state-error, .empty, .empty-sm, .quick-result, .toast-msg, .form-error, .form-note, .composer-note, .view-sub, .today-line, .boot-text,
.ex-you, .caption-text, .holo-off, .idea-title, .idea-meta, .idea-excerpt, .idea-h1, .idea-body, .idea-note, .idea-untrusted,
.report, .report-list, .report-steps, .role summary, .role-text, .report-md, .idea-timeline, .decide-title, .idea-kicker {
  overflow-wrap: anywhere;
}
.actions-list li > span, .state-error > div, .kv-key, .kv-val, .row-meta > *, .mem-meta > *, .toast-msg, .idea-meta > *,
.idea-untrusted > span, .report-list li, .idea-timeline li > span { min-width: 0; }
.idea-meta .chip, .idea-meta .verdict, .idea-meta .ipill { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }

.thinking { display: inline-flex; align-items: center; gap: 10px; color: var(--gold); font-size: 14.5px; min-height: 28px; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: dot 1s var(--ease-in-out) infinite; }
.dots i:nth-child(2) { animation-delay: 120ms; }
.dots i:nth-child(3) { animation-delay: 240ms; }

.composer {
  position: sticky; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 10px); z-index: 10;
  display: flex; align-items: flex-end; gap: 6px; padding: 6px;
  background: rgba(4, 16, 24, .96); border: 1px solid var(--line-2); border-radius: 24px;
  box-shadow: var(--shadow);
  transition: border-color 160ms ease, bottom 220ms var(--ease-out);
}
.composer:focus-within { border-color: var(--cyan); }
body.composing .composer { bottom: calc(env(safe-area-inset-bottom) + 8px); }
.composer textarea {
  flex: 1; min-width: 0; min-height: 44px; max-height: 168px; resize: none; border: 0; background: transparent;
  padding: 11px 8px 11px 12px; font-size: 16px; line-height: 1.4; outline: none;
}
.composer textarea::placeholder { color: var(--muted); }
.composer .icon-btn { flex: none; }
.send-btn { background: var(--cyan); color: var(--cyan-ink); }
.send-btn:disabled { background: var(--surface-2); color: var(--muted); cursor: default; }
.mic-btn[aria-pressed="true"] { background: var(--gold); color: var(--cyan-ink); position: relative; }
.mic-btn[aria-pressed="true"]::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--gold);
  animation: ring 1.2s var(--ease-out) infinite;
}
.composer-note { margin: 6px 4px 0; font-size: 12.5px; color: var(--muted); min-height: 18px; }

/* ---------- Toasty ---------- */
.toasts {
  position: fixed; z-index: 50; left: 50%; translate: -50% 0;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 14px);
  width: min(calc(100% - 2 * var(--gutter)), 440px); display: grid; gap: 8px; pointer-events: none;
}
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px;
  background: #0B2232; color: var(--text); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow);
  font-size: 14.5px; font-weight: 500;
  opacity: 1; transform: translateY(0);
  transition: opacity 220ms var(--ease-out), transform 260ms var(--ease-out);
}
.toast[data-state="enter"] { opacity: 0; transform: translateY(12px); }
.toast[data-state="exit"] { opacity: 0; transform: translateY(6px); transition-duration: 160ms; }
.toast-msg { flex: 1; }
.toast .btn { min-height: 36px; padding: 0 12px; font-size: 13.5px; background: transparent; color: var(--cyan-hi); border-color: var(--line-2); }
.toast.tone-error { background: #2A0E0C; border-color: rgba(255, 122, 107, .5); color: var(--text); }
.toast.tone-error .btn { color: var(--red); border-color: currentColor; }

.noscript { padding: 24px; }

/* ---------- Tablet / desktop ---------- */
@media (min-width: 720px) {
  :root { --gutter: 28px; }
  .quick-when { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .holo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-num { font-size: 36px; }
  .state { font-size: 30px; }
}

@media (min-width: 960px) {
  .nav-wide { display: block; }
  /* Na komputerze Pomysły mają własną zakładkę — „Więcej” nie świeci razem z nią. */
  body[data-route="pomysly"] .nav-item[data-route="wiecej"] { color: var(--muted); box-shadow: none; }
  .nav {
    position: static; flex: 1; display: flex; justify-content: center; padding: 0; background: none; border: 0;
  }
  .nav-list { display: flex; gap: 4px; height: auto; }
  .nav-item {
    flex-direction: row; gap: 8px; height: 40px; padding: 0 12px; border-radius: 6px;
    font-size: 12px; letter-spacing: .14em;
  }
  .nav-item .icon { width: 18px; height: 18px; }
  .nav-item[aria-current] { box-shadow: inset 0 -2px 0 var(--cyan); }
  .nav-item[aria-current] .icon { filter: none; }
  body.composing .nav { transform: none; }
  .main { padding: 20px 40px 64px; }
  html { scroll-padding-bottom: 16px; }
  .composer { bottom: 20px; }
  body.composing .composer { bottom: 20px; }
  .chat { min-height: calc(100dvh - var(--topbar-h) - 92px); }
  .toasts { bottom: 28px; }
  .filters { margin: 0; padding: 2px 0; flex-wrap: wrap; }
}

/* Rdzeń na szerokim ekranie: rdzeń w środku, dzień po lewej, rozmowy po prawej. */
@media (min-width: 1080px) {
  :root { --core: min(32vw, 52vh, 440px); }
  .view.is-wide { max-width: 1440px; }
  .core-view {
    display: grid; grid-template-columns: minmax(260px, 1fr) minmax(420px, 1.25fr) minmax(260px, 1fr);
    grid-template-areas: "chips chips chips" "day core log"; gap: 8px 28px; align-items: start;
  }
  .core-view > .links { grid-area: chips; }
  .core-view > .core-zone { grid-area: core; position: sticky; top: calc(var(--topbar-h) + 8px); }
  .core-view > .day { grid-area: day; margin-top: 12px; }
  .core-view > .log { grid-area: log; margin-top: 12px; }
  .core-view .holo-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (min-width: 1240px) {
  .today-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0 48px; align-items: start; }
}

/* Hover tylko dla precyzyjnych wskaźników — na dotyku „hover” po stuknięciu zostaje i myli. */
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover:not(:disabled) { background: var(--cyan-hi); }
  .btn-quiet:hover:not(:disabled), .chip-btn:hover, .sug:hover, .menu-item:hover, .stat:hover, .hf-off:hover { border-color: var(--line-3); }
  .idea-card:hover { border-color: var(--line-2); }
  .idea-card.is-awaiting:hover { border-color: var(--gold); }
  .decide-item:hover .decide-title, .back-link:hover, .decide-more:hover { text-decoration: underline; text-decoration-color: currentColor; }
  .icon-btn:hover { background: var(--surface-2); color: var(--text); }
  .nav-item:hover { color: var(--text); }
  .filter:hover, .hint:hover { border-color: var(--line-3); color: var(--text); }
  .chat-intro .suggest button:hover { border-color: var(--line-3); }
  .check:hover .box { border-color: var(--ok); }
  .link-btn:hover, .sec-link:hover, .holo-more:hover { text-decoration: underline; text-decoration-color: currentColor; }
}

/* Dotyk: każde pole stuknięcia ma co najmniej 44 px wysokości (Apple HIG), także małe linki, podpowiedzi i filtry.
   Na desktopie (wskaźnik precyzyjny) zostają zwarte. */
@media (pointer: coarse) {
  .sec-link, .link-btn { display: inline-flex; align-items: center; min-height: 44px; }
  .btn-sm, .segmented button, .filter, .hint { min-height: 44px; }
}

/* ---------- Ruch ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ripple { 0% { opacity: .7; transform: scale(.86); } 100% { opacity: 0; transform: scale(1.18); } }
@keyframes breathe { 0%, 100% { opacity: .7; } 50% { opacity: 1; } }
@keyframes swap { from { opacity: 0; letter-spacing: .5em; filter: blur(4px); } to { opacity: 1; letter-spacing: .34em; filter: none; } }
@keyframes materialize { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes ring { from { opacity: .7; transform: scale(.92); } to { opacity: 0; transform: scale(1.25); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }

/* Ograniczony ruch: nic się nie kręci ani nie pulsuje. Stan rdzenia nadal czytelny: kolor + słowo + opis. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  .boot-mark, .dots i, .mic-btn[aria-pressed="true"]::after, .sk::after, .core-svg .spin, .ripple, .heart-glow, .holo, .state.swap,
  .hf-bar .hf-dot::after, .report-running .spinner { animation: none !important; }
  .heart, .core-halo { transform: none; }
  .core, .core *, .state, .caption-text .w { transition: none !important; } /* zmiana stanu bez płynnego przejścia kolorów */
  .btn:active:not(:disabled), .icon-btn:active, .stat:active, .nav-item:active, .filter:active, .hint:active,
  .chip-btn:active, .sug:active, .menu-item:active, .hf-off:active { transform: none; }
}

@media (forced-colors: active) {
  .stamp, .chip, .pill, .btn, .filter, .link, .holo, .card, .ex, .hf-bar, .segmented button[aria-pressed="true"],
  .ipill, .verdict, .board-col, .decide { border: 1px solid CanvasText; }
  .filter[aria-pressed="true"] { border: 2px solid Highlight; }
  .hf-bar[data-hf="listening"] .hf-dot { background: Highlight; border-color: Highlight; }
  .core { border: 2px solid CanvasText; }
  .core-bars { display: none; }
  .mark-dot { fill: Highlight; }
}
