/* =========================================================================
   QUITER — LAYOUT & COMPONENTS
   Sections: 1 background · 2 shell/nav · 3 landing · 4 forms · 5 checkbox ·
             6 modal · 7 plan forms · 8 dashboard · 9 progress · 10 email
             check-in page · 11 admin · 12 footer/util · 13 responsive
   ========================================================================= */

/* ---------- 1. BACKGROUND VIDEO ---------------------------------------- */
.bg-video {
  position: fixed; inset: 0; z-index: -2; background: #000;
  background-position: 60% 50%; background-size: cover; background-repeat: no-repeat;
}
.bg-video { contain: paint; }   /* the moving video never forces the rest of the page to repaint */
.bg-video video { width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%;
  will-change: transform; backface-visibility: hidden; transform: translate3d(0, 0, 0); }

.bg-video video {
  opacity: 0;
  transition: opacity 350ms ease;
}

.bg-video.is-ready { background-image: none !important; }   /* the poster must not show through (or double up) behind the playing video */
.bg-video.is-ready video {
  opacity: 1;
}

/* The clip's edges are pure black, so sliding it right on wide screens moves the
   flower out from behind the headline without any visible seam. */
@media (min-width: 861px) { .bg-video video { transform: translate3d(17vw, 0, 0); } }
.bg-scrim {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(110% 85% at 62% 42%, rgba(0,0,0,0) 0%, rgba(0,0,0,0.5) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.08) 30%, rgba(0,0,0,0.5) 100%);
}

/* ---------- 2. SHELL / NAV --------------------------------------------- */
.wrap { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-3); }
.page { padding: 7.5rem 0 var(--space-5); min-height: 100vh; }
.page--narrow .wrap { max-width: 760px; }
.page--tiny .wrap { max-width: 560px; }
.page--center { display: flex; align-items: center; justify-content: center; }
.section { padding: var(--space-5) 0; }

.nav {
  position: fixed; top: 14px; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: center; padding: 0 14px; pointer-events: none;
}
.nav__pill {
  pointer-events: auto; width: 100%; max-width: var(--max-width);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-2);
  padding: 0.55rem 0.7rem 0.55rem 1.3rem; border-radius: var(--radius-full);
  background: rgba(10, 10, 16, 0.45);
  -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%);
}
.nav__left { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.nav__mark { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 600; font-size: 1.05rem; letter-spacing: 0.01em; }
.nav__mark svg { width: 22px; height: 22px; flex: none; }
.nav__links { display: flex; align-items: center; gap: 0.3rem; }
.nav__links a { padding: 0.5rem 0.85rem; border-radius: var(--radius-full); color: var(--ink-70); font-size: 0.92rem; transition: color .2s, background .2s; }
.nav__links a:hover, .nav__links a.is-active { color: var(--ink); background: rgba(255,255,255,0.08); }
.nav__right { display: flex; align-items: center; gap: 0.4rem; }
.nav__toggle { display: none; }
.nav__panel { display: none; }

/* ---------- 3. LANDING -------------------------------------------------- */
.hero { min-height: 100svh; display: flex; align-items: flex-end; padding: 8rem 0 12vh; }
.hero__content { max-width: 600px; }
.hero__title { font-size: clamp(2.6rem, 6.4vw, 5rem); }
.hero__title { margin: 0.9rem 0 1.2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }

.section__head { display: flex; flex-direction: column; gap: 0.7rem; margin-bottom: var(--space-4); max-width: 720px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
.card { padding: var(--space-4); border-radius: var(--radius-lg); display: flex; flex-direction: column; gap: 0.7rem; }
.card__index { font-family: var(--font-mono); font-size: 0.82rem; color: var(--accent-teal); }
.card__title { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }
.card p { font-size: 0.97rem; }

/* Plan type picker (Plans page + landing) */
.choice { padding: var(--space-4); border-radius: var(--radius-lg); display: flex; flex-direction: column; gap: 0.8rem;
  min-height: 330px; transition: transform .4s var(--ease-out), background .3s; color: inherit; }
.choice:hover { transform: translateY(-6px); background: rgba(18,18,28,0.55); }
.choice__tag { font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-teal); }
.choice__title { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.choice__list { list-style: none; display: grid; gap: 0.45rem; margin-top: 0.3rem; color: var(--ink-70); font-size: 0.95rem; }
.choice__list li { display: flex; gap: 0.6rem; align-items: baseline; }
.choice__list li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); opacity: .6; flex: none; transform: translateY(-2px); }
.choice__cta { margin-top: auto; padding-top: var(--space-2); display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; }

.cta-band { padding: var(--space-5) var(--space-4); border-radius: var(--radius-lg); text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: var(--space-2); }
.cta-band p { margin: 0 auto; }

/* Scroll reveal (only when JS is running) */
.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- 4. FORMS ---------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 0.45rem; margin-bottom: var(--space-2); }
.field > label { font-size: 0.86rem; font-weight: 500; color: var(--ink-70); display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.field__hint { font-size: 0.8rem; color: var(--ink-40); }
.optional { font-size: 0.72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-40); font-weight: 500; }
.input, .field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number],
.field input[type=time], .field textarea, .field select {
  width: 100%; padding: 0.8rem 1rem; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.06); border: 1px solid var(--line); color: var(--ink);
  transition: border-color .2s, background .2s;
}
.field textarea { min-height: 96px; resize: vertical; }
.field select option { background: #12121a; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: rgba(255,255,255,0.55); background: rgba(255,255,255,0.09); }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-40); }
.field input:disabled { opacity: .55; }
.counter { align-self: flex-end; font-family: var(--font-mono); font-size: 0.74rem; color: var(--ink-40); }
.error { color: var(--accent-ember); font-size: 0.88rem; min-height: 1.2em; margin: 0.3rem 0 var(--space-1); }
.success { color: var(--accent-teal); font-size: 0.9rem; min-height: 1.2em; }

/* Form groups */
.group { padding: var(--space-3); border-radius: var(--radius-lg); margin-bottom: var(--space-2); }
.group__label { font-size: 0.78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-50); margin-bottom: var(--space-2); display: flex; gap: .7rem; align-items: baseline; }

/* Range slider */
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 999px; padding: 0; border: none; cursor: pointer;
  background: linear-gradient(90deg, #fff var(--range-progress, 8%), rgba(255,255,255,0.16) var(--range-progress, 8%)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 5px rgba(255,255,255,.18); border: none; }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: none; box-shadow: 0 0 0 5px rgba(255,255,255,.18); }
.range-head { display: flex; justify-content: space-between; align-items: baseline; }
.range-head output { font-family: var(--font-mono); font-size: 1.1rem; }
.range-labels { display: flex; justify-content: space-between; font-size: .75rem; color: var(--ink-40); }

/* Chips & segmented control (hidden native input + styled span) */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip, .seg label, .presets button { cursor: pointer; }
.chip input, .seg input { position: absolute; opacity: 0; pointer-events: none; }
.chip span, .presets button {
  display: inline-block; padding: .5rem 1rem; border-radius: var(--radius-full); font-size: .88rem; color: var(--ink-70);
  background: rgba(255,255,255,0.06); border: 1px solid var(--line); transition: all .2s;
}
.chip:hover span, .presets button:hover { background: rgba(255,255,255,0.12); color: var(--ink); }
.chip input:checked + span, .presets button.is-active { background: #fff; color: #000; border-color: #fff; font-weight: 600; }
.chip input:focus-visible + span, .seg input:focus-visible + span { outline: 2px solid var(--accent-teal); outline-offset: 2px; }
.chip input:disabled + span { opacity: .4; cursor: not-allowed; }
.presets { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: var(--space-1); }

.seg { display: inline-flex; padding: 4px; border-radius: var(--radius-full); background: rgba(255,255,255,0.07); border: 1px solid var(--line); }
.seg span { display: block; padding: .5rem 1.15rem; border-radius: var(--radius-full); font-size: .88rem; color: var(--ink-70); transition: all .2s; }
.seg input:checked + span { background: #fff; color: #000; font-weight: 600; }

.pick-rows { display: grid; gap: .6rem; }
.custom-ex { display: grid; grid-template-columns: 1fr 140px auto; gap: .5rem; align-items: center; }
.custom-ex input, .custom-ex select { margin: 0; }
.custom-ex {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(7rem, .42fr) 2.75rem;
  align-items: end;
  gap: .6rem;
}

.custom-ex__field {
  display: grid;
  min-width: 0;
  gap: .35rem;
}

.custom-ex__field label {
  color: var(--ink-70);
  font-size: .74rem;
  font-weight: 500;
}

.custom-ex input,
.custom-ex select {
  width: 100%;
  min-width: 0;
  min-height: 2.75rem;
  margin: 0;
  padding: .6rem .75rem;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .045);
  color: var(--ink);
  font-size: 16px;
  color-scheme: dark;
}

.custom-ex input:focus-visible,
.custom-ex select:focus-visible {
  outline: 2px solid var(--accent-violet);
  outline-offset: 2px;
  border-color: rgba(141, 124, 255, .8);
}

.custom-ex input[aria-invalid="true"] {
  border-color: var(--accent-ember);
  box-shadow: 0 0 0 3px rgba(255, 107, 74, .12);
}

.custom-ex__remove {
  min-width: 2.75rem;
  min-height: 2.75rem;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .045);
  color: var(--ink-70);
}

.reminder-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; border-radius: var(--radius-md);
  background: rgba(255,255,255,0.04); border: 1px solid transparent; margin-bottom: .5rem; transition: all .2s; }
.reminder-row.is-selected { border-color: var(--line); background: rgba(255,255,255,0.08); }
.reminder-row input[type=time] { width: auto; padding: .45rem .7rem; border-radius: 10px; background: rgba(255,255,255,0.08); border: 1px solid var(--line); }

