:root {
  --ink: #17312e;
  --ink-soft: #455d59;
  --muted: #6e7f7b;
  --forest: #153f3a;
  --forest-2: #285c54;
  --cream: #fbf8f0;
  --paper: #fffdf8;
  --paper-2: #f2eee4;
  --line: #dcd8cd;
  --line-strong: #b8c1bb;
  --sun: #f3c75e;
  --coral: #d86d42;
  --coral-soft: #fff0e8;
  --blue: #31689a;
  --shadow: 0 18px 60px rgba(26, 54, 49, 0.1);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --sans: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(21, 63, 58, 0.025) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--cream);
}

button,
input,
select,
textarea {
  font: inherit;
}

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

button {
  color: inherit;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid rgba(216, 109, 66, 0.42);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 999;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--forest);
  color: white;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

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

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 28px 20px 22px;
  background: var(--forest);
  color: #fffdf8;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 28px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: var(--sun);
  color: var(--forest);
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
}

.brand-name {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-meta {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.side-nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 13px;
  padding: 9px 12px;
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: white;
}

.nav-item.is-active {
  background: #fffaf0;
  color: var(--forest);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.16);
}

.nav-symbol {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 700;
}

.nav-copy strong,
.nav-copy span {
  display: block;
}

.nav-copy strong {
  font-size: 14px;
  font-weight: 650;
}

.nav-copy span {
  margin-top: 2px;
  color: inherit;
  opacity: 0.6;
  font-size: 11px;
}

.sidebar-note {
  margin-top: auto;
  padding: 18px 10px 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.sidebar-note-label {
  color: var(--sun);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sidebar-note p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.65;
}

.main-area {
  min-width: 0;
  padding: 28px clamp(24px, 4vw, 64px) 72px;
}

.topbar {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.mobile-menu {
  display: none;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--coral);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.topbar h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quick-record {
  min-height: 38px;
  padding-inline: 14px;
}

.date-chip {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.65);
  color: var(--ink-soft);
  font-size: 13px;
  white-space: nowrap;
}

.save-chip {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid #bfd0c8;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #edf5ef;
  color: #2c5b4f;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.save-chip.is-offline {
  border-color: #dccb9e;
  background: #fff7da;
  color: #705b24;
}

.save-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #3d8c70;
  box-shadow: 0 0 0 4px rgba(61, 140, 112, 0.12);
}

.save-dot.is-offline,
.save-chip.is-offline .save-dot {
  background: #c79835;
  box-shadow: 0 0 0 4px rgba(199, 152, 53, 0.13);
}

.save-chip.is-syncing .save-dot {
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(49, 104, 154, 0.13);
  animation: sync-pulse 1.2s ease-in-out infinite;
}

@keyframes sync-pulse {
  50% { opacity: 0.42; transform: scale(0.76); }
}

.page {
  animation: page-enter 280ms ease both;
}

@keyframes page-enter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.72fr);
  gap: 18px;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  min-height: 290px;
  padding: clamp(26px, 4vw, 48px);
  border-radius: var(--radius-lg);
  background: var(--forest);
  color: white;
  box-shadow: var(--shadow);
}

.hero-panel::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -65px;
  bottom: -100px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  box-shadow: 0 0 0 32px rgba(255, 255, 255, 0.035), 0 0 0 64px rgba(255, 255, 255, 0.025);
  pointer-events: none;
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--sun);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.1em;
}

.hero-kicker::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
}

.hero-panel h2 {
  max-width: 720px;
  margin: 32px 0 12px;
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.hero-panel p {
  max-width: 660px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  line-height: 1.8;
}

.hero-footer {
  position: relative;
  z-index: 1;
  margin-top: 30px;
  display: flex;
  align-items: center;
  gap: 10px 20px;
  flex-wrap: wrap;
}

.hero-footer strong {
  font-size: 13px;
}

.hero-footer span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.progress-panel {
  min-height: 290px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.section-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.progress-ring-wrap {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 18px 0;
}

.progress-ring {
  --progress: 0;
  width: 108px;
  aspect-ratio: 1;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--coral) calc(var(--progress) * 1%), #ebe7dd 0);
  position: relative;
}

.progress-ring::before {
  content: "";
  width: 80px;
  aspect-ratio: 1;
  position: absolute;
  border-radius: 50%;
  background: var(--paper);
}

.progress-ring strong,
.progress-ring span {
  position: relative;
  z-index: 1;
}

.progress-ring strong {
  font-family: var(--serif);
  font-size: 27px;
}

.progress-ring span {
  margin-left: -3px;
  margin-top: 3px;
  font-size: 11px;
}

.progress-copy h3 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 20px;
}

