:root {
  --paper: #ebe5dc;
  --paper-soft: #f3eee6;
  --ink: #12110f;
  --muted: #716b62;
  --line: rgba(24, 22, 19, .16);
  --amber: #c9914d;
  --cool: #65717a;
  --dark: #12100e;
  --cream: #efe7db;
  --content: 1320px;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .048;
  background-image: radial-gradient(circle, var(--ink) .7px, transparent .8px);
  background-size: 22px 22px;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
.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;
  color: var(--amber);
  font: 700 .72rem/1.4 Consolas, "SFMono-Regular", monospace;
  text-transform: uppercase;
}

.study-topbar,
.study-hero,
.study-status-rail,
.study-nav,
.section-inner,
footer {
  width: min(var(--content), calc(100% - 72px));
  margin-inline: auto;
}
.study-topbar {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: .7rem;
}
.study-brand {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 800;
}

.study-hero {
  min-height: 590px;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, .55fr);
  gap: 64px;
  align-items: end;
  padding: 92px 0 72px;
}
.study-hero-copy { padding-bottom: 16px; }
.study-hero h1,
.section-heading h2 {
  margin: 18px 0 28px;
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-size: 7rem;
  font-weight: 500;
  line-height: .98;
  letter-spacing: 0;
}
.hero-note,
.section-summary {
  max-width: 46rem;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
}
.countdown-panel {
  min-height: 330px;
  display: grid;
  align-content: space-between;
  padding: 24px 0 16px 36px;
  border-left: 1px solid var(--line);
}
.countdown-panel > span {
  color: var(--muted);
  font-size: .78rem;
}
.countdown-panel strong {
  display: block;
  color: var(--ink);
  font: 500 8rem/.78 Georgia, serif;
}
.countdown-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.study-status-rail {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr .7fr;
  background: var(--dark);
  color: var(--cream);
}
.study-status-rail > div {
  min-height: 98px;
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 20px 28px;
  border-right: 1px solid rgba(239, 231, 219, .16);
}
.study-status-rail > div:last-child { border-right: 0; }
.study-status-rail small {
  color: var(--amber);
  font: 700 .65rem/1 Consolas, monospace;
}
.study-status-rail span,
.study-status-rail time {
  font-size: .86rem;
  line-height: 1.5;
}
.study-nav {
  display: flex;
  align-items: center;
  gap: 38px;
  min-height: 68px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: .76rem;
  scrollbar-width: none;
}
.study-nav::-webkit-scrollbar { display: none; }
.study-nav a { flex: 0 0 auto; }
.study-nav a:hover { color: var(--ink); }

