:root {
  color-scheme: light;
  --blue: #5d9bef;
  --sky: #82c8f8;
  --violet: #8d6be8;
  --lavender: #b178ee;
  --aqua: #6be7e9;
  --navy: #17345f;
  --ink: #142b4f;
  --muted: #51617b;
  --line: rgba(23, 52, 95, 0.16);
  --glass-line: rgba(255, 255, 255, 0.46);
  --card: rgba(255, 255, 255, 0.88);
  --card-strong: rgba(255, 255, 255, 0.96);
  --scrim: rgba(17, 37, 74, 0.58);
  --focus: #ffd36d;
  --shadow: 0 20px 48px rgba(19, 42, 91, 0.22);
  font-family: Inter, "SF Pro Display", "Avenir Next", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: #5d9bef;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 6%, rgba(107, 231, 233, 0.46), transparent 18rem),
    radial-gradient(circle at 88% 0%, rgba(255, 211, 109, 0.18), transparent 16rem),
    linear-gradient(155deg, #5d9bef 0%, #7279eb 48%, #9b68e5 78%, #b178ee 100%);
}

body,
button,
input {
  font: 500 16px/1.4 Inter, "SF Pro Display", "Avenir Next", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 30;
  transform: translateY(-150%);
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--navy);
  background: #fff;
  font-weight: 850;
}

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

.prototype-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.phone {
  position: relative;
  width: min(100%, 430px);
  min-height: 100vh;
  padding: max(16px, env(safe-area-inset-top)) 18px calc(178px + env(safe-area-inset-bottom));
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0.04) 26%),
    linear-gradient(155deg, #5d9bef 0%, #7479eb 50%, #9b68e5 100%);
}

.phone::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(13, 31, 65, 0.16), transparent 22rem);
}

.phone > * {
  position: relative;
}

.app-bar {
  display: grid;
  grid-template-columns: 46px 1fr 46px;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--glass-line);
  border-radius: 999px;
  color: #fff;
  background: rgba(13, 36, 80, 0.28);
  box-shadow: 0 16px 36px rgba(19, 42, 91, 0.18);
  backdrop-filter: blur(18px);
}

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

.title-lockup p,
.eyebrow,
.phase-label,
.mini-label {
  margin: 0;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.15;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

.title-lockup h1 {
  margin: 1px 0 0;
  color: #fff;
  font-size: 17px;
  line-height: 1.12;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.icon-button span {
  line-height: 1;
}

.icon-button:first-child span {
  font-size: 30px;
  font-weight: 700;
  transform: translateY(-1px);
}

.hero-card,
.card,
.share-panel,
.work-tray {
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.hero-card {
  margin-top: 16px;
  padding: 18px;
  border-radius: 18px;
}

.hero-card__top,
.card-heading,
.recap-row,
.share-panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

h1,
h2,
h3,
p,
strong,
span,
button,
a {
  overflow-wrap: anywhere;
}

.eyebrow,
.phase-label,
.mini-label {
  color: #486081;
}

.hero-card h2 {
  max-width: 13ch;
  margin: 7px 0 7px;
  font-size: 29px;
  line-height: 1.03;
  letter-spacing: 0;
}

.hero-meta,
.phase-copy,
.planning-signal p,
.planning-signal strong,
.skill-plan span,
.share-panel p,
.work-tray p {
  color: var(--muted);
}

.hero-meta {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
}

.time-badge {
  flex: 0 0 auto;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--navy);
  background: rgba(107, 231, 233, 0.38);
  font-size: 13px;
  font-weight: 900;
}

.planning-signal {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  margin: 18px 0 14px;
  padding: 13px;
  border: 1px solid rgba(93, 155, 239, 0.2);
  border-radius: 14px;
  background: var(--card-strong);
}

.signal-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  color: var(--navy);
  background: linear-gradient(135deg, var(--aqua), #ffd36d);
  font-size: 22px;
  font-weight: 900;
}

.planning-signal p {
  margin: 0 0 3px;
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.planning-signal strong {
  display: block;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.32;
}

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

.signal-grid article {
  min-width: 0;
  padding: 11px 9px;
  border: 1px solid rgba(23, 52, 95, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.74);
}

.signal-grid strong,
.signal-grid span {
  display: block;
}

.signal-grid strong {
  color: var(--navy);
  font-size: 20px;
  line-height: 1.05;
}

.signal-grid span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
}

.phase-tabs {
  position: sticky;
  top: 10px;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 14px 0 20px;
  padding: 5px;
  border: 1px solid var(--glass-line);
  border-radius: 999px;
  background: rgba(20, 43, 90, 0.34);
  backdrop-filter: blur(20px);
}

.phase-tabs a {
  min-height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  font-size: 15px;
  font-weight: 850;
}

.phase-tabs a.is-active {
  color: var(--navy);
  background: rgba(255, 255, 255, 0.92);
}

.timeline {
  display: grid;
}

.timeline-phase {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
}

.phase-rail {
  display: grid;
  grid-template-rows: 36px 1fr;
  justify-items: center;
}

.phase-dot {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  color: #fff;
  background: var(--scrim);
  font-size: 14px;
  font-weight: 900;
}

.timeline-phase.is-current .phase-dot {
  color: var(--navy);
  background: var(--aqua);
}

.phase-line {
  width: 2px;
  background: linear-gradient(rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.18));
}

.phase-body {
  min-width: 0;
  padding-bottom: 28px;
}

.phase-label {
  color: rgba(255, 255, 255, 0.86);
}

.phase-body > h2 {
  margin: 3px 0 7px;
  color: #fff;
  font-size: 22px;
  line-height: 1.12;
}

.phase-copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  font-weight: 650;
}