.progress-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.mini-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.mini-metric + .mini-metric {
  border-left: 1px solid var(--line);
  padding-left: 18px;
}

.mini-metric strong,
.mini-metric span {
  display: block;
}

.mini-metric strong {
  font-size: 19px;
  font-weight: 700;
}

.mini-metric span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.section-head {
  margin: 34px 0 16px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.section-head h2,
.section-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(23px, 3vw, 31px);
  line-height: 1.25;
}

.section-head p {
  max-width: 620px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  text-wrap: pretty;
}

.button-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  min-height: 44px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--forest);
  color: white;
  box-shadow: 0 8px 20px rgba(21, 63, 58, 0.18);
}

.btn-primary:hover {
  background: var(--forest-2);
}

.btn-accent {
  background: var(--coral);
  color: white;
}

.btn-secondary {
  border-color: var(--line-strong);
  background: var(--paper);
  color: var(--forest);
}

.btn-quiet {
  padding-inline: 12px;
  border-color: transparent;
  background: transparent;
  color: var(--ink-soft);
}

.btn-danger {
  border-color: #d8aaa0;
  background: #fff7f4;
  color: #8f3f32;
}

.btn[disabled] {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
}

.today-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 18px;
  align-items: start;
}

.task-list {
  border-top: 1px solid var(--line);
}

.task-row {
  display: grid;
  grid-template-columns: 42px 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 84px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  transition: opacity 150ms ease;
}

.task-row.is-done {
  opacity: 0.55;
}

.task-row.is-done .task-title {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.task-check {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--paper);
  cursor: pointer;
  position: relative;
}

.task-check[aria-checked="true"] {
  border-color: var(--forest);
  background: var(--forest);
}

.task-check[aria-checked="true"]::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 7px;
  width: 8px;
  height: 13px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.subject-seal {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--subject-pale);
  color: var(--subject-color);
  font-family: var(--serif);
  font-weight: 700;
}

.task-title {
  margin-bottom: 5px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  color: var(--muted);
  font-size: 12px;
}

.task-evidence {
  max-width: 180px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.5;
  text-align: right;
}

.task-empty {
  padding: 46px 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.task-empty strong {
  display: block;
  font-family: var(--serif);
  font-size: 20px;
}

.task-empty p {
  margin: 8px auto 0;
  color: var(--muted);
  font-size: 14px;
}

.focus-card {
  padding: 24px;
  border-radius: var(--radius-md);
  background: #e6efe9;
  position: sticky;
  top: 20px;
}

.focus-card h3 {
  margin: 12px 0 8px;
  font-family: var(--serif);
  font-size: 23px;
}

.focus-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.72;
}

.focus-rule {
  margin: 20px 0;
  border: 0;
  border-top: 1px solid rgba(21, 63, 58, 0.16);
}

.focus-list {
  display: grid;
  gap: 12px;
}

.focus-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
}

.focus-number {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(21, 63, 58, 0.32);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 750;
}

.focus-item strong {
  display: block;
  font-size: 13px;
}

.focus-item span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(72px, 1fr));
  gap: 8px;
  margin: 18px 0 6px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.day-tab {
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.8);
  cursor: pointer;
  transition: border 150ms ease, background 150ms ease;
}

.day-tab span,
.day-tab strong {
  display: block;
}

.day-tab span {
  color: var(--muted);
  font-size: 11px;
}

.day-tab strong {
  margin-top: 4px;
  font-size: 13px;
}

.day-tab.is-active {
  border-color: var(--forest);
  background: var(--forest);
  color: white;
}

.day-tab.is-active span {
  color: rgba(255,255,255,.65);
}

.page-intro {
  max-width: 860px;
  margin-bottom: 30px;
}

.page-intro h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.16;
  text-wrap: balance;
}

