/* Mawsim · The Measure. Shared styles live in /heart.css (+ /dua/dua.css for chips). Monochrome, full width, room to breathe. */
.ms-page main > .card.lead .chips { margin: 16px 0 12px; }
/* 7 steps: the last card fills its row at two columns and at three, so no grid cell is left empty. */

/* Longer Arabic for the Qur'an quotations; the font stack is unchanged. */
.ms-page figure.ibq p.ar, .ms-page blockquote p.ar { font-size: 1.6rem; line-height: 2.1; text-align: right; }
.ms-page .arline .ar { font-size: 1.4rem; }

/* Help: the shared .helpbox from heart.css closes every view. */
.ms-page .helpbox { scroll-margin-top: 16px; }

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

/* The weighing: what, five questions, where I land, one sentence. Two columns on desktop; the odd last box spans. */
.ms-page main > .card.weigh { margin: 24px 0; }
.ms-page .weigh .field { margin: 16px 0; }
.ms-page .weigh textarea { width: 100%; min-height: 88px; }
.ms-page .weigh .qh { display: block; color: var(--muted); font-size: .92rem; line-height: 1.45; margin: 0 0 6px; }
.ms-page .plangrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 24px; }
@media (min-width: 960px) {
  .ms-page .weigh .qh { min-height: 2.9em; }
  .ms-page .plangrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ms-page .plangrid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.ms-page fieldset.choose { border: 0; margin: 24px 0 8px; padding: 0; min-width: 0; }
.ms-page fieldset.choose legend { font-weight: 600; padding: 0; margin-bottom: 8px; }
.ms-page .mchoices { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 640px) { .ms-page .mchoices { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .ms-page .mchoices { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ms-page label.mchoice { position: relative; display: flex; align-items: flex-start; min-height: 44px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; font-size: .98rem; }
.ms-page label.mchoice span { display: flex; flex-direction: column; gap: 4px; }
.ms-page label.mchoice strong { font-weight: 600; }
.ms-page label.mchoice small { color: var(--muted); font-size: .88rem; line-height: 1.4; }
.ms-page label.mchoice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ms-page label.mchoice:hover { border-color: var(--ink); }
.ms-page label.mchoice:has(input:checked) { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.ms-page label.mchoice:has(input:checked) small { color: inherit; }
.ms-page label.mchoice:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.ms-page .weigh .actions { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 12px; }
.ms-page ol.wsteps { margin: 12px 0 8px; padding-left: 1.3em; color: var(--muted); line-height: 1.6; }
.ms-page ol.wsteps li { margin: 4px 0; }
.ms-page .editnote { border: 1px dashed var(--ink); border-radius: 10px; padding: 12px 14px; margin: 12px 0; }
.ms-page .weigh.editing { border-color: var(--ink); }
.ms-page .weighstatus { margin: 12px 0 0; min-height: 1.4em; }

/* Saved weighings: private to this device, newest first, each deletable. */
.ms-page main > .card.saved { margin: 24px 0; }
.ms-page ul.wlist { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 16px; }
.ms-page ul.wlist li { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.ms-page ul.wlist .wwhat { font: 600 1.1rem/1.35 var(--serif); margin: 0 0 4px; }
.ms-page ul.wlist .wmeta { color: var(--muted); font-size: .9rem; margin: 0 0 8px; }
.ms-page ul.wlist .wline { margin: 0 0 8px; }
.ms-page ul.wlist li.isediting { border-color: var(--ink); border-style: dashed; }
.ms-page ul.wlist .wact { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.ms-page ul.wlist details { margin: 8px 0 12px; }
.ms-page ul.wlist details summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--muted); font-size: .92rem; }
.ms-page ul.wlist details dl { margin: 4px 0 0; }
.ms-page ul.wlist details dt { font-weight: 600; margin-top: 10px; }
.ms-page ul.wlist details dd { margin: 2px 0 0; white-space: pre-wrap; }
.ms-page .plansaved { margin: 12px 0 20px; }
.ms-page main > .card.plan { margin: 24px 0; }
.ms-page .plan textarea { width: 100%; min-height: 88px; }
.ms-page .plan .field { margin: 16px 0; }

/* Home: the journey line, and step 7 (the exercise) as its own call to action. */
.ms-page .journeyline { margin: 8px 0 16px; max-width: none; }
.ms-page .secgrid { gap: 14px; }
.ms-page .sec.cta { border: 2px solid var(--ink); padding: 22px 24px; min-height: 120px; }
.ms-page .sec.cta strong { font-size: 1.4rem; }
.ms-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; }
.ms-page .sec:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

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

@media print {
  .ms-page .steprail, .ms-page .weigh, .ms-page .saved, .ms-page .plan { display: none; }
  .ms-page details.evmore::details-content { content-visibility: visible; display: block; }
  .ms-page details.evmore > summary { display: none; }
}
