/* AngloPass platform shared stylesheet.
   Tokens from "AngloPass Design System 17-07-2026". Semantic aliases only in
   component rules; raw hex lives in :root. */

@font-face {
  font-family: 'Outfit';
  src: url('/assets/fonts/Outfit-Variable.woff2') format('woff2');
  font-weight: 300 800;
  font-display: swap;
}
@font-face {
  font-family: 'Work Sans';
  src: url('/assets/fonts/WorkSans-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* Brand */
  --blue-500: #2D5BFF;
  --blue-600: #1A4AE6;
  --orange-500: #FF6A22;
  --orange-600: #E55A12;
  --green-500: #22C55E;
  --green-600: #16A34A;
  --green-700: #15803D;

  /* Neutrals */
  --white: #FFFFFF;
  --ink: #2A2A2A;
  --grey-500: #64748B;
  --grey-400: #94A3B8;
  --grey-300: #CBD5E1;
  --grey-200: #E2E8F0;
  --grey-100: #F1F5F9;
  --grey-50: #F8FAFC;
  --light-blue: #EEF2FF;

  /* Semantic */
  --surface-page: var(--white);
  --surface-alt: var(--light-blue);
  --surface-card: var(--white);
  --surface-inset: var(--grey-100);
  --surface-success: #DCFCE7;
  --text-strong: var(--ink);
  --text-body: var(--ink);
  --text-muted: var(--grey-500);
  --text-on-brand: var(--white);
  --text-link: var(--blue-500);
  --text-success: var(--green-700);
  --border-subtle: var(--grey-200);
  --border-strong: var(--blue-500);
  --action-primary: var(--orange-500);
  --action-primary-hover: var(--orange-600);
  --action-secondary: var(--blue-500);
  --action-secondary-hover: var(--blue-600);

  /* Type */
  --font-display: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Work Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Space / radius / borders */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;
  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px;
  --radius-xl: 20px; --radius-pill: 999px;

  /* Elevation */
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(34, 84, 211, 0.10);
  --ring: 0 0 0 4px rgba(45, 91, 255, 0.18);

  /* Motion */
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-base: 0.2s;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-body);
  background: var(--surface-page);
  min-height: 100vh;
}

a { color: var(--text-link); }

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Top bar (solid brand band) ---------- */

.topbar {
  background: var(--surface-card);
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--space-3) var(--space-4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar .wordmark {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.topbar .wordmark img { display: block; height: 30px; width: auto; }
.topbar .user {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}
.topbar .user span {
  color: var(--text-muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar .user a {
  color: var(--text-link);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--grey-300);
  border-radius: var(--radius-pill);
  padding: 5px 14px;
  flex-shrink: 0;
  transition: border-color var(--dur-base) var(--ease-standard),
              background var(--dur-base) var(--ease-standard);
}
.topbar .user a:hover { border-color: var(--blue-500); background: var(--surface-alt); }

.dash-page { background: var(--surface-alt); }

/* ---------- Layout ---------- */

.content {
  max-width: 640px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-4) var(--space-8);
}

/* ---------- Type helpers ---------- */

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.125em;
  text-transform: uppercase;
}
.eyebrow.blue { color: var(--blue-500); }
.eyebrow.orange { color: var(--orange-500); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-strong);
  line-height: 1.2;
}

.muted { color: var(--text-muted); }

/* ---------- Cards ---------- */

.card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: var(--space-5);
}

/* ---------- Buttons (pill) ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--dur-base) var(--ease-standard),
              border-color var(--dur-base) var(--ease-standard);
}
.btn-primary { background: var(--action-primary); color: var(--text-on-brand); }
.btn-primary:hover { background: var(--action-primary-hover); }
.btn-blue { background: var(--action-secondary); color: var(--text-on-brand); }
.btn-blue:hover { background: var(--action-secondary-hover); }
.btn-ghost { background: transparent; color: var(--text-link); }
.btn-ghost:hover { background: var(--surface-alt); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- Inputs ---------- */

