/* Walidator - The Inner Space (styl editorial, spójny z Priorytety) */

:root {
  --bg: #FAF7F2;
  --bg-cosmic: #0F1729;
  --text: #0F1729;
  --text-muted: #5A5A52;
  --text-on-cosmic: #E8E6E1;
  --accent: #4a8a4a;
  --accent-hover: #3a6e3a;
  --star: #E4B24A;
  --border: #E2DED6;
  --placeholder-bg: #eeeeea;
  --placeholder-border: #cfcfc9;
  --error: #9b2c2c;
  --success: #1a5a3e;
  --measure: 680px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-top: 0;
}
h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 1rem;
}
h2 { font-size: 1.75rem; font-weight: 600; line-height: 1.2; margin: 2.5rem 0 1rem; }
h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.3; margin: 2rem 0 .75rem; }
@media (min-width: 720px) {
  h2 { font-size: 2.25rem; }
}

ul li::marker { color: var(--star); }

p { margin: 0 0 1.1em; }
a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
.muted { color: var(--text-muted); font-size: 0.9rem; }
.lede { font-size: 1.15rem; color: var(--text-muted); }

ul { padding-left: 1.2em; }
li { margin-bottom: .4em; }

/* Nawigacja - kosmiczne tło z gwiazdami */
.site-nav {
  background: var(--bg-cosmic) url('/walidator/stars.svg') center / 400px 200px repeat;
  border-bottom: 1px solid rgba(232, 230, 225, 0.08);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-nav__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.site-nav__logo {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--text-on-cosmic);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.site-nav__logo:hover { color: var(--star); }
.site-nav__menu {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  align-items: center;
}
.site-nav__menu a {
  color: var(--text-on-cosmic);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}
.site-nav__menu a:hover { color: var(--star); }
.site-nav__menu .nav-home {
  display: inline-flex;
  align-items: center;
  color: var(--text-on-cosmic);
  padding: 2px 0;
}
.site-nav__menu .nav-home:hover { color: var(--star); }
.site-nav__menu .nav-home svg { display: block; }

/* Sekcje */
main { display: block; }
.section {
  padding: 3rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.section:last-of-type { border-bottom: none; }
.section__inner {
  max-width: var(--measure);
  margin: 0 auto;
}
.section--hero {
  padding: 4rem 1.25rem 2rem;
  background: linear-gradient(180deg, #F0ECE3 0%, var(--bg) 100%);
}
@media (min-width: 720px) {
  .section { padding: 4rem 1.5rem; }
  .section--hero { padding: 5rem 1.5rem 3rem; }
}

/* Formularz */
form { margin: 1rem 0 0; }
label {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}
textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font: inherit;
  font-size: 1rem;
  line-height: 1.5;
  resize: vertical;
  min-height: 140px;
  transition: border-color 0.15s ease;
}
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(45, 134, 89, 0.15);
}
.form-meta {
  display: flex;
  justify-content: flex-end;
  margin: 0.4rem 0 1rem;
}
button[type="submit"] {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.85rem 1.5rem;
  border-radius: 6px;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s ease;
}
button[type="submit"]:hover:not(:disabled) { background: var(--accent-hover); }
button[type="submit"]:disabled { opacity: 0.6; cursor: not-allowed; }

/* Wynik */
.result {
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: 6px;
  background: #F4EFE5;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
}
.result--error { border-left-color: var(--error); }
.result--success { border-left-color: var(--success); }
.result--loading { border-left-color: var(--text-muted); }
.result h3 {
  margin-top: 0;
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 1.25rem;
}
.result p:last-child { margin-bottom: 0; }

/* Markdown wyrenderowany przez marked.js wewnątrz .result */
.result-md h2 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.35rem;
  margin: 1.6rem 0 .6rem;
  line-height: 1.25;
  letter-spacing: -0.005em;
}
.result-md h2:first-child { margin-top: 0; }
.result-md h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 1.1rem;
  margin: 1.2rem 0 .5rem;
}
.result-md p { margin: 0 0 .9em; }
.result-md ul, .result-md ol { margin: .2em 0 1em; padding-left: 1.3em; }
.result-md li { margin-bottom: .35em; }
.result-md li > p { margin-bottom: .3em; }
.result-md strong { font-weight: 600; }
.result-md code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: #eeeeea;
  padding: 1px 5px;
  border-radius: 3px;
}
.result-md blockquote {
  margin: 1em 0;
  padding: .2em 1em;
  border-left: 3px solid var(--border);
  color: var(--text-muted);
}
.result-md hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5em 0;
}
.result-meta {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
}

