/* Mawsim · Choosing Well. Shared styles live in /heart.css (+ /dua/dua.css for chips). Monochrome, full width, room to breathe. */
.cw-page main > .card.lead .chips { margin: 16px 0 12px; }

/* Arabic for the Qur'an and hadith quotations and the du'a. */
.cw-page figure.ibq p.ar, .cw-page blockquote p.ar { font-size: 1.6rem; line-height: 2.1; text-align: right; }
.cw-page figure.ibq p.tl { line-height: 1.7; }
.cw-page .arline .ar { font-size: 1.4rem; }
.cw-page .helpbox { scroll-margin-top: 16px; }

/* The heading and introduction use the full width of the content grid; the text stays at a comfortable size and line height. */
.cw-page main > .intro { max-width: none; }
.cw-page .intro p { max-width: none; font-size: 1.05rem; line-height: 1.7; margin: 0 0 12px; }
.cw-page .intro h1 { margin-bottom: 12px; }

/* Folded evidence and folded secondary explanation: the summary names what is inside, so every reference stays reachable. */
.cw-page details.evmore, .cw-page details.secfold { margin: 12px 0 4px; }
.cw-page details.evmore > summary, .cw-page details.secfold > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; padding: 8px 4px; color: var(--muted); font-size: .95rem; line-height: 1.4; list-style-position: inside; border-radius: 8px; }
.cw-page details.secfold > summary { font: 600 1.05rem/1.35 var(--serif); color: var(--ink); }
.cw-page details.evmore > summary:hover, .cw-page details.secfold > summary:hover { color: var(--ink); }
.cw-page details.evmore > summary:focus-visible, .cw-page details.secfold > summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; color: var(--ink); }
.cw-page details.evmore[open] > summary, .cw-page details.secfold[open] > summary { margin-bottom: 8px; }

/* A way straight to the one response, for the phone, where it comes after the reading. */
.cw-page .skipact { margin: 0 0 16px; grid-column: 1 / -1; }
@media (min-width: 960px) { .cw-page .skipact { display: none; } }
.cw-page .card.act:focus { outline: none; }
.cw-page .card.act:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Step rail: where you are in the reading, nothing more. One row always; on a narrow screen the row scrolls sideways inside itself, so the page never does. */
.cw-page .steprail { display: flex; flex-wrap: nowrap; gap: 8px; margin: 12px 0 24px; padding: 6px; max-width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
@media (min-width: 960px) { .cw-page main > .steprail { grid-column: 1 / -1; } }
.cw-page .steprail a { flex: 1 1 auto; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); text-decoration: none; font-size: .95rem; font-variant-numeric: tabular-nums; }
.cw-page .steprail a:hover { border-color: var(--ink); color: var(--ink); }
.cw-page .steprail a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.cw-page .steprail a[aria-current="step"] { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; }

