:root {
  color-scheme: light;
  --blue: #5d9bef;
  --sky: #82c8f8;
  --violet: #8d6be8;
  --lavender: #b178ee;
  --aqua: #6be7e9;
  --navy: #17345f;
  --ink: #18365f;
  --muted: #50617d;
  --soft: rgba(255, 255, 255, 0.84);
  --soft-strong: rgba(255, 255, 255, 0.94);
  --line: rgba(69, 91, 136, 0.18);
  --dark-glass: rgba(23, 52, 95, 0.72);
  --shadow: 0 18px 48px rgba(24, 45, 92, 0.22);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #5f8ce9;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 15% 8%, rgba(107, 231, 233, 0.35), transparent 20rem),
    radial-gradient(circle at 90% 20%, rgba(177, 120, 238, 0.38), transparent 24rem),
    linear-gradient(160deg, #5d9bef 0%, #7a8cec 45%, #8d6be8 72%, #b178ee 100%);
  color: var(--ink);
  font-family: Inter, "SF Pro Text", "SF Pro Display", "Avenir Next", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
}

button {
  font: inherit;
}

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

button:focus-visible,
a:focus-visible {
  outline: 3px solid #113f73;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(107, 231, 233, 0.48);
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

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

h1 {
  margin-bottom: 0;
  color: #ffffff;
  font-size: 25px;
  line-height: 1.04;
}

h2 {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.12;
}

h3 {
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.2;
}

p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 520;
  line-height: 1.42;
}

svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.app-shell {
  position: relative;
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 18px calc(96px + env(safe-area-inset-bottom));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0 14px;
  background: linear-gradient(180deg, rgba(87, 130, 224, 0.92), rgba(87, 130, 224, 0));
  backdrop-filter: blur(16px);
}

.title-lockup {
  min-width: 0;
}

.eyebrow,
.label,
.skill-label {
  margin: 0 0 5px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow {
  color: rgba(255, 255, 255, 0.9);
}

.label,
.skill-label {
  color: #46618c;
}

.icon-button,
.small-button,
.nav-button,
.chip-grid button,
.tag-row button {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.icon-button {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: var(--dark-glass);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.view {
  display: none;
}

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

.hero-card,
.surface-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.hero-card {
  display: grid;
  gap: 18px;
  min-height: 332px;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.82)),
    radial-gradient(circle at 80% 10%, rgba(107, 231, 233, 0.36), transparent 10rem);
}

.hero-card h2 {
  max-width: 13ch;
  font-size: 31px;
  line-height: 1.02;
}

.radar-summary {
  position: relative;
  min-height: 166px;
  border: 1px solid rgba(69, 91, 136, 0.14);
  border-radius: 16px;
  background:
    radial-gradient(circle at center, rgba(107, 231, 233, 0.28), transparent 56%),
    linear-gradient(145deg, rgba(93, 155, 239, 0.18), rgba(177, 120, 238, 0.16));
  overflow: hidden;
}

.radar-summary::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 78px;
  border-radius: 999px;
  background: linear-gradient(to bottom, #17345f, rgba(23, 52, 95, 0));
  transform: rotate(43deg);
  transform-origin: top;
  animation: sweep 5.5s linear infinite;
}

.radar-ring {
  position: absolute;
  inset: 50%;
  border: 1px solid rgba(23, 52, 95, 0.18);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.ring-one {
  width: 62px;
  height: 62px;
}

.ring-two {
  width: 112px;
  height: 112px;
}

.ring-three {
  width: 158px;
  height: 158px;
}

.radar-chip {
  position: absolute;
  min-width: 72px;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.radar-chip.ready {
  top: 22px;
  right: 18px;
  background: #c7f4f4;
}

.radar-chip.refresh {
  bottom: 26px;
  left: 16px;
  background: #e7dcff;
}

.radar-chip.note {
  right: 25px;
  bottom: 18px;
  background: #f7d8e8;
}

.surface-card {
  margin-top: 16px;
  padding: 18px;
}

.surface-card.first {
  margin-top: 0;
}

.surface-card.compact {
  padding-bottom: 16px;
}

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

.privacy-pill,
.count-pill,
.small-button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.privacy-pill,
.count-pill {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  background: #e8f2ff;
}

.small-button {
  background: #eef5ff;
  color: var(--ink);
}

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

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 12px;
  padding: 0 0 18px;
}

.timeline li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 32px;
  bottom: 2px;
  left: 24px;
  width: 2px;
  border-radius: 2px;
  background: #cbd7ea;
}

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

.time {
  display: grid;
  width: 50px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  background: #17345f;
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
}

.primary-action {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 999px;
  background: var(--aqua);
  color: var(--navy);
  font-weight: 850;
  cursor: pointer;
}

.signal-list,
.skill-stack,
.student-list {
  display: grid;
  gap: 10px;
}

.signal-list article,
.student-list article,
.attachment-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(245, 249, 255, 0.82);
}

.signal-list article {
  grid-template-columns: auto 1fr;
}

.signal-mark {
  width: 14px;
  height: 44px;
  border-radius: 999px;
}

.signal-mark.ready {
  background: #6be7e9;
}

.signal-mark.refresh {
  background: #b178ee;
}

.signal-mark.note {
  background: #ea86b8;
}

.skill-card,
.note-card,
.capture-block {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(245, 249, 255, 0.82);
}

.skill-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: start;
}