/* ---------- 5. CHECKBOX (gradient / black / circle / white check) ------- */
/* Replace the rules inside this block with the original Uiverse CSS if you
   want the exact copy — keep the four selectors/hooks:
   .q-check  .q-check input  .q-check__box  .q-check__label                  */
.q-check { display: inline-flex; align-items: center; gap: .85rem; cursor: pointer; user-select: none; position: relative; }
.q-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.q-check__box {
  position: relative; flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(145deg, #2d2d36 0%, #060608 100%);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.28), inset 0 -3px 6px rgba(0,0,0,.65), 0 0 0 1px rgba(255,255,255,.14);
  transition: background .35s, box-shadow .35s, transform .25s var(--ease-out);
}
.q-check__box::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 7px; height: 14px;
  border: solid #07070b; border-width: 0 2.6px 2.6px 0;
  transform: translate(-50%, -62%) rotate(45deg) scale(0);
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
}
.q-check:hover input:not(:disabled) + .q-check__box { transform: scale(1.07); }
.q-check input:checked + .q-check__box {
  background: linear-gradient(145deg, #ffffff 0%, #aab0c6 100%);
  box-shadow: inset 0 1px 1px #fff, 0 0 24px rgba(180,200,255,.5);
}
.q-check input:checked + .q-check__box::after { transform: translate(-50%, -62%) rotate(45deg) scale(1); }
.q-check input:focus-visible + .q-check__box { outline: 2px solid var(--accent-teal); outline-offset: 3px; }
.q-check input:disabled + .q-check__box { opacity: .6; }
.q-check input:disabled ~ .q-check__label { opacity: .75; cursor: default; }
.q-check__label { font-weight: 500; }
.q-check--lg .q-check__box { width: 42px; height: 42px; }
.q-check--lg .q-check__box::after { width: 10px; height: 20px; border-width: 0 3.4px 3.4px 0; }
.q-check--lg .q-check__label { font-size: 1.05rem; }

/* ---------- 6. MODAL ---------------------------------------------------- */
.modal-overlay { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: var(--space-3);
  background: rgba(0,0,0,0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal-overlay.is-open { display: flex; }
.modal { width: 100%; max-width: 430px; padding: var(--space-4); border-radius: var(--radius-lg); position: relative; }
.modal__close { position: absolute; top: .9rem; right: .9rem; width: 2.4rem; height: 2.4rem; z-index: 2; }
.modal__tabs { display: flex; gap: .4rem; margin-bottom: var(--space-3); }
.modal__tab { padding: .45rem 1rem; border-radius: var(--radius-full); color: var(--ink-50); font-size: .9rem; }
.modal__tab.is-active { background: rgba(255,255,255,0.12); color: var(--ink); }
.modal__submit { width: 100%; margin-top: var(--space-1); }
.modal__link { display: block; text-align: right; font-size: .8rem; color: var(--ink-50); margin-top: .1rem; }
.modal__link:hover { color: var(--ink); }

/* ---------- 7. PLAN FORMS ---------------------------------------------- */
.page-head { display: flex; flex-direction: column; gap: .7rem; margin: var(--space-2) 0 var(--space-4); }
.back { display: inline-flex; align-items: center; gap: .4rem; color: var(--ink-50); font-size: .9rem; }
.back:hover { color: var(--ink); }
.style-opts { display: grid; gap: .6rem; }
.style-opt { display: block; cursor: pointer; }
.style-opt input { position: absolute; opacity: 0; }
.style-opt span { display: block; padding: .8rem 1rem; border-radius: var(--radius-md); border: 1px solid var(--line); background: rgba(255,255,255,0.04); transition: all .2s; }
.style-opt strong { display: block; font-weight: 600; }
.style-opt small { color: var(--ink-50); font-size: .84rem; }
.style-opt input:checked + span { background: rgba(255,255,255,0.13); border-color: rgba(255,255,255,0.6); }
.style-opt input:focus-visible + span { outline: 2px solid var(--accent-teal); outline-offset: 2px; }
.video-opt { display: flex; flex-direction: column; gap: .8rem; align-items: flex-start; }

/* ---------- 8. DASHBOARD ----------------------------------------------- */
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-4); }
.plans { display: grid; gap: var(--space-3); }
.plan { padding: var(--space-4); border-radius: var(--radius-lg); display: flex; flex-direction: column; gap: var(--space-2); transition: box-shadow .5s; }
.plan.is-done { box-shadow: inset 0 1px 1px rgba(255,255,255,.14), 0 18px 50px rgba(0,0,0,.4), 0 0 60px rgba(63,232,201,.14); }
.plan__top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.badge { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; padding: .3rem .7rem; border-radius: var(--radius-full); background: rgba(255,255,255,0.1); color: var(--ink-70); }
.badge--athlete { color: var(--accent-teal); }
.plan__title { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; }
.plan__day { font-family: var(--font-mono); font-size: .82rem; color: var(--ink-50); }
.meter { height: 6px; border-radius: 999px; background: rgba(255,255,255,0.12); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #fff, var(--accent-teal)); transition: width .8s var(--ease-out); }
.plan__stats { display: flex; gap: var(--space-3); flex-wrap: wrap; font-family: var(--font-mono); font-size: .84rem; color: var(--ink-50); }
.plan__stats b { color: var(--ink); font-weight: 500; }
.coach { padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: rgba(255,255,255,0.06); border-left: 2px solid var(--accent-violet); }
.coach__label { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-violet); margin-bottom: .3rem; }
.coach__text { color: var(--ink); font-size: 1.02rem; line-height: 1.6; max-width: none; }
.coach.is-loading .coach__text { color: transparent; background: linear-gradient(90deg, rgba(255,255,255,.08), rgba(255,255,255,.2), rgba(255,255,255,.08)); background-size: 200% 100%; border-radius: 6px; animation: shimmer 1.4s infinite linear; min-height: 1.5em; }
@keyframes shimmer { to { background-position: -200% 0; } }
.today__goal { font-size: 1.05rem; color: var(--ink); max-width: none; }
.today__cue { font-family: var(--font-serif); font-style: italic; font-size: 1.15rem; color: var(--ink-70); }
.ex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .7rem; }
.ex-input { display: flex; flex-direction: column; gap: .3rem; }
.ex-input label { font-size: .8rem; color: var(--ink-70); }
.ex-input div { display: flex; align-items: center; gap: .5rem; }
.ex-input input { width: 100%; padding: .6rem .8rem; border-radius: 10px; background: rgba(255,255,255,0.07); border: 1px solid var(--line); font-family: var(--font-mono); }
.ex-input input:focus { outline: none; border-color: rgba(255,255,255,.55); }
.ex-input span { font-size: .78rem; color: var(--ink-40); min-width: 2.2rem; }
.plan__actions { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap; padding-top: var(--space-1); border-top: 1px solid var(--line); }
.plan__links { display: flex; gap: .4rem; flex-wrap: wrap; }
.empty { padding: var(--space-5) var(--space-4); text-align: center; border-radius: var(--radius-lg); display: flex; flex-direction: column; align-items: center; gap: var(--space-2); }

.dashboard-insights {
  margin-block: 0 1.25rem;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius-lg);
  background: rgba(12, 12, 20, .58);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
}

.dashboard-insights__head,
.insight-plan__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
}

.dashboard-insights__head { margin-bottom: .75rem; }
.dashboard-insights__head .eyebrow {
  margin-bottom: .25rem;
  color: var(--accent-violet);
  font-size: .68rem;
}
.dashboard-insights__caption,
.insight-plan__rate {
  color: var(--ink-50);
  font-size: .75rem;
}
.dashboard-insights__list { display: grid; gap: .75rem; }
.insight-plan { padding: .9rem 0; border-top: 1px solid rgba(255, 255, 255, .1); }
.insight-plan:first-child { padding-top: .2rem; border-top: 0; }
.insight-plan h3 { font-size: .97rem; overflow-wrap: anywhere; }
.insight-plan__rate { white-space: nowrap; font-family: var(--font-mono); }
.insight-plan__text { margin-top: .4rem; font-size: .82rem; line-height: 1.5; }
.insight-chart {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: .45rem;
  padding: .75rem 0 0;
  margin: 0;
  list-style: none;
}
.insight-chart__week {
  display: grid;
  min-width: 0;
  grid-template-rows: 3.75rem auto auto;
  justify-items: center;
  gap: .2rem;
}
.insight-chart__track {
  display: flex;
  align-items: flex-end;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 5px 5px 2px 2px;
  background: rgba(255, 255, 255, .07);
}
.insight-chart__track span {
  display: block;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(180deg, var(--accent-teal), rgba(63, 232, 201, .45));
}
.insight-chart__value { color: var(--ink-70); font: .65rem var(--font-mono); }
.insight-chart__label {
  max-width: 100%;
  overflow: hidden;
  color: var(--ink-40);
  font-size: .58rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* ---------- 9. PROGRESS ------------------------------------------------- */
.progress-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-3); }
.btn--exit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 8.5rem;
  min-height: 2.9rem;
  padding: .7rem 1rem;
  border: 1px solid rgba(255, 107, 74, .36);
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(255, 107, 74, .12), rgba(255, 255, 255, .045));
  color: var(--ink);
  font-size: .84rem;
  font-weight: 500;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 5px 18px rgba(0, 0, 0, .16);
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease,
    box-shadow 180ms ease, transform 180ms ease;
}

.btn--exit:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 107, 74, .58);
  background: linear-gradient(135deg, rgba(255, 107, 74, .17), rgba(255, 255, 255, .07));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 7px 22px rgba(0, 0, 0, .22);
}