.study-band { width: 100%; }
.section-inner { padding: 108px 0; }
.section-heading h2 {
  max-width: 960px;
  margin-top: 16px;
  font-size: 4.8rem;
  line-height: 1.04;
}
.today-layout {
  display: grid;
  grid-template-columns: minmax(260px, .62fr) minmax(0, 1.38fr);
  gap: 88px;
}
.section-heading blockquote {
  margin: 48px 0 0;
  padding: 22px 0 0 24px;
  border-left: 2px solid var(--amber);
  color: var(--muted);
  font: 400 1rem/1.9 Georgia, "Songti SC", serif;
}
.today-task-list {
  border-top: 1px solid var(--line);
}
.study-task {
  position: relative;
  display: grid;
  grid-template-columns: 86px 74px minmax(0, 1fr) 96px;
  gap: 18px;
  align-items: start;
  min-height: 124px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
.study-task::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: transparent;
}
.study-task.is-in_progress::before { background: var(--amber); }
.study-task.is-completed { color: var(--cool); }
.study-task time,
.study-task-subject,
.study-task-status {
  font: 700 .68rem/1.4 Consolas, monospace;
  text-transform: uppercase;
}
.study-task-subject { color: var(--amber); }
.study-task h3 {
  margin: -4px 0 8px;
  font: 500 1.45rem/1.35 Georgia, "Songti SC", serif;
}
.study-task p {
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.7;
}
.study-task-status { justify-self: end; color: var(--muted); text-align: right; }
.empty-state,
.section-error {
  min-height: 150px;
  display: grid;
  align-content: center;
  gap: 14px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.retry-button {
  width: max-content;
  padding: 9px 14px;
  border: 1px solid currentColor;
  border-radius: 2px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.overview-band { background: var(--dark); color: var(--cream); }
.overview-band .eyebrow { color: var(--amber); }
.overview-band .section-summary { color: rgba(239, 231, 219, .62); }
.overview-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 60px;
  align-items: end;
}
.overview-heading h2 { grid-column: 1; }
.overview-heading .section-summary {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: end;
  padding-bottom: 34px;
}
.overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr);
  gap: 72px;
  margin-top: 68px;
  padding-top: 26px;
  border-top: 1px solid rgba(239, 231, 219, .16);
}
.overview-layout h3 {
  margin: 0 0 30px;
  color: rgba(239, 231, 219, .62);
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
}
.focus-trend {
  height: 270px;
  display: grid;
  grid-template-columns: repeat(var(--days, 31), minmax(5px, 1fr));
  gap: 5px;
  align-items: end;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(239, 231, 219, .2);
}
.focus-bar {
  position: relative;
  min-height: 3px;
  height: var(--height);
  background: var(--amber);
  transform-origin: bottom;
  animation: focus-rise .55s ease both;
}
.focus-bar::after {
  content: attr(data-day);
  position: absolute;
  left: 50%;
  bottom: -25px;
  translate: -50% 0;
  color: rgba(239, 231, 219, .42);
  font-size: .56rem;
}
.focus-bar:not([data-label])::after { content: ""; }
.subject-breakdown { display: grid; gap: 28px; }
.subject-row { display: grid; gap: 10px; }
.subject-row-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: .8rem;
}
.subject-row-header span:last-child { color: rgba(239, 231, 219, .58); }
.subject-track { height: 3px; background: rgba(239, 231, 219, .14); }
.subject-fill { width: var(--width); height: 100%; background: var(--amber); }

