/* V2 pocket-gauge calculator styles, ported from the approved design package and scoped under .v2-calc. */
.v2-calc, .v2-calc * { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 0; font-synthesis: none; }
.v2-calc button, .v2-calc input, .v2-calc select { font: inherit; color: inherit; }
.v2-calc button, .v2-calc a, .v2-calc input, .v2-calc select, .v2-calc summary { -webkit-tap-highlight-color: transparent; }
.v2-calc button { cursor: pointer; }
.v2-calc button:disabled { cursor: not-allowed; opacity: .48; }
.v2-calc button, .v2-calc input, .v2-calc select { border-radius: var(--radius-control); }
.v2-calc button, .v2-calc select, .v2-calc input, .v2-calc a { touch-action: manipulation; }
.v2-calc input, .v2-calc select { min-width: 0; }
.v2-calc button, .v2-calc a { transition: background-color var(--transition), border-color var(--transition), color var(--transition); }
.v2-calc button:focus-visible, .v2-calc a:focus-visible, .v2-calc input:focus-visible, .v2-calc select:focus-visible, .v2-calc summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.v2-calc a { color: inherit; text-underline-offset: 4px; }
.v2-calc button:hover:not(:disabled) { background-color: var(--accent-soft); }
.v2-calc svg, .v2-calc img { vertical-align: middle; }
.v2-calc img { max-width: 100%; height: auto; }
.v2-calc .icon { width: 22px; height: 22px; flex-shrink: 0; vertical-align: middle; }
.v2-calc [data-icon] { display: inline-flex; align-items: center; justify-content: center; }
.v2-calc [hidden] { display: none !important; }
.v2-calc h1, .v2-calc h2, .v2-calc h3, .v2-calc p, .v2-calc figure { margin: 0; }
.v2-calc h1, .v2-calc h2, .v2-calc h3, .v2-calc strong, .v2-calc .button, .v2-calc summary { font-family: var(--font-display); }
.v2-calc h1, .v2-calc h2, .v2-calc h3 { font-weight: 700; }
.v2-calc summary { font-weight: 600; }
.v2-calc { max-width: calc(var(--page-max) + var(--page-pad)*2); padding: 0 var(--page-pad); margin: 0 auto; }
.v2-calc .page-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 26px 0 24px; }
.v2-calc h1 { font-size: clamp(2rem, 3.1vw, 2.75rem); line-height: 1.12; letter-spacing: -.018em; }
.v2-calc .heading-actions { display: flex; align-items: center; gap: 20px; }
.v2-calc .run-tag { font-family: var(--font-mono); font-weight: 500; font-size: .75rem; letter-spacing: .08em; padding: 4px 8px; border: 1px solid var(--ink); border-radius: 2px; white-space: nowrap; }
.v2-calc .button { min-height: var(--control-height); padding: 8px 16px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--ink); background: transparent; font-size: 1.125rem; font-weight: 600; line-height: 1.3; text-decoration: none; }
.v2-calc .button-primary { background: var(--ink); color: white; border-color: var(--ink); }
.v2-calc .button-primary:hover:not(:disabled) { background: var(--ink-strong); color: white; }
.v2-calc .button-quiet { border-color: var(--line); }
.v2-calc .button-outline { background: transparent; }
.v2-calc .text-button { border: 0; background: none; padding: 8px 0; min-height: 44px; text-decoration: underline; text-underline-offset: 4px; font-size: var(--text-sm); }
.v2-calc .icon-button { width: 44px; height: 44px; padding: 10px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; background: transparent; flex-shrink: 0; }
.v2-calc .eyebrow, .v2-calc .field-label, .v2-calc .wire-column-labels, .v2-calc .schedule-field legend { font-family: var(--font-body); font-size: var(--text-sm); font-weight: 600; line-height: 1.4; letter-spacing: .11em; text-transform: uppercase; }
.v2-calc .field-label { display: block; margin-bottom: 8px; }
.v2-calc .field-description { margin-top: 4px; font-size: var(--text-sm); line-height: 1.4; color: var(--ink-muted); }
.v2-calc .conduit-section { border-top: 1.5px solid var(--ink); padding-top: 12px; }
.v2-calc .conduit-grid { display: grid; grid-template-columns: 142px 88px 160px minmax(240px, 1fr) 230px; grid-template-areas: 'diagram size type gauge install'; align-items: center; gap: 20px; padding: 18px 0 24px; }
.v2-calc .conduit-figure { grid-area: diagram; text-align: center; }
.v2-calc .conduit-art svg { max-width: 100%; height: auto; display: block; }
.v2-calc .conduit-figure figcaption { font-size: var(--text-xs); font-style: italic; margin-top: 3px; color: var(--ink-muted); white-space: nowrap; }
.v2-calc .current-size { grid-area: size; font-family: var(--font-mono); font-size: 2.65rem; font-weight: 500; line-height: 1; letter-spacing: -.08em; white-space: nowrap; }
.v2-calc .current-size span { font-size: .72em; margin-left: 1px; }
.v2-calc .current-size.long-size { font-size: 1.85rem; letter-spacing: -.07em; }
.v2-calc .conduit-type-field { grid-area: type; }
.v2-calc .size-field { grid-area: gauge; min-width: 0; }
.v2-calc .installation-field { grid-area: install; }
.v2-calc .select-wrap { position: relative; }
.v2-calc .select-wrap select { appearance: none; width: 100%; border: 1px solid var(--ink); padding: 8px 36px 8px 12px; height: var(--control-height); background: var(--surface); font-size: var(--text-base); font-weight: 500; }
.v2-calc .select-wrap > [data-icon], .v2-calc .select-wrap > .icon { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.v2-calc .select-wrap .icon { width: 20px; height: 20px; }
.v2-calc .installation-controls { display: flex; align-items: center; gap: 4px; }
.v2-calc .installation-controls .select-wrap { flex: 1; min-width: 0; }
.v2-calc .installation-controls select { font-size: var(--text-sm); padding-left: 10px; }
.v2-calc .installation-controls .icon-button { width: 34px; padding: 6px; }
.v2-calc .size-gauge { display: flex; border: 1px solid var(--ink); border-radius: var(--radius-control); overflow: hidden; width: 100%; }
.v2-calc .size-gauge button { background: var(--surface); position: relative; flex: 1 1 0; min-width: 0; min-height: 54px; padding: 8px 3px 12px; border: 0; border-right: 1px solid var(--ink); border-radius: 0; font-family: var(--font-mono); font-size: 1.0625rem; font-weight: 500; white-space: nowrap; }
.v2-calc .size-gauge button:last-child { border-right: 0; font-family: var(--font-display); font-size: 1.125rem; font-weight: 600; }
.v2-calc .size-gauge button::after { content: ''; position: absolute; bottom: 0; left: 8px; right: 8px; height: 6px; background: repeating-linear-gradient(to right, var(--ink) 0 1px, transparent 1px 10px); opacity: .7; }
.v2-calc .size-gauge button[aria-pressed='true'] { background: var(--accent); box-shadow: inset 0 0 0 1px var(--ink); }
.v2-calc .size-gauge .selected-check { width: 12px; height: 12px; margin-left: 3px; stroke-width: 2.5; }
.v2-calc .size-gauge button:focus-visible { outline-offset: -4px; }
.v2-calc .schedule-field { margin: 8px 0 0; padding: 0; border: 0; display: flex; gap: 6px; }
.v2-calc .schedule-field legend { font-size: var(--text-xs); margin-bottom: 4px; letter-spacing: .04em; }
.v2-calc .schedule-field label { flex: 1; position: relative; }
.v2-calc .schedule-field input { position: absolute; opacity: 0; width: 100%; height: 44px; margin: 0; cursor: pointer; }
.v2-calc .schedule-field span { display: flex; justify-content: center; align-items: center; height: 44px; border: 1px solid var(--line); border-radius: var(--radius-control); font-family: var(--font-mono); }
.v2-calc .schedule-field input:checked + span { background: var(--accent); border-color: var(--ink); }
.v2-calc .schedule-field input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.v2-calc .wires-section { border-top: 1.5px solid var(--ink); }
.v2-calc .wires-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; }
.v2-calc .section-title { display: flex; align-items: center; gap: 28px; }
.v2-calc #conductor-count { font-size: var(--text-sm); }
.v2-calc .desktop-add { min-width: 224px; }
.v2-calc .mobile-add { display: none; }
.v2-calc .wire-column-labels, .v2-calc .wire-row { display: grid; grid-template-columns: 1.12fr 1.5fr 1fr 144px 1.05fr 96px; gap: 18px; align-items: center; }
.v2-calc .wire-column-labels { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 10px; font-size: .8125rem; }
.v2-calc .wire-row { padding: 16px 10px; border-bottom: 1px solid var(--line); }
.v2-calc .wire-row > * { min-width: 0; }
.v2-calc .wire-identity { display: flex; align-items: center; gap: 14px; }
.v2-calc .wire-end { width: 25px; height: 25px; border-radius: 50%; border: 3px solid var(--ink); background: var(--copper); display: inline-block; flex-shrink: 0; box-shadow: inset 0 0 0 2px var(--paper); }
.v2-calc .wire-group-label { font-size: 1.125rem; white-space: nowrap; }
.v2-calc .wire-mobile-meta { display: none; }
.v2-calc .wire-row select { font-size: var(--text-sm); padding-left: 10px; }
.v2-calc .quantity-control { height: 46px; display: flex; border: 1px solid var(--ink); border-radius: var(--radius-control); overflow: hidden; }
.v2-calc .quantity-control button { width: 44px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; background: var(--surface); border-radius: 0; }
.v2-calc .quantity-control input { appearance: textfield; -moz-appearance: textfield; flex: 1; width: 50px; min-width: 34px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-radius: 0; text-align: center; font-family: var(--font-mono); font-weight: 500; font-size: 1.125rem; background: var(--surface); padding: 0; }
.v2-calc .quantity-control input::-webkit-outer-spin-button, .v2-calc .quantity-control input::-webkit-inner-spin-button { appearance: none; margin: 0; }
.v2-calc .quantity-control input:focus-visible, .v2-calc .quantity-control button:focus-visible { outline-offset: -3px; }
.v2-calc .quantity-control:has(input[aria-invalid='true']) { border-color: var(--negative); box-shadow: 0 0 0 1px var(--negative); }
.v2-calc .row-area { font-family: var(--font-mono); font-size: 1.0625rem; text-align: right; white-space: nowrap; }
.v2-calc .row-actions { display: flex; gap: 8px; }
.v2-calc .row-actions .icon-button { border-color: var(--ink); }
.v2-calc .wire-edit-button, .v2-calc .row-more { display: none; }
.v2-calc .row-error { color: var(--negative); grid-column: 1 / -1; font-size: var(--text-sm); margin-top: -8px; }
.v2-calc .empty-wires { padding: 28px 0; display: flex; gap: 16px; align-items: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.v2-calc .empty-wires .icon { width: 32px; height: 32px; color: var(--ink-muted); }
.v2-calc .empty-wires strong { font-size: 1.25rem; }
.v2-calc .empty-wires p { color: var(--ink-muted); font-size: var(--text-sm); margin-top: 2px; }
.v2-calc .form-notice { padding: 10px 12px; margin: 12px 0; border-left: 3px solid var(--negative); background: var(--negative-soft); color: var(--negative); font-size: var(--text-sm); }
.v2-calc .result-strip { margin: 18px -6px 0; padding: 16px 24px; display: grid; grid-template-columns: 175px 1.2fr 190px auto; gap: 24px; align-items: center; background: var(--accent-soft); border: 1px solid var(--ink); border-radius: var(--radius-control); }
.v2-calc .result-number { display: flex; flex-direction: column; }
.v2-calc .result-number output { font-family: var(--font-mono); font-size: 2.65rem; font-weight: 500; line-height: 1.2; letter-spacing: -.07em; }
.v2-calc .result-status { border-left: 1px solid var(--line-strong); padding-left: 24px; }
.v2-calc .status-line { display: flex; gap: 9px; align-items: center; }
.v2-calc .status-line strong { font-size: 1.5rem; line-height: 1.12; }
.v2-calc #status-icon { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex-shrink: 0; color: white; background: var(--positive); border-radius: 50%; }
.v2-calc #status-icon .icon { width: 20px; height: 20px; stroke-width: 2.2; }
.v2-calc #status-subtitle { font-size: var(--text-sm); display: block; margin-top: 4px; }
.v2-calc .result-area { border-left: 1px solid var(--ink); padding-left: 24px; }
.v2-calc .result-area .eyebrow { display: block; }
.v2-calc .result-area strong { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 400; display: block; margin-top: 3px; white-space: nowrap; }
.v2-calc .result-actions { display: flex; align-items: center; gap: 12px; }
.v2-calc .result-actions .button { white-space: nowrap; font-size: 1rem; padding: 8px 12px; }
.v2-calc .result-mobile-details, .v2-calc .mobile-scope { display: none; }
.v2-calc .result-strip[data-status='over'], .v2-calc .result-strip[data-status='invalid'] { background: var(--negative-soft); }
.v2-calc .result-strip[data-status='over'] #status-icon, .v2-calc .result-strip[data-status='invalid'] #status-icon { background: var(--negative); }
.v2-calc .result-strip[data-status='empty'] { background: var(--surface); }
.v2-calc .result-strip[data-status='empty'] #status-icon { background: var(--ink-muted); }
.v2-calc .result-strip[data-status='rounding'] { background: var(--warning-soft); }
.v2-calc .result-strip[data-status='rounding'] #status-icon { background: var(--warning); }
.v2-calc .calculation-details { border: 1px solid var(--ink); border-radius: var(--radius-control); margin: 16px -6px 0; }
.v2-calc .calculation-details > summary { list-style: none; display: flex; align-items: center; gap: 16px; min-height: 68px; cursor: pointer; padding: 10px 16px; }
.v2-calc summary::-webkit-details-marker { display: none; }
.v2-calc .calculation-details > summary > [data-icon]:last-child { margin-left: auto; }
.v2-calc .calculation-details summary strong { display: block; font-size: 1.375rem; line-height: 1.15; }
.v2-calc .calculation-details summary small { display: block; font-family: var(--font-body); font-size: var(--text-xs); font-weight: 400; margin-top: 2px; }
.v2-calc .calculation-details[open] > summary > [data-icon]:last-child { transform: rotate(180deg); }
.v2-calc .calculation-details .details-content { padding: 0 20px 20px; }
.v2-calc .include-note { display: none; }
.v2-calc .details-content { font-size: var(--text-sm); }
.v2-calc .details-content h3 { font-size: 1.25rem; margin: 18px 0 8px; }
.v2-calc .details-content p { margin-bottom: 10px; }
.v2-calc .detail-list { margin: 16px 0; }
.v2-calc .detail-list > div { display: flex; justify-content: space-between; gap: 20px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.v2-calc .detail-list dt { color: var(--ink-muted); }
.v2-calc .detail-list dd { margin: 0; text-align: right; font-family: var(--font-mono); }
.v2-calc .formula { background: var(--surface); padding: 12px; border: 1px solid var(--line); font-family: var(--font-mono); overflow-wrap: anywhere; }
.v2-calc .source-note { color: var(--ink-muted); font-size: var(--text-xs); }
.v2-calc .source-note a { overflow-wrap: anywhere; }
.v2-calc .next-size { margin: 14px 0; }
.v2-calc .reference-section { border-top: 1.5px solid var(--ink); margin-top: 24px; padding-top: 12px; }
.v2-calc .reference-title { display: flex; align-items: center; gap: 26px; }
.v2-calc .reference-title h2 { font-size: 1.625rem; }
.v2-calc .reference-title .text-button { border-left: 1px solid var(--line); padding-left: 24px; }
.v2-calc .reference-values { display: grid; grid-template-columns: repeat(3,1fr); margin: 16px 0 10px; }
.v2-calc .reference-values > div { display: flex; justify-content: center; align-items: baseline; gap: 14px; border-right: 1px solid var(--line-strong); font-size: var(--text-lg); }
.v2-calc .reference-values > div:last-child { border: 0; }
.v2-calc .reference-values strong { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 500; }
.v2-calc .reference-values .active-rule strong { box-shadow: 0 4px 0 var(--accent); }
.v2-calc .reference-section > p { font-size: var(--text-xs); color: var(--ink-muted); }
.v2-calc .sheet-dialog { border: 1px solid var(--ink); border-radius: 12px; padding: 28px; color: var(--ink); background: var(--paper); width: min(520px, calc(100vw - 48px)); max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain; }
.v2-calc .sheet-dialog::backdrop { background: var(--scrim); }
.v2-calc .sheet-dialog[open] { animation: dialog-in 150ms var(--ease); }
.v2-calc .sheet-handle { display: none; }
.v2-calc .sheet-close { position: absolute; top: 14px; right: 14px; }
.v2-calc .sheet-dialog h2 { font-size: 2rem; line-height: 1.2; padding-right: 38px; margin-bottom: 6px; }
.v2-calc .sheet-intro { font-size: var(--text-base); line-height: 1.4; margin-bottom: 22px; }
.v2-calc .sheet-dialog .field-label { margin: 16px 0 8px; }
.v2-calc .sheet-dialog .select-wrap select { height: 48px; }
.v2-calc .wire-size-options { border: 0; margin: 0; padding: 0; }
.v2-calc .wire-size-options legend { padding: 0; float: left; width: 100%; }
.v2-calc #wire-size-options { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; clear: both; }
.v2-calc .wire-size-button { min-height: 48px; padding: 8px 4px; border: 1px solid var(--ink); background: var(--surface); font-family: var(--font-display); font-weight: 600; font-size: 1.125rem; }
.v2-calc .wire-size-button[aria-pressed='true'] { background: var(--accent); box-shadow: inset 0 0 0 1px var(--ink); }
.v2-calc .wire-size-button .icon { width: 16px; height: 16px; margin-left: 3px; }
.v2-calc .sheet-quantity { height: 54px; }
.v2-calc .sheet-quantity button { width: 64px; }
.v2-calc .sheet-quantity input { font-size: 1.5rem; }
.v2-calc .sheet-hint { font-size: var(--text-sm); margin-top: 10px; color: var(--ink-muted); }
.v2-calc .sheet-bottom { padding-top: 24px; }
.v2-calc .sheet-submit { width: 100%; height: 52px; font-size: 1.25rem; }
.v2-calc .sheet-submit .icon { width: 26px; height: 26px; }
.v2-calc .all-conduit-sizes { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.v2-calc .all-conduit-sizes button { min-height: 72px; border: 1px solid var(--ink); background: var(--surface); font-family: var(--font-mono); font-size: 1.125rem; padding: 10px 4px; }
.v2-calc .all-conduit-sizes button small { display: block; font-family: var(--font-body); font-size: .75rem; color: var(--ink-muted); }
.v2-calc .all-conduit-sizes button[aria-pressed='true'] { background: var(--accent); }
.v2-calc .dialog-actions { display: flex; gap: 12px; margin-top: 20px; }
.v2-calc .dialog-actions .button { flex: 1; }
.v2-calc .help-content { margin-top: 18px; }
.v2-calc .help-content p, .v2-calc .help-content ul { margin: 12px 0; }
.v2-calc .help-content li { margin: 10px 0; }
.v2-calc .help-content h3 { font-size: 1.25rem; margin-top: 20px; }
.v2-calc .help-content a { overflow-wrap: anywhere; }
.v2-calc .reset-actions { display: grid; gap: 10px; }
.v2-calc .toast { position: fixed; z-index: 20; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; gap: 16px; align-items: center; color: var(--ink); background: var(--surface); border: 1px solid var(--ink); border-radius: 6px; padding: 8px 10px 8px 16px; box-shadow: 0 4px 20px rgb(16 48 140 / 10%); max-width: calc(100vw - 32px); font-size: var(--text-sm); }
.v2-calc .toast > span { min-width: 0; }
.v2-calc .toast #undo-button { background: var(--accent); border: 1px solid var(--ink); padding: 8px 12px; min-height: 44px; font-weight: 600; }
.v2-calc .toast .icon-button { width: 36px; padding: 8px; }
body.modal-open { overflow: hidden; }
.print-output { display: none; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1199px) and (min-width: 961px) {
  :root { --page-pad: 24px; }
  .v2-calc .conduit-grid { grid-template-columns: 120px 78px 132px minmax(210px,1fr) 190px; gap: 14px; }
  .v2-calc .current-size { font-size: 2.25rem; }
  .v2-calc .conduit-figure .desktop-only { display: none; }
  .v2-calc .wire-column-labels, .v2-calc .wire-row { grid-template-columns: .9fr 1.3fr .9fr 134px 1fr 94px; gap: 12px; }
  .v2-calc .row-area { font-size: var(--text-sm); }
  .v2-calc .result-strip { grid-template-columns: 150px 1fr 165px; gap: 18px; }
  .v2-calc .result-actions { grid-column: 1 / -1; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 12px; }
}

@media (max-width: 960px) {
  :root { --page-pad: 20px; }
  .v2-calc .conduit-grid { grid-template-columns: 1fr 1fr; grid-template-areas: 'size diagram' 'type diagram' 'gauge gauge' 'install install'; gap: 12px 24px; padding-top: 14px; }
  .v2-calc .current-size { font-size: 3.5rem; }
  .v2-calc .current-size.long-size { font-size: 2.5rem; }
  .v2-calc .conduit-figure { max-width: 150px; justify-self: center; }
  .v2-calc .conduit-type-field { max-width: 210px; }
  .v2-calc .size-field { margin-top: 4px; }
  .v2-calc .conduit-type-field > .desktop-only, .v2-calc .installation-field > .desktop-only, .v2-calc .conduit-figure .desktop-only { display: none; }
  .v2-calc .installation-controls .icon-button { width: 44px; }
  .v2-calc .installation-controls select { font-size: var(--text-base); }
  .v2-calc .wire-column-labels { display: none; }
  .v2-calc .wire-row { display: grid; grid-template-columns: 1fr 144px 44px; grid-template-areas: 'identity quantity actions'; gap: 8px; padding: 18px 0; }
  .v2-calc .wire-identity { grid-area: identity; align-items: flex-start; gap: 12px; }
  .v2-calc .wire-identity .wire-end { margin-top: 5px; }
  .v2-calc .wire-mobile-meta { display: block; }
  .v2-calc .wire-mobile-meta span { display: block; font-size: var(--text-sm); }
  .v2-calc .wire-mobile-meta .mobile-row-area { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--ink-muted); margin-top: 2px; }
  .v2-calc .wire-edit-button { display: inline-flex; align-items: center; padding: 0; border: 0; background: none; text-align: left; font-size: 1.5rem; font-weight: 700; font-family: var(--font-display); line-height: 1.25; min-height: 44px; }
  .v2-calc .wire-insulation, .v2-calc .wire-size, .v2-calc .row-area, .v2-calc .wire-group-label { display: none; }
  .v2-calc .wire-row > .quantity-control { grid-area: quantity; align-self: start; margin-top: 3px; }
  .v2-calc .row-actions { grid-area: actions; position: relative; align-self: start; }
  .v2-calc .row-actions > .icon-button:not(.row-more) { display: none; }
  .v2-calc .row-more { display: flex; width: 44px; border-color: transparent !important; padding: 6px; }
  .v2-calc .wire-row .row-error { grid-column: 1 / -1; }
  .v2-calc .result-strip { grid-template-columns: 150px 1fr auto; gap: 16px; }
  .v2-calc .result-area { display: none; }
  .v2-calc .result-actions { grid-column: 1 / -1; justify-content: flex-end; padding-top: 12px; border-top: 1px solid var(--line); }
}

@media (max-width: 600px) {
  :root { --page-pad: 18px; --summary-height: 106px; }
  html { scroll-padding-top: 0; scroll-padding-bottom: calc(var(--summary-measured-height, var(--summary-height)) + 16px); }
  .v2-calc { padding-bottom: calc(var(--summary-measured-height, calc(var(--summary-height) + env(safe-area-inset-bottom))) + 22px); }
  .v2-calc .page-heading { padding: 16px 0 18px; position: relative; display: block; }
  .v2-calc h1 { font-size: 1.75rem; line-height: 1.12; letter-spacing: -.025em; white-space: nowrap; }
  .v2-calc .heading-actions { position: absolute; bottom: 18px; right: 0; }
  .v2-calc .run-tag { font-size: .625rem; letter-spacing: .08em; padding: 3px 6px; }
  .v2-calc .reset-button { display: none; }
  .v2-calc .conduit-section { padding-top: 10px; }
  .v2-calc .eyebrow, .v2-calc .field-label { font-size: var(--text-sm); letter-spacing: .105em; }
  .v2-calc .conduit-grid { grid-template-columns: 1fr 140px; gap: 7px 18px; padding: 12px 0 18px; }
  .v2-calc .current-size { font-size: 3.15rem; letter-spacing: -.08em; }
  .v2-calc .current-size.long-size { font-size: 2.25rem; }
  .v2-calc .conduit-figure { align-self: center; max-width: 140px; }
  .v2-calc .conduit-art svg { max-height: 88px; width: 140px; }
  .v2-calc .conduit-figure figcaption { font-size: .8125rem; margin-top: 0; }
  .v2-calc .conduit-type-field { max-width: 160px; }
  .v2-calc .conduit-type-field .select-wrap select { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; height: 44px; padding: 6px 32px 6px 10px; }
  .v2-calc .field-description { font-size: var(--text-xs); margin-top: 3px; }
  .v2-calc .size-field { margin-top: 9px; }
  .v2-calc .field-label { margin-bottom: 7px; }
  .v2-calc .size-gauge button { min-height: 48px; font-size: 1.0625rem; }
  .v2-calc .size-gauge button:last-child { font-size: 1.125rem; }
  .v2-calc .installation-field { margin-top: 10px; }
  .v2-calc .installation-controls { gap: 6px; }
  .v2-calc .installation-controls .select-wrap select { font-family: var(--font-display); font-size: 1.125rem; font-weight: 600; height: 44px; }
  .v2-calc .installation-controls .icon-button { width: 44px; padding: 8px; }
  .v2-calc .section-title { justify-content: space-between; width: 100%; gap: 8px; }
  .v2-calc .wires-toolbar { padding: 12px 0 10px; }
  .v2-calc #conductor-count { font-size: var(--text-sm); }
  .v2-calc .desktop-add { display: none; }
  .v2-calc .mobile-add { display: flex; width: 100%; margin-top: 12px; height: 48px; font-size: 1.25rem; }
  .v2-calc .mobile-add .icon { width: 26px; height: 26px; }
  .v2-calc .wire-row { grid-template-columns: minmax(0,1fr) 136px 44px; gap: 4px; padding: 12px 0 14px; border-top: 1px solid var(--line); border-bottom: 0; }
  .v2-calc .wire-identity { gap: 10px; }
  .v2-calc .wire-end { width: 24px; height: 24px; }
  .v2-calc .wire-edit-button { font-size: 1.375rem; min-height: 44px; }
  .v2-calc .wire-mobile-meta span { font-size: .8125rem; line-height: 1.35; }
  .v2-calc .wire-mobile-meta .mobile-row-area { font-family: var(--font-body); font-size: .8125rem; margin-top: 3px; }
  .v2-calc .quantity-control { height: 46px; }
  .v2-calc .quantity-control button { width: 44px; min-height: 44px; }
  .v2-calc .quantity-control input { font-size: 1.125rem; min-width: 42px; width: 42px; }
  .v2-calc .row-more { width: 44px; padding: 10px; }
  .v2-calc .result-strip { position: fixed; z-index: 5; bottom: 0; left: 0; right: 0; margin: 0; padding: 13px var(--page-pad) calc(12px + env(safe-area-inset-bottom)); border: 0; border-top: 1.5px solid var(--ink); border-radius: 0; display: grid; grid-template-columns: 102px minmax(0,1fr) 66px; column-gap: 10px; min-height: var(--summary-height); background: var(--accent-soft); }
  .v2-calc .result-number .eyebrow { font-size: .6875rem; letter-spacing: .09em; }
  .v2-calc .result-number output { font-size: 1.9375rem; letter-spacing: -.08em; margin-top: 1px; }
  .v2-calc .mobile-scope { display: block; font-size: .6875rem; line-height: 1.3; margin-top: 1px; }
  .v2-calc .result-status { padding-left: 10px; border-left: 1px solid var(--ink); min-width: 0; }
  .v2-calc .status-line { gap: 5px; align-items: flex-start; }
  .v2-calc .status-line strong { font-size: 1rem; line-height: 1.15; }
  .v2-calc #status-icon { width: 19px; height: 19px; }
  .v2-calc #status-icon .icon { width: 14px; height: 14px; }
  .v2-calc #status-subtitle { font-size: .6875rem; line-height: 1.4; margin-top: 5px; }
  .v2-calc .result-strip .desktop-only { display: none; }
  .v2-calc .result-mobile-details { display: inline-flex; min-height: 44px; padding: 5px 7px; font-size: 1rem; }
  .v2-calc .calculation-details { border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; margin: 16px 0 0; }
  .v2-calc .calculation-details > summary { min-height: 48px; padding: 8px 0; gap: 10px; }
  .v2-calc .calculation-details summary strong { font-size: 1.25rem; }
  .v2-calc .calculation-details summary small { display: none; }
  .v2-calc .calculation-details > summary > [data-icon]:last-child { display: none; }
  .v2-calc .calculation-details .details-content { padding: 0 0 14px; }
  .v2-calc .include-note { display: block; font-size: var(--text-xs); margin-top: 10px; }
  .v2-calc .reference-section { margin-top: 36px; padding-top: 16px; }
  .v2-calc .reference-title { align-items: flex-start; gap: 8px; flex-direction: column; }
  .v2-calc .reference-title h2 { font-size: 1.5rem; }
  .v2-calc .reference-title .text-button { border: 0; padding: 0; min-height: 32px; }
  .v2-calc .reference-values { margin-top: 14px; }
  .v2-calc .reference-values > div { flex-direction: column; align-items: center; gap: 4px; font-size: .8125rem; }
  .v2-calc .reference-values strong { font-size: 1.375rem; }
  .v2-calc .reference-section > p { margin-top: 14px; }
  .v2-calc .sheet-dialog { position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-width: none; margin: 0; max-height: calc(100dvh - 20px); padding: 28px 20px calc(22px + env(safe-area-inset-bottom)); border: 0; border-top: 1px solid var(--line); border-radius: var(--radius-sheet) var(--radius-sheet) 0 0; }
  .v2-calc .sheet-dialog h2 { font-size: 1.9375rem; padding-right: 36px; margin-top: 2px; }
  .v2-calc .sheet-handle { display: block; position: absolute; left: calc(50% - 24px); top: 10px; width: 48px; height: 5px; border-radius: 8px; background: #b1b8c9; }
  .v2-calc .sheet-close { top: 19px; right: 12px; }
  .v2-calc .sheet-intro { margin-bottom: 16px; font-size: var(--text-sm); }
  .v2-calc .sheet-dialog .field-label { margin-top: 14px; }
  .v2-calc .sheet-dialog .select-wrap select { font-size: 1rem; }
  .v2-calc .wire-size-button { min-height: 48px; }
  .v2-calc .sheet-quantity { height: 52px; }
  .v2-calc .sheet-quantity input { font-size: 1.5rem; }
  .v2-calc .sheet-quantity button { width: 62px; }
  .v2-calc .sheet-hint { font-size: var(--text-xs); line-height: 1.4; }
  .v2-calc .sheet-bottom { padding-top: 20px; }
  .v2-calc .sheet-submit { height: 52px; }
  .v2-calc .compact-dialog { padding-top: 36px; }
  .v2-calc .toast { bottom: calc(var(--summary-measured-height, calc(var(--summary-height) + env(safe-area-inset-bottom))) + 12px); gap: 8px; width: calc(100vw - 28px); }
  .v2-calc .all-conduit-sizes { gap: 8px; }
  .v2-calc .dialog-actions { gap: 8px; }
  .v2-calc .dialog-actions .button { padding: 8px 10px; font-size: 1rem; }
}

@media (max-width: 374px) {
  :root { --page-pad: 14px; }
  .v2-calc .page-heading { padding-top: 12px; padding-bottom: 14px; }
  .v2-calc .heading-actions { bottom: 14px; }
  .v2-calc h1 { font-size: 1.625rem; }
  .v2-calc .conduit-grid { grid-template-columns: 1fr 126px; gap: 8px 12px; padding-bottom: 14px; }
  .v2-calc .conduit-art svg { width: 126px; }
  .v2-calc .wire-row { grid-template-columns: minmax(0,1fr) 136px 44px; }
  .v2-calc .wire-identity { gap: 7px; }
  .v2-calc .wire-end { width: 20px; height: 20px; border-width: 2px; }
  .v2-calc .wire-mobile-meta span { font-size: .75rem; }
  .v2-calc .row-more { width: 44px; }
  .v2-calc .quantity-control button { width: 44px; }
  .v2-calc .result-strip { grid-template-columns: 94px minmax(0,1fr) 60px; gap: 8px; }
  .v2-calc .result-number output { font-size: 1.8125rem; }
  .v2-calc .status-line strong { font-size: .9375rem; }
  .v2-calc .result-status { padding-left: 8px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .v2-calc, .v2-calc *, .v2-calc *::before, .v2-calc *::after { animation: none !important; transition: none !important; } }
@media print {
  @page { size: A4; margin: 18mm; }
  
  body > :not(.print-output) { display: none !important; }
  .print-output { display: block; }
  .print-output h1 { font-size: 22pt; white-space: normal; margin-bottom: 16pt; }
  .print-output pre { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font-mono); font-size: 10pt; line-height: 1.6; }
}


/* Round 3: keep the mobile result strip visible above the cookie banner. */
@media (max-width: 600px) {
  html.consent-open .v2-calc .result-strip { bottom: var(--consent-height, 0px); padding-bottom: 12px; }
  html.consent-open .v2-calc { padding-bottom: calc(var(--summary-measured-height, var(--summary-height)) + var(--consent-height, 0px) + 22px); }
  html.consent-open { scroll-padding-bottom: calc(var(--summary-measured-height, var(--summary-height)) + var(--consent-height, 0px) + 16px); }
  html.consent-open .v2-calc .toast { bottom: calc(var(--summary-measured-height, var(--summary-height)) + var(--consent-height, 0px) + 12px); }
}

/* Round 4: slimmer mobile result strip while the consent banner is open. */
@media (max-width: 600px) {
  html.consent-open .v2-calc .result-strip { padding-top: 8px; padding-bottom: 8px; min-height: 0; }
}
