:root {
  color-scheme: light;
  --ink: #172238;
  --muted: #65728a;
  --muted-strong: #46556d;
  --panel: rgba(255, 255, 255, 0.84);
  --panel-strong: rgba(255, 255, 255, 0.9);
  --line: rgba(255, 255, 255, 0.42);
  --blue: #5e93ec;
  --blue-deep: #1f56bb;
  --violet: #9d6bf4;
  --mint: #70e3d1;
  --coral: #ff7d83;
  --amber: #ffd36d;
  --shadow: 0 24px 70px rgba(24, 45, 92, 0.3);
  --radius: 22px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 18%, rgba(112, 227, 209, 0.32), transparent 26rem),
    radial-gradient(circle at 86% 16%, rgba(255, 125, 131, 0.24), transparent 24rem),
    linear-gradient(135deg, #edf6ff 0%, #f6f3ff 48%, #fff8ec 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
.view:focus-visible {
  outline: 3px solid #ffd36d;
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: 999px;
  color: #172238;
  background: #ffffff;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(24, 45, 92, 0.24);
}

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

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 520px);
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 5vw, 72px);
  padding: clamp(18px, 5vw, 64px);
}

.brand-panel {
  display: flex;
  justify-content: flex-end;
}

.brand-card {
  max-width: 520px;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.38);
  box-shadow: 0 20px 80px rgba(59, 91, 150, 0.18);
  backdrop-filter: blur(18px);
}

.logo-mark,
.topbar-logo {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  color: white;
  font-weight: 900;
  letter-spacing: 0;
  background: linear-gradient(145deg, var(--mint), var(--blue) 52%, var(--violet));
  box-shadow: inset 0 1px 8px rgba(255, 255, 255, 0.48), 0 12px 24px rgba(68, 101, 172, 0.28);
}

.topbar-logo {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  font-size: 0.9rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-card .eyebrow,
.brand-card .eyebrow {
  color: #54709e;
}

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

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

h1 {
  margin-bottom: 16px;
  max-width: 12ch;
  font-size: clamp(2.5rem, 7vw, 5rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.lede {
  max-width: 44ch;
  color: var(--muted-strong);
  font-size: 1.08rem;
  line-height: 1.65;
}

.prototype-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.prototype-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  font-size: 0.92rem;
  font-weight: 900;
  text-decoration: none;
}

.prototype-links a + a {
  color: var(--blue-deep);
  background: rgba(255, 255, 255, 0.72);
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 28px;
}

.metric-row div {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
}

.metric-row strong {
  display: block;
  font-size: 1.6rem;
}

.metric-row span {
  color: var(--muted-strong);
  font-size: 0.78rem;
}

.phone-frame {
  display: flex;
  justify-content: center;
}

.device-bezel {
  position: relative;
  width: min(100%, 390px);
  height: min(850px, calc(100vh - 32px));
  min-height: 720px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 22px 18px 90px;
  border: 10px solid #152036;
  border-radius: 42px;
  background:
    linear-gradient(160deg, rgba(100, 157, 234, 0.98), rgba(107, 111, 230, 0.94) 42%, rgba(157, 94, 230, 0.82) 72%, rgba(33, 91, 189, 0.96));
  box-shadow: var(--shadow);
}

.device-notch {
  position: absolute;
  top: 0;
  left: 50%;
  width: 146px;
  height: 26px;
  transform: translateX(-50%);
  border-radius: 0 0 18px 18px;
  background: #111827;
  z-index: 4;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  color: white;
}

.icon-button {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  color: white;
  background: rgba(22, 42, 83, 0.2);
  backdrop-filter: blur(10px);
}

.hero-panel {
  margin: 10px 0 14px;
  color: white;
}

.hero-panel h2 {
  margin-bottom: 8px;
  font-size: 1.75rem;
  line-height: 1.05;
}

.hero-panel p:last-child {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.96);
  line-height: 1.45;
}

.segmented-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: 42px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
}

.tab {
  border: 0;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.95);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 800;
}

.tab.is-active {
  color: var(--blue-deep);
  background: rgba(255, 255, 255, 0.86);
}

.view {
  display: none;
  overflow-y: auto;
  padding: 18px 2px 12px;
  scrollbar-width: none;
}

.view[hidden] {
  display: none;
}

.view::-webkit-scrollbar {
  display: none;
}

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

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-heading h3 {
  margin-bottom: 0;
  color: white;
  font-size: 1.25rem;
}

.pill,
.primary-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  color: var(--blue-deep);
  background: rgba(255, 255, 255, 0.84);
  font-size: 0.78rem;
  font-weight: 850;
}

