/* GOST 7798 family: styles are scoped to its canonical engineering card. */
.hex-card{color:#18394f;min-width:0;overflow-wrap:anywhere}
.hex-card *,.hex-card *::before,.hex-card *::after{box-sizing:border-box}
.hex-card [hidden]{display:none!important}
.hex-card [data-hex-screen],.hex-card section,.hex-card form,.hex-card fieldset,.hex-card figure,.hex-card [data-hex-selected-content]{min-width:0;max-width:100%}
.hex-card section{margin-block:2.5rem;scroll-margin-top:1rem}
.hex-card h1{font-size:clamp(1.6rem,3vw,2.7rem);line-height:1.2;max-width:32em}
.hex-card h2{font-size:clamp(1.4rem,2.1vw,1.95rem);line-height:1.25}
.hex-card h3{line-height:1.35}
.hex-card p,.hex-card li{line-height:1.6}
.hex-card button,.hex-card select,.hex-card input,.hex-card textarea{font:inherit;color:inherit}
.hex-card button{min-height:44px;max-width:100%;padding:.6rem .9rem;border:1px solid #91afc4;border-radius:5px;background:#edf4fa;color:#174465;cursor:pointer;line-height:1.3;white-space:normal}
.hex-card button:hover:not(:disabled){background:#daeaf5;border-color:#3f718f}
.hex-card button:disabled{opacity:.55;cursor:default}
.hex-card button[aria-pressed=true]{background:#175b87;border-color:#175b87;color:#fff}
.hex-card button[aria-pressed=true]:hover:not(:disabled){background:#124c73;color:#fff}
.hex-card :focus-visible{outline:3px solid #cb7100;outline-offset:3px}
.hex-card label{display:block;min-width:0;line-height:1.45}
.hex-card select,.hex-card input:not([type=radio]):not([type=checkbox]),.hex-card textarea{display:block;width:100%;max-width:100%;min-width:0;min-height:44px;padding:.65rem .7rem;margin-top:.4rem;border:1px solid #95b2c5;border-radius:4px;background:#fff}
.hex-card select:disabled{background:#f0f3f6;color:#52697a;opacity:1}
.hex-card textarea{min-height:7rem;resize:vertical}
.hex-card input[type=radio],.hex-card input[type=checkbox]{width:1.2rem;height:1.2rem;flex:0 0 auto;accent-color:#175b87}
.hex-card fieldset{margin:1.25rem 0;padding:1.1rem;border:1px solid #c1d4e1;border-radius:6px}
.hex-card legend{max-width:100%;padding:0 .4rem;font-weight:700}
.hex-controls,.hex-card .field-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem 1.25rem}
.hex-nav,.hex-tools,.hex-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:.65rem}
.hex-nav{margin-block:1.5rem;padding-block:1rem;border-block:1px solid #c8d9e4}
.hex-nav a{display:inline-flex;min-height:44px;align-items:center;padding:.35rem .6rem}
.hex-tools{margin-block:1rem 1.5rem}
.hex-toolbar{padding:.6rem;background:#f5f8fb;border:1px solid #c5d8e5;border-radius:6px}
.hex-card figure{margin:1rem 0}
.hex-card svg{display:block;width:100%;max-width:100%;height:auto}
.hex-card figcaption{font-size:.9rem;line-height:1.5;color:#4e687b;margin-top:.45rem}
.hex-overview{padding:1rem;border:1px solid #c8d9e4;border-radius:7px;background:#fff}
.hex-overview svg{max-height:19rem}
.hex-drawing{border:1px solid #c5d8e5;border-radius:6px;padding:.7rem;background:#fff}
.hex-dimension{cursor:pointer}
.hex-dimension:focus-visible{outline:none}
.hex-dimension:focus-visible text,.hex-dimension.is-active text{fill:#9b4800!important;font-weight:700}
.hex-dimension:focus-visible path,.hex-dimension.is-active path{stroke:#ad5600!important;stroke-width:2.4}
.hex-executions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem}
.hex-executions>legend{grid-column:1/-1}
.hex-executions article,.hex-execution{min-width:0;padding:.9rem;border:1px solid #b9cfde;border-radius:6px;background:#fff}
.hex-executions article h3{margin:.2rem 0 .7rem;font-size:1.05rem}
.hex-executions article p{font-size:.92rem;margin-bottom:0}
.hex-card .hex-execution{display:grid;grid-template-columns:1.3rem minmax(0,1fr);align-content:start;gap:.45rem .5rem;cursor:pointer;position:relative}
.hex-execution svg{grid-column:1/-1;grid-row:2;min-height:5rem;max-height:8rem}
.hex-execution strong{grid-column:2;grid-row:1;align-self:center}
.hex-execution span{grid-column:1/-1;font-size:.92rem}
.hex-execution input{grid-column:1;grid-row:1;margin:.1rem 0}
.hex-execution:has(input:checked){border-color:#17628f;box-shadow:0 0 0 2px #17628f;background:#edf6fb}
.hex-execution:has(input:focus-visible){outline:3px solid #cb7100;outline-offset:4px}
.hex-execution:has(input:focus-visible) input{outline:none}
.hex-card [data-hex-state],.hex-card [data-hex-help],.hex-card [data-hex-designation]{padding:.85rem 1rem;border-left:3px solid #497f9f;background:#eff6fa}
.hex-card [data-hex-designation]{font-weight:700}
.hex-scroll{max-width:100%;min-width:0;overflow:auto;overscroll-behavior:contain;margin:1rem 0;border:1px solid #c5d8e5;isolation:isolate}
.hex-card table{width:100%;border-collapse:separate;border-spacing:0;font-size:.9rem;line-height:1.45;text-align:left}
.hex-card caption{padding:.8rem;font-size:.98rem;font-weight:700;text-align:left;background:#f3f7fa}
.hex-card th,.hex-card td{padding:.65rem .7rem;vertical-align:top;border-right:1px solid #d0dfe9;border-bottom:1px solid #d0dfe9;min-width:4.3rem}
.hex-card th{background:#edf4f9;font-weight:600}
.hex-card thead th{position:sticky;top:0;z-index:2;background:#e7f0f7}
.hex-card th:first-child{position:sticky;left:0;z-index:1}
.hex-card thead th:first-child{z-index:3}
.hex-card table small{display:block;font-size:.9em;font-weight:400;line-height:1.35;margin-top:.3rem;color:#4b6374}
.hex-card [data-hex-fields] table{min-width:55rem}
.hex-card [data-hex-fields] th:first-child{width:18%;min-width:10rem}
.hex-card [data-hex-fields] td:last-child{min-width:18rem}
.hex-card [data-hex-field].is-active>*{background:#fff0d4}
.hex-card [data-hex-field] button{min-width:3rem;padding:.25rem .6rem;background:#fff}
.hex-matrix{min-width:92rem;font-variant-numeric:tabular-nums}
.hex-matrix td{white-space:nowrap}
.hex-card details{margin:1rem 0;border:1px solid #c6d9e5;border-radius:5px;padding:.2rem 1rem}
.hex-card summary{cursor:pointer;min-height:44px;padding:.7rem 0;line-height:1.4;font-weight:600}
.hex-card details[open]>summary{border-bottom:1px solid #d8e4ed;margin-bottom:.6rem}
.hex-rule-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.7rem 1rem}
.hex-rule-grid details{margin:0;align-self:start}
.hex-legend{display:grid;grid-template-columns:4rem minmax(0,1fr);gap:.6rem 1rem}
.hex-legend dt{font-weight:700}
.hex-legend dd{margin:0;line-height:1.45}
.hex-card .hex-confirm{display:flex;align-items:flex-start;gap:.7rem;margin-block:1rem}
.hex-confirm input{margin-top:.2rem}
.hex-card .item-config>label{margin-block:1rem}
.hex-dialog{width:min(96vw,95rem);max-width:96vw;max-height:94dvh;padding:1rem;border:1px solid #7f9fb4;border-radius:7px;color:#18394f;background:#fff;overflow:auto}
.hex-dialog::backdrop{background:rgb(15 35 50 / .65)}
.hex-dialog>form{display:flex;justify-content:flex-end;position:sticky;top:0;z-index:2;background:#fff;padding-bottom:.6rem}
.hex-dialog [data-hex-dialog-content]{max-width:100%;overflow:auto;overscroll-behavior:contain}
.hex-dialog svg{width:max(100%,60rem);max-width:none}
.hex-card>section[data-hex-print]{display:none}
@media(min-width:72rem) and (min-height:45rem){
 .hex-card [data-hex-selected-content]:not(:has(svg[data-hex-view=all]))>.hex-toolbar:first-child{position:sticky;top:.5rem;z-index:5;box-shadow:0 2px 8px rgb(22 55 78 / .08)}
}
@media(max-width:65rem){
 .hex-drawing>[data-hex-drawing]{overflow:auto;overscroll-behavior:contain}
 .hex-drawing svg{width:60rem;max-width:none}
 .hex-executions{grid-template-columns:repeat(2,minmax(0,1fr))}
 .hex-controls,.hex-card .field-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:40rem){
 .hex-card section{margin-block:2rem}
 .hex-controls,.hex-card .field-grid,.hex-rule-grid{grid-template-columns:minmax(0,1fr)}
 .hex-card fieldset{padding:.8rem}
 .hex-executions{gap:.75rem}
 .hex-executions article,.hex-card .hex-execution{padding:.65rem}
 .hex-executions article h3,.hex-execution strong{font-size:.95rem}
 .hex-execution span{font-size:.85rem}
 .hex-toolbar{gap:.45rem;padding:.45rem}
 .hex-toolbar button{flex:1 1 8.5rem;padding:.6rem .4rem;font-size:.9rem}
 .hex-tools{align-items:stretch}
 .hex-tools button{width:100%}
 .hex-drawing,.hex-overview{padding:.35rem}
 .hex-card figcaption{font-size:.84rem}
 .hex-dialog{padding:.5rem}
}
@media(max-width:24rem){.hex-executions{grid-template-columns:minmax(0,1fr)}}
@media(prefers-reduced-motion:reduce){.hex-card *{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
/* Loaded with the initial page: printing does not depend on JS or a print click. */
@media print{
 @page{size:A4;margin:12mm}
 html:has([data-hex-bolt]),body:has([data-hex-bolt]){background:#fff!important;color:#000!important;margin:0!important;padding:0!important;font:9pt/1.3 Arial,sans-serif!important}
 body:has([data-hex-bolt]) .skip-link,body:has([data-hex-bolt]) [href="#main"]{display:none!important}
 body:has([data-hex-bolt])>*:not(main){display:none!important}
 main#main:has([data-hex-bolt])>*:not([data-hex-bolt]){display:none!important}
 main:has([data-hex-bolt]){display:block!important;margin:0!important;padding:0!important;max-width:none!important;width:auto!important}
 [data-hex-bolt]>*{display:none!important}
 [data-hex-bolt]>section[data-hex-print]{display:block!important}
 [data-hex-bolt]{display:block!important;max-width:none!important;width:auto!important;margin:0!important;padding:0!important;color:#000!important}
 .hex-card [data-hex-screen],.hex-card dialog{display:none!important}
 .hex-card>section[data-hex-print]{margin:0!important;font:9pt/1.3 Arial,sans-serif;overflow:visible}
 .hex-print h2{font-size:14pt;line-height:1.2;margin:0 0 3mm}
 .hex-print p,.hex-print li{font-size:8.5pt;line-height:1.35;orphans:3;widows:3}
 .hex-print p{margin:2mm 0}
 .hex-print figure{margin:3mm 0;break-inside:avoid;page-break-inside:avoid}
 .hex-print svg{display:block;width:100%;height:auto;max-height:72mm;break-inside:avoid}
 .hex-print figcaption{margin-top:1mm;color:#000;font-size:8pt}
 .hex-print .hex-scroll{overflow:visible!important;max-height:none!important;max-width:none!important;border:0;margin:3mm 0}
 .hex-print table{table-layout:fixed;width:100%;min-width:0!important;border-collapse:collapse;font:8pt/1.3 Arial,sans-serif}
 .hex-print caption{font-size:9pt;padding:2mm 1mm;background:#fff;color:#000}
 .hex-print th,.hex-print td{position:static!important;transform:none!important;min-width:0!important;padding:1.3mm 1mm;border:1px solid #8d9ba5;background:#fff!important;color:#000!important;white-space:normal!important;overflow-wrap:anywhere;word-break:normal}
 .hex-print th:first-child{width:21%}
 .hex-print th:nth-child(2){width:11%}
 .hex-print th:nth-child(3){width:8%}
 .hex-print th:nth-child(4),.hex-print th:nth-child(5){width:10%}
 .hex-print th:nth-child(6){width:6%}
 .hex-print th:nth-child(7){width:34%}
 .hex-print thead{display:table-header-group}
 .hex-print tr{break-inside:avoid;page-break-inside:avoid}
 .hex-print table small{font-size:7.5pt;color:#000}
 .hex-print button{display:inline;min-width:0!important;min-height:0!important;padding:0!important;border:0!important;background:none!important;color:#000!important;font:inherit;font-weight:700;box-shadow:none;outline:0}
 .hex-print ul{margin:2mm 0;padding-left:5mm}
 .hex-print a{color:#000;text-decoration:none}
}
