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

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

/* Long evidence lists fold after three; references stay visible in the summary. */
.ff-page details.evmore { margin: 8px 0 4px; }
.ff-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; }
.ff-page details.evmore > summary:hover { color: var(--ink); }
.ff-page details.evmore > summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; color: var(--ink); }
.ff-page details.evmore[open] > summary { margin-bottom: 8px; }


/* Home: the journey line. Eight cards in .secgrid.four: four across, two across or one, so no cell is ever empty. */
.ff-page .journeyline { margin: 8px 0 16px; max-width: none; }
.ff-page .secgrid { gap: 14px; }
.ff-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. */
.ff-page .card p { line-height: 1.7; }
.ff-page .card h3 { font: 600 1.15rem/1.35 var(--serif); margin: 26px 0 8px; }
.ff-page .card h3:first-child { margin-top: 0; }
.ff-page .card ul.trylist li { margin: 8px 0; line-height: 1.65; }
.ff-page .card > p.eyebrow { margin-bottom: 8px; }
.ff-page .card.lead h2 { font-size: 1.35rem; line-height: 1.35; }
.ff-page .card.act p.big { font-size: 1.2rem; }
.ff-page .secnav { margin: 32px 0 40px; }
@media (min-width: 960px) {
  .ff-page .cols { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px; }
  .ff-page .cols > div:last-child > .card.lead { order: -2; }
  .ff-page .cols > div:last-child > .card.act { order: -1; }
}

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

