@font-face {
  font-display: swap;
  font-family: "Young Serif";
  font-style: normal;
  font-weight: 400;
  src: url("assets/fonts/young-serif-400.ttf") format("truetype");
}

@font-face {
  font-display: swap;
  font-family: "Lexend";
  font-style: normal;
  font-weight: 400;
  src: url("assets/fonts/lexend-400.ttf") format("truetype");
}

@font-face {
  font-display: swap;
  font-family: "Lexend";
  font-style: normal;
  font-weight: 500 700;
  src: url("assets/fonts/lexend-700.ttf") format("truetype");
}

:root {
  color-scheme: light;
  --bg: #eee9de;
  --surface: #fffefa;
  --surface-soft: #ece8de;
  --green: #78917c;
  --green-dark: #34523e;
  --green-soft: #e2eadf;
  --ink: #29332d;
  --muted: #6d766f;
  --line: #d9d5cb;
  --warning: #8c5e36;
  --error-bg: #f7dfd8;
  --error-text: #7a2d23;
  --shadow: 0 24px 70px rgba(46, 62, 51, 0.1);
  --radius: 8px;
  --rail-width: 136px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body.dyslexia-mode,
body.dyslexia-mode button,
body.dyslexia-mode input,
body.dyslexia-mode select,
body.dyslexia-mode textarea,
body.dyslexia-mode h1,
body.dyslexia-mode h2,
body.dyslexia-mode h3 {
  font-family: "Lexend", ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0;
}

body.dyslexia-mode {
  line-height: 1.65;
}

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

a {
  color: var(--green-dark);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.skip-link {
  background: var(--green-dark);
  color: white;
  left: 1rem;
  padding: 0.6rem 0.8rem;
  position: absolute;
  top: -4rem;
  z-index: 20;
}

.skip-link:focus {
  top: 1rem;
}

.topbar {
  background: rgba(245, 241, 232, 0.92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
}

.nav {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1180px;
  padding: 0.85rem 1rem;
}

.brand {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  font-family: "Young Serif", Georgia, serif;
  font-size: 1.22rem;
  font-weight: 400;
  gap: 0.65rem;
  text-decoration: none;
}

.nav-links {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  font-size: 0.95rem;
}

.nav-toggle {
  display: none;
}

.page-shell {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, var(--rail-width)) minmax(0, 1180px) minmax(0, var(--rail-width));
  justify-content: center;
  padding: 1.25rem 1rem 3rem;
}

.planner-page {
  min-height: calc(100vh - 76px);
  padding-bottom: 1.25rem;
}

.ad-rail {
  min-height: 1px;
}

.content-column {
  min-width: 0;
}

.planner-focus {
  align-items: center;
  display: grid;
  min-height: calc(100vh - 102px);
}

.tool-hero {
  align-items: end;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr auto;
  margin-bottom: 1rem;
  min-height: clamp(180px, 26vh, 260px);
  padding: clamp(1.25rem, 4vw, 2.5rem) 0.25rem 0.75rem;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 0.45rem;
  text-transform: uppercase;
}

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

h1 {
  font-family: "Young Serif", Georgia, serif;
  font-size: clamp(2rem, 5vw, 4.4rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 0.95;
  margin-bottom: 0.75rem;
}

h2 {
  font-family: "Young Serif", Georgia, serif;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.15;
}

h3 {
  font-family: "Young Serif", Georgia, serif;
  font-size: 1.05rem;
  font-weight: 400;
}

.hero-copy p:last-child {
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.16rem);
  max-width: 680px;
}

.hero-status {
  background: var(--green-soft);
  border: 1px solid rgba(56, 87, 67, 0.2);
  border-radius: var(--radius);
  color: var(--green-dark);
  font-weight: 750;
  padding: 0.7rem 0.85rem;
}

.planner-layout {
  align-items: start;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 680px);
  justify-content: center;
  margin: 0 auto;
  width: 100%;
}

.planner-layout > * {
  min-width: 0;
}

.accessibility-tools {
  display: flex;
  justify-content: flex-end;
  margin: 0 auto -0.3rem;
  max-width: 640px;
  width: 100%;
}

.reading-toggle {
  align-items: center;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 700;
  gap: 0.5rem;
}

.type-symbol {
  color: var(--green-dark);
  font-family: "Lexend", sans-serif;
  font-weight: 700;
}

.reading-toggle input {
  height: 1px;
  margin: -1px;
  min-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

.toggle-track {
  background: #d5d1c8;
  border-radius: 999px;
  display: inline-flex;
  height: 1.35rem;
  padding: 0.15rem;
  transition: background 180ms ease;
  width: 2.35rem;
}

.toggle-track span {
  background: white;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(41, 51, 45, 0.2);
  display: block;
  height: 1.05rem;
  transform: translateX(0);
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
  width: 1.05rem;
}

.reading-toggle input:checked + .toggle-track {
  background: var(--green-dark);
}

.reading-toggle input:checked + .toggle-track span {
  transform: translateX(1rem);
}

.reading-toggle input:focus-visible + .toggle-track {
  outline: 3px solid rgba(111, 139, 115, 0.3);
  outline-offset: 2px;
}

.planner-form,
.planner-output,
.loading-card,
.content-band,
.article-page {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.planner-form {
  padding: clamp(1.35rem, 4vw, 2.5rem);
}

.planner-card {
  background: white;
  max-width: 640px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.planner-card::before,
.export-card::before,
.loading-card::before {
  background: var(--green-dark);
  content: "";
  height: 4px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.planner-card h1 {
  font-size: clamp(1.7rem, 4vw, 2.45rem);
  line-height: 1.08;
  margin-bottom: 1.5rem;
  max-width: 520px;
}

.planner-subtitle {
  color: var(--muted);
  margin-bottom: 1rem;
}

.form-status {
  background: var(--green-soft);
  border: 1px solid rgba(56, 87, 67, 0.18);
  border-radius: 999px;
  color: var(--green-dark);
  display: inline-flex;
  font-size: 0.86rem;
  font-weight: 800;
  margin-bottom: 1.2rem;
  padding: 0.35rem 0.7rem;
}

.wizard-progress {
  background: #eee6d8;
  border-radius: 999px;
  flex: 1;
  height: 0.4rem;
  overflow: hidden;
}

.progress-row {
  align-items: center;
  display: flex;
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.progress-count {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  min-width: 2.4rem;
  text-align: right;
}

.progress-bar {
  background: var(--green-dark);
  border-radius: inherit;
  display: block;
  height: 100%;
  transition: width 260ms ease;
  width: 20%;
}

.form-section {
  border-bottom: 0;
  display: grid;
  gap: 0.9rem;
  align-content: start;
  min-height: 270px;
  padding: 0.25rem 0 1rem;
}

.wizard-step.is-active {
  animation: stepIn 260ms ease both;
}

.form-section:first-child {
  padding-top: 0;
}

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

.section-heading h2,
.output-header h2 {
  margin-bottom: 0.75rem;
}

.section-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 0.75rem;
}

.section-heading h2 {
  align-self: center;
  margin: 0;
}

.section-heading p {
  grid-column: 2;
  margin: 0.45rem 0 0;
}

.question-symbol {
  align-items: center;
  animation: symbolIn 380ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
  background: var(--green-soft);
  border-radius: 50%;
  color: var(--green-dark);
  display: inline-flex;
  font-family: Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
  height: 2.5rem;
  justify-content: center;
  width: 2.5rem;
}

.step-kicker {
  color: var(--green-dark);
  font-size: 0.8rem;
  font-weight: 850;
  letter-spacing: 0;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
}

.section-heading p,
.hint,
.notice,
.empty-state p,
.content-band p,
.article-page p,
.feature-grid p {
  color: var(--muted);
}

label,
fieldset {
  display: grid;
  gap: 0.35rem;
}

.answer-field {
  max-width: 390px;
}

.range-field {
  gap: 0.75rem;
  padding: 0.35rem 0;
}

.range-field > span {
  align-items: baseline;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
}

.range-field output {
  background: var(--green-soft);
  border-radius: 999px;
  color: var(--green-dark);
  font-size: 0.82rem;
  font-weight: 800;
  min-width: 4.5rem;
  padding: 0.25rem 0.55rem;
  text-align: center;
}

label,
legend {
  color: var(--ink);
  font-weight: 700;
}

input,
select,
textarea {
  background: #fbfaf6;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  min-height: 3rem;
  padding: 0.72rem 0.8rem;
  width: 100%;
}

input[type="range"] {
  appearance: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  min-height: 2rem;
  padding: 0;
}

input[type="range"]::-webkit-slider-runnable-track {
  background: #e6e1d7;
  border-radius: 999px;
  height: 0.5rem;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  background: var(--green-dark);
  border: 4px solid white;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(52, 82, 62, 0.28);
  height: 1.45rem;
  margin-top: -0.47rem;
  transition: transform 150ms ease;
  width: 1.45rem;
}

input[type="range"]::-moz-range-track {
  background: #e6e1d7;
  border-radius: 999px;
  height: 0.5rem;
}

input[type="range"]::-moz-range-thumb {
  background: var(--green-dark);
  border: 4px solid white;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(52, 82, 62, 0.28);
  height: 1rem;
  width: 1rem;
}

input[type="range"]:active::-webkit-slider-thumb {
  transform: scale(1.16);
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  outline: 3px solid rgba(111, 139, 115, 0.3);
  outline-offset: 2px;
}

.field-grid {
  display: grid;
  gap: 0.8rem;
}

.field-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.subjects-list {
  display: grid;
  gap: 0.75rem;
}

.subject-card {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 0.65rem;
  padding: 0 0 0.85rem;
}

.subject-card:last-child {
  border-bottom: 0;
}

.subject-card-header {
  align-items: center;
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
}

.subject-card-header strong {
  font-size: 0.95rem;
}

.subject-fields {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: minmax(150px, 1fr) minmax(110px, 0.45fr);
}

.subject-fields .range-field {
  align-self: end;
}

.add-subject-action {
  justify-self: start;
}

.icon-button {
  align-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--green-dark);
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  height: 2rem;
  justify-content: center;
  width: 2rem;
}

.rest-days,
.mode-grid {
  border: 0;
  margin: 0;
  padding: 0;
}

.rest-days {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.rest-days legend {
  grid-column: 1 / -1;
}

.rest-days label,
.mode-grid label,
.checkbox-line {
  align-items: center;
  color: var(--ink);
  display: flex;
  font-weight: 650;
  gap: 0.45rem;
}

.rest-days label {
  background: #f7f5ef;
  border: 1px solid var(--line);
  border-radius: 6px;
  justify-content: center;
  min-height: 3rem;
  padding: 0.55rem 0.35rem;
}

.rest-days label:has(input:checked) {
  background: var(--green-soft);
  border-color: var(--green);
  color: var(--green-dark);
}

.rest-days input,
.mode-grid input,
.checkbox-line input {
  min-height: auto;
  width: auto;
}

.mode-grid {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.notice {
  background: var(--green-soft);
  border: 1px solid rgba(56, 87, 67, 0.18);
  border-radius: var(--radius);
  font-size: 0.9rem;
  padding: 0.8rem;
}

.form-actions,
.output-actions,
.wizard-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.wizard-controls {
  border-top: 1px solid var(--line);
  justify-content: flex-end;
  padding-top: 1rem;
}

.wizard-controls .secondary-action:first-child {
  margin-right: auto;
}

button {
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
  min-height: 2.8rem;
  padding: 0.68rem 1rem;
  transform: translateY(0);
  transition: background 160ms ease, box-shadow 160ms ease, transform 120ms ease;
  user-select: none;
}

button:hover,
.inline-link:hover {
  box-shadow: 0 10px 20px rgba(56, 87, 67, 0.12);
  transform: translateY(-1px);
}

button:active,
.inline-link:active {
  transform: translateY(1px) scale(0.98);
}

.button-pop {
  animation: buttonPop 220ms ease;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.primary-action {
  background: var(--green-dark);
  color: white;
}

.inline-link {
  align-items: center;
  border-radius: 6px;
  display: inline-flex;
  font-weight: 800;
  min-height: 2.65rem;
  padding: 0.65rem 0.9rem;
  text-decoration: none;
  transition: box-shadow 160ms ease, transform 120ms ease;
}

.secondary-action {
  background: var(--surface-soft);
  color: var(--green-dark);
}

.text-action {
  background: transparent;
  color: var(--green-dark);
  font-size: 0.9rem;
  margin-top: 0.4rem;
  min-height: auto;
  padding: 0.45rem;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

.form-error {
  background: var(--error-bg);
  border-radius: var(--radius);
  color: var(--error-text);
  display: none;
  font-weight: 700;
  padding: 0.8rem;
}

.form-error.is-visible {
  display: block;
}

.planner-output {
  background: white;
  min-height: 0;
  padding: clamp(2rem, 6vw, 3.5rem);
}

.loading-card {
  background: white;
  max-width: 640px;
  overflow: hidden;
  padding: clamp(2.5rem, 8vw, 4rem);
  position: relative;
  text-align: center;
  width: 100%;
}

.loading-card h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 0.45rem;
}

.loading-card p {
  color: var(--green-dark);
  font-weight: 750;
  margin-bottom: 1.5rem;
  min-height: 1.5em;
}

.loading-card small {
  color: var(--muted);
  display: block;
  margin-top: 0.8rem;
}

.loader-symbols {
  height: 4.5rem;
  margin: 0 auto 1.1rem;
  position: relative;
  width: 4.5rem;
}

.loader-symbols span {
  align-items: center;
  background: var(--green-soft);
  border-radius: 50%;
  color: var(--green-dark);
  display: flex;
  font-weight: 900;
  height: 2rem;
  justify-content: center;
  position: absolute;
  width: 2rem;
}

.loader-symbols span:nth-child(1) {
  animation: floatOne 1.4s ease-in-out infinite;
  left: 0;
  top: 1.25rem;
}

.loader-symbols span:nth-child(2) {
  animation: floatTwo 1.2s ease-in-out infinite;
  right: 0;
  top: 0;
}

.loader-symbols span:nth-child(3) {
  animation: floatOne 1.6s ease-in-out infinite reverse;
  bottom: 0;
  right: 0.65rem;
}

.loading-progress {
  background: #e9e4da;
  border-radius: 999px;
  height: 0.45rem;
  margin: 0 auto;
  max-width: 360px;
  overflow: hidden;
}

.loading-progress span {
  background: var(--green-dark);
  border-radius: inherit;
  display: block;
  height: 100%;
  transition: width 220ms ease;
  width: 4%;
}

.export-card {
  animation: finishIn 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  margin: 0 auto;
  max-width: 640px;
  overflow: hidden;
  position: relative;
  text-align: center;
}

.export-card h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 0.5rem;
}

.export-card > p {
  color: var(--muted);
  margin: 0 auto;
  max-width: 390px;
}

.completion-mark {
  align-items: center;
  background: var(--green-soft);
  border-radius: 50%;
  color: var(--green-dark);
  display: inline-flex;
  font-size: 1.3rem;
  font-weight: 900;
  height: 3rem;
  justify-content: center;
  margin-bottom: 1rem;
  width: 3rem;
}

.export-card .output-actions {
  justify-content: center;
  margin: 1.5rem 0 1rem;
}

.recurring-line {
  color: var(--muted);
  font-size: 0.9rem;
  justify-content: center;
}

.print-plan {
  display: none;
}

.output-header {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding-bottom: 1rem;
}

.empty-state {
  align-content: center;
  display: grid;
  min-height: 420px;
  padding: 2rem;
  text-align: center;
}

.summary-panel {
  background: #faf7ef;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 1rem 0;
  padding: 0.85rem;
}

.summary-item span {
  color: var(--muted);
  display: block;
  font-size: 0.84rem;
}

.summary-item strong {
  display: block;
  font-size: 1rem;
}

.weekly-table {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: auto;
}

.weekly-table table {
  border-collapse: collapse;
  min-width: 680px;
  width: 100%;
}

.weekly-table th,
.weekly-table td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 0.65rem;
  text-align: left;
  vertical-align: top;
}

.weekly-table th:last-child,
.weekly-table td:last-child {
  border-right: 0;
}

.weekly-table tr:last-child td {
  border-bottom: 0;
}

.day-group {
  border-top: 1px solid var(--line);
  padding: 1rem 0;
}

.day-group:first-child {
  border-top: 0;
}

.day-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.7rem;
}

.day-heading h3 {
  margin: 0;
}

.day-tag {
  background: var(--green-soft);
  border-radius: 999px;
  color: var(--green-dark);
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.25rem 0.55rem;
}

.session-card {
  background: #faf7ef;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
  padding: 0.75rem;
}

.session-card.is-catchup {
  background: #f2eadb;
}

.session-edit-grid {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: 120px 120px minmax(140px, 1fr) 120px auto;
}

.session-edit-grid label {
  font-size: 0.86rem;
}

.session-note {
  grid-column: 1 / -1;
}

.content-band,
.article-page {
  margin-top: 1rem;
  padding: clamp(1.2rem, 3vw, 2rem);
}

.feature-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.25rem;
}

.feature-grid article {
  border-top: 3px solid var(--green);
  padding-top: 0.8rem;
}

.site-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1.5rem max(1rem, calc((100vw - 1180px) / 2));
}

.quiet-footer {
  border-top: 0;
  justify-content: center;
  min-height: 76px;
  padding-bottom: 1rem;
  padding-top: 1rem;
}

.quiet-footer nav {
  justify-content: center;
}

.quiet-footer a,
.guide-links summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
}

.guide-links {
  position: relative;
}

.guide-links div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  bottom: calc(100% + 0.6rem);
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.55rem;
  left: 50%;
  min-width: 170px;
  padding: 0.8rem;
  position: absolute;
  transform: translateX(-50%);
}

