/* ==========================================================================
   MoodFlow marketing site · styles.css
   Handwritten CSS, no framework.

   Contents
     1. Design tokens (colors, type, spacing) — light, then dark
     2. Base and reset
     3. Typography
     4. Layout: container, sections, two-column split
     5. Header and the "Aa" settings panel
     6. Shared pieces: cards, faces, strips, day tracks, devices, store badge
     7. Sections: hero, your day, shifts, widgets, iPad, features, privacy, call to action
    7b. Documents: privacy policy and support pages
     8. Footer
     9. Breakpoints: tablet (≤ 1023px) and phone (≤ 599px)
    10. Motion and accessibility preferences
    11. Print (also used by `npm run pdf` for the PDFs in assets/docs/)

   Design source: "MoodFlow Website Canvas2.pdf" (style sheet at the bottom of it).
   Breakpoints follow the three artboards: desktop 1440, tablet 834, phone 390.
   ========================================================================== */


/* ==========================================================================
   1. Design tokens
   ========================================================================== */

:root {
  /* Feelings: the same in light and dark. */
  --mood-rough: #9B74D9;
  --mood-low: #4EA8E1;
  --mood-okay: #D3C398;
  --mood-good: #53CF95;
  --mood-great: #FCBA43;
  --brand-yellow: #F2B33D;

  /* Surfaces (light). Dark values are redefined below. */
  --bg: #F4F3F0;
  --card: #FFFFFF;
  --text: #1C1C1E;
  --text-secondary: #6E6E73;
  --track: #F1F0ED;
  --hairline: #DFDFDE;
  --frame: #1C1C1E;            /* Device outline */
  --segment-on: #FFFFFF;       /* Selected item in the settings panel */
  --badge-border: #000000;     /* App Store badge outline */
  --accent: #1F7ACC;           /* Undo in the widget */
  --shadow-panel: 0 12px 32px rgba(0, 0, 0, 0.12);

  /* Type. SF Pro on Apple devices, close system fonts elsewhere. */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;

  /*
    Text size multiplier set by the "Aa" panel: 1, 1.15 or 1.3.
    The root font size follows it, so every rem below grows with it.
  */
  --text-scale: 1;

  /*
    Fluid sizes interpolate between the phone (390px) and desktop (1440px) artboards.
    Example: H1 is 48px at 390 and 104px at 1440 → 1.7rem + 5.333vw, clamped.
  */
  --size-h1: clamp(3rem, 1.7rem + 5.333vw, 6.5rem);           /* 48–104px */
  --size-h2: clamp(2.25rem, 1.6rem + 2.667vw, 4rem);          /* 36–64px */
  --size-h3: 1.25rem;                                         /* 20px */
  --size-lead: clamp(1.1875rem, 1.094rem + 0.381vw, 1.4375rem); /* 19–23px */
  --size-body: 1.0625rem;                                     /* 17px */
  --size-caption: 0.8125rem;                                  /* 13px */

  /* Spacing scale: 4 · 8 · 12 · 16 · 24 · 48 · 80 · 120 */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 48px;
  --space-7: 80px;
  --space-8: 120px;
  --section-pad: clamp(64px, 43.2px + 5.333vw, 120px);       /* 64–120px */

  /* Radii */
  --radius-large: 24px;
  --radius-medium: 20px;
  --radius-pill: 999px;

  /* Layout */
  --max-width: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-height: 68px;

  /* Phone mockup width. Leaves room for the faces that stick out on both sides. */
  --phone-w: min(290px, calc((100vw - 2 * var(--gutter)) / 1.2));
}

/* Dark colors, used when the system is dark and the visitor has not picked light… */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --card: #1C1C1E;
    --text: #F5F5F7;
    --text-secondary: #98989D;
    --track: #262628;
    --hairline: #363639;
    --frame: #48484A;
    --segment-on: #3A3A3C;
    --badge-border: #A6A6A6;
    --accent: #78D8FF;
    --shadow-panel: 0 12px 32px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