.page-intro p {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.record-profile {
  margin-bottom: 34px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 18px;
  background: var(--paper);
  box-shadow: 0 12px 40px rgba(26, 54, 49, 0.06);
}

.record-profile-main h3 {
  margin: 5px 0 4px;
  font-family: var(--serif);
  font-size: 25px;
}

.record-profile-main h3 span {
  margin-left: 6px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
}

.record-profile-main p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.record-stat {
  min-width: 74px;
  padding: 4px 18px;
  border-left: 1px solid var(--line);
  text-align: center;
}

.record-stat strong,
.record-stat span {
  display: block;
}

.record-stat strong {
  font-family: var(--serif);
  font-size: 26px;
}

.record-stat span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.school-timeline {
  position: relative;
  margin: 0 0 28px;
}

.school-timeline::before {
  content: "";
  position: absolute;
  top: 28px;
  bottom: 28px;
  left: 122px;
  width: 1px;
  background: var(--line-strong);
}

.school-record {
  position: relative;
  display: grid;
  grid-template-columns: 94px 38px minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 16px;
}

.school-record-date {
  padding-top: 19px;
  text-align: right;
}

.school-record-date strong,
.school-record-date span {
  display: block;
}

.school-record-date strong {
  color: var(--ink);
  font-size: 12px;
}

.school-record-date span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.school-record-marker {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  margin: 14px auto 0;
  border: 5px solid var(--cream);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--record-pale);
  color: var(--record-color);
  box-shadow: 0 0 0 1px var(--record-color);
  font-family: var(--serif);
  font-size: 11px;
  font-weight: 750;
}

.school-record-card {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.9);
}

.school-record.is-scheduled .school-record-card {
  border-style: dashed;
  background: rgba(242, 238, 228, 0.6);
}

.school-record-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--coral);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.record-status {
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--muted);
  letter-spacing: 0;
}

.school-record-card h3 {
  margin: 7px 0 6px;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.35;
}

.school-record-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.record-insight {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.6;
}

.record-insight strong {
  margin-right: 8px;
  color: var(--forest);
}

.stage-observation {
  margin: 4px 0 36px 142px;
  padding: 22px 24px;
  border-radius: var(--radius-md);
  background: var(--forest);
  color: white;
}

.stage-observation-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.stage-observation-head h3 {
  margin: 5px 0 0;
  font-family: var(--serif);
  font-size: 23px;
}

.stage-observation-head > span {
  color: rgba(255,255,255,.62);
  font-size: 11px;
}

.stage-observation > strong {
  display: block;
  font-size: 15px;
}

.stage-observation p {
  margin: 7px 0 0;
  color: rgba(255,255,255,.76);
  font-size: 13px;
  line-height: 1.7;
}

.stage-observation .stage-interpretation {
  color: rgba(255,255,255,.58);
  font-size: 12px;
}

.record-section-head {
  margin-top: 0;
}

.timeline {
  position: relative;
  margin: 38px 0 0;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 20px;
  left: 125px;
  width: 1px;
  background: var(--line-strong);
}

.phase-row {
  display: grid;
  grid-template-columns: 102px 28px minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 20px;
}

.phase-date {
  padding-top: 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  text-align: right;
}

.phase-dot {
  position: relative;
  z-index: 1;
  width: 15px;
  height: 15px;
  margin: 16px auto 0;
  border: 4px solid var(--cream);
  border-radius: 50%;
  background: var(--line-strong);
  box-shadow: 0 0 0 1px var(--line-strong);
}

.phase-row.is-current .phase-dot {
  background: var(--coral);
  box-shadow: 0 0 0 1px var(--coral), 0 0 0 6px rgba(216, 109, 66, 0.12);
}

.phase-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,253,248,.8);
  overflow: hidden;
}

.phase-toggle {
  width: 100%;
  border: 0;
  padding: 20px 22px;
  background: transparent;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  text-align: left;
  cursor: pointer;
}

.phase-toggle:hover {
  background: rgba(21, 63, 58, 0.035);
}

.phase-toggle h3 {
  margin: 4px 0 0;
  font-family: var(--serif);
  font-size: 22px;
}

.phase-toggle p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.phase-grade {
  color: var(--coral);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .08em;
}

.phase-chevron {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 18px;
  transition: transform 180ms ease;
}

.phase-card.is-open .phase-chevron {
  transform: rotate(45deg);
}

.phase-body {
  display: none;
  padding: 0 22px 24px;
}

.phase-card.is-open .phase-body {
  display: block;
}

.phase-thesis {
  margin: 0 0 20px;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--forest);
  color: white;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
}

.goal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.goal-item {
  padding: 16px;
  background: var(--paper);
}

