:root {
  --bg: #f4f1e9;
  --paper: #fffdf8;
  --paper-2: #f9f6ef;
  --ink: #17161b;
  --ink-2: #2b2931;
  --muted: #726e78;
  --muted-2: #9b96a1;
  --line: #ddd7cc;
  --line-strong: #cfc7ba;
  --accent: #6957f5;
  --accent-deep: #5140dd;
  --accent-soft: #eeebff;
  --accent-2: #d8ff62;
  --accent-2-deep: #bfeb43;
  --contrast: #700353;
  --contrast-soft: #f2e7ef;
  --ok: #16805a;
  --ok-soft: #e3f7ed;
  --danger: #ae3434;
  --danger-soft: #fff0ef;
  --radius: 26px;
  --radius-sm: 17px;
  --shadow: 0 14px 36px rgba(28, 24, 39, .065);
  --shadow-strong: 0 18px 45px rgba(28, 24, 39, .13);
}

* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; color: var(--ink); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 85% -5%, rgba(105,87,245,.09), transparent 27rem),
    radial-gradient(circle at -10% 25%, rgba(216,255,98,.10), transparent 20rem),
    var(--bg);
}
button, input, select { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
#app { min-height: 100vh; }

.shell {
  max-width: 600px;
  margin: 0 auto;
  min-height: 100vh;
  padding: env(safe-area-inset-top) 18px calc(104px + env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 62px;
  padding: 8px 2px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(var(--bg) 70%, rgba(244,241,233,.9) 82%, transparent);
  backdrop-filter: blur(8px);
}
.brand {
  font-weight: 950;
  letter-spacing: -.055em;
  font-size: 22px;
  line-height: 1;
}
.brand-dot { color: var(--accent); }
.icon-btn {
  border: 1px solid var(--line);
  background: rgba(255,253,248,.82);
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: var(--ink);
  box-shadow: 0 5px 18px rgba(35,31,45,.05);
}
.icon-btn:active { transform: scale(.97); }

.hero { padding: 27px 2px 18px; }
.eyebrow {
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .15em;
  color: var(--accent);
}
h1 {
  font-size: clamp(41px, 11.4vw, 64px);
  line-height: .94;
  letter-spacing: -.065em;
  margin: 10px 0 17px;
  text-wrap: balance;
}
h2 {
  font-size: 31px;
  line-height: .98;
  letter-spacing: -.048em;
  margin: 8px 0 14px;
}
h3 {
  font-size: 19px;
  line-height: 1.08;
  letter-spacing: -.032em;
  margin: 0 0 8px;
}
p { line-height: 1.48; margin: 0 0 12px; }
.muted { color: var(--muted); }

.card {
  background: rgba(255,253,248,.93);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.card.dark {
  background:
    radial-gradient(circle at 90% 0%, rgba(105,87,245,.32), transparent 12rem),
    var(--ink);
  color: white;
  border-color: var(--ink);
  box-shadow: var(--shadow-strong);
}
.card.accent {
  background: linear-gradient(145deg, #e4ff8d 0%, var(--accent-2) 100%);
  border-color: #c1e94c;
  box-shadow: none;
}
.card.contrast {
  background: var(--contrast-soft);
  border-color: #dbc2d2;
  box-shadow: none;
}
.card.contrast .eyebrow { color: var(--contrast); }
.card.contrast a { color: var(--contrast); }
.big-action { padding: 25px; overflow: hidden; position: relative; }
.big-action::after {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  right: -58px;
  bottom: -70px;
  border: 23px solid rgba(255,255,255,.06);
  pointer-events: none;
}
.big-number { font-size: 54px; font-weight: 950; line-height: .86; letter-spacing: -.07em; }

.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.stack { display: grid; gap: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.btn {
  border: 0;
  border-radius: 17px;
  min-height: 56px;
  padding: 14px 18px;
  background: var(--ink);
  color: white;
  font-weight: 900;
  letter-spacing: -.012em;
  width: 100%;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:active { transform: translateY(1px) scale(.995); }
.btn.primary { background: var(--accent); box-shadow: 0 11px 24px rgba(105,87,245,.23); }
.btn.primary:hover { background: var(--accent-deep); }
.btn.secondary { background: rgba(255,253,248,.68); color: var(--ink); border: 1px solid var(--line-strong); }
.btn.lime { background: var(--accent-2); color: var(--ink); box-shadow: 0 8px 20px rgba(180,220,60,.16); }
.btn.small { width: auto; min-height: 42px; padding: 10px 14px; border-radius: 14px; font-size: 14px; }
.btn.danger { background: var(--danger-soft); color: var(--danger); border: 1px solid #efc7c3; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 11px;
  letter-spacing: .02em;
  font-weight: 900;
  background: #ece8df;
  white-space: nowrap;
}
.pill.good { background: var(--ok-soft); color: #0c6847; }
.pill.purple { background: #ece9ff; color: #4d3be7; }

.progress { height: 8px; background: #e6e1d8; border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }

.option-grid { display: grid; gap: 10px; }
.option {
  text-align: left;
  border: 1px solid var(--line);
  background: rgba(255,253,248,.9);
  border-radius: 20px;
  padding: 16px 48px 16px 16px;
  min-height: 62px;
  font-weight: 820;
  color: var(--ink);
  position: relative;
  transition: border-color .14s ease, background .14s ease, transform .14s ease;
}
.option::after {
  content: "";
  position: absolute;
  right: 17px;
  top: 50%;
  width: 19px;
  height: 19px;
  transform: translateY(-50%);
  border-radius: 50%;
  border: 1.5px solid #bfb8ad;
  background: white;
}
.option.selected {
  border: 2px solid var(--accent);
  background: var(--accent-soft);
  padding: 15px 47px 15px 15px;
}
.option.selected::after {
  border: 5px solid var(--accent);
  background: white;
}
.option:active { transform: scale(.995); }

.check-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.check-row:last-child { border-bottom: 0; }
.check { width: 28px; height: 28px; border-radius: 9px; border: 1.5px solid #cfc9bd; display: grid; place-items: center; font-weight: 900; }
.check.on { background: var(--accent); color: white; border-color: var(--accent); }

.stepper { display: flex; gap: 7px; margin: 9px 0 27px; }
.stepper span { height: 5px; flex: 1; border-radius: 10px; background: #ddd7cc; }
.stepper span.on { background: var(--accent); }
.form-label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; font-weight: 900; margin: 21px 0 9px; color: var(--muted); }
.input {
  width: 100%; padding: 15px 16px; border: 1px solid var(--line); border-radius: 17px;
  background: rgba(255,253,248,.95); color: var(--ink); min-height: 54px; outline: 0;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(105,87,245,.10); }

.bottom-nav {
  position: fixed;
  bottom: calc(10px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: min(568px, calc(100% - 20px));
  display: grid;
  grid-template-columns: repeat(5,1fr);
  gap: 4px;
  padding: 7px;
  background: rgba(255,253,248,.94);
  border: 1px solid var(--line);
  border-radius: 24px;
  backdrop-filter: blur(20px);
  box-shadow: 0 15px 40px rgba(25,22,32,.13);
  z-index: 30;
}
.nav-btn {
  border: 0;
  background: transparent;
  min-height: 54px;
  border-radius: 17px;
  padding: 7px 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}
.nav-btn b { display: block; font-size: 19px; margin-bottom: 2px; font-weight: 600; }
.nav-btn.active { color: var(--accent); background: var(--accent-soft); }

.metric {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,253,248,.92);
  min-height: 122px;
  box-shadow: 0 8px 22px rgba(35,31,45,.035);
}
.metric strong { display: block; font-size: 31px; letter-spacing: -.055em; margin: 8px 0 3px; line-height: 1; }
.metric .eyebrow { font-size: 10px; }

.session-strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 1px 5px; scrollbar-width: none; }
.session-strip::-webkit-scrollbar { display: none; }
.day {
  min-width: 69px;
  padding: 12px 7px 11px;
  border: 1px solid var(--line);
  border-radius: 18px;
  text-align: center;
  background: rgba(255,253,248,.88);
}
.day.done { background: var(--ok-soft); border-color: #b8e2cc; }
.day.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.day .dname { font-size: 11px; font-weight: 900; letter-spacing: .03em; }
.day .status { font-size: 20px; line-height: 1; margin: 7px 0 4px; color: var(--accent); }
.day.done .status { color: var(--ok); }

.workout-stack { display: grid; gap: 12px; margin-bottom: 14px; }
.exercise {
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255,253,248,.95);
  box-shadow: var(--shadow);
}
.exercise:last-child { border-bottom: 1px solid var(--line); }
.set-labels {
  display: grid;
  grid-template-columns: 34px 1fr 1fr 44px;
  gap: 8px;
  margin: 16px 0 5px;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: center;
}
.set-row { display: grid; grid-template-columns: 34px 1fr 1fr 44px; gap: 8px; align-items: center; margin-top: 8px; }
.set-row > strong {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  background: #eeeae1; color: var(--muted); font-size: 13px;
}
.set-row input {
  width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 13px; padding: 11px 7px;
  text-align: center; background: #fff; color: var(--ink); outline: 0; font-weight: 800;
}
.set-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(105,87,245,.08); }
.set-done {
  width: 43px; height: 43px; border-radius: 13px; border: 1px solid var(--line);
  background: white; font-weight: 950; color: var(--muted);
}
.set-done.on { background: var(--accent-2); color: var(--ink); border-color: #bfdc54; }
.power { border-left: 0; border-top: 4px solid var(--contrast); background: linear-gradient(180deg, #f6edf3 0%, var(--paper) 65%); }

.notice { padding: 15px 16px; border-radius: 17px; background: #ebe8e1; color: #5a5660; font-size: 13px; line-height: 1.48; }
.source { display: block; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; font-weight: 800; color: #4939d7; }

.segment { display: grid; grid-template-columns: repeat(auto-fit,minmax(70px,1fr)); gap: 7px; }
.segment button {
  border: 1px solid var(--line);
  background: rgba(255,253,248,.9);
  border-radius: 15px;
  min-height: 45px;
  padding: 9px 5px;
  font-weight: 850;
  color: var(--muted);
}
.segment button.on { background: var(--ink); color: white; border-color: var(--ink); }

.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%);
  background: var(--ink); color: white; padding: 12px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 850; z-index: 50; box-shadow: var(--shadow-strong); animation: toast 2.4s forwards;
}
@keyframes toast { 0%{opacity:0;transform:translate(-50%,10px)} 10%,80%{opacity:1;transform:translate(-50%,0)} 100%{opacity:0} }
.divider { height: 1px; background: var(--line); margin: 16px 0; }

/* Landing */
.landing-shell { position: relative; overflow: hidden; }
.landing-shell::before {
  content: ""; position: absolute; width: 265px; height: 265px; border-radius: 50%;
  right: -150px; top: 95px; border: 48px solid rgba(105,87,245,.08); pointer-events: none;
}
.hero-mark {
  width: 64px; height: 64px; border-radius: 21px 21px 21px 8px;
  background: var(--accent); color: white; display: grid; place-items: center;
  font-size: 27px; font-weight: 950; letter-spacing: -.06em; transform: rotate(-3deg); margin-bottom: 29px;
  box-shadow: 0 13px 30px rgba(105,87,245,.24);
}
.proof-strip { display: flex; flex-wrap: wrap; gap: 7px; margin: 20px 0 4px; }
.proof-strip span { background: #ebe7de; border-radius: 999px; padding: 8px 10px; font-size: 11px; font-weight: 850; color: #5e5964; }
.landing-preview {
  position: relative; overflow: hidden; padding: 21px; margin: 10px 0 16px;
  border-radius: 30px; background: var(--ink); color: white; box-shadow: var(--shadow-strong);
}
.landing-preview::after {
  content: ""; position: absolute; width: 170px; height: 170px; right: -80px; top: -75px;
  border-radius: 50%; background: var(--accent); opacity: .48; filter: blur(2px);
}
.preview-kicker { position: relative; z-index: 1; color: #b8afff; font-size: 10px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.preview-title { position: relative; z-index: 1; font-size: 29px; font-weight: 930; letter-spacing: -.05em; margin: 8px 0 16px; }
.preview-row { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.preview-stat { padding: 12px 9px; border: 1px solid rgba(255,255,255,.12); border-radius: 17px; background: rgba(255,255,255,.055); }
.preview-stat b { display: block; font-size: 19px; letter-spacing: -.04em; margin-bottom: 3px; }
.preview-stat span { font-size: 9px; color: #bbb5c4; text-transform: uppercase; letter-spacing: .08em; font-weight: 850; }
.install-tip { font-size: 13px; padding: 13px 14px; border-radius: 15px; background: var(--accent-soft); }
.privacy { font-size: 12px; color: var(--muted); text-align: center; padding: 12px 20px; }

/* Workout refinements */
.workout-topbar .brand { max-width: 50%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.workout-hero { padding-bottom: 12px; }
.workout-hero h2 { font-size: 36px; }
.workout-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* Range */
input[type="range"] { accent-color: var(--accent); height: 26px; }

@media (max-width: 390px) {
  .shell { padding-left: 14px; padding-right: 14px; }
  .grid2 { gap: 8px; }
  .card { padding: 18px; }
  .big-action { padding: 22px; }
  .segment { gap: 5px; }
  .segment button { font-size: 12px; }
}

@media (min-width: 700px) {
  .shell { padding-left: 28px; padding-right: 28px; }
}

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

/* Multi-select choices read as checkboxes rather than radio buttons. */
.option[data-select="limitations"]::after,
.option[data-select="goals"]::after { border-radius: 6px; }
.option[data-select="limitations"].selected::after,
.option[data-select="goals"].selected::after { background: var(--accent); box-shadow: inset 0 0 0 3px white; }

/* Completion screen */
.completion-shell { padding-bottom: calc(42px + env(safe-area-inset-bottom)); overflow: hidden; }
.completion-topbar { position: relative; background: transparent; backdrop-filter: none; }
.completion-hero { position: relative; padding: 25px 2px 22px; }
.completion-hero::after {
  content: ""; position: absolute; width: 230px; height: 230px; right: -120px; top: -38px;
  border-radius: 50%; border: 42px solid rgba(216,255,98,.28); pointer-events: none;
}
.completion-check {
  width: 72px; height: 72px; display: grid; place-items: center; border-radius: 24px 24px 24px 8px;
  margin-bottom: 25px; background: var(--accent-2); color: var(--ink); font-size: 36px; font-weight: 950;
  box-shadow: 0 14px 30px rgba(169,205,52,.20); transform: rotate(-3deg);
  animation: complete-pop .42s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes complete-pop { from { opacity:0; transform:rotate(-3deg) scale(.7); } to { opacity:1; transform:rotate(-3deg) scale(1); } }
.completion-hero h1 { font-size: clamp(55px, 15vw, 78px); margin-top: 8px; margin-bottom: 16px; }
.completion-hero p { max-width: 440px; font-size: 17px; color: var(--muted); }
.completion-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 3px 0 14px; }
.completion-stat {
  min-width: 0; padding: 17px 12px 15px; border: 1px solid var(--line); border-radius: 20px;
  background: rgba(255,253,248,.94); box-shadow: 0 8px 22px rgba(35,31,45,.035);
}
.completion-stat.highlight { background: var(--accent-soft); border-color: #d8d0ff; }
.completion-stat strong { display:block; font-size: 30px; line-height: 1; letter-spacing: -.06em; margin-bottom: 7px; }
.completion-stat span { display:block; color: var(--muted); font-size: 9px; line-height: 1.2; font-weight: 900; text-transform: uppercase; letter-spacing: .07em; }
.completion-progress h2 { font-size: 27px; margin-top: 9px; margin-bottom: 16px; max-width: 440px; }
.progress-list { display:grid; gap: 9px; }
.progress-item, .baseline { display:flex; align-items:flex-start; gap:12px; padding: 13px 0; border-top: 1px solid var(--line); }
.progress-arrow, .baseline > span { flex: 0 0 34px; height:34px; border-radius: 11px; display:grid; place-items:center; background:var(--accent-2); font-weight:950; }
.progress-item strong, .baseline strong { font-size:14px; }
.progress-item p, .baseline p { margin:3px 0 0; color:var(--muted); font-size:12px; }
.completion-consistency { padding: 22px; }
.consistency-row { display:grid; grid-template-columns: 45px 1fr 45px; gap: 12px; align-items:center; margin: 18px 0 15px; }
.consistency-row > div:first-child, .consistency-row > div:last-child { text-align:center; }
.consistency-row strong { display:block; font-size:27px; line-height:1; }
.consistency-row span { display:block; color:#9e98aa; font-size:9px; font-weight:900; text-transform:uppercase; letter-spacing:.08em; margin-top:4px; }
.consistency-line { height: 8px; border-radius:999px; background:rgba(255,255,255,.12); overflow:hidden; }
.consistency-line i { display:block; height:100%; border-radius:inherit; background:var(--accent-2); }
.completion-consistency p { margin:0; color:#cbc7d5; font-size:13px; }
.next-session {
  display:flex; align-items:center; justify-content:space-between; gap:14px; padding: 20px;
  border:1px solid var(--line); border-radius:var(--radius); background:rgba(255,253,248,.93); box-shadow:var(--shadow); margin-bottom:14px;
}
.next-session h3 { margin:7px 0 4px; font-size:23px; }
.next-session p { margin:0; color:var(--muted); font-size:13px; }
.next-arrow { width:48px; height:48px; border-radius:16px; background:var(--ink); color:white; display:grid; place-items:center; font-size:22px; font-weight:900; flex:0 0 48px; }
.completion-actions { display:grid; gap:9px; margin-top: 4px; }

@media (max-width: 390px) {
  .completion-stat { padding: 15px 9px 13px; }
  .completion-stat strong { font-size: 27px; }
}

.day.inactive { opacity: .42; }

/* V1.4 strategy-led onboarding */
.onboarding-shell { padding-bottom: calc(124px + env(safe-area-inset-bottom)); }
.onboarding-topbar { position: relative; background: transparent; backdrop-filter: none; }
.onboarding-progress { margin: 5px 2px 24px; }
.onboarding-progress > div:first-child { display:flex; justify-content:space-between; gap:12px; align-items:flex-end; }
.onboarding-progress > div:first-child span { color:var(--muted-2); font-size:9px; font-weight:900; letter-spacing:.13em; }
.onboarding-progress > div:first-child strong { font-size:12px; color:var(--ink); }
.onboarding-progress .stepper { margin:10px 0 0; }
.onboarding-section { padding-bottom: 10px; }
.onboarding-hero { padding: 9px 2px 8px; }
.onboarding-hero h1 { font-size: clamp(42px, 12vw, 59px); margin: 9px 0 15px; max-width: 540px; }
.onboarding-hero > p { color:var(--muted); font-size:16px; max-width:520px; }
.question-block { margin-top: 26px; }
.question-head { display:flex; gap:12px; align-items:flex-start; margin: 0 2px 12px; }
.question-head > span { flex:0 0 28px; height:28px; border-radius:10px; display:grid; place-items:center; background:var(--ink); color:white; font-size:11px; font-weight:950; margin-top:1px; }
.question-head h3 { font-size:18px; margin:0 0 4px; }
.question-head p { color:var(--muted); font-size:12px; line-height:1.4; margin:0; max-width:470px; }
.option-copy { display:block; min-width:0; }
.option-copy strong { display:block; font-size:15px; line-height:1.15; }
.option-copy small { display:block; margin-top:4px; color:var(--muted); font-size:11px; line-height:1.3; font-weight:650; }
.option-icon { width:32px; height:32px; display:grid; place-items:center; border-radius:11px; background:#efebe3; font-weight:950; font-size:14px; flex:0 0 32px; }
.option-grid.compact .option { display:flex; align-items:center; gap:12px; min-height:68px; }
.option-grid.compact .option.selected .option-icon { background:var(--accent); color:white; }
.choice-cards { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.choice-cards .option { min-height:112px; padding:14px; display:flex; flex-direction:column; align-items:flex-start; gap:12px; }
.choice-cards .option::after { display:none; }
.choice-cards .option.selected { padding:13px; }
.choice-cards .option-icon { width:38px; height:38px; border-radius:13px; }
.choice-cards .option-copy strong { font-size:14px; }
.choice-cards .option-copy small { font-size:10px; }
.day-count-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.day-count { border:1px solid var(--line); background:rgba(255,253,248,.9); min-height:115px; padding:14px 8px; border-radius:21px; color:var(--ink); text-align:center; }
.day-count strong { display:block; font-size:38px; line-height:.95; letter-spacing:-.06em; }
.day-count span { display:block; font-size:11px; font-weight:900; margin-top:7px; }
.day-count small { display:block; color:var(--muted); font-size:9px; line-height:1.25; margin-top:8px; }
.day-count.selected { background:var(--ink); border-color:var(--ink); color:white; box-shadow:var(--shadow-strong); }
.day-count.selected small { color:#c9c4d1; }
.strategy-preview { margin-top:24px; padding:19px; border-radius:25px; background:linear-gradient(145deg,var(--accent-soft),#f6f4ff); border:1px solid #d9d2ff; }
.strategy-preview-top { display:flex; justify-content:space-between; align-items:center; gap:10px; }
.strategy-preview h3 { font-size:25px; margin:10px 0 13px; }
.strategy-tags { display:flex; flex-wrap:wrap; gap:7px; }
.strategy-tags span { padding:7px 9px; border-radius:999px; background:white; border:1px solid #ded9ef; font-size:10px; font-weight:850; color:#5d576a; }
.onboarding-actions { position:fixed; left:50%; bottom:calc(12px + env(safe-area-inset-bottom)); transform:translateX(-50%); width:min(564px,calc(100% - 28px)); display:grid; grid-template-columns:auto 1fr; gap:8px; z-index:30; padding:7px; background:rgba(244,241,233,.88); border:1px solid rgba(207,199,186,.85); backdrop-filter:blur(18px); border-radius:22px; box-shadow:0 14px 34px rgba(25,22,32,.13); }
.onboarding-actions .btn { min-height:54px; }
.onboarding-actions .onboarding-back { width:72px; padding-left:10px; padding-right:10px; }
.onboarding-actions .btn:only-child { grid-column:1/-1; }
.week-picker { display:grid; grid-template-columns:repeat(7,1fr); gap:6px; }
.week-picker button { min-width:0; min-height:72px; border:1px solid var(--line); border-radius:18px; background:rgba(255,253,248,.9); color:var(--muted); padding:9px 2px; }
.week-picker button span { display:grid; place-items:center; width:34px; height:34px; margin:0 auto 5px; border-radius:12px; font-size:12px; font-weight:950; }
.week-picker button small { display:block; font-size:8px; font-weight:850; }
.week-picker button.on { border-color:var(--accent); background:var(--accent-soft); color:var(--accent-deep); }
.week-picker button.on span { background:var(--accent); color:white; }
.time-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.time-grid .option { display:flex; align-items:center; gap:11px; }
.time-grid .option-icon { background:#efebe3; }
.time-grid .option.selected .option-icon { background:var(--accent); color:white; }
.week-preview { margin-top:24px; border-radius:26px; overflow:hidden; background:var(--ink); color:white; padding:19px; box-shadow:var(--shadow-strong); }
.week-preview-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:13px; }
.week-preview-head .eyebrow { color:#b7afff; }
.week-preview-head > span:last-child { color:#aaa4b4; font-size:11px; font-weight:850; }
.week-preview-list { display:grid; gap:7px; }
.week-preview-list > div { display:grid; grid-template-columns:48px 1fr; align-items:center; gap:8px; padding:10px 11px; border:1px solid rgba(255,255,255,.1); border-radius:15px; background:rgba(255,255,255,.045); }
.week-preview-list b { color:var(--accent-2); font-size:12px; }
.week-preview-list span { font-size:13px; font-weight:850; }
.principle-note { display:flex; align-items:flex-start; gap:12px; padding:17px 4px 0; }
.principle-note > span { flex:0 0 36px; height:36px; display:grid; place-items:center; border-radius:12px; background:var(--accent-2); font-weight:950; }
.principle-note p { color:var(--muted); font-size:12px; margin:1px 0 0; }
.limitation-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.limitation-grid .option { min-height:70px; }
.medical-flag { width:100%; margin-top:9px; border:1px solid #efc7c3; background:var(--danger-soft); color:var(--ink); border-radius:19px; padding:15px; display:flex; gap:12px; text-align:left; }
.medical-flag > span { flex:0 0 31px; height:31px; border-radius:10px; display:grid; place-items:center; background:#f4d7d2; color:var(--danger); font-weight:950; }
.medical-flag strong { display:block; font-size:12px; line-height:1.3; }
.medical-flag small { display:block; color:#806565; font-size:10px; line-height:1.35; margin-top:4px; }
.medical-flag.selected { border:2px solid var(--danger); padding:14px; }
.weight-row { display:grid; grid-template-columns:1fr 46px; gap:8px; align-items:center; }
.weight-row > span { display:grid; place-items:center; height:54px; border-radius:16px; background:#ebe7de; font-size:12px; font-weight:900; color:var(--muted); }
.protein-preview { margin-top:8px; padding:11px 13px; border-radius:14px; background:var(--accent-soft); color:#554e67; font-size:11px; font-weight:750; }
.safety-panel { display:flex; gap:12px; align-items:flex-start; margin-top:26px; padding:16px; border-radius:20px; background:#ece8df; }
.safety-icon { flex:0 0 32px; height:32px; border-radius:11px; display:grid; place-items:center; background:var(--ink); color:white; font-weight:950; }
.safety-panel h3 { font-size:14px; margin:1px 0 5px; }
.safety-panel p { color:var(--muted); font-size:11px; line-height:1.42; margin:0; }
.safety-ack { width:100%; margin-top:9px; border:1px solid var(--line); border-radius:18px; background:rgba(255,253,248,.9); min-height:60px; padding:13px; display:flex; gap:11px; align-items:center; text-align:left; color:var(--ink); font-size:12px; font-weight:800; }
.ack-box { flex:0 0 25px; height:25px; border-radius:8px; display:grid; place-items:center; border:1.5px solid #beb7ac; background:white; color:white; }
.safety-ack.selected { border-color:var(--accent); background:var(--accent-soft); }
.safety-ack.selected .ack-box { background:var(--accent); border-color:var(--accent); }
.ready-card { margin-top:17px; padding:19px; border-radius:24px; background:linear-gradient(145deg,#e5ff91,var(--accent-2)); border:1px solid #c4e955; }
.ready-card .eyebrow { color:#546a0a; }
.ready-card h3 { margin:8px 0 6px; font-size:23px; }
.ready-card p { margin:0; color:#4d5b27; font-size:12px; }

@media (max-width:390px) {
  .choice-cards { grid-template-columns:1fr; }
  .choice-cards .option { min-height:68px; flex-direction:row; align-items:center; }
  .day-count { min-height:106px; }
  .week-picker { gap:4px; }
  .week-picker button { min-height:66px; border-radius:15px; }
  .week-picker button span { width:29px; height:29px; border-radius:10px; }
}

/* Onboarding overflow hardening for narrow phones */
.onboarding-section .option { min-width:0; }
.onboarding-section .option-copy { min-width:0; overflow-wrap:anywhere; }
.choice-cards { grid-template-columns:repeat(3,minmax(0,1fr)); }
.day-count-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
.day-count { min-width:0; }
.week-picker { grid-template-columns:repeat(7,minmax(0,1fr)); }
.week-picker button { min-width:0; width:100%; }
.time-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.limitation-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.medical-flag > div { min-width:0; overflow-wrap:anywhere; }
.safety-ack > span:last-child { min-width:0; white-space:normal; overflow-wrap:anywhere; }

/* V1.7 smarter training + Europe-centric Health */
.bottom-nav { grid-template-columns: repeat(5,1fr); }
.nav-btn { font-size: 9px; }
.nav-btn b { font-size: 18px; }
.sub-question { margin-top: 12px; padding: 15px; border-radius: 19px; background: var(--paper-2); border: 1px solid var(--line); }
.sub-question .eyebrow { margin-bottom: 9px; }
.equipment-chips { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.equipment-chips .option { min-width:0; min-height:55px; padding-top:12px; padding-bottom:12px; }
.option[data-select="homeKit"]::after,
.option[data-health-select="boneFlags"]::after,
.option[data-profile-toggle="homeKit"]::after { border-radius:6px; }
.option[data-select="homeKit"].selected::after,
.option[data-health-select="boneFlags"].selected::after,
.option[data-profile-toggle="homeKit"].selected::after { background:var(--accent); box-shadow:inset 0 0 0 3px white; }

.exercise-heading { align-items:flex-start; }
.exercise-heading > div:first-child { min-width:0; flex:1; }
.exercise-head-actions { display:flex; flex-direction:column; align-items:flex-end; gap:7px; flex:0 0 auto; }
.swap-btn { border:0; background:var(--accent-soft); color:var(--accent-deep); border-radius:999px; padding:7px 10px; font-size:10px; font-weight:900; }
.swap-btn:active { transform:scale(.97); }

.health-focus { border-left:4px solid var(--accent); }
.health-focus-icon { width:48px; height:48px; border-radius:17px; display:grid; place-items:center; background:var(--accent-soft); color:var(--accent-deep); font-size:22px; font-weight:950; flex:0 0 48px; }
.health-status-grid { display:grid; gap:14px; margin-top:13px; }
.health-status-grid > div { padding-top:13px; border-top:1px solid var(--line); }
.health-status-grid > div:first-child { border-top:0; padding-top:0; }
.health-status-grid > div > strong { display:block; font-size:14px; margin-bottom:8px; }
.mini-choice { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
.mini-choice .option { min-height:52px; padding:11px 38px 11px 12px; font-size:12px; }
.mini-choice .option.selected { padding:10px 37px 10px 11px; }
.mini-choice .option-copy strong { font-size:12px; }
.reviewed-strip { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 14px; padding:12px 14px; border:1px solid #d9d2ff; border-radius:16px; background:var(--accent-soft); color:#574f68; font-size:11px; }
.reviewed-strip strong { color:var(--accent-deep); }

.health-score { display:flex; justify-content:space-between; align-items:center; gap:16px; }
.health-score > div:first-child { min-width:0; }
.health-score h2 { margin-top:8px; }
.health-ring { flex:0 0 88px; width:88px; height:88px; border-radius:50%; display:grid; place-items:center; align-content:center; border:10px solid rgba(216,255,98,.85); background:rgba(255,255,255,.04); }
.health-ring strong { display:block; font-size:30px; line-height:.9; letter-spacing:-.06em; }
.health-ring span { display:block; margin-top:4px; font-size:9px; color:#cbc7d5; font-weight:850; }
.section-head { display:flex; justify-content:space-between; align-items:flex-end; gap:14px; margin:24px 2px 12px; }
.section-head h2 { margin:5px 0 0; font-size:31px; }
.action-stack { display:grid; gap:10px; margin-bottom:14px; }
.health-action { display:grid; grid-template-columns:48px 1fr; gap:13px; padding:18px; border:1px solid var(--line); border-radius:23px; background:rgba(255,253,248,.94); box-shadow:var(--shadow); }
.health-action.top { border:2px solid var(--accent); padding:17px; background:linear-gradient(145deg,#f7f5ff,#fffdf8); }
.health-action-icon { width:48px; height:48px; border-radius:16px; display:grid; place-items:center; background:var(--accent-soft); color:var(--accent-deep); font-weight:950; }
.health-action.top .health-action-icon { background:var(--accent); color:white; }
.health-action h3 { margin:5px 0 7px; font-size:20px; }
.health-action p { color:var(--muted); font-size:12px; margin:0; }
.health-pillar-grid { display:grid; gap:0; }
.pillar-card { position:relative; overflow:hidden; }
.pillar-card .eyebrow { color:var(--accent); }
.health-meals { grid-template-columns:repeat(3,1fr); margin-top:13px; }
.protect-list { display:grid; gap:0; margin-top:8px; }
.protect-list > div { display:flex; justify-content:space-between; gap:12px; padding:11px 0; border-top:1px solid var(--line); font-size:12px; }
.protect-list strong { color:var(--accent-deep); }
.supplement-line { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; padding:13px 0; border-top:1px solid var(--line); }
.supplement-line:first-of-type { margin-top:7px; }
.supplement-line strong { display:block; font-size:14px; }
.supplement-line p { color:var(--muted); font-size:11px; margin:4px 0 0; }

@media (max-width:390px) {
  .bottom-nav { width:calc(100% - 12px); gap:2px; padding:6px; }
  .nav-btn { min-height:51px; font-size:8px; }
  .nav-btn b { font-size:17px; }
  .equipment-chips { grid-template-columns:1fr; }
  .health-score { align-items:flex-start; }
  .health-ring { width:76px; height:76px; flex-basis:76px; border-width:8px; }
  .health-ring strong { font-size:26px; }
  .section-head { align-items:flex-start; flex-direction:column; }
  .section-head .btn { width:auto; }
  .exercise-heading { gap:8px; }
}

/* V1.7 responsive layout system ------------------------------------------------ */
.nav-brand { display: none; }

@media (min-width: 700px) {
  .shell {
    max-width: 960px;
    padding-left: 30px;
    padding-right: 30px;
  }
  .app-shell { max-width: 960px; }
  .landing-shell { max-width: 920px; }
  .onboarding-shell { max-width: 820px; }
  .workout-shell { max-width: 860px; }
  .completion-shell { max-width: 820px; }

  .bottom-nav { width: min(720px, calc(100% - 36px)); }
  .onboarding-actions { width: min(760px, calc(100% - 40px)); }

  .hero h1 { max-width: 780px; }
  .card { padding: 22px; }

  /* Today: pair the main action with the longevity focus, keep the week wide. */
  .view-today {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
    grid-template-areas:
      "hero hero"
      "primary health"
      "week week"
      "metrics metrics"
      "protein recovery"
      "minimum minimum";
    gap: 14px;
    align-items: stretch;
  }
  .view-today > .hero { grid-area: hero; }
  .view-today > .today-primary { grid-area: primary; }
  .view-today > .health-focus { grid-area: health; }
  .view-today > .week-card { grid-area: week; }
  .view-today > .today-metrics { grid-area: metrics; }
  .view-today > .today-protein { grid-area: protein; }
  .view-today > .today-recovery { grid-area: recovery; }
  .view-today > .today-minimum { grid-area: minimum; }
  .view-today > .card,
  .view-today > .grid2 { margin-bottom: 0; margin-top: 0 !important; }
  .view-today .today-primary,
  .view-today .health-focus { min-height: 245px; }
  .view-today .health-focus { display: flex; flex-direction: column; justify-content: space-between; }
  .view-today .health-focus .row { align-items: flex-start; }
  .week-card .session-strip {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    overflow: visible;
  }
  .week-card .day { min-width: 0; }
  .today-metrics .metric { min-height: 132px; }

  /* Plan: program sessions become a real two-column schedule. */
  .view-plan {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .view-plan > .hero,
  .view-plan > .plan-summary,
  .view-plan > .plan-missed,
  .view-plan > .plan-philosophy { grid-column: 1 / -1; }
  .view-plan > .card { margin-bottom: 0; }
  .plan-session { min-height: 190px; display: flex; flex-direction: column; }
  .plan-session .btn { margin-top: auto; }

  /* Health: priorities and foundations use the available width. */
  .view-health .action-stack {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .view-health .health-action {
    grid-template-columns: 42px 1fr;
    padding: 17px;
  }
  .view-health .health-action.top { padding: 16px; }
  .view-health .health-action-icon { width: 42px; height: 42px; }
  .health-pillar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .health-pillar-grid .card { margin-bottom: 0; }

  /* Evidence and settings no longer look like a phone floating on a tablet. */
  .view-evidence {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .view-evidence > .hero,
  .view-evidence > .reviewed-strip,
  .view-evidence > .notice { grid-column: 1 / -1; }
  .view-evidence > .evidence-card { margin-bottom: 0; }

  .view-settings {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .view-settings > .hero,
  .view-settings > .settings-training,
  .view-settings > .schedule-editor { grid-column: 1 / -1; }
  .view-settings > .card { margin-bottom: 0; }

  .health-score { padding: 25px; }
  .health-ring { width: 104px; height: 104px; flex-basis: 104px; }
  .health-ring strong { font-size: 36px; }

  .completion-actions { grid-template-columns: 1fr 1fr; }

  /* Keep focused forms readable even on larger screens. */
  .onboarding-section { max-width: 760px; margin-left: auto; margin-right: auto; }
  .onboarding-progress { max-width: 760px; margin-left: auto; margin-right: auto; }
}

@media (min-width: 900px) {
  /* Landing becomes an editorial two-column introduction. */
  .landing-shell {
    max-width: 1100px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr);
    column-gap: 42px;
    align-items: start;
  }
  .landing-shell > .hero { grid-column: 1; grid-row: 1 / span 2; padding-top: 92px !important; }
  .landing-shell > .landing-preview { grid-column: 2; grid-row: 1; margin-top: 92px; }
  .landing-shell > .card.accent { grid-column: 2; grid-row: 2; align-self: start; }
  .landing-shell > .btn.primary { grid-column: 1; width: min(360px, 100%); margin-top: 12px; }
  .landing-shell > .privacy { grid-column: 1; width: min(360px, 100%); padding-left: 0; padding-right: 0; }
  .landing-shell h1 { font-size: clamp(64px, 7vw, 88px); max-width: 680px; }
  .landing-preview { min-height: 250px; display: flex; flex-direction: column; justify-content: flex-end; }

  .workout-shell { max-width: 1040px; }
  .workout-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .exercise { margin: 0; }
  .workout-hero { max-width: 760px; }
  .workout-finish-card { margin-top: 18px; }
}

@media (min-width: 1100px) {
  /* Desktop app shell: navigation becomes a fixed rail; content becomes a canvas. */
  .app-shell {
    max-width: 1180px;
    padding: 34px 36px 64px 160px;
  }
  .app-shell > .topbar { display: none; }
  .app-shell .view > .hero { padding-top: 12px !important; }

  .bottom-nav {
    top: 28px;
    bottom: auto;
    left: max(24px, calc(50% - 568px));
    transform: none;
    width: 112px;
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 10px;
    border-radius: 28px;
    align-content: start;
  }
  .nav-brand {
    display: grid;
    place-items: center;
    height: 72px;
    margin-bottom: 4px;
    border-radius: 21px;
    background: var(--ink);
    color: white;
    font-size: 23px;
    line-height: 1;
    font-weight: 950;
    letter-spacing: -.07em;
  }
  .nav-brand span { color: var(--accent-2); }
  .nav-btn {
    min-height: 70px;
    padding: 9px 5px;
    font-size: 10px;
  }
  .nav-btn b { font-size: 22px; margin-bottom: 4px; }

  .view-today {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  }
  .view-today .today-primary,
  .view-today .health-focus { min-height: 260px; }
  .today-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .view-health .action-stack { gap: 14px; }
  .view-health .health-action { min-height: 190px; }
  .view-health .health-action h3 { font-size: 22px; }

  .view-evidence { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .evidence-card { min-height: 250px; }

  .workout-shell { max-width: 1120px; padding-left: 42px; padding-right: 42px; }
  .workout-stack { gap: 16px; }
  .exercise { padding: 22px; }
  .workout-finish-card { max-width: 100%; }

  .completion-shell { max-width: 900px; padding-left: 34px; padding-right: 34px; }
  .completion-hero h1 { font-size: 78px; }

  .onboarding-shell { max-width: 900px; padding-left: 40px; padding-right: 40px; }
  .onboarding-actions { width: min(820px, calc(100% - 56px)); }

  .toast { bottom: 28px; }
}

@media (min-width: 1400px) {
  .app-shell { max-width: 1240px; padding-right: 48px; }
  .bottom-nav { left: calc(50% - 598px); }
  .landing-shell { max-width: 1180px; }
}

/* Prevent intrinsic option text from forcing two-column forms wider than phones. */
.grid2 > * { min-width: 0; }
.grid2 .option { min-width: 0; overflow-wrap: anywhere; }

/* V1.8 training setup + nutrition trackers ----------------------------------- */
.grid3 { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.today-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.today-metrics .metric { min-width:0; }
.fuel-status { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:12px 0; }
.fuel-status span { padding:10px 12px; border:1px solid var(--line); border-radius:14px; font-size:12px; color:var(--muted); }
.fuel-status strong { display:block; color:var(--ink); font-size:18px; margin-bottom:2px; }
.health-meals { grid-template-columns:repeat(4,minmax(0,1fr)); }

@media (max-width: 480px) {
  .grid3.setup-options { grid-template-columns:1fr; }
  .today-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .today-metrics .metric:last-child { grid-column:1 / -1; }
  .fuel-status { grid-template-columns:1fr; }
}

@media (min-width: 700px) {
  .view-today {
    grid-template-areas:
      "hero hero"
      "primary health"
      "week week"
      "metrics metrics"
      "protein fibre"
      "recovery recovery"
      "minimum minimum";
  }
  .view-today > .today-fibre { grid-area:fibre; }
}


/* V1.12 legal + privacy layer ----------------------------------------------- */
.legal-links {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:8px 16px;
  margin:28px 0 8px;
  padding:16px 4px 4px;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}
.legal-links a { text-decoration:none; }
.legal-links a:hover, .legal-links a:focus-visible { color:var(--accent); text-decoration:underline; text-underline-offset:3px; }
.legal-links a[aria-current="page"] { color:var(--ink); }
.text-link { color:var(--accent-deep); font-weight:850; text-decoration:none; }
.text-link:hover, .text-link:focus-visible { text-decoration:underline; text-underline-offset:3px; }
.legal-card-links { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.legal-card-links a {
  display:inline-flex; align-items:center; min-height:42px; padding:10px 12px;
  border:1px solid var(--line-strong); border-radius:13px; background:rgba(255,253,248,.75);
  color:var(--ink); font-size:12px; font-weight:900; text-decoration:none;
}
.legal-card-links a:hover, .legal-card-links a:focus-visible { border-color:var(--accent); color:var(--accent-deep); }

.legal-shell {
  width:min(900px, calc(100% - 28px));
  margin:0 auto;
  min-height:100vh;
  padding:env(safe-area-inset-top) 0 calc(54px + env(safe-area-inset-bottom));
}
.legal-header {
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  min-height:74px; padding:10px 2px;
}
.legal-brand { text-decoration:none; color:var(--ink); }
.legal-back {
  display:inline-flex; align-items:center; justify-content:center; min-height:42px; padding:9px 13px;
  border:1px solid var(--line); border-radius:14px; background:rgba(255,253,248,.8);
  color:var(--ink); font-size:13px; font-weight:900; text-decoration:none;
}
.legal-hero { padding:42px 2px 18px; }
.legal-hero h1 { font-size:clamp(48px, 8vw, 82px); max-width:820px; }
.legal-hero p { font-size:16px; }
.language-jump {
  display:inline-flex; gap:6px; padding:5px; margin:8px 0 18px;
  border:1px solid var(--line); border-radius:15px; background:rgba(255,253,248,.72);
}
.language-jump a {
  display:inline-flex; align-items:center; justify-content:center; min-height:38px; padding:8px 13px;
  border-radius:11px; color:var(--ink); font-size:12px; font-weight:900; text-decoration:none;
}
.language-jump a:hover, .language-jump a:focus-visible { background:var(--accent-soft); color:var(--accent-deep); }
.legal-document {
  padding:28px; margin:0 0 18px;
  border:1px solid var(--line); border-radius:var(--radius);
  background:rgba(255,253,248,.92); box-shadow:var(--shadow);
  scroll-margin-top:18px;
}
.legal-document-en { background:rgba(249,246,239,.9); }
.legal-document h2 { font-size:22px; line-height:1.15; letter-spacing:-.03em; margin:30px 0 10px; }
.legal-document h2:first-of-type { margin-top:14px; }
.legal-document p { line-height:1.65; margin:0 0 13px; }
.legal-document a { color:var(--accent-deep); }
.legal-note {
  padding:14px 16px; border:1px solid #dbc4d5; border-radius:15px; background:var(--contrast-soft);
}
.legal-source-note { margin:22px 2px; color:var(--muted); font-size:11px; line-height:1.6; }
.legal-source-note a { color:var(--muted); }

@media (max-width: 520px) {
  .legal-shell { width:min(100% - 24px, 900px); }
  .legal-hero { padding-top:28px; }
  .legal-document { padding:20px 18px; border-radius:22px; }
  .legal-document h2 { font-size:20px; }
  .legal-links { gap:8px 12px; }
}

@media (min-width: 900px) {
  .landing-shell > .legal-links { grid-column:1 / -1; width:100%; }
}
