
:root {
  color-scheme:dark;
  --bg:#0B0B0F;--base:#100F14;--surface:#15131A;--surface2:#121017;
  --deep-violet:#4A2E63;--violet:#754D9B;--violet-light:#AC82C9;--ivory:#F0EAE1;
  --muted:#AAA2AE;--muted2:#77717D;--gold:#C7A56A;
  --line:rgba(117,77,155,.20);--soft-line:rgba(117,77,155,.12);
  --exiled:#E6505F;--resisted:#EF8433;--accessible:#DDB438;--dependable:#42B77B;--integrated:#5E8FEA;
  --vampire:#9D3F4D;--muse:#3C9A6E;
  --serif:"Iowan Old Style","Palatino Linotype",Palatino,Georgia,serif;
  --sans:Inter,Manrope,Geist,system-ui,-apple-system,"Segoe UI",sans-serif;
}
*{box-sizing:border-box}
html,body{min-width:0;margin:0;min-height:100%;background:var(--bg)}
body{font-family:var(--sans);font-size:13px;color:var(--ivory);background:radial-gradient(ellipse at 77% 5%,rgba(74,46,99,.19),transparent 43%),linear-gradient(180deg,#101016 0%,#0b0b0f 70%)}
button,input,textarea{font:inherit;color:inherit}button{cursor:pointer}input,textarea{outline:none}button:focus-visible,textarea:focus-visible,input:focus-visible{outline:2px solid #A77ACB;outline-offset:2px}button:disabled{cursor:not-allowed}
.app-shell{position:relative;min-height:100vh}
.sidebar{position:fixed;inset:0 auto 0 0;width:218px;z-index:20;border-right:1px solid rgba(117,77,155,.13);background:#0c0b10;padding:25px 16px 17px;display:flex;flex-direction:column}
.brand-lockup{display:flex;gap:10px;align-items:center;padding:0 5px 22px}.brand-mark{width:39px;height:39px;flex:none}.brand-mark svg{width:100%;height:100%;stroke:#684b7c;stroke-width:.85}.brand-mark svg .mark-needle{stroke:var(--gold);fill:rgba(199,165,106,.13)}.brand-title{font-family:var(--serif);font-size:21px;line-height:1.1}.brand-tagline{font-size:8.2px;line-height:1.4;color:#847b88;margin-top:4px;max-width:140px}
.sidebar-nav{display:grid;gap:5px}.nav-link{border:1px solid transparent;border-radius:8px;background:transparent;color:#77717c;min-height:39px;padding:0 10px;display:flex;gap:13px;align-items:center;text-align:left;font-size:11px}.nav-link.selected{background:rgba(74,46,99,.26);border-color:rgba(117,77,155,.2);color:#ebe3ef}.nav-link.disabled{color:#675e6d;cursor:default}.nav-symbol{width:17px;text-align:center;color:#80678f;font-size:15px}
.sidebar-rule{height:1px;background:linear-gradient(90deg,rgba(199,165,106,.32),rgba(117,77,155,.14),transparent);margin:17px 7px 14px}.system-heading{font-size:8px;letter-spacing:.19em;color:#706678;margin:0 9px 10px}.system-row{font-size:9px;color:#7c737f;padding:5px 9px;display:flex;gap:8px;align-items:center}.system-dot{width:5px;height:5px;border-radius:50%;background:var(--violet)}.system-dot.gold{background:var(--gold)}
.sidebar-bottom{margin-top:auto;display:grid;grid-template-columns:1fr 1fr;gap:6px}.utility-button{border:1px solid rgba(117,77,155,.2);color:#93859d;background:rgba(74,46,99,.06);border-radius:7px;font-size:10px;display:flex;justify-content:center;align-items:center;padding:9px 5px;cursor:pointer}.utility-button:hover{border-color:rgba(117,77,155,.46);color:var(--ivory)}
.main{max-width:1500px;margin-left:218px;padding:0 24px 30px;min-height:100vh}.topline{height:40px;display:flex;justify-content:flex-end;align-items:center}.mobile-brand{display:none}.save-status{color:#77717b;font-size:9px;display:flex;align-items:center;gap:7px}.save-status i{width:5px;height:5px;border-radius:50%;background:#84798a}.save-status.pending{color:#b89ec9}.save-status.pending i{background:var(--violet)}
.hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,510px);gap:20px;min-height:121px;padding:8px 2px 22px;align-items:end}.overline{font-size:8px;font-weight:700;letter-spacing:.23em;color:#A17DB5;margin-bottom:6px}h1{font-family:var(--serif);font-size:43px;letter-spacing:-.035em;font-weight:500;line-height:1.04;margin:0}.opening-quote{font-family:var(--serif);font-style:italic;font-size:13px;color:#a99bab;margin:8px 0 0;line-height:1.4;max-width:550px}.legend-wrap{padding-bottom:1px;min-width:0}.legend-heading{text-align:right;font-size:8px;letter-spacing:.20em;color:#947b9f;margin-bottom:9px}.integration-legend{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:center;gap:0;min-width:0}.legend-step{position:relative;display:flex;align-items:center;justify-content:center;gap:5px;color:#A19BA4;font-size:9px;white-space:nowrap;min-width:0}.legend-step+.legend-step:before{content:"";position:absolute;left:-9px;top:50%;height:1px;width:18px;background:rgba(117,77,155,.32)}.legend-pip{background:var(--tone);box-shadow:0 0 10px var(--tone);width:7px;height:7px;border-radius:50%;flex:none}
.primary-grid{display:grid;grid-template-columns:1.045fr .955fr;gap:11px;align-items:stretch}.section-panel{background:linear-gradient(180deg,rgba(24,21,30,.89),rgba(14,13,18,.95));border:1px solid var(--soft-line);border-radius:11px;box-shadow:0 14px 45px rgba(0,0,0,.2);min-width:0}.panel-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;min-height:68px;padding:13px 15px 10px;border-bottom:1px solid rgba(117,77,155,.12)}.panel-heading h2{font-family:var(--serif);font-weight:500;font-size:23px;line-height:1.03;margin:0;color:#E1D8E6}.panel-subtitle{color:#756b7b;font-size:9px;margin-top:5px}.panel-meta{font-size:8px;color:#665e6a;white-space:nowrap}.shadow-legend{display:flex;align-items:center;flex-wrap:wrap;justify-content:flex-end;gap:4px;color:#796c80;font-size:7px;max-width:270px}.shadow-legend span:first-child{color:#8a6b9c;letter-spacing:.08em;width:100%;text-align:right}
.function-list{padding:3px 9px 7px}.function-unit{min-width:0;border-bottom:1px solid rgba(117,77,155,.07)}.function-unit:last-child{border-bottom:0}.function-row{display:grid;grid-template-columns:minmax(133px,1fr) 114px minmax(72px,120px) 25px;align-items:center;gap:8px;padding:6px 6px;min-height:44px;border-radius:6px;cursor:pointer}.function-row:hover,.archetype-card:hover{background:rgba(74,46,99,.065)}.function-row:has(.stage-select:hover){background:transparent}.function-name{min-width:0}.function-name strong{font-size:10px;font-weight:650;color:#e4dce7;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.function-name em{color:#9784a2;font-style:normal;font-weight:500}.function-name small{display:block;font-size:7.5px;color:#655d6b;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-top:2px}
.stage-select{--stage-color:var(--violet);display:flex;align-items:center;justify-content:space-between;width:100%;height:29px;border:1px solid var(--stage-color);border-radius:30px;padding:0 9px;background:color-mix(in srgb,var(--stage-color) 11%,transparent);color:var(--stage-color);font-size:9px;font-weight:700;line-height:1;white-space:nowrap;gap:4px}.stage-select:hover{filter:brightness(1.24)}.stage-select .select-chevron{font-size:10px;font-weight:400;opacity:.7}.progress-shell{background:#25212B;height:6px;width:100%;min-width:0;border-radius:10px;overflow:hidden}.progress-fill{height:100%;border-radius:10px;background:var(--violet);width:0;transition:width .25s ease,background-color .25s ease}.expand-knob{height:24px;width:24px;display:grid;place-items:center;border:1px solid rgba(117,77,155,.27);border-radius:50%;color:#8d789a;background:rgba(74,46,99,.06);font-size:14px;transition:transform .2s ease,color .2s ease}.expand-knob[aria-expanded="true"]{color:var(--gold);border-color:rgba(199,165,106,.38);transform:rotate(180deg)}
.archetype-list{display:grid;gap:8px;padding:9px}.archetype-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;align-items:stretch}.archetype-card{min-width:0;border:1px solid rgba(117,77,155,.15);border-radius:9px;background:rgba(8,8,11,.32);padding:10px 10px 9px;min-height:160px;cursor:pointer;transition:background .18s ease}.archetype-top{display:grid;grid-template-columns:minmax(0,1fr) minmax(95px,108px) 23px;align-items:center;gap:6px}.archetype-name{display:flex;align-items:center;gap:5px;min-width:0}.archetype-glyph{width:20px;height:20px;border-radius:50%;display:grid;place-items:center;background:rgba(74,46,99,.31);color:#bca2cc;font-size:10px;flex:none}.archetype-name strong{font-family:var(--serif);font-size:16px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.archetype-keyline{font-size:7px;color:#6e6273;margin:8px 0 5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.archetype-shadow-head{border-top:1px solid rgba(117,77,155,.13);padding:8px 0 5px;font-size:7px;letter-spacing:.12em;color:#74617f;margin-top:9px}.shadow-row{display:flex;justify-content:space-between;align-items:center;gap:7px;min-height:24px}.shadow-name{color:#b1a5b6;font-size:9px}.intensity{display:flex;align-items:center;gap:4px;flex:none}.clear-intensity{display:grid;place-items:center;font-size:14px;border:0;background:transparent;color:#5b5061;width:18px;height:20px;line-height:1;padding:0;border-radius:3px}.clear-intensity.active{color:#B99BCB}.clear-intensity:hover{color:#c0a2d2}.intensity-pip{background:#302734;width:16px;height:17px;clip-path:polygon(50% 8%,92% 50%,50% 92%,8% 50%);border:0;padding:0;transition:background-color .13s ease,transform .13s ease}.intensity-pip.active{background:#9670AF}.intensity-pip:hover{background:#B08ACA;transform:scale(1.12)}
.archetype-card[data-order="1"]{order:1}.archetype-card[data-order="2"]{order:2}.profile-slot[data-order="1"]{order:3;grid-column:1/-1}.profile-slot[data-order="2"]{order:3;grid-column:1/-1}
.anima-panel{margin-top:11px}.anima-heading{min-height:58px}.anima-horizon{color:#826c90;font-size:8px;white-space:nowrap;letter-spacing:.06em}.anima-horizon span{color:#5d5660;text-transform:none;letter-spacing:0}.anima-steps{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));padding:14px 13px 7px;position:relative;min-width:0}.anima-step{min-width:0;position:relative;display:flex;flex-direction:column;align-items:center;gap:5px;min-height:61px;background:transparent;border:0;color:#756d78;padding:0 2px;cursor:pointer}.anima-step:before{content:"";position:absolute;top:19px;left:0;right:0;height:1px;background:rgba(117,77,155,.33)}.anima-step:first-child:before{left:50%}.anima-step:last-child:before{right:50%}.anima-step.passed:before{background:rgba(117,77,155,.62)}.anima-orb{width:39px;height:39px;border:1px solid #655369;border-radius:50%;background:#16121b;display:grid;place-items:center;position:relative;z-index:1;font-size:18px;line-height:1;filter:grayscale(.38);transition:.16s ease}.anima-step.active .anima-orb{border-color:#BD90D6;background:#362040;box-shadow:0 0 0 3px rgba(117,77,155,.16),0 0 22px rgba(117,77,155,.27);filter:none}.anima-step.passed .anima-orb{border-color:#826295;filter:none}.anima-step:hover .anima-orb{border-color:#A782C2}.anima-step-label{font-size:9px;white-space:nowrap}.anima-step.active .anima-step-label{color:#E0C8EF;font-weight:650}
.anima-dual{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;padding:0 10px 9px}.anima-field{min-width:0;display:grid;grid-template-columns:minmax(135px,200px) minmax(0,1fr);gap:8px;align-items:center;padding:9px 10px;border:1px solid rgba(117,77,155,.15);border-radius:8px;background:rgba(8,8,11,.28)}.vampire-field{border-color:rgba(157,63,77,.43);box-shadow:inset 3px 0 rgba(157,63,77,.45)}.muse-field{border-color:rgba(60,154,110,.38);box-shadow:inset 3px 0 rgba(60,154,110,.4)}.anima-field-head{display:grid;gap:4px}.anima-field-head strong{font-family:var(--serif);font-weight:500;font-size:17px}.vampire-field strong{color:#CD8790}.muse-field strong{color:#80C8A4}.anima-field-head small{color:#786e7b;font-size:8px;line-height:1.35}.anima-field textarea{min-width:0;width:100%;min-height:58px;border:1px solid rgba(117,77,155,.12);border-radius:5px;background:rgba(255,255,255,.025);resize:vertical;padding:8px;color:#C9C1CE;font-size:10px;line-height:1.45}.anima-field textarea:focus{border-color:var(--violet)}.anima-field textarea::placeholder{color:#615769}.anima-expand{text-align:center;padding:0 10px 10px}.expand-action{border:1px solid rgba(117,77,155,.20);border-radius:6px;background:rgba(74,46,99,.11);color:#B89BCB;font-size:9px;padding:8px 14px;display:inline-flex;align-items:center;gap:8px}.expand-action:hover{border-color:rgba(117,77,155,.52)}.expand-chevron{display:inline-block;transition:transform .2s ease;font-size:13px}.expand-action[aria-expanded=true] .expand-chevron{transform:rotate(180deg)}
/* Shared optional journal */
.profile-slot[hidden],.anima-detail-slot[hidden]{display:none!important}.profile-slot{min-width:0}.life-profile{border:1px solid rgba(117,77,155,.31);background:linear-gradient(150deg,#191420,#100e14 65%);border-radius:9px;padding:17px 17px 14px;margin:4px 0 10px;box-shadow:inset 0 1px rgba(199,165,106,.06),0 15px 35px rgba(0,0,0,.22);animation:profile-reveal .23s ease-out both}.archetype-pair .life-profile{margin:1px 0 1px}.anima-detail-slot .life-profile{margin:0 10px 10px}.profile-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.profile-kicker{color:#9B75B3;font-size:8px;letter-spacing:.13em}.profile-title{font-family:var(--serif);font-size:24px;line-height:1.2;font-weight:500;margin:3px 0 0}.profile-close{border:1px solid var(--line);background:transparent;color:#BAA9C4;padding:4px 8px;border-radius:5px;font-size:10px;white-space:nowrap}.profile-close:hover{background:rgba(117,77,155,.13)}.profile-description{margin:11px 0 13px;color:#B8ACBD;font-size:11px;line-height:1.55;max-width:780px}.life-intro{border-bottom:1px solid rgba(117,77,155,.2);padding-bottom:12px}.life-intro-title{font-family:var(--serif);font-size:20px;font-weight:500;margin:0}.life-intro p{margin:4px 0 0;color:#93899B;font-size:10px;line-height:1.45}.journal-half{padding-top:14px}.journal-heading{display:flex;gap:12px;align-items:baseline;padding-bottom:9px}.journal-num{font-family:var(--serif);color:#C7A56A;font-size:19px}.journal-heading h4{font-family:var(--serif);font-size:20px;margin:0;font-weight:500}.journal-header{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:11px;padding:1px 0 7px}.journal-header label{display:block;color:#D1C2DA;font-size:10px;font-weight:650}.journal-header small{display:block;color:#8B7F90;font-size:9px;margin-top:3px}.journal-rows{display:grid;gap:6px}.journal-pair{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 21px;gap:8px;align-items:stretch}.journal-input{min-width:0}.mobile-input-label{display:none}.journal-pair textarea{border:1px solid rgba(117,77,155,.18);border-radius:6px;background:rgba(8,8,11,.49);min-width:0;width:100%;min-height:56px;resize:vertical;padding:9px;color:#D0C6D5;font-size:10px;line-height:1.4}.journal-pair textarea:focus{border-color:rgba(167,122,203,.8);background:rgba(74,46,99,.13)}.journal-pair textarea::placeholder{color:#756a7a}.row-remove{width:20px;align-self:center;height:23px;border:1px solid rgba(117,77,155,.12);border-radius:5px;background:transparent;color:#827489;font-size:13px}.row-remove:hover{color:#dd9cab;border-color:rgba(157,63,77,.6)}.journal-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:8px}.add-row{border:1px solid rgba(117,77,155,.31);border-radius:6px;background:rgba(74,46,99,.15);color:#BBA0CD;font-size:10px;padding:7px 10px}.add-row:hover{border-color:rgba(167,122,203,.64)}.journal-hint{color:#655e6b;font-size:8px}.encounter-action{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;margin-top:17px;border:1px solid rgba(117,77,155,.38);background:linear-gradient(90deg,rgba(117,77,155,.26),rgba(74,46,99,.1));border-radius:7px;color:#E0CEE9;padding:12px 13px;font-size:11px;font-weight:650;text-align:left}.encounter-action:hover{border-color:rgba(167,122,203,.75);background:rgba(117,77,155,.33)}.encounter-note{font-size:8px;color:#6f6278;margin:6px 0 0}
.page-footer{padding:10px 0 0;text-align:center}.footer-rule{height:19px;display:flex;align-items:center;justify-content:center;position:relative}.footer-rule:before{content:"";position:absolute;left:0;right:0;height:1px;background:linear-gradient(90deg,transparent,rgba(199,165,106,.22),transparent)}.footer-glyph{color:var(--gold);background:#0e0c12;font-size:15px;position:relative;z-index:1;padding:0 13px}.page-footer blockquote{font-family:var(--serif);font-size:13px;font-style:italic;color:#978b9d;line-height:1.5;max-width:620px;margin:5px auto 4px}.footer-credit{font-size:8px;color:#796481;letter-spacing:.13em}.footer-technical{display:flex;justify-content:space-between;text-align:left;color:#57505b;font-size:7px;letter-spacing:.06em;margin-top:20px}
.stage-menu{position:fixed;z-index:80;min-width:148px;padding:5px;border:1px solid rgba(117,77,155,.4);border-radius:8px;box-shadow:0 18px 42px rgba(0,0,0,.55);background:rgba(16,13,20,.98);backdrop-filter:blur(10px)}.stage-option{display:flex;align-items:center;gap:8px;background:transparent;border:0;border-radius:5px;width:100%;text-align:left;padding:8px 9px;color:#C6BDCA;font-size:10px}.stage-option:hover{background:rgba(117,77,155,.15)}.menu-pip{width:8px;height:8px;border-radius:50%}.stage-option-current{margin-left:auto;color:var(--gold)}.toast{opacity:0;pointer-events:none;transform:translateY(12px);position:fixed;bottom:20px;right:20px;z-index:90;color:#E6DAEE;background:#22182D;border:1px solid rgba(167,122,203,.42);box-shadow:0 12px 34px #0008;border-radius:8px;padding:12px 15px;font-size:11px;transition:opacity .15s,transform .15s;max-width:min(340px,calc(100vw - 25px))}.toast.show{opacity:1;transform:none}
@keyframes profile-reveal{from{opacity:.15;transform:translateY(-7px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:1170px){.main{padding:0 15px 25px}.sidebar{width:193px;padding:25px 10px 17px}.main{margin-left:193px}.hero{grid-template-columns:1fr;gap:13px;padding-bottom:16px}.legend-wrap{max-width:550px}.legend-heading{text-align:left}.primary-grid{grid-template-columns:1fr}.function-row{grid-template-columns:minmax(160px,1fr) 120px minmax(80px,200px) 25px}.shadow-legend{display:none}.archetype-card{min-height:150px}}
@media(max-width:760px){.sidebar{display:none}.main{margin:0;padding:0 12px 27px}.topline{height:51px;border-bottom:1px solid rgba(117,77,155,.13);justify-content:space-between}.mobile-brand{display:block;font-family:var(--serif);font-size:18px}.mobile-mark{color:var(--gold)}.hero{padding:19px 0 19px;min-height:0}.overline{font-size:8px}h1{font-size:38px}.opening-quote{font-size:13px;max-width:520px}.legend-wrap{width:100%;max-width:none}.legend-heading{font-size:8px;text-align:left}.integration-legend{width:100%}.legend-step{font-size:9px}.legend-step+.legend-step:before{display:none}.function-row{grid-template-columns:minmax(0,1fr) 116px 24px;grid-template-areas:"name stage expand" "bar bar bar";row-gap:7px;min-height:60px;padding:7px 4px}.function-name{grid-area:name}.function-row .stage-select{grid-area:stage}.function-row .progress-shell{grid-area:bar;height:5px}.function-row .expand-knob{grid-area:expand}.archetype-pair{grid-template-columns:1fr;gap:7px}.archetype-card[data-order="1"]{order:1}.profile-slot[data-order="1"]{order:2;grid-column:auto}.archetype-card[data-order="2"]{order:3}.profile-slot[data-order="2"]{order:4;grid-column:auto}.archetype-card{min-height:150px}.shadow-legend{display:none}.anima-field{grid-template-columns:minmax(0,1fr)}.anima-field textarea{min-height:62px}.page-footer{padding-top:13px}}
@media(max-width:510px){.main{padding:0 9px 23px}h1{font-size:33px}.overline{font-size:7px;letter-spacing:.17em}.hero{gap:16px}.integration-legend{gap:1px}.legend-step{flex-direction:column;gap:5px;font-size:8px;letter-spacing:-.025em}.legend-pip{height:8px;width:8px}.panel-heading{padding:11px 12px 10px;min-height:63px}.panel-heading h2{font-size:22px}.panel-subtitle{font-size:9px}.shadow-legend{display:none}.function-name strong{font-size:10px}.function-name small{font-size:7.5px}.archetype-top{grid-template-columns:minmax(0,1fr) minmax(100px,118px) 23px}.anima-horizon{display:none}.anima-steps{padding:14px 5px 8px}.anima-orb{width:34px;height:34px;font-size:17px}.anima-step:before{top:17px}.anima-step-label{font-size:8px}.anima-dual{grid-template-columns:1fr;gap:7px;padding:0 8px 9px}.anima-field{grid-template-columns:minmax(90px,140px) minmax(0,1fr);gap:4px;padding:7px}.anima-field-head strong{font-size:16px}.anima-field textarea{font-size:10px;min-height:62px}.life-profile{padding:13px 10px;margin:4px 0 10px}.anima-detail-slot .life-profile{margin:0 8px 10px}.profile-title{font-size:21px}.profile-description{font-size:10px}.journal-header{gap:6px}.journal-header label{font-size:10px}.journal-header small{font-size:8px;line-height:1.35}.journal-pair{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 18px;gap:5px}.journal-pair textarea{padding:7px 6px;font-size:9px;min-height:73px}.row-remove{width:18px}.journal-hint{font-size:7px}.page-footer blockquote{font-size:12px}.footer-technical{gap:7px;line-height:1.4}}
@media(max-width:355px){.legend-step{font-size:7px}.anima-step-label{font-size:7.2px}.anima-orb{width:31px;height:31px;font-size:15px}.anima-step:before{top:15px}.stage-select{padding:0 6px;font-size:8px}.archetype-name strong{font-size:15px}.shadow-legend{display:none}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:0.01ms!important;transition-duration:0.01ms!important;scroll-behavior:auto!important}}

@media(max-width:510px){
 .journal-header{display:none}
 .journal-pair{grid-template-columns:minmax(0,1fr) 22px;grid-template-areas:"pattern remove" "impact remove";column-gap:7px;row-gap:5px;padding:7px;border:1px solid rgba(117,77,155,.14);border-radius:7px;background:rgba(8,8,11,.18)}
 .journal-input-pattern{grid-area:pattern}.journal-input-impact{grid-area:impact}
 .mobile-input-label{display:block;color:#A78CB7;font-size:9px;font-weight:650;padding:0 0 4px}
 .journal-pair textarea{min-height:56px;font-size:10px;line-height:1.45}
 .row-remove{grid-area:remove;align-self:center;width:21px;height:27px}
}

/* calm touch responses, centered heading, minimal controls */
* { -webkit-tap-highlight-color: transparent; }
.function-row,.archetype-card,.stage-select,.expand-knob,.anima-entry-row { touch-action: manipulation; }
.function-row,.archetype-card { -webkit-user-select:none; user-select:none; }
.life-profile, .life-profile textarea, .anima-note { -webkit-user-select:text;user-select:text; }
.hero { display:flex;flex-direction:column;justify-content:center;align-items:stretch;gap:12px;padding:12px 2px 21px; min-height:0; }
.hero-text { text-align:center;width:100%; }
.hero h1 { text-wrap:balance; }
.opening-quote { max-width:700px;margin:8px auto 0;text-align:center; }
.legend-wrap { width:min(640px,100%);align-self:center; }
.legend-heading { text-align:center; }
.stage-select { justify-content:center; text-align:center; }
.expand-knob { font-family:var(--sans);font-weight:400;line-height:1; font-size:17px; }
.expand-knob[aria-expanded="true"] { transform:none; }
.clear-intensity { width:17px;height:22px;flex:0 0 17px;opacity:0;color:transparent!important; }
.clear-intensity:hover,.clear-intensity:focus-visible { opacity:.22;background:rgba(117,77,155,.35); }
.clear-intensity:focus-visible { outline:2px solid #A77ACB;opacity:.72; }
.anima-heading-actions { display:flex;align-items:center;gap:13px; }
.anima-heading-actions .expand-knob { flex:0 0 25px; }
.anima-field { display:flex;flex-direction:column;align-items:stretch;gap:7px; }
.anima-field-head { display:grid;gap:4px; }
.anima-field-head small { font-size:9px;color:#AFA0B4; }
.anima-field-head p { margin:2px 0 4px;font-size:8.5px;color:#766D7A;line-height:1.4; }
.anima-entry-list { display:grid;gap:6px; }
.anima-entry-row { display:grid;grid-template-columns:minmax(0,1fr) 17px;gap:4px;align-items:center; }
.anima-note { min-width:0;width:100%;min-height:39px;border:1px solid rgba(117,77,155,.12);border-radius:5px;background:rgba(255,255,255,.025);resize:vertical;padding:7px 8px;color:#C9C1CE;font-size:10px;line-height:1.4; }
.anima-note:focus { border-color:var(--violet); }
.anima-note::placeholder { color:#64596c; }
.anima-note-remove { width:17px;height:26px;border:0;background:transparent;color:#6D5A77;font-size:14px; }
.anima-note-remove:hover { color:#D8A0AB; }
.anima-note-add { border:1px solid rgba(117,77,155,.18);border-radius:5px;background:rgba(74,46,99,.08);color:#987EAA;justify-self:start;padding:5px 8px;font-size:8.5px; }
.anima-note-add:hover { border-color:rgba(117,77,155,.5); }
@media(max-width:1170px){ .hero { display:flex;gap:15px; } .legend-wrap{max-width:640px;} .legend-heading{text-align:center;} }
@media(max-width:760px){ .hero{padding:20px 0 18px;} .opening-quote{max-width:560px;} .anima-field{display:flex;flex-direction:column;gap:7px;} }
@media(max-width:510px){ .hero{gap:14px;} .legend-wrap{width:100%;}.anima-field{display:flex;flex-direction:column;gap:7px;} .anima-field-head p{font-size:9px;} .anima-note{min-height:42px;font-size:10px;} }

/* polish */
.mobile-break{display:none}
.panel-heading{position:relative;justify-content:center}
.panel-heading>div:first-child{width:100%;text-align:center}
.panel-heading h2,.panel-subtitle{text-align:center}
.archetype-panel .panel-heading h2{white-space:nowrap}
.shadow-legend{display:none!important}
.anima-heading-actions{position:absolute;right:15px;top:50%;transform:translateY(-50%)}
.anima-horizon{display:none!important}
.archetype-card{cursor:default}
.archetype-card:hover{background:rgba(8,8,11,.32)}
.archetype-shadow-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.archetype-shadow-head .intensity-heading{width:77px;text-align:center;color:#74617f}
.clear-intensity,.clear-intensity.active,.clear-intensity:hover,.clear-intensity:focus,.clear-intensity:focus-visible{opacity:0!important;background:transparent!important;color:transparent!important;outline:none!important;box-shadow:none!important}
.anima-field-head{text-align:center;justify-items:center}
.anima-field-head strong,.anima-field-head small,.anima-field-head p{text-align:center}
/* Colour gradually returns across the Anima relationship ladder. */
.anima-step:nth-child(1) .anima-orb{filter:grayscale(1) saturate(0) brightness(.78);opacity:.62}
.anima-step:nth-child(2) .anima-orb{filter:grayscale(.82) saturate(.45) brightness(.88);opacity:.72}
.anima-step:nth-child(3) .anima-orb{filter:grayscale(.52) saturate(.72) brightness(.96);opacity:.82}
.anima-step:nth-child(4) .anima-orb{filter:grayscale(.22) saturate(.95) brightness(1.02);opacity:.92}
.anima-step:nth-child(5) .anima-orb{filter:grayscale(0) saturate(1.15) brightness(1.06);opacity:1}
.anima-step.active .anima-orb,.anima-step.passed .anima-orb{filter:inherit}
/* Re-apply each stage filter after active/passed state so selection does not reverse the progression. */
.anima-step:nth-child(1).active .anima-orb,.anima-step:nth-child(1).passed .anima-orb{filter:grayscale(1) saturate(0) brightness(.78)}
.anima-step:nth-child(2).active .anima-orb,.anima-step:nth-child(2).passed .anima-orb{filter:grayscale(.82) saturate(.45) brightness(.88)}
.anima-step:nth-child(3).active .anima-orb,.anima-step:nth-child(3).passed .anima-orb{filter:grayscale(.52) saturate(.72) brightness(.96)}
.anima-step:nth-child(4).active .anima-orb,.anima-step:nth-child(4).passed .anima-orb{filter:grayscale(.22) saturate(.95) brightness(1.02)}
.anima-step:nth-child(5).active .anima-orb,.anima-step:nth-child(5).passed .anima-orb{filter:grayscale(0) saturate(1.15) brightness(1.06)}
@media(max-width:510px){
  .mobile-break{display:block}
  .opening-quote{max-width:360px}
  .archetype-panel .panel-heading h2{font-size:21px;white-space:nowrap}
  .anima-heading-actions{right:12px}
  .anima-field-head p{max-width:330px;margin-left:auto;margin-right:auto}
}
/* Stage-specific orb atmosphere: subdued at Disconnected, progressively richer toward Loving. */
.anima-step:nth-child(1) .anima-orb{background:#111115;border-color:#4d4a50}
.anima-step:nth-child(2) .anima-orb{background:#151218;border-color:#5d5562}
.anima-step:nth-child(3) .anima-orb{background:#1c1521;border-color:#705b79}
.anima-step:nth-child(4) .anima-orb{background:#25182d;border-color:#866699}
.anima-step:nth-child(5) .anima-orb{background:#35203d;border-color:#a176ad}
.anima-step:nth-child(1).active .anima-orb{background:#151519;border-color:#77717a}
.anima-step:nth-child(2).active .anima-orb{background:#1a161d;border-color:#7b6e80}
.anima-step:nth-child(3).active .anima-orb{background:#271b2d;border-color:#9a77a5}
.anima-step:nth-child(4).active .anima-orb{background:#31203a;border-color:#ad82bf}
.anima-step:nth-child(5).active .anima-orb{background:#43264a;border-color:#c48ac7}


/* refinements */
/* Antique-gold micro-detailing from the Soul Forge visual identity: sparse calibration accents, still violet-led. */
.section-panel{position:relative;overflow:visible;box-shadow:0 14px 45px rgba(0,0,0,.20),inset 0 1px 0 rgba(199,165,106,.055)}
.section-panel>.panel-heading{background:linear-gradient(90deg,rgba(199,165,106,.018),transparent 18%,transparent 82%,rgba(199,165,106,.018))}
.section-panel>.panel-heading:after{content:"";position:absolute;bottom:-1px;left:50%;width:54px;height:1px;transform:translateX(-50%);background:linear-gradient(90deg,transparent,rgba(199,165,106,.34),transparent);pointer-events:none}
.expand-knob{box-shadow:inset 0 0 0 1px rgba(199,165,106,.02)}
.expand-knob[aria-expanded="true"]{box-shadow:0 0 14px rgba(199,165,106,.08)}

/* Align the visible INTENSITY heading with the three visible diamonds, not the hidden zero target. */
.archetype-shadow-head .intensity-heading{width:56px;text-align:center;margin-left:auto}

/* Anima stage: only the selected icon reveals colour. The rail remains neutral rather than filling left-to-right. */
.anima-step:before,.anima-step.passed:before{background:rgba(117,77,155,.28)!important}
.anima-orb,
.anima-step:nth-child(1) .anima-orb,
.anima-step:nth-child(2) .anima-orb,
.anima-step:nth-child(3) .anima-orb,
.anima-step:nth-child(4) .anima-orb,
.anima-step:nth-child(5) .anima-orb,
.anima-step.passed .anima-orb{
  filter:grayscale(1) saturate(0) brightness(.76)!important;
  opacity:.55;
  background:#141217;
  border-color:#514a55;
  box-shadow:none;
}
.anima-step.active .anima-orb{opacity:1;box-shadow:0 0 0 3px rgba(117,77,155,.13),0 0 20px rgba(117,77,155,.20)}
.anima-step:nth-child(1).active .anima-orb{filter:grayscale(1) saturate(0) brightness(.84)!important;background:#17161a;border-color:#7a747d}
.anima-step:nth-child(2).active .anima-orb{filter:grayscale(.70) saturate(.55) brightness(.92)!important;background:#1b171e;border-color:#827187}
.anima-step:nth-child(3).active .anima-orb{filter:grayscale(.38) saturate(.78) brightness(.98)!important;background:#271b2d;border-color:#9a77a5}
.anima-step:nth-child(4).active .anima-orb{filter:grayscale(.16) saturate(1) brightness(1.02)!important;background:#31203a;border-color:#ad82bf}
.anima-step:nth-child(5).active .anima-orb{filter:grayscale(0) saturate(1.15) brightness(1.06)!important;background:#43264a;border-color:#c48ac7}
.anima-step:not(.active) .anima-step-label{color:#6d6670;font-weight:400}
.anima-step.active .anima-step-label{color:#E0C8EF;font-weight:650;text-shadow:0 0 12px rgba(167,122,203,.18)}

/* Minor mobile polish. */
@media(max-width:510px){
  .archetype-panel .panel-subtitle{max-width:310px;margin-left:auto;margin-right:auto}
  .archetype-shadow-head .intensity-heading{width:56px}
}


/* desktop cognitive descriptor balance + ratified archetype language */
.function-short{
  min-width:0;
  color:#746b79;
  font-size:7.5px;
  letter-spacing:.015em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
@media (min-width:761px){
  .function-row{
    grid-template-columns:minmax(165px,180px) minmax(128px,1fr) 114px minmax(84px,120px) 25px;
    gap:8px;
  }
  .function-name{display:block;min-width:0}
  .function-name strong{min-width:0}
  .function-short{align-self:center}
}
@media (max-width:760px){
  .function-row{
    grid-template-columns:minmax(0,1fr) 116px 24px;
    grid-template-areas:"name stage expand" "descriptor stage expand" "bar bar bar";
    column-gap:8px;
    row-gap:3px;
    min-height:60px;
    padding:7px 4px;
  }
  .function-name{grid-area:name;display:block}
  .function-short{grid-area:descriptor;margin-top:0}
  .function-row .stage-select{grid-area:stage;align-self:center}
  .function-row .progress-shell{grid-area:bar;height:5px;margin-top:4px}
  .function-row .expand-knob{grid-area:expand;align-self:center}
}



/* stacked architecture, wider cognitive instrumentation, desktop-only pairing guides, Alter Egos */
.dashboard-stack{display:grid;grid-template-columns:1fr;gap:11px;align-items:stretch}
.dashboard-stack .section-panel{min-width:0}
.archetype-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:9px}
.archetype-pair{min-width:0}
.function-panel{overflow:visible}
.function-list{padding:4px 12px 8px}
.function-stack-block{position:relative;padding-left:34px}
.function-stack-block + .function-stack-block{border-top:1px solid rgba(117,77,155,.09);margin-top:2px;padding-top:2px}
.stack-bracket{position:absolute;pointer-events:none;opacity:.52;border-left:1px solid rgba(117,77,155,.42);border-top:1px solid rgba(117,77,155,.42);border-bottom:1px solid rgba(117,77,155,.42);border-radius:7px 0 0 7px;width:15px}
.stack-bracket.outer{left:4px;top:10px;bottom:10px}
.stack-bracket.inner{left:15px;top:25%;bottom:25%;width:10px;border-color:rgba(117,77,155,.29)}
.stack-bracket.outer:before,.stack-bracket.outer:after{content:"";position:absolute;left:-2px;width:4px;height:4px;border-radius:50%;background:rgba(199,165,106,.58);box-shadow:0 0 8px rgba(199,165,106,.18)}
.stack-bracket.outer:before{top:-2px}.stack-bracket.outer:after{bottom:-2px}
.function-list.has-function-profile .stack-bracket{opacity:.10}
@media (min-width:761px){
  .function-row{grid-template-columns:minmax(200px,245px) minmax(185px,1fr) 126px minmax(245px,1.45fr) 25px;gap:11px;padding:7px 7px;min-height:46px}
  .function-short{font-size:8px;color:#817685}
  .function-name strong{font-size:10.5px}
  .function-row .progress-shell{height:6px}
}
.alter-body{padding:12px}
.orientation-setup{max-width:770px;margin:2px auto 4px;padding:15px;border:1px solid rgba(117,77,155,.16);border-radius:9px;background:rgba(8,8,11,.30)}
.orientation-kicker{text-align:center;color:#8C6C9E;font-size:7.5px;letter-spacing:.15em;margin-bottom:5px}
.orientation-title{font-family:var(--serif);text-align:center;font-weight:500;font-size:20px;margin:0;color:#DDD3E2}
.orientation-copy{text-align:center;color:#766F7A;font-size:9px;line-height:1.45;margin:5px auto 13px;max-width:590px}
.orientation-controls{display:grid;grid-template-columns:1fr 1fr;gap:9px;max-width:600px;margin:auto}
.orientation-field{display:grid;gap:5px}
.orientation-field label{color:#8B7B93;font-size:8px;letter-spacing:.08em;text-transform:uppercase}
.orientation-select{width:100%;height:36px;border:1px solid rgba(117,77,155,.25);border-radius:8px;background:#111016;color:#D0C7D3;padding:0 10px;font-size:10px;outline:none}
.orientation-select:focus{border-color:#8C63A8;box-shadow:0 0 0 3px rgba(117,77,155,.08)}
.orientation-summary{display:flex;align-items:center;justify-content:center;gap:10px;color:#817687;font-size:9px;margin:1px 0 10px}
.orientation-summary strong{font-family:var(--serif);font-size:18px;font-weight:500;color:#E1D8E6}
.orientation-edit{border:0;background:transparent;color:#9276A4;font-size:8px;padding:3px 4px}
.orientation-edit:hover{color:#C1A5D3}
.alter-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.alter-card{position:relative;min-width:0;border:1px solid rgba(117,77,155,.16);border-radius:9px;background:rgba(8,8,11,.30);padding:12px 11px 10px;display:grid;gap:9px;transition:border-color .16s ease,background .16s ease,transform .16s ease;cursor:pointer}
.alter-card:hover{border-color:rgba(117,77,155,.34);background:rgba(74,46,99,.065)}
.alter-card.selected{border-color:rgba(117,77,155,.55);background:linear-gradient(180deg,rgba(74,46,99,.13),rgba(8,8,11,.34));box-shadow:inset 0 1px 0 rgba(199,165,106,.07),0 0 22px rgba(74,46,99,.08)}
.alter-card.selected:before{content:"";position:absolute;top:-1px;left:50%;transform:translateX(-50%);width:42px;height:1px;background:linear-gradient(90deg,transparent,rgba(199,165,106,.62),transparent)}
.alter-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.alter-type{font-family:var(--serif);font-size:21px;font-weight:500;color:#E4DAE8;letter-spacing:.01em}
.alter-card .stage-select{width:auto;min-width:91px;height:27px;padding:0 10px;font-size:8px}
.alter-stack{font-size:8px;color:#766B7C;letter-spacing:.045em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.alter-hint{text-align:center;color:#625B67;font-size:8px;margin-top:8px}
@media(max-width:1170px){
  .archetype-list{grid-template-columns:1fr}
  .function-row{grid-template-columns:minmax(170px,215px) minmax(145px,1fr) 116px minmax(180px,1.2fr) 25px;gap:9px}
  .alter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
  .function-list{padding:4px 9px 8px}
  .function-stack-block{padding-left:0}
  .stack-bracket{display:none}
  .function-stack-block + .function-stack-block{border-top:1px solid rgba(117,77,155,.07);margin-top:0;padding-top:0}
  .archetype-list{display:block;padding:9px}
  .archetype-pair + .archetype-pair{margin-top:7px}
  .alter-body{padding:9px}
  .alter-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .alter-card{padding:10px 9px}
  .alter-type{font-size:19px}
  .alter-card .stage-select{min-width:85px;padding:0 8px}
  .orientation-controls{grid-template-columns:1fr}
  .orientation-setup{padding:13px 10px}
}
@media(max-width:390px){
  .alter-top{align-items:flex-start;flex-direction:column;gap:6px}
  .alter-card .stage-select{width:100%}
}


/* QA fixes — full-width archetype expansion and exact mobile function layout */
@media (min-width:761px){
  .archetype-list{grid-template-columns:repeat(4,minmax(0,1fr));align-items:start}
  .archetype-list>.archetype-card{order:1}
  .archetype-list>.archetype-profile-slot{order:2;grid-column:1/-1}
}
@media (max-width:760px){
  .function-row{
    grid-template-columns:minmax(0,1fr) 116px 24px;
    grid-template-areas:"name stage expand" "descriptor stage expand" "bar bar bar";
    column-gap:8px;row-gap:3px;min-height:60px;padding:7px 4px;
  }
  .function-name{grid-area:name}.function-short{grid-area:descriptor}.function-row .stage-select{grid-area:stage;align-self:center}.function-row .progress-shell{grid-area:bar;height:5px;margin-top:4px}.function-row .expand-knob{grid-area:expand;align-self:center}
  .archetype-list{display:grid;grid-template-columns:1fr;gap:7px;padding:9px}
  .archetype-list>.archetype-card,.archetype-list>.archetype-profile-slot{order:initial;grid-column:auto}
}

/* tighter function semantics + structural connectors + four-sides instrument */
@media (min-width:761px){
  .function-list{padding:4px 13px 8px}
  .function-stack-block{padding-left:50px}
  .function-row{
    grid-template-columns:minmax(330px,.82fr) 126px minmax(360px,1.28fr) 25px;
    gap:12px;
    padding:7px 7px;
    min-height:46px;
  }
  .function-info{display:flex;align-items:baseline;gap:15px;min-width:0}
  .function-name{flex:0 0 auto;min-width:0}
  .function-name strong{font-size:10.5px}
  .function-short{flex:0 1 auto;min-width:0;font-size:8px;color:#817685;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .function-row .progress-shell{height:6px;min-width:0}
  .stack-connectors{display:block;position:absolute;left:1px;top:4px;width:47px;height:184px;overflow:visible;pointer-events:none;opacity:.88;transition:opacity .15s ease}
  .connector-line{fill:none;stroke:rgba(117,77,155,.62);stroke-width:1.25;vector-effect:non-scaling-stroke;filter:drop-shadow(0 0 3px rgba(74,46,99,.22))}
  .connector-inner{stroke:rgba(117,77,155,.48)}
  .connector-terminal{fill:var(--gold);opacity:.72;filter:drop-shadow(0 0 3px rgba(199,165,106,.22))}
  .connector-node{fill:#8B69A0;opacity:.9}
  .function-list.has-function-profile .stack-connectors{opacity:0}
}
@media (min-width:761px) and (max-width:1170px){
  .function-row{grid-template-columns:minmax(285px,.82fr) 116px minmax(270px,1.2fr) 25px;gap:10px}
  .function-info{gap:11px}
  .function-stack-block{padding-left:46px}
  .stack-connectors{width:43px}
}
@media (max-width:760px){
  .function-info{grid-area:info;display:grid;gap:2px;min-width:0}
  .function-row{grid-template-columns:minmax(0,1fr) 116px 24px;grid-template-areas:"info stage expand" "bar bar bar";column-gap:8px;row-gap:3px;min-height:60px;padding:7px 4px}
  .function-name,.function-short{grid-area:auto}
  .function-short{margin-top:0}
  .stack-connectors{display:none}
}

.alter-grid{
  position:relative;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:0;
  overflow:hidden;
  border:1px solid rgba(117,77,155,.24);
  border-radius:12px;
  background:linear-gradient(180deg,rgba(15,13,19,.78),rgba(8,8,11,.43));
  box-shadow:inset 0 1px 0 rgba(199,165,106,.025);
}
.alter-card{
  position:relative;
  min-width:0;
  border:0;
  border-radius:0;
  background:rgba(8,8,11,.19);
  padding:13px 14px 12px;
  display:grid;
  gap:10px;
  transition:background .16s ease,box-shadow .16s ease;
  cursor:pointer;
}
.alter-card:nth-child(1),.alter-card:nth-child(3){border-right:1px solid rgba(117,77,155,.18)}
.alter-card:nth-child(1),.alter-card:nth-child(2){border-bottom:1px solid rgba(117,77,155,.18)}
.alter-card:hover{background:rgba(74,46,99,.055)}
.alter-card.selected{
  border-color:rgba(117,77,155,.18);
  background:radial-gradient(circle at 50% 0%,rgba(117,77,155,.16),transparent 70%),rgba(74,46,99,.055);
  box-shadow:inset 0 0 0 1px rgba(117,77,155,.36),inset 0 1px 0 rgba(199,165,106,.06);
}
.alter-card.selected:before{content:"";position:absolute;top:0;left:50%;transform:translateX(-50%);width:48px;height:1px;background:linear-gradient(90deg,transparent,rgba(199,165,106,.72),transparent)}
.alter-top{display:flex;align-items:center;justify-content:space-between;gap:10px}
.alter-type{font-family:var(--serif);font-size:23px;font-weight:500;color:#E4DAE8;letter-spacing:.015em}
.alter-card .stage-select{width:auto;min-width:98px;height:28px;padding:0 10px;font-size:8px}
.alter-stack{display:grid;gap:4px;min-width:0}
.alter-function-row{display:grid;grid-template-columns:29px minmax(0,1fr);align-items:center;gap:8px;min-height:24px;padding:2px 0;border-bottom:1px solid rgba(117,77,155,.055)}
.alter-function-row:last-child{border-bottom:0}
.alter-function-code{font-weight:760;font-size:10px;letter-spacing:.035em;color:var(--function-tone);text-shadow:0 0 8px color-mix(in srgb,var(--function-tone) 32%, transparent)}
.alter-function-name{font-size:8px;color:#817884;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.alter-coupling-node{position:absolute;z-index:4;left:50%;top:50%;transform:translate(-50%,-50%);width:17px;height:17px;border-radius:50%;border:1px solid rgba(117,77,155,.44);background:#100E14;box-shadow:0 0 0 4px rgba(11,11,15,.92),0 0 15px rgba(74,46,99,.22);pointer-events:none}
.alter-coupling-node:before{content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:4px;height:4px;border-radius:50%;background:rgba(199,165,106,.72);box-shadow:0 0 6px rgba(199,165,106,.28)}
.alter-hint{text-align:center;color:#625B67;font-size:8px;margin-top:9px}
@media(max-width:760px){
  .alter-body{padding:9px}
  .alter-grid{grid-template-columns:repeat(2,minmax(0,1fr));border-radius:10px}
  .alter-card{padding:10px 9px 9px;gap:8px}
  .alter-type{font-size:19px}
  .alter-card .stage-select{min-width:78px;height:26px;padding:0 7px;font-size:7.5px}
  .alter-function-row{grid-template-columns:24px minmax(0,1fr);gap:5px;min-height:22px}
  .alter-function-code{font-size:9px}
  .alter-function-name{font-size:7px}
  .alter-coupling-node{width:14px;height:14px;box-shadow:0 0 0 3px rgba(11,11,15,.92),0 0 12px rgba(74,46,99,.18)}
}
@media(max-width:390px){
  .alter-top{align-items:flex-start;flex-direction:column;gap:5px}
  .alter-card .stage-select{width:100%}
  .alter-function-name{font-size:6.8px}
}


/* restore archetype depth, stabilize cognitive order, and use Alter Ego selection as reflective focus */

/* Major Archetypes return to the spacious 2×2 desktop arrangement. */
.archetype-list{display:grid;grid-template-columns:1fr;gap:8px;padding:9px}
.archetype-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;align-items:stretch;min-width:0}
.archetype-card{min-height:160px}
.archetype-card[data-order="1"]{order:1}.archetype-card[data-order="2"]{order:2}
.archetype-pair>.profile-slot[data-order="1"],.archetype-pair>.profile-slot[data-order="2"]{order:3;grid-column:1/-1}

/* Cognitive Functions: keep descriptors bonded to names, reserve the + column, and prevent overflow. */
.function-panel{overflow:hidden}
@media (min-width:761px){
  .function-list{padding:4px 14px 8px}
  .function-stack-block{padding-left:53px}
  .function-row{
    grid-template-columns:minmax(360px,1.05fr) 122px minmax(250px,1fr) 27px;
    gap:10px;
    padding:7px 6px;
    min-height:46px;
    width:100%;
    max-width:100%;
  }
  .function-info{display:flex;align-items:baseline;gap:10px;min-width:0}
  .function-name{flex:0 0 auto;min-width:0}
  .function-short{flex:0 1 auto;min-width:0;color:#817685;font-size:8px}
  .function-row .stage-select{min-width:0;width:122px}
  .function-row .progress-shell{height:6px;min-width:0}
  .function-row .expand-knob{width:25px;min-width:25px;justify-self:end}

  /* Stronger circuit traces terminate directly beside the function labels. */
  .stack-connectors{left:2px;top:3px;width:51px;height:184px;opacity:1}
  .connector-line{stroke:rgba(137,96,160,.78);stroke-width:1.5;filter:drop-shadow(0 0 4px rgba(74,46,99,.3))}
  .connector-inner{stroke:rgba(137,96,160,.64)}
  .connector-terminal{fill:var(--gold);opacity:.9}
  .connector-node{fill:#A47DBA;opacity:1}
}
@media (min-width:761px) and (max-width:1170px){
  .function-row{grid-template-columns:minmax(300px,.95fr) 116px minmax(210px,1fr) 26px;gap:9px}
  .function-info{gap:8px}
  .function-stack-block{padding-left:49px}
}

/* Alter Egos: base type is the centre of the setup summary; selection is attentional focus, not navigation. */
.orientation-summary{position:relative;display:grid;justify-items:center;gap:3px;margin:0 0 12px;padding:1px 86px 2px;min-height:42px}
.orientation-type{font-family:var(--serif);font-size:26px!important;line-height:1;font-weight:500;color:#E7DDEA!important;letter-spacing:.025em}
.orientation-meta{color:#786D7E;font-size:8px;letter-spacing:.035em;text-align:center}
.orientation-edit{position:absolute;right:3px;top:50%;transform:translateY(-50%);border:1px solid rgba(117,77,155,.16);border-radius:6px;background:rgba(74,46,99,.06);padding:5px 7px;color:#8F759F}
.orientation-edit:hover{border-color:rgba(117,77,155,.34);color:#C4A9D4}

.alter-card{transition:background .16s ease,box-shadow .16s ease,opacity .16s ease,border-color .16s ease}
.alter-card:not(.selected){opacity:.78}
.alter-card:not(.selected):hover{opacity:.92}
.alter-card.selected{opacity:1;background:radial-gradient(circle at 50% 0%,rgba(117,77,155,.19),transparent 72%),rgba(74,46,99,.07);box-shadow:inset 0 0 0 1px rgba(117,77,155,.45),inset 0 1px 0 rgba(199,165,106,.09),0 0 24px rgba(74,46,99,.08)}
.alter-top{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
.alter-type{font-family:var(--serif);font-size:23px;font-weight:500;color:#E4DAE8;letter-spacing:.015em;line-height:1}
.alter-card .stage-select{width:auto;min-width:94px;max-width:104px;height:27px;padding:0 8px;font-size:7.5px;flex:none}
.alter-stack{width:max-content;max-width:100%;margin:0 auto;display:grid;gap:4px}
.alter-function-row{grid-template-columns:29px minmax(0,1fr);gap:8px;min-width:0}
.alter-function-name{color:#766F7A;transition:color .16s ease,text-shadow .16s ease}
.alter-card.selected .alter-function-name{color:var(--violet-light);text-shadow:0 0 10px rgba(117,77,155,.16)}

@media(max-width:760px){
  .archetype-pair{grid-template-columns:1fr;gap:7px}
  .archetype-card[data-order="1"]{order:1}.archetype-pair>.profile-slot[data-order="1"]{order:2;grid-column:auto}.archetype-card[data-order="2"]{order:3}.archetype-pair>.profile-slot[data-order="2"]{order:4;grid-column:auto}
  .orientation-summary{padding:1px 68px 2px;margin-bottom:9px;min-height:39px}
  .orientation-type{font-size:23px!important}
  .orientation-meta{font-size:7.2px}
  .orientation-edit{right:0;font-size:7px;padding:4px 5px}
  .alter-top{flex-direction:row!important;align-items:center!important;gap:5px!important}
  .alter-type{font-size:18px;min-width:0}
  .alter-card .stage-select{width:auto!important;min-width:66px;max-width:74px;height:24px;padding:0 5px;font-size:6.5px}
  .alter-stack{width:100%;margin:0}
  .alter-function-row{grid-template-columns:23px minmax(0,1fr);gap:5px}
}
@media(max-width:390px){
  .orientation-summary{padding-left:59px;padding-right:59px}
  .orientation-type{font-size:21px!important}
  .alter-card{padding:9px 8px 8px}
  .alter-type{font-size:17px}
  .alter-card .stage-select{min-width:61px;max-width:68px;font-size:6.1px;padding:0 4px}
  .alter-function-name{font-size:6.6px}
}


/* compact Alter Ego geometry, relationship cues, and intentional text rhythm */
.brand-tagline span{display:block;white-space:nowrap}

@media (min-width:761px){
  /* Keep the MBTI code and its integration status visually married at the centre. */
  .alter-grid{
    grid-template-columns:minmax(290px,360px) 88px minmax(290px,360px);
    grid-template-rows:auto 58px auto;
    justify-content:center;
    gap:0;
    overflow:visible;
    border:0;
    border-radius:0;
    background:transparent;
    box-shadow:none;
  }
  .alter-card{
    border:1px solid rgba(117,77,155,.22)!important;
    border-radius:10px!important;
    background:rgba(8,8,11,.25);
    padding:14px 16px 13px;
    min-height:178px;
    align-content:start;
  }
  .alter-card:nth-child(1){grid-column:1;grid-row:1}
  .alter-card:nth-child(2){grid-column:3;grid-row:1}
  .alter-card:nth-child(3){grid-column:1;grid-row:3}
  .alter-card:nth-child(4){grid-column:3;grid-row:3}
  .alter-top{justify-content:center;gap:10px;width:100%}
  .alter-type{font-size:23px}
  .alter-card .stage-select{min-width:92px;max-width:102px}
  .alter-stack{width:max-content;max-width:100%;margin:0 auto}

  /* Relationship cues live only in the negative space between the four sides. */
  .alter-relation{display:flex;align-items:center;justify-content:center;pointer-events:none;color:#806D89;position:relative;z-index:3;text-align:center}
  .alter-relation-label{font-size:6.2px;letter-spacing:.11em;color:#76657F;white-space:nowrap}
  .alter-relation-glyph{font-family:var(--serif);font-size:20px;line-height:1;color:#A682BC;text-shadow:0 0 10px rgba(117,77,155,.28)}
  .alter-relation-h{flex-direction:column;gap:2px;align-self:center;justify-self:stretch}
  .alter-relation-top{grid-column:2;grid-row:1}
  .alter-relation-bottom{grid-column:2;grid-row:3}
  .alter-relation-v{flex-direction:row;gap:7px;align-self:stretch;justify-self:center}
  .alter-relation-left{grid-column:1;grid-row:2}
  .alter-relation-right{grid-column:3;grid-row:2}
  .alter-relation-v .alter-relation-label{order:2}
  .alter-relation-v .alter-relation-glyph{order:1}
  .alter-coupling-node{grid-column:2;grid-row:2;position:relative;left:auto;top:auto;transform:none;align-self:center;justify-self:center;width:17px;height:17px}
}

@media (max-width:760px){
  /* On mobile the compact 2×2 instrument stays intact and relationship arrows disappear. */
  .alter-relation,.alter-coupling-node{display:none}
  .alter-function-row{display:flex;align-items:center;justify-content:center;gap:5px;text-align:center}
  .alter-function-code,.alter-function-name{text-align:center}
  .alter-stack{width:100%;margin:0 auto}
}

/* Release layout — neutral first-use state and compact Four Sides geometry. */
.alter-heading{position:relative;justify-content:center;text-align:center}
.alter-heading>div:first-child{margin:0 auto}
.alter-heading-actions{position:absolute;right:15px;top:50%;transform:translateY(-50%);display:flex;align-items:center}
.orientation-edit-header{border:1px solid rgba(117,77,155,.19);border-radius:6px;background:rgba(74,46,99,.07);padding:6px 8px;color:#967DA5;font-size:8px;white-space:nowrap}
.orientation-edit-header:hover{border-color:rgba(117,77,155,.42);color:#C8ACD8;background:rgba(74,46,99,.12)}
.orientation-edit-header[hidden]{display:none!important}
.orientation-kicker,.orientation-summary{display:none!important}
.orientation-setup{max-width:680px;margin:1px auto 0;padding:14px 15px 15px}
.orientation-title{font-size:19px}
.orientation-copy{max-width:560px;margin:5px auto 12px}
.orientation-field label{text-transform:none;font-size:9px;font-weight:650;letter-spacing:.035em;color:#A18DAA}
.orientation-controls{max-width:560px}

@media (min-width:761px){
  .alter-body{padding:10px 12px 12px}
  .alter-grid{
    grid-template-columns:minmax(250px,318px) 54px minmax(250px,318px);
    grid-template-rows:auto 54px auto;
    justify-content:center;
    align-items:stretch;
    gap:0;
    max-width:690px;
    margin:0 auto;
  }
  .alter-card{
    min-height:148px;
    padding:11px 13px 10px;
    gap:7px;
  }
  .alter-top{justify-content:center;gap:11px;width:100%;min-height:28px}
  .alter-type{font-size:21px}
  .alter-card .stage-select{min-width:88px;max-width:98px;height:26px;font-size:7.3px}
  .alter-stack{gap:2px}
  .alter-function-row{min-height:21px;padding:1px 0;gap:7px}
  .alter-function-code{font-size:9.5px}
  .alter-function-name{font-size:7.7px}
  .alter-relation-label{font-size:5.8px;letter-spacing:.10em}
  .alter-relation-glyph{font-size:17px}
  .alter-relation-h{gap:1px}
  .alter-relation-v{gap:4px}
  .alter-coupling-node{display:none!important}
}

@media (max-width:760px){
  .alter-heading-actions{right:11px}
  .orientation-edit-header{padding:5px 6px;font-size:7px}
  .alter-body{padding:8px 8px 9px}
  .alter-grid{gap:6px}
  .alter-card{padding:9px 7px 8px;gap:7px}
  .alter-top{
    width:min(100%,150px);
    margin:0 auto;
    display:grid!important;
    grid-template-columns:auto auto;
    justify-content:center;
    align-items:center!important;
    column-gap:12px!important;
  }
  .alter-type{font-size:17px}
  .alter-card .stage-select{min-width:64px!important;max-width:72px!important;width:auto!important;height:24px;font-size:6.3px;padding:0 5px}
  .alter-stack{width:100%;margin:0 auto}
  .alter-function-row{justify-content:center;min-height:21px}
  .orientation-setup{padding:12px 9px 13px}
  .orientation-controls{grid-template-columns:1fr}
}
@media(max-width:390px){
  .alter-top{width:min(100%,142px);column-gap:9px!important}
  .alter-card .stage-select{min-width:61px!important;max-width:68px!important;font-size:6px}
  .alter-type{font-size:16px}
}


/* Structural polish — mirrored Four Sides geometry and precision connector alignment. */

/* On mobile, all four archetype cards use one continuous rhythm; no extra seam between pairs. */
@media (max-width:760px){
  .archetype-list{gap:7px}
}

/* Cognitive-function circuit traces align to the vertical centre of each title row and breathe away from the labels. */
@media (min-width:761px){
  .function-stack-block{padding-left:57px}
  .stack-connectors{
    left:1px;
    top:0;
    width:52px;
    height:100%;
    opacity:1;
  }
  .connector-line{stroke-width:1.5}
  .connector-terminal{opacity:.92}
}
@media (min-width:761px) and (max-width:1170px){
  .function-stack-block{padding-left:53px}
  .stack-connectors{width:48px}
}

/* Alter Egos: top row is the same N/T/F/S sequence with attitudes switched;
   bottom row mirrors function order vertically. Keep the cross compact and let arrows carry the relationship. */
@media (min-width:761px){
  .alter-body{padding:9px 12px 11px}
  .alter-grid{
    grid-template-columns:minmax(250px,318px) 40px minmax(250px,318px);
    grid-template-rows:auto 40px auto;
    max-width:676px;
    gap:0;
  }
  .alter-card{
    min-height:148px;
    padding:11px 13px 10px;
    gap:7px;
  }
  .alter-relation{overflow:visible}
  .alter-relation-glyph{
    font-size:25px;
    color:#AA83C1;
    text-shadow:0 0 12px rgba(117,77,155,.30);
    transform:none;
  }
  .alter-relation-h,.alter-relation-v{gap:0}
  .alter-function-code{font-size:10.3px}
  .alter-function-name{font-size:8.25px}
  .alter-function-row{min-height:22px;gap:7px}
}

@media (max-width:760px){
  .alter-function-code{font-size:9.4px}
  .alter-function-name{font-size:7.25px}
}
@media (max-width:390px){
  .alter-function-code{font-size:9px}
  .alter-function-name{font-size:6.95px}
}

/* Equal mobile rhythm across the four Major Archetype cards. */
@media (max-width:760px){
  .archetype-pair + .archetype-pair{margin-top:0}
}
