/* TechPal styles.
   Layout: one calm column, one question per screen, at most three big choices,
   fixed bottom bar with Back / Start over always in the same place.
   Always light: a white page, with an optional background picture per page. */
/* Design tokens: every color, font and size the site uses, defined once */
:root {
  /* page and text colors */
  --bg: #FFFFFF;          /* plain white page */
  --tint: #EEF3FA;        /* light panels inside cards and the bottom buttons */
  --surface: #FFFFFF;
  --ink: #142033;         /* deep navy text */
  --ink-soft: #3B4A60;
  --line: #C6D3E6;
  --accent: #1A66D6;      /* clear blue for Next, focus, progress */
  --accent-ink: #FFFFFF;

  /* the three choice colors: bright fill + strong edge */
  --c1-bg: #A9D1FF; --c1-edge: #1A66D6;   /* sky blue */
  --c2-bg: #A6E8B8; --c2-edge: #1E8A4C;   /* fresh green */
  --c3-bg: #FFCB8A; --c3-edge: #C4620A;   /* warm orange */

  /* feedback colors, and see-through layers for the voice panel and background pictures */
  --good: #1E8A4C;
  --warn-bg: #FFF1D2; --warn-edge: #C4620A;
  --scrim: rgba(20, 32, 51, 0.45);
  --veil: rgba(255, 255, 255, 0.82);   /* white wash over a background image so text stays readable */
  --page-bg: none;                     /* set by script.js from BACKGROUNDS */

  /* font, corner rounding, icon shape and text size */
  --font: "Atkinson Hyperlegible", "Verdana", "Segoe UI", system-ui, sans-serif;
  --radius: 22px;
  --icon-radius: 18px;    /* changed per phone below */
  --scale: 1;             /* changed by the Text size button */
}
/* Icon shapes follow the phone: iPhone apps are rounded squares, Android icons are circles */
:root[data-phone="ios"]     { --icon-radius: 24%; }
:root[data-phone="android"] { --icon-radius: 50%; }

/* ---------- base styles ---------- */
/* Widths include padding and borders, so boxes never overflow */
* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* the hidden attribute always wins over display: flex/grid */
/* Base text size: every rem is a multiple of this, so --scale grows the whole site */
html { font-size: calc(20px * var(--scale)); -webkit-text-size-adjust: 100%; }
/* Page background, text color and font */
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.1rem;
  line-height: 1.5;
  min-height: 100vh;
  color-scheme: light;
}
/* The background image sits on a fixed layer behind everything, under a white veil */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(var(--veil), var(--veil)), var(--page-bg) center / cover no-repeat;
}
/* Buttons use the page font instead of the browser default */
button { font: inherit; color: inherit; }
/* Icons are outlines drawn in the text color */
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Thick ring around whatever the keyboard is on */
:focus-visible { outline: 4px solid var(--accent); outline-offset: 4px; }

/* ---------- top bar ---------- */
/* Row: logo on the left, tools on the right; wraps on small screens */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  max-width: 760px; margin: 0 auto;
  padding: 16px 16px 8px;
}
/* The logo button, without a button look */
.brand {
  display: flex; align-items: center; gap: 10px;
  background: none; border: 0; padding: 6px 4px; cursor: pointer;
  font-weight: 700; font-size: 1.05rem;
}
/* Blue square behind the logo icon */
.brand-mark {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink);
}
.brand-mark svg { width: 26px; height: 26px; }
/* The three tool buttons */
.tools { display: flex; gap: 8px; flex-wrap: wrap; }
.tool {
  display: flex; align-items: center; gap: 8px;
  min-height: 56px; padding: 0 16px;
  background: var(--surface); border: 2px solid var(--line); border-radius: 16px;
  font-size: 0.85rem; font-weight: 700; cursor: pointer;
}
.tool svg { width: 24px; height: 24px; }
/* The "AA" drawing on the Text size button */
.tool-aa { font-weight: 700; font-size: 0.9rem; letter-spacing: -0.02em; }
.tool-aa span { font-size: 1.35em; }
/* A tool that is switched on turns blue */
.tool[aria-pressed="true"] { border-color: var(--accent); background: var(--c1-bg); }
/* Say it stands out in green */
.tool-say { border-color: var(--c2-edge); background: var(--c2-bg); }

