/* Five steps page. Loaded after ../mental-health-meditation/meditation.css (same pattern as /disclaimer/). */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
a:focus-visible,
.table-wrap:focus-visible,
.menu-toggle:focus-visible,
.menu-close:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}
main { width: min(860px, calc(100% - 48px)); }
main section { margin: 0 0 8px; }
main h1 { margin-bottom: 24px; }
main p, main li { line-height: 1.6; }
main section > p { margin: 0 0 16px; }
.intro-sec > p:first-of-type { font-size: 20px; }
.intro-sec ol { margin: 0 0 18px; }
.intro-sec ol li { font-weight: 400; }

/* Disclaimer panel, same ice panel as the other pages' notices */
.safety { margin: 28px 0 8px; padding: 24px 26px 12px; border-left: 8px solid var(--navy); }
.safety h2 { margin-top: 0; font-size: 24px; }
.safety p { margin: 0 0 16px; }
.safety .disc-link { font-weight: 400; }
.safety .disc-link a { color: var(--ink); }

/* At a glance: five numbered cards */
.glance-sec h2 { margin-top: 44px; }
.glance { list-style: none; margin: 0 0 8px; padding: 0; counter-reset: step; display: grid; gap: 12px; }
.glance li {
  counter-increment: step;
  position: relative;
  margin: 0;
  padding: 16px 18px 16px 74px;
  min-height: 72px;
  background: #f2f2f2;
  border-left: 8px solid var(--green);
  font-weight: 300;
}
.glance li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 16px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  line-height: 42px;
  text-align: center;
}
.glance li strong { font-weight: 700; font-size: 20px; }
.glance li a { color: var(--ink); text-underline-offset: 3px; }

/* Step sections */
.step { margin-top: 56px; }
.step > h2 {
  margin: 0 0 20px;
  padding: 14px 20px;
  background: var(--ice);
  border-left: 8px solid var(--green);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.25;
  scroll-margin-top: 16px;
}
.step h3, .week h3 { margin-top: 32px; font-size: 22px; font-weight: 700; color: var(--ink); }
.step ul, .week ul, .sources-sec ul { padding-left: 1.3em; margin: 0 0 18px; }
.step strong, .week strong { font-weight: 700; }
.disc-line {
  padding: 12px 18px;
  background: #f2f2f2;
  border-left: 6px solid var(--navy);
  font-weight: 400;
  font-size: 17px;
}
.disc-line a { color: var(--ink); }

/* Tables: scroll inside the box so the page never scrolls sideways */
.table-wrap { margin: 8px 0 20px; overflow-x: auto; max-width: 100%; border: 1px solid #b9c7cf; background: #fff; }
.table-wrap.wide { width: 100%; }
@media (min-width: 1000px) {
  /* The seven-day table is wider than the text column, so it uses the page width on desktop. */
  .table-wrap.wide { max-width: none; width: min(1180px, calc(100vw - 80px)); margin-left: 50%; transform: translateX(-50%); }
}
.table-wrap table { border-collapse: collapse; width: 100%; font-size: 16px; }
.table-wrap th, .table-wrap td { padding: 10px 12px; border-bottom: 1px solid #d5dde2; text-align: left; vertical-align: top; font-weight: 300; line-height: 1.45; }
.table-wrap thead th, .table-wrap thead td { background: var(--navy); color: #fff; font-weight: 700; border-bottom: 0; }
.table-wrap tbody th { font-weight: 700; background: var(--ice); color: var(--ink); }
.table-wrap tbody tr:last-child th, .table-wrap tbody tr:last-child td { border-bottom: 0; }
.table-wrap table { min-width: 560px; }
.week .table-wrap table { min-width: 1020px; }
.week .table-wrap th[scope="row"], .week .table-wrap thead td:first-child { position: sticky; left: 0; z-index: 1; min-width: 120px; }
.week .table-wrap thead td:first-child { background: var(--navy); }
.week .table-wrap td { min-width: 118px; }
.week .table-wrap td:nth-child(2) { min-width: 190px; }

.sources-sec h2 { margin-top: 56px; }
.sources-sec .sources { font-size: 16px; }
.sources-sec li { font-size: 16px; line-height: 1.5; }

@media (max-width: 999px) {
  main { width: auto; max-width: 640px; padding: 20px 16px 48px; }
  .step { margin-top: 44px; }
  .step > h2 { font-size: 22px; padding: 12px 14px; border-left-width: 6px; }
  .safety { padding: 20px 16px 8px; border-left-width: 6px; }
  .safety h2 { font-size: 22px; }
  .glance li { padding: 14px 14px 14px 62px; border-left-width: 6px; }
  .glance li::before { left: 10px; top: 14px; width: 38px; height: 38px; line-height: 38px; font-size: 20px; }
  .glance li strong { font-size: 18px; }
  .intro-sec > p:first-of-type { font-size: 18px; }
  .table-wrap table { font-size: 15px; }
  .table-wrap th, .table-wrap td { padding: 9px 10px; }
  .week .table-wrap th[scope="row"], .week .table-wrap thead td:first-child { min-width: 104px; max-width: 104px; font-size: 14px; }
  .week .table-wrap td { min-width: 150px; }
  .week .table-wrap td:nth-child(2) { min-width: 200px; }
  .week .table-wrap table { min-width: 1160px; }
  .disc-line { font-size: 16px; padding: 10px 14px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.week .table-wrap thead th { white-space: nowrap; }
.table-wrap:not(.wide) th, .table-wrap:not(.wide) td { min-width: 110px; }
.table-wrap:not(.wide) td:nth-child(2) { white-space: nowrap; }
.table-wrap:not(.wide) table { min-width: 640px; }

/* R1 W-E1 (placement): print so the tables are not clipped. */
@media print {
  .table-wrap, .table-wrap.wide { overflow: visible; }
  .table-wrap table { min-width: 0; table-layout: fixed; font-size: 12px; }
  th, td { word-break: break-word; }
  tr { break-inside: avoid; }
}
/* R1 W-E1 supplement (Developer, CSS only; flagged to the Writer): the exact block above loses to the more specific screen
   min-width / sticky / nowrap rules (.week .table-wrap ..., .table-wrap:not(.wide) ...), so Thu-Sun still ran off the page. */
@media print {
  .week .table-wrap table, .table-wrap:not(.wide) table { min-width: 0; }
  .week .table-wrap th[scope="row"], .week .table-wrap thead td:first-child, .week .table-wrap td, .week .table-wrap td:nth-child(2),
  .table-wrap:not(.wide) th, .table-wrap:not(.wide) td { min-width: 0; max-width: none; position: static; }
  .week .table-wrap thead th, .table-wrap:not(.wide) td:nth-child(2) { white-space: normal; }
  .table-wrap.wide { width: 100%; max-width: 100%; margin-left: 0; transform: none; }
  .week .table-wrap th[scope="row"], .week .table-wrap thead td:first-child { width: 14%; }
  .table-wrap th, .table-wrap td { padding: 6px 6px; }
}
