:root {
  --bg: #e6eef0;
  --ink: #1b2430;
  --muted: #5c6b7a;
  --card: #ffffff;
  --line: #d5e0e6;
  --teal: #0e7c66;
  --teal-dark: #0b5f4e;
  --blue: #1d4e89;
  --sand: #f4f7f8;
  --focus: #0e7c66;
  --danger-bg: #fdecec;
  --danger: #8d2f2f;
  --shadow: 0 12px 32px rgba(23, 42, 58, 0.07);
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font: 16px/1.5 "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--teal-dark); }

img, canvas, svg { max-width: 100%; }

h1, h2, h3 { line-height: 1.25; margin: 0 0 0.4rem; }

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  background: white;
  padding: 8px 12px;
  z-index: 5;
}

.skip:focus { top: 12px; }

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

.site-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px 24px;
  background: white;
  border-bottom: 1px solid var(--line);
}

.logo {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.site-nav a { text-decoration: none; font-weight: 600; }

.who { color: var(--muted); }

.linkish {
  background: none;
  border: 0;
  padding: 0;
  color: var(--teal-dark);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

main { padding: 24px; max-width: 1180px; margin: 0 auto; }

.page-head, .login-card, .panel, .sim-card, .demo {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.page-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  padding: 20px 24px;
  margin-bottom: 16px;
}

.who-large { margin: 0; font-size: 1.15rem; }

.lede { color: var(--muted); margin: 0.2rem 0 0; }

.badge {
  display: inline-block;
  margin: 8px 0 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e7f5f1;
  color: var(--teal-dark);
  font-size: 0.92rem;
}

.button, button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  background: var(--teal);
  color: white;
  text-decoration: none;
  font: inherit;
  font-weight: 600;
  padding: 10px 16px;
  cursor: pointer;
}

.button-outline {
  background: white;
  color: var(--teal-dark);
  border: 1px solid var(--teal);
}

.head-links { display: flex; gap: 14px; align-items: center; }

.login-card { max-width: 420px; margin: 48px auto; padding: 28px; }

.login-card label, .filters label { display: block; font-weight: 600; margin: 12px 0 4px; }

input, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  background: white;
  color: var(--ink);
}

.password-row { display: flex; gap: 8px; align-items: center; }

.password-row input { flex: 1; }

.password-row button {
  border: 1px solid var(--line);
  background: var(--sand);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  cursor: pointer;
}

.error {
  background: var(--danger-bg);
  color: var(--danger);
  border-radius: 10px;
  padding: 10px 12px;
}

.login-card .button { width: 100%; margin-top: 8px; }

.profile-grid, .text-grid, .cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(520px, 100%), 1fr));
  gap: 16px;
}

.panel { container-type: inline-size; padding: 18px 20px 22px; min-width: 0; }

.chart-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.chart-box { position: relative; width: 100%; height: 300px; }

.group-list { list-style: none; margin: 0; padding: 0; }

.group-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  margin-bottom: 6px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
  background: var(--sand);
}

.group-list a span { min-width: 0; overflow-wrap: break-word; }

.group-list strong {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  line-height: 1.3;
}

.group-list a[aria-current="true"] {
  background: #e7f5f1;
  box-shadow: inset 3px 0 0 var(--teal);
}

.detail { margin-top: 12px; }

.table-wrap { overflow-x: auto; }

table.skills { width: 100%; border-collapse: collapse; }

table.skills th, table.skills td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

table.skills th:nth-child(2),
table.skills td:nth-child(2),
table.skills th:nth-child(3),
table.skills td:nth-child(3) {
  width: 1%;
  white-space: nowrap;
}

.note {
  margin-top: 12px;
  padding: 12px;
  background: var(--sand);
  border-radius: 12px;
}

.text-grid { margin-top: 16px; }

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 8px;
}

.filters .button { justify-self: start; margin-bottom: 2px; white-space: nowrap; }

.filters-status { color: var(--muted); }

.cards { align-items: stretch; }

.sim-card {
  display: flex;
  flex-direction: column;
  padding: 16px 16px 18px;
  border-top: 4px solid var(--teal);
  min-width: 0;
}

.type-sandbox { --stripe: #14804a; }
.type-contest { --stripe: #d4522a; }
.type-trainer { --stripe: #2a6fdb; }

.sim-card, .detail-card { border-top: 4px solid var(--stripe, var(--teal)); }

.sim-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.sim-top h1, .sim-top h2 { flex: 1 1 12rem; min-width: 0; margin: 0 0 0.4rem; font-size: 1.15rem; }

.icon { width: 28px; height: 28px; vertical-align: -6px; margin-right: 6px; }

.pills { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 6px; justify-content: flex-end; max-width: 100%; }

.pill {
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.82rem;
  background: color-mix(in srgb, var(--stripe, var(--teal)) 14%, white);
  color: var(--ink);
  white-space: nowrap;
}

.pill-quiet { background: var(--sand); }

.clamp {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--muted);
}

.practice { margin: 0 0 8px; }

.reason { margin: 0 0 8px; font-weight: 600; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 12px; }

.chips li {
  background: var(--sand);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.86rem;
}

.actions { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.empty { padding: 8px 0 0; }

.detail-card, .launch { padding: 22px; }

.launch .meta { padding-left: 18px; }

.demo { padding: 48px 28px; text-align: center; }

.stage-text { font-size: 1.6rem; margin: 18px 0; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@container (max-width: 480px) {
  .chart-box { height: 260px; }
}

@media (max-width: 720px) {
  .page-head { flex-direction: column; align-items: flex-start; }
  .site-header { flex-direction: column; align-items: flex-start; }
  .head-links { flex-wrap: wrap; }
  main { padding: 16px; }
}

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