.skill-card.warning {
  background: #f5efff;
}

.skill-card.next {
  background: #eafafa;
}

.skill-card strong {
  color: var(--ink);
  font-size: 14px;
}

.note-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: #50617d;
  font-size: 13px;
  font-weight: 750;
}

.attachment-card {
  grid-template-columns: 42px 1fr;
  margin-top: 10px;
}

.attachment-card > span,
.avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.attachment-card > span {
  background: #dff9fa;
}

.avatar.teal {
  background: #c7f4f4;
}

.avatar.violet {
  background: #e7dcff;
}

.avatar.blue {
  background: #dbeaff;
}

.avatar.rose {
  background: #f7d8e8;
}

.status {
  min-width: 66px;
  padding: 7px 9px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.status.ready {
  background: #c7f4f4;
}

.status.refresh {
  background: #e7dcff;
}

.status.note {
  background: #f7d8e8;
}

.capture-block {
  margin-bottom: 12px;
}

.chip-grid,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chip-grid button,
.tag-row button {
  min-height: 44px;
  padding: 9px 12px;
  border-color: #c6d3e6;
  border-radius: 999px;
  background: #f5f9ff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.chip-grid button.selected,
.tag-row button.selected {
  border-color: rgba(23, 52, 95, 0.22);
  background: #17345f;
  color: #ffffff;
}

.memory {
  background: #f5efff;
}

.bottom-nav {
  position: fixed;
  right: 18px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  left: 18px;
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  max-width: 394px;
  margin: 0 auto;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(23, 52, 95, 0.78);
  box-shadow: 0 12px 34px rgba(23, 52, 95, 0.32);
  backdrop-filter: blur(22px);
}

.nav-button {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 3px;
  min-width: 0;
  padding: 8px 4px 7px;
  border-color: transparent;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  font-weight: 850;
}

.nav-button svg {
  width: 20px;
  height: 20px;
}

.nav-button.is-active {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: calc(92px + env(safe-area-inset-bottom));
  left: 24px;
  z-index: 9;
  max-width: 382px;
  margin: 0 auto;
  padding: 13px 16px;
  border-radius: 14px;
  background: #17345f;
  color: #ffffff;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes sweep {
  to {
    transform: rotate(403deg);
  }
}

@media (min-width: 720px) {
  body {
    display: grid;
    place-items: start center;
  }

  .app-shell {
    min-height: 860px;
  }
}

@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;
  }
}
