/* IBM Plex Sans, variable weight axis, self-hosted so the CSP keeps
   font-src 'self'. The latin-ext subset carries the Slovak diacritics
   (č, ď, ľ, š, ť, ž); see fonts/LICENSE.txt for the SIL Open Font License. */
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url("./fonts/ibm-plex-sans-latin-wght-normal.woff2") format("woff2-variations");
  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: "IBM Plex Sans";
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url("./fonts/ibm-plex-sans-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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;
}

:root {
  color-scheme: light;
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #183028;
  --muted: #5d7168;
  --paper: #fbfefc;
  --canvas: #edf6f1;
  --line: #d1e2d8;
  --accent: #2f7d63;
  --accent-dark: #205a47;
  --accent-soft: #e1f1e8;
  --focus: #256d85;
  --shadow: 0 24px 70px rgb(25 67 51 / 12%);
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 12%, rgb(255 255 255 / 80%), transparent 30rem),
    var(--canvas);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

button:focus-visible,
input:focus-visible + .option-card {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  padding: clamp(1rem, 4vw, 3rem);
  place-items: center;
}

.card {
  width: min(100%, 46rem);
  padding: clamp(1.5rem, 5vw, 4rem);
  overflow: hidden;
  background: var(--paper);
  border: 1px solid rgb(24 48 40 / 8%);
  border-radius: 1.5rem;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.welcome-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}

.welcome-header .eyebrow {
  margin: 0.7rem 0 0;
}

.language-picker {
  display: inline-flex;
  gap: 0.4rem;
}

.language-button {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  justify-content: center;
  min-width: 3.75rem;
  min-height: 2.75rem;
  padding: 0.45rem 0.65rem;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.language-button:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.language-button[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent-dark);
}

.language-flag {
  font-size: 1.05rem;
  line-height: 1;
}

h1,
.question-text {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(2.2rem, 7vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

h1:focus,
.question-text:focus {
  outline: none;
}

.intro,
.completion-copy {
  max-width: 36rem;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  line-height: 1.65;
}

.privacy-note {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.privacy-note::before {
  flex: 0 0 auto;
  content: "";
  width: 0.65rem;
  height: 0.65rem;
  margin-top: 0.35rem;
  background: var(--accent);
  border-radius: 50%;
}

.primary-button,
.secondary-button {
  min-height: 3.2rem;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 150ms ease, background-color 150ms ease;
}

.primary-button {
  color: #fff;
  background: var(--accent);
}

.primary-button:hover:not(:disabled) {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.secondary-button {
  color: var(--ink);
  background: transparent;
}

.secondary-button:hover {
  background: #e6f0ea;
}

.welcome-actions {
  margin-top: 2.25rem;
}

.welcome-footnote {
  max-width: 38rem;
  margin: 2.25rem 0 0;
  padding-top: 1rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
  border-top: 1px solid var(--line);
}

.question-card {
  padding-top: clamp(1.25rem, 4vw, 2.5rem);
}

.progress-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: clamp(2rem, 7vw, 4.5rem);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.progress-track {
  flex: 1;
  height: 0.35rem;
  overflow: hidden;
  background: #dae9e0;
  border-radius: 999px;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
  transition: width 220ms ease;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.question-text {
  max-width: 24ch;
  margin-bottom: clamp(2rem, 6vw, 3rem);
  font-size: clamp(1.75rem, 5vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1.14;
}

.options {
  display: grid;
  gap: 0.7rem;
}

.option {
  position: relative;
}

.option input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.option-card {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  min-height: 3.5rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  transition: border-color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

.option-card::before {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  content: "";
  border: 2px solid #80978c;
  border-radius: 50%;
}

.option input:checked + .option-card {
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: translateX(0.2rem);
}

.option input:checked + .option-card::before {
  background: var(--accent);
  border: 4px solid var(--paper);
  box-shadow: 0 0 0 2px var(--accent);
}

.question-footer {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 2rem;
}

.advance-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.result-card h1 {
  max-width: 12ch;
  font-size: clamp(2rem, 6vw, 3.8rem);
}

.score-readout {
  display: flex;
  gap: 0.3rem;
  align-items: baseline;
  margin-top: 1.5rem;
  color: var(--accent-dark);
}

.score-readout strong {
  font-size: clamp(4.75rem, 18vw, 8.5rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.9;
}

.score-readout span {
  color: var(--muted);
  font-size: clamp(1.15rem, 4vw, 1.6rem);
  font-weight: 700;
}

.continuum {
  margin-top: clamp(2.25rem, 7vw, 3.5rem);
}

.continuum-track {
  position: relative;
  height: 0.55rem;
  margin-inline: 0.7rem;
  background: #d9e7df;
  border-radius: 999px;
}

.continuum-fill {
  height: 100%;
  background: linear-gradient(90deg, #8fcdb2, var(--accent));
  border-radius: inherit;
}

.continuum-marker {
  position: absolute;
  top: 50%;
  width: 1.4rem;
  height: 1.4rem;
  background: var(--paper);
  border: 0.35rem solid var(--accent-dark);
  border-radius: 50%;
  box-shadow: 0 3px 12px rgb(22 76 56 / 24%);
  transform: translate(-50%, -50%);
}

.continuum-labels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.25;
}

.continuum-labels span {
  display: grid;
  gap: 0.15rem;
}

.continuum-labels span:nth-child(2) {
  text-align: center;
}

.continuum-labels span:last-child {
  text-align: right;
}

.continuum-labels strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.result-interpretation {
  max-width: 37rem;
  margin: 2.2rem 0 0;
  font-size: clamp(1.05rem, 3vw, 1.25rem);
  font-weight: 600;
  line-height: 1.55;
}

.research-note,
.reassurance-note {
  max-width: 38rem;
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.research-disclosure {
  max-width: 38rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.research-disclosure .research-note,
.research-disclosure .reassurance-note {
  margin-top: 0;
}

.research-disclosure .reassurance-note {
  margin-top: 0.65rem;
}

.share-box {
  max-width: 38rem;
  margin-top: 1.9rem;
  padding: 1.25rem 1.35rem;
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-radius: 1rem;
}

.share-invite {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.5;
}

.share-details {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.share-details summary {
  width: fit-content;
  color: var(--accent-dark);
  font-weight: 700;
  cursor: pointer;
}

.share-details p {
  max-width: 34rem;
  margin: 0.5rem 0 0;
}

.share-comment {
  margin-top: 1rem;
}

.share-comment-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.5;
}

.share-comment-input {
  display: block;
  width: 100%;
  max-width: 34rem;
  margin-top: 0.45rem;
  padding: 0.6rem 0.7rem;
  color: inherit;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  resize: vertical;
}

.share-comment-input::placeholder {
  color: var(--muted);
}

.share-comment-hint {
  max-width: 34rem;
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.share-button {
  margin-top: 1rem;
}

.share-status {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.5;
}

.share-status-success {
  color: var(--accent-dark);
}

.retake-button {
  margin-top: 1.75rem;
}

@media (max-width: 36rem) {
  .app-shell {
    padding: 0;
    place-items: stretch;
  }

  .card {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .question-footer {
    gap: 0.75rem;
  }

  .question-footer {
    align-items: flex-start;
    flex-direction: column-reverse;
  }

  .question-footer button {
    align-self: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