/* Chat (krok 7 - wieloetapowy) */
.section--chat { padding-top: 2rem; }
.chat { display: flex; flex-direction: column; gap: 1.25rem; }

/* Mode toggle (mini vs pełna) */
.mode-toggle {
  display: flex;
  gap: 0.5rem;
  padding: 0.4rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.mode-toggle[hidden] { display: none; }
.mode-toggle__btn {
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.85rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  cursor: pointer;
  min-height: 64px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.mode-toggle__btn:hover:not(.is-active) {
  background: rgba(45, 134, 89, 0.05);
  color: var(--text);
}
.mode-toggle__btn.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.mode-toggle__btn.is-active .mode-toggle__sub { color: rgba(255, 255, 255, 0.85); }
.mode-toggle__title {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.04em;
}
.mode-toggle__sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.mode-toggle__desc { margin: 0 0.2rem; font-size: 0.85rem; }
.mode-toggle__desc[hidden] { display: none; }

/* Upgrade CTA / podziekowanie po feedbacku */
.chat__upgrade {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--star);
  border-radius: 6px;
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.chat__upgrade[hidden] { display: none; }
.chat__upgrade-text {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.5;
}
.chat__upgrade-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.chat__upgrade-btn {
  align-self: flex-start;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s ease;
  min-height: 44px;
}
.chat__upgrade-btn:hover { background: var(--accent-hover); }
.chat__upgrade-btn[hidden] { display: none; }
.chat__upgrade-btn--ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.chat__upgrade-btn--ghost:hover { background: rgba(45, 134, 89, 0.08); }

/* Feedback box (po raporcie) */
.feedback-box {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.feedback-box[hidden] { display: none; }
.feedback-box__title {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.15rem;
  margin: 0;
  color: var(--text);
}
.feedback-box__lead { margin: 0 0 0.5rem; font-size: 0.9rem; }
.feedback-box__label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 0.35rem;
}
.feedback-box textarea {
  width: 100%;
  padding: 0.7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  resize: vertical;
  min-height: 56px;
  transition: border-color 0.15s ease;
}
.feedback-box textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(45, 134, 89, 0.15);
}
.feedback-box__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}
.feedback-box__submit {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.7rem 1.3rem;
  border-radius: 6px;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s ease;
  min-height: 44px;
}
.feedback-box__submit:hover:not(:disabled) { background: var(--accent-hover); }
.feedback-box__submit:disabled { opacity: 0.6; cursor: not-allowed; }
.feedback-box__error {
  color: var(--error);
  font-size: 0.88rem;
}
.feedback-box__error[hidden] { display: none; }

/* Gwiazdki */
.rating {
  display: inline-flex;
  gap: 0.25rem;
  margin-bottom: 0.25rem;
}
.rating__star {
  background: transparent;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 4px;
  transition: color 0.15s ease, transform 0.1s ease;
}
.rating__star:hover { color: var(--star); transform: scale(1.1); }
.rating__star.is-filled { color: var(--star); }
.rating__star:focus { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

/* Info-box (zasady walidatora) - widoczny PRZED pierwszą wiadomością */
.info-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}
.info-box[hidden] { display: none; }
.info-box h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--text);
  margin: 0 0 0.75rem;
  line-height: 1.3;
}
.info-box ul {
  list-style: disc;
  padding-left: 1.4em;
  margin: 0 0 1rem;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.55;
}
.info-box ul li::marker { color: var(--star); }
.info-box ul li { margin-bottom: 0.4em; }
.info-box strong { font-weight: 600; }
.info-box__footer {
  margin: 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.info-box__footer a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(45, 134, 89, 0.35);
  text-underline-offset: 2px;
}
.info-box__footer a:hover {
  color: var(--star);
  text-decoration-color: var(--star);
}

