.study-page {
  background: linear-gradient(var(--surface) 0 19rem, var(--paper) 19rem);
  padding-bottom: clamp(3rem, 7vw, 6rem);
}

.study-intro {
  padding: 1.5rem 0 clamp(2rem, 5vw, 3.8rem);
}

.study-intro h1 {
  font-size: clamp(2.85rem, 2rem + 4.3vw, 6rem);
  max-width: 20ch;
  margin-block: .9rem .7rem;
}

.study-intro > p {
  max-width: 56ch;
  color: var(--muted);
  font-size: var(--lead);
}

.study-layout {
  display: grid;
  grid-template-columns: minmax(15rem, 1fr) minmax(0, 2.3fr);
  align-items: start;
  gap: clamp(1rem, 3.6vw, 3rem);
}

.study-card {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--light);
  padding: clamp(1.1rem, 3vw, 2.25rem);
}

.study-card h2 {
  margin-bottom: .8rem;
  font-family: "Barlow Condensed", Barlow, Arial, sans-serif;
  font-size: clamp(1.75rem, 1.3rem + 1vw, 2.5rem);
  letter-spacing: -.025em;
}

.study-schedule {
  border-top: .3rem solid var(--accent);
  background: var(--deep);
  color: var(--light);
  padding: clamp(1.1rem, 2vw, 1.5rem);
}

.study-settings {
  display: grid;
  gap: .8rem;
  margin-bottom: 1.15rem;
}

.study-settings label {
  display: block;
  margin-bottom: .2rem;
  font-weight: 600;
}

.study-settings label span {
  font-size: .875rem;
  font-weight: 400;
}

.study-settings input, .study-settings select {
  width: 100%;
  min-height: 2.65rem;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--light);
  color: var(--ink);
  padding: .35rem .55rem;
}

.study-schedule :focus-visible {
  outline-color: var(--accent);
}

.study-date-note:not(:empty) {
  margin-top: .65rem;
  color: var(--accent);
}

.study-progress {
  display: grid;
  justify-items: start;
  gap: .7rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #64747a;
}

.study-progress [role="status"] {
  font-weight: 600;
}

.study-storage, .study-score-note {
  font-size: .875rem;
}

.study-storage {
  color: #d2d9d9;
}

.study-phases, .study-tasks, .study-topics {
  list-style: none;
  margin: 0;
  padding: 0;
}

.study-phases {
  display: grid;
  gap: 1rem;
  counter-reset: study-phase;
}

.study-phases > li {
  counter-increment: study-phase;
}

.study-phases > li > h2::before {
  content: counter(study-phase, decimal-leading-zero);
  display: inline-block;
  margin-inline-end: .55rem;
  border-bottom: .22rem solid var(--accent);
  padding: .1rem .2rem;
  font-family: Barlow, Arial, sans-serif;
  font-size: .65em;
  letter-spacing: 0;
  vertical-align: .12em;
}

.study-tasks {
  margin-block: .75rem;
  display: grid;
  gap: .4rem;
}

.study-task label {
  display: flex;
  gap: .65rem;
  align-items: baseline;
}

.study-task input {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--deep);
  transform: translateY(.15em);
}

.study-task input:not(:disabled) {
  cursor: pointer;
}

.study-topics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem;
  margin-block: .9rem .65rem;
}

.study-topic {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: .8rem;
  min-width: 0;
}

.study-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .15rem;
  margin-top: .45rem;
}

.study-practice-link {
  font-weight: 600;
}

.study-topic-score, .study-score-note {
  color: var(--muted);
}

.study-topic-score {
  margin-top: .25rem;
  font-size: .9rem;
}

.study-checklist-group h3 {
  margin-top: .85rem;
}

@media (max-width: 48rem) {
  .study-layout { grid-template-columns: 1fr; }
  .study-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 26rem) {
  .study-topics, .study-settings { grid-template-columns: 1fr; }
}

.study-print-date { display: none; }

@media print {
  .site-header, .site-footer, .breadcrumb, .skip-link, [data-study-print],
  .study-settings, .study-storage { display: none !important; }
  .study-page, .study-card, .study-topic, .study-schedule {
    background: white;
    color: black;
  }
  .study-page { padding: 0; }
  .study-intro { padding: 0 0 1rem; }
  .study-intro h1 { font-size: 26pt; }
  .study-layout { display: block; }
  .study-schedule { margin-bottom: .6rem; }
  .study-card { padding: .6rem; }
  .study-card h2 { font-size: 16pt; break-after: avoid; }
  .study-date-note { display: none; }
  .study-print-date { display: block; margin-top: .4rem; }
  .study-progress { border: 0; padding: 0; margin-top: .4rem; }
  .study-task, .study-topic { break-inside: avoid; }
}
