/* Today follows the approved warm, quiet mobile layout. */
body.is-today {
  --paper: #fcfaf6;
  --white: #fffdf9;
  --cream: #f4eedf;
  --surface-soft: #f1eee8;
  --line: #e8e4dc;
  --line-strong: #b9bdc8;
  --muted: #656d82;
  --ink: #242b47;
  --ink-soft: #4e5976;
  background: var(--paper);
}

.is-today .workspace { background: var(--paper); }
.is-today .sidebar { background: var(--paper); border-right-color: var(--line); }
.is-today .sidebar-caption { letter-spacing: 1.1px; }
.is-today .sidebar .nav-item.active { background: var(--cream); }
.is-today .workspace main {
  max-width: 780px;
  padding: 25px 30px 56px;
}
.is-today .workspace main > * { animation: none; }
.is-today .page-footer { display: none; }

.is-today .home-topbar {
  width: 100%;
  max-width: 780px;
  min-height: 116px;
  margin: 0 auto;
  padding: 28px 30px 17px;
  gap: 20px;
  border: 0;
  background: transparent;
}
.home-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--ink);
  font-size: 29px;
  font-weight: 800;
  letter-spacing: -1.3px;
  line-height: 1;
}
.home-brand img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  mix-blend-mode: multiply;
  filter: brightness(1.15) contrast(1.1);
}
.home-streak {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 16px;
  font-weight: 650;
  line-height: 1.4;
  white-space: nowrap;
}
.home-streak .icon { width: 26px; height: 26px; color: var(--ink); stroke-width: 1.65; }
.home-streak strong { font-weight: 650; }

