:root{--horcys-accent:#405c7a;--horcys-on-accent:#fff}
html[data-horcys-theme] input[type=checkbox]{accent-color:var(--horcys-accent)}
html[data-horcys-theme] .horcys-welcome{font-size:13px;margin:4px 0;color:inherit;opacity:.8}
html[data-horcys-theme=dark]{color-scheme:dark;background:#101a2a}
html[data-horcys-theme=dark] body,html[data-horcys-theme=dark] main{background:#101a2a;color:#e4edf9}
html[data-horcys-theme=dark] :is(header,nav,.topbar,.card,.moduleCard,.auth-card,dialog,.panel,.sidebar,table,thead,tbody,tr,td,th){background:#17253b;color:#e4edf9;border-color:#40536e}
html[data-horcys-theme=dark] :is(input,select,textarea,button){background:#20324d;color:#e4edf9;border-color:#526884}
html[data-horcys-theme=dark] :is(h1,h2,h3,label,.brand-copy strong){color:#e4edf9}
html[data-horcys-theme=dark] :is(.muted,.hero p,.moduleCard small,.flow small,.eyebrow,.status,.brand-copy small){color:#b8cce6}
html[data-horcys-theme] .primary,html[data-horcys-theme] .btn.primary,html[data-horcys-theme] nav button.active{background:var(--horcys-accent);color:var(--horcys-on-accent);border-color:var(--horcys-accent)}
@media print{html[data-horcys-theme] body,html[data-horcys-theme] body > header,html[data-horcys-theme] body > section,html[data-horcys-theme] body > dialog,html[data-horcys-theme] #home,html[data-horcys-theme] #toast{zoom:1!important}}

/* Shared platform design system: one palette and type scale for all modules. */
:root{--horcys-font:"Segoe UI",system-ui,sans-serif;--horcys-font-size:13px;--horcys-bg:#f5f6f8;--horcys-surface:#fff;--horcys-ink:#263446;--horcys-muted:#617083;--horcys-line:#dce2e9;--horcys-soft:#edf1f5}
html body{font-family:var(--horcys-font)!important;font-size:var(--horcys-font-size)!important;line-height:1.5;color:var(--horcys-ink);background:var(--horcys-bg)!important}
html body :is(button,input,select,textarea){font-family:var(--horcys-font)!important;letter-spacing:normal;line-height:1.45}
html body :is(input,select,textarea){font-size:var(--horcys-font-size)!important;min-width:0}
html body :is(h1,h2,h3){line-height:1.3;letter-spacing:-.015em}
html body .primary,html body .btn.primary,html body nav button.active{background:var(--horcys-accent)!important;color:var(--horcys-on-accent)!important;border-color:var(--horcys-accent)!important}
html body :is(.auth-card,dialog){box-shadow:0 12px 40px #2634460d;border:1px solid var(--horcys-line);border-radius:14px;line-height:1.6}
.auth-card{width:calc(100% - 32px);max-width:460px;padding:36px}.auth-card h1{font-size:26px}.auth-card label{font-weight:600;color:var(--horcys-ink)}
html body label{line-height:1.5;white-space:normal;overflow-wrap:anywhere}
html body :is(.field,.brand-copy){min-width:0}
html body.gz815-pro{--gz15-bg:var(--horcys-bg);--gz15-side:#293d54;--gz15-side2:#293d54;--gz15-ink:var(--horcys-ink);--gz15-muted:var(--horcys-muted);--gz15-line:var(--horcys-line);--gz15-accent:var(--horcys-accent);--gz15-accent2:var(--horcys-accent);--gz15-gold:#9aaabd;--gz15-soft:var(--horcys-soft);--bg:var(--horcys-bg);--ink:var(--horcys-ink);--accent:var(--horcys-accent);--nav:var(--horcys-accent);--soft:var(--horcys-soft);--v3118-brand:var(--horcys-accent);--v3118-accent:#8195ab;--v3118-brand-soft:var(--horcys-soft);--v31182-teal:var(--horcys-accent);--v31182-teal-soft:var(--horcys-soft);--v3118-bg:var(--horcys-bg);--v3118-ink:var(--horcys-ink);--v31183-accent:var(--horcys-accent);--v31182-navy:var(--horcys-ink)}
html body.gz815-pro nav{background:#293d54!important}
html body.gz815-pro header{background:#293d54!important}
html body.gz815-pro nav button.active{background:#e7edf4!important;color:#263446!important;border-color:#b7c7d8!important}
html body.gz815-pro header h1{white-space:normal!important;line-height:1.4!important}
html body.gz815-pro header small{display:none!important}
html[data-horcys-embedded=true] body.gz815-pro header .logo,html[data-horcys-embedded=true] body.gz815-pro header .horcys-shield{display:none!important}
html[data-horcys-embedded=true] body.gz815-pro header{display:flex!important;align-items:center!important;overflow:hidden!important;gap:0!important}
html body #registros .recordClassificationGrid.v3115{grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr))!important;gap:20px!important;align-items:start!important}
html body #recordUsageCorroborationV3116.v3116UsagePanel{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:8px!important;height:auto!important;max-height:none!important;margin:8px 0!important;padding:12px!important;overflow:visible!important}
html body #recordUsageCorroborationV3116 :is(.v3116UsageSource,.v3116UsageCandidates,.v3116UsageActions){white-space:normal!important;overflow:visible!important;max-width:100%!important;line-height:1.5!important}
html body .recordClassificationGrid .field{height:auto!important;min-width:0!important;overflow:visible!important}
html body .v3116CollapseBtn{margin-left:auto;min-width:132px}
html body #testClosureDialog{width:min(520px,94vw);padding:28px;color:var(--horcys-ink);background:var(--horcys-surface)}
html body #testClosureDialog::backdrop{background:#26344680}
html[data-horcys-module=analytics] body{--primary:var(--horcys-accent);--accent:var(--horcys-accent);--blue:var(--horcys-accent)}
html[data-horcys-theme=dark]{--horcys-bg:#18212e;--horcys-surface:#233044;--horcys-ink:#e8edf4;--horcys-muted:#bac6d6;--horcys-line:#4e6077;--horcys-soft:#2b3c52}
@media(max-width:1050px){html body.gz815-pro header h1{color:#fff!important}}

html[data-horcys-module=analytics] body .shell>aside{background:#293d54;color:#f0f3f7}html[data-horcys-module=analytics] body .shell nav button{color:#e8edf4}html[data-horcys-module=analytics] body .shell nav button.active{background:#e7edf4!important;color:#263446!important}html[data-horcys-module=analytics] body .brand b{display:none}html[data-horcys-module=analytics] body .brand span{color:#c3cede}

html body [hidden]{display:none!important}

/* RC11: content sizing and responsive navigation. */
#compactNavToggle{display:none}
html body #registros #gz815ContextPanel .gz815-source-details{grid-column:1/-1;width:auto;align-self:start;min-width:0}
html body #registros #gz815ContextItems{min-width:0!important;grid-column:1/-1}
html body #registros #gz815EditContext{grid-column:1/-1;justify-self:end;margin:8px 12px}
html body #registros #gz815SourceFields{max-height:none;overflow:visible;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr))}
html body #registros .gz827-inspector-check small{grid-column:1/-1}
html body #registros .gzPhotoContext>span{min-width:0;white-space:normal;overflow-wrap:anywhere}
html body #registros .recordQueueBar{flex-wrap:wrap!important;overflow:visible!important}
html body #registros .recordQueueBar>*{min-width:0;max-width:100%;white-space:normal}
html body #registros .officeLayout{grid-template-columns:min(var(--gz-record-list-width,280px),45%) minmax(0,1fr)}
html body #registros .officeLayout.v3116-list-hidden{grid-template-columns:minmax(0,1fr)}
html body #registros .officeListPane{position:sticky;top:8px;align-self:start;max-height:calc(100dvh - 110px)}
@media(max-width:1050px){
 html body.gz815-pro>header{position:relative!important;top:auto!important;min-height:0!important;width:100%!important;display:flex!important;flex-wrap:wrap!important;gap:6px!important;padding:7px 10px!important;overflow:visible!important}
 html body.gz815-pro>header>div:not(.saveState){flex:1;min-width:0}
 html body.gz815-pro>header h1{font-size:12px!important;margin:0!important}
 html body.gz815-pro>header .saveState{display:none!important}
 html body.gz815-pro #compactNavToggle{display:block!important;min-height:40px!important}
 html body.gz815-pro #saveCurrentStepBtn{min-height:40px!important;font-size:11px!important}
 html body.gz815-pro>nav#taskNavigation{display:none!important;position:static!important;inset:auto!important;width:100%!important;height:auto!important;max-height:none!important;grid-template-columns:repeat(2,minmax(0,1fr));padding:8px!important;overflow:visible!important}
 html body.gz815-pro.compact-nav-open>nav#taskNavigation{display:grid!important}
 html body.gz815-pro>nav#taskNavigation button{white-space:normal!important;text-align:left;min-height:44px!important;color:#edf1f5!important}
 html body.gz815-pro>main{margin:0!important;padding:10px!important;width:100%!important;min-width:0!important}
 html body.gz815-pro #gz815Top{display:none!important}
 html body #registros .officeLayout{grid-template-columns:minmax(0,1fr)}
 html body #registros .officeListPane{position:static;max-height:260px}
 html body #registros #gz815ContextPanel{grid-template-columns:minmax(0,1fr);overflow:visible!important}
 html body #registros #gz815ContextItems{grid-template-columns:1fr!important}
 html body #registros .recordClassificationGrid.v3115{gap:12px!important}
 html body #registros .recordEvidencePane,html body #registros .recordRedactionPane{padding:12px!important}
 html body .view :is(input,select,textarea){max-width:100%;min-width:0}
 html body .view .row{flex-wrap:wrap}
 html body .view .btn{white-space:normal;min-height:40px!important}
}
@media(max-width:600px){
 html body #registros .gz827-inspector-check{grid-template-columns:minmax(0,1fr)}
 html body #registros .gz827-date-grid{grid-template-columns:minmax(0,1fr)!important;max-width:none}
 html body #registros .gz827-date-actions{display:grid;grid-template-columns:minmax(0,1fr)}
 html body #registros #gz815SourceFields{grid-template-columns:minmax(0,1fr);padding:8px}
 html body .view :is(input,select,textarea){font-size:16px!important}
}

/* Shared interaction rules: visible keyboard focus and readable disabled states. */
html body :is(button,summary,a,input,select,textarea):focus-visible{outline:2px solid var(--horcys-accent)!important;outline-offset:3px!important}
html body button:disabled{opacity:.55;cursor:not-allowed}
html body .view :is(.row,.toolbar){min-width:0;gap:8px}
html body .view :is(.row,.toolbar)>.btn{max-width:100%;white-space:normal}
@media(pointer:coarse){html body .view .btn,html body .topbar button{min-height:44px!important}}

/* A common hierarchy across TraZZex views, without shrinking input text. */
html body.gz815-pro .view h2{font-size:18px!important;font-weight:600!important}
html body.gz815-pro .view h3{font-size:15px!important;font-weight:600!important}
html body.gz815-pro .view .btn{font-weight:500!important}
html body.gz815-pro .view .field label{font-weight:500!important}

/* RC17: ancho operativo ajustable y encabezado lateral sin competencia por espacio. */
@media(min-width:1051px){
 html[data-horcys-embedded=true] body.gz815-pro header{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto auto!important;gap:8px!important;padding:12px 14px!important;height:104px!important;min-height:104px!important;align-content:center!important}
 html[data-horcys-embedded=true] body.gz815-pro header>div:not(.saveState){min-width:0;grid-column:1}
 html[data-horcys-embedded=true] body.gz815-pro header h1{font-size:13px!important;font-weight:500!important;line-height:1.3!important;white-space:normal!important}
 html[data-horcys-embedded=true] body.gz815-pro header #saveCurrentStepBtn{grid-column:1!important;width:100%;margin:0!important;min-height:32px!important}
 html[data-horcys-embedded=true] body.gz815-pro nav{top:104px!important;padding-top:8px!important}
 html body #registros .officeFilters :is(input,select){font-size:13px!important;min-height:36px!important;padding:7px 9px!important;width:100%;max-width:100%}
 html body #registros .officeListPane{padding:10px!important}
}
html body #registros .recordListWidthControl{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:11px;margin:0 0 10px}
html body #registros .recordListWidthControl input{flex:1 1 100px;min-width:70px;width:100px;min-height:24px;padding:0}
html body #registros .recordListWidthControl button{font-size:11px;padding:3px 6px}
@media(max-width:1050px){html body #registros .recordListWidthControl{display:none}}

/* Misma escala operativa para formularios y acciones de los módulos. */
html body.gz815-pro .view :is(input,select,textarea){font-size:var(--horcys-font-size)!important;line-height:1.45!important}
html body.gz815-pro .view :is(.field label,.miniLabel){font-size:12px!important;line-height:1.4!important;font-weight:500!important}
html body.gz815-pro .view .btn{font-size:12px!important;line-height:1.4!important}
html body.gz815-pro .view .sectionTitle{font-size:12px!important;font-weight:600!important;letter-spacing:.02em!important}
@media(max-width:700px){html body.gz815-pro .view :is(input,select,textarea){font-size:16px!important}}

/* RC17: controles y jerarquía equivalentes en Analytics y TraZZex. */
html[data-horcys-module="analytics"] body :is(.shell,.import-review,.upload){font-size:var(--horcys-font-size);min-width:0}
html[data-horcys-module="analytics"] body :is(.shell,.import-review) :is(input,select,textarea){font-size:var(--horcys-font-size)!important;max-width:100%;min-width:0}
html[data-horcys-module="analytics"] body .shell .btn{font-size:12px!important;font-weight:500!important;white-space:normal}
html[data-horcys-module="analytics"] body .shell .card header h2{font-size:15px!important;font-weight:600!important}
html[data-horcys-module="analytics"] body .shell .kpis{grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:8px}
html[data-horcys-module="analytics"] body .shell .kpi{min-height:64px;padding:9px 11px}
html[data-horcys-module="analytics"] body .shell .ctx,html[data-horcys-module="analytics"] body .shell .ctx>div{flex-wrap:wrap;min-width:0;gap:8px}
html[data-horcys-module="analytics"] body .shell .filters label{min-width:0;flex:1 1 145px}
html[data-horcys-module="analytics"] body .shell .filters .type-filter select{min-width:0;width:100%}
html[data-horcys-module="analytics"] body .shell nav button{line-height:1.4;white-space:normal}
html body :is(.officeFilters,.filters,.samplectl) :is(input,select){max-width:100%}
@media(max-width:700px){
 html[data-horcys-module="analytics"] body :is(.shell,.import-review) :is(input,select,textarea){font-size:16px!important}
 html[data-horcys-module="analytics"] body .shell .kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
 html[data-horcys-module="analytics"] body .shell .btn{min-height:44px}
}