.recent-band { background: var(--paper-soft); }
.recent-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  align-items: end;
}
.recent-heading h2 { grid-column: 1; }
.recent-heading .section-summary {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: end;
  padding-bottom: 30px;
}
.recent-heatmap {
  display: grid;
  grid-template-columns: repeat(30, minmax(10px, 1fr));
  gap: 7px;
  margin: 70px 0 60px;
}
.heat-cell {
  aspect-ratio: 1;
  min-height: 14px;
  border: 1px solid var(--line);
  background: rgba(113, 107, 98, .05);
}
.heat-cell[data-level="1"] { background: rgba(201, 145, 77, .25); }
.heat-cell[data-level="2"] { background: rgba(201, 145, 77, .48); }
.heat-cell[data-level="3"] { background: rgba(201, 145, 77, .72); }
.heat-cell[data-level="4"] { background: var(--amber); }
.recent-day-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.recent-day {
  display: grid;
  grid-template-columns: 130px 150px minmax(0, 1fr);
  gap: 34px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
.recent-day time { font: 700 .72rem/1.5 Consolas, monospace; }
.recent-day-metric { color: var(--amber); font-size: .78rem; }
.recent-day h3 { margin: 0 0 8px; font: 500 1.05rem/1.5 Georgia, "Songti SC", serif; }
.recent-day p { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.7; }

.exam-band { background: var(--paper); }
.exam-layout {
  display: grid;
  grid-template-columns: minmax(260px, .62fr) minmax(0, 1.38fr);
  gap: 88px;
}
.exam-timeline { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.exam-event {
  position: relative;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 110px;
  gap: 28px;
  padding: 28px 0 28px 22px;
  border-bottom: 1px solid var(--line);
}
.exam-event::before {
  content: "";
  position: absolute;
  left: -3px;
  top: 34px;
  width: 7px;
  height: 7px;
  background: var(--amber);
}
.exam-event time { font: 700 .72rem/1.5 Consolas, monospace; }
.exam-event h3 { margin: -3px 0 8px; font: 500 1.3rem/1.4 Georgia, "Songti SC", serif; }
.exam-event p { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.7; }
.exam-status { justify-self: end; color: var(--muted); font-size: .68rem; text-transform: uppercase; }

footer {
  min-height: 108px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  font-size: .68rem;
  border-top: 1px solid var(--line);
}

@keyframes focus-rise {
  from { transform: scaleY(0); opacity: .2; }
  to { transform: scaleY(1); opacity: 1; }
}

@media (max-width: 900px) {
  .study-topbar,
  .study-hero,
  .study-status-rail,
  .study-nav,
  .section-inner,
  footer { width: min(100% - 40px, 760px); }
  .study-hero {
    min-height: 620px;
    grid-template-columns: 1fr;
    gap: 54px;
    align-content: end;
  }
  .study-hero h1 { font-size: 5rem; }
  .countdown-panel {
    min-height: 180px;
    grid-template-columns: 1fr auto;
    align-items: end;
    padding: 24px 0 16px 28px;
  }
  .countdown-panel strong { grid-row: 1 / span 2; grid-column: 2; font-size: 6.5rem; }
  .study-status-rail { grid-template-columns: 1fr 1fr; }
  .study-status-rail > div:nth-child(2) { border-right: 0; }
  .study-status-rail > div:last-child { grid-column: 1 / -1; border-top: 1px solid rgba(239, 231, 219, .16); }
  .section-inner { padding: 84px 0; }
  .section-heading h2 { font-size: 3.8rem; }
  .today-layout,
  .exam-layout { grid-template-columns: 1fr; gap: 58px; }
  .overview-heading,
  .recent-heading { grid-template-columns: 1fr; gap: 12px; }
  .overview-heading h2,
  .recent-heading h2,
  .overview-heading .section-summary,
  .recent-heading .section-summary { grid-column: 1; grid-row: auto; padding-bottom: 0; }
  .overview-layout { grid-template-columns: 1fr; }
  .recent-heatmap { grid-template-columns: repeat(15, minmax(12px, 1fr)); }
}

@media (max-width: 560px) {
  .study-topbar,
  .study-hero,
  .study-status-rail,
  .study-nav,
  .section-inner,
  footer { width: calc(100% - 28px); }
  .study-topbar { min-height: 62px; gap: 16px; }
  .study-topbar > span { max-width: 180px; text-align: right; font-size: .58rem; line-height: 1.5; }
  .study-hero { min-height: 520px; padding: 72px 0 54px; }
  .study-hero h1 { font-size: 3.35rem; line-height: 1.03; }
  .hero-note { font-size: .9rem; }
  .countdown-panel { min-height: 148px; padding-left: 20px; }
  .countdown-panel strong { font-size: 4.7rem; }
  .countdown-panel p { max-width: 150px; font-size: .76rem; }
  .study-status-rail { grid-template-columns: 1fr; }
  .study-status-rail > div,
  .study-status-rail > div:nth-child(2) { min-height: 82px; border-right: 0; border-bottom: 1px solid rgba(239, 231, 219, .16); }
  .study-status-rail > div:last-child { grid-column: auto; border-top: 0; border-bottom: 0; }
  .study-nav { gap: 26px; min-height: 58px; }
  .section-inner { padding: 68px 0; }
  .section-heading h2 { font-size: 2.85rem; line-height: 1.08; }
  .section-heading blockquote { margin-top: 34px; }
  .study-task {
    grid-template-columns: 68px minmax(0, 1fr) 72px;
    gap: 12px;
    min-height: 118px;
  }
  .study-task-subject { grid-column: 1; grid-row: 2; }
  .study-task > div { grid-column: 2; grid-row: 1 / span 2; }
  .study-task-status { grid-column: 3; grid-row: 1 / span 2; }
  .study-task h3 { font-size: 1.15rem; }
  .overview-layout { gap: 56px; margin-top: 48px; }
  .focus-trend { height: 220px; gap: 3px; overflow: hidden; }
  .focus-bar::after { display: none; }
  .recent-heatmap { grid-template-columns: repeat(10, minmax(12px, 1fr)); gap: 6px; margin: 48px 0; }
  .recent-day { grid-template-columns: 1fr 1fr; gap: 10px 18px; }
  .recent-day > div:last-child { grid-column: 1 / -1; }
  .exam-event { grid-template-columns: 104px minmax(0, 1fr); gap: 16px; padding-left: 16px; }
  .exam-status { grid-column: 2; justify-self: start; }
  footer { min-height: 96px; align-items: flex-start; flex-direction: column; justify-content: center; gap: 8px; }
}

@media (max-width: 340px) {
  .study-hero h1 { font-size: 2.8rem; }
  .section-heading h2 { font-size: 2.45rem; }
  .countdown-panel strong { font-size: 4rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
