:root {
  --ink: #172033;
  --muted: #68738a;
  --line: #e5e9f2;
  --surface: #ffffff;
  --surface-alt: #f5f7fb;
  --brand: #5d45df;
  --brand-dark: #4530ba;
  --brand-soft: #eeebff;
  --green: #16845b;
  --green-soft: #e3f7ee;
  --amber: #b66a00;
  --amber-soft: #fff2d7;
  --red: #c04454;
  --red-soft: #ffe7ea;
  --blue: #2768b5;
  --blue-soft: #e5f0ff;
  --shadow: 0 14px 40px rgba(28, 36, 64, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #f8f9fc;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 85% 0%, rgba(107, 86, 235, 0.10), transparent 27rem),
    #f8f9fc;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
}

.shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(229, 233, 242, 0.9);
  backdrop-filter: blur(12px);
}

.header-inner,
.footer-inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  color: white;
  background: var(--brand);
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(93, 69, 223, 0.28);
}

.header-note,
.section-meta,
.muted,
.data-note {
  color: var(--muted);
}

.header-note {
  font-size: 0.8rem;
  font-weight: 650;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  align-items: end;
  gap: 36px;
  padding: 70px 0 42px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 20px;
  font-size: clamp(2.35rem, 5vw, 4.6rem);
  letter-spacing: -0.065em;
  line-height: 0.99;
}

h2 {
  margin-bottom: 0;
  font-size: 1.22rem;
  letter-spacing: -0.025em;
}

.hero-text {
  max-width: 650px;
  margin-bottom: 16px;
  color: #4f5b72;
  font-size: 1.05rem;
  line-height: 1.65;
}

.data-note {
  margin-bottom: 0;
  font-size: 0.78rem;
}

.hero-callout {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 23px;
  color: white;
  background: linear-gradient(145deg, #5f48e3, #4029b6);
  border-radius: 18px;
  box-shadow: 0 18px 38px rgba(83, 60, 210, 0.23);
}

.callout-label {
  color: #dcd7ff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-callout code {
  overflow-wrap: anywhere;
  color: white;
  font-size: 0.82rem;
  line-height: 1.55;
}

.callout-help {
  color: #dcd7ff;
  font-size: 0.76rem;
  line-height: 1.45;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.stat-card,
.loading-card,
.error-card {
  min-height: 115px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 7px 24px rgba(28, 36, 64, 0.035);
}

.stat-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 650;
}

.stat-value {
  display: block;
  color: var(--ink);
  font-size: 1.75rem;
  font-weight: 780;
  letter-spacing: -0.045em;
}

.stat-detail {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
}

.panel {
  padding: 27px;
  margin-bottom: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.section-meta {
  font-size: 0.76rem;
  font-weight: 650;
}

.learner-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.learner-card {
  padding: 17px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.learner-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.learner-name {
  font-size: 0.86rem;
  font-weight: 750;
}

.learner-percent {
  color: var(--brand);
  font-size: 0.84rem;
  font-weight: 800;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  background: #dfe3ec;
  border-radius: 99px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), #8f7bff);
  border-radius: inherit;
  transition: width 280ms ease;
}

.learner-details {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.7rem;
}

.learner-details strong {
  color: var(--ink);
  font-weight: 750;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.7fr) repeat(2, minmax(150px, 0.8fr)) auto;
  align-items: end;
  gap: 12px;
  padding: 15px;
  margin-bottom: 17px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field > span {
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 750;
}

.field input,
.field select {
  width: 100%;
  min-height: 40px;
  padding: 8px 11px;
  color: var(--ink);
  background: white;
  border: 1px solid #d9deea;
  border-radius: 9px;
  outline: none;
}

.field input:focus,
.field select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(93, 69, 223, 0.13);
}

.button {
  min-height: 40px;
  padding: 8px 14px;
  cursor: pointer;
  border: 0;
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 750;
}

.button-secondary {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

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

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0 0 18px 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-not-started {
  color: var(--muted);
  background: #e6e9f0;
}

.status-in-progress {
  color: var(--blue);
  background: var(--blue-soft);
}

.status-done {
  color: var(--green);
  background: var(--green-soft);
}

.status-blocked {
  color: var(--red);
  background: var(--red-soft);
}

.status-unknown {
  color: var(--amber);
  background: var(--amber-soft);
}

.agenda-list {
  display: grid;
  gap: 12px;
}

.agenda-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.agenda-top {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) minmax(190px, 0.72fr);
  align-items: start;
  gap: 18px;
}

.day-number {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border-radius: 13px;
  font-size: 0.78rem;
  font-weight: 850;
}

.day-label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.agenda-topic {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.agenda-focus,
.agenda-detail {
  color: #556177;
  font-size: 0.78rem;
  line-height: 1.55;
}

.agenda-focus {
  margin: 7px 0 0;
}

.agenda-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 17px 0 0 72px;
  margin-top: 17px;
  border-top: 1px solid var(--line);
}

.agenda-detail {
  margin: 0;
}

.agenda-detail-label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.status-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 0.67rem;
  font-weight: 750;
  white-space: nowrap;
}