.card,
.share-panel {
  margin-top: 14px;
  padding: 15px;
  border-radius: 14px;
  background: var(--card-strong);
}

.card h3,
.share-panel h3,
.work-tray h2 {
  margin: 4px 0 8px;
  color: var(--navy);
  font-size: 19px;
  line-height: 1.15;
}

.skill-plan {
  display: grid;
  gap: 10px;
  margin: 10px 0 15px;
  padding: 0;
  list-style: none;
}

.skill-plan li {
  padding: 11px;
  border: 1px solid rgba(23, 52, 95, 0.1);
  border-radius: 12px;
  background: rgba(93, 155, 239, 0.09);
}

.skill-plan strong,
.skill-plan span {
  display: block;
}

.skill-plan strong {
  color: var(--navy);
  font-size: 15px;
  font-weight: 850;
}

.skill-plan span {
  margin-top: 2px;
  font-size: 14px;
  font-weight: 600;
}

.primary-action {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border-radius: 999px;
  color: var(--navy);
  background: var(--aqua);
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(23, 52, 95, 0.18);
}

.focus-card .primary-action,
.work-tray .primary-action {
  width: 100%;
}

.compact-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 10px;
}

.compact-actions button,
.card-heading button,
.quick-log button {
  min-height: 44px;
  border: 1px solid rgba(23, 52, 95, 0.14);
  border-radius: 999px;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.9);
  font-weight: 850;
}

.card-heading {
  align-items: center;
}

.card-heading button {
  flex: 0 0 auto;
  padding: 0 12px;
  font-size: 13px;
}

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

.student {
  min-height: 44px;
  padding: 0 10px;
  border-radius: 12px;
  color: var(--navy);
  background: #edf3ff;
  font-weight: 800;
  text-align: left;
}

.student.is-present {
  background: rgba(107, 231, 233, 0.4);
}

.student.is-away {
  background: rgba(255, 211, 109, 0.44);
}

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

.quick-log button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 10px;
  border-radius: 13px;
  background: var(--card-strong);
}

.quick-log span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: var(--navy);
  background: rgba(107, 231, 233, 0.42);
  font-weight: 900;
}

.recap-card {
  display: grid;
  gap: 10px;
}

.recap-row {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(23, 52, 95, 0.1);
}

.recap-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.recap-row span {
  flex: 0 0 88px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.recap-row strong {
  color: var(--navy);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
}

.share-panel {
  align-items: center;
}

.share-panel > div {
  min-width: 0;
}

.share-panel p {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
}

.switch {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
}

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

.switch span {
  position: relative;
  width: 54px;
  height: 32px;
  border-radius: 999px;
  background: #d4ddeb;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 12px rgba(23, 52, 95, 0.22);
  transition: transform 180ms ease;
}

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

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

.work-tray {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  width: min(100%, 430px);
  margin: 0 auto;
  padding: 9px 18px calc(18px + env(safe-area-inset-bottom));
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 22px 22px 0 0;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 -20px 50px rgba(23, 52, 95, 0.26);
}

.tray-handle {
  width: 46px;
  height: 5px;
  margin: 0 auto 11px;
  border-radius: 999px;
  background: rgba(23, 52, 95, 0.22);
}

.tray-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.tray-panel[hidden] {
  display: none;
}

.work-tray h2 {
  margin-bottom: 4px;
  font-size: 18px;
}

.work-tray p {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
}

@media (min-width: 520px) {
  .prototype-shell {
    padding: 24px 0;
  }

  .phone {
    min-height: 860px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 30px;
    box-shadow: 0 34px 90px rgba(22, 36, 85, 0.32);
  }

  .work-tray {
    left: 50%;
    transform: translateX(-50%);
    border-radius: 22px 22px 30px 30px;
  }
}

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