.btn--exit:focus-visible {
  outline: 2px solid var(--accent-teal);
  outline-offset: 3px;
}

.btn--exit.is-confirming {
  border-color: rgba(255, 107, 74, .72);
  background: rgba(255, 107, 74, .2);
  color: #ffad99;
}

.btn--exit:disabled {
  cursor: wait;
  opacity: .65;
}
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); margin-bottom: var(--space-3); }
.stat { padding: var(--space-3); border-radius: var(--radius-lg); }
.stat__label { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-50); }
.stat__value { font-family: var(--font-mono); font-size: clamp(1.5rem, 3vw, 2.2rem); margin-top: .3rem; }
.warning { display: flex; gap: .8rem; align-items: flex-start; padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); margin-bottom: var(--space-3);
  background: rgba(255,107,74,0.12); border: 1px solid rgba(255,107,74,0.35); color: #ffb4a3; }
.warning p { color: inherit; font-size: .92rem; }
.panel { padding: var(--space-3); border-radius: var(--radius-lg); margin-bottom: var(--space-3); }
.panel__title { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-50); margin-bottom: var(--space-2); }
.panel__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: var(--space-2); }
.panel__head .panel__title { margin: 0; }

.heatmap { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.heatmap__cell { aspect-ratio: 1; border-radius: 8px; }
.legend { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: var(--space-2); font-size: .8rem; color: var(--ink-50); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .4rem; vertical-align: middle; }

.diagnosis { list-style: none; display: grid; gap: .6rem; }
.diagnosis li { padding: .8rem 1rem; border-radius: var(--radius-md); background: rgba(255,255,255,0.06); border-left: 3px solid var(--ink-40); font-size: .95rem; color: var(--ink); }
.diagnosis li.is-good { border-color: var(--accent-teal); }
.diagnosis li.is-warn { border-color: var(--accent-gold); }
.ex-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--space-2); }
.ex-card { padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: rgba(255,255,255,0.05); }
.ex-card__name { font-weight: 500; }
.ex-card__meta { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: .78rem; color: var(--ink-50); margin-top: .2rem; }
.spark { width: 100%; height: 56px; margin-top: .5rem; overflow: visible; }
.spark polyline { fill: none; stroke: var(--accent-teal); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark circle { fill: #fff; }
.weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 110px; }
.weekdays div { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: .4rem; height: 100%; font-size: .7rem; color: var(--ink-50); }
.weekdays i { display: block; width: 100%; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, #fff, rgba(255,255,255,.35)); min-height: 3px; }

/* Video check-in panel */
.video-state { color: var(--ink-70); font-size: .93rem; margin-bottom: var(--space-2); }
.rec-btn { gap: .6rem; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent-ember); }
.recorder video { width: 100%; max-width: 420px; border-radius: var(--radius-md); background: #000; }
.countdown { margin-top: .6rem; font-family: var(--font-mono); color: var(--accent-ember); }
.recorder__actions { display: flex; gap: .6rem; margin-top: var(--space-2); flex-wrap: wrap; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--space-2); margin-top: var(--space-2); }
.gallery__item video { width: 100%; border-radius: var(--radius-md); background: #000; }
.gallery__item p { font-size: .8rem; margin-top: .3rem; }

/* ---------- 10. EMAIL CHECK-IN LANDING ---------------------------------- */
.result { text-align: center; padding: var(--space-5) var(--space-4); border-radius: var(--radius-lg); display: flex; flex-direction: column; align-items: center; gap: var(--space-2); }
.result__icon { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(145deg, #fff, #aab0c6); box-shadow: 0 0 40px rgba(180,200,255,.45); }
.result__icon svg { width: 36px; height: 36px; stroke: #07070b; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.result__icon--error { background: rgba(255,107,74,.2); box-shadow: none; }
.result__icon--error svg { stroke: var(--accent-ember); }
.result__icon--wait { background: rgba(255,255,255,.1); box-shadow: none; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.08); opacity: .7; } }
.result .mono { font-size: 1.1rem; color: var(--accent-teal); }

/* ---------- 11. ADMIN --------------------------------------------------- */
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-2); }
.admin-card { padding: var(--space-3); border-radius: var(--radius-lg); display: flex; flex-direction: column; gap: .5rem; }
.admin-card__photo { height: 130px; border-radius: var(--radius-md); background: rgba(255,255,255,.06); display: grid; place-items: center; font-size: 2rem; overflow: hidden; }
.admin-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.admin-card__meta { display: flex; justify-content: space-between; font-size: .8rem; color: var(--ink-50); }
.admin-card__row { display: flex; gap: .5rem; margin-top: .4rem; }
.admin-card__row .btn { flex: 1; }
.radio-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.radio-row label { display: flex; align-items: center; gap: .5rem; font-size: .92rem; color: var(--ink); cursor: pointer; }

/* ---------- 12. FOOTER / UTIL ------------------------------------------ */
.footer { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: var(--space-4) var(--space-3); color: var(--ink-40); font-size: .84rem; }
.footer a:hover { color: var(--ink); }
.stack { display: flex; flex-direction: column; gap: var(--space-2); }

/* ---------- 13. RESPONSIVE ---------------------------------------------- */
/* ---------- 13. RESPONSIVE ---------------------------------------------- */
@media (max-width: 860px) {
  .grid-3, .grid-2, .stats { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .nav__links { display: none; }
  .nav__toggle { display: inline-flex; }
  .nav__panel { position: fixed; top: 76px; left: 14px; right: 14px; z-index: 49; padding: .6rem; border-radius: var(--radius-lg); flex-direction: column; gap: .2rem; }
  .nav__panel.is-open { display: flex; }
  .nav__panel a { padding: .9rem 1rem; border-radius: var(--radius-md); font-size: 1rem; color: var(--ink-70); }
  .nav__panel a:hover, .nav__panel a.is-active { background: rgba(255,255,255,.08); color: var(--ink); }
  .hero { align-items: flex-end; padding-bottom: 8vh; }
}
@media (max-width: 560px) {
  :root { --space-4: 1.6rem; --space-5: 3rem; }
  .wrap { padding: 0 1.1rem; }
  .stats { grid-template-columns: 1fr; }
  .stat { display: flex; justify-content: space-between; align-items: center; }
  .stat__value { margin: 0; }
  .nav__pill { padding-left: 1rem; }
  .nav__right .btn--text { display: none; }
  .heatmap { grid-template-columns: repeat(6, 1fr); }
  .custom-ex { grid-template-columns: 1fr 1fr; }
  .custom-ex input[type=text] { grid-column: 1 / -1; }
  .reminder-row { flex-wrap: wrap; }
  .plan { padding: var(--space-3); }
  .modal { padding: var(--space-3); }
  .choice { min-height: 0; }
}

@media (max-width: 760px) {
  .nav {
    top: max(14px, env(safe-area-inset-top, 0px));
    padding-inline: max(14px, env(safe-area-inset-left, 0px))
      max(14px, env(safe-area-inset-right, 0px));
  }

  .progress-head { align-items: flex-start; }
  .plan__top { flex-wrap: wrap; }
  .plan__title { overflow-wrap: anywhere; }
  .plan__actions { align-items: flex-start; flex-direction: column; }
  .plan__links { width: 100%; gap: .35rem .5rem; }
  .plan__links .btn { min-height: 2.75rem; }
  .insight-chart { gap: .3rem; }
  .insight-chart__label { font-size: .52rem; }
  .modal-overlay {
    padding: max(.75rem, env(safe-area-inset-top, 0px))
      max(.75rem, env(safe-area-inset-right, 0px))
      max(.75rem, env(safe-area-inset-bottom, 0px))
      max(.75rem, env(safe-area-inset-left, 0px));
  }
  .modal {
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 1.5rem);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .recorder video { max-height: 60svh; object-fit: contain; }
}

@media (max-width: 560px) {
  .dashboard-insights__head { align-items: flex-start; flex-direction: column; gap: .2rem; }
  .insight-chart { gap: .22rem; }
  .insight-chart__week { grid-template-rows: 3.2rem auto auto; }
  .insight-chart__value { font-size: .6rem; }
  .insight-chart__label { font-size: .54rem; }

  .custom-ex {
    grid-template-columns: minmax(0, 1fr) 2.75rem;
    align-items: stretch;
  }
  .custom-ex__field--metric { grid-column: 1; }
  .custom-ex__remove {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .page { padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px)); }
  .modal { max-height: calc(100dvh - 1rem); }
  .recorder video { max-height: 48svh; }
}

@media (prefers-reduced-motion: reduce) {
  .bg-video video { transition: none; }
}


/* ---------- Ready-made plans on plans.html (added) ---------- */
/* Ready-made plans (created by admins) */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-3); }
.tpl { border-radius: var(--radius-lg); display: flex; flex-direction: column; }
.tpl__photo { height: 150px; background: rgba(255,255,255,0.06) center/cover no-repeat; position: relative; }
.tpl__photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(12,12,20,.85)); }
.tpl__body { padding: var(--space-3); display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.tpl__meta { display: flex; gap: .4rem; flex-wrap: wrap; }
.tpl__meta .badge { white-space: nowrap; }
.tpl__title { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
.tpl__desc { margin-bottom: .6rem; font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tpl .btn { margin-top: auto; }
.modal--wide { max-width: 560px; max-height: 90vh; overflow-y: auto; }
.modal--wide .group { padding: var(--space-2) 0 0; margin: 0 0 var(--space-2); background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: 0; }
.modal--wide .group::before { display: none; }

/* ---------- Phone background: whole flower above the text (added) ---------- */
@media (max-width: 860px) {
  .bg-video { overflow: hidden; background-size: max(180vw, 62svh) auto; background-position: 55.7% 4svh; }
  .bg-video video {
    position: absolute; left: 50%; top: 4svh; transform: translate3d(-52.5%, 0, 0);
    width: max(180vw, 62svh); height: auto; max-width: none; aspect-ratio: 800 / 856; object-fit: fill;
  }
}

/* ===== Update: visible exit button, AI tips, input polish, phone fixes ===== */
.btn--exit {
  min-height: 3rem;
  padding: .75rem 1.3rem;
  border: 1px solid rgba(255, 107, 74, .75);
  background: linear-gradient(135deg, rgba(255, 107, 74, .34), rgba(255, 107, 74, .16));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(255, 107, 74, .12), 0 8px 26px rgba(255, 107, 74, .2);
}
.btn--exit::before { content: '✕'; margin-right: .55rem; font-size: .8em; opacity: .9; }
.btn--exit:hover { border-color: #ff6b4a; background: linear-gradient(135deg, rgba(255, 107, 74, .5), rgba(255, 107, 74, .24)); }
.btn--exit.is-confirming { background: #ff6b4a; border-color: #ff6b4a; color: #1a0a06; }
.plan__links .btn--exit { margin-left: auto; }

.plan__sub { margin-top: -.45rem; color: var(--ink-70); font-size: .92rem; }
.plan [data-tips]:empty { display: none; }
.tips { padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: rgba(255,255,255,.05); border-left: 2px solid var(--accent-teal); }
.tips__label { margin-bottom: .5rem; font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-teal); }
.tips__list { list-style: none; display: grid; gap: .55rem; margin: 0; padding: 0; }
.tip { display: flex; gap: .7rem; align-items: baseline; }
.tip__kind { flex: none; min-width: 4.6rem; padding: .15rem .55rem; border-radius: var(--radius-full); background: rgba(255,255,255,.1); color: var(--ink-70); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; text-align: center; }
.tip__kind--food { color: var(--accent-gold); }
.tip__kind--train { color: var(--accent-teal); }
.tip__kind--recovery { color: var(--accent-violet); }
.tip__text { color: var(--ink); font-size: .93rem; line-height: 1.5; }

/* "Add your own exercise" + hint (these classes were used in the HTML but never styled) */
.custom-exercise-hint { margin-top: .6rem; }
.custom-exercise-add { width: 100%; margin-top: .8rem; justify-content: center; }
.custom-ex__remove { cursor: pointer; transition: color .2s, border-color .2s, background .2s; }
.custom-ex__remove:hover { color: var(--ink); border-color: rgba(255, 107, 74, .6); background: rgba(255, 107, 74, .1); }
.custom-ex input:hover, .custom-ex select:hover { border-color: rgba(255,255,255,.28); }

/* Phones */
.ex-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); }
.tpl-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.modal--wide { max-height: 90dvh; }
html { -webkit-text-size-adjust: 100%; }

@media (max-width: 860px) {
  .page { min-height: 100svh; padding-top: calc(6rem + env(safe-area-inset-top, 0px)); padding-bottom: calc(3rem + env(safe-area-inset-bottom, 0px)); }
  /* 16px stops iOS Safari from zooming the page when an input is focused */
  .field input, .field textarea, .field select, .ex-input input, .input { font-size: 16px; }
}
@media (max-width: 560px) {
  .progress-head .btn--exit { width: 100%; }
  .plan__links .btn--exit { margin-left: 0; width: 100%; }
  .tip { flex-direction: column; gap: .25rem; }
  .dash-head .btn { width: 100%; }
  .group { padding: var(--space-2); }
}

/* ---------- Sign-in: "Remember me" + "Forgot password?" row (added) ---------- */
.modal__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: -.2rem 0 1rem; }
.modal__row .modal__link { display: inline; margin: 0; }
.q-check--sm { gap: .6rem; }
.q-check--sm .q-check__box { width: 22px; height: 22px; }
.q-check--sm .q-check__box::after { width: 5px; height: 10px; border-width: 0 2px 2px 0; }
.q-check--sm .q-check__label { font-size: .88rem; font-weight: 400; color: var(--ink-70); }

/* ==== Dashboard polish v2 (from the Figma design) ==== */
.page--dash .wrap { max-width: 1160px; }

/* two-column plan panel: content left, last-7-days chart right */
.plan { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 0 var(--space-4); align-items: start;
  transition: box-shadow .5s, transform .5s var(--ease-out, cubic-bezier(.22,1,.36,1)); }
.plan:not(:has(.plan__side)) { grid-template-columns: minmax(0, 1fr); }
.plan__main { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.plan:hover:not(.is-done) { transform: translateY(-3px);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.18), 0 24px 60px rgba(0,0,0,.45), 0 0 50px rgba(141,124,255,.12); }

.week { padding: 1.25rem; border-radius: var(--radius-md); background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12); }
.week__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem;
  font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-50); }
