/* NoteAdventure Beta Portal - Adventure in Musicland Theme */

:root {
  --adventure-blue: #4A6FA5;
  --adventure-blue-dark: #3A5A8A;
  --musical-purple: #8B5FBF;
  --musical-purple-dark: #7A4EAE;
  --golden-achievement: #F2C94C;
  --forest-green: #6BCB77;
  --coral-celebration: #FF6B6B;
  --sky-light: #E8F4F8;
  --warm-white: #FAF9F6;
  --text-primary: #2D3748;
  /* ⚠️ Was #718096 until 4.15.9: 4.02:1 on white, 3.81:1 on --warm-white and
     3.21:1 where the page gradient ends (#E8E4F0), and a dozen small-text
     classes used it, so all of them failed WCAG 1.4.3. Every use of this token
     is text, so the token itself was darkened rather than each use patched:
     5.90:1 on white, 5.60:1 on --warm-white, 5.26:1 on --sky-light and 4.71:1
     on #E8E4F0, measured. `test_beta_portal_accessibility.py` recomputes every
     text colour in this file against white, so a lighter value goes red.
     It replaces --text-secondary-strong, which was this value under a second
     name. Same decorative/text split as NQSemanticColors error vs errorText in
     .claude/rules/design-system.md, learned the same way. */
  --text-secondary: #596579;
  --error-text: #C53030;                 /* 5.47:1 on white; was coral, 2.78:1 */
  /* A form field's edge is a UI component boundary (WCAG 1.4.11, 3:1).
     --border-color is 1.23:1 on white, fine for a card, not for an input. */
  --input-border: #718096;               /* 4.02:1 on white */
  --border-color: #E2E8F0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, var(--warm-white) 0%, #E8E4F0 100%);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

/* Header */
.header {
  background: linear-gradient(135deg, var(--adventure-blue) 0%, var(--musical-purple) 100%);
  color: white;
  padding: 48px 24px;
  text-align: center;
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.logo-icon {
  font-size: 48px;
  /* ⚠️ Was `infinite` until 4.15.9: perpetual motion beside the content, with
     no way to stop it (WCAG 2.2.2). One bob, three seconds, then still; and
     none at all under prefers-reduced-motion (end of this file). */
  animation: float 3s ease-in-out 1;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0;
}

.tagline {
  /* ⚠️ No opacity (4.15.9): at 0.9, white measured 4.13:1 over the purple end
     of the header gradient, and 17.6 px regular is small text (4.5:1). Full
     white is 4.68:1 there and 5.11:1 at the blue end. */
  font-size: 1.1rem;
  max-width: 400px;
  margin: 0 auto;
}

/* Container */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px;
}

/* Cards */
.card {
  background: white;
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}

.card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--adventure-blue);
}

/* Passcode Section */
.passcode-section {
  text-align: center;
}

.input-group {
  display: flex;
  gap: 12px;
  max-width: 400px;
  margin: 24px auto;
}