.chat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.chat__progress {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  flex: 1 1 auto;
  min-width: 220px;
  border: 0;
  outline: 0;
}
.chat__counter {
  font-size: .9rem;
  color: var(--text-muted);
  font-weight: 500;
  border: 0;
  outline: 0;
}
.chat__bar {
  height: 6px;
  background: var(--border);
  border: 0;
  border-radius: 3px;
  outline: 0;
  overflow: hidden;
}
.chat__bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%);
  border: 0;
  outline: 0;
  transition: width 0.3s ease;
}
.chat__reset {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.chat__reset:hover { border-color: var(--accent); color: var(--accent); }

.chat__messages {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
/* min-height tylko gdy są już wiadomości - zero na starcie żeby nie generować
   pustej przestrzeni między nagłówkiem a formularzem. */
.chat__messages:not(:empty) { min-height: 120px; }

.msg {
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.msg__role {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.msg__body {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  line-height: 1.55;
  background: #fff;
  border: 1px solid var(--border);
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.msg--user { align-items: flex-end; }
.msg--user .msg__body {
  background: rgba(228, 178, 74, 0.15);
  color: var(--text);
  border-color: rgba(228, 178, 74, 0.35);
  max-width: 85%;
}
.msg--assistant .msg__body {
  background: #F4EFE5;
  max-width: 100%;
}
.msg--loading .msg__body { background: #F4EFE5; color: var(--text-muted); }
.msg--final .msg__body {
  border-left: 3px solid var(--accent);
  background: #fff;
}

.dots { display: inline-flex; gap: 3px; vertical-align: middle; margin-right: 6px; }
.dots > span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  animation: dot 1s infinite ease-in-out;
  opacity: .6;
}
.dots > span:nth-child(2) { animation-delay: .15s; }
.dots > span:nth-child(3) { animation-delay: .3s; }
@keyframes dot {
  0%, 80%, 100% { opacity: .25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

/* Markdown wyrenderowany w raporcie końcowym */
.msg--final .msg__body h2 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.3rem;
  margin: 1.4rem 0 .5rem;
  line-height: 1.25;
}
.msg--final .msg__body h2:first-child { margin-top: 0; }
.msg--final .msg__body h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 1.1rem;
  margin: 1.1rem 0 .4rem;
}
.msg--final .msg__body p { margin: 0 0 .85em; }
.msg--final .msg__body ul, .msg--final .msg__body ol { margin: .2em 0 .9em; padding-left: 1.3em; }
.msg--final .msg__body li { margin-bottom: .3em; }
.msg--final .msg__body strong { font-weight: 600; }
.msg--final .msg__body blockquote {
  margin: .8em 0;
  padding: .2em 1em;
  border-left: 3px solid var(--border);
  color: var(--text-muted);
}
.msg--final .msg__body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: #eeeeea;
  padding: 1px 5px;
  border-radius: 3px;
}

.chat__verdict {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--success);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.chat__verdict[hidden] { display: none; }
.chat__verdict-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.chat__verdict-body {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.25rem;
}

.chat__form {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
}
.chat__label {
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-muted);
}
.chat__form textarea {
  width: 100%;
  padding: .75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font: inherit;
  font-size: 1rem;
  line-height: 1.5;
  resize: vertical;
  min-height: 84px;
  transition: border-color 0.15s ease;
}
.chat__form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(45, 134, 89, 0.15);
}
.chat__form textarea:disabled {
  background: #F4EFE5;
  cursor: not-allowed;
}
.chat__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
#send-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.65rem 1.3rem;
  border-radius: 6px;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s ease;
}
#send-btn:hover:not(:disabled) { background: var(--accent-hover); }
#send-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.chat__error {
  margin: 0;
  padding: 0.75rem 1rem;
  background: #fdf2f2;
  border: 1px solid #f5c2c2;
  border-left: 4px solid var(--error);
  color: var(--error);
  border-radius: 6px;
  font-size: .9rem;
}

