.wk-page main > .card.lead .chips { margin: 16px 0 12px; }

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

/* Long evidence lists fold after three; references stay visible in the summary. */
.wk-page details.evmore { margin: 8px 0 4px; }
.wk-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; }
.wk-page details.evmore > summary:hover { color: var(--ink); }
.wk-page details.evmore > summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; color: var(--ink); }
.wk-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. */
.wk-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) { .wk-page main > .steprail { grid-column: 1 / -1; } }
.wk-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; }
.wk-page .steprail a:hover { border-color: var(--ink); color: var(--ink); }
.wk-page .steprail a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.wk-page .steprail a[aria-current="step"] { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; }

/* Home: the journey line. Nine cards in .secgrid.three: three across, two across (the ninth spans both), or one, so no cell is ever empty. */
.wk-page .journeyline { margin: 8px 0 16px; max-width: none; }
.wk-page .secgrid { gap: 14px; }
.wk-page .sec:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Reading steps: the reading takes the wider column; Reflect and Act sit beside the start of it. On a phone the order stays Learn, sources, Reflect, Act. */
.wk-page .card p { line-height: 1.7; }
.wk-page .card h3 { font: 600 1.15rem/1.35 var(--serif); margin: 26px 0 8px; }
.wk-page .card h3:first-child { margin-top: 0; }
.wk-page .card ul.trylist li { margin: 8px 0; line-height: 1.65; }
.wk-page .card > p.eyebrow { margin-bottom: 8px; }
.wk-page .card.lead h2 { font-size: 1.35rem; line-height: 1.35; }
.wk-page .card.act p.big { font-size: 1.2rem; }
.wk-page .secnav { margin: 32px 0 40px; }
@media (min-width: 960px) {
  .wk-page .cols { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px; }
  .wk-page .cols > div:last-child > .card.lead { order: -2; }
  .wk-page .cols > div:last-child > .card.act { order: -1; }
}

/* Add to my plan: a toggle under each step's one response. */
.wk-page .actadd { margin-top: 16px; }
.wk-page .addstate { display: none; }
.wk-page .actadd .hint { margin: 10px 0 0; }
.wk-page .btn.small { min-height: 44px; padding: 8px 16px; font-size: .9rem; }

/* My plan and the other personal cards. */
.wk-page main > .card.plan { margin: 24px 0; }
.wk-page .plan .field { margin: 16px 0 0; }
.wk-page .plan textarea { width: 100%; min-height: 112px; padding: 12px 14px; font-size: 1rem; line-height: 1.6; }
.wk-page .plan textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* This week's focus: a heavier border and an inverted label, so it reads without colour. */
.wk-page .plansaved { margin: 12px 0 20px; }
.wk-page .addedlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.wk-page .addedlist li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; }
.wk-page .addedlist li > span { flex: 1 1 16em; min-width: 0; line-height: 1.6; }

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

@media print {
  @page { margin: 18mm; }
  .wk-page .steprail, .wk-page .helpbox, .wk-page .btn, .wk-page .actions, .wk-page nav.chips, .wk-page .secnav { display: none !important; }
  /* The personal cards (the step boxes, My plan and the responses) are never printed with the reading. They print only from “Print or save as PDF”. */
  body:not(.print-plan) :is(#plancard, #toolcard, #summarycard, #fromsteps-card, #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; }
  .wk-page details.evmore::details-content { content-visibility: visible; display: block; }
  .wk-page details.evmore > summary { display: none; }
}

/* Nine steps: three across on a wide screen; two across on a tablet with the ninth spanning both; one on a phone. */
.wk-page .secgrid.three .sec { min-height: 140px; }

/* Personal cards on the steps: a few fields, two columns on a wide screen, one on a phone. */
.wk-page main > .card.tool { margin: 24px 0; }
.wk-page .tool .field { margin: 16px 0 0; }
.wk-page .tool .field > span { display: block; font-size: .95rem; font-weight: 600; margin-bottom: 6px; }
.wk-page .tool textarea { width: 100%; min-height: 88px; padding: 12px 14px; font-size: 1rem; line-height: 1.6; }
.wk-page .tool textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.wk-page .toolgrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
@media (min-width: 900px) { .wk-page .toolgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .wk-page .toolgrid > :last-child:nth-child(odd) { grid-column: 1 / -1; } }
.wk-page .qitem { border-top: 1px solid var(--line); padding: 16px 0 6px; min-width: 0; }
.wk-page .qitem h3 { margin: 0 0 4px; font-size: 1.1rem; }
.wk-page .qitem p { margin: 0 0 4px; }
.wk-page .choices { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0 4px; }
.wk-page .choice { font: inherit; font-size: .95rem; min-height: 44px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; }
.wk-page .choice:hover { border-color: var(--ink); color: var(--ink); }
.wk-page .choice:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.wk-page .choice[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; }
.wk-page .toollink { margin: 12px 0 0; }
.wk-page .toollink a { display: inline-flex; align-items: center; min-height: 44px; text-underline-offset: 3px; }

.wk-page .plan input[type="date"], .wk-page .tool input[type="date"] { width: 100%; max-width: 16rem; min-height: 44px; padding: 8px 14px; font: inherit; font-size: 1rem; }
.wk-page .warnline { margin: 12px 0 0; padding: 12px 14px; border: 1px solid var(--ink); border-radius: 10px; line-height: 1.6; }
.wk-page .choices + .field, .wk-page h3 + .choices { margin-top: 12px; }

.wl-row { display: block; margin-top: 4px; overflow-wrap: anywhere; }
@media print { body:not(.print-plan) :is(#fucard, #fusaved) { display: none !important; } }
