/* Anchors in concrete: page-local styles (shared look from calc.css) */
.anc .stage { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.anc .stage-bar { gap: 10px; }
.anc .stage-bar .grow { flex: 1; }
.layout-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.layout-bar .lb-l { font-size: 12px; font-weight: 600; color: var(--text-2); margin-right: 4px; }
.layout-bar .chip, .combos .chip { font-family: inherit; }
#view { display: block; width: 100%; height: clamp(420px, calc(100vh - 360px), 640px); touch-action: none; user-select: none; background: var(--surface-2); }
#view.is3d { cursor: grab; height: auto; }
#view .grips .hit { fill: none; stroke: transparent; stroke-width: 12; pointer-events: stroke; }
#view .grips .pe[data-pe^="x"], #view .grips .me[data-edge^="x"] { cursor: ew-resize; }
#view .grips .pe[data-pe^="y"], #view .grips .me[data-edge^="y"] { cursor: ns-resize; }
#view .pill.edit text { pointer-events: none; }
#view .lab { font-size: calc(11px * var(--ls, 1)); fill: var(--text); font-family: var(--font); }
#view .lab.load { fill: var(--load); font-weight: 600; }
#view .lab.an { font-weight: 600; }
#view .lab.nn { fill: var(--text-2); }
#view .lab.ax { fill: var(--text-3); }
#view .lab.hef { fill: var(--text-2); }
#view .dim { stroke: var(--steel-500); stroke-width: 1; fill: none; pointer-events: none; }
#view .pill rect { fill: var(--surface); stroke: var(--line-2); }
#view .pill text { font-size: calc(11px * var(--ls, 1)); fill: var(--text); font-family: var(--font); font-weight: 500; }
#view .anch { cursor: grab; }
#view .anch .hit, #view .edgeh .hit { fill: transparent; stroke: transparent; }
#view .edgeh .hit { stroke-width: 14; cursor: ew-resize; }
#view .edgeh[data-edge^="y"] .hit { cursor: ns-resize; }
#view .anch.sel circle:nth-child(3) { stroke: var(--sel); stroke-width: 2.2; }
#view .anch:hover circle:nth-child(2) { stroke: var(--sel); }
#view .plateh { cursor: move; }
.stage-foot .sw { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -2px; margin-right: 5px; }
.stage-foot .sw.t { background: var(--x-c4462f, #c4462f); }
.stage-foot .sw.a { border-radius: 2px; border: 1px dashed var(--good); background: color-mix(in srgb, var(--good) 10%, transparent); }
/* summary under the drawing */
.anc .summary { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 12px; grid-column: 1 / -1; }
.verdict { padding: 14px 18px; display: grid; gap: 2px; }
.verdict .vk { font-size: 12.5px; color: var(--text-3); }
.verdict b.ms { font-size: 30px; font-weight: 600; background: none; padding: 0; }
.verdict span:last-child { font-size: 12.5px; color: var(--text-2); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats > div { padding: 14px 16px; display: grid; gap: 2px; border-left: 1px solid var(--line); min-width: 0; }
.stats > div:first-child { border-left: 0; }
.stats span { font-size: 12.5px; color: var(--text-3); }
.stats b { font-size: 17px; font-weight: 600; }
.stats small { font-size: 12px; color: var(--text-3); overflow-wrap: anywhere; }
.warns { grid-column: 1 / -1; padding: 10px 16px; background: var(--warn-bg); border-color: var(--x-efd9ad, #efd9ad); }
.warns p { margin: 0; font-size: 12.5px; color: var(--x-7a5410, #7a5410); }
.combos { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 10px; }
.combos .chip.on { border-color: var(--sel); color: var(--sel); }
.combos .ms { background: none; padding: 0; }
#checks tr.gh td { font-size: 12px; color: var(--text-2); font-weight: 600; padding-top: 12px; text-align: left; border-bottom: 1px solid var(--line); }
@media (max-width: 760px) { #checks.cards tr.gh { border: 0; padding: 8px 10px 2px; margin-bottom: 0; } }
#checks tr.gov td { background: var(--surface-2); }
#checks .det { display: block; font-size: 11.5px; color: var(--text-3); }
/* panel */
.anc .f > label span { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.25; }
.anc .f.sel.wide { grid-template-columns: minmax(0, 1fr); gap: 4px; }
.anc .f.sel select { width: 100%; }
.anc .f.edge .edge-in { display: flex; align-items: center; gap: 6px; }
.anc .f.edge .edge-in input[type=checkbox] { width: auto; flex: none; }
.anc .f.edge .num { flex: 1; min-width: 0; }
.grp-h.sub { margin-top: 14px; }
.ld-list { display: grid; gap: 8px; }
.ld-card { border: 1px solid var(--line); border-radius: 9px; padding: 8px; }
.ld-h { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.ld-h .name { flex: 1; min-width: 0; border: 1px solid transparent; background: none; font-weight: 600; font-size: 13px; padding: 3px 4px; }
.ld-h .name:hover, .ld-h .name:focus { border-color: var(--line); }
.ld-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ld-c { display: grid; gap: 2px; font-size: 11.5px; color: var(--text-2); }
.ld-c em { font-style: normal; color: var(--text-3); }
.ld-c input { width: 100%; text-align: right; padding: 4px 6px; font-size: 12.5px; }
table.cmb { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.cmb th { font-weight: 500; color: var(--text-3); text-align: right; padding: 4px; }
table.cmb th.l, table.cmb td.l { text-align: left; }
table.cmb td { padding: 2px 3px; }
table.cmb input { width: 100%; padding: 4px 6px; text-align: right; font-size: 12.5px; }
table.cmb input.name { text-align: left; }
table.cmb tr.gov td { background: var(--surface-2); }
table.cmb em { font-style: normal; }
/* install and compare */
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: 16px; }
@media (max-width: 1250px) { .duo { grid-template-columns: minmax(0, 1fr); } }
.ins-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 16px; }
.ins-grid span { display: block; font-size: 12px; color: var(--text-3); }
.ins-grid b { font-size: 13.5px; font-weight: 500; }
table.cure { margin-top: 10px; border-collapse: collapse; font-size: 12.5px; }
table.cure td, table.cure th { padding: 3px 10px 3px 0; text-align: left; }
.cmp-grid { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 10px; }
.cmp-col { border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: grid; gap: 6px; align-content: start; min-width: 0; }
.cmp-col.cur { border-color: var(--line-2); background: var(--surface-2); }
.cmp-h b { display: block; font-size: 13px; overflow-wrap: anywhere; }
.cmp-h .tag { display: inline-block; margin-top: 4px; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--good-bg); color: var(--good); }
.cmp-h .tag.soft { background: var(--fill-1); color: var(--text-2); }
.cmp-r { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.cmp-r span { color: var(--text-3); }
.cmp-r b { font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.cmp-r .ms { background: none; padding: 0; font-weight: 600; }
.cmp-a { display: flex; gap: 4px; flex-wrap: wrap; }
.cmp-add { display: flex; gap: 8px; margin-top: 10px; }
.cmp-add select { flex: 1; min-width: 0; }
/* calculation */
details.step summary { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; cursor: pointer; font-size: 13.5px; }
details.step .ms { background: none; padding: 0; font-weight: 600; }
.step-b .eq { margin: 0 0 6px; font-size: 12.5px; color: var(--text-2); }
table.kv { border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
table.kv td { padding: 2px 16px 2px 0; }
table.kv td:first-child { color: var(--text-3); }
@media (max-width: 1040px) {
  .anc .summary { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats > div:nth-child(3) { border-left: 0; }
  .duo { grid-template-columns: minmax(0, 1fr); }
  #view { height: auto; aspect-ratio: 4 / 3; }
}
@media (max-width: 560px) {
  .cmp-grid { grid-template-columns: minmax(0, 1fr); }
  .ld-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.anc .stage { position: relative; }
#view .pill.edit { cursor: text; }
#view .pill.edit:hover rect { stroke: var(--sel); }
.anc-ask { position: absolute; z-index: 6; display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 9px; padding: 6px 8px; box-shadow: 0 8px 24px rgba(20, 22, 28, .14); font-size: 12.5px; color: var(--text-2); }
.anc-ask input { width: 90px; padding: 4px 6px; text-align: right; }
.anc-ask i { font-style: normal; color: var(--text-3); }

.stats .pair { display: flex; align-items: baseline; gap: 6px; margin: 2px 0; }
.stats .pair b.ms { font-size: 18px; background: none; padding: 0; }
.stats .pair i { color: var(--text-3); font-style: normal; }
#view .pill.edit:focus-visible rect { stroke: var(--sel); stroke-width: 2; }
#view .pill.edit:focus { outline: none; }
.anc .panel-body.more { -webkit-mask-image: linear-gradient(#000 calc(100% - 28px), transparent); mask-image: linear-gradient(#000 calc(100% - 28px), transparent); }
.pf { display: block; width: 100%; max-width: 360px; height: auto; margin: 4px 0 8px; }
.pf .pf-ax { stroke: var(--line-2); stroke-width: 1; }
.pf .pf-th { fill: none; stroke: var(--load); stroke-width: 1.6; }
.pf .pf-max { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 4 3; }
.pf .pf-t { font-size: 10px; fill: var(--text-2); font-family: var(--font); }
.ptext textarea { width: 100%; font: 12.5px/1.4 ui-monospace, Menlo, monospace; border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; resize: vertical; background: var(--surface); color: var(--text); }
.ptext .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* 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-6e7177: #85827f; --x-7a5410: #be9c6b; --x-b9b6ad: #514f48; --x-c4462f: #f88c76; --x-c8c5bd: #47443f;
    --x-e9b3a6: #af857b; --x-efd9ad: #433414;
  }
}
@media screen {
  :root[data-theme="dark"] {
    --x-6e7177: #85827f; --x-7a5410: #be9c6b; --x-b9b6ad: #514f48; --x-c4462f: #f88c76; --x-c8c5bd: #47443f;
    --x-e9b3a6: #af857b; --x-efd9ad: #433414;
  }
}
/* theme-auto:end */