.image-card,
.soft-card,
.list-card,
.timeline-card,
.student-card,
.upload-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 16px 32px rgba(26, 51, 99, 0.16);
  backdrop-filter: blur(18px);
}

.image-card {
  position: relative;
  min-height: 156px;
  display: flex;
  align-items: flex-end;
  padding: 18px;
  overflow: hidden;
  border-radius: var(--radius);
  color: white;
  background:
    linear-gradient(180deg, rgba(10, 35, 74, 0.12), rgba(11, 29, 67, 0.72)),
    radial-gradient(circle at 24% 18%, rgba(255, 211, 109, 0.9), transparent 18%),
    linear-gradient(135deg, #5bd2d0 0%, #4778de 45%, #182c72 100%);
}

.surf-card::before {
  content: "";
  position: absolute;
  inset: 18px 22px auto auto;
  width: 124px;
  height: 74px;
  border-radius: 50% 50% 44% 56%;
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(-10deg);
}

.image-card h4 {
  margin-bottom: 6px;
  font-size: 1.4rem;
}

.image-card p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.96);
}

.date-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 52px;
  border-radius: 12px;
  color: var(--blue-deep);
  background: rgba(164, 235, 226, 0.92);
  font-size: 0.74rem;
  font-weight: 900;
  text-align: center;
}

.insight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.soft-card,
.list-card,
.timeline-card,
.upload-card {
  border-radius: var(--radius);
  padding: 16px;
}

.soft-card h4,
.list-card h4,
.timeline-card h4,
.student-card h4,
.upload-card h4 {
  margin-bottom: 5px;
}

.soft-card p,
.list-card p,
.timeline-card p,
.student-card p,
.upload-card p {
  margin-bottom: 0;
  color: var(--muted-strong);
  line-height: 1.42;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  border-radius: 12px;
  font-weight: 950;
}

.card-icon.mint {
  color: #075d52;
  background: rgba(112, 227, 209, 0.54);
}

.card-icon.amber {
  color: #765004;
  background: rgba(255, 211, 109, 0.65);
}

.list-card {
  margin-top: 12px;
}

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

.text-button {
  border: 0;
  color: var(--blue-deep);
  background: rgba(255, 255, 255, 0.48);
  min-height: 44px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 850;
}

.list-card label {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-size: 0.9rem;
}

.list-card label span {
  color: var(--muted-strong);
  font-size: 0.74rem;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.quick-actions button,
.primary-button {
  min-height: 44px;
  border: 0;
  border-radius: 16px;
  color: var(--blue-deep);
  background: rgba(255, 255, 255, 0.84);
  font-size: 0.78rem;
  font-weight: 900;
}

.timeline-card {
  background: rgba(255, 255, 255, 0.6);
}

.timeline-item {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 12px;
  padding-bottom: 18px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item > span {
  position: relative;
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: var(--mint);
}

.timeline-item > span::after {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  width: 2px;
  height: 64px;
  transform: translateX(-50%);
  background: rgba(93, 126, 180, 0.22);
}

.timeline-item:last-child > span::after {
  display: none;
}

.time {
  margin-bottom: 2px;
  color: #43577d;
  font-size: 0.75rem;
  font-weight: 800;
}

.student-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
  padding: 12px;
  border-radius: 20px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  font-size: 0.8rem;
  font-weight: 950;
}

.avatar.coral {
  background: linear-gradient(135deg, var(--coral), var(--violet));
}

.avatar.gold {
  color: #583700;
  background: linear-gradient(135deg, var(--amber), var(--mint));
}

.status {
  padding: 7px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
}

.status.needs {
  color: #78490b;
  background: rgba(255, 211, 109, 0.52);
}

.status.ready {
  color: #075d52;
  background: rgba(112, 227, 209, 0.52);
}

.status.watch {
  color: #913b46;
  background: rgba(255, 125, 131, 0.26);
}

.upload-card {
  text-align: center;
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
  border-radius: 22px;
  color: var(--blue-deep);
  background: rgba(112, 227, 209, 0.46);
  font-size: 1.7rem;
  font-weight: 900;
}

.primary-button {
  margin-top: 14px;
  padding: 0 18px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--violet));
}

.compact p {
  margin-bottom: 8px;
}

.bottom-nav {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(18px);
}

.bottom-nav button {
  min-height: 44px;
  border: 0;
  border-radius: 18px;
  color: rgba(255, 255, 255, 0.95);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 900;
}

.bottom-nav button.is-active {
  color: var(--blue-deep);
  background: rgba(255, 255, 255, 0.86);
}

@media (max-width: 880px) {
  .app-shell {
    display: block;
    padding: 0;
    background: #172238;
  }

  .brand-panel {
    display: none;
  }

  .device-bezel {
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .view.is-active {
    animation: rise 180ms ease-out;
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