/* ---------- main column ---------- */
/* One centered column, with room at the bottom for the fixed bar */
main {
  max-width: 760px; margin: 0 auto;
  padding-inline: 16px;
  padding-block: 12px calc(150px + env(safe-area-inset-bottom, 0px));
}
main:focus, main:focus-visible { outline: none; }   /* main gets focus on every new screen; no ring needed */
/* Small label above the title that says where you are */
.eyebrow {
  margin: 0 0 6px; font-size: 0.85rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent);
}
/* Screen title, and the sentence under it */
h1 { margin: 0 0 12px; font-size: 2rem; line-height: 1.2; text-wrap: balance; }
.lead { margin: 0 0 28px; font-size: 1.15rem; color: var(--ink-soft); max-width: 34em; }
/* Extras under the top menu (voice tip, Change phone) */
.after { margin-top: 26px; display: grid; gap: 10px; justify-items: start; }
.after p { margin: 0; color: var(--ink-soft); }

/* ---------- the big choices (never more than 3) ---------- */
/* The list that stacks the choice buttons */
.choices { display: grid; gap: 18px; list-style: none; margin: 0; padding: 0; }
/* One big choice button, raised on a solid ledge */
.choice {
  width: 100%; min-height: 112px;
  display: flex; align-items: center; gap: 18px;
  padding: 18px 20px;
  text-align: left; cursor: pointer;
  border-radius: var(--radius);
  border: 3px solid var(--edge);
  background: var(--fill);
  box-shadow: 0 5px 0 var(--edge);
  transition: transform .08s ease, box-shadow .08s ease;
}
/* Pressed: it sinks down onto the ledge */
.choice:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--edge); }
/* The three color schemes: fill + edge */
.choice.c1 { --fill: var(--c1-bg); --edge: var(--c1-edge); }
.choice.c2 { --fill: var(--c2-bg); --edge: var(--c2-edge); }
.choice.c3 { --fill: var(--c3-bg); --edge: var(--c3-edge); }
/* Colored icon tile on the left (its shape follows the phone) */
.choice-icon {
  flex: none; width: 64px; height: 64px; border-radius: var(--icon-radius);
  display: grid; place-items: center;
  background: var(--edge); color: var(--surface);
  font-weight: 700; font-size: 1.5rem;
}
.choice-icon svg { width: 36px; height: 36px; }
/* Your picture instead of the drawn icon (e.g. the phone buttons): no colored tile behind it */
.choice-icon.has-img { background: none; }
.choice-icon img { width: 100%; height: 100%; object-fit: contain; }
/* Title and subtitle */
.choice-text { min-width: 0; display: grid; gap: 2px; }
.choice-title { font-size: 1.35rem; font-weight: 700; line-height: 1.25; }
.choice-sub { font-size: 0.95rem; color: var(--ink-soft); }
/* Arrow on the right */
.choice-arrow { margin-left: auto; flex: none; width: 32px; height: 32px; color: var(--edge); }

/* ---------- step screen ---------- */
/* Progress dots and "Step 2 of 5" */
.progress { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; flex-wrap: wrap; }
.dots { display: flex; gap: 8px; flex-wrap: wrap; }
.dot { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--accent); }
.dot.on { background: var(--accent); }
.progress-text { font-weight: 700; font-size: 1rem; }

/* The white card that holds one step */
.step-card {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
  display: grid; gap: 18px;
}
/* The instruction (biggest text on the screen), and the detail under it */
.step-text { margin: 0; font-size: 1.55rem; line-height: 1.35; font-weight: 700; text-wrap: pretty; }
.step-detail { margin: 0; font-size: 1.1rem; color: var(--ink-soft); }

/* Your screenshot (images/<phone>/<lesson>-<step>.png) */
.shot {
  margin: 0;
  display: flex; justify-content: center;
  background: var(--tint); border-radius: 18px; padding: 10px;
}
/* Fit the screenshot without stretching; never taller than 62% of the screen */
.shot img {
  display: block; max-width: 100%; max-height: 62vh; width: auto; height: auto;
  border-radius: 14px; border: 2px solid var(--line);
}
.has-shot .look, .has-shot .vg-figure { display: none; }   /* the real screenshot replaces the drawn hint and the drawing */

/* "Look for" hint: a colored icon and a description */
.look {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 16px; border-radius: 18px;
  background: var(--tint);
}
.look-icon {
  flex: none; width: 72px; height: 72px; border-radius: var(--icon-radius);
  display: grid; place-items: center; color: #FFFFFF;
}
.look-icon svg { width: 40px; height: 40px; }
.look-icon.text-icon { font-weight: 700; font-size: 1.6rem; }
/* Your picture of the real icon: no colored tile behind it */
.look-icon.has-img { background: none !important; }
.look-icon img { width: 100%; height: 100%; object-fit: contain; }
.look-label { min-width: 0; font-size: 1rem; }
.look-label b { display: block; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); }

