/* Shared meaning: seven labelled meters, exactly ten pieces each, tier apart. */
.hero-profile{--profile-fill:#a3cfe1;--profile-empty:#23384c;position:relative;padding:17px;border:1px solid #58748b;border-radius:7px;background:linear-gradient(145deg,#192d42,#102035);box-shadow:inset 0 1px 0 #d5eeff14;color:var(--profile-ink,var(--text,#d6e5f1));min-width:0}
.profile-module-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:17px}
.profile-demo-label{display:block;color:#8dafc3;font-size:9px;line-height:1.4;letter-spacing:.06em;margin-bottom:4px}
.profile-module-head h3{font:400 16px/1.25 'Russo One',sans-serif;margin:0}
.profile-tier{display:inline-flex;align-items:center;gap:7px;flex:none;padding:4px 8px;border:1px solid #82a7bb;border-radius:5px;background:linear-gradient(145deg,#355269,#1c344b);box-shadow:inset 0 1px 0 #d9efff21}
.profile-tier>span{color:#b2cbdc;font-size:10px}
.profile-tier>b{font:400 24px/1.05 'Russo One',sans-serif;color:#edf7fc}
.profile-metrics{display:grid;gap:13px}
.profile-metric{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:9px;row-gap:6px;align-items:center}
.profile-metric-label{grid-column:1;grid-row:1;color:#c4d7e4;font-size:12px;line-height:1.3}
.profile-value{grid-column:2;grid-row:1;white-space:nowrap;text-align:right;font-size:12px;line-height:1.3;font-weight:700;font-variant-numeric:tabular-nums;color:#e4eff7}
.profile-value small{font-size:9px;font-weight:400;color:#829eb3;margin-left:2px}
.profile-meter{grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:3px;min-width:0}
.profile-segment{display:block;height:7px;min-width:0;border:1px solid #3d566b66;border-radius:1px;background:var(--profile-empty)}
.profile-segment.is-filled{background:var(--profile-fill);border-color:#c3e3ef55;box-shadow:inset 0 1px 0 #e6f6ff24}

/* 7: A dense instrument panel belongs to the portrait frame itself. */
.profile-hud-identity{min-width:0;background:#071321;border:1px solid #425c72;box-shadow:inset 0 1px 0 #adcfe222;clip-path:polygon(0 0,calc(100% - 12px) 0,100% 12px,100% 100%,12px 100%,0 calc(100% - 12px))}
.profile-hud-identity .hero-overview{height:416px;border:0;border-radius:0;box-shadow:none}
.profile-hud-identity .hero-identity{bottom:20px}
.profile-hud-identity .hero-name h3{font-size:43px}
.profile-hud-identity .hero-universe{font-size:8px}
.profile-style-7{margin:-5px 10px 10px;padding:12px 10px;border:1px solid #486b80;border-radius:0;background:linear-gradient(#102335,#07121e);box-shadow:inset 2px 0 0 #93bfd538;z-index:3}
.profile-style-7 .profile-module-head{gap:5px;margin-bottom:9px;padding-bottom:9px;border-bottom:1px solid #4c738b66}
.profile-style-7 .profile-module-head h3{font-size:12px}
.profile-style-7 .profile-demo-label{font-size:8px;letter-spacing:.1em}
.profile-style-7 .profile-tier{padding:3px 6px;gap:4px;border-radius:0;background:#18364b}
.profile-style-7 .profile-tier>span{font-size:8px}
.profile-style-7 .profile-tier>b{font-size:20px}
.profile-style-7 .profile-metrics{gap:0}
.profile-style-7 .profile-metric{grid-template-columns:minmax(0,1fr) 82px 27px;gap:6px;min-height:27px;border-top:1px solid #314b5f66}
.profile-style-7 .profile-metric:first-child{border:0}
.profile-style-7 .profile-metric-label{font-size:10px;line-height:1.25}
.profile-style-7 .profile-meter{grid-column:2;grid-row:1;gap:2px}
.profile-style-7 .profile-segment{height:7px;border:0;border-radius:0;background:#20394b}
/* The final rating sets the hue of the filled cells: red → amber → green. */
.profile-style-7 .profile-metric[data-score="1"]{--profile-rating-color:#c7797e}
.profile-style-7 .profile-metric[data-score="2"]{--profile-rating-color:#ce8475}
.profile-style-7 .profile-metric[data-score="3"]{--profile-rating-color:#d29471}
.profile-style-7 .profile-metric[data-score="4"]{--profile-rating-color:#d5a96f}
.profile-style-7 .profile-metric[data-score="5"]{--profile-rating-color:#d6bb73}
.profile-style-7 .profile-metric[data-score="6"]{--profile-rating-color:#ccc478}
.profile-style-7 .profile-metric[data-score="7"]{--profile-rating-color:#adc37e}
.profile-style-7 .profile-metric[data-score="8"]{--profile-rating-color:#8cbd88}
.profile-style-7 .profile-metric[data-score="9"]{--profile-rating-color:#74b78e}
.profile-style-7 .profile-metric[data-score="10"]{--profile-rating-color:#61b08a}
.profile-style-7 .profile-segment.is-filled{background:var(--profile-rating-color,#8dbed6);box-shadow:inset 0 1px 0 #e5f1ed17}
.profile-style-7 .profile-value{grid-column:3;grid-row:1;font-size:10px;color:var(--profile-rating-color,#e4eff7)}
.profile-style-7 .profile-value small{font-size:7px;margin-left:1px}

/* Selected HUD on the reading page. Keep the approved content columns intact. */
.hero-page-content.hero-with-profile{grid-template-areas:'top top' 'analysis analysis' 'notes situations' 'talents talents' 'sources sources'}
.hero-top{grid-area:top;display:grid;grid-template-columns:250px minmax(0,1fr);gap:14px;align-items:start;min-width:0}
.hero-top>*{min-width:0}
.hero-content-stack{display:flex;flex-direction:column;gap:14px;min-width:0}
.hero-with-profile .profile-hud-identity{background:transparent}
.hero-with-profile .profile-hud-identity .hero-overview{min-height:0;height:416px;max-width:none;width:100%}
.hero-with-profile .profile-hud-identity .hero-name h1{font-size:43px}
@media(max-width:1100px) and (min-width:801px){.hero-top{grid-template-columns:230px minmax(0,1fr)}}
@media(max-width:800px){
  .hero-page-content.hero-with-profile{grid-template-areas:'top' 'analysis' 'notes' 'situations' 'talents' 'sources'}
  .hero-top{grid-template-columns:minmax(0,1fr)}
  .hero-with-profile .profile-hud-identity{width:min(100%,350px);justify-self:center}
  .hero-with-profile .profile-hud-identity .hero-overview{height:400px}
  .hero-with-profile .profile-style-7 .profile-metric{grid-template-columns:minmax(0,1fr) 100px 29px;min-height:29px}
  .hero-with-profile .profile-style-7 .profile-metric-label{font-size:11px}
}


/* Canonical department 06 profile; the existing ice-fortress HUD stays in place. */
.profile-canonical .profile-score-group{min-width:0}
.profile-canonical .profile-score-group-title{margin:0;padding:6px 0 5px;font:500 9px/1.4 'Golos Text',sans-serif;letter-spacing:.04em;color:#acc8da}
.profile-canonical .profile-score-weak{margin-top:8px;padding-top:5px;border-top:1px solid #65859c66;background:linear-gradient(90deg,#050e1970,transparent)}
.profile-canonical .profile-score-weak .profile-score-group-title{color:#8fa5b7}
.profile-canonical .profile-metric{min-height:34px}
.profile-canonical button.profile-metric-label{appearance:none;background:none;border:0;padding:5px 0;text-align:left;color:#c4d7e4;font-family:inherit;cursor:help;text-decoration:underline;text-decoration-style:dotted;text-decoration-color:#8baec56b;text-underline-offset:3px}
.profile-canonical button.profile-metric-label:focus-visible{outline:2px solid #8bc8e9;outline-offset:2px;border-radius:2px}
.profile-source-note{margin:10px 0 0;padding-top:7px;border-top:1px solid #486b8055;color:#849fb3;font-size:9px;line-height:1.4}
.hero-metric-explanation{position:fixed;z-index:180;max-width:min(360px,calc(100vw - 24px));max-height:calc(100vh - 24px);overflow:auto;padding:15px 17px;border:1px solid #7399b3;border-radius:7px;background:linear-gradient(135deg,#1b3046,#0b1828);color:#d7e7f4;box-shadow:0 12px 36px #0008;font:13px/1.55 'Golos Text',sans-serif}
.hero-metric-explanation[hidden]{display:none}
.hero-metric-explanation strong{color:#dff4ff;font-weight:600}.hero-metric-explanation p{margin:8px 0 0}.hero-metric-explanation p+p{color:#a7bfd2}
@media(max-width:800px){.hero-with-profile .profile-canonical .profile-metric{min-height:36px}}