.week__head b { font: 400 .8rem var(--font-mono); letter-spacing: 0; color: var(--accent-teal); }
.week__bars { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: .6rem; height: 7.5rem; }
.week__day { display: grid; grid-template-rows: 1fr auto; gap: .4rem; justify-items: center; min-width: 0; }
.week__bar { align-self: end; width: 100%; max-width: 26px; height: 16%; border-radius: 8px; background: rgba(255,255,255,.1);
  transition: height .8s var(--ease-out, cubic-bezier(.22,1,.36,1)), transform .3s var(--ease-out, cubic-bezier(.22,1,.36,1)); }
.week__day.is-done .week__bar { height: 100%; background: linear-gradient(180deg, var(--accent-teal), var(--accent-violet)); box-shadow: 0 0 18px rgba(63,232,201,.18); }
.week__day.is-partial .week__bar { height: 60%; background: linear-gradient(180deg, rgba(63,232,201,.7), rgba(141,124,255,.5)); }
.week__day.is-missed .week__bar { height: 34%; background: rgba(255,107,74,.55); }
.week__day:hover .week__bar { transform: translateY(-3px); }
.week__label { font: .68rem var(--font-mono); color: var(--ink-40); }

/* progress meter: violet to teal with a slow sheen */
.meter { height: 8px; }
.meter > i { position: relative; overflow: hidden; background: linear-gradient(90deg, var(--accent-violet), var(--accent-teal)); }
.meter > i::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  animation: q-sheen 3s var(--ease-out, cubic-bezier(.22,1,.36,1)) infinite; }
@keyframes q-sheen { 60%, 100% { transform: translateX(100%); } }

/* stats + coach box */
.plan__stats { align-items: baseline; gap: 1.75rem; }
.plan__stats b { margin-left: .35rem; font-family: var(--font-sans, 'Inter', sans-serif); font-size: 1.25rem; font-weight: 600; }
.coach { border: 1px solid rgba(255,255,255,.12); border-left: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.05); }
.coach__label { color: var(--accent-teal); }
.coach__text { color: var(--ink-70); }

/* insight cards become glass tiles */
.dashboard-insights__list { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.insight-plan, .insight-plan:first-child { padding: 1.1rem 1.25rem; border: 1px solid rgba(255,255,255,.12); border-radius: 18px; background: rgba(255,255,255,.04);
  transition: transform .4s var(--ease-out, cubic-bezier(.22,1,.36,1)), background .3s, border-color .3s; }
.insight-plan:hover { transform: translateY(-3px); background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.2); }
.insight-chart__track span { background: linear-gradient(180deg, var(--accent-teal), var(--accent-violet)); }

/* plans page: template cards lift and glow on hover */
.js .tpl { transition: opacity .8s var(--ease-out, cubic-bezier(.22,1,.36,1)), transform .5s var(--ease-out, cubic-bezier(.22,1,.36,1)), box-shadow .5s; }
.js .tpl:hover { transform: translateY(-6px);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.2), 0 28px 70px rgba(0,0,0,.5), 0 0 60px rgba(141,124,255,.18); }

@media (max-width: 860px) {
  .plan { grid-template-columns: minmax(0, 1fr); }
  .plan__side { margin-top: var(--space-2); }
}



/* ===== Daily numbers: plan form + dashboard ===== */
.def-hint { margin: -.4rem 0 var(--space-2); }
.def-list, .num-edit__grid { display: grid; gap: .6rem; }
.def-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .6rem .7rem .6rem 1rem; border-radius: var(--radius-md); background: rgba(255,255,255,.05); border: 1px solid var(--line); }
.def-row__name { display: flex; flex-direction: column; min-width: 0; }
.def-row__name span { font-size: .95rem; overflow-wrap: anywhere; }
.def-row__name small { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-40); }
.stepper { display: inline-flex; align-items: center; gap: .35rem; flex-shrink: 0; }
.stepper__btn { width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.08); color: var(--ink); font-size: 1.25rem; line-height: 1; cursor: pointer; transition: background .2s, transform .1s; }
.stepper__btn:hover { background: rgba(255,255,255,.16); }
.stepper__btn:active { transform: scale(.94); }
.stepper__btn:focus-visible { outline: 2px solid var(--accent-teal); outline-offset: 2px; }
.stepper input { width: 4.6rem; height: 2.4rem; padding: 0 .4rem; text-align: center; border-radius: var(--radius-sm); border: 1px solid var(--line); background: rgba(0,0,0,.25); color: var(--ink); font-family: var(--font-mono); font-size: 1rem; -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: none; border-color: rgba(255,255,255,.55); }