/* Yellow tip box with an info icon */
.tip {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: 16px;
  background: var(--warn-bg); border: 2px solid var(--warn-edge);
  font-size: 1rem;
}
.tip svg { flex: none; width: 28px; height: 28px; color: var(--warn-edge); margin-top: 2px; }

/* Previous / Next: Next is wider because it is the main action */
.step-nav { display: grid; grid-template-columns: 1fr 1.4fr; gap: 14px; margin-top: 22px; }
/* Shared look for the large buttons */
.big-btn {
  min-height: 84px; border-radius: 20px; cursor: pointer; padding: 0 16px;
  font-size: 1.25rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  border: 3px solid var(--accent);
}
.big-btn svg { width: 28px; height: 28px; stroke-width: 2.6; }
/* Next: solid blue on a ledge; sinks when pressed */
.big-btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 5px 0 color-mix(in srgb, var(--accent) 60%, var(--ink)); }
.big-btn.primary:active { transform: translateY(4px); box-shadow: none; }
/* Previous and Close: white */
.big-btn.quiet { background: var(--surface); color: var(--ink); }
/* Faded when it cannot be used */
.big-btn[disabled] { opacity: .35; cursor: default; }

/* ---------- daily safety tip ---------- */
/* The card on the topics screen: white, with a blue border so it stands apart from the topics */
.daily-card {
  width: 100%; min-height: 96px;
  display: flex; align-items: center; gap: 16px;
  padding: 16px 18px; text-align: left; cursor: pointer;
  background: var(--surface); border: 3px solid var(--accent); border-radius: var(--radius);
  box-shadow: 0 5px 0 var(--accent);
}
.daily-card:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--accent); }
.daily-card.is-done { border-color: var(--good); box-shadow: 0 5px 0 var(--good); }
/* Home page: mascot and today's tip side by side */
.hero { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.hero .mascot { flex: none; margin: 0; }
.hero .daily-card { flex: 1; min-width: 0; }
/* Round icon used on the card, the tip and the quiz answers */
.daily-icon {
  flex: none; width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink);
}
.daily-icon svg { width: 30px; height: 30px; }
.daily-card.is-done .daily-icon, .feedback.is-right .daily-icon { background: var(--good); }
.feedback.is-wrong .daily-icon { background: var(--c3-edge); }
/* Right / not quite: a colored border on the answer card */
.feedback.is-right { border-color: var(--good); border-width: 3px; }
.feedback.is-wrong { border-color: var(--c3-edge); border-width: 3px; }
/* A single big button under the tip or answer */
.step-nav.single { grid-template-columns: 1fr; }
.daily-note { margin-top: 18px; }

/* ---------- done screen ---------- */
/* Big green check mark (shown when there is no mascot) */
.done-badge {
  width: 96px; height: 96px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--good); color: var(--surface);
  margin-bottom: 14px;
}
.done-badge svg { width: 56px; height: 56px; stroke-width: 3; }

/* ---------- mascot (only shows if images/mascot.png exists) ---------- */
/* Mascot on screens */
.mascot { display: block; width: 7rem; height: 7rem; object-fit: contain; margin-bottom: 10px; }
/* Mascot in the top bar: no blue square behind it */
.brand-mark:has(img) { background: none; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- bottom bar ---------- */
/* Bar fixed to the bottom of the screen */
.bottombar {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: center; gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  border-top: 2px solid var(--line);
}
/* Go back / Start over share the width equally */
.nav-btn {
  flex: 1; max-width: 360px; min-height: 68px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 18px; border: 2px solid var(--line);
  background: var(--tint); font-weight: 700; font-size: 1.05rem; cursor: pointer;
}
.nav-btn svg { width: 26px; height: 26px; stroke-width: 2.6; }

/* ---------- voice command panel ---------- */
/* Dim backdrop over the whole page, card at the bottom */
.listen {
  position: fixed; inset: 0; z-index: 10;
  background: var(--scrim);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
}
/* The white card */
.listen-card {
  width: 100%; max-width: 560px;
  background: var(--surface); border-radius: 28px; border: 3px solid var(--c2-edge);
  padding: 26px 22px 22px;
  display: grid; justify-items: center; gap: 10px; text-align: center;
}
/* Big green microphone circle */
.listen-mic {
  width: 96px; height: 96px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--c2-edge); color: var(--surface);
}
.listen-mic svg { width: 48px; height: 48px; }
/* Pulses while listening; turns orange after a miss */
.listen.is-listening .listen-mic { animation: pulse 1.4s ease-in-out infinite; }
.listen.is-miss .listen-mic { background: var(--c3-edge); }
/* One "breath" of the pulse: a ring grows and fades */
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c2-edge) 55%, transparent); }
  50%      { box-shadow: 0 0 0 18px color-mix(in srgb, var(--c2-edge) 0%, transparent); }
}
/* Panel text: status, hint, and what was heard */
.listen-title { margin: 6px 0 0; font-size: 1.6rem; font-weight: 700; }
.listen-text { margin: 0; color: var(--ink-soft); max-width: 26em; }
.listen-heard { margin: 0; font-size: 1.2rem; font-weight: 700; min-height: 1.5em; }
/* Try again / Close: side by side if they fit, stacked if not */
.listen-actions { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-top: 8px; }
.listen-actions .big-btn { min-height: 72px; }

