:root {
  --navy: #17345f;
  --ink: #10284c;
  --muted: #47627f;
  --soft: #eef7ff;
  --card: rgba(255, 255, 255, 0.88);
  --card-strong: #ffffff;
  --line: rgba(23, 52, 95, 0.16);
  --blue: #5d9bef;
  --sky: #82c8f8;
  --violet: #8d6be8;
  --lavender: #b178ee;
  --aqua: #6be7e9;
  --focus: #ffcf5a;
  --shadow: 0 18px 44px rgba(17, 38, 78, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  font-family: Inter, "SF Pro Display", "Avenir Next", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 6%, rgba(107, 231, 233, 0.7), transparent 26rem),
    linear-gradient(150deg, var(--blue) 0%, var(--violet) 55%, var(--lavender) 100%);
}

body {
  min-height: 100vh;
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
}

button,
select,
textarea {
  font: inherit;
}

button {
  min-height: 44px;
  border: 0;
  cursor: pointer;
}

button,
a,
select,
textarea,
input {
  -webkit-tap-highlight-color: transparent;
}

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

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 20;
  transform: translateY(-140%);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--navy);
  background: white;
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  position: relative;
  width: min(100%, 460px);
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
  background:
    linear-gradient(180deg, rgba(23, 52, 95, 0.34), rgba(255, 255, 255, 0.16) 34%, rgba(255, 255, 255, 0.3)),
    rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.top-surface {
  padding: 18px 18px 20px;
  color: white;
}

.app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.icon-button {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  color: white;
  background: rgba(23, 52, 95, 0.22);
  text-decoration: none;
  backdrop-filter: blur(14px);
}

.icon-button span {
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
}

.title-lockup {
  min-width: 0;
  text-align: center;
}

.title-lockup p,
.hero-kicker,
.eyebrow {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.title-lockup p {
  color: rgba(255, 255, 255, 0.78);
}

.title-lockup h1,
.class-hero h2,
.command-card h2,
.section-heading h2,
.plan-block h3,
.radar-card h3,
.capture-feed h3,
.notebook-card h3,
.student-list h3,
.share-panel h3,
.file-card h3 {
  overflow-wrap: anywhere;
}

.title-lockup h1 {
  margin: 1px 0 0;
  font-size: 1.02rem;
}

.class-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.hero-kicker {
  color: rgba(255, 255, 255, 0.78);
}

.class-hero h2 {
  max-width: 13ch;
  margin: 8px 0;
  font-size: clamp(1.82rem, 8vw, 2.35rem);
  line-height: 1.03;
}

.hero-copy {
  max-width: 24rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 650;
}

.hero-badge {
  flex: 0 0 auto;
  display: grid;
  gap: 2px;
  min-width: 74px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 14px;
  padding: 10px;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.9);
  text-align: center;
}

.hero-badge span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.hero-badge strong {
  font-size: 1.05rem;
}

.command-card,
.file-card,
.preview-table,
.map-card,
.plan-block,
.radar-card,
.capture-feed,
.notebook-card,
.student-list article,
.share-panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.command-card {
  padding: 16px;
}

.command-head,
.section-heading,
.notebook-head,
.share-panel,
.file-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.command-card .eyebrow,
.section-heading .eyebrow,
.share-panel .eyebrow,
.plan-block p {
  color: var(--muted);
}

.command-card h2,
.section-heading h2 {
  margin: 4px 0 0;
  font-size: 1.25rem;
  line-height: 1.15;
}

.time-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 8px 10px;
  color: var(--navy);
  background: rgba(107, 231, 233, 0.42);
  font-weight: 850;
}

.command-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0;
}

.command-grid div {
  display: grid;
  min-width: 0;
  border-radius: 12px;
  padding: 10px;
  background: rgba(238, 247, 255, 0.92);
}

.metric {
  font-size: 1.35rem;
  font-weight: 900;
}

.command-grid span:last-child {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
}

.primary-action {
  width: 100%;
  border-radius: 14px;
  padding: 12px 16px;
  color: var(--navy);
  background: var(--aqua);
  font-weight: 900;
}

.bottom-nav {
  position: fixed;
  right: max(14px, calc((100vw - 460px) / 2 + 14px));
  bottom: calc(12px + env(safe-area-inset-bottom));
  left: max(14px, calc((100vw - 460px) / 2 + 14px));
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-width: 432px;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 24px;
  padding: 8px;
  background: rgba(23, 52, 95, 0.66);
  box-shadow: 0 20px 50px rgba(9, 23, 51, 0.34);
  backdrop-filter: blur(20px);
}

.nav-button {
  display: grid;
  gap: 2px;
  place-items: center;
  border-radius: 16px;
  padding: 7px 4px;
  color: white;
  background: transparent;
  font-size: 0.78rem;
  font-weight: 850;
}

.nav-button span {
  display: grid;
  min-width: 30px;
  min-height: 24px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.72rem;
}

.nav-button.is-active {
  color: var(--navy);
  background: white;
}

.nav-button.is-active span {
  background: rgba(107, 231, 233, 0.5);
}

.view-stack {
  padding: 0 18px 20px;
}

.view {
  display: none;
  animation: fade-in 180ms ease-out;
}

.view.is-active {
  display: block;
}

.section-heading {
  margin: 6px 0 14px;
  color: white;
}

.section-heading .eyebrow {
  color: rgba(255, 255, 255, 0.78);
}