.status-pill .status-dot {
  width: 6px;
  height: 6px;
  background: currentColor;
}

.empty-state {
  padding: 42px 20px;
  color: var(--muted);
  text-align: center;
  background: var(--surface-alt);
  border: 1px dashed #ccd2e0;
  border-radius: 12px;
  font-size: 0.85rem;
}

.error-card {
  grid-column: 1 / -1;
  color: var(--red);
  background: var(--red-soft);
  border-color: #f7c9cf;
  font-size: 0.85rem;
}

.loading-card {
  color: var(--muted);
  font-size: 0.82rem;
}

.help-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
  margin-bottom: 48px;
}

.help-card {
  margin-bottom: 0;
}

.help-card p:not(.eyebrow) {
  color: #556177;
  font-size: 0.84rem;
  line-height: 1.6;
}

.help-card pre {
  overflow-x: auto;
  padding: 14px;
  margin: 17px 0;
  color: #dcd7ff;
  background: #24203e;
  border-radius: 10px;
  font-size: 0.75rem;
  line-height: 1.55;
}

.rhythm-list {
  display: grid;
  gap: 13px;
  padding: 0;
  margin: 22px 0 0;
  list-style: none;
}

.rhythm-list li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rhythm-list li > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 9px;
  font-size: 0.68rem;
  font-weight: 850;
}

.rhythm-list strong,
.rhythm-list small {
  display: block;
}

.rhythm-list strong {
  margin-bottom: 2px;
  font-size: 0.79rem;
}

.rhythm-list small {
  color: var(--muted);
  font-size: 0.72rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: white;
}

.footer-inner {
  min-height: 62px;
  color: var(--muted);
  font-size: 0.72rem;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-search {
    grid-column: 1 / -1;
  }

  .agenda-top {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .status-list {
    grid-column: 2;
    justify-content: flex-start;
  }
}

@media (max-width: 650px) {
  .shell {
    width: min(100% - 28px, 1180px);
  }

  .header-inner,
  .footer-inner {
    min-height: 60px;
  }

  .header-note {
    display: none;
  }

  .hero {
    padding: 48px 0 30px;
  }

  h1 {
    font-size: clamp(2.2rem, 13vw, 3.3rem);
  }

  .stats-grid,
  .learner-grid,
  .help-grid {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 19px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .toolbar {
    grid-template-columns: 1fr;
  }

  .field-search {
    grid-column: auto;
  }

  .button {
    width: 100%;
  }

  .agenda-card {
    padding: 16px;
  }

  .agenda-details {
    grid-template-columns: 1fr;
    padding-left: 0;
  }

  .agenda-top {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
  }

  .day-number {
    width: 40px;
    height: 40px;
  }

  .status-list {
    grid-column: 1 / -1;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
  }
}
