/* Final design polish. Loaded by site.js so the verified story/3D engine stays untouched. */
body.tme-story[data-story-layout]:not([data-story-layout="desktop"]){--finish-line:#83b79d38;--finish-glow:#26f0b21f}

/* Horizontal narrative rails: make overflow feel intentional rather than clipped. */
body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) :is(.state-selector,.process-selector){
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
  padding-right:34px;
  scroll-padding-inline:8px 42px;
  -webkit-mask-image:linear-gradient(90deg,#000 0,#000 calc(100% - 30px),transparent 100%);
  mask-image:linear-gradient(90deg,#000 0,#000 calc(100% - 30px),transparent 100%);
}
body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) :is(.state-selector,.process-selector)::-webkit-scrollbar{display:none}
body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) .state-selector button{padding-inline:15px;transition:border-color .2s ease,background .2s ease,color .2s ease,transform .2s ease}
body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) .state-selector button[aria-selected="true"]{box-shadow:inset 0 0 0 1px #3cf0b11f,0 8px 26px #0004}
body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) .process-selector button{flex-basis:96px;transition:border-color .2s ease,color .2s ease,background .2s ease}
body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) .process-selector button[aria-selected="true"]{background:linear-gradient(180deg,#0b2419cc,#06110ccc)}

/* Three dimensions: selected field reads as an instrument state, not another card. */
body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) .dimension-choices{gap:8px}
body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) .field-choice{padding:10px 7px;transition:background .22s ease,border-color .22s ease,color .22s ease}
body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) .field-choice.active{background:linear-gradient(180deg,transparent 0,#0a261a78 100%);box-shadow:inset 0 -1px #44efb25c}
body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) .field-choice:not(.active){color:#9cb0a5}
body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) .field-story{position:relative;padding:2px 0 2px 14px;border-left:1px solid #40e8ae80;color:#c7d9cf}

/* Explanations get a single architectural accent instead of a glass card. */
body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) :is(.market-explanation,.process-detail){position:relative;padding-left:15px;border-top-color:var(--finish-line)}
body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) :is(.market-explanation,.process-detail)::before{content:"";position:absolute;left:0;top:17px;bottom:3px;width:1px;background:linear-gradient(#44efb5,transparent);box-shadow:0 0 14px #31e6aa44}
body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) .process-detail::before{top:16px}

/* Profiles: stronger selected state, calmer unselected states. */
body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) .profile-selector{gap:7px}
body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) .profile-selector button{transition:background .22s ease,border-color .22s ease,opacity .22s ease;position:relative}
body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) .profile-selector button:not([aria-selected="true"]){opacity:.74;background:#0307067d}
body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) .profile-selector button[aria-selected="true"]{background:linear-gradient(145deg,#0c3022,#082017);box-shadow:inset 0 0 0 1px #37e9ac1d,0 12px 35px #0004}
body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) .profile-detail{border-top:1px solid var(--finish-line);padding-top:18px}

/* Reading chapters: portrait becomes editorial and calm. The live sculpture continues on tablets/desktop. */
body.tme-story[data-story-layout="stacked"]:not([data-story-layout="desktop"]) .scene-results{
  background:
    linear-gradient(116deg,transparent 0 69%,#39e9aa18 69.15%,#39e9aa18 69.35%,transparent 69.55%),
    radial-gradient(ellipse at 96% 19%,#0c2c201f 0,transparent 38%),
    #030706;
}
body.tme-story[data-story-layout="stacked"]:not([data-story-layout="desktop"]) .scene-people{
  background:
    linear-gradient(62deg,transparent 0 28%,#39e9aa14 28.15%,#39e9aa14 28.35%,transparent 28.55%),
    radial-gradient(ellipse at 2% 15%,#0b2b1e1d 0,transparent 34%),
    #030706;
}
body.tme-story[data-story-layout="stacked"]:not([data-story-layout="desktop"]) .scene-clarity{
  background:
    linear-gradient(116deg,transparent 0 72%,#39e9aa16 72.15%,#39e9aa16 72.35%,transparent 72.55%),
    radial-gradient(ellipse at 97% 18%,#0c2b1f20 0,transparent 36%),
    #030706;
}
body.tme-story[data-story-layout="stacked"]:not([data-story-layout="desktop"]) .scene-results .evidence-record{background:linear-gradient(180deg,#03070670,#030706d5 58%,#030706)}
body.tme-story[data-story-layout="stacked"]:not([data-story-layout="desktop"]) .people-content{background:linear-gradient(90deg,#030706f8,#030706e9 82%,transparent)}
body.tme-story[data-story-layout="stacked"]:not([data-story-layout="desktop"]) .clarity-intro{background:linear-gradient(90deg,#030706f8,#030706e8 84%,transparent)}
body.tme-story[data-story-layout="stacked"]:not([data-story-layout="desktop"]) .clarity-answers{background:#030706f5}

/* Results: the evidence block should feel like the calmest, most trustworthy frame. */
body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) .evidence-record{border-top:1px solid var(--finish-line)}
body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) .evidence-heading .button{border-color:#8fc5a94a;background:#06100bbb}
body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) .evidence-heading .button:hover{border-color:#44eeb0;color:#baffdf}
body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) .evidence-chart{position:relative}
body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) .evidence-chart::before{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,transparent 0 70%,#0b281c24 100%)}

/* People: editorial rhythm and cleaner separation. */
body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) .person{position:relative;border-color:var(--finish-line)}
body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) .person-initials{box-shadow:0 0 0 1px #33e4a517,inset 0 0 18px #21d99b0d}
body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) .people-credit{padding-top:4px;color:#a9beb2}

/* FAQ: stronger hierarchy with less card-like visual weight. */
body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) .story-fee{position:relative;padding-left:18px}
body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) .story-fee::before{content:"";position:absolute;left:0;top:3px;bottom:4px;width:1px;background:linear-gradient(#3beab0,transparent);box-shadow:0 0 14px #31e6aa3b}
body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) .story-faq{border-color:var(--finish-line)}
body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) .story-faq summary{transition:color .18s ease,background .18s ease}
body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) .story-faq summary:hover,body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) .story-faq summary:focus-visible{color:#b8ffdd;background:linear-gradient(90deg,#0a251a55,transparent)}

/* Opening and closing: tiny finishing touches only; keep the approved hero composition. */
body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) .scene-home .actions .button{border-radius:999px}
body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) .scene-closing .button{border-radius:999px;box-shadow:0 12px 36px #11d89518}
body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) .scene-closing{background:radial-gradient(ellipse at 50% 58%,#0a2d2017,transparent 55%)}

@media(max-width:390px){
  body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) .field-choice strong{font-size:16px}
  body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) .field-choice>span:not(.choice-index){font-size:11px}
  body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) .profile-selector button{padding-inline:6px}
  body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) .profile-selector button strong{font-size:14px}
}

@media(prefers-reduced-motion:reduce){
  body.tme-story[data-story-layout]:not([data-story-layout="desktop"]) :is(.field-choice,.state-selector button,.process-selector button,.profile-selector button,.story-faq summary){transition:none}
}