.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-strong);
  margin-bottom: var(--space-2);
}
.field input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-body);
  background: var(--surface-card);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  transition: border-color var(--dur-base) var(--ease-standard);
}
.field input::placeholder { color: var(--grey-400); }
.field input:focus-visible {
  border-color: var(--border-strong);
  box-shadow: var(--ring);
  outline: none;
}

/* ---------- Dashboard: overall progress ---------- */

.progress-card .eyebrow { margin-bottom: var(--space-3); }
.progress-count {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  line-height: 1.1;
}
.progress-count span {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--text-muted);
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.progress-pct {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--blue-500);
}
.progress-bar-bg {
  background: var(--surface-inset);
  border-radius: var(--radius-pill);
  height: 10px;
  overflow: hidden;
  margin-top: var(--space-4);
}
.progress-bar-fill {
  background: var(--blue-500);
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 0.4s var(--ease-standard);
}

.streak-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--space-3);
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  background: #FFF7ED;
  color: var(--orange-600);
  font-size: 13px;
  font-weight: 600;
}
.streak-chip svg { display: block; stroke: var(--orange-500); }

/* Quiet one-time panel when a section is newly complete */
.celebrate-panel {
  margin-top: var(--space-3);
  padding: var(--space-4);
  background: var(--surface-success);
  border: 1px solid #BBF7D0;
  border-radius: var(--radius-lg);
  color: var(--text-success);
  font-size: 14px;
}
.celebrate-panel strong { font-family: var(--font-display); font-weight: 600; }

/* ---------- Dashboard: continue card ---------- */

.continue-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-3);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--dur-base) var(--ease-standard),
              box-shadow var(--dur-base) var(--ease-standard);
}
.continue-card:hover { border-color: var(--blue-500); box-shadow: var(--shadow-md); }
.continue-card .continue-copy { flex: 1; min-width: 0; }
.continue-card .eyebrow { margin-bottom: var(--space-1); }
.continue-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.3;
  color: var(--text-strong);
}
.continue-sub { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.continue-card .go {
  flex-shrink: 0;
  min-width: 84px;
  height: 36px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-pill);
  background: var(--action-secondary);
  color: var(--text-on-brand);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.continue-card:hover .go { background: var(--action-secondary-hover); }

/* ---------- Dashboard: sections ---------- */

.section {
  margin-top: var(--space-3);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--dur-base) var(--ease-standard);
}
.section.current { border-color: var(--blue-500); }
.section > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-xl);
  user-select: none;
}
.section > summary::-webkit-details-marker { display: none; }
.section h2 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  flex: 1;
  min-width: 0;
}

/* Numbered section marker: grey = inactive, blue = current, green = complete. */
.section-marker {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  background: var(--grey-100);
  color: var(--text-muted);
}
.section-marker.current { background: var(--blue-500); color: var(--white); }
.section-marker.complete { background: var(--green-500); color: var(--white); }
.section-marker svg { display: block; stroke: var(--white); }
.section-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
}
.section-count.complete { color: var(--text-success); }
.section-count.complete svg { display: block; stroke: var(--green-500); }
.section-count.partial { color: var(--blue-500); }

/* Fixed section progress track: blue = partial, green = complete. */
.section-meter {
  display: block;
  flex-shrink: 0;
  /* Narrowed from 72px so the derived section titles, some of which are long,
     get the largest flexible share of the summary row. */
  width: 48px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--grey-200);
  overflow: hidden;
}
.section-meter-fill {
  display: block;
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--blue-500);
  transition: width 0.4s var(--ease-standard);
}
.section-meter-fill.complete { background: var(--green-500); }

.chevron {
  flex-shrink: 0;
  stroke: var(--grey-400);
  transition: transform var(--dur-base) var(--ease-standard);
}
.section[open] > summary .chevron { transform: rotate(180deg); }

.unit-list {
  display: flex;
  flex-direction: column;
  padding: 0 var(--space-4) var(--space-3);
}

