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

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

/* Long evidence lists fold after three; references stay visible in the summary. */
.ww-page details.evmore { margin: 8px 0 4px; }
.ww-page details.evmore > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; padding: 8px 4px; color: var(--muted); font-size: .92rem; line-height: 1.4; list-style-position: inside; border-radius: 8px; }
.ww-page details.evmore > summary:hover { color: var(--ink); }
.ww-page details.evmore > summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; color: var(--ink); }
.ww-page details.evmore[open] > summary { margin-bottom: 8px; }

/* 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. */
.ww-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) { .ww-page main > .steprail { grid-column: 1 / -1; } }
.ww-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; }
.ww-page .steprail a:hover { border-color: var(--ink); color: var(--ink); }
.ww-page .steprail a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.ww-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 10 as its own call to action. Ten cards: three columns fill nine and the tenth spans the row; in two columns the ninth and tenth both span, so no cell is empty. */
.ww-page .journeyline { margin: 8px 0 16px; max-width: none; }
.ww-page .secgrid { gap: 14px; }
.ww-page .sec.cta { border: 2px solid var(--ink); padding: 22px 24px; min-height: 120px; }
.ww-page .sec.cta strong { font-size: 1.4rem; }
.ww-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; }
.ww-page .sec:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.ww-page .plansaved { margin: 12px 0 20px; }
.ww-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; }
.ww-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. */
.ww-page .card p { line-height: 1.7; }
.ww-page .card h3 { font: 600 1.15rem/1.35 var(--serif); margin: 26px 0 8px; }
.ww-page .card h3:first-child { margin-top: 0; }
.ww-page .card ul.trylist li { margin: 8px 0; line-height: 1.65; }
.ww-page .card > p.eyebrow { margin-bottom: 8px; }
.ww-page .secnav { margin: 32px 0 40px; }
@media (min-width: 960px) {
  .ww-page .cols { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px; }
  .ww-page .cols > div:last-child > .card.act { order: -1; }
}
.ww-page .btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.ww-page .btn.small { min-height: 44px; padding: 8px 16px; font-size: .9rem; }

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

/* Options and factors: one bordered row each, a few fields side by side on a wide screen. */
.ww-page .optrow, .ww-page .facrow { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 16px; padding: 16px 18px 18px; margin: 16px 0 0; border: 1px solid var(--line); border-radius: 12px; }
.ww-page .optrow .field, .ww-page .facrow .field { margin: 8px 0 0; }
.ww-page .rowend { display: flex; justify-content: flex-end; align-items: flex-end; margin-top: 8px; }
@media (min-width: 900px) {
  .ww-page .optrow { grid-template-columns: minmax(0, 3fr) minmax(0, 3fr) auto; align-items: end; }
  .ww-page .optrow .optfacts { grid-column: 1 / -1; }
  .ww-page .facrow { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr) minmax(0, 2fr) minmax(0, 2fr) auto; align-items: end; }
}
.ww-page .ws .actions { margin-top: 16px; }
.ww-page .askq { border: 1px dashed var(--line); border-radius: 12px; padding: 16px 18px; margin: 12px 0 0; }
.ww-page .askq .q { margin: 8px 0 0; line-height: 1.7; overflow-wrap: anywhere; }

/* Three advisers: always three cards, so a wide screen has three columns and no empty cell. */
.ww-page .adgrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin: 16px 0 0; }
@media (min-width: 900px) { .ww-page .adgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } }
.ww-page .adviser { border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px 22px; min-width: 0; }
.ww-page .adviser h3 { margin: 0 0 4px; font-size: 1.15rem; line-height: 1.35; }
.ww-page .adviser .hint { margin: 0 0 4px; }

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

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

@media print {
  @page { margin: 18mm; }
  .ww-page .steprail, .ww-page .helpbox, .ww-page .btn, .ww-page .actions, .ww-page nav.chips, .ww-page .secnav { display: none !important; }
  /* The worksheet and the summary are never printed with the reading. The summary prints only from “Print or save as PDF”. */
  body:not(.print-plan) :is(#ws, #summarycard, #delcard) { display: none !important; }
  body.print-plan { --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; }
  .ww-page details.evmore::details-content { content-visibility: visible; display: block; }
  .ww-page details.evmore > summary { display: none; }
}