.chat__hint { margin: 0; font-size: 0.85rem; }

/* Stopka - kosmiczne tło z gwiazdami */
.site-footer {
  background: var(--bg-cosmic) url('/walidator/stars.svg') center / 400px 200px repeat;
  padding: 2.5rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text-on-cosmic);
}
.site-footer__inner {
  max-width: var(--measure);
  margin: 0 auto;
  text-align: center;
}
.site-footer a {
  color: var(--text-on-cosmic);
  text-decoration-color: rgba(232, 230, 225, 0.4);
}
.site-footer a:hover {
  color: var(--star);
  text-decoration-color: var(--star);
}
/* Formularz */
form { margin: 1rem 0 0; }
.form-field { margin-bottom: 1.5rem; }
.form-field label {
  display: block;
  font-size: 0.95rem; font-weight: 500;
  margin-bottom: 0.4rem;
}
.form-field__required { color: var(--error); margin-left: 0.15rem; }
.form-field input[type="text"],
.form-field input[type="email"],
.form-field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font: inherit; font-size: 1rem; line-height: 1.5;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-field textarea { resize: vertical; min-height: 100px; }
.form-field input[type="text"]:focus,
.form-field input[type="email"]:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(45, 134, 89, 0.15);
}
.form-field--invalid input,
.form-field--invalid textarea {
  border-color: var(--error);
}
.form-field--warning input,
.form-field--warning textarea {
  border-color: var(--star);
}
.form-field__meta {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 0.75rem; flex-wrap: wrap;
  margin-top: 0.35rem;
}
.form-field__hint { flex: 1 1 auto; }
.form-field__count { flex-shrink: 0; font-variant-numeric: tabular-nums; }

.form-field--collapsible { margin-bottom: 1.5rem; }
.form-field--collapsible summary {
  cursor: pointer;
/* === Quick fixy UX 2026-05-16 (komunikat startowy, legenda kolorow, neutralny werdykt) === */

/* Notice na samym gorze info-boxa: skup uwagi na "porozmawiaj z 5 klientami" */
.info-box__notice {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.1rem;
}
.info-box__notice p { margin: 0; font-size: 0.95rem; line-height: 1.5; }
.info-box__notice strong { font-weight: 600; }

/* Legenda kolorow werdyktu na ekranie startowym */
.verdict-legend {
  list-style: none;
  padding-left: 0;
  margin: 0 0 0.5rem;
}
.verdict-legend li {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  margin: 0.35rem 0;
  font-size: 0.95rem;
  line-height: 1.5;
}
.verdict-legend li::marker { content: ""; }
.verdict-legend__dot { font-size: 1.05rem; line-height: 1; }
.verdict-legend__note { margin: 0 0 0.5rem; font-size: 0.85rem; font-style: italic; }

/* Pasek pozycji werdyktu w raporcie koncowym */
.verdict-scale {
  display: flex;
  gap: 0.4rem;
  margin: 0.55rem 0 0.3rem;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--text-muted);
  letter-spacing: 0.15em;
}
.verdict-scale__dot { display: inline-block; }
.verdict-scale__dot.is-active { color: var(--accent); }

.chat__verdict-meaning {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
}

/* Neutralny stan werdyktu (U+26AA): inny border + retry button */
.chat__verdict--neutral { border-left-color: var(--text-muted); }
.chat__verdict-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.chat__verdict-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.55rem 1rem;
  border-radius: 6px;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s ease;
}
.chat__verdict-btn:hover { background: var(--accent-hover, var(--accent)); filter: brightness(0.92); }

