@charset "utf-8";

@font-face {
  font-family: "themix";
  src: url("https://cdn.skauting.cz/fonts/TheMix_LT_400.woff2") format("woff2"),
       url("https://cdn.skauting.cz/fonts/TheMix_LT_400.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "themix";
  src: url("https://cdn.skauting.cz/fonts/TheMix_LT_400i.woff2") format("woff2"),
       url("https://cdn.skauting.cz/fonts/TheMix_LT_400i.woff") format("woff");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "themix";
  src: url("https://cdn.skauting.cz/fonts/TheMix_LT_700.woff2") format("woff2"),
       url("https://cdn.skauting.cz/fonts/TheMix_LT_700.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "themix";
  src: url("https://cdn.skauting.cz/fonts/TheMix_LT_700i.woff2") format("woff2"),
       url("https://cdn.skauting.cz/fonts/TheMix_LT_700i.woff") format("woff");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "skautbold";
  src: url("https://cdn.skauting.cz/fonts/skaut-bold-webfont.woff2") format("woff2"),
       url("https://cdn.skauting.cz/fonts/skaut-bold-webfont.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary-h: 220;
  --primary-s: 53%;
  --primary-24: hsl(var(--primary-h) var(--primary-s) 24%);
  --primary-34: hsl(var(--primary-h) var(--primary-s) 34%);
  --primary-43: hsl(var(--primary-h) var(--primary-s) 43%);
  --primary-88: hsl(var(--primary-h) var(--primary-s) 88%);
  --primary-95: hsl(var(--primary-h) var(--primary-s) 95%);
  --danger-h: 0;
  --danger-s: 77%;
  --danger-45: hsl(var(--danger-h) var(--danger-s) 45%);
  --danger-55: hsl(var(--danger-h) var(--danger-s) 55%);
  --danger-95: hsl(var(--danger-h) var(--danger-s) 95%);
  --warning-h: 39;
  --warning-s: 100%;
  --warning-38: hsl(var(--warning-h) var(--warning-s) 38%);
  --warning-48: hsl(var(--warning-h) var(--warning-s) 48%);
  --warning-93: hsl(var(--warning-h) var(--warning-s) 93%);
  --success-h: 78;
  --success-s: 78%;
  --success-31: hsl(var(--success-h) var(--success-s) 31%);
  --success-41: hsl(var(--success-h) var(--success-s) 41%);
  --success-93: hsl(var(--success-h) var(--success-s) 93%);
  --grey-h: 220;
  --grey-s: 12%;
  --text: hsl(var(--grey-h) var(--grey-s) 23%);
  --muted: hsl(var(--grey-h) var(--grey-s) 42%);
  --border: hsl(var(--grey-h) var(--grey-s) 84%);
  --surface: hsl(var(--grey-h) var(--grey-s) 98%);
  --white: hsl(var(--grey-h) var(--grey-s) 100%);
  --shadow: hsl(var(--grey-h) var(--grey-s) 18% / 0.12);
  --radius: 1rem;
}

* { box-sizing: border-box; }

html { font-size: 16px; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: themix, sans-serif;
  color: var(--text);
  background: var(--surface);
  line-height: 1.5;
}

button, input, select { font: inherit; }

a { color: var(--primary-34); }
a:hover { color: var(--primary-24); }

h1, .h1 {
  margin: 0 0 0.75rem;
  font-family: skautbold, themix, sans-serif;
  font-weight: normal;
  font-size: clamp(2.1rem, 9vw, 2.986rem);
  line-height: 1.05;
  color: var(--primary-34);
}

h2, .h2 {
  margin: 0 0 0.65rem;
  font-weight: 700;
  font-size: clamp(1.45rem, 6vw, 2.074rem);
  line-height: 1.15;
}

p { margin: 0 0 1rem; }

.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 20;
  padding: 0.75rem 1rem;
  background: var(--white);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
  padding: 0.75rem max(1rem, env(safe-area-inset-left));
  color: var(--white);
  background: var(--primary-34);
}

.brand {
  display: inline-grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  padding: 0.2rem;
  border-radius: 50%;
  color: var(--white);
  background: var(--white);
  text-decoration: none;
}
.brand:hover { color: var(--white); }
.brand-logo { display: block; width: 100%; height: 100%; }

.account {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  font-size: 0.875rem;
  line-height: 1.2;
}
.account form { margin: 0; }
.link-button {
  min-height: 2rem;
  padding: 0;
  border: 0;
  color: var(--white);
  background: transparent;
  text-decoration: underline;
  cursor: pointer;
}

.page-shell {
  width: min(100% - 2rem, 72rem);
  min-height: calc(100vh - 9rem);
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.site-footer {
  padding: 1.5rem 1rem;
  color: var(--muted);
  text-align: center;
  font-size: 0.875rem;
}

.auth-card, .panel, .topic-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 0.5rem 2rem var(--shadow);
}

.auth-card {
  max-width: 32rem;
  margin: 3vh auto;
  padding: clamp(1.35rem, 6vw, 2.5rem);
}

.login-logo {
  display: block;
  width: min(10rem, 50vw);
  height: auto;
  margin: -0.5rem auto 1.25rem;
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--primary-43);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stack-form { display: grid; gap: 0.65rem; }
label { font-weight: 700; }
input[type="email"], select {
  width: 100%;
  min-height: 3rem;
  padding: 0.65rem 0.8rem;
  border: 2px solid var(--border);
  border-radius: 0.6rem;
  color: var(--text);
  background: var(--white);
}
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid hsl(var(--warning-h) var(--warning-s) 62%);
  outline-offset: 3px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.65rem 1.15rem;
  border: 2px solid var(--primary-34);
  border-radius: 0.65rem;
  color: var(--white);
  background: var(--primary-34);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { color: var(--white); background: var(--primary-24); border-color: var(--primary-24); }
.button-secondary { color: var(--primary-34); background: var(--white); }
.button-secondary:hover { color: var(--primary-24); background: var(--primary-95); }
.button-small { min-height: 2.75rem; }

.status {
  margin-bottom: 1.25rem;
  padding: 1rem;
  border: 1px solid;
  border-radius: 0.75rem;
}
.status :is(h1, h2, h3, h4, h5, h6) { color: inherit; }
.status h1 { font-family: themix, sans-serif; font-size: 1.5rem; font-weight: 700; }
.status p:last-child { margin-bottom: 0; }
.status-success { color: var(--success-31); border-color: var(--success-41); background: var(--success-93); }
.status-warning { color: var(--warning-38); border-color: var(--warning-48); background: var(--warning-93); }
.status-danger { color: var(--danger-45); border-color: var(--danger-55); background: var(--danger-95); }

.page-heading { max-width: 48rem; margin-bottom: 1.75rem; }
.heading-actions { display: flex; align-items: flex-start; flex-direction: column; gap: 1rem; max-width: none; }

.evaluation-form { display: grid; gap: 1rem; }
.topic-card { min-width: 0; margin: 0; padding: 1rem; }
.topic-card legend {
  max-width: calc(100% - 1rem);
  padding: 0 0.4rem;
  color: var(--primary-34);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
}
.topic-card p { color: var(--muted); }
.scale {
  display: grid;
  grid-template-columns: repeat(var(--scale-columns), minmax(0, 1fr));
  align-items: start;
  gap: 0.25rem;
}
.scale-choice { position: relative; cursor: pointer; }
.scale-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.scale-choice > span { pointer-events: none; }
.scale-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  min-height: 6.5rem;
  padding: 0.35rem 0.1rem;
  border-radius: 0.75rem;
  text-align: center;
}
.scale-choice:hover { background: var(--primary-95); }
.scale-choice:has(input:checked) { color: var(--primary-24); background: var(--primary-95); }
.scale-choice:has(input:focus-visible) { outline: 3px solid hsl(var(--warning-h) var(--warning-s) 62%); outline-offset: 3px; }
.scale-icon {
  display: grid;
  place-items: center;
  width: clamp(2.8rem, 13vw, 3.6rem);
  height: clamp(2.8rem, 13vw, 3.6rem);
  border: 2px solid var(--primary-88);
  border-radius: 50%;
  color: var(--primary-34);
  background: var(--primary-95);
  font-family: skautbold, themix, sans-serif;
  font-size: 1.4rem;
  line-height: 1;
}
.scale-choice:hover .scale-icon { border-color: var(--primary-43); }
.scale-choice:has(input:checked) .scale-icon { color: var(--white); border-color: var(--primary-34); background: var(--primary-34); }
.scale-name {
  color: var(--muted);
  font-size: clamp(0.65rem, 2.6vw, 0.78rem);
  font-weight: 400;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.scale-choice:has(input:checked) .scale-name { color: var(--primary-24); font-weight: 700; }
.neutral-tag { color: var(--muted); font-size: 0.62rem; font-weight: 400; line-height: 1; }

.submit-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: grid;
  gap: 0.45rem;
  margin: 0.5rem -1rem -4rem;
  padding: 1rem max(1rem, env(safe-area-inset-right)) calc(1rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: hsl(var(--grey-h) var(--grey-s) 100% / 0.96);
  box-shadow: 0 -0.4rem 1.5rem var(--shadow);
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

.filter-form {
  display: grid;
  gap: 0.4rem;
  max-width: 32rem;
  margin-bottom: 1.25rem;
}
.panel { margin-bottom: 1rem; padding: 1rem; }
.panel-heading { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.5rem; }
.panel-heading h2 { margin: 0; }
.chart-wrap { overflow-x: auto; }
.chart { display: block; width: 100%; min-width: 34rem; height: auto; }
.chart-grid { stroke: var(--border); stroke-width: 1; }
.chart-y-label, .chart-x-label { fill: var(--muted); font-family: themix, sans-serif; font-size: 12px; }
.chart-line, .chart-median { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.chart-line { stroke: var(--primary-34); stroke-width: 5; }
.chart-point { fill: var(--white); stroke: var(--primary-34); stroke-width: 4; }
.chart-median { stroke: var(--warning-48); stroke-width: 3; stroke-dasharray: 7 6; }
.chart-median-point { fill: var(--white); stroke: var(--warning-48); stroke-width: 3; }
.chart-range { fill: hsl(var(--warning-h) var(--warning-s) 48% / 0.16); stroke: none; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 0.8rem; color: var(--muted); font-size: 0.8rem; }
.chart-legend span::before { content: ""; display: inline-block; width: 1.4rem; height: 0.35rem; margin-right: 0.35rem; vertical-align: middle; border-radius: 1rem; }
.legend-you::before { background: var(--primary-34); }
.legend-median::before { background: var(--warning-48); }
.legend-range::before { background: hsl(var(--warning-h) var(--warning-s) 75%); }
.privacy-note { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.8rem; }

details summary { min-height: 2.75rem; padding: 0.65rem 0; font-weight: 700; cursor: pointer; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.65rem; border-bottom: 1px solid var(--border); text-align: left; }
th { color: var(--primary-34); }

.completion-list, .compact-details ol { margin: 0; padding: 0; list-style: none; }
.completion-list li, .compact-details li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
.badge { display: inline-flex; align-items: center; min-height: 1.7rem; padding: 0.15rem 0.55rem; border-radius: 2rem; font-size: 0.75rem; font-weight: 700; }
.badge-success { color: var(--success-31); background: var(--success-93); }
.badge-muted { color: var(--muted); background: var(--surface); }
.participant-grid { display: grid; gap: 1rem; }
.person-panel { min-width: 0; margin: 0; }

@media (min-width: 42rem) {
  .site-header { padding-inline: max(2rem, calc((100vw - 72rem) / 2)); }
  .heading-actions { align-items: center; justify-content: space-between; flex-direction: row; }
  .topic-card, .panel { padding: 1.5rem; }
  .scale { gap: 0.5rem; }
  .scale-choice { min-height: 7.5rem; padding: 0.7rem 0.35rem; }
  .neutral-tag { min-height: 1.1rem; }
  .submit-bar { grid-template-columns: auto 1fr; align-items: center; max-width: 72rem; margin-inline: calc((100vw - min(100vw - 2rem, 72rem)) / -2); padding-inline: max(1rem, calc((100vw - 72rem) / 2)); text-align: left; }
  .panel-heading { align-items: flex-start; justify-content: space-between; flex-direction: row; }
}

@media (min-width: 68rem) {
  .participant-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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