.unit-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  border-top: 1px solid var(--grey-100);
  padding: var(--space-3) var(--space-1);
  text-decoration: none;
  color: inherit;
  transition: background var(--dur-base) var(--ease-standard);
}
.unit-item:hover { background: var(--surface-alt); border-radius: var(--radius-md); }
.unit-item.in-progress .unit-title { color: var(--blue-600); }

.unit-state { flex-shrink: 0; display: flex; }
.unit-state svg { display: block; }
.unit-state .ring { stroke: var(--grey-300); fill: none; }
.unit-state.done .ring { stroke: var(--green-500); fill: var(--green-500); }
.unit-state.done .tick { stroke: var(--white); }
.unit-state.active .ring { stroke: var(--blue-500); }
.unit-state.active .half { fill: var(--blue-500); }

.unit-info { flex: 1; min-width: 0; }
.unit-title { font-size: 14px; font-weight: 500; color: var(--text-strong); }
.unit-title .unit-id { color: var(--text-muted); font-weight: 400; }
.unit-sub { font-size: 12px; color: var(--text-muted); margin-top: 1px; }

.unit-action {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  padding: 4px 12px;
}
.unit-action.done { color: var(--text-success); background: var(--surface-success); }
.unit-action.resume {
  color: var(--blue-500);
  background: var(--white);
  border: 1px solid var(--blue-500);
}
.unit-action.start { color: var(--text-muted); background: var(--surface-inset); }

/* ---------- Auth pages (login, verify) ---------- */

.auth-page {
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}
.auth-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: var(--space-6) var(--space-5);
  max-width: 400px;
  width: 100%;
  text-align: center;
}
.auth-card .brand { display: inline-block; margin-bottom: var(--space-5); }
.auth-card .brand img { display: block; height: 44px; width: auto; }
.auth-card h1 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: var(--space-2);
}
.auth-card h1 .highlight { color: var(--blue-500); }
.auth-card .lead {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: var(--space-5);
}
.auth-card form { text-align: left; }
.auth-card .field { margin-bottom: var(--space-4); }
.auth-card .btn { width: 100%; }
.auth-message {
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: 14px;
  text-align: left;
  display: none;
}
.auth-message.success {
  display: block;
  background: var(--surface-success);
  border: 1px solid #BBF7D0;
  color: var(--text-success);
}
.auth-message.error {
  display: block;
  background: #FFF7ED;
  border: 1px solid #FED7AA;
  color: #9A3412;
}
.auth-help { margin-top: var(--space-5); font-size: 13px; }
.auth-help a { color: var(--text-muted); }
.auth-help a:hover { color: var(--text-link); }

/* ---------- Support: contact options ---------- */

.support-coach {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-5) 0 var(--space-4);
  text-align: left;
}
.support-coach-img {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--surface-alt);
  object-fit: cover;
}
.support-coach-bubble {
  position: relative;
  margin: 0;
  padding: var(--space-3) var(--space-4);
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-body);
}
.support-coach-bubble::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  background: var(--surface-alt);
  transform: rotate(45deg);
}

.option-link {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin: var(--space-3) 0;
  padding: var(--space-4);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text-body);
  text-align: left;
  transition: border-color var(--dur-base) var(--ease-standard),
              box-shadow var(--dur-base) var(--ease-standard);
}
.option-link:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.option-icon {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--surface-alt);
  color: var(--blue-500);
}
.option-icon svg { width: 20px; height: 20px; }
.option-icon-whatsapp { background: #E8F8EE; color: var(--green-600); }
.option-body { display: block; flex: 1; min-width: 0; }
.option-body strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-link);
  margin-bottom: 2px;
}
.option-body > span { display: block; font-size: 14px; color: var(--text-muted); overflow-wrap: anywhere; }
/* A card holding several actions rather than being one link itself, so it
   gets no hover lift; its buttons carry the interaction instead. */