/* …and when the visitor picked dark with the header button. */
:root[data-theme="dark"] {
  --bg: #000000;
  --card: #1C1C1E;
  --text: #F5F5F7;
  --text-secondary: #98989D;
  --track: #262628;
  --hairline: #363639;
  --frame: #48484A;
  --segment-on: #3A3A3C;
  --badge-border: #A6A6A6;
  --accent: #78D8FF;
  --shadow-panel: 0 12px 32px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

:root[data-theme="light"] {
  color-scheme: light;
}


/* ==========================================================================
   2. Base and reset
   ========================================================================== */

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

html {
  font-size: calc(100% * var(--text-scale));
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Anchor jumps land below the sticky header. */
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--size-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* The hero faces sit a little outside the phone; never let them cause sideways scrolling. */
main {
  overflow-x: clip;
}

h1, h2, h3, p, figure {
  margin: 0;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--mood-low);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

/* Hidden SVG sprite with the faces and the app mark. */
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* "Skip to content" link, visible only when focused with the keyboard. */
.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}


/* ==========================================================================
   3. Typography
   ========================================================================== */

/* H1 · 48–104px · Bold · −3.5% · 1.0 */
.h1 {
  font-size: var(--size-h1);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
}

/* Each half of the hero title stays on one line; the two wrap apart when space runs out. */
.h1 .line {
  display: inline-block;
}

/* H2 · 36–64px · Bold · −3% · 1.05 */
.h2 {
  font-size: var(--size-h2);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-wrap: balance;
}

/* H3 · 20px · Semibold */
.h3 {
  font-size: var(--size-h3);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

/* Lead · 19–23px · Regular · 1.45 */
.lead {
  margin-top: var(--space-4);
  max-width: 30em;
  color: var(--text-secondary);
  font-size: var(--size-lead);
  line-height: 1.45;
}

.lead--narrow {
  max-width: 22em;
}

/* Caption · 13px */
.caption {
  color: var(--text-secondary);
  font-size: var(--size-caption);
  line-height: 1.4;
}

/* Small label above a heading ("Shifts", "iPad"). */
.eyebrow {
  margin-bottom: var(--space-3);
  color: var(--text-secondary);
  font-size: var(--size-caption);
  font-weight: 500;
}


/* ==========================================================================
   4. Layout
   ========================================================================== */

/* Centered column, max 1200px of content plus the side gutters. */
.container {
  width: 100%;
  max-width: calc(var(--max-width) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Every section has the same vertical rhythm and a hairline above it. */
.section {
  position: relative;
  padding-block: var(--section-pad);
}

.section + .section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(calc(var(--max-width) + 2 * var(--space-7)), calc(100% - 2 * var(--gutter)));
  height: 1px;
  background: var(--hairline);
  transform: translateX(-50%);
}

.section--center {
  text-align: center;
}

.section--tight {
  padding-block: calc(var(--section-pad) * 0.75);
}

/* Two columns on desktop: words on the left, picture on the right. */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--space-6);
}

.split__media {
  display: flex;
  justify-content: center;
}


/* ==========================================================================
   5. Header and settings panel
   ========================================================================== */

/* Solid sticky bar (no blur or translucency, same rule as the app). */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--hairline);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
}

.brand__icon {
  width: 36px;
  height: 36px;
}