/* ---------- phones ---------- */
/* Slightly smaller base size, icon-only tools, stacked Previous/Next */
@media (max-width: 520px) {
  html { font-size: calc(18px * var(--scale)); }
  h1 { font-size: 1.75rem; }
  .tool-label { display: none; }
  .tool { padding: 0 14px; }
  .choice { min-height: 100px; gap: 14px; padding: 16px; }
  .choice-icon { width: 56px; height: 56px; }
  .choice-arrow { display: none; }
  .step-text { font-size: 1.4rem; }
  .step-nav { grid-template-columns: 1fr; }
  .step-nav .primary { order: -1; }
}
/* Turn off movement for people who asked their device for less motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ================= Front page ================= */
/* Welcome text, the four topic cards and Ask TechPal are centered */
.tp-hero { text-align: center; }
.tp-hero h1 { font-size: clamp(1.8rem, 5vw, 2.5rem); }
.tp-hero h2 { font-size: 1.3rem; margin: 32px 0 18px; }
.tp-hero .lead { margin-inline: auto; }
/* The four topic cards: two by two, one column on phones */
.tp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.tp-card {
  min-height: 190px; padding: 24px 16px;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 9px;
  border: 3px solid var(--line); border-radius: var(--radius);
  background: var(--surface); cursor: pointer; text-align: center;
  box-shadow: 0 5px 0 var(--line);
}
.tp-card:hover, .tp-card:focus-visible { border-color: var(--accent); background: var(--tint); }
.tp-card:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--line); }
.tp-card strong { font-size: 1.15rem; line-height: 1.3; }
.tp-card small { font-size: 0.85rem; color: var(--ink-soft); }
.tp-emoji { font-size: 2.5rem; line-height: 1; }