.goal-item strong {
  display: block;
  margin-bottom: 6px;
  color: var(--forest);
  font-size: 13px;
}

.goal-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.68;
}

.evidence-tags {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.evidence-tag {
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink-soft);
  font-size: 11px;
}

.path-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 26px;
}

.path-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
}

.path-card h3 {
  margin: 8px 0;
  font-family: var(--serif);
  font-size: 25px;
}

.path-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.path-list {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: path;
}

.path-list li {
  position: relative;
  padding: 12px 0 12px 32px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.65;
  counter-increment: path;
}

.path-list li::before {
  content: counter(path, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 14px;
  color: var(--coral);
  font-size: 10px;
  font-weight: 800;
}

.source-box {
  margin-top: 32px;
  padding: 20px 22px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
}

.source-box h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.source-links {
  display: flex;
  gap: 8px 18px;
  flex-wrap: wrap;
}

.source-links a {
  color: var(--forest-2);
  font-size: 12px;
  text-underline-offset: 3px;
}

.ability-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(310px, .8fr);
  gap: 18px;
}

.ability-panel,
.evidence-panel,
.planner-panel,
.family-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
}

.ability-panel,
.planner-panel,
.family-panel {
  padding: 25px;
}

.panel-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
}

.panel-copy {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.ability-list {
  margin-top: 22px;
  display: grid;
  gap: 18px;
}

.ability-row {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) 34px;
  gap: 14px;
  align-items: center;
}

.ability-name strong,
.ability-name span {
  display: block;
}

.ability-name strong {
  font-size: 13px;
}

.ability-name span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.ability-track {
  height: 8px;
  border-radius: 999px;
  background: #ebe8df;
  overflow: hidden;
}

.ability-fill {
  height: 100%;
  width: calc(var(--score) / 4 * 100%);
  border-radius: inherit;
  background: var(--subject-color);
  transition: width 240ms ease;
}

.ability-score {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
}

.evidence-panel {
  overflow: hidden;
}

.evidence-head {
  padding: 24px 24px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.evidence-list {
  max-height: 580px;
  overflow-y: auto;
  border-top: 1px solid var(--line);
}

.evidence-item {
  padding: 16px 24px;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.evidence-item:last-child {
  border-bottom: 0;
}

.evidence-date {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
}

.evidence-date strong {
  display: block;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
}

.evidence-content strong {
  display: block;
  font-size: 13px;
}

.evidence-content p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.empty-state {
  padding: 44px 24px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  display: block;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
}

.empty-state p {
  margin: 8px auto 0;
  font-size: 13px;
  line-height: 1.6;
}

.assessment-callout {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--coral-soft);
  color: #79402d;
  font-size: 13px;
  line-height: 1.65;
}

.planner-layout {
  display: grid;
  grid-template-columns: minmax(280px, .65fr) minmax(0, 1.35fr);
  gap: 18px;
  align-items: start;
}

.planner-panel.is-sticky {
  position: sticky;
  top: 20px;
}

.form-grid {
  display: grid;
  gap: 17px;
  margin-top: 22px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label,
.field legend {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 750;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fffefb;
  padding: 10px 12px;
  color: var(--ink);
}

.field textarea {
  min-height: 88px;
  resize: vertical;
  line-height: 1.6;
}

.field small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.choice-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.choice {
  position: relative;
}

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

.choice label {
  min-height: 44px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--paper);
  font-size: 12px;
  cursor: pointer;
}

.choice input:checked + label {
  border-color: var(--forest);
  background: var(--forest);
  color: white;
}

.plan-sheet {
  min-height: 640px;
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--line);
  background: #fffefb;
  box-shadow: var(--shadow);
}

.plan-sheet-header {
  padding-bottom: 22px;
  border-bottom: 2px solid var(--forest);
}

.plan-sheet-header h2 {
  margin: 8px 0;
  font-family: var(--serif);
  font-size: clamp(27px, 4vw, 39px);
}

.plan-sheet-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.plan-meta {
  display: flex;
  gap: 10px 18px;
  flex-wrap: wrap;
  margin-top: 16px;
  color: var(--ink-soft);
  font-size: 12px;
}