.nums { display: grid; gap: .5rem; }
.nums__label { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-50); }
.num-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 0 1.2rem; }
.num-row { display: flex; justify-content: space-between; gap: .6rem; padding: .5rem 0; border-bottom: 1px solid rgba(255,255,255,.08); font-size: .92rem; }
.num-row__name { overflow-wrap: anywhere; }
.num-row__val { font-family: var(--font-mono); white-space: nowrap; }
.num-row__val small { color: var(--ink-40); font-size: .72rem; }
.num-row.is-changed .num-row__val { color: var(--accent-gold); }
.num-edit { display: grid; gap: .7rem; padding-top: var(--space-1); }
.plan.is-editing .q-check { display: none; }
@media (max-width: 560px) {
  .def-row { padding: .55rem .6rem .55rem .85rem; }
  .stepper input { width: 4rem; }
}


/* ==== Off days (athletes) ==== */
.plan__primary { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.btn--off.is-on { color: var(--accent-teal); background: rgba(63,232,201,.12); }
.off-note { max-width: none; padding: .55rem .9rem; border-radius: var(--radius-md); font-size: .88rem; color: var(--ink-70);
  background: rgba(255,255,255,.05); border-left: 2px solid var(--accent-violet); }
.off-note.is-on { color: var(--ink); border-left-color: var(--accent-teal); }
@media (max-width: 760px) { .plan__primary { width: 100%; } .plan__primary .btn { min-height: 2.75rem; } }

/* ==== Home: plans spotlight ==== */
html.is-locked { overflow: hidden; }
.showcase { position: relative; overflow: hidden; }
.showcase__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity .8s ease;
  background: var(--showcase-bg, none) center / cover no-repeat;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 16%, #000 84%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 16%, #000 84%, transparent 100%); }
.showcase__bg::after { content: ''; position: absolute; inset: 0;   /* keeps the cards and text readable on any picture */
  background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.15) 45%, rgba(0,0,0,.55)); }
.showcase.has-bg .showcase__bg { opacity: 1; }
.showcase > .wrap, .showcase > .spot, .showcase > .spot__dots { position: relative; z-index: 1; }

.spot { --card-w: clamp(250px, 70vw, 340px); --card-h: clamp(380px, 58vh, 450px); --gap: 1.25rem; position: relative; }
.spot__track { list-style: none; display: flex; gap: var(--gap); overflow-x: auto; position: relative; padding: 2.5rem 0 3rem;
  scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.spot__track::-webkit-scrollbar { display: none; }
.spot__track::before, .spot__track::after { content: ''; flex: 0 0 max(0px, calc(50% - var(--card-w) / 2 - var(--gap))); }
.spot__item { flex: 0 0 var(--card-w); scroll-snap-align: center;
  --dist: 1;   /* 0 = centred, 1 = a full card away; set by home-plans.js while scrolling */
  opacity: calc(1 - .55 * var(--dist)); transform: scale(calc(1 - .14 * var(--dist)));
  will-change: transform, opacity; backface-visibility: hidden; }

.spot-card { position: relative; display: block; width: 100%; height: var(--card-h); border-radius: var(--radius-lg); text-align: left; cursor: pointer; color: var(--ink);
  -webkit-backdrop-filter: none; backdrop-filter: none; }   /* the photo covers it; skipping blur keeps scrolling smooth */
.spot-card.liquid-glass::before { z-index: 2; }            /* keep the glass hairline above the photo */
.spot-card__photo, .spot-panel__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.spot-card__photo--empty {
  background:
    radial-gradient(120% 90% at 30% 10%, rgba(141,124,255,.45), transparent 60%),
    radial-gradient(100% 80% at 80% 90%, rgba(63,232,201,.3), transparent 60%),
    rgba(255,255,255,.04); }
.spot-card__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 25%, rgba(8,8,14,.92) 100%); }
.spot-card__meta { position: absolute; top: var(--space-2); left: var(--space-2); display: flex; gap: .4rem; flex-wrap: wrap; z-index: 1; }
.spot-card__body { position: absolute; left: 0; right: 0; bottom: 0; padding: var(--space-3); display: flex; flex-direction: column; gap: .5rem; z-index: 1; }
.spot-card__title { font-size: 1.35rem; font-weight: 600; letter-spacing: -.015em; line-height: 1.2; }
.spot-card__tag { font-size: .9rem; color: var(--ink-70); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.spot-card__hint { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-teal); opacity: 0; transition: opacity .4s; }
.spot__item.is-active .spot-card__hint { opacity: 1; }

.spot__arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 3rem; height: 3rem; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.6rem; line-height: 1; color: var(--ink); cursor: pointer; }
.spot__arrow--prev { left: max(.75rem, 3vw); }
.spot__arrow--next { right: max(.75rem, 3vw); }
.spot__arrow:disabled { opacity: .3; cursor: default; }
.spot__dots { display: flex; justify-content: center; gap: .5rem; margin-top: -.5rem; }
.spot__dot { position: relative; width: 8px; height: 8px; padding: 0; border-radius: 999px; background: rgba(255,255,255,.3);
  transition: width .4s var(--ease-out), background .3s; }
.spot__dot::after { content: ''; position: absolute; inset: -10px; }
.spot__dot.is-on { width: 26px; background: #fff; }

/* detail view */
.spot-overlay { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: var(--space-3);
  background: rgba(0,0,0,0); -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0);
  visibility: hidden; pointer-events: none;
  transition: background .5s var(--ease-out), backdrop-filter .5s var(--ease-out), -webkit-backdrop-filter .5s var(--ease-out), visibility 0s .5s; }
.spot-overlay.is-open { visibility: visible; pointer-events: auto; background: rgba(4,4,10,.55);
  -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%); transition-delay: 0s; }
.spot-panel { position: relative; width: min(100%, 980px); height: min(86dvh, 620px); display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); grid-template-rows: minmax(0, 1fr); border-radius: var(--radius-lg); }
.spot-panel__photo { position: relative; min-height: 0; }
.spot-panel__body { min-height: 0; padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); overflow-y: auto; }
.spot-panel__body > * { animation: spot-rise .7s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 70ms + 220ms); }
@keyframes spot-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.spot-panel__close { position: absolute; top: .9rem; right: .9rem; z-index: 3; width: 2.5rem; height: 2.5rem; }
.spot-panel__title { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.spot-panel__identity { font-family: var(--font-serif); font-style: italic; font-size: 1.25rem; color: var(--ink-70); }
.spot-specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin: 0; }
.spot-spec { padding: .7rem .9rem; border-radius: var(--radius-md); background: rgba(255,255,255,.06); border: 1px solid var(--line); }
.spot-spec dt { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-50); }
.spot-spec dd { margin: .15rem 0 0; font-family: var(--font-mono); font-size: .95rem; }
.spot-panel__actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: auto; padding-top: var(--space-1); }

@media (max-width: 860px) { .spot__arrow { display: none; } }
@media (max-width: 760px) {
  .spot-overlay { align-items: end; padding: max(.75rem, env(safe-area-inset-top)) .75rem max(.75rem, env(safe-area-inset-bottom)); }
  .spot-panel { display: block; height: auto; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; }
  .spot-panel__photo { aspect-ratio: 16 / 10; }
  .spot-panel__body { padding: var(--space-3); overflow: visible; }
}


/* =========================================================================
   DASHBOARD v3 + PROGRESS TABS  (append to the very end of layout.css)
   Plan covers, expandable details, tabs, comfortable spacing.
   ========================================================================= */

/* ---- shared: tabs + panes ---- */
.ptabs { display: flex; gap: 2px; width: fit-content; max-width: 100%; padding: 4px; border-radius: var(--radius-full);
  background: rgba(255,255,255,.07); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.ptabs::-webkit-scrollbar { display: none; }
.ptab { flex: none; padding: .5rem 1.15rem; border-radius: var(--radius-full); font-size: .86rem; color: var(--ink-70); white-space: nowrap;
  transition: background .2s, color .2s; }
.ptab:hover { color: var(--ink); }
.ptab.is-active { background: #fff; color: #000; font-weight: 600; }
.ptab:focus-visible { outline: 2px solid var(--accent-teal); outline-offset: 2px; }
.ptabs--page { width: 100%; margin-bottom: var(--space-3); }
.ptabs--page .ptab { flex: 1; text-align: center; }

.ppane, .tab-pane { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2); animation: spot-rise .5s var(--ease-out) both; }
.pane-empty { max-width: none; padding: 1.1rem 1.25rem; border-radius: var(--radius-md); background: rgba(255,255,255,.04);
  border: 1px dashed rgba(255,255,255,.16); font-size: .9rem; color: var(--ink-50); }

/* ---- dashboard: grid of covers ---- */
.dash-hint { margin: -1.5rem 0 var(--space-3); max-width: none; font-size: .92rem; color: var(--ink-50); }
.plans { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); align-items: start; }
.plans > .empty { grid-column: 1 / -1; }

.pcard { border-radius: var(--radius-lg); scroll-margin-top: 6.5rem;
  transition: box-shadow .5s, transform .5s var(--ease-out); }
.pcard.is-open { grid-column: 1 / -1; }
.pcard.is-done { box-shadow: inset 0 1px 1px rgba(255,255,255,.14), 0 18px 50px rgba(0,0,0,.4), 0 0 60px rgba(63,232,201,.14); }
.pcard:not(.is-open):hover { transform: translateY(-4px);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.18), 0 24px 60px rgba(0,0,0,.45), 0 0 50px rgba(141,124,255,.14); }

