/* Fasting: the page's own parts. Colours are the site tokens, plus the three mark colours the app itself uses
   for Fasted, Missed and Excused (src/theme.ts: ontime, late, excused). */

body { --ontime: #2f6b57; --late: #c0662b; --excused: #7b68a6; }

.split .text h3.sub-h { font-size: clamp(22px, 2.2vw, 26px); line-height: 1.2; margin-top: 40px; }
.split .text .rows.remind { margin-top: 16px; max-width: 32em; }
.rows.remind > li { grid-template-columns: 190px minmax(0, 1fr); padding: 14px 0; }
@media (max-width: 560px) { .rows.remind > li { grid-template-columns: minmax(0, 1fr); gap: 4px; } }
.after-rows { margin-top: 14px; font-size: 15.5px; color: var(--muted); max-width: 32em; }

/* ── The Ramadan card and its reminders, set as they read in the app ── */
.ramadan-demo { margin: 0; position: relative; overflow: hidden; display: grid; gap: 14px; align-content: start; padding: 30px 28px 26px; border-radius: 30px; background: linear-gradient(170deg, color-mix(in srgb, var(--c) 16%, var(--sheet)), color-mix(in srgb, var(--c) 5%, var(--bg)) 70%); border: 1px solid color-mix(in srgb, var(--c) 18%, var(--line)); }
.r-card { position: relative; background: var(--sheet); border: 1px solid var(--gold); border-radius: 18px; padding: 16px; display: grid; gap: 8px; box-shadow: 0 24px 40px -34px rgba(36, 33, 28, 0.5); }
.r-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; }
.r-title { font-family: var(--display); font-size: 17px; letter-spacing: 0.04em; }
.r-count { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.r-times { font-variant-numeric: tabular-nums; font-size: 16px; }
.r-marks { display: flex; flex-wrap: wrap; gap: 6px; }
.r-marks span { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--muted); }
.r-marks span.on { background: var(--ontime); border-color: var(--ontime); color: var(--sheet); }
.pings { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 10px; position: relative; }
.pings li { background: color-mix(in srgb, var(--sheet) 82%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px 13px; display: grid; gap: 2px; font-size: 14.5px; }
.pings b { font-weight: 600; }
.pings p { color: var(--muted); font-variant-numeric: tabular-nums; }
.pings .ping-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.ping-app { display: inline-flex; align-items: center; gap: 7px; }
.ping-app svg { width: 12px; height: auto; color: var(--brand); }
.ramadan-demo figcaption { font-size: 13px; color: var(--muted); position: relative; margin-top: 4px; max-width: 34em; }

/* ── Sunnah fasts: the four switches, and the days left out ── */
.sunnah-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 32px; align-items: start; }
table.data.fasts { font-size: 15.5px; }
table.data.fasts tbody th { font-weight: 600; width: 34%; }
table.data.fasts td small { display: block; margin-top: 4px; font-size: 13.5px; color: var(--muted); }
table.data.fasts th, table.data.fasts td { padding-top: 14px; padding-bottom: 14px; }
@media (max-width: 480px) { table.data.fasts th, table.data.fasts td { padding-left: 14px; padding-right: 12px; } table.data.fasts tbody th { width: 38%; } }
.skips { background: var(--sheet); border: 1px dashed color-mix(in srgb, var(--c) 45%, var(--line)); border-radius: 22px; padding: 24px 24px 22px; }
.skips h3 { font-size: 22px; line-height: 1.2; }
.skips ul { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.skips li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 0 10px; font-size: 15.5px; }
/* A ring with a stroke through it: a day with no fast */
.skips li::before { content: ''; grid-row: span 2; width: 14px; height: 14px; margin-top: 5px; border-radius: 50%; border: 1.5px solid var(--c); background: linear-gradient(135deg, transparent 45%, var(--c) 45% 55%, transparent 55%); }
.skips li b { font-weight: 600; }
.skips li span { color: var(--muted); font-size: 14.5px; }
.skips > p { margin-top: 16px; font-size: 14.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; }
.tells { margin-top: 48px; }
.tells div.wide { grid-column: auto; }
@media (max-width: 920px) { .sunnah-grid { grid-template-columns: minmax(0, 1fr); } }

/* ── The tool, on the deep band ── */
.tool-band .section-head { margin-bottom: 36px; }
.tool-band .section-head p { max-width: 40em; }
.tool-band .note { color: var(--ink); }
.fast-tool { display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); gap: 32px; padding: 28px; color: var(--ink); }
.fast-tool[hidden] { display: none; }
.controls { display: grid; gap: 20px; align-content: start; align-self: start; }
@media (min-width: 921px) { .controls { position: sticky; top: 92px; } }
.picks { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.picks legend { padding: 0; margin-bottom: 8px; font-size: 13.5px; font-weight: 500; color: var(--muted); }
.pick { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); cursor: pointer; transition: border-color 0.2s, background-color 0.2s; }
.pick:hover { border-color: var(--gold); }
.pick input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--deep); cursor: pointer; }
.pick span { display: grid; gap: 1px; }
.pick b { font-weight: 600; font-size: 15.5px; }
.pick small { font-size: 13px; color: var(--muted); }
.pick:has(input:checked) { border-color: color-mix(in srgb, var(--deep) 55%, var(--line)); background: color-mix(in srgb, var(--deep) 6%, var(--sheet)); }
.pick:has(input:focus-visible) { outline: 2px solid var(--brass); outline-offset: 2px; }
.moon { font-size: 14.5px; color: var(--muted); border-left: 2px solid var(--c); padding-left: 14px; }
.moon b { color: var(--ink); font-weight: 600; }