/* My plan and the other personal cards. */
.ff-page main > .card.plan { margin: 24px 0; }
.ff-page .plan .field { margin: 16px 0 0; }
.ff-page .plan textarea { width: 100%; min-height: 112px; padding: 12px 14px; font-size: 1rem; line-height: 1.6; }
.ff-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. */
.ff-page .plansaved { margin: 12px 0 20px; }
.ff-page .addedlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ff-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; }
.ff-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. */
.ff-page .summary { border: 1px dashed var(--line); border-radius: 12px; padding: 22px 24px; margin: 8px 0 24px; max-width: 46rem; }
.ff-page .summary .sumtitle { margin: 0; font: 600 1.4rem/1.3 var(--serif); }
.ff-page .summary .sumsub { margin: 4px 0 8px; color: var(--muted); font-size: .9rem; }
.ff-page .summary .sumgroup { margin: 24px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.ff-page .summary h4 { margin: 0 0 8px; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ff-page .summary ul { margin: 0; padding: 0; list-style: none; }
.ff-page .summary li { margin: 0 0 14px; overflow-wrap: anywhere; line-height: 1.6; }
.ff-page .summary li > strong { display: block; }
.ff-page .summary .sumline { display: block; margin-top: 2px; white-space: pre-wrap; }
.ff-page .summary .sumlab { color: var(--muted); font-size: .9rem; margin-right: 6px; }
.ff-page .sumactions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; }
.ff-page .sumactions .btn:disabled { opacity: .5; cursor: default; }
.ff-page #sumStatus { margin: 12px 0 0; min-height: 1.4em; }
.ff-page .planhint { margin: 12px 0 0; min-height: 1.4em; }
.ff-page main > .card.plan#delcard { margin-bottom: 8px; }

@media print {
  @page { margin: 18mm; }
  .ff-page .steprail, .ff-page .helpbox, .ff-page .btn, .ff-page .actions, .ff-page nav.chips, .ff-page .secnav { display: none !important; }
  /* The personal cards (your initial, week boxes and plan) and the responses are never printed with the reading. They print only from “Print or save as PDF”. */
  body:not(.print-plan) :is(#startcard, #laddercard, #daycard, #jobscard, #foldercard, #aftercard, #pickcard, #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; }
  .ff-page details.evmore::details-content { content-visibility: visible; display: block; }
  .ff-page details.evmore > summary { display: none; }
}

/* Eight steps: four across on a wide screen (two full rows), two across on a tablet (four rows), one on a phone. */
@media (min-width: 960px) { .ff-page .secgrid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ff-page .secgrid.four .sec { min-height: 140px; }
@media (min-width: 640px) { .ff-page .secgrid.four .sec:last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (min-width: 960px) { .ff-page .secgrid.four .sec:last-child:nth-child(odd) { grid-column: span 2; } }

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


.ff-page .sumactions { align-items: center; }
.ff-page .sumactions a.btn { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }


/* The plan summary on a phone: tighter box, bigger text for the words to carry, nothing wider than the screen. */
@media (max-width: 640px) {
  .ff-page .summary { padding: 16px 14px; margin: 8px 0 16px; max-width: 100%; }
  .ff-page .summary .sumgroup[data-g="carry"] li { font-size: 1.1rem; }
  .ff-page .summary .sumgroup { margin-top: 18px; padding-top: 12px; }
  .ff-page .sumactions { gap: 12px; }
  .ff-page .sumactions .btn { flex: 1 1 100%; justify-content: center; }
  .ff-page main > .card.plan, .ff-page main > .card.tool { margin: 16px 0; }
}

/* Step 1: three short care lines, three across on a wide screen, one on a phone. */
.ff-page main > .card.carecard { margin: 24px 0; }
.ff-page .caregrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 8px; }
@media (min-width: 900px) { .ff-page .caregrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; } }
.ff-page .caregrid h3 { font: 600 1.05rem/1.35 var(--serif); margin: 0 0 6px; }
.ff-page .caregrid p { margin: 0; }
.ff-page .caregrid a { text-underline-offset: 3px; }
@media (max-width: 640px) { .ff-page main > .card.carecard { margin: 16px 0; } .ff-page .caregrid { gap: 16px; } }

/* Children and choices. */
.ff-page .choices { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 4px; }
.ff-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; }
.ff-page .choice:hover { border-color: var(--ink); color: var(--ink); }
.ff-page .choice:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.ff-page .choice[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; }
.ff-page .choice:disabled { opacity: .5; cursor: default; }
.ff-page .tool h3 { font: 600 1.05rem/1.35 var(--serif); margin: 20px 0 0; }
.ff-page .kidbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 12px 0 8px; }
.ff-page .kidbar .choices { margin: 0; }
.ff-page .kidlabel { color: var(--muted); font-size: .9rem; }
.ff-page .kidlink, .ff-page .kidnone a { display: inline-flex; align-items: center; min-height: 44px; text-underline-offset: 3px; }
.ff-page .rungtext { margin: 12px 0 0; min-height: 1.4em; }
.ff-page .addrow { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px 24px; align-items: end; margin-top: 8px; max-width: 46rem; }
@media (min-width: 700px) { .ff-page .addrow { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; } }
.ff-page .addrow .field { margin: 0; }
.ff-page .addrow input { width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; font-size: 1rem; text-align: left; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.ff-page .addrow input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.ff-page .addrow .btn { min-height: 48px; }
.ff-page .addrow .btn:disabled, .ff-page .actadd .btn:disabled { opacity: .5; cursor: default; }
.ff-page .kidlist { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; max-width: 46rem; }
.ff-page .kidlist 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; }
.ff-page .kidlist li > span:first-child { flex: 1 1 12em; min-width: 0; overflow-wrap: anywhere; }
.ff-page .kidbtns { display: flex; flex-wrap: wrap; gap: 12px; }
.ff-page #kidStatus { margin: 12px 0 0; min-height: 1.4em; }
@media (max-width: 640px) { .ff-page .choice { text-align: left; border-radius: 16px; } .ff-page .kidbtns .btn { flex: 1 1 100%; justify-content: center; } }

/* P3: the family reflection is personal and never prints with the plan. */
@media print { #famprompt, #famkept { display: none !important; } }

/* No child yet on a later step: one clear prompt with a direct way to add one, and a way back after. */
.ff-page .needkid, .ff-page .returnnote { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin: 16px 0 8px; padding: 16px 18px; border: 1px solid var(--ink); border-radius: 12px; max-width: 46rem; }
.ff-page .needkid p, .ff-page .returnnote p { flex: 1 1 18em; margin: 0; min-width: 0; }
.ff-page .needkid .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; text-decoration: none; }
.ff-page .returnnote a { display: inline-flex; align-items: center; min-height: 44px; text-underline-offset: 3px; }
.ff-page .backmsg { margin: 8px 0 12px; padding: 10px 14px; border-left: 3px solid var(--ink); font-size: .95rem; }
.ff-page h2[tabindex="-1"]:focus { outline: none; }
.ff-page h2[tabindex="-1"]:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
@media (max-width: 640px) { .ff-page .needkid .btn { flex: 1 1 100%; } }

/* The safe way to stop leads the plan, closed on all four edges. */
.ff-page .summary .sumgroup[data-g="stop"] { margin: 16px 0 0; padding: 16px 18px; border: 2px solid var(--ink); border-radius: 12px; }
.ff-page .summary .sumgroup[data-g="stop"] + .sumgroup { border-top: 0; }
