/* The home page (spec R7, R11; plan PD16). Structure and phone sizes; light theme matching the solve page. */
:root {
  --ink: #17202b;
  --muted: #55606e;
  --line: #dde3ea;
  --paper: #ffffff;
  --bg: #f5f7fb;
  --accent: #2459d6;
  --accent-ink: #ffffff;
  --accent-soft: #eaf0fd;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(23, 32, 43, 0.06), 0 2px 8px rgba(23, 32, 43, 0.05);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 18px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-wrap: anywhere;
}
a { color: var(--accent); }
main.home { max-width: 960px; margin: 0 auto; padding: 16px; }

.hero { padding: 16px 0 8px; }
.hero .brand { font-weight: 800; font-size: 19px; color: var(--accent); letter-spacing: 0.2px; margin: 0 0 16px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.hero h1 { font-size: 32px; line-height: 1.2; margin: 0 0 8px; }
.hero p { margin: 0; color: var(--muted); }
p.countdown {
  margin: 8px 0 16px; padding: 12px 16px; font-size: 18px; font-weight: 600; color: var(--ink);
  background: var(--accent-soft); border: 1px solid #c9d8f8; border-radius: var(--radius);
}
p.countdown .count-n { font-size: 40px; font-weight: 800; line-height: 1.1; color: var(--accent); }

/* The hero's children join main.home's flow so the picker label can sit right above the picker. */
main.home { display: flex; flex-direction: column; }
.hero { display: contents; }
.hero > * { order: 0; }
p.countdown { order: 1; }
section.progress { order: 2; }
p.profiles-label { order: 3; margin: 0 0 8px; font-weight: 700; color: var(--muted); }
main.home:has(nav.profiles[hidden]) p.profiles-label { display: none; }
nav.profiles { order: 4; }
section.profil-cards { order: 5; }
main.home > p.empty { order: 5; }
main.home > p.admin { order: 6; }

/* Progress on the device (filled by 010). */
section.progress { margin: 0 0 16px; padding: 12px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
p.progress-done, p.progress-last, p.progress-streak { margin: 0 0 4px; font-size: 18px; }
p.progress-last, p.progress-streak { color: var(--muted); }
button.progress-clear {
  min-height: 48px; padding: 8px 16px; font: inherit; color: var(--accent);
  background: transparent; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer;
}

nav.profiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 16px; }
button.profile {
  min-height: 48px; padding: 8px 12px; font: inherit; font-weight: 600; text-align: left;
  display: flex; flex-direction: column; justify-content: center;
  color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer;
}
button.profile[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
button.profile:disabled { color: var(--muted); background: var(--bg); cursor: default; }
button.profile .soon { font-size: 18px; font-weight: 400; }

section.profil-cards { margin: 0 0 16px; }
section.profil-cards h2 { font-size: 18px; font-weight: 700; color: var(--muted); margin: 0 0 8px; }
section.profil-cards { display: grid; grid-template-columns: 1fr; gap: 12px; }
section.profil-cards h2 { margin: 0; }
@media (min-width: 600px) {
  section.profil-cards { grid-template-columns: repeat(2, 1fr); }
  section.profil-cards h2 { grid-column: 1 / -1; }
}
a.variant-card {
  display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 72px; padding: 12px 16px;
  color: var(--ink); text-decoration: none; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
a.variant-card:focus-visible, button.profile:focus-visible, button.progress-clear:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
a.variant-card { position: relative; padding-right: 72px; }
a.variant-card .card-title { font-weight: 800; font-size: 24px; line-height: 1.2; }
a.variant-card .card-profil { color: var(--muted); font-size: 18px; }
a.variant-card .card-arrow { position: absolute; right: 16px; top: 50%; width: 40px; height: 40px; margin-top: -20px; }
a.variant-card .card-meta { color: var(--muted); }
span.card-progress { font-size: 18px; font-weight: 600; color: var(--accent); }

a.primary {
  display: inline-flex; align-items: center; min-height: 48px; padding: 8px 16px;
  color: var(--accent-ink); background: var(--accent); border-radius: var(--radius); text-decoration: none; font-weight: 600;
}
main.home > p.empty, main.home > p.admin { margin: 16px 0; }
