/**
 * WHY:    Companion page needs to be mobile-first and usable alongside the app.
 * WHAT:   Responsive styles for the step-by-step mobile guide.
 * HOW:    Imports base tokens, optimised for small screens.
 * WHERE:  shared/styles/companion.css
 * WHEN:   Used by companion.html in each deck.
 */

/* ─── Self-Hosted Fonts ─── */

@font-face {
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/quicksand/quicksand-variable.woff2') format('woff2');
}

@font-face {
  font-family: 'Inconsolata';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/inconsolata/inconsolata-variable.woff2') format('woff2');
}

/* ─── Tokens ─── */

:root {
  --meos-white: #FFFFFF;
  --meos-black: #000000;
  --meos-neutral-200: #F8F8F8;
  --meos-neutral-300: #E6E6E6;
  --meos-neutral-500: #A6A6A6;
  --meos-neutral-700: #3A3A3A;
  --meos-accent: #FFB800;
  --meos-font-heading: 'Quicksand', 'Helvetica Neue', sans-serif;
  --meos-font-body: 'Inconsolata', 'Courier New', monospace;
}

/* ─── Reset ─── */

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

/* ─── Base ─── */

body {
  font-family: var(--meos-font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--meos-black);
  background: var(--meos-white);
  padding: 16px;
  max-width: 480px;
  margin: 0 auto;
  -webkit-font-smoothing: antialiased;
}

/* ─── Header ─── */

.companion-header {
  text-align: center;
  padding: 24px 0;
  border-bottom: 1px solid var(--meos-neutral-300);
  margin-bottom: 24px;
}

.companion-header img {
  width: 40px;
  height: auto;
  margin-bottom: 8px;
}

.companion-header h1 {
  font-family: var(--meos-font-heading);
  font-size: 1.4em;
  font-weight: 600;
  line-height: 1.3;
}

/* ─── Section ─── */

.section {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--meos-neutral-300);
}

.section-title {
  font-family: var(--meos-font-heading);
  font-size: 1.2em;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--meos-black);
  color: var(--meos-white);
  border-radius: 50%;
  font-size: 0.75em;
  font-weight: 700;
  flex-shrink: 0;
}

/* ─── Steps ─── */

.step {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  align-items: flex-start;
}

.step input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--meos-accent);
}

.step-content {
  flex: 1;
}

.step-content p {
  margin-bottom: 4px;
}

.step-content .hint {
  font-size: 0.85em;
  color: var(--meos-neutral-500);
  font-style: italic;
}

/* ─── Troubleshooting Accordion ─── */

details {
  background: var(--meos-neutral-200);
  border-radius: 4px;
  padding: 12px;
  margin-top: 12px;
}

details summary {
  font-family: var(--meos-font-heading);
  font-weight: 500;
  cursor: pointer;
  color: var(--meos-neutral-700);
}

details p {
  margin-top: 8px;
  font-size: 0.9em;
  color: var(--meos-neutral-700);
}

/* ─── Progress Bar ─── */

.progress-bar {
  position: sticky;
  top: 0;
  background: var(--meos-white);
  padding: 8px 0;
  border-bottom: 1px solid var(--meos-neutral-300);
  z-index: 10;
  text-align: center;
  font-family: var(--meos-font-heading);
  font-size: 0.85em;
  color: var(--meos-neutral-500);
}

.progress-bar .bar {
  height: 3px;
  background: var(--meos-neutral-300);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}

.progress-bar .bar-fill {
  height: 100%;
  background: var(--meos-accent);
  transition: width 0.3s ease;
  border-radius: 2px;
}