.input-group input {
  flex: 1;
  padding: 14px 18px;
  border: 2px solid var(--input-border);  /* 4.02:1, was 1.23:1 (WCAG 1.4.11) */
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-group input:focus-visible {
  /* A real outline (4.15.9): the old indicator was a border shift from one
     mid-blue-grey to another plus a 20% halo, too faint to find (2.4.7). */
  outline: 3px solid var(--adventure-blue);
  outline-offset: 2px;
  border-color: var(--adventure-blue);
}

.input-group input[aria-invalid="true"] {
  border-color: var(--error-text);
}

.error-text {
  color: var(--error-text);              /* was coral: 2.78:1 on white */
  font-size: 0.9rem;
  margin-top: 8px;
}

/* Buttons */
.btn {
  padding: 14px 28px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.btn-primary {
  background: var(--adventure-blue);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: var(--adventure-blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(74, 111, 165, 0.3);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Consent Section */
.consent-box {
  background: #FFF9E6;
  border: 2px solid var(--golden-achievement);
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 24px;
  height: 24px;
  margin-top: 2px;
  accent-color: var(--adventure-blue);
}

.consent-text {
  font-size: 0.95rem;
  line-height: 1.5;
}

.consent-section {
  text-align: center;
}

.consent-section .consent-box {
  text-align: left;
}

/* Version Info */
.version-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.version-badge {
  /* ⚠️ NOT var(--forest-green): white on #6BCB77 is 2.01:1 and this is 14.4px
     semibold. Same measured dark green as the Android install button. */
  background: #2F7A3E;                   /* white on this: 5.28:1 */
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

.build-date {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Platform Buttons */
.platform-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 16px;
}

.download-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
  border-radius: 16px;
  text-decoration: none;
  color: white;
  transition: transform 0.2s, box-shadow 0.2s;
}

.download-button.android {
  background: linear-gradient(135deg, #3DDC84 0%, #2DA85F 100%);
}

.download-button.android:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(61, 220, 132, 0.4);
}

.download-button.ios {
  background: linear-gradient(135deg, var(--musical-purple) 0%, var(--musical-purple-dark) 100%);
}

.download-button.ios:hover:not(.disabled) {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(139, 95, 191, 0.4);
}

.download-button.disabled {
  background: #A0AEC0;
  cursor: not-allowed;
}

.platform-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
}

.btn-text {
  font-size: 1.2rem;
  font-weight: 700;
}

.btn-subtext {
  /* 13.6px, so this is small text on the 4.5:1 bar.
     ⚠️ opacity:0.9 dropped white to 4.13:1 over the purple gradient's light
     end. Full white measures 4.68:1 there and 5.95:1 at the dark end. */
  font-size: 0.85rem;
  margin-top: 4px;
}

.platform-hint {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 8px;
}

.tab-btn {
  padding: 10px 20px;
  border: none;
  background: none;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  transition: color 0.2s, background-color 0.2s;
}

.tab-btn:hover {
  color: var(--adventure-blue);
}

.tab-btn.active {
  color: var(--adventure-blue);
  background: rgba(74, 111, 165, 0.1);
}

.tab-btn:focus-visible {
  outline: 3px solid var(--adventure-blue);
  outline-offset: 2px;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Instruction Steps */
.instruction-step {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.step-number {
  width: 36px;
  height: 36px;
  background: var(--adventure-blue);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.step-content h4 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.step-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Troubleshooting */
.troubleshooting {
  background: var(--sky-light);
  border-radius: 12px;
  padding: 20px;
  margin-top: 24px;
}

.troubleshooting h4 {
  margin-bottom: 12px;
  color: var(--adventure-blue);
}

.troubleshooting ul {
  list-style: none;
  padding: 0;
}

.troubleshooting li {
  padding: 8px 0;
  font-size: 0.95rem;
}

/* Account Section */
.account-info {
  background: var(--sky-light);
  border-radius: 12px;
  padding: 20px;
}

.account-info ul {
  margin: 16px 0;
  padding-left: 20px;
}

.account-info li {
  padding: 6px 0;
}

.contact-note {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Notes Grid */
.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.note-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--warm-white);
  border-radius: 12px;
}

.note-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.note-content h3,
.note-content h4 {
  font-size: 1rem;
  margin-bottom: 4px;
}

/* A11 (4.15.9): an email address is one long "word". At 320 px it cannot fit
   a tile, a note or a button, and min-width:auto on a flex item refused to let
   it break, so it was clipped. `anywhere` (not `break-word`) also lowers the
   min-content width, which is what a flex item sizes itself by. */
.note-content {
  min-width: 0;
  overflow-wrap: anywhere;
}

.note-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.note-content a {
  color: var(--adventure-blue);
}

/* Footer */
.footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer a {
  color: var(--adventure-blue-dark);     /* 5.58:1 on #E8E4F0; blue was 4.09:1 */
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* ============================================================
   FEEDBACK HERO — primary CTA after consent
   ============================================================
   This is the first thing beta testers see post-consent.
   Bug reporting is the high-frequency action; downloads are
   secondary. Do not bury this below other sections.
   ============================================================ */
.feedback-hero {
  background: linear-gradient(135deg, #FFF5F5 0%, #FFFAF0 60%, #FFF9E6 100%);
  border: 2px solid var(--coral-celebration);
  border-radius: 20px;
  padding: 40px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.feedback-hero::before {
  /* Subtle decorative wash so the hero doesn't read as a flat card */
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 107, 107, 0.08), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(242, 201, 76, 0.10), transparent 45%);
  pointer-events: none;
}

.feedback-hero > * {
  position: relative;
  z-index: 1;
}

.feedback-hero-icon {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 12px;
  animation: float 3s ease-in-out 1;     /* see .logo-icon (WCAG 2.2.2) */
}

.feedback-hero-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--adventure-blue);
  margin-bottom: 12px;
  line-height: 1.2;
}

.feedback-hero-blurb {
  font-size: 1.05rem;
  color: var(--text-primary);
  max-width: 540px;
  margin: 0 auto 24px;
  line-height: 1.55;
}

.feedback-hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 16px;
}

.btn-feedback-primary,
.btn-feedback-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  min-height: 52px;        /* >= 44pt touch target */
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
  border: 2px solid transparent;
}

.btn-feedback-primary {
  /* ⚠️ Not --coral-celebration: white on #FF6B6B is 2.78:1, and this is the
     primary action on the page. #C53030 is 5.47:1 (4.15.9). */
  background: var(--error-text);
  color: white;
  box-shadow: 0 6px 16px rgba(197, 48, 48, 0.30);
  max-width: 100%;
  overflow-wrap: anywhere;               /* see .note-content (A11) */
}

.btn-feedback-primary:hover,
.btn-feedback-primary:focus-visible {
  background: #9B2C2C;                   /* white on this: 7.53:1 */
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(197, 48, 48, 0.40);
}

/* ⚠️ Was `outline: none`, leaving a background change of 1.15:1 as the only
   sign of keyboard focus (WCAG 2.4.7). */
.btn-feedback-primary:focus-visible {
  outline: 3px solid var(--text-primary);
  outline-offset: 3px;
}

.btn-feedback-secondary {
  background: white;
  color: var(--musical-purple);
  border-color: var(--musical-purple);
}

.btn-feedback-secondary:hover,
.btn-feedback-secondary:focus-visible {
  background: var(--musical-purple);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(139, 95, 191, 0.35);
}

.btn-feedback-secondary:focus-visible {
  outline: 3px solid var(--text-primary);
  outline-offset: 3px;
}

.btn-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.feedback-hero-meta {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 8px;
}

.feedback-hero-meta a {
  color: var(--musical-purple);
  font-weight: 600;
  text-decoration: none;
}

.feedback-hero-meta a:hover {
  text-decoration: underline;
}

/* ============================================================
   COLLAPSIBLE SECTION — secondary content (Get the app)
   ============================================================ */
.collapsible-section {
  padding: 0;
  overflow: hidden;
}

.collapsible-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 32px;
  user-select: none;
  transition: background-color 0.2s;
}

.collapsible-summary::-webkit-details-marker {
  display: none;
}

.collapsible-summary:hover {
  background: var(--sky-light);
}

.collapsible-summary:focus-visible {
  outline: 3px solid var(--adventure-blue);
  outline-offset: -3px;
}

.collapsible-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--adventure-blue);
}