.option-card:hover { border-color: var(--border-subtle); box-shadow: none; }
.option-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-subtle);
}
.option-actions .btn {
  padding: 8px 14px;
  font-size: 14px;
  border: 1px solid var(--border-subtle);
}
.option-actions .btn:hover { border-color: var(--border-strong); }
.option-actions .btn-icon { width: 16px; height: 16px; flex: none; order: 1; }
.option-actions .btn-icon-send { color: var(--orange-500); }
.option-actions .btn-icon-copy { color: var(--green-600); }
.option-actions .btn-icon-gmail { width: 18px; height: 14px; }
.option-actions .btn[hidden] { display: none; }
.option-status { margin: var(--space-2) 0 0; font-size: 13px; color: var(--text-muted); }
.option-status:empty { display: none; }

/* ---------- Misc ---------- */

.loading { text-align: center; padding: var(--space-8) var(--space-4); color: var(--text-muted); }

/* Visible to assistive technology, not to the eye. Used for the loading
   announcement that replaced the old on-screen "Loading your course…" line. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Loading skeleton. Plain blocks at roughly the heights of the real cards, so
   the page does not jump when data arrives. Deliberately NOT animated: a
   shimmer would be new motion introduced for its own sake, and the site
   already honours prefers-reduced-motion by removing motion rather than
   adding it. */
.skeleton {
  background: var(--grey-100);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}
.skeleton + .skeleton { margin-top: var(--space-3); }
.skeleton-progress { height: 116px; }
.skeleton-continue { height: 92px; }
.skeleton-section { height: 56px; }

/* Retryable failure panel: the skeleton is replaced by this rather than
   sitting there indefinitely. */
.load-error { margin-top: var(--space-3); text-align: center; }
.load-error h2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-strong);
}
.load-error p {
  margin: var(--space-2) 0 var(--space-4);
  font-size: 14px;
  color: var(--text-muted);
}

/* Shared single-column form card. Used by the profile page and available to
   any later account surface; genuinely admin-only layout stays in admin.html. */
.form-card { margin-top: var(--space-3); }
.form-card-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-strong);
}
.form-card-lead {
  margin: var(--space-2) 0 var(--space-5);
  font-size: 14px;
  color: var(--text-muted);
}
.form-card-footer {
  margin-top: var(--space-5);
  font-size: 13px;
}
.form-card-footer a { color: var(--text-link); text-decoration: none; }
.form-card-footer a:hover { text-decoration: underline; }

/* The base .field label / .field input rules already live in the Inputs
   section above and are shared with /login and the auth pages. Only the
   genuinely new pieces are added here, so this card cannot silently restyle
   those pages. Field spacing is scoped to .form-card for the same reason. */
.form-card .field { margin-bottom: var(--space-4); }
.field input[readonly] {
  background: var(--surface-alt);
  color: var(--text-muted);
  cursor: default;
}
.field-hint {
  margin-top: var(--space-2);
  font-size: 12px;
  color: var(--text-muted);
}

/* Inline success/failure line. Hidden until it carries text, so it never
   reserves empty space above the form. */
