/**
 * Copyright (c) 2026 DNA Genics, S.L. All rights reserved.
 * Shared Heritage foundations for the Traits report and research workspaces.
 */
.htw-page, .htw-page *, .htw-page *::before, .htw-page *::after { box-sizing:border-box; }
.htw-page { padding-bottom:56px; font:16px/1.75 var(--hd-sans); color:var(--hd-ink); --ti-terracotta-dark:#8b6547; --ti-terracotta:#a47d57; --ti-terracotta-light:#b29773; --ti-sage:#69816c; --ti-sage-dark:#355b47; }
.htw-page .htw-shell { width:100%; max-width:1480px; margin-inline:auto; padding-inline:32px; }
.htw-page :is(h1,h2,h3,h4) { font-family:var(--hd-serif); font-weight:500; line-height:1.2; color:var(--hd-forest); }
.htw-page h1 { font-size:clamp(34px,3.6vw,54px); margin:0 0 14px; overflow-wrap:anywhere; }
.htw-page h2 { font-size:32px; margin:0 0 16px; }
.htw-page h3 { font-size:25px; }
.htw-page h4 { font-size:21px; }
.htw-page :is(p,li) { line-height:1.8; }
.htw-page a { color:var(--hd-forest); text-underline-offset:3px; }
.htw-page [hidden] { display:none !important; }
.htw-page :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible { outline:2px solid var(--hd-forest); outline-offset:4px; }
.htw-page [tabindex='-1']:focus { outline:2px solid var(--hd-forest) !important; outline-offset:4px; }
.htw-page .htw-header { display:flex; justify-content:space-between; align-items:start; gap:28px; padding:20px 0 28px; }
.htw-page .htw-header > div:first-child { min-width:0; max-width:96ch; }
.htw-page .htw-header p { margin:0; max-width:84ch; color:var(--hd-muted); font-size:15px; }
.htw-page .htw-actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.htw-page .htw-header > .htw-actions { justify-content:end; max-width:380px; flex-shrink:0; }
.htw-page :is(.hd-btn,.btn) { min-height:46px; min-width:0; max-width:100%; white-space:normal; text-align:center; }
.htw-page .hd-btn { font-size:14px; }
.htw-page a.hd-btn--primary { color:#fff; }
.htw-page :is(.btn-success,.btn-primary) { background:var(--hd-forest); border-color:var(--hd-forest); color:#fff; box-shadow:none; }
.htw-page :is(.btn-outline-primary,.btn-outline-secondary,.btn-outline-success,.btn-secondary,.btn-light) { background:var(--hd-surface); color:var(--hd-forest); border-color:var(--hd-border); box-shadow:none; }
.htw-page :is(button,input,select,textarea) { font-family:var(--hd-sans); }
.htw-page :is(input:not([type='checkbox']):not([type='radio']):not([type='hidden']),select,textarea) { min-height:46px; max-width:100%; border:1px solid var(--hd-border); border-radius:7px; background-color:var(--hd-surface); color:var(--hd-ink); font-size:16px; }
.htw-page select { appearance:auto; background-image:none; padding-right:12px; }
.htw-page :is(input[type='checkbox'],input[type='radio']) { accent-color:var(--hd-forest); }
.htw-page .htw-panel { min-width:0; padding:28px; border:1px solid var(--hd-border); border-radius:12px; background:var(--hd-surface); }
.htw-page .htw-panel + .htw-panel { margin-top:22px; }
.htw-page .htw-section-heading { display:flex; justify-content:space-between; align-items:end; gap:24px; margin:0 0 22px; }
.htw-page .htw-section-heading :is(h2,h3) { margin:0; }
.htw-page .htw-section-heading p { margin:0; color:var(--hd-muted); font-size:14px; max-width:60ch; }
.htw-page .htw-context { display:flex; flex-wrap:wrap; gap:18px 28px; padding:20px 24px; margin:0 0 26px; border:1px solid var(--hd-border); border-radius:10px; background:var(--hd-sand); }
.htw-page .htw-context > div { flex:1 1 140px; min-width:0; }
.htw-page .htw-context dt { font-size:12px; font-weight:500; color:var(--hd-muted); }
.htw-page .htw-context dd { margin:5px 0 0; font-size:17px; font-weight:600; line-height:1.5; color:var(--hd-forest); overflow-wrap:anywhere; }
.htw-page .htw-notice { padding:20px 24px; margin:0 0 26px; border:1px solid #d6ded3; border-radius:10px; background:var(--hd-sage); color:#3b5144; font-size:14px; }
.htw-page .htw-notice :is(h2,h3,h4) { font:600 16px/1.5 var(--hd-sans); margin:0 0 8px; }
.htw-page .htw-notice p:last-child { margin-bottom:0; }
.htw-page .htw-notice--warning { background:var(--hd-cream); border-color:#ddcbaa; color:#624d2c; }
.htw-page .htw-empty { padding:28px; border:1px solid var(--hd-border); border-radius:10px; background:var(--hd-surface); }
.htw-page .htw-empty :is(h2,h3,h4) { margin:0 0 12px; }
.htw-page .htw-empty p { color:var(--hd-muted); max-width:90ch; }
.htw-page .htw-empty p:last-child { margin-bottom:0; }
.htw-page .htw-prose { color:var(--hd-muted); overflow-wrap:anywhere; max-width:100ch; }
.htw-page .htw-prose :is(p,ul,ol) { margin:0 0 16px; }
.htw-page .htw-prose :last-child { margin-bottom:0; }
.htw-page .htw-prose img { max-width:100%; height:auto; }
.htw-page .htw-prose pre { white-space:pre-wrap; overflow-wrap:anywhere; }
.htw-page .htw-table-region { max-width:100%; overflow:auto; overscroll-behavior-x:contain; border:1px solid var(--hd-border); border-radius:8px; }
.htw-page .htw-table-region table { width:100%; border-collapse:collapse; min-width:640px; font-size:14px; }
.htw-page .htw-table-region :is(th,td) { padding:12px 16px; border-bottom:1px solid var(--hd-border); vertical-align:top; }
.htw-page .htw-table-region th { color:var(--hd-forest); background:var(--hd-sand); }
.htw-page .htw-section-links { display:flex; flex-wrap:wrap; gap:8px; padding:14px 0 22px; margin:0 0 22px; border-bottom:1px solid var(--hd-border); }
.htw-page .htw-section-links a { display:inline-flex; align-items:center; min-height:44px; padding:8px 14px; border-radius:6px; background:var(--hd-surface); border:1px solid var(--hd-border); color:var(--hd-forest); font-size:13px; text-decoration:none; }
.htw-page :is(section[id],article[id]) { scroll-margin-top:calc(var(--nav-height,72px) + 16px); }
.htw-page .htw-footer { margin-top:30px; padding-top:20px; border-top:1px solid var(--hd-border); color:var(--hd-muted); font-size:12px; }
/* Existing score partials retain their decision logic, positions and labels. */
.htw-page .ti-scale-container { padding:18px 24px; border:1px solid var(--hd-border); background:var(--hd-bg); border-radius:10px; }
.htw-page .ti-scale-track-wrapper { position:relative; padding:0 0 8px; }
.htw-page .ti-scale-labels { display:flex; justify-content:space-between; gap:20px; margin-bottom:16px; font-size:12px; color:var(--hd-muted); }
.htw-page .ti-scale-track { height:9px; border-radius:5px; background:var(--hd-sand); }
.htw-page .ti-scale-indicator { position:absolute; top:calc(100% - 12px); width:22px; height:22px; border:4px solid var(--indicator-color,var(--hd-forest)); background:var(--hd-surface); border-radius:50%; transform:translate(-50%,-50%); }
.htw-page .ti-scale-indicator[data-position='0'] { left:0; }
.htw-page .ti-scale-indicator[data-position='1'] { left:25%; }
.htw-page .ti-scale-indicator[data-position='2'] { left:50%; }
.htw-page .ti-scale-indicator[data-position='3'] { left:75%; }
.htw-page .ti-scale-indicator[data-position='4'] { left:100%; }
.htw-page .ti-scale-track[data-segments='3'] ~ .ti-scale-indicator[data-position='1'] { left:50%; }
.htw-page .ti-scale-track[data-segments='3'] ~ .ti-scale-indicator[data-position='2'] { left:100%; }
.htw-page .ti-scale-track[data-segments='2'] ~ .ti-scale-indicator[data-position='1'] { left:100%; }
.htw-page .ti-scale-footer { display:flex; justify-content:center; margin-top:18px; }
.htw-page .ti-scale-badge { padding:5px 12px; background:var(--hd-sand); border:1px solid var(--hd-border); border-radius:5px; color:var(--hd-forest); font-size:14px; font-weight:600; }
.htw-page .ti-scale-container i { display:none; }
@media(max-width:1023px) {
    .htw-page .htw-header { flex-direction:column; gap:20px; }
    .htw-page .htw-header > .htw-actions { justify-content:start; max-width:none; flex-shrink:1; }
}
@media(max-width:767px) {
    .htw-page .htw-shell { padding-inline:20px; }
    .htw-page .htw-panel { padding:22px; }
    .htw-page .htw-section-heading { flex-direction:column; align-items:start; gap:10px; }
    .htw-page .htw-notice { padding:18px; }
}
@media(max-width:479px) {
    .htw-page .htw-shell { padding-inline:16px; }
    .htw-page .htw-header { padding-top:12px; }
    .htw-page .htw-context { padding:18px; gap:16px; }
    .htw-page .htw-panel, .htw-page .htw-empty { padding:20px; }
    .htw-page .htw-header > .htw-actions { width:100%; }
    .htw-page .htw-header > .htw-actions > :is(a,button) { flex:1 1 auto; }
}
@media print {
    .htw-page { padding-top:0; background:#fff; }
    .htw-page .htw-shell { max-width:none; padding:0; }
    .htw-page :is(.htw-actions,.htw-section-links) { display:none !important; }
    .htw-page :is(.htw-panel,.htw-notice) { break-inside:avoid; }
    .htw-page .htw-table-region { overflow:visible; }
    .htw-page .htw-table-region table { min-width:0; }
}