/* cover */
.pcard__cover { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-3); cursor: pointer; }
.pcard__cover .plan__title { font-size: clamp(1.3rem, 2.2vw, 1.65rem); }
.pcard__cover .plan__sub { margin-top: -.4rem; }
.cover-meta { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.cover-meta .plan__stats { gap: 1.25rem; }

.pill { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .75rem; border-radius: var(--radius-full);
  font-size: .74rem; font-weight: 500; white-space: nowrap; background: rgba(255,255,255,.08); color: var(--ink-70); }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill--done { color: var(--accent-teal); background: rgba(63,232,201,.12); }
.pill--rest { color: var(--accent-violet); background: rgba(141,124,255,.14); }
.pill--todo { color: var(--accent-gold); background: rgba(248,191,64,.12); }

.cover-insight { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; padding: .9rem 1rem;
  border-radius: var(--radius-md); background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.1); }
.cover-insight__copy { min-width: 0; flex: 1; }
.cover-insight__label { font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-violet); margin-bottom: .25rem; }
.cover-insight__text { max-width: none; font-size: .85rem; line-height: 1.5; color: var(--ink-70);
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cover-insight.is-loading .cover-insight__text { display: block; color: transparent; min-height: 2.6em; border-radius: 6px;
  background: linear-gradient(90deg, rgba(255,255,255,.08), rgba(255,255,255,.2), rgba(255,255,255,.08)); background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear; }
.mini-bars { list-style: none; display: grid; grid-template-columns: repeat(8, 6px); gap: 3px; align-items: end; height: 2.4rem; flex: none; }
.mini-bars li { height: 100%; display: flex; align-items: flex-end; border-radius: 3px; overflow: hidden; background: rgba(255,255,255,.07); }
.mini-bars span { display: block; width: 100%; min-height: 2px; border-radius: inherit;
  background: linear-gradient(180deg, var(--accent-teal), var(--accent-violet)); }

.pcard__toggle { display: flex; align-items: center; justify-content: center; gap: .6rem; width: 100%; padding: .7rem 1rem;
  border-radius: var(--radius-full); background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
  font-size: .88rem; font-weight: 500; color: var(--ink); transition: background .25s; }
.pcard__toggle:hover { background: rgba(255,255,255,.13); }
.pcard__chev { width: .5rem; height: .5rem; border: solid currentColor; border-width: 0 2px 2px 0;
  transform: translateY(-2px) rotate(45deg); transition: transform .4s var(--ease-out); }
.pcard.is-open .pcard__chev { transform: translateY(2px) rotate(-135deg); }

/* details: smooth height reveal */
.pcard__details { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .55s var(--ease-out); }
.pcard.is-open .pcard__details { grid-template-rows: 1fr; }
.pcard__details-inner { min-height: 0; overflow: hidden; visibility: hidden; transition: visibility 0s .55s; }
.pcard.is-open .pcard__details-inner { visibility: visible; transition-delay: 0s; }
.pcard__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2); width: 100%; max-width: 900px; margin-inline: auto;
  padding: var(--space-3); border-top: 1px solid var(--line); }
.pcard.is-open .pcard__cover { padding-bottom: var(--space-2); }
.pcard__body .error { margin: 0; min-height: 0; }
.pcard__body .error:empty { display: none; }

.today-actions { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap; padding-top: var(--space-1); }
.pcard.is-editing .q-check { display: none; }

.pcard__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap;
  padding-top: var(--space-2); border-top: 1px solid var(--line); }
.pcard__foot .btn--exit { min-height: 2.6rem; min-width: 0; margin-left: auto; }

/* insights tab */
.ins-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.ins-tile { padding: .8rem 1rem; border-radius: var(--radius-md); background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); }
.ins-tile__label { max-width: none; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-50); }
.ins-tile__value { max-width: none; margin-top: .2rem; font: 500 1.35rem var(--font-mono); color: var(--ink); }
.ins-text { max-width: none; font-size: .92rem; color: var(--ink); }
.ins-chart { padding: 1rem 1.1rem; border-radius: var(--radius-md); background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); }
.ins-chart__title { max-width: none; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-50); }

/* ---- progress page ---- */
.page--prog .h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
.page--prog .stats { margin-bottom: var(--space-3); }
.tab-pane .panel { margin-bottom: 0; }
.tab-pane:not(:has(> :not([hidden])))::before { content: 'Nothing here yet. Check in for a few more days and Blue will fill this in.';
  padding: 1.1rem 1.25rem; border-radius: var(--radius-md); background: rgba(255,255,255,.04);
  border: 1px dashed rgba(255,255,255,.16); font-size: .9rem; color: var(--ink-50); }
.heatmap { gap: 8px; }
.prog-foot { display: flex; justify-content: center; margin-top: var(--space-4); }
.prog-foot .btn--exit { min-width: 12rem; }

/* ---- phones ---- */
@media (max-width: 560px) {
  .dash-hint { margin-top: -1.1rem; }
  .pcard__cover { padding: 1.1rem; }
  .pcard__body { padding: 1.1rem; }
  .ptabs:not(.ptabs--page) { width: 100%; }
  .ptabs:not(.ptabs--page) .ptab { flex: 1; padding-inline: .4rem; }
  .ins-tiles { gap: .4rem; }
  .ins-tile { padding: .65rem .7rem; }
  .ins-tile__value { font-size: 1.1rem; }
  .today-actions { align-items: flex-start; flex-direction: column; }
  .today-actions .plan__primary, .today-actions .plan__links { width: 100%; }
  .pcard__foot .btn--exit { width: 100%; margin-left: 0; }
  .prog-foot .btn--exit { width: 100%; }
}


/* ---------- PWA / iOS standalone (added) ---------- */
:root { --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px); --safe-left: env(safe-area-inset-left, 0px); --safe-right: env(safe-area-inset-right, 0px); }
html { -webkit-tap-highlight-color: transparent; }
body { min-height: 100vh; min-height: 100dvh; padding-left: var(--safe-left); padding-right: var(--safe-right); touch-action: manipulation; }
/* With the black-translucent status bar the page draws UNDER the clock/notch, so keep UI clear of it. */
.nav { top: calc(14px + var(--safe-top)); }
.nav__panel { top: calc(76px + var(--safe-top)); }
.page { padding-top: calc(7.5rem + var(--safe-top)); padding-bottom: calc(var(--space-5) + var(--safe-bottom)); }
.hero { padding-top: calc(8rem + var(--safe-top)); }
.footer { padding-bottom: calc(var(--space-4) + var(--safe-bottom)); }
.modal-overlay { padding-top: calc(var(--space-3) + var(--safe-top)); padding-bottom: calc(var(--space-3) + var(--safe-bottom)); }
/* iOS zooms the page when you focus a field smaller than 16px. */
@media (max-width: 860px) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), select, textarea { font-size: 16px; }
}
/* Installed (standalone) app feel */
.is-standalone body { overscroll-behavior-y: none; -webkit-touch-callout: none; }
.is-standalone .install-hint { display: none; }

.install-hint {
  position: fixed; z-index: 60; left: 14px; right: 14px; top: calc(82px + var(--safe-top));   /* under the nav, so it never covers a button */
  max-width: 480px; margin: 0 auto; padding: .8rem .9rem .8rem 1.1rem; border-radius: var(--radius-lg);
  display: flex; align-items: center; gap: .8rem; opacity: 0; transform: translateY(-12px);
  transition: opacity .4s var(--ease-out), transform .4s var(--ease-out);
}
.install-hint.is-visible { opacity: 1; transform: none; }
.install-hint__text { flex: 1; display: flex; flex-direction: column; font-size: .88rem; line-height: 1.4; color: var(--ink-70); }
.install-hint__text strong { color: var(--ink); font-weight: 600; font-size: .95rem; }
.is-offline > :not(.offline-notice) { display: none; }
.offline-notice { max-width: 560px; margin: 7rem auto 1.5rem; padding: var(--space-3); border-radius: var(--radius-lg); display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; position: relative; z-index: 2; }


/* ==== Dashboard: goal forecast graph ==== */
.dashboard-insights__list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); }
.fc { display: flex; flex-direction: column; gap: .8rem; }
.fc__head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }
.fc__pill { padding: .25rem .65rem; border-radius: var(--radius-full); background: rgba(255,255,255,.1); color: var(--ink-70);
  font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.fc__pill--good { color: var(--accent-teal); background: rgba(63,232,201,.12); }
.fc__pill--warn { color: var(--accent-gold); background: rgba(248,191,64,.12); }
.fc__pill--risk { color: var(--accent-ember); background: rgba(255,107,74,.14); }

.fc__blue { display: flex; gap: .6rem; align-items: baseline; margin: 0; max-width: none; color: var(--ink); font-size: .95rem; line-height: 1.55; }
.fc__blue b { margin-right: .25rem; color: var(--accent-violet); font-weight: 600; }
.fc__dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-violet); box-shadow: 0 0 10px var(--accent-violet); }

.fc__tabs { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; }
.fc__tabs::-webkit-scrollbar { display: none; }
.fc__tab { flex: none; padding: .4rem .85rem; border-radius: var(--radius-full); border: 1px solid var(--line);
  background: rgba(255,255,255,.06); color: var(--ink-70); font-size: .8rem; transition: all .2s; }
