/* Ground-source heat pump boreholes — on top of calc.css (light only, like calc.css) */
main.gs .tabs { grid-template-columns: repeat(4, 1fr); }
main.gs .stage-bar { justify-content: flex-start; gap: 8px; flex-wrap: wrap; }
main.gs .stage-bar .hist { margin-left: auto; }
#view, #tChart { display: block; width: 100%; height: auto; user-select: none; touch-action: none; }
.hit { fill: transparent; stroke: none; }
.handle { cursor: move; }
.handle.hx { cursor: ns-resize; }
.handle .knob { fill: var(--surface); stroke: var(--sel); stroke-width: 1.8; }
.handle:hover .knob, .handle:focus .knob { fill: var(--sel); }

/* the scheme */
.gs-sky { fill: var(--surface-2); }
.gs-earth { fill: var(--concrete); stroke: var(--x-a99f8c, #a99f8c); stroke-width: 1.2; }
.gs-water { fill: var(--x-d7e6f3, #d7e6f3); stroke: var(--x-7f9fc4, #7f9fc4); stroke-width: 1; }
.gs-wl { stroke: var(--blue); stroke-width: 1.4; }
.gs-dam { fill: var(--line-2); stroke: var(--x-6e7177, #6e7177); stroke-width: 1.2; }
.gs-pipe { fill: none; stroke: var(--text-2); stroke-linecap: round; }
.gs-pipe-in { fill: none; stroke: var(--x-b9c9da, #b9c9da); stroke-linecap: round; }
.gs-house { fill: var(--fill-1); stroke: var(--text-2); stroke-width: 1.2; }
.gs-runner { fill: var(--surface); stroke: var(--text-2); stroke-width: 1.2; }
.gs-egl { fill: none; stroke: var(--heat); stroke-width: 1.4; stroke-dasharray: 6 4; }
.gs-dim { stroke: var(--text-4); stroke-width: .9; fill: none; }
.gs-dimh { fill: var(--text-4); }
.gs-note { font-size: 11px; fill: var(--text-3); }
.gs-lab { font-size: 11.5px; fill: var(--text-2); }

/* charts */
.gs-grid { fill: var(--fill-2); }
.gs-frame { fill: none; stroke: var(--steel-350); stroke-width: .8; pointer-events: none; }
.gs-river { fill: none; stroke: var(--blue); stroke-width: 2.2; }
.gs-res { fill: none; stroke: var(--text-4); stroke-width: 1.3; stroke-dasharray: 5 4; }
.gs-use { fill: color-mix(in srgb, var(--good) 16%, transparent); stroke: none; }
.gs-useline { fill: none; stroke: var(--good); stroke-width: 2; }
.gs-qd { stroke: var(--sel); stroke-width: 1.2; stroke-dasharray: 4 3; fill: none; pointer-events: none; }
.gs-dot { stroke: var(--halo); stroke-width: 1.5; fill: var(--blue); }
.gs-zone-k { fill: color-mix(in srgb, var(--blue) 10%, transparent); }
.gs-zone-f { fill: color-mix(in srgb, var(--good) 10%, transparent); }
.gs-zone-p { fill: color-mix(in srgb, var(--heat) 9%, transparent); }
.gs-band { fill: color-mix(in srgb, var(--x-6e7177, #6e7177) 12%, transparent); }
.gs-pline { fill: none; stroke: var(--steel-400); stroke-width: .8; }
.gs-plab { font-size: 10.5px; fill: var(--text-3); paint-order: stroke; stroke: var(--halo); stroke-width: 3px; stroke-linejoin: round; }
.gs-op { fill: var(--load, #e0562b); stroke: var(--halo); stroke-width: 1.5; }
.ch-l { font-size: 12px; font-weight: 600; paint-order: stroke; stroke: var(--surface, #fff); stroke-width: 3px; stroke-linejoin: round; }
.gs-lriver { fill: var(--x-2b5a92, #2b5a92); }
.gs-luse { fill: var(--olive); }
.gs-lres { fill: var(--text-2); font-weight: 500; }
.gs-lk { fill: var(--x-2b5a92, #2b5a92); } .gs-lf { fill: var(--olive); } .gs-lp { fill: var(--x-a3402a, #a3402a); }
.pill rect { fill: var(--surface, #fff); stroke: var(--steel-300); }
.pill text { font-size: 11.5px; font-weight: 600; fill: var(--text-2); font-variant-numeric: tabular-nums; }
.pill.sel rect { stroke: var(--sel); } .pill.sel text { fill: var(--sel); }
.pill.egl rect { stroke: color-mix(in srgb, var(--heat) 50%, transparent); } .pill.egl text { fill: var(--x-a3402a, #a3402a); }
.pill.op rect { stroke: color-mix(in srgb, var(--load) 50%, transparent); } .pill.op text { fill: var(--load-ink); }
.pill.editable { cursor: text; }
.pill.editable:hover rect, .pill.editable:focus rect { stroke: var(--sel); stroke-width: 1.4; }
.pill.editable:focus { outline: none; }
.stage, .block { position: relative; }
.gs-edit { position: absolute; transform: translate(-50%, -50%); z-index: 5; display: flex; align-items: center; gap: 4px; background: var(--surface, #fff); border: 1.5px solid var(--sel); border-radius: 9px; padding: 2px 8px 2px 4px; box-shadow: 0 6px 18px rgba(20, 22, 28, .14); }
.gs-edit input { width: 72px; border: 0; outline: none; font: inherit; font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; padding: 3px 2px; background: transparent; color: var(--text); }
.gs-edit span { font-size: 11.5px; color: var(--text-3); }

/* live strip and flags */
.gs-live { display: flex; flex-wrap: wrap; gap: 4px 18px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; min-height: 38px; align-items: center; }
.gs-live b { font-weight: 500; color: var(--text-3); margin-right: 5px; }
.gs-flags { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.gs-flags span { font-size: 11.5px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.gs-flags span.gs-err { color: var(--bad-ink, #b0321f); border-color: color-mix(in srgb, var(--bad) 35%, transparent); white-space: normal; }

/* panel */
.gs-seg { margin-bottom: 6px; }
.gs-fdc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 22px; gap: 4px 6px; align-items: center; }
.gs-fdc .h { font-size: 11.5px; color: var(--text-3); }
.gs-fdc input { width: 100%; min-width: 0; box-sizing: border-box; padding: 5px 8px; border: 1px solid var(--line-2, #d5d9de); border-radius: 7px; font: inherit; font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.gs-x { padding: 0 4px; font-size: 15px; line-height: 1; color: var(--text-3); }
.gs-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 4px; }
.gs-chip { border: 1px solid var(--line); background: var(--surface, #fff); border-radius: 999px; padding: 2px 9px; font-size: 11.5px; color: var(--text-2); cursor: pointer; }
.gs-chip:hover { border-color: var(--text-3); color: var(--text); }
.gs-chip[aria-pressed="true"] { border-color: var(--sel); color: var(--sel); }
#panel input.bad { color: var(--bad); }
.f.gs-pre { grid-template-columns: auto minmax(0, 1fr); }
.f.gs-pre select { width: 100%; min-width: 0; }
#panel.fade-b { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 32px), transparent); }
#panel.fade-t { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 28px); mask-image: linear-gradient(to bottom, transparent, #000 28px); }
#panel.fade-t.fade-b { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 28px, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to bottom, transparent, #000 28px, #000 calc(100% - 32px), transparent); }

/* summary, tables */
.gs-say { margin-top: 6px; font-size: 12.5px; color: var(--text-2); line-height: 1.4; max-width: 38ch; }
.gs-tag { display: inline-block; font-size: 10.5px; color: var(--text-3); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; margin-left: 4px; white-space: nowrap; line-height: 1.5; }
.gs-two { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
table.gs-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; margin-top: 8px; }
table.gs-table th { font-size: 12px; font-weight: 500; color: var(--text-3); text-align: right; padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.gs-table td { text-align: right; padding: 7px 8px; border-bottom: 1px solid var(--line); }
table.gs-table .l { text-align: left; }
table.gs-table tr.on td { font-weight: 600; }
table.gs-table td.note { text-align: left; white-space: normal; font-size: 12px; color: var(--text-3); line-height: 1.4; }
.gs-yes { color: var(--good-ink); } .gs-no { color: var(--text-3); }
#checks td.note { white-space: normal; min-width: 200px; line-height: 1.4; }

@media (max-width: 1100px) { .gs-two { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  main.gs .tabs button { padding-left: 4px; padding-right: 4px; }
  #checks thead { display: none; }
  #checks, #checks tbody { display: block; width: 100%; }
  #checks tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
  #checks td { display: block; border: 0; padding: 0; text-align: left; white-space: normal; }
  #checks td.chk { grid-column: 1; grid-row: 1; }
  #checks td:nth-child(5) { grid-column: 2; grid-row: 1; align-self: center; }
  #checks td:nth-child(2) { grid-column: 1; grid-row: 2; font-size: 12.5px; }
  #checks td:nth-child(3) { grid-column: 2; grid-row: 2; font-size: 12.5px; text-align: right; }
  #checks td:nth-child(2)::before { content: "actual "; color: var(--text-3); }
  #checks td:nth-child(3)::before { content: "allowed "; color: var(--text-3); }
  #checks td:nth-child(4) { grid-column: 1 / -1; grid-row: 3; font-size: 12px; color: var(--text-3); min-width: 0; }
  table.gs-table th, table.gs-table td { padding: 6px 4px; font-size: 12px; }
}
@media print { .gs-edit { display: none !important; } }

/* borehole field */
.gs-ground { fill: var(--concrete); stroke: none; }
.gs-surface { stroke: var(--x-6b6457, #6b6457); stroke-width: 1.4; fill: none; }
.gs-bore { fill: var(--x-dcd6c8, #dcd6c8); stroke: var(--x-a99f8c, #a99f8c); stroke-width: .8; }
.gs-cold { fill: none; stroke: var(--blue); stroke-width: 1.6; }
.gs-warm { fill: none; stroke: var(--heat); stroke-width: 1.6; }
.gs-hp { fill: var(--fill-1); stroke: var(--text-2); stroke-width: 1.2; }
.gs-panel { fill: var(--surface-2); stroke: var(--steel-300); stroke-width: .8; }
.gs-grout { fill: var(--x-dcd6c8, #dcd6c8); stroke: var(--text-4); stroke-width: 1; }
.gs-pipe { fill: var(--surface); stroke: var(--text-2); stroke-width: 1.2; }
.gs-pipe.cold { stroke: var(--blue); } .gs-pipe.warm { stroke: var(--heat); }
.gs-dotb { fill: var(--ink); stroke: var(--halo); stroke-width: 1; }
.gs-title { font-size: 11.5px; font-weight: 600; fill: var(--text-2); }
.gs-tc { fill: none; stroke: var(--good); stroke-width: 2.2; }
.gs-th { fill: none; stroke: var(--blue); stroke-width: 2.2; }
.gs-tw { fill: none; stroke: var(--heat); stroke-width: 2.2; }
.gs-lim { fill: none; stroke-width: 1.2; stroke-dasharray: 5 4; }
.gs-lim.h { stroke: var(--blue); } .gs-lim.c { stroke: var(--heat); }
.gs-ok { fill: color-mix(in srgb, var(--good) 8%, transparent); }
.gs-vdi { fill: color-mix(in srgb, var(--x-6e7177, #6e7177) 14%, transparent); }
.gs-lh { fill: var(--x-2b5a92, #2b5a92); } .gs-lc { fill: var(--x-a3402a, #a3402a); } .gs-lv { fill: var(--text-2); font-weight: 500; }
.gs-cross { stroke: var(--halo); stroke-width: 1.5; }
.gs-cross.h { fill: var(--blue); } .gs-cross.c { fill: var(--heat); }
.gs-lval { stroke: var(--sel); stroke-width: 1.2; stroke-dasharray: 4 3; fill: none; pointer-events: none; }
.pill.cold rect { stroke: color-mix(in srgb, var(--blue) 50%, transparent); } .pill.cold text { fill: var(--x-2b5a92, #2b5a92); }
.pill.warm rect { stroke: color-mix(in srgb, var(--heat) 50%, transparent); } .pill.warm text { fill: var(--x-a3402a, #a3402a); }
table.gs-table td.num1 { font-weight: 600; }

/* theme-auto:start · generated by scripts/theme/hexmap.py: dark values (the rule of scripts/theme/colour.py) for
   colours that are not tokens, written as var(--x-rrggbb, #rrggbb): light is the fallback, unchanged */
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --x-2b5a92: #7ba3d5; --x-6b6457: #928c81; --x-6e7177: #85827f; --x-7f9fc4: #809ab8; --x-a3402a: #e38b77;
    --x-a99f8c: #655d4f; --x-b9c9da: #3a4550; --x-d7e6f3: #29323b; --x-dcd6c8: #3d3930; --x-f6dcd4: #3e2e29;
  }
}
@media screen {
  :root[data-theme="dark"] {
    --x-2b5a92: #7ba3d5; --x-6b6457: #928c81; --x-6e7177: #85827f; --x-7f9fc4: #809ab8; --x-a3402a: #e38b77;
    --x-a99f8c: #655d4f; --x-b9c9da: #3a4550; --x-d7e6f3: #29323b; --x-dcd6c8: #3d3930; --x-f6dcd4: #3e2e29;
  }
}
/* theme-auto:end */
