/* A Moment - interactive emotional self-check-in.
   Cream, charcoal, hairlines; turquoise used only as a signal that seems lit from within.
   Selected text colour --m-deep on white passes AA; the translucent fills sit behind charcoal text. */
.moment-page { background: var(--cream); }
/* display rules below must never beat the hidden attribute */
.moment [hidden] { display: none !important; }
.moment {
  --m-deep: #3d7f79;
  --m-glow: 95, 176, 168;
  --m-line: rgba(27, 26, 23, 0.12);
  position: relative;
  background: radial-gradient(ellipse 70% 60% at 50% 38%, #fcfbf7 0%, var(--cream) 70%);
  padding: calc(var(--header-h) + clamp(24px, 3.5vw, 52px)) 0 clamp(48px, 6vw, 88px);
}
.m-stage {
  width: min(100%, 1320px); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: minmax(190px, 240px) minmax(0, 1fr) minmax(330px, 400px);
  gap: clamp(20px, 3vw, 48px); align-items: start;
}

/* ---------- Intro ---------- */
.m-intro { padding-top: 28px; }
.m-rule { display: block; width: 32px; height: 1px; margin: 18px 0; background: rgba(27, 26, 23, 0.3); }
.m-kicker { margin: 0; font-family: var(--font-ui); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink); }
.m-question { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: clamp(1.7rem, 2.2vw, 2.1rem); line-height: 1.22; color: var(--ink); }
.m-support { margin: 0 0 14px; max-width: 22em; font-family: var(--font-ui); font-size: 0.95rem; line-height: 1.6; color: var(--ink-2); }

