/* ============================================================
   THE STRIVING MUSLIM ACADEMY
   The printables counter, and the reviews under them
   ------------------------------------------------------------
   Everything here uses the site's own tokens, so a change of
   palette in styles.css carries through without touching this
   file. Nothing is styled by element, only by its own class, so
   deleting the two tags in resources.html removes the feature
   and leaves no trace behind.
   ============================================================ */

/* Both blocks start hidden and are shown by counter.js once it has
   real figures. A counter that flashes a zero before it loads looks
   broken, and a reviews heading over an empty box looks abandoned. */
#pcounter[hidden], #previews[hidden]{ display:none; }

/* ---------- the counter ---------- */
.pcounter{
  margin:0 0 26px;
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:var(--card);
  overflow:hidden;
}
.pc-inner{
  display:grid; grid-template-columns:repeat(3,1fr);
  text-align:center;
}
.pc-fig{ padding:18px 10px 16px; }
.pc-fig + .pc-fig{ border-left:1px solid var(--line); }
.pc-n{
  display:block; font-family:var(--serif); font-weight:700;
  font-size:clamp(26px,4.4vw,38px); line-height:1.05; color:var(--mid);
  font-variant-numeric:tabular-nums;
}
.pc-l{
  display:block; margin-top:4px; font-size:11px; font-weight:600;
  letter-spacing:.14em; text-transform:uppercase; color:var(--muted);
}


@media (max-width:640px){
  .pc-fig{ padding:14px 6px 12px; }
  .pc-l{ font-size:10px; letter-spacing:.1em; }
}