.plan-section {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.plan-section:last-child {
  border-bottom: 0;
}

.plan-section h3 {
  margin: 0 0 12px;
  color: var(--forest);
  font-family: var(--serif);
  font-size: 19px;
}

.plan-section p,
.plan-section li {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.72;
}

.plan-section ul,
.plan-section ol {
  margin: 0;
  padding-left: 20px;
}

.plan-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.plan-summary-item {
  padding: 14px;
  background: var(--paper);
}

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

.plan-summary-item strong {
  font-family: var(--serif);
  font-size: 18px;
}

.plan-summary-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.weekly-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.weekly-table th,
.weekly-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
  font-size: 11px;
  line-height: 1.5;
}

.weekly-table th {
  color: var(--muted);
  font-weight: 750;
}

.weekly-table td:first-child {
  width: 50px;
  color: var(--forest);
  font-weight: 750;
}

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

.family-panel h3 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: 23px;
}

.role-split {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.role {
  padding: 18px;
  background: var(--paper);
}

.role-label {
  color: var(--coral);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}

.role h4 {
  margin: 8px 0;
  font-family: var(--serif);
  font-size: 19px;
}

.role p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.rule-list {
  display: grid;
}

.rule {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 25px 1fr;
  gap: 10px;
}

.rule:last-child {
  border-bottom: 0;
}

.rule-index {
  color: var(--coral);
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
}

.rule strong {
  display: block;
  font-size: 13px;
}

.rule p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.storage-box {
  margin-top: 18px;
  padding: 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
}

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

.device-grid .storage-box {
  margin-top: 0;
}

.storage-box h3 {
  margin: 10px 0 4px;
  font-family: var(--serif);
  font-size: 21px;
}

.install-box {
  border-style: solid;
  border-color: #b9cbc2;
  background: #edf5ef;
}

.device-status {
  min-height: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--forest-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.install-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: install-step;
}

.install-steps li {
  min-height: 56px;
  padding: 14px 0 14px 48px;
  border-bottom: 1px solid var(--line);
  position: relative;
  color: var(--ink-soft);
  line-height: 1.65;
  counter-increment: install-step;
}

.install-steps li::before {
  content: counter(install-step);
  position: absolute;
  left: 0;
  top: 12px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--forest);
  color: white;
  font-family: var(--serif);
  font-weight: 700;
}

.local-note {
  margin-top: 20px;
  padding: 15px 17px;
  border-radius: 12px;
  background: var(--coral-soft);
  color: #75432f;
  font-size: 13px;
  line-height: 1.65;
}

.storage-box p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  padding: 18px;
  display: grid;
  place-items: center;
  background: rgba(10, 32, 29, 0.58);
  backdrop-filter: blur(5px);
}

.modal {
  width: min(620px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow-y: auto;
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 28px 80px rgba(0,0,0,.28);
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 22px 24px 17px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  background: var(--paper);
}

.modal-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 25px;
}

.modal-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.modal-close {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
}

.modal-body {
  padding: 22px 24px 26px;
}