.form-msg:empty { display: none; }
.form-msg {
  margin-bottom: var(--space-4);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  font-size: 13px;
}
.form-msg.ok { background: var(--surface-success); color: var(--text-success); }
.form-msg.err { background: #FFF7ED; color: #9A3412; }

/* Welcome panel: a dismissible card between the progress summary and the
   Continue card. It never blocks navigation or the Continue action.
   Features the client's Captain Vega character in brand colours. */
.welcome-panel {
  margin-top: var(--space-3);
  display: flex;
  align-items: flex-end;
  gap: var(--space-4);
  background: var(--surface-alt);
  overflow: hidden;
  animation: welcome-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.welcome-vega {
  width: 108px;
  height: auto;
  flex: none;
  margin-bottom: calc(-1 * var(--space-4));
  animation: vega-bob 3.2s ease-in-out 0.6s infinite alternate;
  transform-origin: 50% 100%;
}
.welcome-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  min-width: 0;
  padding-bottom: var(--space-1);
}
.welcome-bubble {
  position: relative;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
}
.welcome-bubble::before {
  content: '';
  position: absolute;
  left: -8px;
  bottom: 14px;
  width: 14px;
  height: 14px;
  background: var(--surface-card);
  border-left: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  transform: rotate(45deg);
}
.welcome-copy {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-strong);
}
.welcome-dismiss {
  align-self: flex-start;
  background: var(--action-secondary);
  color: var(--text-on-brand);
  border: none;
}
.welcome-dismiss:hover { background: var(--action-secondary-hover); }
@keyframes welcome-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes vega-bob {
  from { transform: translateY(0); }
  to { transform: translateY(-5px); }
}
@media (prefers-reduced-motion: reduce) {
  .welcome-panel, .welcome-vega { animation: none; }
}
@media (max-width: 480px) {
  .welcome-panel { gap: var(--space-3); }
  .welcome-vega { width: 84px; }
}
.welcome-retry:empty { display: none; }
.welcome-retry { font-size: 13px; color: var(--text-muted); }

.admin-link {
  display: block;
  text-align: center;
  margin-top: var(--space-6);
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
}
.admin-link:hover { color: var(--text-link); }

.back-link {
  display: block;
  text-align: center;
  margin-top: var(--space-6);
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
}
.back-link:hover { color: var(--text-link); }

.dash-footer {
  width: 100%;
  background: var(--surface-card);
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-5) var(--space-4);
}
/* Full width on desktop, matching the header band rather than sitting in a
   640px column under it. The footer keeps its own viewport padding (on
   .dash-footer) and the narrow-screen stack below is unchanged. */
.dash-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.dash-footer-brand,
.dash-footer nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.dash-footer-brand img { display: block; width: auto; height: 28px; }
.dash-footer-brand span,
.footer-legal,
.dash-footer a {
  font-size: 13px;
  color: var(--text-muted);
}
.dash-footer a {
  text-decoration: none;
}
.dash-footer a:hover { color: var(--text-link); }

@media (max-width: 520px) {
  .dash-footer-inner,
  .dash-footer-brand {
    flex-direction: column;
    align-items: flex-start;
  }
  .dash-footer nav { flex-wrap: wrap; }
}

/* ---------- Install steps (ordered list, /install) ---------- */

.install-steps {
  list-style: none;
  counter-reset: install-step;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.install-steps li {
  counter-increment: install-step;
  padding-left: var(--space-6);
  position: relative;
}
.install-steps li::before {
  content: counter(install-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface-alt);
  color: var(--blue-500);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Device / browser picker (/install). Without JS every guide shows in order;
   with JS (body.install-js) only the selected guide shows unless "show all"
   is on (body.install-all). */
.install-guide { margin-bottom: var(--space-4); }
.install-guide h2 { margin-bottom: var(--space-3); }
.install-note {
  margin-top: var(--space-3);
  font-size: 13px;
  color: var(--text-muted);
}
.install-js #install-nojs-intro { display: none; }
.install-js .install-guide { display: none; }
.install-js .install-guide.is-active,
.install-js.install-all .install-guide { display: block; }

.install-picker { margin-bottom: var(--space-5); }
.install-detected {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}
.install-seg {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}
.install-seg:empty { display: none; }
.install-seg button {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--surface-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--dur-base) var(--ease-standard),
              border-color var(--dur-base) var(--ease-standard),
              color var(--dur-base) var(--ease-standard);
}
.install-seg button:hover { color: var(--text-body); border-color: var(--grey-300); }
/* Selected: a quiet tint and outline rather than a solid fill, so the row
   reads as a filter, not a set of primary buttons. */
.install-seg button[aria-pressed="true"] {
  background: var(--surface-alt);
  border-color: var(--blue-500);
  color: var(--text-link);
  font-weight: 600;
}
.install-showall {
  display: inline-block;
  margin-top: var(--space-2);
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 14px;
  color: var(--text-link);
  text-decoration: underline;
  cursor: pointer;
}