/* Report actions (PDF + email) - dodane 2026-05-16 incydent fix */
.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0 1.5rem;
  align-items: center;
}
.report-actions[hidden] { display: none; }
.report-actions__btn {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.55rem 1rem;
  border-radius: 6px;
  border: 1px solid #1a2a4a;
  background: #1a2a4a;
  color: #fff;
  cursor: pointer;
}
.report-actions__btn:hover { opacity: 0.9; }
.report-actions__btn:disabled { opacity: 0.5; cursor: not-allowed; }
.report-actions__btn--ghost {
  background: transparent;
  color: #1a2a4a;
}
.report-actions__status { font-size: 0.85rem; }

.report-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.report-modal__backdrop { position: absolute; inset: 0; background: rgba(20, 25, 40, 0.55); }
.report-modal__panel {
  position: relative;
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  max-width: 460px;
  width: calc(100% - 2rem);
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.report-modal__title { margin: 0 0 0.5rem; font-family: Fraunces, Georgia, serif; color: #1a2a4a; }
.report-modal__lead { margin: 0 0 1rem; font-size: 0.9rem; }
.report-modal__form { display: flex; flex-direction: column; gap: 0.75rem; }
.report-modal__label { font-size: 0.85rem; color: #4a4a4a; }
.report-modal__form input[type="email"] {
  font: inherit;
  padding: 0.55rem 0.7rem;
  border: 1px solid #d2d2cc;
  border-radius: 6px;
}
.report-modal__consent { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.85rem; color: #333; }
.report-modal__consent input { margin-top: 0.2rem; }
.report-modal__error { color: #a02020; font-size: 0.85rem; }
.report-modal__actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.5rem; }
.report-modal__btn {
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: 1px solid #1a2a4a;
  background: #1a2a4a;
  color: #fff;
  cursor: pointer;
}
.report-modal__btn--ghost { background: transparent; color: #1a2a4a; }
.report-modal__btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* === Editorial system 2026-05-16 v3 (1:1 z Priorytety - HANDOFF.md compliant) === */
:root {
  --bg: #f7f3eb;
  --bg-cosmic: #f7f3eb;
  --text: #1a1a1a;
  --text-on-cosmic: #1a1a1a;
  --text-muted: #666;
  --accent: #4a8a4a;
  --accent-hover: #2a5a2a;
  --border: #e2ded6;
  --tile-bg: #f7f3eb;
  --placeholder-bg: #efeae0;
}
body { background: var(--bg); color: var(--text); }

/* Hard rule #1: square corners wszedzie */
*, *::before, *::after { border-radius: 0 !important; }

/* Nav: kremowy z hairline border (nie cosmic) */
.site-nav {
  background: var(--bg);
  background-image: none;
  border-bottom: 1px solid var(--border);
}
.site-nav__inner { padding: 22px 32px; max-width: 1280px; }
.site-nav__logo {
  display: flex; align-items: center; gap: 12px;
  color: var(--text);
  font-family: 'Fraunces', Georgia, serif;
  font-size: 18px; font-weight: 500;
  text-decoration: none;
}
.site-nav__logo:hover { color: var(--text); }
.site-nav__logo img { display: block; height: 22px; width: auto; }
.site-nav__menu { gap: 28px; }
.site-nav__menu a { color: var(--text-muted); font-size: 14px; text-decoration: none; }
.site-nav__menu a:hover { color: var(--text); }
.site-nav__menu .nav-home { color: var(--text-muted); padding: 2px 0; }
.site-nav__menu .nav-home:hover { color: var(--text); }

/* Hero: flat cream (bez gradientu) */
.section--hero {
  background: var(--bg);
  background-image: none;
}

/* Cards / boxes: cream bg + hairline border */
.info-box,
.chat__messages,
.chat__verdict,
.feedback-box,
.email-box,
.tile,
.placeholder,
.modal,
.modal__content,
.chat__upgrade,
.chat__upgrade-card,
.chat__form,
.access-code-card,
.report-modal__panel {
  background: var(--bg);
  border: 1px solid var(--border);
  box-shadow: none;
}

/* Chat single message bubbles - cream, hairline */
.chat__message,
.msg__body,
.msg--assistant .msg__body,
.msg--final .msg__body,
.msg--loading .msg__body {
  background: var(--bg);
  border: 1px solid var(--border);
}
.msg--user .msg__body {
  background: var(--bg);
  border-color: var(--text);
}

/* CTAs / buttons primary - cream tekst na accencie */
button[type="submit"],
.btn--primary,
.feedback-box__submit,
.chat__upgrade-btn,
#send-btn,
.report-actions__btn,
.report-modal__btn,
.chat__verdict-btn {
  background: var(--accent);
  color: var(--bg);
  border: 1px solid transparent;
}
button[type="submit"]:hover:not(:disabled),
.btn--primary:hover,
.feedback-box__submit:hover:not(:disabled),
.chat__upgrade-btn:hover,
#send-btn:hover:not(:disabled),
.report-actions__btn:hover:not(:disabled),
.report-modal__btn:hover:not(:disabled),
.chat__verdict-btn:hover { background: var(--accent-hover); }

.chat__upgrade-btn--ghost,
.report-actions__btn--ghost,
.report-modal__btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--text);
}
.chat__upgrade-btn--ghost:hover,
.report-actions__btn--ghost:hover,
.report-modal__btn--ghost:hover { background: var(--text); color: var(--bg); }

/* Mode toggle: square pills, kremowe niezaznaczone, akcent aktywne */
.mode-toggle__btn {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
}
.mode-toggle__btn:hover:not(.is-active) { background: var(--border); }
.mode-toggle__btn.is-active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.mode-toggle__btn.is-active .mode-toggle__sub { color: rgba(247, 243, 235, 0.85); }

/* Inputs / textarea - cream bg + hairline border */
input[type="text"], input[type="email"], input[type="password"], textarea, select {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}

/* Progress bar / chat bar - flat accent (bez gradientu) */
.chat__bar { background: var(--border); }
.chat__bar-fill { background: var(--accent); background-image: none; }

/* Stars / rating: zostaw kolor accent w fokus, bez rounded */
.rating__star:focus { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Footer: kremowy + hairline border-top (zamiast cosmic) */
.site-footer {
  background: var(--bg);
  background-image: none;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  padding: 18px 32px;
  font-size: 13px;
}
.site-footer__inner { max-width: 1280px; text-align: left; }
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.site-footer__inner p { margin: 0; }

/* Section padding spojny z hub */
.section { padding: 48px 32px; }
.section--hero { padding: 56px 32px 48px; }
@media (min-width: 720px) {
  .section { padding: 64px 48px; }
  .section--hero { padding: 80px 48px 64px; }
}

/* Report modal backdrop pozostaje przyciemniony (UX modali) */
.report-modal__backdrop { background: rgba(20, 25, 40, 0.55); }

/* Defensive: respect [hidden] attribute regardless of display rules above */
[hidden] { display: none !important; }

/* === Reskin 2026-05-20: shell editorial (nav, crumb, steps, others, footer) === */
/* Formularzowy a{} (accent + underline) nie wycieka do nawigacji i kart. */
.nav a, .nav__links a, .crumb a, .crumb__path a, .footer a, a.tool-card { text-decoration: none; }
.nav__links a, .crumb__path a, .footer a { color: var(--text-muted); }
.nav__links a:hover, .crumb__path a:hover, .footer a:hover { color: var(--text); }
.nav__lock { color: var(--text); }
a.tool-card { color: var(--text); }
a.tool-card:hover { background: rgba(74, 138, 74, 0.04); }