.collapsible-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.collapsible-meta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.collapsible-chevron {
  display: inline-block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: transform 0.2s;
}

details[open] .collapsible-chevron {
  transform: rotate(180deg);
}

.collapsible-body {
  padding: 8px 32px 32px;
  border-top: 1px solid var(--border-color);
}

.collapsible-body .version-info {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-top: 16px;
}

.collapsible-body .version-sub {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Nested section inside the collapsible "Get the app" body */
.nested-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.nested-heading {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--adventure-blue);
  margin-bottom: 16px;
}

/* ============================================================
   DOCS SECTION — supporting links
   ============================================================ */
.docs-intro {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 600px) {
  .header {
    padding: 32px 16px;
  }

  .header h1 {
    font-size: 2rem;
  }

  .logo-icon {
    font-size: 36px;
  }

  .container {
    padding: 16px;
  }

  .card {
    padding: 24px 20px;
  }

  .input-group {
    flex-direction: column;
  }

  .platform-buttons {
    grid-template-columns: 1fr;
  }

  .instruction-step {
    flex-direction: column;
    gap: 12px;
  }

  .notes-grid {
    grid-template-columns: 1fr;
  }

  /* Feedback hero — phone tweaks */
  .feedback-hero {
    padding: 32px 20px;
  }

  .feedback-hero-icon {
    font-size: 48px;
  }

  .feedback-hero-title {
    font-size: 1.6rem;
  }

  .feedback-hero-blurb {
    font-size: 1rem;
  }

  .feedback-hero-actions {
    flex-direction: column;
    gap: 12px;
  }

  .btn-feedback-primary,
  .btn-feedback-secondary {
    width: 100%;
  }

  /* Collapsible — phone tweaks */
  .collapsible-summary {
    padding: 20px;
    flex-wrap: wrap;
  }

  .collapsible-body {
    padding: 8px 20px 24px;
  }

  .collapsible-title {
    font-size: 1.1rem;
  }
}

