:root {
  --ink: #18211f;
  --muted: #66736d;
  --paper: #f7f5ef;
  --panel: #fffdf8;
  --line: #ddd8cb;
  --accent: #2f6f63;
  --accent-2: #c46636;
  --blue: #385f8f;
  --shadow: 0 18px 48px rgba(27, 33, 29, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input,
select {
  font: inherit;
}

.hero {
  position: relative;
  min-height: 86vh;
  overflow: hidden;
  display: grid;
  align-items: center;
  padding: 6rem clamp(1rem, 4vw, 4rem) 7rem;
  color: white;
}

.hero__image,
.hero__shade {
  position: absolute;
  inset: 0;
}

.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__shade {
  background:
    linear-gradient(90deg, rgba(10, 18, 16, 0.88), rgba(10, 18, 16, 0.48) 43%, rgba(10, 18, 16, 0.08)),
    linear-gradient(0deg, rgba(10, 18, 16, 0.68), rgba(10, 18, 16, 0.05) 45%);
}

.topbar {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem clamp(1rem, 4vw, 4rem);
}

.brand,
.topbar__actions,
.hero__actions,
.section-head--row,
.view-toggle,
.check-row {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.7rem;
  font-weight: 800;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 2.35rem;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.12);
  font-weight: 900;
}

.topbar__actions,
.hero__actions {
  gap: 0.75rem;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 44rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffc28d;
}

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

h1 {
  margin-bottom: 1rem;
  max-width: 12ch;
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.45rem;
  letter-spacing: 0;
}

.hero__content p:not(.eyebrow) {
  max-width: 36rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.08rem;
  line-height: 1.65;
}

.button,
.icon-button {
  border: 0;
  min-height: 2.75rem;
  cursor: pointer;
  text-decoration: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-weight: 850;
}

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

.button--soft {
  background: rgba(255, 255, 255, 0.18);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.14);
  color: white;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 2.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: white;
  font-size: 1.4rem;
}

main {
  padding: 0 clamp(1rem, 4vw, 4rem) 4rem;
}

.metrics {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: -4rem auto 2rem;
  max-width: 1120px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  box-shadow: var(--shadow);
}

.metrics article {
  background: var(--panel);
  padding: 1.25rem;
}

.metrics strong {
  display: block;
  font-size: 2rem;
}

.metrics span,
.student__meta,
.capacity,
.activity,
.notice p {
  color: var(--muted);
}

.workspace,
.operations {
  display: grid;
  grid-template-columns: minmax(18rem, 0.8fr) minmax(0, 1.6fr);
  gap: 1rem;
  max-width: 1120px;
  margin: 0 auto 1rem;
}

.operations {
  grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.8fr);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 10px 28px rgba(27, 33, 29, 0.06);
}

.panel--wide {
  min-width: 0;
}

.section-head {
  margin-bottom: 1rem;
}

.section-head--row {
  justify-content: space-between;
  gap: 1rem;
}

.form {
  display: grid;
  gap: 0.95rem;
}

label,
fieldset {
  display: grid;
  gap: 0.42rem;
  margin: 0;
}

label span,
legend {
  color: #40504b;
  font-size: 0.86rem;
  font-weight: 800;
}

fieldset {
  border: 0;
  padding: 0;
}

input,
select {
  width: 100%;
  min-height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 0 0.75rem;
}

.segmented,
.view-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ede8dc;
}

.segmented label {
  display: block;
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented span,
.view-toggle button {
  display: grid;
  place-items: center;
  min-height: 2.25rem;
  border-radius: 6px;
  color: #54615d;
  font-weight: 850;
}

.segmented input:checked + span,
.view-toggle .is-active {
  background: white;
  color: var(--ink);
  box-shadow: 0 3px 10px rgba(27, 33, 29, 0.08);
}

.view-toggle button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.notice {
  margin-top: 1rem;
  border-left: 4px solid var(--blue);
  padding: 0.25rem 0 0.25rem 0.85rem;
}

.notice p {
  margin-bottom: 0;
  line-height: 1.45;
}

.class-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.class-card {
  display: grid;
  gap: 0.8rem;
  min-height: 13.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.9rem;
  background: white;
}

.class-card__top,
.student {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.class-card h3,
.student strong {
  margin: 0;
}

.capacity {
  white-space: nowrap;
  font-size: 0.86rem;
  font-weight: 800;
}

.bar {
  height: 0.55rem;
  overflow: hidden;
  border-radius: 999px;
  background: #ebe5d8;
}

.bar span {
  display: block;
  height: 100%;
  width: var(--fill);
  background: var(--accent);
}

.roster {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  border-radius: 999px;
  background: #eef3ee;
  padding: 0 0.65rem;
  color: #29423b;
  font-size: 0.82rem;
  font-weight: 800;
}

.chip--banked {
  background: #fff1df;
  color: #8a4b22;
}

.class-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.mini-button {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #faf8f2;
  color: #394842;
  cursor: pointer;
  font-weight: 800;
  min-height: 2.1rem;
  padding: 0 0.6rem;
}

.student-list {
  display: grid;
  gap: 0.65rem;
}

.student {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.8rem;
  background: white;
}

.student__meta {
  margin: 0.2rem 0 0;
  font-size: 0.88rem;
}

.student__credits {
  display: grid;
  place-items: center;
  min-width: 2.4rem;
  min-height: 2.4rem;
  border-radius: 8px;
  background: #eef3ee;
  color: var(--accent);
  font-weight: 900;
}

.check-row {
  grid-template-columns: auto 1fr;
  gap: 0.6rem;
}

.check-row input {
  width: 1.1rem;
  min-height: 1.1rem;
}

.activity {
  margin-top: 1rem;
  min-height: 4.5rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  line-height: 1.45;
}

@media (max-width: 860px) {
  .hero {
    min-height: 760px;
    padding-top: 7rem;
  }

  .hero__shade {
    background:
      linear-gradient(0deg, rgba(10, 18, 16, 0.9), rgba(10, 18, 16, 0.22)),
      linear-gradient(90deg, rgba(10, 18, 16, 0.62), rgba(10, 18, 16, 0.08));
  }

  .hero__content {
    align-self: end;
  }

  h1 {
    font-size: 3.25rem;
  }

  .metrics,
  .workspace,
  .operations,
  .class-grid {
    grid-template-columns: 1fr;
  }

  .metrics {
    margin-top: -3rem;
  }

  .section-head--row {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .topbar {
    gap: 0.75rem;
  }

  .button {
    width: 100%;
  }

  .hero__actions,
  .topbar__actions {
    align-items: stretch;
  }

  .hero__actions {
    flex-direction: column;
  }

  .topbar__actions .button {
    display: none;
  }
}


.flash-stack {
  display: grid;
  gap: 0.5rem;
  max-width: 1120px;
  margin: 1rem auto 0;
}

.flash {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 0.75rem 1rem;
  font-weight: 800;
}

.flash--success {
  border-color: #adc9b7;
  color: #27533f;
}

.flash--error {
  border-color: #e0a89b;
  color: #8a3426;
}

.class-actions form {
  margin: 0;
}