.fc__tab:hover { color: var(--ink); background: rgba(255,255,255,.12); }
.fc__tab.is-on { background: #fff; color: #000; border-color: #fff; font-weight: 600; }

.fc__svg { display: block; width: 100%; height: auto; overflow: visible; }
.fc__axes line { stroke: rgba(255,255,255,.08); }
.fc__axes text { fill: var(--ink-40); font: 10px var(--font-mono); }
.fc__ideal { fill: none; stroke: rgba(255,255,255,.3); stroke-width: 1.4; stroke-dasharray: 2 4; }
.fc__area { fill: rgba(63,232,201,.1); stroke: none; }
.fc__actual { fill: none; stroke: var(--accent-teal); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; animation: fc-draw 1.2s var(--ease-out) .1s forwards; }
@keyframes fc-draw { to { stroke-dashoffset: 0; } }
.fc__proj { fill: none; stroke: var(--accent-violet); stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 6 5; }
.fc__band { fill: rgba(141,124,255,.16); stroke: none; }
.fc__goal { stroke: var(--accent-gold); stroke-width: 1.2; stroke-dasharray: 3 4; opacity: .7; }
.fc__goal-t { fill: var(--accent-gold); font: 10px var(--font-mono); }
.fc__today { stroke: rgba(255,255,255,.3); stroke-width: 1; }
.fc__end { fill: var(--accent-violet); stroke: #fff; stroke-width: 1.5; }
.fc__end-t { fill: var(--ink); font: 11px var(--font-mono); }
.fc__pt--done { fill: var(--accent-teal); stroke: #06130f; stroke-width: 1; }
.fc__pt--missed { fill: var(--accent-ember); }
.fc__pt--off { fill: var(--accent-gold); }
.fc__pt--partial, .fc__pt--none { fill: none; stroke: var(--ink-50); stroke-width: 1.5; }

.fc__strip { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 3px; }
.fc__cell { height: 10px; border-radius: 3px; background: rgba(255,255,255,.06); }
.fc__cell--done { background: linear-gradient(180deg, var(--accent-teal), var(--accent-violet)); }
.fc__cell--missed { background: rgba(255,107,74,.65); }
.fc__cell--off { background: rgba(248,191,64,.55); }
.fc__cell--partial { background: rgba(63,232,201,.4); }
.fc__cell--none { background: rgba(255,255,255,.2); }
.fc__cell--today { background: rgba(255,255,255,.12); outline: 1.5px solid #fff; outline-offset: 1px; }

.fc__legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; list-style: none; font-size: .74rem; color: var(--ink-50); }
.fc__legend li { display: flex; align-items: center; gap: .4rem; }
.fc__sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.fc__sw--done { background: var(--accent-teal); }
.fc__sw--missed { background: var(--accent-ember); }
.fc__sw--off { background: var(--accent-gold); }
.fc__sw--proj { background: transparent; border: 1.5px dashed var(--accent-violet); }

.fc__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr)); gap: .6rem; margin: 0; }
.fc__stat { padding: .6rem .8rem; border-radius: var(--radius-md); background: rgba(255,255,255,.05); border: 1px solid var(--line); }
.fc__stat dt { font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-50); }
.fc__stat dd { margin: .15rem 0 0; font: .95rem var(--font-mono); }

/* =========================================================================
   PHONE RESPONSIVE PASS + HOVERS  (append to the very end of layout.css)
   - hovers only on devices that really hover (no sticky hover on touch)
   - touch devices get :active press feedback + 44px tap targets
   - calmer background on inner pages, readable hero, compact stat tiles
   ========================================================================= */

/* ---------- shared transitions for the new hovers ---------- */
.card, .stat, .ex-card, .ins-tile, .spot-spec, .def-row, .style-opt span, .reminder-row, .admin-card {
  transition: transform .4s var(--ease-out), background .3s, border-color .3s, box-shadow .4s var(--ease-out);
}
.btn--solid { transition: transform .25s var(--ease-out), background .25s var(--ease-out), box-shadow .35s var(--ease-out), opacity .2s; }
.spot-card__photo, .spot-panel__img, .tpl__photo { transition: transform .8s var(--ease-out); }
.nav__mark svg { transition: transform .6s var(--ease-out); }
.footer a, .back, .modal__link, .btn--text { transition: color .2s, transform .2s; }
.heatmap__cell { transition: transform .25s var(--ease-out), filter .25s; }

/* revealed cards keep the slow fade-in but get a snappy hover transform */
.js .card[data-reveal].is-visible, .js .choice[data-reveal].is-visible {
  transition: opacity .8s var(--ease-out), transform .45s var(--ease-out), background .3s, border-color .3s, box-shadow .4s var(--ease-out);
}

/* ---------- HOVERS: mouse / trackpad only ---------- */
@media (hover: hover) and (pointer: fine) {
  .card:hover, .stat:hover, .admin-card:hover,
  .js .card[data-reveal].is-visible:hover {
    transform: translateY(-5px);
    background: rgba(18, 18, 28, .55);
    box-shadow: inset 0 1px 1px rgba(255,255,255,.18), 0 24px 60px rgba(0,0,0,.45), 0 0 50px rgba(141,124,255,.14);
  }
  .btn--solid:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(255,255,255,.18); }
  .btn--glass:hover:not(:disabled) { transform: translateY(-2px); background: rgba(255,255,255,.12); }
  .btn--glass:active:not(:disabled), .btn--solid:active:not(:disabled) { transform: scale(.97); }
  .nav__mark:hover svg { transform: rotate(90deg) scale(1.1); }
  .nav__right .btn--text:hover { color: var(--ink); }
  .footer a:hover, .back:hover { transform: translateX(2px); }
  .js .choice[data-reveal].is-visible:hover { transform: translateY(-6px); background: rgba(18,18,28,.55); }
  .choice:hover .choice__cta { gap: .9rem; }
  .choice__cta { transition: gap .3s var(--ease-out); }
  .ex-card:hover, .ins-tile:hover, .spot-spec:hover { transform: translateY(-3px); background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.22); }
  .def-row:hover, .reminder-row:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); }
  .style-opt:hover span { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.3); }
  .heatmap__cell:hover { transform: scale(1.18); filter: brightness(1.25); }
  .tip:hover .tip__kind { background: rgba(255,255,255,.16); }
  .pcard__toggle:hover .pcard__chev { transform: translateY(0) rotate(45deg); }
  .pcard.is-open .pcard__toggle:hover .pcard__chev { transform: translateY(0) rotate(-135deg); }
  .ptab:not(.is-active):hover { background: rgba(255,255,255,.08); }

  /* swiper */
  .spot__item:not(.is-active):hover .spot-card { transform: scale(1.05); }
  .spot-card { transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out); }
  .spot__item.is-active .spot-card:hover { box-shadow: inset 0 1px 1px rgba(255,255,255,.2), 0 28px 70px rgba(0,0,0,.55), 0 0 60px rgba(141,124,255,.22); }
  .spot-card:hover .spot-card__photo { transform: scale(1.06); }
  .spot-card:hover .spot-card__hint { letter-spacing: .2em; }
  .spot-card__hint { transition: opacity .4s, letter-spacing .4s var(--ease-out); }
  .spot__arrow { transition: transform .3s var(--ease-out), background .25s, opacity .25s; }
  .spot__arrow:hover:not(:disabled) { transform: translateY(-50%) scale(1.12); background: rgba(255,255,255,.14); }
  .spot__dot:hover { background: rgba(255,255,255,.6); }
  .tpl:hover .tpl__photo { transform: scale(1.05); }
  .tpl__photo { overflow: hidden; }
  .spot-panel__close:hover { transform: rotate(90deg); }
  .spot-panel__close { transition: transform .35s var(--ease-out), color .25s, background .25s; }
}

/* ---------- TOUCH: no sticky hover, clear press feedback ---------- */
@media (hover: none) {
  .choice:hover, .plan:hover:not(.is-done), .pcard:not(.is-open):hover, .js .tpl:hover, .insight-plan:hover,
  .week__day:hover .week__bar, .btn--exit:hover { transform: none; }
  .choice:hover { background: rgba(12, 12, 20, .42); }
  .card:active, .choice:active, .pcard__cover:active, .tpl:active, .ex-card:active { transform: scale(.985); }
  .spot-card:active { transform: scale(.985); }
  .spot-card { transition: transform .25s var(--ease-out); }
  .btn:active, .icon-btn:active, .ptab:active, .spot__dot:active { opacity: .8; }
}

/* ---------- PHONES (<= 860px) ---------- */
@media (max-width: 860px) {
  /* inner pages: the flower must not fight with the content */
  body:has(.page) .bg-video { opacity: .22; }
  body:has(.page) .bg-scrim {
    background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.35) 40%, rgba(0,0,0,.7) 100%);
  }

  /* home hero: keep the headline legible over the flower stem */
  .hero { min-height: 100svh; padding-bottom: max(6vh, 2rem); }
  .hero__content { position: relative; }
  .hero__content::before {
    content: ''; position: absolute; inset: -2.5rem -.5rem -1rem -.5rem; z-index: -1; pointer-events: none;
    background: radial-gradient(90% 80% at 40% 55%, rgba(0,0,0,.72) 0%, rgba(0,0,0,.45) 55%, rgba(0,0,0,0) 100%);
  }

  /* mobile menu panel eases in */
  .nav__panel.is-open { animation: spot-rise .35s var(--ease-out) both; }
  .nav__toggle { width: 2.75rem; height: 2.75rem; font-size: 1.15rem; }

  /* section rhythm */
  .section { padding: var(--space-4) 0; }
  .section__head { margin-bottom: var(--space-3); }

  /* cards are comfortable to read one-handed */
  .card, .choice { padding: var(--space-3); }
  .choice__title { font-size: clamp(1.45rem, 6vw, 1.9rem); }
  .cta-band { padding: var(--space-4) var(--space-3); }

  /* swiper: bigger, easier targets */
  .spot__track { padding: 1.5rem 0 2rem; }
  .spot__dot { width: 9px; height: 9px; }
  .spot__dot.is-on { width: 28px; }
  .spot-panel__close { width: 2.75rem; height: 2.75rem; }
  .spot-panel__actions .btn { flex: 1 1 100%; min-height: 3rem; }
  .spot-panel__title { font-size: clamp(1.5rem, 6.5vw, 2rem); }

  /* forms */
  .seg { max-width: 100%; flex-wrap: wrap; border-radius: var(--radius-md); }
  .seg span { padding: .55rem 1rem; }
  .group__label { flex-wrap: wrap; }
  .page-head .h2, .page-head h1 { overflow-wrap: anywhere; }
}

