/*
 * AltiGrad — quiz chips and the score card.
 *
 * WHY THIS FILE EXISTS
 * assets/css/main.css ships minified and has no readable source in the zip, so
 * hand-editing main.min.css is forbidden. Everything new therefore lives here,
 * loads AFTER main, and is enqueued only on pages that can render the tool
 * (w2f_ag_page_has_tool()) — about nine kilobytes of rules on one or two URLs
 * instead of every page on the site.
 *
 * MOBILE FIRST. Every rule below is written for a 360px viewport and widened at
 * 720px and 1080px. The phone is the product: roughly 99.5% of this traffic is
 * mobile, one hand, on a bus, on a cheap screen. Nothing here needs a hover.
 *
 * COLOUR — READ THIS BEFORE ADDING A RULE.
 *
 * The tool is NOT drawn on a white card. w2f_ag_panel() paints a navy gradient
 * and sets color:#fff, and everything here sits on top of it. An earlier version
 * of this file assumed a light surface and used --c-text, --c-ink, --c-muted and
 * --c-surface, which is how the report ended up with a near-black "First step"
 * line, #047857 week numbers and pale grey `% of score` labels on a dark navy
 * panel — the owner's words: "the text is not clearly visible".
 *
 * So: body copy is rgba(255,255,255,.72–.82), headings and emphasised words are
 * #fff, and accents are the brand green lifted to #7fe7c4. Anything that is a
 * WHITE PILL (role links) keeps dark ink, because its own background is light —
 * that is the only dark text allowed in this sheet.
 */

/* ---------------------------------------------------------------- quiz */
.w2f-ag-chips {
  margin: 0 0 18px;
}

.w2f-ag-chips-label {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em;
  color: rgba(255, 255, 255, .78);
}

.w2f-ag-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* The context chips (track, qualification, hours) look like the answer buttons
   they sit above: a translucent white pill on the navy panel, never a white
   card, so the card reads as one group. */
.w2f-ag-chip {
  appearance: none;
  min-height: 44px; /* a thumb, not a mouse pointer */
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font: inherit;
  font-size: 14px;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}

.w2f-ag-chip:hover { background: rgba(255, 255, 255, .14); }

.w2f-ag-chip.selected {
  border-color: #7fe7c4;
  background: rgba(127, 231, 196, .18);
  color: #fff;
  font-weight: 700;
}

.w2f-ag-chip:focus-visible {
  outline: 3px solid rgba(255, 255, 255, .55);
  outline-offset: 2px;
}

/* The ladder bars are a hint, not a grade — hide them on the "Not sure" tap. */
.w2f-ag-unsure .w2f-ag-opt-key {
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, .4);
  color: rgba(255, 255, 255, .78);
}

.w2f-ag-unsure.selected {
  border-style: dashed;
}

.w2f-ag-opt {
  min-height: 52px;
}

/* ------------------------------------------------------------ score card */
.w2f-ag-scorecard {
  display: grid;
  gap: 16px;
}

.w2f-ag-scorecard-top {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
}

@media (max-width: 380px) {
  .w2f-ag-scorecard-top {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
}

.w2f-ag-ring svg {
  width: 112px;
  height: 112px;
}

/* How much of the check was answered, and how often "Not sure" was used. */
.w2f-ag-confidence {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0;
}

.w2f-ag-conf-item {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  color: #eef5fc;
}

/* "Not sure" is an awareness gap, not a failure — amber, and light enough to
   read on navy. */
.w2f-ag-conf-item.is-unsure {
  background: rgba(249, 115, 22, .22);
  color: #fed7aa;
}

/* One primary button above the fold: the next action, not the whole plan. */
.w2f-ag-hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  width: 100%;
  margin: 4px 0 0;
  text-align: center;
}

/* ------------------------------------------------------- fastest wins */
.w2f-ag-wins {
  display: grid;
  gap: 10px;
}

.w2f-ag-win {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .06);
}

.w2f-ag-win-points {
  display: grid;
  place-items: center;
  min-height: 44px;
  border-radius: 10px;
  background: rgba(16, 185, 129, .22);
  color: #7fe7c4;
  font-weight: 700;
  font-size: 16px;
}

.w2f-ag-win-body {
  display: grid;
  gap: 2px;
  font-size: 14px;
  line-height: 1.4;
}

.w2f-ag-win-body b {
  color: #fff;
}

.w2f-ag-win-body span {
  color: rgba(255, 255, 255, .86);
}

/* ------------------------------------------------------------ area rows */
/* Weakest first; each row is a tap target that opens its explanation. */
.w2f-ag-area-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  grid-template-areas:
    "name score weight"
    "bar  bar   bar";
  gap: 6px 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}

.w2f-ag-area-row .w2f-ag-area-name { grid-area: name; font-size: 14px; }
.w2f-ag-area-row .w2f-ag-area-bar  { grid-area: bar; }
.w2f-ag-area-row .w2f-ag-area-score { grid-area: score; font-weight: 800; }
/* "12% of score", beside the bar. At 66% white on the panel it measured 3.9:1 —
   the row already says the area and the score, so this is the quietest thing in
   it, but quiet is not the same as unreadable: the weight is the fact that
   explains why the bar is short. */
.w2f-ag-area-row .w2f-ag-area-weight {
  grid-area: weight;
  font-size: 11px;
  color: rgba(255, 255, 255, .86);
}

.w2f-ag-area-bar {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  overflow: hidden;
}

.w2f-ag-area-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

/* ---------------------------------------------------------- safety card */
.w2f-ag-safety {
  border-left: 4px solid var(--c-flame);
}

.w2f-ag-safety ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.w2f-ag-safety li {
  margin: 4px 0;
  font-size: 14px;
  line-height: 1.45;
}

/* ------------------------------------------------------------- gate/CTA */
.w2f-ag-gate-list li {
  font-size: 14px;
}

@media (min-width: 720px) {
  .w2f-ag-scorecard-top { gap: 20px; }
  .w2f-ag-ring svg { width: 128px; height: 128px; }
  .w2f-ag-hero-cta { width: auto; padding-inline: 22px; justify-self: start; }
}

/* NO DARK-MODE BLOCK.
   There used to be one here, keyed on `body.w2f-dark` — a class the theme has
   never had (it uses `w2f-mode-dark`), guarding a report that is already light
   text on a dark panel in every mode. It matched nothing on this site and would
   have repainted a white pill dark if it ever had. The palette above is the
   panel's, in both modes. */

/* Printing the plan (the report's own Print button): drop the chrome, keep the
   numbers, and let the browser's "Save as PDF" do the rest. */
@media print {
  .w2f-ag-chips,
  .w2f-ag-hero-cta,
  .w2f-ag-result-cta,
  .w2f-agai-slot,
  .w2f-ag-report-ad { display: none !important; }
  .w2f-ag-area-row { break-inside: avoid; }
}