.results { min-width: 0; }
.fd-today { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding-bottom: 14px; border-bottom: 1px solid var(--ink); }
.fd-today .label { flex-basis: 100%; }
.fast-tool .label { color: var(--muted); opacity: 1; }
.fd-today b { font-family: var(--display); font-weight: 400; font-size: 20px; letter-spacing: 0.04em; }
.fd-today span:last-child { color: var(--muted); font-size: 15px; }
.fd-summary { margin-top: 12px; font-size: 14.5px; color: var(--muted); }
.fd-list { list-style: none; margin: 6px 0 0; padding: 0; }
.fd { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.fd:last-child { border-bottom: 0; }
.fd-date { display: grid; place-items: center; align-content: center; width: 54px; height: 58px; border-radius: 27px 27px 10px 10px; background: color-mix(in srgb, var(--c) 14%, var(--sheet)); line-height: 1; }
.fd-date b { font-family: var(--display); font-weight: 400; font-size: 22px; font-variant-numeric: tabular-nums; }
.fd-date span { margin-top: 4px; font-family: var(--display); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: color-mix(in srgb, var(--muted) 75%, var(--ink)); }
.fd-what { font-weight: 600; }
.fd-when { display: flex; flex-wrap: wrap; gap: 0 10px; font-size: 14px; color: var(--muted); }
.fd-when span + span::before { content: '·'; margin-right: 10px; }
.fd-rel { color: var(--c); font-weight: 600; }
.fd.pause .fd-date { background: transparent; border: 1.5px dashed color-mix(in srgb, var(--c) 50%, var(--line)); }
.fd.pause .fd-what { font-weight: 500; color: var(--muted); }
.fd.pause.ramadan .fd-date { border-style: solid; border-color: var(--gold); background: var(--brass-soft); }
.fd.pause.ramadan .fd-what { color: var(--ink); }
@media (max-width: 920px) { .fast-tool { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) {
  .fast-tool { padding: 20px 16px; border-radius: 22px; }
  .fd { grid-template-columns: 48px minmax(0, 1fr); gap: 14px; align-items: start; }
  .fd-date { width: 48px; height: 54px; }
  .fd-when { display: grid; }
  .fd-when span + span::before { content: none; }
}

/* ── The year ahead, as a line of days ── */
.yearline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 34px 24px; }
.yearline li { position: relative; display: grid; gap: 2px; align-content: start; padding-top: 22px; border-top: 2px solid var(--line); }
.yearline li::before { content: ''; position: absolute; top: -7px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px var(--bg); }
.yearline li.ramadan::before { background: var(--gold); }
.yearline li.nofast::before { background: var(--bg); border: 1.5px solid var(--c); background-image: linear-gradient(135deg, transparent 44%, var(--c) 44% 56%, transparent 56%); }
.yearline .y-date { font-family: var(--display); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.yearline b { font-weight: 600; font-size: 17px; margin-top: 4px; }
.yearline .y-hijri { font-size: 15px; }
.yearline .y-sub { font-size: 14px; color: var(--muted); }
.yearline li.nofast .y-sub { color: var(--c); font-weight: 500; }
@media (max-width: 920px) { .yearline { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) {
  .yearline { grid-template-columns: minmax(0, 1fr); gap: 0; border-left: 2px solid var(--line); margin-left: 6px; }
  .yearline li { border-top: 0; padding: 0 0 22px 22px; }
  .yearline li::before { top: 4px; left: -7px; }
  .yearline li:last-child { padding-bottom: 0; }
}

/* ── The fast log ── */
.marks-rows { margin-top: 26px; max-width: 34em; }
.marks-rows > li { grid-template-columns: 180px minmax(0, 1fr); }
.marks-rows > li > b:first-child { display: flex; align-items: center; align-self: start; gap: 10px; }
@media (max-width: 560px) { .marks-rows > li { grid-template-columns: minmax(0, 1fr); gap: 6px; } }
.marks-rows .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.marks-rows .dot.ontime { background: var(--ontime); }
.marks-rows .dot.late { background: var(--late); }
.marks-rows .dot.excused { background: var(--excused); }
.log-split { align-items: start; }
.tally { margin: 0; display: grid; gap: 20px; }
.tally .bill { padding-bottom: 24px; }
.tally .title.second { margin-top: 30px; }
.tally .title b { font-size: 14px; }
.tally .line { padding: 10px 0; }
.tally .total span { font-size: 30px; }
.tally figcaption { font-size: 13px; color: var(--muted); max-width: 30em; padding-top: 8px; }
.note.scholars { margin-top: 48px; max-width: 760px; }

/* ── The night, in one line ── */
.night-line { padding-top: 8px; color: var(--muted); font-size: 15.5px; }
.night-line a { color: var(--ink); }
.wrap:has(.night-line) + .wrap .pager { padding-top: 40px; }

/* Three counts under the headline stay side by side on a phone */
@media (max-width: 480px) {
  .page-hero .glance { flex-wrap: nowrap; gap: 14px 18px; }
  .page-hero .glance li { flex: 1 1 0; min-width: 0; align-content: start; }
}