.modal-actions {
  margin-top: 22px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.range-wrap {
  display: grid;
  grid-template-columns: 1fr 42px;
  gap: 12px;
  align-items: center;
}

.range-wrap input[type="range"] {
  accent-color: var(--coral);
}

.range-value {
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: var(--serif);
  font-weight: 700;
}

.toast-region {
  position: fixed;
  z-index: 200;
  right: 22px;
  bottom: 22px;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.toast {
  max-width: 360px;
  padding: 13px 16px;
  border-radius: 12px;
  background: var(--forest);
  color: white;
  box-shadow: var(--shadow);
  font-size: 13px;
  line-height: 1.5;
  animation: toast-in 220ms ease both;
}

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

.mobile-nav {
  display: none;
}

@media (max-width: 1020px) {
  .app-shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .sidebar {
    padding-inline: 14px;
  }

  .hero-grid,
  .today-grid,
  .ability-layout,
  .planner-layout,
  .device-grid {
    grid-template-columns: 1fr;
  }

  .progress-panel {
    min-height: auto;
  }

  .focus-card,
  .planner-panel.is-sticky {
    position: static;
  }

  .focus-card {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 20px;
  }

  .record-profile {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .record-profile .btn {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .focus-rule {
    display: none;
  }
}

@media (max-width: 760px) {
  body {
    background: var(--cream);
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .main-area {
    padding: 18px 16px 96px;
  }

  .topbar {
    align-items: start;
    margin-bottom: 18px;
  }

  .date-chip {
    display: none;
  }

  .save-chip {
    min-height: 32px;
    padding-inline: 9px;
    font-size: 11px;
  }

  .quick-record {
    position: fixed;
    z-index: 55;
    right: 18px;
    bottom: 88px;
    min-height: 48px;
    padding-inline: 18px;
    box-shadow: 0 12px 30px rgba(21, 63, 58, 0.28);
  }

  .mobile-menu {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--paper);
    font-family: var(--serif);
    font-weight: 700;
  }

  .hero-panel {
    min-height: 300px;
    padding: 28px 24px;
  }

  .hero-panel h2 {
    margin-top: 40px;
  }

  .progress-panel {
    padding: 22px;
  }

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

  .section-head .button-row {
    width: 100%;
  }

  .section-head .btn {
    flex: 1 1 auto;
  }

  .task-row {
    grid-template-columns: 38px 38px minmax(0, 1fr);
  }

  .task-evidence {
    display: none;
  }

  .focus-card {
    display: block;
  }

  .record-profile {
    padding: 20px;
    grid-template-columns: 1fr 1fr;
    gap: 14px 0;
  }

  .record-profile-main {
    grid-column: 1 / -1;
    padding-bottom: 12px;
  }

  .record-stat {
    padding-inline: 10px;
  }

  .record-stat:nth-of-type(2) {
    border-left: 0;
  }

  .record-profile .btn {
    width: 100%;
    grid-column: 1 / -1;
  }

  .school-timeline::before {
    left: 16px;
  }

  .school-record {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
  }

  .school-record-date {
    grid-column: 2;
    padding: 0 0 2px;
    display: flex;
    gap: 5px;
    text-align: left;
  }

  .school-record-date span {
    margin: 0;
  }

  .school-record-marker {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 31px;
    height: 31px;
    margin-top: 1px;
  }

  .school-record-card {
    grid-column: 2;
    padding: 16px;
  }

  .school-record-card h3 {
    font-size: 18px;
  }

  .stage-observation {
    margin-left: 0;
    padding: 20px;
  }

  .focus-rule {
    display: block;
  }

  .timeline::before {
    left: 7px;
  }

  .phase-row {
    grid-template-columns: 16px minmax(0, 1fr);
    gap: 10px;
  }

  .phase-date {
    grid-column: 2;
    padding: 0 0 2px;
    text-align: left;
  }

  .phase-dot {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 13px;
    height: 13px;
    margin-top: 4px;
  }

  .phase-card {
    grid-column: 2;
  }

  .phase-toggle {
    padding: 18px;
  }

  .phase-body {
    padding: 0 18px 18px;
  }

  .goal-grid,
  .path-grid,
  .family-grid,
  .role-split {
    grid-template-columns: 1fr;
  }

  .ability-row {
    grid-template-columns: 105px minmax(0, 1fr) 32px;
    gap: 9px;
  }

  .plan-sheet {
    padding: 24px 18px;
  }

  .plan-summary-grid {
    grid-template-columns: 1fr;
  }

  .weekly-table,
  .weekly-table thead,
  .weekly-table tbody,
  .weekly-table tr,
  .weekly-table th,
  .weekly-table td {
    display: block;
  }

  .weekly-table thead {
    display: none;
  }

  .weekly-table tr {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
  }

  .weekly-table td {
    padding: 3px 0;
    border: 0;
  }

  .weekly-table td:first-child {
    width: auto;
  }

  .mobile-nav {
    position: fixed;
    z-index: 50;
    left: 10px;
    right: 10px;
    bottom: 10px;
    min-height: 66px;
    padding: 8px;
    border: 1px solid rgba(21,63,58,.14);
    border-radius: 19px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: rgba(255, 253, 248, 0.94);
    box-shadow: 0 18px 50px rgba(21,63,58,.2);
    backdrop-filter: blur(18px);
  }

  .mobile-nav button {
    min-width: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
  }

  .mobile-nav button span {
    width: 23px;
    height: 23px;
    margin: 0 auto 4px;
    display: grid;
    place-items: center;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-family: var(--serif);
  }

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

@media print {
  body {
    background: white !important;
  }

  .sidebar,
  .topbar,
  .mobile-nav,
  .planner-panel,
  .page-intro,
  .section-head,
  .toast-region {
    display: none !important;
  }

  .app-shell,
  .main-area,
  .planner-layout {
    display: block;
    padding: 0;
  }

  .plan-sheet {
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  @page {
    size: A4;
    margin: 16mm;
  }
}

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