/* Home: the journey line, and step 7 as its own call to action. Seven cards: in three columns six fill two rows and the seventh spans the row; in two columns the same. */
.cw-page .journeyline { margin: 8px 0 16px; max-width: none; }
.cw-page .secgrid { gap: 14px; }
.cw-page .sec.cta { border: 2px solid var(--ink); padding: 22px 24px; min-height: 120px; }
.cw-page .sec.cta strong { font-size: 1.4rem; }
.cw-page .sec.cta .go { margin-top: 8px; display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.cw-page .sec:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.cw-page .plansaved { margin: 12px 0 20px; }
.cw-page .linkbtn { font: inherit; color: var(--ink); background: none; border: 0; padding: 12px 4px; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cw-page .linkbtn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Reading steps: the reading takes the wider column and the sources sit beside it; the worksheet is a full-width card below. */
.cw-page .card p { line-height: 1.7; }
.cw-page .card h3 { font: 600 1.15rem/1.35 var(--serif); margin: 26px 0 8px; }
.cw-page .card h3:first-child { margin-top: 0; }
.cw-page .card ul.trylist li { margin: 8px 0; line-height: 1.65; }
.cw-page .card > p.eyebrow { margin-bottom: 8px; }
.cw-page .secnav { margin: 32px 0 40px; }
@media (min-width: 960px) {
  .cw-page .cols { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px; }
  .cw-page .cols > div:last-child > .card.act { order: -1; }
}
.cw-page .btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.cw-page .btn.small { min-height: 44px; padding: 8px 16px; font-size: .9rem; }

/* The worksheet */
.cw-page main > .card.ws, .cw-page main > .card.plan { margin: 24px 0; }
.cw-page .ws h2 { font-size: 1.35rem; line-height: 1.35; margin: 0 0 8px; }
.cw-page .ws .field, .cw-page .plan .field { margin: 16px 0 0; }
.cw-page .ws textarea { width: 100%; min-height: 112px; padding: 12px 14px; font-size: 1rem; line-height: 1.6; }
.cw-page .ws input[type="text"], .cw-page .ws input[type="date"], .cw-page .ws select { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; min-height: 44px; }
.cw-page .ws input[type="date"] { max-width: 18rem; }
.cw-page .ws textarea:focus-visible, .cw-page .ws input:focus-visible, .cw-page .ws select:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.cw-page .ws h3 { font: 600 1.15rem/1.35 var(--serif); margin: 28px 0 8px; }
.cw-page .wsgrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 24px; }
@media (min-width: 900px) { .cw-page .wsgrid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cw-page #wsHint { margin: 16px 0 0; min-height: 1.4em; }

/* Step 1: three ticks, each its own bordered row with a comfortable target. */
.cw-page .checks { display: grid; gap: 12px; margin: 20px 0 0; }
.cw-page .check { display: flex; align-items: flex-start; gap: 14px; min-height: 44px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; line-height: 1.6; }
.cw-page .check input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--ink); }
.cw-page .check:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.cw-page .respbox { border: 1px dashed var(--line); border-radius: 12px; padding: 14px 18px; margin: 16px 0 0; }
.cw-page .respbox p { margin: 6px 0; }

.cw-page .matter { border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; margin: 16px 0 0; }
.cw-page .matter .big { margin: 8px 0 0; overflow-wrap: anywhere; }
.cw-page .pf { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin-top: 8px; }
.cw-page .pf .field { margin: 8px 0 0; flex: 1 1 14rem; }
.cw-page .hardresp { border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; margin: 16px 0 0; }
.cw-page .hardresp p { margin: 0; }

/* The du'a card with the matter written in. */
.cw-page .duacard { display: grid; gap: 16px; margin: 12px 0 0; }
.cw-page .duapart { border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; }
.cw-page .duapart p { margin: 0; }
.cw-page .duapart p.ar { font-size: 1.5rem; line-height: 2.1; text-align: right; }
.cw-page .duapart p.tl { margin-top: 8px; line-height: 1.7; overflow-wrap: anywhere; }
.cw-page .duapart p.en { margin-top: 8px; line-height: 1.7; overflow-wrap: anywhere; }
.cw-page .duapart p.techtag { margin-bottom: 8px; }
.cw-page .duamatter { margin: 0 0 4px; overflow-wrap: anywhere; }
.cw-page .duaref { margin: 16px 0 0; color: var(--muted); font-size: .92rem; line-height: 1.6; }
.cw-page .duaref a { color: var(--ink); }
.cw-page main > .card.duasec { margin: 24px 0; }
.cw-page .summary .sumdua .en { display: block; line-height: 1.7; margin-top: 4px; }