/* ---------- SMALL PHONES (<= 560px) ---------- */
@media (max-width: 560px) {
  /* stats: three compact tiles side by side instead of three tall rows */
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
  .stat { display: block; padding: .85rem .6rem; text-align: center; }
  .stat__label { font-size: .6rem; letter-spacing: .1em; }
  .stat__value { margin-top: .25rem; font-size: clamp(1.15rem, 5.5vw, 1.5rem); }

  /* hero buttons stack full width */
  .hero__actions { flex-direction: column; align-items: stretch; gap: .7rem; }
  .hero__actions .btn { width: 100%; min-height: 3.1rem; }
  .cta-band .btn { width: 100%; }

  /* footer */
  .footer { flex-direction: column; align-items: center; text-align: center; gap: .5rem; }

  /* heatmap / week bars breathe */
  .heatmap { gap: 6px; }
  .week { padding: 1rem; }
  .week__bars { gap: .4rem; height: 6.5rem; }

  /* insight tiles + dashboard cover */
  .cover-meta { gap: .5rem; }
  .cover-insight { flex-direction: column; align-items: stretch; }
  .mini-bars { align-self: flex-start; grid-template-columns: repeat(8, 1fr); width: 100%; height: 2rem; }
  .pcard__cover .plan__title { font-size: 1.3rem; }

  /* admin cards go single column */
  .admin-grid { grid-template-columns: 1fr; }
  .admin-card__row { flex-wrap: wrap; }

  /* modal */
  .modal { padding: var(--space-3) 1.2rem; }
  .modal__tabs { margin-bottom: var(--space-2); }
}

/* ---------- VERY SMALL PHONES (<= 360px) ---------- */
@media (max-width: 360px) {
  :root { --space-3: 1.2rem; }
  .wrap { padding: 0 .9rem; }
  .nav__mark span { font-size: .98rem; }
  .nav__pill { padding-left: .8rem; gap: .4rem; }
  .btn { padding: .75rem 1.2rem; }
  .btn--sm { padding: .5rem .8rem; }
  .stat__label { font-size: .56rem; }
  .ptab { padding-inline: .8rem; font-size: .8rem; }
  .stepper input { width: 3.4rem; }
  .spot { --card-w: 78vw; }
}

/* ---------- TOUCH TARGETS (any touch screen) ---------- */
@media (pointer: coarse) {
  .btn--sm { min-height: 2.75rem; }
  .btn { min-height: 2.75rem; }
  .icon-btn { min-width: 2.75rem; min-height: 2.75rem; }
  .ptab { min-height: 2.5rem; }
  .chip span, .presets button { padding: .6rem 1.05rem; }
  .nav__panel a { min-height: 2.9rem; display: flex; align-items: center; }
  .modal__link { padding: .5rem 0; }
}

/* ---------- LANDSCAPE PHONES ---------- */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { min-height: 0; padding: calc(5.5rem + var(--safe-top)) 0 2rem; }
  .section { padding: var(--space-4) 0; }
  .spot { --card-h: clamp(260px, 70vh, 340px); }
  .spot-panel { max-height: 94dvh; }
}

.fc { padding: 1rem 1.1rem; border-radius: var(--radius-md); background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); }
.fc__svg { max-width: 640px; margin-inline: auto; }
.blue-dot { display: inline-block; width: 8px; height: 8px; margin-right: .5rem; border-radius: 50%; vertical-align: middle;
  background: var(--accent-violet); box-shadow: 0 0 10px var(--accent-violet); }
.tips.is-loading .tips__list li { height: 1.1rem; border-radius: 6px; background: linear-gradient(90deg, rgba(255,255,255,.08), rgba(255,255,255,.2), rgba(255,255,255,.08)); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }

/* ---------- 15. NAV FIXES */
.nav__panel { pointer-events: auto; }
.nav__dash { display: none; }
@media (max-width: 860px) {
  .nav__dash { display: inline-flex; }
}

/* ---------- 14. SITE FOOTER (injected by shell.js) ---------------------- */
.site-footer { width: 100%; max-width: var(--max-width); margin: var(--space-5) auto 0; padding: 0 var(--space-3) calc(var(--space-4) + var(--safe-bottom)); }
.site-footer__panel { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: var(--space-4); padding: var(--space-4); border-radius: var(--radius-lg); }
.site-footer__brand { display: flex; flex-direction: column; gap: .9rem; align-items: flex-start; }
.site-footer__brand p { font-size: .95rem; max-width: 34ch; }
.site-footer__col { display: flex; flex-direction: column; gap: .55rem; font-size: .92rem; color: var(--ink-70); }
.site-footer__title { font-size: .8rem; font-weight: 500; letter-spacing: .06em; color: var(--ink-40); margin-bottom: .2rem; }
.site-footer__col a { width: fit-content; transition: color .2s; }
.site-footer__col a:hover { color: var(--ink); }
.site-footer__fine { margin: var(--space-2) auto 0; max-width: none; text-align: center; font-size: .8rem; color: var(--ink-40); }
@media (max-width: 860px) {
  .site-footer__panel { grid-template-columns: 1fr 1fr; padding: var(--space-3); }
  .site-footer__brand { grid-column: 1 / -1; }
}

/* ==== Insights: phone pass ==== */
.dashboard-insights, .fc, .ins-chart, .ins-tile { min-width: 0; }

@media (max-width: 560px) {
  .dashboard-insights { padding: .9rem; }
  .dashboard-insights__list { gap: .75rem; }

  /* graph card */
  .fc, .ins-chart { padding: .8rem .75rem; }
  .fc__blue { font-size: .9rem; }
  .fc__axes text { font-size: 11px; }
  .fc__goal-t { font-size: 11px; }
  .fc__end-t { font-size: 12px; }

  /* graph tabs: edge-to-edge swipe row */
  .fc__tabs {
    margin-inline: -.75rem; padding-inline: .75rem;
    scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
  }
  .fc__tab { min-height: 2.5rem; scroll-snap-align: start; }

  /* legend + stats: compact, 2 columns */
  .fc__legend { gap: .3rem .85rem; font-size: .7rem; }
  .fc__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .fc__stat { padding: .55rem .65rem; }
  .fc__stat dt { font-size: .6rem; letter-spacing: .08em; }
  .fc__stat dd { font-size: .88rem; overflow-wrap: anywhere; }

  /* 3 tiles: labels must not overflow */
  .ins-tile__label { font-size: .56rem; letter-spacing: .06em; overflow-wrap: anywhere; }
  .ins-tile__value { font-size: 1rem; }
  .ins-text { font-size: .88rem; }

  /* weekly bars: 8 columns in ~280px */
  .insight-chart { gap: .2rem; }
  .insight-chart__value { font-size: .54rem; letter-spacing: -.03em; }
  .insight-chart__label { font-size: .5rem; }
}

@media (max-width: 400px) {
  /* show every other date so labels don't collide */
  .insight-chart__week:nth-child(even) .insight-chart__label { visibility: hidden; }
}

/* ==== Site-wide stars (three.js, created by site-gl.js) ==== */
.site-gl { position: fixed; top: 0; left: 0; width: 100%; height: 100%; height: 100lvh;
  z-index: -1; pointer-events: none; opacity: 0; transition: opacity 1.2s ease; }
.site-gl.is-on { opacity: 1; }

/* ==== Phones: lighter blur so the moving video behind glass stays smooth ==== */
@media (max-width: 860px) {
  .liquid-glass { -webkit-backdrop-filter: blur(8px) saturate(125%); backdrop-filter: blur(8px) saturate(125%); }
  .liquid-glass--panel { -webkit-backdrop-filter: blur(12px) saturate(130%); backdrop-filter: blur(12px) saturate(130%); }
  .nav__pill { -webkit-backdrop-filter: blur(12px) saturate(130%); backdrop-filter: blur(12px) saturate(130%); }
  .dashboard-insights { -webkit-backdrop-filter: blur(10px) saturate(125%); backdrop-filter: blur(10px) saturate(125%); }
  .spot-card.liquid-glass { -webkit-backdrop-filter: none; backdrop-filter: none; }
}


/* ==== Insights: phone pass 2 — graph text readable, nothing wider than the card ==== */
@media (max-width: 560px) {
  .fc__axes text { font-size: 15px; }
  .fc__goal-t { font-size: 15px; }
  .fc__end-t { font-size: 16px; }
  .fc__actual { stroke-width: 3.2; }
  .fc__proj { stroke-width: 2.8; }
  .fc__pt--done, .fc__pt--missed, .fc__pt--off, .fc__pt--partial, .fc__pt--none { r: 4.6; }
}


/* ==== Home: frosted-glass layer + side stars after the first screen ==== */
.bg-veil {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: var(--veil, 0); will-change: opacity;
  background:
    linear-gradient(180deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,0) 14%),
    rgba(8, 8, 14, .20);
  -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%);
}


@media (max-width: 860px) {
  .bg-veil { -webkit-backdrop-filter: blur(10px) saturate(140%); backdrop-filter: blur(10px) saturate(140%); }
}
.has-veil .site-gl {
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 16%, rgba(0,0,0,var(--keep, 1)) 34%, rgba(0,0,0,var(--keep, 1)) 66%, #000 84%, #000 100%);
          mask-image: linear-gradient(90deg, #000 0%, #000 16%, rgba(0,0,0,var(--keep, 1)) 34%, rgba(0,0,0,var(--keep, 1)) 66%, #000 84%, #000 100%);
}