/* RubyLou — Sample Day styles (scoped to #rl-sd-app; ported from the approved prototype).
   Uses the site's design tokens/fonts. Page background = supplied garden landscape
   under a cream overlay fading to solid cream. */

/* --- page background: garden under cream, fading to solid cream --- */
.rl-sd-page { position: relative; background: #F8EEE4; }
.rl-sd-page::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(to bottom, rgba(248,238,228,.86) 0%, rgba(248,238,228,.9) 55%, #F8EEE4 82%),
    url('/assets/img/sample-day-garden.webp');
  background-size: 100% 100%, cover;
  background-position: center top; background-repeat: no-repeat;
}
.rl-sd-page > * { position: relative; z-index: 1; }
/* On the intake form only: a homepage-style radial scrim. Cream is heaviest behind the intro
   heading (so the text stays fully legible) and thins toward the edges, letting the garden show
   through above, to the sides, and below — with a fade back to solid cream along the bottom so the
   form beneath sits cleanly. */
.rl-sd-page.sd-intake::before {
  opacity: 1;
  background-image:
    radial-gradient(96% 82% at 46% 23%,
      rgba(248,238,228,0.96) 0%,
      rgba(248,238,228,0.93) 33%,
      rgba(248,238,228,0.70) 55%,
      rgba(248,238,228,0.30) 78%,
      rgba(248,238,228,0.04) 100%),
    linear-gradient(to bottom,
      rgba(248,238,228,0) 0%,
      rgba(248,238,228,0) 60%,
      rgba(248,238,228,0.70) 85%,
      #F8EEE4 100%),
    url('/assets/img/sample-day-garden.webp');
  background-size: 100% 100%, 100% 100%, cover;
  background-position: center top, center top, center top;
  background-repeat: no-repeat, no-repeat, no-repeat;
}

#rl-sd-app { max-width: 1200px; margin: 0 auto; padding: 8px 24px 48px; color: #3D2B2F; font: 17px/1.65 'DM Sans', system-ui, sans-serif; }
#rl-sd-app h1, #rl-sd-app h2, #rl-sd-app h3 { font-family: 'Cormorant Garamond', Georgia, serif; line-height: 1.12; font-weight: 500; }
#rl-sd-app h1 { font-size: clamp(38px,5vw,64px); margin: 12px 0; }
#rl-sd-app h2 { font-size: 34px; }
#rl-sd-app p { margin: 12px 0; }
#rl-sd-app a { color: #823320; text-underline-offset: 3px; }
#rl-sd-app .eyebrow { font-size: 12px; letter-spacing: 2px; color: #7A6B6E; }
#rl-sd-app .small, #rl-sd-app figcaption { font-size: 14px; line-height: 1.6; color: #665458; }
#rl-sd-app .intro, #rl-sd-app .panel { max-width: 1000px; margin: 20px auto; padding: 24px; }
#rl-sd-app .intro { margin-bottom: 8px; }
#rl-sd-app .panel { background: rgba(240,235,227,.96); border: 1px solid #ded2c6; border-radius: 14px; }
#rl-sd-app form.panel { background: rgba(248,238,228,.97); }
#rl-sd-app form.panel h2 { margin-top: 0; margin-bottom: 12px; }

/* buttons + controls */
#rl-sd-app button { cursor: pointer; font: inherit; color: inherit; }
#rl-sd-app button:disabled { opacity: .45; cursor: not-allowed; }
#rl-sd-app select, #rl-sd-app input, #rl-sd-app textarea { font: inherit; border: 1px solid #e4dcd2; border-radius: 10px; padding: 10px; background: #fff; color: inherit; }
#rl-sd-app select { min-width: 150px; }
#rl-sd-app .toolbar, #rl-sd-app .chips, #rl-sd-app .tabs { display: flex; gap: 12px; flex-wrap: wrap; }
#rl-sd-app .toolbar button { padding: 8px 12px; background: transparent; border: 0; text-decoration: underline; text-underline-offset: 5px; }
#rl-sd-app .toolbar { margin: 22px 0; }
#rl-sd-app .primary, #rl-sd-app .secondary, #rl-sd-app .chips button, #rl-sd-app .tabs button, #rl-sd-app .assetbutton {
  background: #fff; color: #3D2B2F; border: 1px solid #e4dcd2; padding: 12px 20px; border-radius: 30px; min-height: 46px; font-weight: 500;
}
#rl-sd-app .primary { background: #F4573A; color: #fff; border-color: #F4573A; font-size: 20px; font-weight: 700; box-shadow: 0 3px 7px #3d2b2f15; }
#rl-sd-app .chips button[aria-pressed=true], #rl-sd-app .tabs button[aria-pressed=true] { background: #F4573A; color: #fff; border: 1px solid #F4573A; font-weight: 700; }
#rl-sd-app button:focus-visible, #rl-sd-app a:focus-visible, #rl-sd-app select:focus-visible, #rl-sd-app input:focus-visible, #rl-sd-app textarea:focus-visible, #rl-sd-app summary:focus-visible { outline: 3px solid #3D2B2F; outline-offset: 4px; }

/* form */
#rl-sd-app fieldset { border: 0; padding: 12px 0 18px; margin: 0 0 18px; border-bottom: 1px solid #cec2b7; }
#rl-sd-app legend { font-family: 'Cormorant Garamond', serif; font-size: 30px; font-weight: 500; padding: 0; line-height: 1.15; }
#rl-sd-app label { display: block; }
#rl-sd-app label select, #rl-sd-app label input[type=email], #rl-sd-app textarea { display: block; margin-top: 8px; }
#rl-sd-app .childrow { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding: 6px 0; }
#rl-sd-app .grade-chosen { background: #F4573A; color: #fff; font-weight: 700; }
#rl-sd-app .grade-chosen option { background: #fff; color: #3D2B2F; }
#rl-sd-app .chips { margin: 16px 0; }
#rl-sd-app .philosophy-option { position: relative; padding-right: 34px; }
#rl-sd-app .philosophy-help { position: absolute; right: 0; top: 0; margin: 0; z-index: 3; }
#rl-sd-app .philosophy-help summary { border: 1px solid #b8ab9f; background: #fff; border-radius: 50%; width: 28px; height: 28px; padding: 0; text-align: center; font-size: 14px; list-style: none; cursor: pointer; }
#rl-sd-app .philosophy-help summary::-webkit-details-marker { display: none; }
#rl-sd-app .philosophy-help p { display: none; position: absolute; right: 0; top: 24px; width: 240px; padding: 16px; border: 1px solid #b8ab9f; background: #F8EEE4; box-shadow: 0 4px 16px #3d2b2f20; border-radius: 12px; font-size: 15px; }
#rl-sd-app .philosophy-help[open] p, #rl-sd-app .philosophy-help:focus-within p { display: block; }

/* callout */
#rl-sd-app .callout { background: #e8e7d9; border-radius: 12px; padding: 20px; margin: 24px 0; }
#rl-sd-app .callout h3 { font-size: 24px; }

/* day timeline */
#rl-sd-app .timeline { max-width: 1000px; margin: auto; }
#rl-sd-app .dayrow { display: grid; grid-template-columns: 96px 1fr; gap: 20px; padding: 28px 0; border-top: 1px solid #cbbfb4; }
#rl-sd-app .dayrow h2 { margin: 8px 0; font-size: 32px; }
#rl-sd-app .timemark { padding-top: 10px; font-size: 14px; color: #665458; }
#rl-sd-app .break { padding: 15px 0; }
#rl-sd-app .break h2 { font-size: 24px; }

/* lesson */
#rl-sd-app .lesson { max-width: 900px; margin: 24px auto; }
#rl-sd-app .lesson:has(.learner-panels) { max-width: 1200px; }
#rl-sd-app .lesson h1 { font-size: clamp(34px,4.5vw,52px); }
#rl-sd-app .lesson-meta { margin: 12px 0 28px; }
#rl-sd-app .lesson-meta span { background: #9cab91; color: #fff; border-radius: 24px; padding: 8px 18px; font-weight: 700; }
#rl-sd-app .subheading { font-size: 24px; font-family: 'Cormorant Garamond', serif; }
#rl-sd-app .tabs { margin: 24px 0; border-bottom: 1px solid #cbbfb4; padding-bottom: 16px; }
#rl-sd-app .lesson-section { background: #fff; border-radius: 22px; padding: 30px; margin: 24px 0; color: #493936; }
#rl-sd-app .lesson-section h2 { display: flex; align-items: center; gap: 14px; font: 600 22px 'DM Sans', sans-serif; margin-bottom: 22px; }
#rl-sd-app .lesson-section h2 > span { background: #9cab91; border-radius: 50%; min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
#rl-sd-app .material-list { padding-left: 24px; }
#rl-sd-app .material-list li { margin: 12px 0; }
#rl-sd-app .blend-note { margin-top: 35px; }
#rl-sd-app details { margin: 15px 0; }
#rl-sd-app summary { cursor: pointer; padding: 10px 0; text-decoration: underline; text-underline-offset: 4px; }
#rl-sd-app ol { padding-left: 24px; }
#rl-sd-app li { padding: 4px 0; }

/* learner panels */
#rl-sd-app .learner-panels { display: flex; gap: 22px; overflow-x: auto; padding: 4px 2px 18px; align-items: stretch; }
#rl-sd-app .learner-panels .learner-lesson { flex: 1 0 310px; min-width: 0; background: #F8EEE4; border: 1px solid #e5d8ca; border-radius: 16px; padding: 22px; margin: 0; }
#rl-sd-app .learner-panels .learner-lesson:only-child { flex-basis: 100%; }
#rl-sd-app .learner-panels h3 { font: 600 22px 'DM Sans', sans-serif; line-height: 1.4; }
#rl-sd-app .learner-panels .secondary { font-size: 16px; }

/* prose / tables / blockquote */
#rl-sd-app .prose p { white-space: pre-line; margin: 18px 0; }
#rl-sd-app .prose h3 { font-size: 28px; margin-top: 26px; }
#rl-sd-app blockquote { border-left: 2px solid #9DAC92; padding: 0 22px; margin: 20px 0; font-family: Georgia, serif; line-height: 1.9; }
#rl-sd-app table { border-collapse: collapse; width: 100%; font-size: 15px; }
#rl-sd-app th, #rl-sd-app td { border: 1px solid #b8ab9f; padding: 10px; text-align: left; }
#rl-sd-app .tablewrap { overflow-x: auto; }

/* journal */
#rl-sd-app .journal textarea { display: block; width: 100%; min-height: 230px; background: #fff; border: 1px solid #9cab91; border-radius: 12px; padding: 16px; margin-top: 12px; }
#rl-sd-app .journal-print { display: none; white-space: pre-wrap; overflow-wrap: anywhere; }

/* materials / printable pages */
#rl-sd-app .assetgrid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
#rl-sd-app .assetbutton { border-radius: 12px; text-align: left; }
#rl-sd-app .paper { background: #fcf8f1; border: 1px solid #b8ab9f; padding: 36px; margin-top: 26px; }
#rl-sd-app .printhead { letter-spacing: 3px; font-size: 12px; color: #665458; }
#rl-sd-app .responsebox { height: 240px; border: 1px solid #a8998b; padding: 15px; margin: 24px 0; color: #665458; }
#rl-sd-app .writinglines { height: 210px; background: repeating-linear-gradient(transparent, transparent 34px, #b8ab9f 35px); margin: 15px 0; }
#rl-sd-app .writinglines.short { height: 105px; }
#rl-sd-app .conceptcards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
#rl-sd-app .conceptcards div { border: 1px dashed #665458; padding: 20px; min-height: 100px; }
#rl-sd-app figure { margin: 20px 0; }
#rl-sd-app svg { width: 100%; height: auto; }
#rl-sd-app svg text { font-family: 'DM Sans', sans-serif; font-size: 16px; fill: #3D2B2F; }

/* waitlist */
#rl-sd-app .sd-waitlist-embed { margin: 28px 0 8px; }
#rl-sd-app .sd-waitlist { max-width: 1000px; }
#rl-sd-app .sd-waitlist input[type=email] { width: 100%; max-width: 460px; }

/* reading dialog (modal) */
.sd-dialog-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(61,43,47,.45); display: flex; align-items: center; justify-content: center; padding: 20px; }
.sd-dialog-overlay .reading-dialog { position: relative; background: #F8EEE4; color: #3D2B2F; max-width: 780px; width: 100%; max-height: 85vh; overflow-y: auto; padding: 35px; border-radius: 14px; font-size: 17px; box-shadow: 0 12px 40px rgba(61,43,47,.3); }
.sd-dialog-overlay .reading-dialog h2 { font-family: 'Cormorant Garamond', serif; font-size: 32px; font-weight: 500; }
.sd-dialog-overlay .reading-dialog .prose p { white-space: pre-line; }
.sd-dialog-overlay .sd-dialog-close { position: absolute; top: 12px; right: 16px; background: none; border: 0; font-size: 30px; line-height: 1; cursor: pointer; color: #3D2B2F; }
.sd-dialog-overlay .secondary { background: #fff; border: 1px solid #e4dcd2; border-radius: 30px; padding: 12px 20px; min-height: 46px; margin-top: 18px; cursor: pointer; }

@media (max-width: 650px) {
  #rl-sd-app .learner-panels { display: block; overflow: visible; }
  #rl-sd-app .learner-panels .learner-lesson { margin-bottom: 18px; }
  #rl-sd-app .assetgrid { grid-template-columns: 1fr; }
  #rl-sd-app .conceptcards { grid-template-columns: 1fr; }
  #rl-sd-app .childrow { display: block; }
  #rl-sd-app .childrow > * { margin: 12px 0; }
  #rl-sd-app .dayrow { grid-template-columns: 62px 1fr; gap: 12px; }
  #rl-sd-app .dayrow h2 { font-size: 26px; }
  #rl-sd-app .paper { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { .rl-sd-page * { transition: none !important; } }

/* --- print --- */
@page { size: letter portrait; margin: .7in; }
@media print {
  /* reset the outer page: the cream .rl-sd-page background and its min-height:100vh printed a
     tinted sheet and forced an extra blank page. Force white, no forced height, no stray margins. */
  html, body { margin: 0 !important; padding: 0 !important; background: #fff !important; }
  .rl-sd-page { min-height: 0 !important; height: auto !important; background: #fff !important; }
  .rl-sd-page::before { display: none !important; }
  main, #main { margin: 0 !important; padding: 0 !important; min-height: 0 !important; }
  .noprint, nav, footer, .sd-dialog-overlay { display: none !important; }
  #rl-sd-app { max-width: none; margin: 0; padding: 0; background: #fff !important; }
  #rl-sd-app .panel, #rl-sd-app .intro { max-width: none; margin: 15px 0; padding: 0; border: 0; background: transparent; }
  #rl-sd-app .paper { border: 0; padding: 0; background: #fff; }
  #rl-sd-app .dayrow, #rl-sd-app table, #rl-sd-app .conceptcards div, #rl-sd-app figure { break-inside: avoid; }
  #rl-sd-app h1 { font-size: 30pt !important; }
  #rl-sd-app h2 { font-size: 22pt; }
  #rl-sd-app .learner-panels { display: block; overflow: visible; }
  #rl-sd-app .learner-panels .learner-lesson { margin-bottom: 18px; background: #fff; break-inside: auto; }
  #rl-sd-app .journal-print { display: block; }
  #rl-sd-app .journal textarea { display: none; }
  #rl-sd-app .writinglines { background: none; border-bottom: 1px solid #b8ab9f; height: 170px; }
  #rl-sd-app .lesson-section { padding: 12px; border: 1px solid #ddd; }
  /* dedicated worksheet print: show ONLY the print root (its own title/identity), hide everything else */
  body.rl-printing-worksheet #rl-sd-app > *:not(#rl-sd-print) { display: none !important; }
  body.rl-printing-worksheet #rl-sd-print { display: block !important; }
  body.rl-printing-worksheet #rl-sd-print .worksheet { break-inside: auto; }
  /* --- learner packet: US Letter portrait, white, readable 11–12pt, restrained wordmark --- */
  #rl-sd-print { color: #221; font-size: 11.5pt; line-height: 1.5; }
  #rl-sd-print .worksheet { padding: 0; margin: 0; background: #fff; border: 0; }
  #rl-sd-print .printhead { letter-spacing: 3px; font-size: 9pt; color: #6b5e52; margin-bottom: 10px; }
  #rl-sd-print .pkt-id { font-size: 12pt; margin: 0 0 2px; }
  #rl-sd-print .pkt-title { font-size: 21pt !important; margin: 2px 0 10px; }
  #rl-sd-print .pkt-source { font-size: 10.5pt; color: #40352f; margin: 0 0 8px; }
  #rl-sd-print .pkt-directions { font-size: 11pt; margin: 4px 0 12px; }
  #rl-sd-print .pkt-note { font-size: 10.5pt; font-style: italic; margin: 6px 0; }
  #rl-sd-print .pkt-reading { break-inside: auto; margin: 10px 0 14px; }
  #rl-sd-print .pkt-reading h3 { font-size: 13pt; margin: 6px 0; }
  #rl-sd-print .pkt-reading blockquote { border-left: 2px solid #9a8f83; padding: 0 14px; margin: 10px 0; font-family: Georgia, 'Times New Roman', serif; }
  #rl-sd-print .pkt-vocab { font-size: 10.5pt; margin: 8px 0 4px; }
  #rl-sd-print .pkt-task { margin: 14px 0 8px; }
  #rl-sd-print .pkt-task h3 { font-size: 13pt; margin: 0 0 6px; }
  #rl-sd-print .pkt-space-label { font-weight: 700; font-size: 11pt; margin: 12px 0 4px; }
  #rl-sd-print .writinglines { background: none; border-bottom: 1px solid #b8ab9f; height: 150px; margin: 10px 0; }
  #rl-sd-print .writinglines.short { height: 80px; }
  #rl-sd-print .responsebox { height: 210px; border: 1px solid #a8998b; padding: 12px; margin: 12px 0; color: #6b5e52; }
  #rl-sd-print .blanktable td { height: 38px; }
  #rl-sd-print th, #rl-sd-print td { border: 1px solid #7a6b6e; padding: 8px; }
  #rl-sd-print .pkt-foot { margin-top: 14px; font-size: 9.5pt; color: #6b5e52; }
  /* make source URLs readable on paper (a usable reference from the printed packet) */
  #rl-sd-print .pkt-reading a[href^="http"]::after, #rl-sd-print .pkt-source a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8.5pt; color: #40352f; word-break: break-all; }
  #rl-sd-print a { color: #221; text-decoration: none; }
}

/* ---- refinements (round 1) ---- */
#rl-sd-app .eyebrow.sd-ruby { color: #F4573A; }
#rl-sd-app .sd-ruby-link { color: #F4573A; }
#rl-sd-app .sd-phil-intro { max-width: none; }

/* learner row: name box + grade box + Remove, aligned on the input row */
#rl-sd-app .childrow { align-items: flex-start; gap: 18px 22px; }
#rl-sd-app .sd-field, #rl-sd-app .sd-gradefield, #rl-sd-app .sd-removewrap { display: flex; flex-direction: column; margin: 0; }
#rl-sd-app .sd-field-eyebrow { display: block; font-size: 14px; color: #665458; margin-bottom: 6px; line-height: 1.2; }
#rl-sd-app .sd-name { width: 220px; max-width: 100%; margin: 0; }
#rl-sd-app .sd-optional { font-style: italic; font-size: 13px; color: #7A6B6E; margin-top: 6px; }
#rl-sd-app .sd-field select, #rl-sd-app .sd-field input { margin-top: 0; }
#rl-sd-app .sd-grade { padding-right: 36px; }
#rl-sd-app .sd-removewrap .sd-field-eyebrow { visibility: hidden; }
#rl-sd-app .sd-remove { align-self: flex-start; background: #fff; border: 1px solid #e4dcd2; border-radius: 24px; padding: 11px 18px; }

/* spacing: tighter under legends; room below "Add another learner" + the divider */
#rl-sd-app fieldset { padding-top: 6px; }
#rl-sd-app legend { margin-bottom: 6px; }
#rl-sd-app fieldset > p { margin-top: 4px; }
#rl-sd-app fieldset:first-of-type { padding-bottom: 28px; margin-bottom: 28px; }
#rl-sd-app fieldset:first-of-type > button.secondary { margin-top: 10px; }

/* philosophy help: sage "?" (no underline); white popup with sage border; on top when open */
#rl-sd-app .philosophy-help summary { color: #9DAC92; border-color: #9DAC92; text-decoration: none; font-weight: 700; }
#rl-sd-app .philosophy-help p { background: #fff; border: 1px solid #9DAC92; }
#rl-sd-app .philosophy-help[open] { z-index: 40; }

/* day toolbar -> ruby pills; open-lesson -> sage; back -> ruby text */
#rl-sd-app .sd-daytoolbar { gap: 14px; margin-top: 22px; }
#rl-sd-app .sd-daytoolbar .sd-toolbtn { background: #F4573A; color: #fff; border: 1px solid #F4573A; border-radius: 30px; padding: 12px 22px; min-height: 46px; text-decoration: none; font-weight: 700; }
#rl-sd-app .sd-open { background: #9DAC92; color: #fff; border: 1px solid #9DAC92; border-radius: 30px; padding: 12px 20px; min-height: 46px; font-weight: 600; }
#rl-sd-app .sd-back { background: none; border: 0; padding: 4px 0; color: #F4573A; text-decoration: none; font-weight: 700; }

/* ---- refinements (round 2) ---- */
/* Next lesson -> white button, sage-green text (overrides the underlined toolbar button) */
#rl-sd-app .sd-next { background: #fff !important; color: #9DAC92 !important; border: 1px solid #9DAC92 !important; border-radius: 30px; padding: 12px 20px; min-height: 46px; font-weight: 700; text-decoration: none !important; }

/* Step-by-step learner columns: preview at top, subordinate prep + numbered teaching steps */
#rl-sd-app .learner-idline { font: 500 15px 'DM Sans', sans-serif; color: #665458; margin: 2px 0 14px; }
#rl-sd-app .learner-tasklabel { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: #7d8e72; font-weight: 700; margin: 12px 0 6px; }
#rl-sd-app .learner-task { background: #fff; border: 1px solid #e5d8ca; border-radius: 12px; padding: 6px 16px; }
#rl-sd-app .learner-task .prose p { margin: 10px 0; }
#rl-sd-app .sd-printlearner { margin: 16px 0 4px; }
#rl-sd-app .parent-prep { margin-top: 20px; padding-top: 16px; border-top: 1px dashed #cbbfb4; font-size: 15px; color: #5b4a48; }
#rl-sd-app .parent-prep p { margin: 8px 0; }
#rl-sd-app .teaching-steps { margin: 16px 0 0; padding-left: 22px; }
#rl-sd-app .teaching-steps > li { padding: 7px 0; }
#rl-sd-app .lesson-extra { font-size: 15px; margin: 12px 0 0; color: #5b4a48; }

/* dedicated print root (hidden on screen; shown only during a worksheet print) */
#rl-sd-print { display: none; }
#rl-sd-app .blanktable td { height: 40px; }

/* ---- refinements (round 3): reading list, inline links, packet header order ---- */
#rl-sd-app .overview-subhead { font: 700 15px 'DM Sans', sans-serif; margin: 18px 0 6px; letter-spacing: .3px; }
#rl-sd-app .overview-readings { background: #fff; border: 1px solid #e5d8ca; border-radius: 12px; padding: 6px 16px; }
#rl-sd-app .overview-reading-line { margin: 10px 0; font-size: 15.5px; }
#rl-sd-app .link-btn { background: none; border: 0; padding: 0; color: #823320; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
#rl-sd-app .link-btn:hover { color: #F4573A; }
/* learner panel: name+grade eyebrow ABOVE the title; English book/chapter/excerpt line */
#rl-sd-app .learner-eyebrow { font: 700 13px 'DM Sans', sans-serif; letter-spacing: 1px; text-transform: uppercase; color: #7d8e72; margin: 0 0 4px; }
#rl-sd-app .learner-reading { font-size: 15px; color: #5b4a48; margin: 2px 0 10px; }

/* ---- refinements (round 4): fixed PDF packets + inline lesson ---- */
/* "Print for this lesson" disclosure */
#rl-sd-app .print-list { background: #fff; border: 1px solid #e5d8ca; border-radius: 12px; padding: 4px 16px; margin-top: 12px; }
#rl-sd-app .print-list > summary { list-style: none; cursor: pointer; padding: 12px 0; font: 700 16px 'DM Sans', sans-serif; color: #3D2B2F; }
#rl-sd-app .print-list > summary::-webkit-details-marker { display: none; }
#rl-sd-app .print-list > summary::before { content: '▸ '; color: #9DAC92; }
#rl-sd-app .print-list[open] > summary::before { content: '▾ '; }
#rl-sd-app .print-list-items { list-style: none; padding: 0; margin: 4px 0 8px; }
#rl-sd-app .print-list-items li { padding: 9px 0; border-top: 1px solid #efe7db; }
#rl-sd-app .packet-link { color: #F4573A; font-weight: 400; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }
#rl-sd-app .packet-link:hover { color: #F4573A; }
#rl-sd-app .packet-pending { color: #7A6B6E; font-style: italic; }
/* inline lesson steps */
#rl-sd-app .panel-step { margin: 16px 0 0; }
#rl-sd-app .panel-step h4 { font: 700 12px 'DM Sans', sans-serif; letter-spacing: .8px; text-transform: uppercase; color: #7d8e72; margin: 0 0 6px; }
#rl-sd-app .ident { font-size: 15px; color: #5b4a48; margin: 2px 0 8px; }
#rl-sd-app .src-note { margin: 4px 0 8px; }
/* expandable-in-place readings / source cards / model */
#rl-sd-app .read-explore { margin: 6px 0; border: 1px solid #e5d8ca; border-radius: 10px; background: #fff; }
#rl-sd-app .read-explore > summary { cursor: pointer; padding: 11px 14px; font-weight: 700; color: #3D2B2F; list-style: none; }
#rl-sd-app .read-explore > summary::-webkit-details-marker { display: none; }
#rl-sd-app .read-explore > summary::before { content: '▸ '; color: #9DAC92; }
#rl-sd-app .read-explore[open] > summary::before { content: '▾ '; }
#rl-sd-app .read-explore .read-body { padding: 0 16px 14px; }
#rl-sd-app .read-explore .read-body .prose p { margin: 10px 0; }
#rl-sd-app .starting-point { font-size: 15px; color: #5b4a48; margin: 14px 0 2px; }
#rl-sd-app .your-turn .learner-task { background: #F8EEE4; border: 1px solid #e5d8ca; border-radius: 12px; padding: 6px 16px; }
#rl-sd-app .assignment-link { display: inline-block; margin-top: 12px; }

/* ---- refinements (round 5): resources menu, soft-cream panels, two-control readings ---- */
/* soft-cream learner panels (#F8F4ED) with a subtle neutral border; task interiors stay white */
#rl-sd-app .learner-panels .learner-lesson { background: #F8F4ED; border-color: #e6ded2; }
#rl-sd-app .your-turn .learner-task { background: #fff; border-color: #e6ded2; }
/* "Teaching attention through this lesson:" as an instructional heading (DM Sans semibold, not serif) */
#rl-sd-app .callout h3 { font-family: 'DM Sans', system-ui, sans-serif; font-weight: 600; font-size: 19px; letter-spacing: .2px; line-height: 1.35; }
/* resources menu rows */
#rl-sd-app .res-note { color: #665458; }
#rl-sd-app .res-pending { color: #9a8b7e; font-style: italic; }
#rl-sd-app .res-unavailable { color: #7A6B6E; }
/* two-control reading row: an expandable "Read …" and a sibling "Print …" link (never nested) */
#rl-sd-app .read-row { margin: 8px 0 12px; }
#rl-sd-app .read-actions { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 7px 2px 2px; }
#rl-sd-app .read-inpacket { color: #7A6B6E; }
#rl-sd-app .guide-links { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; align-items: flex-start; }

/* ============================================================
   REDESIGN (round 6): sidebar shell, Today cards, lesson hero,
   support + steps, right rail, embedded journal, responsive.
   ============================================================ */

/* --- intake (page 1) tweaks --- */
#rl-sd-app form.panel { background: #F0EBE3; }
#rl-sd-app .eyebrow.sd-eyebrow-dm { font-family: 'DM Sans', system-ui, sans-serif; font-weight: 500; font-size: 12px; letter-spacing: 2px; }
#rl-sd-app .sd-intro-note { font-family: 'DM Sans', system-ui, sans-serif; font-style: italic; font-size: 15px; color: #7A6B6E; margin-top: 5px; }
#rl-sd-app .chips button { font-size: 15px; padding: 9px 15px; min-height: 40px; }

/* --- shell --- */
#rl-sd-app { max-width: none; margin: 0; padding: 0; }
.sd-shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; align-items: start; }
/* Grid items default to min-width:auto, so a child's min-content (e.g. the sticky topbar row)
   can blow the 1fr track past the viewport and add ~7px of horizontal scroll on narrow screens.
   Let the tracks shrink so content wraps instead — fixes the overflow at its source (no page-wide overflow-x). */
.sd-shell > * { min-width: 0; }
.sd-topbar { display: none; }
.sd-sidebar { position: sticky; top: 0; align-self: start; height: 100vh; padding: 28px 18px; background: #F6F1E9; border-right: 1px solid #e6ded2; display: flex; flex-direction: column; gap: 4px; }
.sd-brand { display: block; text-decoration: none; margin-bottom: 2px; }
.sd-brand-name { display: block; font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 600; color: #F4573A; letter-spacing: .12em; line-height: 1; }
.sd-brand-sub { display: block; font-size: 8px; font-weight: 600; color: #9DAC92; letter-spacing: 2.5px; margin-top: 6px; }
.sd-brand-label { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: #9a8b7e; margin: 10px 0 16px; }
.sd-nav { display: flex; flex-direction: column; gap: 3px; }
.sd-navitem { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; padding: 10px 12px; border: 0; border-radius: 10px; background: none; color: #3D2B2F; font: 500 15px 'DM Sans', sans-serif; cursor: pointer; }
.sd-navitem svg { width: 18px; height: 18px; color: #7A6B6E; }
.sd-navitem:hover { background: #EFE8DC; }
.sd-navitem.active { background: #FEF2EF; color: #C64327; }
.sd-navitem.active svg { color: #C64327; }
.sd-back-rl { margin-top: auto; display: flex; align-items: center; gap: 8px; color: #7A6B6E; font-size: 13px; text-decoration: none; padding: 12px; }
.sd-back-rl svg { width: 16px; height: 16px; }
.sd-main { padding: 34px clamp(20px, 4vw, 56px) 72px; max-width: 1120px; }

/* --- Today --- */
.sd-today-intro .eyebrow { font-weight: 500; }
.sd-today-title { font-family: 'Cormorant Garamond', serif; font-size: clamp(32px, 4.5vw, 46px); font-weight: 500; margin: 4px 0 12px; color: #3D2B2F; }
.sd-fam { margin: 3px 0; color: #3D2B2F; font-size: 15px; }
.sd-adjust-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; background: #F4573A; color: #fff; border: 0; border-radius: 30px; padding: 11px 20px; font: 600 15px 'DM Sans', sans-serif; cursor: pointer; }
.sd-adjust-btn svg { width: 17px; height: 17px; }
.sd-flex-callout { background: #EDE7DC; border-radius: 14px; padding: 18px 22px; margin: 18px 0 26px; }
.sd-flex-callout p { margin: 4px 0; font-size: 15px; }
.sd-cards { display: flex; flex-direction: column; gap: 12px; }
.sd-card { display: flex; align-items: center; gap: 16px; width: 100%; text-align: left; background: #F7EDE2; border: 1px solid #e6ded2; border-radius: 16px; padding: 16px 20px; cursor: pointer; transition: box-shadow .15s, transform .12s; color: #3D2B2F; }
.sd-card:hover { box-shadow: 0 6px 18px rgba(61,43,47,.10); transform: translateY(-1px); }
.sd-card-icon { flex: none; width: 40px; height: 40px; border-radius: 50%; background: #EAEDE4; display: flex; align-items: center; justify-content: center; color: #7d8e72; }
.sd-card-icon svg { width: 20px; height: 20px; }
.sd-card-body { flex: 1; min-width: 0; }
.sd-card-eyebrow { font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: #9a8b7e; margin: 0 0 3px; }
.sd-card-title { font-family: 'Cormorant Garamond', serif; font-size: 24px; font-weight: 500; margin: 0 0 3px; color: #3D2B2F; }
.sd-card-desc { font-size: 14px; color: #5b4a48; margin: 0; }
.sd-card-meta { flex: none; display: flex; align-items: center; gap: 10px; color: #9a8b7e; font-size: 13px; }
.sd-card-meta svg { width: 18px; height: 18px; }
.sd-break { display: flex; align-items: center; gap: 16px; background: #9DAC92; border-radius: 16px; padding: 14px 20px; }
.sd-break-icon { flex: none; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.28); display: flex; align-items: center; justify-content: center; color: #2c3a25; }
.sd-break-icon svg { width: 18px; height: 18px; }
.sd-break-eyebrow { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: #33402b; margin: 0 0 2px; font-weight: 700; }
.sd-break-title { font-family: 'Cormorant Garamond', serif; font-size: 20px; font-weight: 500; color: #23301c; margin: 0; }
.sd-day-journal { margin: 34px 0 10px; }
.sd-section-title { font-family: 'Cormorant Garamond', serif; font-size: 26px; font-weight: 500; margin: 0 0 8px; color: #3D2B2F; }
.sd-journal-index { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-direction: column; gap: 6px; }

/* --- lesson --- */
.sd-lesson-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.sd-link-back, .sd-link-next { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: #C64327; font: 600 14px 'DM Sans', sans-serif; cursor: pointer; }
.sd-link-back svg, .sd-link-next svg { width: 16px; height: 16px; }
.sd-hero { position: relative; border-radius: 20px; overflow: hidden; background-size: cover; background-position: center right; margin-bottom: 20px; }
.sd-hero-inner { position: relative; background: linear-gradient(100deg, #F7EDE2 0%, #F7EDE2 50%, rgba(247,237,226,.78) 66%, rgba(247,237,226,0) 94%); padding: 26px 30px; }
.sd-hero-pill { display: inline-block; background: #C64327; color: #fff; font: 700 11px 'DM Sans', sans-serif; letter-spacing: 1.5px; padding: 6px 13px; border-radius: 20px; }
.sd-hero-title { font-family: 'Cormorant Garamond', serif; font-size: clamp(30px, 4vw, 40px); font-weight: 500; margin: 12px 0 4px; color: #3D2B2F; }
.sd-hero-sub { font-size: 15px; color: #5b4a48; margin: 0 0 8px; max-width: 620px; }
.sd-hero-eyebrow { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: #C64327; font-weight: 700; margin: 8px 0 2px; }
.sd-hero-summary { max-width: 640px; }
.sd-hero-summary .prose p { margin: 5px 0; font-size: 15px; line-height: 1.55; color: #4a3b39; }
.sd-selector { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.sd-seltab { background: #F0EBE3; border: 1px solid #e6ded2; color: #3D2B2F; border-radius: 24px; padding: 9px 16px; font: 600 14px 'DM Sans', sans-serif; cursor: pointer; }
.sd-seltab.active { background: #F4573A; color: #fff; border-color: #F4573A; }
.sd-lesson-grid { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 26px; align-items: start; }
.sd-lesson-main { min-width: 0; }
.sd-support { background: #fff; border: 1px solid #ece3d6; border-radius: 18px; padding: 24px 26px; margin-bottom: 22px; }
.sd-support-eyebrow, .sd-steps-eyebrow { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: #C64327; font-weight: 700; margin: 0 0 8px; }
.sd-support-title { font-family: 'Cormorant Garamond', serif; font-size: 26px; font-weight: 500; margin: 0 0 12px; color: #3D2B2F; }
.sd-support-block { margin: 14px 0; }
.sd-support-block h3 { font: 600 15px 'DM Sans', sans-serif; margin: 0 0 4px; color: #3D2B2F; }
.sd-support p, .sd-step-body p, .sd-childsum p { font-size: 16px; line-height: 1.6; color: #3D2B2F; }
.sd-support-note { font-size: 15px; color: #5b4a48; }
.sd-need-inline { margin-top: 16px; padding-top: 14px; border-top: 1px solid #efe7db; }
.sd-need-inline h3 { font: 600 15px 'DM Sans', sans-serif; margin: 0 0 6px; }
.sd-need-list { list-style: none; padding: 0; margin: 0; }
.sd-need-list li { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 14px; color: #3D2B2F; }
.sd-need-list li::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #9DAC92; flex: none; }
.sd-steps { margin-bottom: 10px; }
.sd-step { display: flex; gap: 14px; margin: 18px 0; }
.sd-step-num { flex: none; width: 30px; height: 30px; border-radius: 50%; background: #F4573A; color: #fff; display: flex; align-items: center; justify-content: center; font: 700 14px 'DM Sans', sans-serif; }
.sd-step-body { flex: 1; min-width: 0; }
.sd-step-title { font: 600 16px 'DM Sans', sans-serif; margin: 4px 0 8px; color: #3D2B2F; }
.sd-childsum { background: #fff; border: 1px solid #ece3d6; border-radius: 14px; padding: 18px 20px; margin: 12px 0; }
.sd-childsum-title { font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 500; margin: 2px 0 6px; }
.sd-childsum p { font-size: 15px; margin: 6px 0; }
.sd-open-child { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; background: #9DAC92; color: #fff; border: 0; border-radius: 24px; padding: 9px 16px; font: 600 14px 'DM Sans', sans-serif; cursor: pointer; }
.sd-open-child svg { width: 15px; height: 15px; }
.sd-extra { margin: 18px 0; }
.sd-disclosure { background: #fff; border: 1px solid #ece3d6; border-radius: 12px; margin: 12px 0; padding: 0 18px; }
.sd-disclosure > summary { cursor: pointer; padding: 13px 0; font: 600 15px 'DM Sans', sans-serif; color: #3D2B2F; list-style: none; }
.sd-disclosure > summary::-webkit-details-marker { display: none; }
.sd-disclosure > summary::before { content: '▸ '; color: #9DAC92; }
.sd-disclosure[open] > summary::before { content: '▾ '; }
.sd-disclosure > *:not(summary) { margin-bottom: 12px; }
/* right rail */
.sd-rail { display: flex; flex-direction: column; gap: 16px; }
.sd-rail-card, .sd-rail-tip { background: #fff; border: 1px solid #ece3d6; border-radius: 16px; padding: 18px 20px; }
.sd-rail-eyebrow { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: #7A6B6E; font-weight: 700; margin: 0 0 10px; }
.sd-rail-tip { background: #FEF2EF; border-color: #F4573A; }
.sd-rail-tip .sd-rail-eyebrow { color: #C64327; }
.sd-rail-tip p { font-size: 14px; line-height: 1.5; color: #3D2B2F; margin: 0; }
.sd-lesson-foot { margin-top: 26px; }
/* embedded journal */
.sd-journal { background: #F7EDE2; border: 1px solid #ece3d6; border-radius: 18px; padding: 24px 26px; margin: 26px 0 0; }
.sd-journal-fields { display: grid; gap: 16px; margin: 14px 0; }
.sd-journal-field label { display: block; margin-bottom: 6px; }
.sd-journal-field textarea { width: 100%; border: 1px solid #d9ccbf; border-radius: 12px; padding: 12px; font: inherit; background: #fff; min-height: 108px; }
.sd-journal-print { position: absolute; left: -10000px; top: 0; width: 100%; }
.sd-note-print { margin: 10px 0; }

/* --- responsive --- */
@media (max-width: 900px) {
  .sd-shell { grid-template-columns: 1fr; }
  .sd-topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; background: #F6F1E9; border-bottom: 1px solid #e6ded2; position: sticky; top: 0; z-index: 30; }
  .sd-topbar-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; font: 600 14px 'DM Sans', sans-serif; color: #3D2B2F; cursor: pointer; }
  .sd-topbar-btn svg { width: 18px; height: 18px; }
  .sd-topbar-brand { font-size: 13px; color: #7A6B6E; }
  .sd-sidebar { display: none; position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 50; box-shadow: 0 0 50px rgba(61,43,47,.28); }
  .sd-shell.menu-open .sd-sidebar { display: flex; }
  .sd-main { padding: 20px 16px 60px; max-width: none; }
  .sd-lesson-grid { grid-template-columns: 1fr; }
}

/* --- print: only the dedicated journal note region --- */
@media print {
  body.printing-journal * { visibility: hidden !important; }
  body.printing-journal .sd-journal-print, body.printing-journal .sd-journal-print * { visibility: visible !important; }
  body.printing-journal .sd-journal-print { position: static !important; left: auto !important; }
}

/* round-6 specificity overrides (beat base #rl-sd-app h1/h2/h3/a/p element rules) */
#rl-sd-app .sd-today-title { font-size: clamp(32px, 4.5vw, 46px); margin: 4px 0 12px; }
#rl-sd-app .sd-hero-title { font-size: clamp(30px, 4vw, 40px); margin: 12px 0 4px; }
#rl-sd-app .sd-support-title, #rl-sd-app .sd-section-title { font-size: 26px; margin: 0 0 10px; }
#rl-sd-app .sd-card-title { font-size: 24px; margin: 0 0 3px; }
#rl-sd-app .sd-childsum-title { font-size: 22px; margin: 2px 0 6px; }
#rl-sd-app .sd-break-title { font-size: 20px; margin: 0; }
#rl-sd-app .sd-step-title { font-family: 'DM Sans', system-ui, sans-serif; font-size: 16px; font-weight: 600; margin: 4px 0 8px; }
#rl-sd-app .sd-support-block h3, #rl-sd-app .sd-need-inline h3 { font-family: 'DM Sans', system-ui, sans-serif; font-size: 15px; font-weight: 600; margin: 0 0 6px; }
#rl-sd-app .sd-back-rl { color: #7A6B6E; }
#rl-sd-app .sd-navitem.active { color: #C64327; }
#rl-sd-app .sd-hero-summary .prose p, #rl-sd-app .sd-support p, #rl-sd-app .sd-step-body p, #rl-sd-app .sd-childsum p { margin: 6px 0; }
#rl-sd-app .sd-link-back, #rl-sd-app .sd-link-next, #rl-sd-app .sd-navitem { text-decoration: none; }

/* inline icons: constrain against the base #rl-sd-app svg{width:100%} rule */
#rl-sd-app svg.sd-ico { width: 1em; height: 1em; display: inline-block; vertical-align: -0.14em; flex: none; }
#rl-sd-app .sd-card-icon { font-size: 20px; }
#rl-sd-app .sd-break-icon { font-size: 18px; }
#rl-sd-app .sd-step-num { font-size: 14px; }
#rl-sd-app .sd-adjust-btn { font-size: 15px; }
#rl-sd-app .sd-card-meta { font-size: 13px; }

/* ============================================================
   CORRECTION PASS (round 7): exact Tabler icons + holders,
   exact ruby/white cascade, combined-view layout, passage
   reader, and the reference journal.
   ============================================================ */

/* rounded-square icon holders (sage tint), Tabler glyphs */
#rl-sd-app .sd-card-icon { width: 40px; height: 40px; border-radius: 10px; background: rgba(107,148,103,.12); color: #6B9467; font-size: 20px; }
#rl-sd-app .sd-break-icon { width: 38px; height: 38px; border-radius: 10px; background: rgba(47,58,41,.30); color: #f3f6ef; font-size: 20px; }
#rl-sd-app .sd-navitem svg, #rl-sd-app .sd-topbar-btn svg { stroke-width: 2; }

/* exact ruby/white — component rules scoped under #rl-sd-app to beat the button reset */
#rl-sd-app .sd-adjust-btn { background: #F4573A; color: #fff; }
#rl-sd-app .sd-adjust-btn:hover { background: #F4573A; color: #fff; }
#rl-sd-app .sd-seltab.active, #rl-sd-app .sd-seltab.active:hover { background: #F4573A; color: #fff; border-color: #F4573A; }
#rl-sd-app .sd-hero-pill { background: #F4573A; color: #fff; }
#rl-sd-app .sd-step-num { background: #F4573A; color: #fff; }
#rl-sd-app .sd-hero-eyebrow, #rl-sd-app .sd-support-eyebrow, #rl-sd-app .sd-steps-eyebrow, #rl-sd-app .sd-journal-sub { color: #F4573A; }
#rl-sd-app .sd-link-back, #rl-sd-app .sd-link-next { color: #F4573A; }
#rl-sd-app .sd-navitem.active { color: #F4573A; }
#rl-sd-app .sd-navitem.active svg { color: #F4573A; }
#rl-sd-app .sd-hero-summary-text { font-size: 15px; line-height: 1.55; color: #4a3b39; margin: 4px 0 0; }
/* Tips: solid ruby fill, white icon/heading/body (restored) */
#rl-sd-app .sd-rail-tip { background: #F4573A; border-color: #F4573A; color: #fff; }
#rl-sd-app .sd-rail-tip .sd-rail-eyebrow { color: #fff; display: flex; align-items: center; gap: 7px; }
#rl-sd-app .sd-rail-tip .sd-rail-eyebrow svg { color: #fff; }
#rl-sd-app .sd-rail-tip p { color: #fff; margin: 0; }

/* top grid + full-width steps + combined learner blocks */
#rl-sd-app .sd-lesson-top { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 26px; align-items: start; }
#rl-sd-app .sd-steps { margin-top: 24px; }
#rl-sd-app .sd-learner-block { border-top: 1px solid #efe7db; padding-top: 14px; margin-top: 16px; }
#rl-sd-app .sd-learner-block:first-child { border-top: 0; padding-top: 0; margin-top: 4px; }
#rl-sd-app .sd-step-lead { color: #5b4a48; margin: 0 0 8px; }
#rl-sd-app .sd-support-block h3 { color: #3D2B2F; }

/* material chips */
#rl-sd-app .sd-chips { display: flex; flex-wrap: wrap; gap: 8px; }
#rl-sd-app .sd-chip { display: inline-flex; align-items: center; gap: 7px; background: #F4F0E8; border: 1px solid #e6ded2; border-radius: 20px; padding: 7px 13px; font: 500 13px 'DM Sans', sans-serif; color: #3D2B2F; }
#rl-sd-app .sd-chip svg { color: #6B9467; width: 16px; height: 16px; }
#rl-sd-app button.sd-chip-link { cursor: pointer; }
#rl-sd-app button.sd-chip-link:hover { border-color: #9DAC92; }

/* passage / source reader */
#rl-sd-app .sd-passage-wrap { margin: 12px 0 2px; }
#rl-sd-app .sd-passage { background: #fff; border: 1px solid #e7ddcd; border-radius: 14px; }
#rl-sd-app .sd-passage > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 9px; padding: 13px 16px; font: 700 12px 'DM Sans', sans-serif; letter-spacing: 1.5px; text-transform: uppercase; color: #7A6B6E; }
#rl-sd-app .sd-passage > summary::-webkit-details-marker { display: none; }
#rl-sd-app .sd-passage > summary svg { color: #6B9467; width: 18px; height: 18px; }
#rl-sd-app .sd-reader { padding: 2px 22px 20px; max-width: 62ch; }
#rl-sd-app .sd-reader-head { font-size: 13px; letter-spacing: .3px; color: #7A6B6E; margin: 6px 0 12px; }
#rl-sd-app .sd-reader-before { background: rgba(157,172,146,.16); border-radius: 10px; padding: 12px 16px; font-size: 15px; color: #3D2B2F; margin: 8px 0 16px; }
#rl-sd-app .sd-reader-para { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 20px; line-height: 1.6; color: #3D2B2F; margin: 12px 0; }
#rl-sd-app .sd-reader-note { font-size: 13px; font-style: italic; color: #7A6B6E; margin: 14px 0; }
#rl-sd-app .sd-reader-source { font-size: 12px; color: #9a8b7e; margin-top: 18px; border-top: 1px solid #efe7db; padding-top: 8px; }
#rl-sd-app .sd-reader .prose p { font-family: 'DM Sans', system-ui, sans-serif; font-size: 15px; }
#rl-sd-app .sd-passage-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 8px 2px 2px; }
#rl-sd-app .sd-passage-print { display: inline-flex; align-items: center; gap: 6px; color: #F4573A; font-weight: 400; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }
#rl-sd-app .sd-passage-print svg { color: #6B9467; width: 16px; height: 16px; }
#rl-sd-app .sd-answers > summary { color: #3D2B2F; }

/* journal (reference 03) */
#rl-sd-app .sd-journal { background: #FBF8F3; border: 1px solid #ece3d6; border-radius: 18px; padding: 26px 28px; margin: 28px 0 0; }
#rl-sd-app .sd-journal-head { display: flex; align-items: center; gap: 11px; }
#rl-sd-app .sd-journal-icon { color: #9DAC92; font-size: 26px; display: inline-flex; }
#rl-sd-app .sd-journal-title { font-family: 'Cormorant Garamond', serif; font-size: 30px; font-weight: 500; margin: 0; color: #3D2B2F; }
#rl-sd-app .sd-journal-sub { font: 700 12px 'DM Sans', sans-serif; letter-spacing: 2px; margin: 4px 0 8px; }
#rl-sd-app .sd-journal-note { font-size: 14px; color: #9a8b7e; margin: 0 0 18px; max-width: 72ch; }
#rl-sd-app .sd-journal-cards { display: flex; flex-direction: column; gap: 16px; }
#rl-sd-app .sd-journal-card { background: #fff; border: 1px solid rgba(157,172,146,.4); border-radius: 14px; padding: 18px 22px; }
#rl-sd-app .sd-journal-id { font: 700 16px 'DM Sans', sans-serif; color: #3D2B2F; margin: 0 0 10px; }
#rl-sd-app .sd-journal-prompt { font-family: 'Caveat', cursive; font-size: 21px; line-height: 1.3; color: #8a9a7e; margin: 0 0 10px; }
#rl-sd-app .sd-journal-card textarea { width: 100%; background: #FDFAF7; border: 1px solid #e4dcd2; border-radius: 12px; padding: 14px; min-height: 120px; font: inherit; color: #3D2B2F; }
#rl-sd-app .sd-journal-print-btn { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; color: #7d8e72; font: 600 15px 'DM Sans', sans-serif; cursor: pointer; margin-top: 16px; padding: 6px 0; }
#rl-sd-app .sd-journal-print-btn svg { color: #7d8e72; width: 18px; height: 18px; }

@media (max-width: 900px) {
  #rl-sd-app .sd-lesson-top { grid-template-columns: 1fr; }
}

/* ===== FINAL POLISH (round 8) ===== */
/* break card: BREAK above, icon aligned with the caption line */
#rl-sd-app .sd-break { display: block; }
#rl-sd-app .sd-break-row { display: flex; align-items: center; gap: 14px; }
#rl-sd-app .sd-break-eyebrow { margin: 0 0 8px; }
#rl-sd-app .sd-break-title { margin: 0; }
/* journal: LEARNINGS label above the notebook + My Journal, 14px beneath the label */
#rl-sd-app .sd-journal-sub { margin: 0 0 14px; }
#rl-sd-app .sd-journal-head { margin-top: 0; }
/* printable-resources eyebrow with printer icon */
#rl-sd-app .sd-rail-eyebrow-ico { display: flex; align-items: center; gap: 7px; }
#rl-sd-app .sd-rail-eyebrow-ico svg { color: #6B9467; width: 15px; height: 15px; }
#rl-sd-app .sd-rail .print-list-items li { padding: 7px 0; }
/* soft pill disclosures (Answers & teaching notes / blend): cream pill → white panel, sage icon, no underline */
#rl-sd-app .sd-disclosure { background: #F4F0E8; border: 1px solid #e6ded2; border-radius: 14px; margin: 12px 0; padding: 0; overflow: hidden; }
#rl-sd-app .sd-disclosure > summary { display: flex; align-items: center; gap: 9px; padding: 12px 18px; font: 600 14px 'DM Sans', sans-serif; color: #3D2B2F; list-style: none; text-decoration: none; cursor: pointer; }
#rl-sd-app .sd-disclosure > summary::-webkit-details-marker { display: none; }
#rl-sd-app .sd-disclosure > summary::before { content: '＋'; color: #6B9467; font-weight: 700; font-size: 15px; }
#rl-sd-app .sd-disclosure[open] > summary::before { content: '－'; }
#rl-sd-app .sd-disclosure[open] { background: #fff; }
#rl-sd-app .sd-disclosure[open] > summary { background: #F4F0E8; }
#rl-sd-app .sd-disclosure > *:not(summary) { padding: 4px 18px 14px; margin: 6px 0; }
#rl-sd-app .sd-disclosure > *:not(summary):first-of-type { margin-top: 10px; }
/* top grid never stretches the teaching card to the rail */
#rl-sd-app .sd-lesson-top { align-items: start; }
#rl-sd-app .sd-obj-line { font-size: 15px; margin: 6px 0; }
/* waitlist: no visible label, 16px gap before the button */
#rl-sd-app .sd-waitlist-form { display: block; }
#rl-sd-app .sd-waitlist-input { width: 100%; max-width: 460px; margin: 0 0 16px; display: block; }

/* required parent-email gate */
#rl-sd-app .sd-access { margin: 6px 0 16px; }
#rl-sd-app .sd-access-label { display: block; font-size: 14px; font-weight: 600; color: #3D2B2F; margin-bottom: 6px; }
#rl-sd-app .sd-access-input { width: 100%; max-width: 460px; display: block; margin: 0; }
#rl-sd-app .sd-access-error { color: #B23B2E; font-size: 14px; margin: 8px 0 0; }
#rl-sd-app .sd-access-optin { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; max-width: 460px; font-size: 13.5px; line-height: 1.5; color: #3D2B2F; cursor: pointer; }
#rl-sd-app .sd-access-optin input[type="checkbox"] { margin-top: 3px; flex: 0 0 auto; width: 16px; height: 16px; accent-color: #6B9467; }
#rl-sd-app .sd-access-note { font-size: 12px; color: #7a6a5e; margin: 8px 0 0; line-height: 1.5; max-width: 460px; }
#rl-sd-app .sd-access-note a { color: #6B9467; text-decoration: underline; text-underline-offset: 2px; }
/* Optional-marketing outcome notices on Today */
#rl-sd-app .sd-mk-notice { border-radius: 12px; padding: 12px 16px; margin: 0 0 16px; font-size: 14px; line-height: 1.5; }
#rl-sd-app .sd-mk-retry { background: #F8EEE4; border: 1px solid #e6ddce; color: #5b4a48; }
#rl-sd-app .sd-mk-done { background: rgba(157,172,146,.16); border: 1px solid #cdd8c4; color: #4c6047; }
#rl-sd-app .sd-mk-retry-btn { background: none; border: none; padding: 0; color: #F4573A; font: 600 14px 'DM Sans', sans-serif; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
/* Unified waitlist confirmation card (intake opt-in OR embedded signup) */
#rl-sd-app .sd-confirm-card { background: #F4F0E8; border: 1px solid #e6ded2; border-radius: 16px; padding: 24px 26px; max-width: 520px; }
#rl-sd-app .sd-confirm-title { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 26px; font-weight: 600; color: #4c6047; margin: 0 0 8px; }
#rl-sd-app .sd-confirm-body { font-size: 15px; line-height: 1.55; color: #3D2B2F; margin: 0 0 8px; }
#rl-sd-app .sd-confirm-sub { font-size: 13px; line-height: 1.5; color: #6b5a4f; margin: 0; }

/* Victory Garden gallery */
#rl-sd-app .sd-vg { margin: 16px 0 6px; }
#rl-sd-app .sd-vg-title { font-family: 'Cormorant Garamond', serif; font-size: 20px; font-weight: 500; margin: 0 0 6px; }
#rl-sd-app .sd-vg-intro { font-size: 15px; color: #4a3b39; }
#rl-sd-app .sd-vg-details > summary svg { color: #6B9467; width: 17px; height: 17px; }
#rl-sd-app .sd-vg-prompt { font-size: 14px; color: #5b4a48; font-style: italic; }
#rl-sd-app .sd-vg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
#rl-sd-app .sd-vg-fig { margin: 0; }
#rl-sd-app .sd-vg-fig img { width: 100%; border-radius: 10px; display: block; background: #eae4da; }
#rl-sd-app .sd-vg-cap { display: block; font-size: 13px; color: #3D2B2F; margin: 7px 0 2px; }
#rl-sd-app .sd-vg-credit { display: block; font-size: 11px; color: #9a8b7e; }
#rl-sd-app .sd-vg-compare { margin-top: 14px; max-width: 62%; }
#rl-sd-app .sd-vg-sources { margin-top: 14px; }
@media (max-width: 640px) { #rl-sd-app .sd-vg-grid { grid-template-columns: 1fr; } #rl-sd-app .sd-vg-compare { max-width: 100%; } }

/* Suppress the ruby focus ring on headings we focus programmatically (skip-to-content / screen
   change). These are moved-to by script, not keyboard-tabbed, so no visible outline is expected. */
#rl-sd-app h1[tabindex="-1"]:focus, #rl-sd-app h1[tabindex="-1"]:focus-visible { outline: none; }

/* Answers & teaching notes: one compact body wrapper (overrides the generic disclosure padding) */
#rl-sd-app .sd-answers .sd-answers-body { padding: 16px 18px 24px; margin: 0; }
#rl-sd-app .sd-answers .sd-answers-body .prose p,
#rl-sd-app .sd-answers .sd-answers-body > p { font-size: 15px; line-height: 1.55; color: #3D2B2F; margin: 0; }
#rl-sd-app .sd-answers .sd-answers-body .prose p + p { margin-top: 12px; }
#rl-sd-app .sd-answers .sd-answers-body > p { margin-top: 12px; }
#rl-sd-app .sd-answers .sd-answers-body .sd-answers-note { font-size: 13px; color: #7A6B6E; }
#rl-sd-app .sd-answers .sd-answers-body .sd-answers-action { display: flex; margin-top: 16px; margin-bottom: 0; }
#rl-sd-app .sd-answers .sd-answers-body .sd-answers-action .packet-link { font-size: 14px; }
#rl-sd-app .sd-answers { margin-bottom: 16px; }

/* Printable resources: one group per learner (name · grade heading) */
#rl-sd-app .sd-res-group { margin: 4px 0 14px; }
#rl-sd-app .sd-res-group:last-of-type { margin-bottom: 6px; }
#rl-sd-app .sd-res-head { font: 600 13px 'DM Sans', sans-serif; letter-spacing: .3px; color: #3D2B2F; margin: 0 0 2px; }
#rl-sd-app .sd-res-group .print-list-items { margin: 0; }
#rl-sd-app .sd-res-sub { border-top: none !important; padding: 0 0 4px !important; }
#rl-sd-app .sd-res-sub .small { color: #7A6B6E; }
#rl-sd-app .sd-res-shared { border-top: 1px solid #efe7db; padding-top: 12px; }
#rl-sd-app .sd-res-shared-head { color: #7A6B6E; }

/* Victory Garden photo print action (gallery controls + shared-resource rail) */
#rl-sd-app .sd-vg-controls { margin-top: 12px; }
#rl-sd-app .sd-vg-print { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; padding: 0; cursor: pointer; color: #F4573A; font: 400 15px 'DM Sans', sans-serif; text-decoration: underline; text-underline-offset: 3px; }
#rl-sd-app .sd-vg-print svg { color: #6B9467; width: 16px; height: 16px; }
#rl-sd-app .sd-res-shared .sd-vg-print { font-size: 14px; }

/* English reader: excerpt scope line + visible "Before you read" label in the callout */
#rl-sd-app .sd-reader-scope { font-size: 12px; color: #7A6B6E; margin: 2px 0 12px; }
#rl-sd-app .sd-reader-before .sd-reader-before-label { color: #4c6047; margin-right: 2px; }

/* History poster source cards (in the reader) */
#rl-sd-app .sd-poster-intro .prose p { font-family: 'DM Sans', system-ui, sans-serif; font-size: 15px; }
#rl-sd-app .sd-poster-fig { margin: 18px 0 6px; }
#rl-sd-app .sd-poster-img { width: 100%; max-width: 320px; height: auto; display: block; border-radius: 8px; border: 1px solid #e6ded2; background: #efe7db; }
#rl-sd-app .sd-poster-cap { margin-top: 8px; max-width: 44ch; }
#rl-sd-app .sd-poster-title { font: 600 14px 'DM Sans', sans-serif; color: #3D2B2F; margin: 0 0 2px; }
#rl-sd-app .sd-poster-quote { font-style: italic; font-size: 14px; color: #3D2B2F; margin: 2px 0; }
#rl-sd-app .sd-poster-meta { font-size: 12px; color: #7a6a5e; margin: 2px 0; }
#rl-sd-app .sd-poster-src { display: inline-block; font-size: 12px; color: #6B9467; text-decoration: underline; text-underline-offset: 2px; margin-top: 2px; }

/* Science reading: 5px between consecutive paragraphs (beats generic .prose p / .sd-step-body p) */
#rl-sd-app .sd-sci-reading .prose p { margin: 0; }
#rl-sd-app .sd-sci-reading .prose p + p { margin-top: 5px; }

/* Today: paired Adjust + Print actions */
#rl-sd-app .sd-today-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; margin-top: 0; }
/* Print action matches Adjust in size/alignment; helper sits below without recentring the button. */
#rl-sd-app .sd-print-wrap { display: flex; flex-direction: column; align-items: flex-start; margin-top: 14px; }
#rl-sd-app .sd-print-btn { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: #3D2B2F; border: 1.5px solid #e0d6c6; border-radius: 30px; padding: 11px 20px; font: 600 15px 'DM Sans', sans-serif; line-height: 1; min-height: 44px; cursor: pointer; }
#rl-sd-app .sd-print-btn:hover { border-color: #cfc2ad; background: #fbf7f0; }
#rl-sd-app .sd-print-btn svg { color: #6B9467; width: 17px; height: 17px; }
#rl-sd-app .sd-adjust-btn { min-height: 44px; line-height: 1; box-sizing: border-box; }
#rl-sd-app .sd-print-help { margin: 8px 0 0; font-size: 12px; font-style: italic; color: #7a6a5e; max-width: 320px; }
@media (max-width: 560px) { #rl-sd-app .sd-today-actions { flex-direction: column; align-items: stretch; } #rl-sd-app .sd-print-wrap { margin-top: 0; } #rl-sd-app .sd-adjust-btn, #rl-sd-app .sd-print-btn { width: 100%; justify-content: center; } }

/* Shared badge on a Today card */
#rl-sd-app .sd-shared-badge { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin: 6px 0 2px; }
#rl-sd-app .sd-shared-pill { display: inline-flex; align-items: center; gap: 5px; background: rgba(157,172,146,.18); color: #4c6047; border-radius: 999px; padding: 3px 10px; font: 600 11px 'DM Sans', sans-serif; letter-spacing: .3px; }
#rl-sd-app .sd-shared-pill svg { width: 13px; height: 13px; color: #6B9467; }
#rl-sd-app .sd-shared-sub { font-size: 12.5px; color: #6b5a4f; }
#rl-sd-app .sd-shared-with { margin-left: 10px; font: 500 12px 'DM Sans', sans-serif; color: #6B9467; }

/* Ready-to-print dialog */
#rl-sd-app ~ .sd-pack-overlay, .sd-pack-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(45,32,34,.42); display: flex; align-items: center; justify-content: center; padding: 20px; }
.sd-pack-dialog { position: relative; background: #FBF7F0; border-radius: 18px; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; padding: 26px 26px 22px; box-shadow: 0 20px 60px rgba(45,32,34,.32); font-family: 'DM Sans', system-ui, sans-serif; }
.sd-pack-close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border: none; background: #efe7db; border-radius: 999px; font-size: 20px; line-height: 1; color: #3D2B2F; cursor: pointer; }
.sd-pack-close:hover { background: #e4d9c8; }
.sd-pack-title { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 26px; font-weight: 600; color: #3D2B2F; margin: 0 32px 6px 0; }
.sd-pack-help { font-size: 14px; line-height: 1.5; color: #5b4a48; margin: 0 0 16px; }
.sd-pack-list { display: flex; flex-direction: column; gap: 10px; }
.sd-pack-row { background: #fff; border: 1px solid #ece3d6; border-radius: 12px; padding: 14px 16px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 12px; }
.sd-pack-rowmain { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sd-pack-ico { display: inline-flex; color: #6B9467; }
.sd-pack-ico svg { width: 18px; height: 18px; }
.sd-pack-label { font-size: 14px; font-weight: 600; color: #3D2B2F; }
.sd-pack-action { background: #F4573A; color: #fff; border: none; border-radius: 999px; padding: 9px 18px; font: 600 13px 'DM Sans', sans-serif; cursor: pointer; white-space: nowrap; }
.sd-pack-action:hover { background: #e04a2f; }
.sd-pack-action:disabled { opacity: .6; cursor: default; }
.sd-pack-fallback { grid-column: 1 / -1; font-size: 12px; color: #8a6d3b; margin: 2px 0 0; line-height: 1.45; }
.sd-pack-status { grid-column: 1 / -1; font-size: 13px; color: #5b4a48; min-height: 0; }
.sd-pack-prep { color: #6b5a4f; font-style: italic; }
.sd-pack-ready { color: #4c6047; font-weight: 600; margin-right: 10px; }
.sd-pack-err { color: #B23B2E; }
.sd-pack-links { display: inline-flex; gap: 14px; margin-top: 6px; }
.sd-pack-open, .sd-pack-dl { color: #F4573A; font-weight: 600; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.sd-pack-retry { margin-left: 10px; background: none; border: none; color: #F4573A; font-weight: 600; font-size: 13px; text-decoration: underline; cursor: pointer; }
.sd-pack-note { font-size: 12px; color: #8a7a6e; margin: 16px 0 0; line-height: 1.5; }
@media (max-width: 520px) { .sd-pack-row { grid-template-columns: 1fr; } .sd-pack-action { justify-self: start; } }