/* ---------- Wheel ---------- */
.m-wheel { position: relative; min-width: 0; }
.m-wheel-svg {
  display: block; width: 100%; height: auto; margin: 0 auto; overflow: visible;
  max-height: calc(100vh - var(--header-h) - 48px);
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
.m-halo { fill: rgba(var(--m-glow), 0.09); }
.m-disc { stroke: rgba(27, 26, 23, 0.1); stroke-width: 1; }
.m-rim { fill: none; stroke: rgba(27, 26, 23, 0.06); stroke-width: 1; }
.m-dots circle { fill: rgba(27, 26, 23, 0.2); }
.m-lines line { stroke: rgba(27, 26, 23, 0.15); stroke-width: 1; }
.m-dots, .m-lines { transition: opacity 450ms var(--ease); }
.has-primary .m-dots, .has-primary .m-lines { opacity: 0.55; }

.m-seg, .m-sub { cursor: pointer; outline: none; }
.m-seg-fill {
  fill: rgba(var(--m-glow), 0); stroke: transparent; stroke-width: 1.5;
  transform-box: view-box; transform-origin: 0 0;
  transition: fill 420ms var(--ease), transform 480ms var(--ease), stroke 200ms var(--ease-out);
}
.m-seg:hover .m-seg-fill { fill: rgba(var(--m-glow), 0.09); }
.m-seg:focus-visible .m-seg-fill { fill: rgba(var(--m-glow), 0.12); stroke: var(--m-deep); }
.m-seg.is-selected .m-seg-fill { fill: rgba(var(--m-glow), 0.3); transform: scale(1.035); }
.m-seg-label, .m-sub-label {
  font-family: var(--font-display); font-size: 14px; fill: var(--ink);
  text-anchor: middle; dominant-baseline: central; pointer-events: none;
  transition: opacity 450ms var(--ease);
}
.has-primary .m-seg:not(.is-selected) .m-seg-label { opacity: 0.45; }
.m-seg.is-selected .m-seg-label { font-weight: 600; }

.m-sec {
  opacity: 0; transform: scale(0.93); transform-box: view-box; transform-origin: 0 0; pointer-events: none;
  transition: opacity 460ms var(--ease), transform 520ms var(--ease);
}
.m-sec.is-open { opacity: 1; transform: scale(1); pointer-events: auto; }
.m-sub-fill { fill: rgba(var(--m-glow), 0.14); stroke: rgba(var(--m-glow), 0.55); stroke-width: 1; transition: fill 360ms var(--ease), stroke 200ms var(--ease-out); }
.m-sub:hover .m-sub-fill { fill: rgba(var(--m-glow), 0.22); }
.m-sub:focus-visible .m-sub-fill { stroke: var(--m-deep); stroke-width: 2; }
.m-sub.is-selected .m-sub-fill { fill: rgba(var(--m-glow), 0.38); }
.m-sub-label { font-size: 14.5px; }
.m-sub.is-selected .m-sub-label { font-weight: 600; }
.m-sub-dot { fill: var(--m-deep); opacity: 0; transition: opacity 320ms var(--ease); }
.m-sub.is-selected .m-sub-dot { opacity: 1; }

.m-light { opacity: 0; pointer-events: none; transition: transform 650ms var(--ease), opacity 450ms var(--ease); }
.m-light.is-on { opacity: 1; }
.m-hub-disc { fill: #fdfcf9; stroke: rgba(27, 26, 23, 0.1); stroke-width: 1; }
.m-hub-feel { font-family: var(--font-display); font-style: italic; font-size: 25px; fill: var(--ink); text-anchor: middle; }
.m-hub-cap { font-family: var(--font-ui); font-size: 7px; font-weight: 600; letter-spacing: 0.2em; fill: var(--muted); text-anchor: middle; }

.m-sec-mobile { display: none; }
.m-noscript { text-align: center; font-family: var(--font-ui); color: var(--muted); }

/* ---------- Panel ---------- */
.m-panel { position: relative; min-width: 0; padding: 26px 0 0 clamp(20px, 2.4vw, 36px); border-left: 1px solid var(--m-line); scroll-margin-top: calc(var(--header-h) + 16px); }
.m-eyebrow { display: block; margin: 0 0 10px; padding: 0; font-family: var(--font-ui); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink); }
.m-hint { margin: 0; font-family: var(--font-ui); font-size: 0.95rem; line-height: 1.55; color: var(--muted); }
.m-selected { margin: 0 0 6px; font-family: var(--font-display); font-size: clamp(1.4rem, 1.9vw, 1.8rem); line-height: 1.25; color: var(--ink); }
.m-top { min-height: 76px; }
.m-body { display: flex; align-items: flex-start; gap: 18px; margin-top: 12px; }
.moment:not(.has-body) .m-body { justify-content: center; padding-top: 6px; }
.m-figure { flex: none; width: 100px; transition: width 450ms var(--ease); }
.moment:not(.has-body) .m-figure { width: 128px; }
.m-figure svg { display: block; width: 100%; height: auto; overflow: visible; }
.m-fig-fill { fill: rgba(255, 255, 255, 0.62); }
.m-fig-line { fill: none; stroke: rgba(27, 26, 23, 0.42); stroke-width: 0.9; }
.m-spot { opacity: 0; transition: opacity 480ms var(--ease); }
.m-figure[data-lit="Head"] [data-spot="Head"],
.m-figure[data-lit="Neck"] [data-spot="Neck"],
.m-figure[data-lit="Shoulders"] [data-spot="Shoulders"],
.m-figure[data-lit="Chest"] [data-spot="Chest"],
.m-figure[data-lit="Stomach"] [data-spot="Stomach"],
.m-figure[data-lit="Back"] [data-spot="Back"],
.m-figure[data-lit="Arms"] [data-spot="Arms"],
.m-figure[data-lit="Hands"] [data-spot="Hands"],
.m-figure[data-lit="Hips"] [data-spot="Hips"],
.m-figure[data-lit="Legs"] [data-spot="Legs"],
.m-figure[data-lit="Feet"] [data-spot="Feet"],
.m-figure[data-lit="Somewhere else"] [data-spot="Somewhere else"] { opacity: 1; }
.m-steps { flex: 1; min-width: 0; }
.moment:not(.has-body) .m-steps { display: none; }
.m-step { margin: 0; padding: 0; border: 0; min-width: 0; animation: m-rise 420ms var(--ease) both; }
.m-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.m-choice {
  min-height: 44px; padding: 6px 4px; border-radius: 12px; cursor: pointer;
  border: 1px solid rgba(27, 26, 23, 0.14); background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font-family: var(--font-ui); font-size: 0.82rem; line-height: 1.15; color: var(--ink);
  transition: background 320ms var(--ease), border-color 320ms var(--ease), color 320ms var(--ease), box-shadow 320ms var(--ease);
}
.m-choice:hover { background: rgba(var(--m-glow), 0.12); border-color: rgba(var(--m-glow), 0.5); }
.m-choice.is-selected { background: var(--m-deep); border-color: var(--m-deep); color: #fff; box-shadow: 0 6px 18px rgba(var(--m-glow), 0.32); }
.m-link { margin-top: 12px; padding: 6px 0; border: 0; background: none; cursor: pointer; font-family: var(--font-ui); font-size: 0.85rem; color: var(--sage-dk); text-decoration: underline; text-underline-offset: 3px; }
.m-choice:focus-visible, .m-link:focus-visible, .m-reset:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; }

.m-reflection {
  margin-top: 22px; padding: 20px 22px; border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.66); border: 1px solid rgba(var(--m-glow), 0.35);
  box-shadow: 0 14px 34px rgba(27, 26, 23, 0.06), inset 0 0 40px rgba(var(--m-glow), 0.06);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  animation: m-rise 520ms var(--ease) both;
}
.m-reflection .m-eyebrow::after { content: ""; display: inline-block; width: 28px; height: 1px; margin-left: 12px; vertical-align: middle; background: rgba(27, 26, 23, 0.35); }
.m-refl-1 { margin: 0; font-family: var(--font-display); font-size: 1.06rem; line-height: 1.62; color: var(--ink); }
.m-refl-2 { margin: 14px 0 0; padding-top: 14px; border-top: 1px solid rgba(27, 26, 23, 0.08); font-family: var(--font-ui); font-size: 0.95rem; line-height: 1.6; color: var(--ink-2); }
.m-reset {
  display: block; margin: 18px 0 0 auto; min-height: 44px; padding: 0 22px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(27, 26, 23, 0.32); background: transparent; color: var(--ink);
  font-family: var(--font-ui); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  transition: background 240ms var(--ease-out);
}
.m-reset:hover { background: rgba(27, 26, 23, 0.05); }
.m-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@keyframes m-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Tablet: stacked ---------- */
@media (max-width: 999px) {
  .m-stage { grid-template-columns: 1fr; gap: 8px; }
  .m-intro { padding-top: 0; text-align: center; }
  .m-intro .m-rule { margin: 12px auto; }
  .m-support { margin-left: auto; margin-right: auto; }
  .m-wheel-svg { max-width: 560px; max-height: none; }
  .m-panel { width: 100%; max-width: 560px; margin: 0 auto; padding: 24px 0 0; border-left: 0; border-top: 1px solid var(--m-line); }
}
/* ---------- Phone: re-composed, not shrunk ---------- */
@media (max-width: 640px) {
  .m-question { font-size: 1.5rem; }
  .m-support { font-size: 0.92rem; margin-bottom: 8px; }
  .m-sec { display: none; }
  .m-seg-label { font-size: 17px; }
  .m-hub-feel { font-size: 28px; }
  .m-hub-cap { font-size: 8.5px; }
  .m-sec-mobile:not([hidden]) { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 420px; margin: 4px auto 0; animation: m-rise 420ms var(--ease) both; }
  .m-body { gap: 12px; }
  .m-figure { width: 82px; }
  .moment:not(.has-body) .m-figure { width: 104px; }
  .m-grid { grid-template-columns: repeat(2, 1fr); }
  .m-reset { margin: 18px auto 0; }
}
@media (prefers-reduced-motion: reduce) {
  .m-seg-fill, .m-sec, .m-light, .m-dots, .m-lines, .m-seg-label, .m-sub-fill, .m-sub-dot, .m-spot, .m-figure, .m-choice { transition: none; }
  .m-step, .m-reflection, .m-sec-mobile:not([hidden]) { animation: none; }
  .m-seg.is-selected .m-seg-fill { transform: none; }
  .m-sec { transform: none; }
}