/* ============================================================
   WHAT'S NEW + WHAT TO TEST (Sprint 3.11.0)
   ============================================================
   Two release-notes cards positioned between the Feedback Hero
   and the (collapsed) Get-the-App section. Reuse .notes-grid +
   .note-item for the What's New tiles; the test checklist is a
   plain ordered list with stronger lead-in styling per item.
   ============================================================ */

.whats-new-intro,
.what-to-test-intro {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.5;
}

.whats-new-subhead {
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 28px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.whats-new-section .whats-new-subhead:first-of-type {
  margin-top: 8px;
}

.test-checklist {
  list-style-position: outside;
  padding-left: 24px;
  margin: 0;
}

.test-checklist li {
  margin-bottom: 18px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.test-checklist li strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 4px;
  font-weight: 700;
}

.what-to-test-footer {
  margin-top: 24px;
  padding: 12px 16px;
  background: var(--warm-white);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.what-to-test-footer strong {
  color: var(--text-primary);
}

/* ============================================================
   INSTALL CARD — the front door (added 2026-09-13)
   ============================================================
   Apple's public TestFlight link means a parent can arrive here
   having never installed anything, so this card sits above the
   feedback hero and is the first thing after the consent gate.

   ⚠️ Every colour below was MEASURED against white text, not
   picked by eye. The numbers are in the comments and they are
   the reason the greens are darker than the brand's forestGreen
   (#6BCB77), which is 2.01:1 with white and cannot carry a
   label. See .claude/rules/design-system.md — the decorative /
   text split is the same lesson, learned the same way.
   ============================================================ */

.install-card {
  border-top: 5px solid transparent;
  border-image: linear-gradient(90deg, var(--adventure-blue), var(--musical-purple)) 1;
  background: linear-gradient(180deg, #FFFFFF 0%, var(--sky-light) 100%);
}

.install-head {
  text-align: center;
  margin-bottom: 28px;
}

.install-card .install-title {
  font-size: 30px;
  font-weight: 800;
  color: var(--text-primary);          /* 11.99:1 on white */
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.install-title-icon { font-size: 32px; }

.install-blurb {
  font-size: 17px;
  color: var(--text-primary);
  max-width: 46ch;
  margin: 0 auto;
}

.install-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.install-option {
  background: #FFFFFF;
  border: 2px solid var(--border-color);
  border-radius: 16px;
  padding: 24px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

/* Set by script.js on whichever device the visitor is actually holding.
   ⚠️ The ring is a SECOND cue, never the only one — the hint paragraph
   underneath names the button by its label, so this still works for a
   colourblind visitor and for a screen reader (WCAG 1.4.1). */
.install-option.is-current-platform {
  border-color: var(--adventure-blue);
  box-shadow: 0 0 0 4px rgba(74, 111, 165, 0.18);
  transform: translateY(-2px);
}

.install-option-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.install-option-head .platform-icon {
  width: 26px;
  height: 26px;
  /* `.platform-icon` carries margin-bottom:12px for the big download buttons
     further down the page. Without resetting it here a 26px icon sits in a 38px
     box and flex-centres 6px above its own label. */
  margin-bottom: 0;
  color: var(--text-primary);
}

.install-option-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}

.install-qr {
  display: block;
  background: #FFFFFF;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  line-height: 0;
}

.install-qr img {
  display: block;
  width: 190px;
  height: 190px;
  /* The SVG carries its own 4-module quiet zone, which the spec requires and
     which scanners genuinely need. Do not crop it to "tighten up" the layout. */
}

.install-qr:focus-visible {
  outline: 3px solid var(--adventure-blue);
  outline-offset: 3px;
}

.install-btn {
  display: block;
  width: 100%;
  padding: 15px 18px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 800;
  color: #FFFFFF;
  text-decoration: none;
  text-align: center;
  min-height: 48px;                     /* touch target */
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.install-btn:hover { transform: translateY(-2px); }

.install-btn:focus-visible {
  outline: 3px solid var(--text-primary);
  outline-offset: 3px;
}

/* white on #8B5FBF = 4.68:1, on #7A4EAE = 5.95:1 — passes at both ends */
.install-btn-ios {
  background: linear-gradient(135deg, var(--musical-purple) 0%, var(--musical-purple-dark) 100%);
  box-shadow: 0 6px 14px rgba(139, 95, 191, 0.35);
}

/* white on #2F7A3E = 5.28:1, on #25632F = 7.23:1 — passes at both ends.
   ⚠️ NOT the Android brand green #3DDC84: white on that is 1.78:1. */
.install-btn-android {
  background: linear-gradient(135deg, #2F7A3E 0%, #25632F 100%);
  box-shadow: 0 6px 14px rgba(47, 122, 62, 0.35);
}

.install-note {
  font-size: 14px;
  color: var(--text-primary);
  margin: 0;
}

.install-hint {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--adventure-blue-dark);    /* 6.98:1 on white, 6.22:1 over the card gradient's foot */
  margin: 22px 0 0;
  min-height: 24px;
}

.install-account-note {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 22px;
  padding: 16px 18px;
  background: rgba(242, 201, 76, 0.16);
  border-left: 4px solid var(--golden-achievement);
  border-radius: 10px;
}

.install-account-note p {
  font-size: 15px;
  color: var(--text-primary);
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;               /* see .note-content (A11) */
}

.install-account-icon { font-size: 22px; line-height: 1.2; }

.install-print-link {
  text-align: center;
  margin: 20px 0 0;
  font-size: 15px;
}

.install-print-link a {
  color: var(--adventure-blue-dark);
  font-weight: 700;
}

@media (max-width: 640px) {
  .install-grid { grid-template-columns: 1fr; }
  .install-card .install-title { font-size: 25px; }

  /* A QR code you cannot scan is noise. On a phone the button IS the action,
     and hiding the code buys back most of a screen height. Deliberate — not an
     oversight to "fix" later. */
  .install-qr { display: none; }
}

/* The existing platform buttons further down the page. White on #3DDC84 was
   1.78:1 — the primary call to action for every Android tester, failing WCAG
   1.4.3 badly. Same measured gradient as .install-btn-android. */
.download-button.android {
  background: linear-gradient(135deg, #2F7A3E 0%, #25632F 100%);
}

/* ============================================================
   ACCESSIBILITY (4.15.9, WCAG 2.2 AA sign-off)
   ============================================================ */

/* Text for a screen reader only: the passcode field's label. */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* The headings focus moves to when the passcode or consent gate opens the next
   section (script.js, `revealAndFocus`). They are not controls, so they take no
   outline of their own; the move is for a screen reader's reading position. */
h2[tabindex="-1"]:focus {
  outline: none;
}

/* Everything on this page that moves is decoration. Stop all of it for anyone
   who asked their device for less motion (WCAG 2.3.3, and 2.2.2's float). */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .btn-primary:hover:not(:disabled),
  .download-button:hover,
  .btn-feedback-primary:hover,
  .btn-feedback-primary:focus-visible,
  .btn-feedback-secondary:hover,
  .btn-feedback-secondary:focus-visible,
  .install-btn:hover,
  .install-option.is-current-platform {
    transform: none;
  }
}