/* The one-page card: a title, then each group with its labelled lines. */
.cw-page .summary { border: 1px dashed var(--line); border-radius: 12px; padding: 22px 24px; margin: 8px 0 24px; max-width: 46rem; }
.cw-page .summary .sumtitle { margin: 0; font: 600 1.4rem/1.3 var(--serif); }
.cw-page .summary .sumsub { margin: 4px 0 8px; color: var(--muted); font-size: .9rem; }
.cw-page .summary .sumgroup { margin: 24px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.cw-page .summary h4 { margin: 0 0 8px; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cw-page .summary ul { margin: 0; padding: 0; list-style: none; }
.cw-page .summary li { margin: 0 0 14px; overflow-wrap: anywhere; line-height: 1.6; }
.cw-page .summary li > strong { display: block; }
.cw-page .summary .sumline { display: block; margin-top: 2px; white-space: pre-wrap; }
.cw-page .summary .sumdua { display: block; margin-top: 10px; }
.cw-page .summary .sumdua .ar { display: block; font-size: 1.3rem; line-height: 2; text-align: right; }
.cw-page .summary .sumdua .tl { display: block; line-height: 1.7; }
.cw-page .sumactions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; }
.cw-page .sumactions .btn:disabled { opacity: .5; cursor: default; }
.cw-page #sumStatus { margin: 12px 0 0; min-height: 1.4em; }
.cw-page main > .card.plan#delcard { margin-bottom: 8px; }

@media print {
  @page { margin: 18mm; }
  .cw-page .steprail, .cw-page .helpbox, .cw-page .btn, .cw-page .actions, .cw-page nav.chips, .cw-page .secnav, .cw-page .skipact, .cw-page header.top, .cw-page footer.foot, .cw-page .related { display: none !important; }
  /* The worksheet and the card are never printed with the reading. The card prints only from “Print or save as PDF”. */
  body:not(.print-plan) :is(#ws, #summarycard, #delcard) { display: none !important; }
  body:not(.print-dua) #duasec { display: none !important; }
  /* Folded evidence prints open, with its summary line left out. */
  .cw-page details.evmore::details-content, .cw-page details.secfold::details-content { content-visibility: visible; display: block; }
  .cw-page details.evmore > summary { display: none; }
  /* Printing the du‘a card on its own. */
  body.print-dua :is(header.top, footer.foot) { display: none !important; }
  body.print-dua #view { display: block; max-width: none; }
  body.print-dua #view > :not(#duasec) { display: none !important; }
  body.print-dua #duasec { display: block; border: 0; background: none; backdrop-filter: none; padding: 0; margin: 0; max-width: none; }
  body.print-dua #duasec .nopr { display: none !important; }
  body.print-dua #duasec .duapart { break-inside: avoid; }
  body.print-dua #duasec .duapart p.ar { font-size: 18pt; }
  body.print-plan, body.print-dua { --ink: #000; --bg: #fff; --line: #999; --muted: #444; background: #fff; color: #000; }
  body.print-plan :is(header.top, footer.foot) { display: none !important; }
  body.print-plan #view { display: block; max-width: none; }
  body.print-plan #view > :not(#summarycard) { display: none !important; }
  body.print-plan #summarycard { display: block; border: 0; background: none; backdrop-filter: none; padding: 0; margin: 0; max-width: none; }
  body.print-plan #summarycard .nopr { display: none !important; }
  body.print-plan #summary { border: 0; padding: 0; margin: 0; display: block; max-width: none; column-count: 1; font-size: 12pt; }
  body.print-plan #summary .sumtitle { font-size: 20pt; }
  body.print-plan #summary .sumgroup { break-inside: avoid; border-top-color: #999; }
  body.print-plan #summary li { break-inside: avoid; }
}

/* Past ones and the optional one-week reflection: quiet, same look as the other cards. */
.cw-page .past > details > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font: 600 1.05rem/1.35 var(--serif); }
.cw-page .past > details > summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.cw-page .past > details[open] > summary { margin-bottom: 8px; }
.cw-page .followup .field + .field { margin-top: 12px; }
.cw-page .fusaved { margin: 0 0 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
@media print { .cw-page .past, .cw-page .followup, .cw-page #fucard, .cw-page #newcard { display: none !important; } }