/* "Not sure where to start?": the Ask TechPal box */
.tp-talk { margin: 35px 0 0; padding: 24px; border-radius: var(--radius); background: var(--tint); }
.tp-talk h2 { margin: 0 0 8px; }
.tp-talk p { margin: 6px 0 18px; }
.tp-assistant { margin: 20px auto 0; max-width: 660px; padding: 20px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); text-align: left; }
.tp-assistant-heading { display: flex; gap: 15px; align-items: center; }
.tp-assistant-icon { flex: none; width: 62px; height: 62px; display: grid; place-items: center; border-radius: 18px; background: var(--c2-bg); color: var(--c2-edge); }
.tp-assistant-icon svg { width: 34px; height: 34px; }
.tp-assistant-heading strong { display: block; font-size: 1.25rem; }
.tp-assistant-heading span:not(.tp-assistant-icon) { display: block; color: var(--ink-soft); font-size: 0.85rem; }
.tp-talk .tp-examples { font-size: 0.88rem; color: var(--ink-soft); margin: 16px 0; }
.tp-talk .tp-privacy { font-size: 0.75rem; color: var(--ink-soft); margin: 12px 0 0; }
/* The Start speaking and Find help buttons */
.tp-mic, #askButton {
  min-height: 52px; padding: 14px 20px; cursor: pointer;
  border: 0; border-radius: 14px; background: var(--accent); color: var(--accent-ink); font-weight: 700;
}
.tp-assistant .tp-mic { width: 100%; min-height: 66px; font-size: 1.08rem; }
/* Red and gently pulsing while it listens */
.tp-mic.is-listening { background: #9E2437; color: #FFFFFF; animation: tp-pulse 1.2s ease-in-out infinite; }
@keyframes tp-pulse { 50% { box-shadow: 0 0 0 7px rgba(158, 36, 55, 0.2); } }
/* The typing box */
.tp-label { display: block; font-size: 0.85rem; font-weight: 700; margin: 22px 0 8px; text-align: left; }
.tp-input-row { display: flex; gap: 8px; }
#problemInput { flex: 1; min-width: 0; min-height: 52px; padding: 12px; border: 2px solid var(--line); border-radius: 14px; font: inherit; background: var(--surface); color: var(--ink); }
#voiceStatus { font-size: 0.95rem; font-weight: 700; margin-bottom: 0; }

/* "Pick up where you left off" */
.tp-resume { margin: 24px 0; padding: 20px; background: var(--surface); border: 3px solid var(--accent); border-radius: var(--radius); }
.tp-resume h2 { margin: 0 0 6px !important; }
.tp-resume p { margin: 0 0 14px; }
.tp-resume .big-btn { width: 100%; }
.tp-clear { display: inline-block; border: 0; background: none; text-decoration: underline; padding: 14px 8px 0; cursor: pointer; }

@media (max-width: 560px) {
  .tp-grid { grid-template-columns: 1fr; }
  .tp-card { min-height: 130px; }
  .tp-input-row { flex-direction: column; }
  .tp-talk { padding: 18px 14px; }
}
@media (prefers-reduced-motion: reduce) { .tp-mic.is-listening { animation: none; } }

/* ================= Step illustrations (drawn examples) =================
   A small drawn screen inside the step card. Hidden automatically when a real screenshot exists. */
.vg-figure { margin: 0; padding: 18px; background: var(--tint); border: 2px solid var(--line); border-radius: 20px; text-align: center; }
.vg-topline { font-weight: 700; font-size: 0.95rem; margin-bottom: 12px; }
/* The device outline: a phone shape, or a wider screen for computers */
.vg-device { max-width: 310px; margin: auto; padding: 10px 9px 15px; border: 7px solid var(--ink); border-radius: 30px; background: var(--surface); }
.vg-device.vg-desktop { max-width: 460px; border-width: 5px; border-radius: 13px; padding: 6px 6px 15px; }
.vg-bar { font-size: 0.72rem; font-weight: 700; padding: 4px 0 10px; color: var(--ink-soft); }
.vg-screen { min-height: 150px; padding: 12px; text-align: left; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.vg-screen-title { font-weight: 700; font-size: 1rem; margin-bottom: 10px; }
/* List rows: the one to tap is highlighted with a numbered badge */
.vg-row { display: flex; align-items: center; gap: 9px; min-height: 46px; padding: 8px 10px; border-radius: 10px; overflow-wrap: anywhere; font-size: 0.9rem; }
.vg-focus { border: 3px solid var(--c1-edge); background: var(--c1-bg); color: var(--ink); }
.vg-muted { border-bottom: 1px solid var(--line); color: var(--ink-soft); }
.vg-number { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 0.8rem; font-weight: 700; }
.vg-chevron { margin-left: auto; font-size: 1.4rem; line-height: 1; }
.vg-skel { display: block; width: 55%; height: 10px; border-radius: 6px; background: var(--line); opacity: 0.7; }   /* a grey stand-in for other menu items */
/* Typing box */
.vg-field { margin-top: 10px; padding: 12px; border: 2px dashed var(--c1-edge); border-radius: 8px; font-size: 0.85rem; }
.vg-caption { margin-top: 10px; font-size: 0.8rem; color: var(--ink-soft); }
/* Slider */
.vg-line { display: flex; flex-wrap: nowrap; align-items: center; justify-content: center; gap: 8px; padding: 22px 0; font-size: 0.8rem; }
.vg-slider { position: relative; display: block; flex: 0 1 140px; min-width: 70px; height: 9px; border-radius: 20px; background: var(--c1-bg); }
.vg-slider span { position: absolute; left: 70%; top: 50%; transform: translate(-50%, -50%); width: 27px; height: 27px; border-radius: 50%; border: 3px solid var(--c1-edge); background: var(--surface); }
/* Home screen with three apps */
.vg-app-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.vg-app { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 3px; border-radius: 12px; font-size: 0.7rem; text-align: center; overflow-wrap: anywhere; }
.vg-app-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--icon-radius); background: var(--tint); color: var(--ink-soft); }
.vg-app-icon svg { width: 28px; height: 28px; }
.vg-app-icon.look-icon { color: #FFFFFF; }
.vg-app-icon.has-img { background: none; }
.vg-app-icon img { width: 100%; height: 100%; object-fit: contain; }
.vg-selected { outline: 3px solid var(--c1-edge); background: var(--c1-bg); color: var(--ink); font-weight: 700; }
.vg-app .vg-number { position: absolute; top: -8px; right: -6px; width: 22px; height: 22px; }
/* Taskbar (Windows) or menu bar (Mac): Wi-Fi, sound and the clock */
.vg-bar-strip { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 60px; padding: 8px 10px; border-radius: 8px; background: var(--tint); border: 1px solid var(--line); }
.vg-bar-strip.vg-top { margin: 0 0 60px; }
.vg-bar-item { position: relative; display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 6px; border-radius: 8px; color: var(--ink-soft); }
.vg-bar-item svg { width: 24px; height: 24px; }
.vg-bar-item.vg-selected { color: var(--ink); }
.vg-bar-item .vg-number { position: absolute; top: -12px; right: -10px; width: 22px; height: 22px; }
.vg-clock { font-size: 0.8rem; font-weight: 700; }
/* On a call: the red hang-up button */
.vg-call { position: relative; display: flex; justify-content: center; padding: 22px 0 6px; }
.vg-hangup { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #D93A3A; color: #FFFFFF; transform: rotate(135deg); }
.vg-hangup svg { width: 32px; height: 32px; }
.vg-call .vg-number { position: absolute; top: 12px; left: calc(50% + 22px); }
.vg-figure figcaption { margin-top: 12px; font-size: 0.75rem; color: var(--ink-soft); line-height: 1.4; }
@media (max-width: 420px) { .vg-figure { padding: 10px; } .vg-device { max-width: 100%; } }

/* ================= High contrast mode =================
   Turned on by the High contrast button: the dark "Phone Steps" look.
   Light text on near-black, calm teal buttons, and the glowing pond wallpaper
   (images/backgrounds/high-contrast.jpg) under a dark veil so text stays easy to read. */
:root.high-contrast {
  /* page and text colors */
  --bg: #11161C;  --tint: #161D25;  --surface: #1B232C;
  --ink: #EEF2F4; --ink-soft: #B9C3CC; --line: #34404C;
  --accent: #4FC2BA; --accent-ink: #0B1A1A;          /* teal Next button with dark text */
  /* the three choice colors: deep fill + bright edge */
  --c1-bg: #1C2C45; --c1-edge: #7EAAF0;
  --c2-bg: #18332A; --c2-edge: #6CCB93;
  --c3-bg: #3A2E14; --c3-edge: #E8B65A;
  /* feedback colors and the see-through layers */
  --good: #6CCB93; --warn-bg: #3A2E14; --warn-edge: #E8B65A;
  --scrim: rgba(5, 8, 12, 0.7);
  --veil: rgba(17, 22, 28, 0.80);                       /* dark wash over the wallpaper */
  color-scheme: dark;                                   /* dark scrollbars and text boxes */
}
/* The glowing pond wallpaper on every page (replaces the daytime one) */
:root.high-contrast body::before {
  background: linear-gradient(var(--veil), var(--veil)),
              url("images/backgrounds/high-contrast.jpg") center / cover no-repeat;
}
/* The "Look for" box sits darker than its card, like the example */
:root.high-contrast .look { background: var(--bg); }
/* Pictures on the iPhone / Android buttons need a light tile to show up on dark */
:root.high-contrast .choice-icon.has-img { background: #FFFFFF; padding: 6px; border-radius: var(--icon-radius); }
/* Previous / Go back / Start over: dark buttons with a teal edge */
:root.high-contrast .big-btn.quiet { background: var(--bg); border-color: #2E5C59; }
:root.high-contrast .nav-btn { background: var(--bg); }
:root.high-contrast .bottombar { background: var(--surface); }
/* The pressed High contrast button */
:root.high-contrast .tool[aria-pressed="true"] { background: #1D3B39; border-color: var(--accent); }
/* The typing box hint text */
:root.high-contrast #problemInput::placeholder { color: #8D99A6; }

/* Phones: a smaller mascot so today's tip has room beside it */
@media (max-width: 520px) { .hero .mascot { width: 4.5rem; height: 4.5rem; } .hero { gap: 12px; } }