.site-footer div,
.site-footer nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.site-footer span {
  color: var(--muted);
}

.article-page {
  margin-left: auto;
  margin-right: auto;
  max-width: 900px;
}

.blog-post {
  background: var(--surface);
  box-shadow: none;
}

.blog-meta {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.article-page ul {
  color: var(--muted);
  padding-left: 1.3rem;
}

.article-page li + li {
  margin-top: 0.4rem;
}

.article-intro {
  color: var(--muted);
  font-size: 1.12rem;
  max-width: 680px;
}

.guide-grid {
  display: grid;
  gap: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 2.25rem 0;
}

.guide-card {
  border-top: 1px solid var(--line);
  color: var(--ink);
  display: block;
  min-height: 190px;
  padding: 1.4rem 1.25rem 1.4rem 0;
  text-decoration: none;
  transition: background-color 180ms ease, transform 180ms ease;
}

.guide-card:nth-child(even) {
  border-left: 1px solid var(--line);
  padding-left: 1.25rem;
}

.guide-card:hover,
.guide-card:focus-visible {
  background: var(--green-soft);
  transform: translateY(-2px);
}

.guide-card > span {
  color: var(--green-dark);
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.55rem;
  text-transform: uppercase;
}

.guide-card h2 {
  font-size: 1.35rem;
  margin-bottom: 0.55rem;
}

.guide-card p {
  color: var(--muted);
  margin: 0;
}

.article-cta {
  border-block: 1px solid var(--line);
  margin-top: 2.5rem;
  padding: 2rem 0;
}

.article-callout {
  background: var(--green-soft);
  border-left: 3px solid var(--green-dark);
  margin: 1.75rem 0;
  padding: 1rem 1.1rem;
}

.article-callout p:last-child {
  margin-bottom: 0;
}

.article-page .related-guides {
  border-top: 1px solid var(--line);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
}

.related-guides a + a::before {
  color: var(--muted);
  content: " / ";
  text-decoration: none;
}

.visually-hidden {
  clip: rect(0 0 0 0);
  border: 0;
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

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

  .ad-rail {
    display: none;
  }

  .planner-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .guide-grid {
    grid-template-columns: 1fr;
  }

  .guide-card:nth-child(even) {
    border-left: 0;
    padding-left: 0;
  }
  .planner-page {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .accessibility-tools {
    justify-content: center;
  }

  .planner-card h1 {
    font-size: 1.85rem;
  }

  .section-heading {
    column-gap: 0.6rem;
  }

  .question-symbol {
    height: 2.15rem;
    width: 2.15rem;
  }

  .nav {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .nav-toggle {
    background: var(--surface-soft);
    color: var(--green-dark);
    display: inline-flex;
    justify-content: center;
    width: auto;
  }

  .nav-links {
    display: none;
    flex-basis: 100%;
    gap: 0.7rem;
  }

  .nav-links.is-open {
    display: flex;
  }

  .tool-hero,
  .output-header,
  .site-footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-status {
    width: fit-content;
  }

  .field-grid.two,
  .subject-fields,
  .mode-grid,
  .summary-panel,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .rest-days {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .output-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .session-edit-grid {
    grid-template-columns: 1fr 1fr;
  }

  .session-edit-grid label:nth-child(3),
  .session-note {
    grid-column: 1 / -1;
  }
}

@keyframes stepIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes buttonPop {
  0% {
    transform: scale(1);
  }

  45% {
    transform: scale(0.97);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes finishIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes symbolIn {
  from {
    opacity: 0;
    transform: rotate(-18deg) scale(0.72);
  }

  to {
    opacity: 1;
    transform: rotate(0) scale(1);
  }
}

@keyframes floatOne {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }

  50% {
    transform: translateY(-6px) rotate(10deg);
  }
}

@keyframes floatTwo {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }

  50% {
    transform: translateY(5px) rotate(-12deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .topbar,
  .planner-form,
  .loading-card,
  .accessibility-tools,
  .output-actions,
  .export-card,
  .empty-state,
  .content-band,
  .site-footer,
  .ad-rail,
  .skip-link,
  .hero-status {
    display: none !important;
  }

  body {
    background: white;
    color: #111;
  }

  .page-shell {
    display: block;
    padding: 0;
  }

  .tool-hero {
    display: block;
    min-height: auto;
    padding: 0 0 1rem;
  }

  .planner-output {
    border: 0;
    box-shadow: none;
    min-height: 0;
    padding: 0;
  }

  .print-plan {
    display: block;
  }

  .output-header {
    border-bottom: 2px solid #111;
  }

  .summary-panel,
  .weekly-table,
  .session-card {
    break-inside: avoid;
  }

  .session-edit-grid {
    display: block;
  }

  input,
  select,
  textarea {
    border: 0;
    padding: 0;
  }
}