/* ---------- reviews ---------- */
.pr-list{
  display:grid; grid-template-columns:repeat(3,1fr); gap:18px;
  align-items:start;
}
@media (max-width:900px){ .pr-list{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:620px){ .pr-list{ grid-template-columns:1fr; } }

.pr-card{
  margin:0; padding:18px 18px 16px;
  background:var(--card); border:1px solid var(--line);
  border-radius:var(--radius);
}
.pr-card blockquote{
  margin:10px 0 12px; padding:0; border:0;
  font-family:var(--serif); font-size:15px; line-height:1.6; color:var(--ink);
}
.pr-card blockquote::before{ content:'\201C'; }
.pr-card blockquote::after{ content:'\201D'; }
.pr-card figcaption{
  font-size:12.5px; color:var(--muted); font-weight:600;
}
.pr-item{
  display:block; margin-top:3px; font-weight:400;
  font-size:11px; letter-spacing:.1em; text-transform:uppercase;
  color:var(--light);
}
.pr-stars{ color:var(--mark); font-size:13px; letter-spacing:1px; }

/* ---------- the ask ---------- */
.pr-ask{
  position:relative; margin:14px 0 0; padding:16px 18px 18px;
  background:var(--accent-soft); border:1px solid var(--accent);
  border-radius:var(--radius);
}
.pr-ask .pr-x{
  position:absolute; top:6px; right:10px;
  background:none; border:0; cursor:pointer;
  font-size:21px; line-height:1; color:var(--muted);
}
.pr-ask-t{ margin:0 0 4px; font-weight:700; color:var(--deep); font-size:15px; }
.pr-ask-s{ margin:0 0 10px; font-size:13px; color:var(--muted); line-height:1.5; }
.pr-pick{ display:flex; gap:4px; margin:0 0 10px; }
.pr-s{
  background:none; border:0; cursor:pointer; padding:2px;
  font-size:20px; color:var(--mark); line-height:1;
}
.pr-s:focus-visible{ outline:2px solid var(--mid); outline-offset:2px; }
.pr-text, .pr-name, .pr-country, .pr-email{
  display:block; width:100%; margin:0 0 9px; padding:9px 11px;
  font-family:var(--sans); font-size:14px; color:var(--ink);
  background:var(--card); border:1px solid var(--line);
  border-radius:8px; resize:vertical;
}
/* name and country side by side, stacking on a phone */
/* First name and country, stacked rather than side by side.

   These were two columns, with a media query dropping to one below a 420px
   viewport. That query never fired where it was needed: the panel lives
   inside a card in a three column grid, so on a 1280px desktop the card is
   about 220px wide and each field got 105px, while the viewport was far too
   wide to trigger the fallback. The container is what is narrow, not the
   window. Stacked always is simply readable everywhere. */
.pr-two{ display:grid; grid-template-columns:1fr; gap:0; }
.pr-two input{ margin-bottom:9px; }
/* the promise under the email box. It is small, and it is binding. */
.pr-small{
  margin:-4px 0 10px; font-size:11.5px; line-height:1.45; color:var(--muted);
}
.pr-ask [hidden]{ display:none; }
.pr-send[disabled]{ opacity:.5; cursor:not-allowed; }
.pr-done{ margin:0; font-weight:600; color:var(--mid); font-size:14px; }

/* ===================================================================
   THE DOWNLOAD GATE
   Asked for on 19 Oct 2026: the three details are now required before a
   free sheet is handed over, so that a review can be requested once the
   sheet has actually been used with a child.

   A fixed overlay, NOT a panel inside the card. The first version was
   appended into the card that was clicked, which made that one grid
   column six hundred pixels taller than the two beside it and left them
   with a column of empty space and a stranded "Free". A dialog that sits
   above the page cannot disturb the grid underneath it at all.
   =================================================================== */
.dg-back{
  position:fixed; inset:0; z-index:9000;
  background:rgba(14,30,60,.55);
  display:flex; align-items:center; justify-content:center;
  padding:18px; overflow-y:auto;
  animation:dg-fade .18s ease-out;
}
@keyframes dg-fade{ from{ opacity:0 } to{ opacity:1 } }
@media (prefers-reduced-motion:reduce){ .dg-back{ animation:none } }

.dg{
  background:var(--paper,#FBFAF6); border-radius:14px;
  width:100%; max-width:430px; padding:26px 26px 22px;
  position:relative; box-shadow:0 18px 50px rgba(14,30,60,.3);
  max-height:calc(100vh - 36px); overflow-y:auto;
}
.dg-x{
  position:absolute; top:9px; right:13px; background:none; border:0;
  font-size:24px; line-height:1; color:var(--muted); cursor:pointer;
}
.dg-x:hover{ color:var(--deep); }
.dg h3{ margin:0 0 6px; font-size:19px; color:var(--deep); padding-right:22px; }
.dg .dg-item{ margin:0 0 12px; font-size:14px; color:var(--mid); font-weight:600; }
.dg .dg-why{ margin:0 0 7px; font-size:13.5px; line-height:1.55; color:var(--muted); }
.dg ul{ margin:0 0 14px; padding-left:17px; font-size:13.5px;
        line-height:1.55; color:var(--muted); }
.dg li{ margin-bottom:3px; }
.dg label{ display:block; font-size:12.5px; font-weight:600;
           color:var(--deep); margin:0 0 3px; }
.dg input{
  width:100%; box-sizing:border-box; padding:9px 11px; margin:0 0 11px;
  border:1px solid var(--line); border-radius:8px; font:inherit; font-size:14.5px;
  background:#fff;
}
.dg input:focus{ outline:2px solid var(--mid); outline-offset:1px; }
.dg input.bad{ border-color:#B3261E; background:#FFF6F5; }
.dg .dg-err{ margin:-7px 0 9px; font-size:12.5px; color:#B3261E; }
.dg .dg-go{ width:100%; margin:3px 0 0; }
.dg .dg-small{ margin:11px 0 0; font-size:11.5px; line-height:1.5; color:var(--muted); }

/* ===================================================================
   THE COUNTER, IN THE SCHOOL'S OWN COLOURS

   Third attempt, and the first one she chose rather than was handed.
   The first put three pastel blocks with coloured bars in a row, which
   is the default dashboard idiom and looks like every other site. The
   second made it a cream panel, and she said again that she did not like
   it, which meant the idea was wrong and not the hex code. So four were
   drawn out at full width with her own figures in them and she picked
   this one.

   The deep navy of the hero, cream figures on it, the gold spent twice:
   once on the rule across the top and once on the countries figure,
   because reach is a different sort of number from volume. It reads as
   a piece of the school rather than as a widget bolted to the page.

   The dividers and the pill are set in the cream at low opacity rather
   than in a flat grey, so they sit on the navy without introducing a
   colour the site does not already use.
   =================================================================== */
.pcounter{
  background:var(--deep);
  border:1px solid var(--deep);
  border-top:3px solid #C9A227;
}
.pc-fig{ padding:20px 10px 17px; background:transparent; }
.pc-fig + .pc-fig{ border-left:1px solid rgba(230,211,166,.28); }
.pc-n{
  color:var(--paper);
  font-size:clamp(28px,4.6vw,40px);
  letter-spacing:-.01em;
}
/* The one figure that is not a count of activity. #E6C76A on this navy
   is 9.0:1, and these numerals are 40px, so they would have passed at
   3:1. The brightness is for the eye, not the minimum. */
.pc-inner .pc-fig:nth-child(3) .pc-n{ color:#E6C76A; }
/* 10.5px is small text and needs 4.5:1. #B9C2D4 on the navy is 9.2:1
   and still reads as quieter than the figures above it. */
.pc-l{
  color:#B9C2D4; letter-spacing:.16em; font-size:10.5px;
}

/* ---- the account detail lists on the payment page ----
   A description list rather than a table: it stacks on a phone without
   any media query, and the numbers need to sit in a face where a 1 and a
   7 cannot be confused by somebody copying them into a banking app. */
.paydl{ margin:14px 0 0; display:grid; grid-template-columns:auto 1fr;
        gap:5px 14px; align-items:baseline; }
.paydl dt{ font-size:12px; letter-spacing:.07em; text-transform:uppercase;
           color:var(--muted); font-weight:600; }
.paydl dd{ margin:0; color:var(--ink); font-weight:600; font-size:15px; }
.paydl dd.num{ font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
               letter-spacing:.02em; font-size:14.5px; word-break:break-all; }
@media (max-width:420px){
  .paydl{ grid-template-columns:1fr; gap:2px 0; }
  .paydl dd{ margin-bottom:8px; }
}