.brand__name {
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Round header controls share one look: card fill, hairline edge. */
.pill-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  border: 1px solid var(--hairline);
  background: var(--card);
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.pill-button:hover,
.icon-button:hover {
  border-color: var(--text-secondary);
}

.pill-button {
  gap: 6px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
}

.icon-button {
  width: 38px;
  padding: 0;
  border-radius: 50%;
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

.settings__glyph {
  font-size: 0.9375rem;
  font-weight: 600;
}

.settings__lang {
  color: var(--text-secondary);
  font-size: 0.6875rem;
  font-weight: 500;
}

/* Header "App Store" button: dark on light, light on dark. */
.header-store {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  background: var(--text);
  color: var(--bg);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.header-store:hover {
  opacity: 0.85;
}

/* The "Aa" panel drops down under its button. */
.settings {
  position: relative;
}

.settings__panel {
  position: absolute;
  top: calc(100% + var(--space-2));
  right: 0;
  width: 280px;
  padding: var(--space-4);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-medium);
  background: var(--card);
  box-shadow: var(--shadow-panel);
}

.settings__label {
  margin: 0 0 var(--space-2) var(--space-1);
  color: var(--text-secondary);
  font-size: var(--size-caption);
  font-weight: 500;
}

.settings__label + .segmented {
  margin-bottom: var(--space-4);
}

.segmented:last-child {
  margin-bottom: 0;
}

/* Three equal options on a track, the chosen one raised on a solid pill. */
.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--track);
}

.segmented__item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 var(--space-2);
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
}

.segmented__item[aria-pressed="true"] {
  background: var(--segment-on);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* The three "A" glyphs preview the three text sizes. Fixed px so they do not grow themselves. */
.size-glyph {
  font-weight: 600;
  line-height: 1;
}

.size-glyph--1 { font-size: 13px; }
.size-glyph--2 { font-size: 16px; }
.size-glyph--3 { font-size: 19px; }


/* ==========================================================================
   6. Shared pieces
   ========================================================================== */

/* Cards: solid fill, generous radius, no border. */
.card {
  border-radius: var(--radius-medium);
  background: var(--card);
}

/* --- Mood faces -------------------------------------------------------- */

/* A face scales with its box; the rotated diamond may peek past the edges. */
.face {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Faces that log a feeling when tapped. */
.face-button,
.widget__face {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease;
}

.face-button:hover,
.widget__face:hover {
  transform: scale(1.06);
}

.face-button:focus-visible,
.widget__face:focus-visible {
  outline-offset: 4px;
  border-radius: 30%;
}

/* Small bounce after a tap, like the app. */
.is-bouncing {
  animation: face-bounce 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes face-bounce {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.18) translateY(-6%); }
  70%  { transform: scale(0.96); }
  100% { transform: scale(1); }
}

/* --- Day strip ---------------------------------------------------------- */

/*
  One colored segment per log, in time order.
  14px tall, 3px gaps, rounded ends on the whole strip.
*/
.strip {
  display: flex;
  gap: 3px;
  height: 14px;
  overflow: hidden;
  border-radius: var(--radius-pill);
}

.strip--empty {
  background: var(--track);
}

.strip__seg {
  flex: 1 1 0;
  min-width: 0;
}

.strip__seg--rough { background: var(--mood-rough); }
.strip__seg--low   { background: var(--mood-low); }
.strip__seg--okay  { background: var(--mood-okay); }
.strip__seg--good  { background: var(--mood-good); }
.strip__seg--great { background: var(--mood-great); }

/* Smaller strips: insight cards, widget header, feature icon. */
.strip--mini {
  flex: 0 0 auto;
  width: 46px;
  height: 6px;
  gap: 2px;
}

.strip--tiny {
  width: 52px;
  height: 5px;
  gap: 2px;
}

.strip--micro {
  width: 18px;
  height: 5px;
  gap: 1.5px;
}

/* --- Day track ---------------------------------------------------------- */

/*
  A bar from 6 AM to midnight. Segments are placed by main.js (left/width in %).
  The 1.5px card-colored edge on the right of each segment makes the gap between logs.
*/
.track {
  position: relative;
  flex: 1 1 auto;
  height: 12px;
  border-radius: 3px;
  background: var(--track);
}

.track__seg {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  border-right: 1.5px solid var(--card);
  border-radius: 3px;
}

.track__seg--rough { background: var(--mood-rough); }
.track__seg--low   { background: var(--mood-low); }
.track__seg--okay  { background: var(--mood-okay); }
.track__seg--good  { background: var(--mood-good); }
.track__seg--great { background: var(--mood-great); }

/* --- Devices ------------------------------------------------------------ */

/* Thin outlined device with the real dark-mode screenshot inside. */
.device {
  position: relative;
  border: 1.5px solid var(--frame);
  background: #000000;
}

.device__screen {
  width: 100%;
  height: auto;
}

.device--phone {
  width: var(--phone-w);
  padding: calc(var(--phone-w) * 0.022);
  border-radius: calc(var(--phone-w) * 0.16);
}

.device--phone .device__screen {
  border-radius: calc(var(--phone-w) * 0.14);
}

.device--ipad {
  width: min(560px, 100%);
  margin: var(--space-6) auto 0;
  padding: 12px;
  border-radius: 36px;
}

.device--ipad .device__screen {
  border-radius: 24px;
}

/* --- App Store badge ---------------------------------------------------- */

.store-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: var(--space-5);
  padding: 7px 16px 8px;
  border: 1px solid var(--badge-border);
  border-radius: 11px;
  background: #000000;
  color: #FFFFFF;
  line-height: 1;
  text-decoration: none;
  transition: transform 0.15s ease;
}