.file-card {
  align-items: center;
  padding: 14px;
}

.file-mark {
  display: grid;
  flex: 0 0 54px;
  height: 54px;
  place-items: center;
  border-radius: 14px;
  color: var(--navy);
  background: linear-gradient(135deg, var(--aqua), #dffcff);
  font-weight: 950;
}

.file-card h3,
.student-list h3,
.notebook-card h3,
.capture-feed h3,
.share-panel h3,
.radar-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.18;
}

.file-card p,
.student-list p,
.feed-item p,
.notebook-card textarea,
.share-panel p {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 650;
}

.preview-table {
  overflow: hidden;
  margin-top: 12px;
  box-shadow: none;
}

.preview-row {
  display: grid;
  grid-template-columns: 1.1fr 0.68fr 1.35fr;
  gap: 8px;
  padding: 11px 12px;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
  font-weight: 700;
}

.preview-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.preview-head {
  border-top: 0;
  color: var(--muted);
  background: rgba(238, 247, 255, 0.88);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.mapping-stack {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.map-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 13px;
  box-shadow: none;
}

.map-card span {
  color: var(--muted);
  font-weight: 850;
}

.map-card select {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  color: var(--navy);
  background: white;
  font-weight: 800;
}

.timeline-plan {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline-plan li {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  align-items: stretch;
}

.step-dot {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: var(--navy);
  background: var(--aqua);
  font-weight: 950;
  box-shadow: 0 0 0 6px rgba(107, 231, 233, 0.22);
}

.plan-block {
  padding: 13px;
  box-shadow: none;
}

.plan-block.is-current {
  border-color: rgba(107, 231, 233, 0.72);
  background: #f7fdff;
}

.plan-block p,
.plan-block h3,
.plan-block span {
  margin: 0;
}

.plan-block h3 {
  margin: 4px 0;
  font-size: 1.03rem;
}

.plan-block span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
}

.radar-card {
  margin-top: 12px;
  padding: 14px;
  box-shadow: none;
}

.radar-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.radar-grid span {
  border-radius: 999px;
  padding: 9px 10px;
  color: var(--navy);
  background: var(--soft);
  font-size: 0.86rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.radar-grid .ready {
  background: rgba(107, 231, 233, 0.38);
}

.radar-grid .refresh {
  background: rgba(255, 207, 90, 0.4);
}

.radar-grid .check {
  background: rgba(177, 120, 238, 0.24);
}

.radar-grid .recap {
  background: rgba(130, 200, 248, 0.36);
}

.attendee-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 12px;
}

.student-chip {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  padding: 0 16px;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.86);
  font-weight: 900;
}

.student-chip.is-selected {
  background: var(--aqua);
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quick-grid button {
  display: grid;
  gap: 7px;
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.9);
  text-align: left;
  font-weight: 900;
  box-shadow: var(--shadow);
}

.quick-grid button span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  background: rgba(107, 231, 233, 0.38);
}

.capture-feed,
.notebook-card {
  margin-top: 12px;
  padding: 14px;
  box-shadow: none;
}

.feed-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  margin-top: 12px;
}

.feed-item span {
  color: var(--muted);
  font-weight: 900;
}

.capture-dock {
  display: grid;
  grid-template-columns: 1fr 1.35fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.capture-dock button:not(.primary-action) {
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 14px;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.86);
  font-weight: 900;
}

.notebook-head span {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--navy);
  background: rgba(107, 231, 233, 0.38);
  font-size: 0.78rem;
  font-weight: 900;
}

.notebook-card textarea {
  width: 100%;
  min-height: 132px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  resize: vertical;
  color: var(--ink);
  background: white;
}

.student-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.student-list article {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  box-shadow: none;
}

.avatar {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  color: var(--navy);
  background: rgba(130, 200, 248, 0.5);
  font-weight: 950;
}

.avatar.violet {
  background: rgba(177, 120, 238, 0.3);
}

.avatar.aqua {
  background: rgba(107, 231, 233, 0.45);
}

.student-list strong {
  border-radius: 999px;
  padding: 7px 9px;
  color: var(--navy);
  background: var(--soft);
  font-size: 0.78rem;
}

.share-panel {
  align-items: center;
  margin-top: 12px;
  padding: 14px;
  box-shadow: none;
}

.switch {
  position: relative;
  display: block;
  width: 58px;
  height: 34px;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(23, 52, 95, 0.2);
}

.switch span::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 3px 10px rgba(17, 38, 78, 0.22);
  content: "";
  transition: transform 180ms ease;
}

.switch input:checked + span {
  background: var(--aqua);
}

.switch input:checked + span::after {
  transform: translateX(24px);
}

.toast {
  position: fixed;
  right: max(18px, calc((100vw - 460px) / 2 + 18px));
  bottom: calc(104px + env(safe-area-inset-bottom));
  left: max(18px, calc((100vw - 460px) / 2 + 18px));
  z-index: 12;
  max-width: 424px;
  margin: 0 auto;
  border-radius: 16px;
  padding: 12px 14px;
  color: white;
  background: rgba(16, 40, 76, 0.92);
  font-weight: 800;
  box-shadow: 0 18px 44px rgba(8, 22, 48, 0.35);
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 760px) {
  body {
    padding: 28px 0;
  }

  .app-shell {
    min-height: calc(100vh - 56px);
    border-radius: 34px;
    overflow: hidden;
  }
}

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