.today-home { min-width: 0; }
.home-greeting { margin-bottom: 27px; }
.home-greeting h1 {
  color: var(--ink);
  max-width: 100%;
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -1.8px;
  line-height: 1.13;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.home-greeting p {
  margin-top: 9px;
  color: var(--muted);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.home-search {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 62px;
  margin: 0 0 20px;
  padding: 5px 9px 5px 21px;
  gap: 13px;
  border: 1px solid transparent;
  border-radius: 19px;
  background: var(--surface-soft);
  color: var(--muted);
  transition: border-color .18s ease, background .18s ease;
}
.home-search:focus-within { background: var(--white); border-color: #8d95aa; }
.home-search > .icon { width: 24px; height: 24px; stroke-width: 1.6; }
.home-search input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  min-height: 44px;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.4;
}
.home-search input::placeholder { opacity: 1; color: var(--muted); }
.home-search-submit {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  min-height: 44px;
  padding: 10px;
  border-radius: 12px;
  color: var(--muted);
  transition: background .18s ease, color .18s ease;
}
.home-search-submit:hover { color: var(--ink); background: rgb(36 43 71 / .06); }
.home-search-submit .icon { width: 20px; height: 20px; }

.home-lesson {
  padding: 28px;
  border-radius: 24px;
  background: var(--cream);
}
.home-lesson-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  color: var(--muted);
}
.home-eyebrow { font-size: 11px; font-weight: 650; line-height: 1.5; letter-spacing: 1.8px; text-transform: uppercase; }
.home-duration { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; font-size: 14px; line-height: 1.5; white-space: nowrap; }
.home-duration .icon { width: 19px; height: 19px; stroke-width: 1.65; }
.home-lesson h2 {
  max-width: 570px;
  color: var(--ink);
  font-size: clamp(33px, 3.6vw, 44px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.12;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.home-lesson-meta { margin-top: 12px; color: var(--muted); font-size: 18px; font-weight: 550; line-height: 1.5; }
.home-lesson-reason { margin-top: 15px; color: var(--muted); font-size: 16px; line-height: 1.6; }
.home-lesson .home-lesson-continue {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 58px;
  margin-top: 25px;
  padding: 15px 22px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: var(--ink);
  color: var(--white);
  font-size: 17px;
  font-weight: 650;
  line-height: 1.4;
  box-shadow: none;
  transition: background .2s ease, transform .2s ease;
}
.home-lesson-continue > span { flex: 1; text-align: center; }
.home-lesson .home-lesson-continue .icon { width: 23px; height: 23px; }
.home-lesson .home-lesson-continue:hover:not(:disabled) { background: #333d60; transform: translateY(-1px); box-shadow: none; }
.home-lesson .home-lesson-continue:active:not(:disabled) { transform: translateY(0); }
.home-lesson-continue:focus-visible { outline-offset: 4px; }
.home-draft-link { display: block; overflow-wrap: anywhere; line-height: 1.7; min-height: 44px; margin-top: 7px; color: var(--ink-soft); font-size: 12px; text-underline-offset: 4px; }
.home-draft-link:hover { text-decoration: underline; }

.home-route { margin-top: 31px; }
.home-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 5px; }
.home-section-heading h2 { min-width: 0; color: var(--ink); font-size: 27px; font-weight: 800; line-height: 1.25; letter-spacing: -.9px; }
.home-section-heading .text-link { flex: 0 0 auto; gap: 6px; color: var(--ink-soft); font-size: 13px; font-weight: 650; }
.home-section-heading .text-link .icon { width: 16px; height: 16px; }
.home-route-list { padding: 0; margin: 0; list-style: none; }
.home-route-list > li + li { border-top: 1px solid var(--line); }
.home-route-step {
  display: flex;
  align-items: center;
  gap: 22px;
  width: 100%;
  min-width: 0;
  min-height: 96px;
  padding: 18px 4px;
  text-align: left;
  border-radius: 10px;
  transition: background .18s ease;
}
.home-route-step:hover { background: rgb(36 43 71 / .025); }
.home-step-dot { flex: 0 0 20px; width: 20px; height: 20px; margin: 0 6px; border: 1.5px solid #9ba1b1; border-radius: 50%; }
.is-current .home-step-dot { border-color: var(--ink); background: var(--ink); }
.home-step-copy { display: block; flex: 1; min-width: 0; }
.home-step-copy strong { display: block; color: var(--ink); font-size: 18px; font-weight: 700; letter-spacing: -.4px; line-height: 1.4; overflow-wrap: anywhere; }
.home-step-copy small { display: block; margin-top: 2px; color: var(--muted); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.home-step-status { flex: 0 0 auto; margin-left: auto; color: var(--ink-soft); font-size: 13px; font-weight: 600; }
.home-route-step > .icon { width: 18px; height: 18px; margin-left: auto; color: var(--muted); }
.home-review {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 97px;
  padding: 20px 4px 16px;
  border-top: 1px solid var(--line);
  transition: color .18s ease;
}
.home-review > .icon:first-child { width: 32px; height: 32px; stroke-width: 1.7; color: var(--ink); }
.home-review > .icon:last-child { width: 18px; height: 18px; margin-left: auto; color: var(--muted); }
.home-review-copy { flex: 1; min-width: 0; }
.home-review-copy strong { display: block; font-size: 18px; font-weight: 700; letter-spacing: -.3px; line-height: 1.4; }
.home-review-copy small { display: block; margin-top: 2px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.home-review:hover .home-review-copy strong { color: var(--ink-soft); }

.home-plan-details { margin-top: 12px; }
.home-plan-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  min-height: 48px;
  padding: 10px 0;
  cursor: pointer;
  list-style: none;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
}
.home-plan-details > summary::-webkit-details-marker { display: none; }
.home-plan-details > summary::after { content: '+'; font-size: 22px; font-weight: 450; }
.home-plan-details[open] > summary::after { content: '−'; }
.home-plan-details .personal-plan { margin-top: 6px; padding: 22px; border-radius: 18px; box-shadow: none; }
.home-empty { padding: 24px 0 10px; }
.home-empty h2 { font-size: 26px; letter-spacing: -.7px; }
.home-empty p { margin-top: 10px; color: var(--muted); line-height: 1.7; }
.home-empty .button { margin-top: 20px; }

.is-today .home-reveal { animation: home-enter .48s cubic-bezier(.22,1,.36,1) both; }
.home-reveal:nth-child(2) { animation-delay: 45ms; }
.home-reveal:nth-child(3) { animation-delay: 85ms; }
.home-reveal:nth-child(4) { animation-delay: 125ms; }
@keyframes home-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 980px) {
  .is-today .workspace { padding-bottom: calc(108px + env(safe-area-inset-bottom, 0px)); }
  .is-today .workspace main { padding-top: 21px; padding-bottom: 22px; }
  .is-today .home-topbar { min-height: 102px; padding-top: 23px; padding-bottom: 15px; }
  .home-greeting h1 { font-size: clamp(34px, 5.7vw, 46px); }
  .home-lesson h2 { font-size: clamp(33px, 5.4vw, 43px); }
}

@media (max-width: 520px) {
  .is-today .home-topbar { min-height: 88px; padding: 22px 21px 11px; gap: 16px; }
  .is-today .workspace main { padding: 12px 21px 18px; }
  .home-brand { gap: 8px; font-size: 25px; letter-spacing: -1.1px; }
  .home-brand img { width: 45px; height: 45px; }
  .home-streak { gap: 7px; font-size: 14px; }
  .home-streak .icon { width: 24px; height: 24px; }
  .home-greeting { margin-bottom: 17px; }
  .home-greeting h1 { font-size: clamp(30px, 8.5vw, 39px); letter-spacing: -1.3px; line-height: 1.17; }
  .home-greeting p { margin-top: 6px; font-size: 16px; line-height: 1.5; }
  .home-search { min-height: 53px; margin-bottom: 15px; padding: 3px 4px 3px 15px; gap: 11px; border-radius: 16px; }
  .home-search > .icon { width: 23px; height: 23px; }
  .home-search input { font-size: 16px; }
  .home-search-submit { flex-basis: 36px; width: 36px; padding: 8px; }
  .home-lesson { padding: 18px 19px 16px; border-radius: 20px; }
  .home-lesson-top { margin-bottom: 11px; gap: 11px; }
  .home-eyebrow { font-size: 10px; letter-spacing: 1.4px; }
  .home-duration { gap: 6px; font-size: 13px; }
  .home-duration .icon { width: 17px; height: 17px; }
  .home-lesson h2 { font-size: clamp(29px, 8vw, 38px); letter-spacing: -1.1px; line-height: 1.1; }
  .home-lesson-meta { margin-top: 8px; font-size: 16px; }
  .home-lesson-reason { margin-top: 10px; font-size: 14px; line-height: 1.6; }
  .home-lesson .home-lesson-continue { min-height: 49px; margin-top: 16px; padding: 12px 16px; border-radius: 13px; font-size: 15px; }
  .home-lesson .home-lesson-continue .icon { width: 21px; height: 21px; }
  .home-route { margin-top: 22px; }
  .home-section-heading { gap: 12px; margin-bottom: 3px; }
  .home-section-heading h2 { font-size: 24px; letter-spacing: -.8px; }
  .home-section-heading .text-link { min-height: 40px; gap: 4px; font-size: 12px; }
  .home-route-step { gap: 15px; min-height: 76px; padding: 12px 2px; }
  .home-step-dot { flex-basis: 17px; width: 17px; height: 17px; margin: 0 6px; }
  .home-step-copy strong { font-size: 16px; letter-spacing: -.35px; line-height: 1.4; }
  .home-step-copy small { font-size: 12px; margin-top: 2px; }
  .home-step-status { font-size: 12px; }
  .home-route-step > .icon { width: 17px; height: 17px; }
  .home-review { gap: 15px; min-height: 78px; padding: 17px 2px 13px; }
  .home-review > .icon:first-child { width: 29px; height: 29px; }
  .home-review-copy strong { font-size: 16px; }
  .home-review-copy small { font-size: 12px; }
  .home-review > .icon:last-child { width: 17px; height: 17px; }
  .home-plan-details .personal-plan { padding: 17px; }
}

@media (max-width: 360px) {
  .is-today .home-topbar { padding-left: 17px; padding-right: 17px; }
  .is-today .workspace main { padding-left: 17px; padding-right: 17px; }
  .home-brand { gap: 5px; font-size: 23px; }
  .home-brand img { width: 39px; height: 39px; }
  .home-streak { gap: 5px; font-size: 12px; }
  .home-streak .icon { width: 21px; height: 21px; }
  .home-greeting p { font-size: 14px; }
  .home-search { padding-left: 12px; gap: 8px; }
  .home-search-submit { flex-basis: 30px; width: 30px; padding-left: 5px; padding-right: 5px; }
  .home-search input { letter-spacing: -.4px; }
  .home-lesson { padding-left: 16px; padding-right: 16px; }
  .home-eyebrow { letter-spacing: 1px; font-size: 9px; }
  .home-duration { font-size: 12px; }
  .home-section-heading h2 { font-size: 22px; }
  .home-section-heading .text-link { font-size: 11px; }
  .home-route-step { gap: 10px; }
  .home-step-copy strong { font-size: 15px; }
  .home-step-status { font-size: 11px; }
  .home-review { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .is-today .home-reveal { animation: none; }
  .home-search, .home-search-submit, .home-route-step, .home-review,
  .home-lesson .home-lesson-continue { transition: none; }
  .home-lesson .home-lesson-continue:hover:not(:disabled) { transform: none; }
}

/* Desktop already carries the brand in its sidebar. */
@media (min-width: 981px) {
  .is-today .home-topbar { min-height: 80px; padding-top: 22px; justify-content: flex-end; }
  .is-today .home-topbar .home-brand { display: none; }
}