.store-badge:hover {
  transform: translateY(-1px);
}

.store-badge__small {
  font-size: 0.625rem;
  font-weight: 500;
}

.store-badge__large {
  margin-top: 2px;
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.store-badge--small {
  align-items: center;
  padding: 6px 14px 7px;
}

.store-badge--small .store-badge__large {
  font-size: 1.125rem;
}


/* ==========================================================================
   7. Sections
   ========================================================================== */

/* --- Hero ---------------------------------------------------------------- */

.section--hero {
  padding-top: clamp(40px, 2vw + 32px, 64px);
}

/* The hero lead wraps after about 40 characters, as in the mockup. */
.split--hero .lead {
  max-width: 18em;
}

/* Phone with the five faces in an arc over its top edge. */
.hero-device {
  --face: calc(var(--phone-w) * 0.193);
  position: relative;
  width: var(--phone-w);
  padding-top: calc(var(--phone-w) * 0.28);
}

.hero-device__faces {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 100%;
}

/* Positions measured from the mockup, as fractions of the phone width. */
.hero-device__faces .face-button {
  position: absolute;
  width: var(--face);
  height: var(--face);
}

.face-button--rough { left: calc(var(--phone-w) * -0.0965); top: calc(var(--phone-w) * 0.2515); }
.face-button--low   { left: calc(var(--phone-w) * 0.1535);  top: calc(var(--phone-w) * 0.0865); }
.face-button--okay  { left: calc(var(--phone-w) * 0.4035);  top: calc(var(--phone-w) * 0.0075); }
.face-button--good  { left: calc(var(--phone-w) * 0.6535);  top: calc(var(--phone-w) * 0.0865); }
.face-button--great { left: calc(var(--phone-w) * 0.9035);  top: calc(var(--phone-w) * 0.2465); }

/* "Try it" strip, a little wider than the phone. */
.hero-device__try {
  width: calc(var(--phone-w) * 1.22);
  margin: var(--space-5) 0 0 calc(var(--phone-w) * -0.11);
}

.hero-device__try .caption {
  margin-top: var(--space-2);
}

/* --- Your day ------------------------------------------------------------ */

.day-examples {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  max-width: 440px;
  margin-top: var(--space-5);
}

.day-card {
  padding: var(--space-4) var(--space-4) 14px;
}

.day-card__title {
  margin-bottom: var(--space-3);
  font-size: 0.875rem;
  font-weight: 500;
}

.day-card .strip {
  height: 10px;
  gap: 2px;
}

.day-card .caption {
  margin-top: var(--space-3);
  font-size: 0.6875rem;
}

/* --- Shifts -------------------------------------------------------------- */

.shifts {
  display: grid;
  grid-template-columns: minmax(0, 2.05fr) minmax(0, 1fr);
  align-items: start;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.chart {
  --label-w: 2.75rem;
  padding: var(--space-5);
}

.chart__caption {
  margin-bottom: var(--space-4);
  font-size: 0.6875rem;
}

/* One row per day: label, then the day track. */
.chart__rows {
  position: relative;
  z-index: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Faint guides at noon and 6 PM, behind the colored segments. */
.chart__rows::before,
.chart__rows::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  width: 1px;
  background: var(--hairline);
  opacity: 0.7;
}

.chart__rows::before { left: calc(var(--label-w) + (100% - var(--label-w)) / 3); }
.chart__rows::after  { left: calc(var(--label-w) + (100% - var(--label-w)) * 2 / 3); }

.chart__row {
  display: flex;
  align-items: center;
}

.chart__label {
  flex: 0 0 var(--label-w);
  color: var(--text-secondary);
  font-size: 0.6875rem;
  line-height: 1;
}

.chart__label--today {
  color: var(--text);
  font-weight: 600;
}

/* Time ticks under the chart: 6 AM, noon, 6 PM, midnight. */
.chart__axis {
  position: relative;
  height: 1.2em;
  margin: var(--space-3) 0 0 var(--label-w);
  color: var(--text-secondary);
  font-size: 0.6875rem;
}

.chart__axis span {
  position: absolute;
  top: 0;
  white-space: nowrap;
}

.chart__axis span:nth-child(1) { left: 0; }
.chart__axis span:nth-child(2) { left: 33.333%; transform: translateX(-50%); }
.chart__axis span:nth-child(3) { left: 66.667%; transform: translateX(-50%); }
.chart__axis span:nth-child(4) { right: 0; }

.insights {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* Caption and value on the left, a little strip of colors on the right. */
.insight {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) 20px;
}

.insight .caption {
  font-size: 0.6875rem;
}

.insight__value {
  font-size: 1.1875rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.insights__note {
  margin: var(--space-2) 0 0 var(--space-1);
  color: var(--text-secondary);
  font-size: 1rem;
}

/* --- Home Screen widgets ------------------------------------------------- */

/* Dark green "wallpaper" behind the two widgets, the same in light and dark. */
.widget-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 490px;
  margin-top: var(--space-6);
  padding: var(--space-6) var(--space-5);
  border-radius: 32px;
  background: linear-gradient(160deg, #26342C 0%, #121915 55%, #090C0B 100%);
}

.widget {
  display: flex;
  flex-direction: column;
  padding: 18px;
  border-radius: 24px;
  background: var(--card);
  color: var(--text);
  text-align: center;
}

.widget__name {
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  text-align: left;
}

.widget--medium {
  width: 350px;
  min-height: 164px;
}

.widget__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.widget__faces {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  padding-top: var(--space-5);
}

.widget__face {
  width: 44px;
  height: 44px;
  transition: width 0.2s ease, height 0.2s ease, transform 0.15s ease;
}

/* While "Logged … / Undo" shows, the faces shrink a little to make room (as in the app). */
.widget--logged .widget__face {
  width: 38px;
  height: 38px;
}

.widget--logged .widget__faces {
  padding-top: var(--space-3);
}

.widget__logged {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-top: var(--space-3);
  font-size: 0.75rem;
  text-align: left;
}

.widget__undo {
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.widget--large {
  width: 360px;
  min-height: 360px;
}

.widget__faces--named {
  margin-top: var(--space-4);
  padding-top: 0;
}

.widget__named {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 52px;
  color: var(--text-secondary);
  font-size: 0.625rem;
  line-height: 1.2;
}

.widget__named .face {
  width: 46px;
  height: 46px;
}

.widget__week {
  --label-w: 2.75rem;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: auto;
  padding-top: var(--space-5);
  text-align: left;
}

.widget__week .track {
  height: 8px;
}

.widget__week .chart__label {
  font-size: 0.625rem;
}

/* --- Features ------------------------------------------------------------ */

.features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
}

.feature {
  padding: var(--space-5);
}

.feature__icon {
  width: 36px;
  height: 36px;
  margin-bottom: var(--space-4);
}

.feature__week {
  display: flex;
  align-items: center;
  gap: 5px;
  width: auto;
}

.feature__device {
  width: 24px;
  color: var(--text);
}

.feature p {
  margin-top: var(--space-1);
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.45;
}

/* --- Privacy ------------------------------------------------------------- */

.split--privacy .h2 {
  max-width: 11em;
}

.privacy-card {
  width: min(440px, 100%);
  padding: var(--space-5);
}

.privacy-card__eyebrow {
  color: var(--text-secondary);
  font-size: 0.6875rem;
  font-weight: 600;
}

.privacy-card__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: var(--space-3);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.privacy-card__check {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
}

.privacy-card__body {
  margin-top: var(--space-2);
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* --- Closing call to action ---------------------------------------------- */

.cta__icon {
  width: 112px;
  height: 112px;
  margin: 0 auto;
}

.cta__title {
  margin-top: var(--space-5);
  font-size: clamp(2rem, 1.6rem + 1vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.cta__tagline {
  margin-top: var(--space-1);
  color: var(--text-secondary);
}

.cta .store-badge {
  margin-top: var(--space-5);
}


/* ==========================================================================
   7b. Documents: privacy policy and support
   One readable column, same tokens as the rest of the site.
   ========================================================================== */

.doc {
  padding-block: calc(var(--section-pad) * 0.75) var(--section-pad);
}

.doc__body {
  max-width: 44rem;
}

.doc__header {
  margin-bottom: var(--space-6);
}

/* Smaller than the marketing H2 so long titles ("Politique de confidentialité") fit a phone. */
.doc__title {
  font-size: clamp(2.25rem, 1.85rem + 1.6vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-wrap: balance;
}

.doc__meta {
  margin-top: var(--space-3);
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* Outlined pill, the quiet sibling of the header's App Store button. */
.doc__download {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: 38px;
  margin-top: var(--space-5);
  padding: 0 18px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  background: var(--card);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.doc__download::before {
  content: "";
  width: 14px;
  height: 14px;
  background: currentColor;
  /* Down arrow into a tray. */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1v9m-4-4 4 4 4-4M2 14h12' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1v9m-4-4 4 4 4-4M2 14h12' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.doc__download:hover {
  border-color: var(--text-secondary);
}

/* "The short version" / "Need a hand?" card at the top. */
.doc__summary {
  margin-bottom: var(--space-6);
  padding: var(--space-5);
  border-radius: var(--radius-large);
  background: var(--card);
  font-size: 1.125rem;
}

.doc__summary-title {
  margin-bottom: var(--space-2);
  font-weight: 600;
}

.doc__body h2 {
  margin: var(--space-6) 0 var(--space-3);
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.doc__body h3 {
  margin: var(--space-5) 0 var(--space-2);
  font-size: var(--size-h3);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.doc__body h2 + h3 {
  margin-top: var(--space-4);
}

.doc__body p + p,
.doc__body p + ul,
.doc__body ul + p {
  margin-top: var(--space-3);
}

.doc__body ul {
  margin: 0;
  padding-left: 1.25em;
}

.doc__body li + li {
  margin-top: var(--space-2);
}

.doc__body a {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
  overflow-wrap: anywhere;
}

/* The disclaimer at the end of the support page. */
.doc__note {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--hairline);
  color: var(--text-secondary);
}

.site-footer__links a[aria-current="page"] {
  font-weight: 600;
}


/* ==========================================================================
   8. Footer
   ========================================================================== */

.site-footer {
  padding-block: var(--space-5) var(--space-6);
  border-top: 1px solid var(--hairline);
  color: var(--text-secondary);
  font-size: var(--size-caption);
}

.site-footer p {
  margin-top: var(--space-3);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
}

.site-footer__links a {
  color: var(--text);
  text-decoration: none;
}

.site-footer__links a:hover {
  text-decoration: underline;
}


/* ==========================================================================
   9. Breakpoints
   ========================================================================== */

/* --- Tablet (834 artboard): everything stacks into one column ------------ */
@media (max-width: 1023px) {
  .split {
    grid-template-columns: 1fr;
  }

  .split--hero .split__media {
    margin-top: var(--space-2);
  }

  .day-examples {
    max-width: none;
  }

  .shifts {
    grid-template-columns: 1fr;
  }

  .insights {
    max-width: 480px;
  }

  .widget-stage {
    flex-direction: column;
  }

  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split--privacy .h2 {
    max-width: 18em;
  }

  .split--privacy .split__media {
    justify-content: flex-start;
  }
}

/* --- Phone (390 artboard) ----------------------------------------------- */
@media (max-width: 599px) {
  :root {
    --header-height: 60px;
  }

  .header-store {
    display: none;
  }

  /* Phone artboard: "One tap." and "That's it." on their own lines. */
  .h1 .line {
    display: block;
  }

  .day-examples {
    grid-template-columns: 1fr;
  }

  .chart {
    --label-w: 2.25rem;
    padding: var(--space-4);
  }

  .insights {
    max-width: none;
  }

  .widget-stage {
    min-height: 0;
    padding: var(--space-4);
    border-radius: var(--radius-large);
  }

  .widget--medium,
  .widget--large {
    width: 100%;
    max-width: 360px;
  }

  .widget--large {
    min-height: 0;
  }

  .widget__face {
    width: 40px;
    height: 40px;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .device--ipad {
    padding: 8px;
    border-radius: 26px;
  }

  .device--ipad .device__screen {
    border-radius: 18px;
  }
}

/* At the largest text size, keep the widgets from overflowing their cards. */
@media (max-width: 380px) {
  .widget__named {
    width: 44px;
  }

  .widget__named .face {
    width: 38px;
    height: 38px;
  }
}


/* ==========================================================================
   10. Motion and accessibility preferences
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Windows high contrast: keep strips and tracks visible. */
@media (forced-colors: active) {
  .strip__seg,
  .track__seg {
    forced-color-adjust: none;
  }
}

/* ==========================================================================
   11. Print
   Paper is always light. Header controls, the skip link and the download
   button are left out; `npm run pdf` adds the page URL and numbers.
   ========================================================================== */

@media print {
  :root,
  :root[data-theme="dark"],
  :root:not([data-theme="light"]) {
    --bg: #FFFFFF;
    --card: #F4F3F0;
    --text: #1C1C1E;
    --text-secondary: #6E6E73;
    --hairline: #DFDFDE;
    --text-scale: 1;
    color-scheme: light;
  }

  body {
    background: #FFFFFF;
    font-size: 11pt;
  }

  .skip-link,
  .site-header__actions,
  .doc__download,
  .site-footer__links {
    display: none !important;
  }

  .site-header {
    position: static;
    border-bottom: 0;
  }

  .site-header__inner {
    min-height: 0;
    padding-block: 0 8mm;
  }

  .container {
    max-width: none;
    padding-inline: 0;
  }

  .doc {
    padding-block: 0;
  }

  .doc__body {
    max-width: none;
  }

  .doc__header {
    margin-bottom: 8mm;
  }

  .doc__title {
    font-size: 26pt;
  }

  .doc__summary {
    margin-bottom: 6mm;
    padding: 5mm 6mm;
    border-radius: 4mm;
    font-size: 12pt;
    break-inside: avoid;
  }

  .doc__body h2 {
    margin-top: 8mm;
    font-size: 16pt;
    break-after: avoid;
  }

  .doc__body h3 {
    margin-top: 5mm;
    font-size: 12.5pt;
    break-after: avoid;
  }

  .doc__body p,
  .doc__body li {
    orphans: 3;
    widows: 3;
  }

  .doc__note {
    break-inside: avoid;
  }

  .site-footer {
    padding-block: 6mm 0;
    font-size: 9pt;
  }
}
