/* hardness converter page */
.hd-in input.paren { font-style: italic; color: var(--text-2); }
.hd-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
#hdView.scroll { max-width: none; touch-action: pan-x; }
.hd-morebar { display: none; }
/* reserved heights: the explanation line and the two tables below are filled by script */
.hd-why { min-height: 18px; }
.hd-grid .table-wrap { min-height: 212px; }
@media (max-width: 640px) {
  .hd-morebar { display: flex; justify-content: center; padding: 0 14px 8px; }
  .hd-morebar .ghost { font-size: 12.5px; }
  .hd-in { width: calc(25% - 8px); min-width: 70px; }
  .hd-in small { font-size: 10px; }
}
/* the library data loads before the page script, so the browser may paint once without the inputs and the footer */
@media (min-width: 641px) {
  .hd-pick { min-height: 66px; }
  #hdInputs { min-height: 170px; box-sizing: border-box; }
  #hdFoot { min-height: 70px; box-sizing: border-box; }
}
@media (max-width: 640px) { #hdInputs { min-height: 92px; box-sizing: border-box; } }

/* ---------- mode switch: metals (default) and the Durometer mode (#shore, shore.js) ---------- */
main.hd[data-mode="shore"] .only-metal { display: none !important; }
main.hd:not([data-mode="shore"]) .only-shore { display: none !important; }
.hd-modes { margin: 10px 0 8px; }
.hd-modes button { white-space: normal; }
@media (max-width: 640px) { .hd-modes { display: grid; grid-auto-flow: row; width: 100%; } }

/* ---------- Durometer stage ---------- */
.sh-stage { overflow: hidden; }
.sh-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 14px 6px; }
.sh-scales { display: flex; flex-wrap: wrap; gap: 6px; }
.sh-scales button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px; padding: 4px 11px; cursor: pointer; color: var(--text-2); font-size: 12.5px; line-height: 1.2; }
.sh-scales button b { font-weight: 600; color: var(--text); }
.sh-scales button small { font-size: 10.5px; color: var(--text-3); }
.sh-scales button:hover { border-color: var(--line-2); }
.sh-scales button[aria-pressed="true"] { background: var(--text); border-color: var(--text); }
.sh-scales button[aria-pressed="true"] b, .sh-scales button[aria-pressed="true"] small { color: var(--on-accent); }
.sh-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sh-stage .sh-top { padding-top: 10px; }
/* long table titles (examples land on them) wrap rather than end in an ellipsis */
.hd-tbtn b, .hd-tbtn small { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.35; }
.sh-use { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 2px 14px 4px; font-size: 12.5px; color: var(--text-2); min-height: 24px; }
.sh-use b { color: var(--text); font-weight: 600; }
.sh-meth { display: inline-flex; align-items: center; gap: 8px; }
.sh-meth span { color: var(--text-3); }
.sh-meth select { border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; background: var(--surface); font-size: 12.5px; }
.sh-meth[hidden] { display: none; }
.sh-draw { position: relative; }
#shView { display: block; width: 100%; touch-action: none; user-select: none; -webkit-user-select: none; outline: none; }
#shView:focus-visible { box-shadow: inset 0 0 0 2px rgba(37, 99, 235, .35); border-radius: 8px; }
#shView.dragging, #shView.dragging * { cursor: grabbing; }
#shView .sh-bezel { fill: var(--steel-50); stroke: var(--line-2); stroke-width: 1; }
#shView .sh-face { fill: var(--surface); stroke: var(--ink); stroke-width: 1.4; }
#shView .sh-in { fill: none; stroke: var(--x-b9dcc7, #b9dcc7); stroke-width: 6; stroke-linecap: butt; }
#shView .sh-out { fill: none; stroke: var(--x-f1d6a8, #f1d6a8); stroke-width: 6; stroke-linecap: butt; }
#shView .sh-tick { stroke: var(--ink); stroke-width: 1; fill: none; }
#shView .sh-num { font-size: 11.5px; fill: var(--text-2); font-variant-numeric: tabular-nums; }
#shView .sh-dname { font-size: 11px; fill: var(--text-3); }
#shView .sh-needle { fill: var(--ink); stroke: none; }
#shView .sh-hub { fill: var(--ink); stroke: var(--halo); stroke-width: 1.5; }
#shView .handle .knob { fill: var(--surface); stroke: var(--sel); stroke-width: 2; }
#shView .sh-split { stroke: var(--line); stroke-width: 1; }
#shView .sh-sample { fill: url(#shHatchR); stroke: var(--ink); stroke-width: 1.3; stroke-linejoin: round; }
#shView .sh-ind { fill: var(--steel-300); stroke: var(--ink); stroke-width: 1.3; stroke-linejoin: round; }
#shView .sh-foot { fill: url(#shHatchS); stroke: var(--ink); stroke-width: 1.3; }
#shView .sh-foot.unk { stroke-dasharray: 4 3; }
#shView .sh-load line { stroke: var(--load); stroke-width: 1.8; }
#shView .sh-load path { fill: var(--load); stroke: none; }
#shView .sh-dim line { stroke: var(--text-2); stroke-width: 1; }
#shView .sh-dim line.ext { stroke: var(--line-2); stroke-dasharray: 3 2; }
#shView .sh-dim path { fill: var(--text-2); }
#shView .sh-lab { font-size: 11.5px; fill: var(--text-2); }
#shView .sh-bar line { stroke: var(--text-2); stroke-width: 2; }
#shView .sh-bar text { font-size: 11px; fill: var(--text-3); }
.sh-pill rect { fill: var(--surface); stroke: var(--steel-300); }
.sh-pill text { font-size: 12px; font-weight: 500; fill: var(--text-2); font-variant-numeric: tabular-nums; }
.sh-pill.title text { fill: var(--text); font-weight: 600; }
.sh-pill.load rect { stroke: color-mix(in srgb, var(--load) 35%, transparent); } .sh-pill.load text { fill: var(--load); font-weight: 600; }
.sh-pill.sel rect { stroke: var(--sel); } .sh-pill.sel text { fill: var(--sel); font-weight: 600; }
.sh-pill.editable { cursor: text; }
.sh-pill.editable:hover rect, .sh-pill.editable:focus rect { stroke: var(--sel); stroke-width: 1.5; }
.sh-pill.editable:focus { outline: none; }
.sh-edit { position: absolute; transform: translate(-50%, -50%); z-index: 5; display: flex; align-items: center; gap: 4px; background: var(--surface); border: 1.5px solid var(--sel); border-radius: 9px; padding: 2px 8px 2px 4px; box-shadow: 0 6px 18px rgba(20, 22, 28, .14); }
.sh-edit input { width: 64px; border: 0; outline: none; font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; padding: 3px 2px; }
.sh-edit span { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.sh-edit.bad { border-color: var(--bad); }
.sh-sum { border-top: 1px solid var(--line); }
.sh-sum .verdict .s { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.sh-sum .verdict.good .s { color: var(--good); }
.sh-sum .verdict.warn .s { color: var(--x-9a6a12, #9a6a12); }
.sh-sum .verdict.bad .s { color: var(--bad); }
.sh-sum .sh-sw { color: var(--sel); font-size: 12.5px; padding: 2px 8px; }
.sh-sum .stat .v { overflow-wrap: anywhere; }

/* ---------- indenter cards, modulus chart ---------- */
.sh-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.sh-modg { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px 24px; align-items: start; }
@media (min-width: 1000px) { .sh-modg { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } }
.sh-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.sh-card { display: grid; gap: 4px; justify-items: start; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 10px 9px; cursor: pointer; color: inherit; font-size: 12px; min-width: 0; }
.sh-card:hover { border-color: var(--line-2); }
.sh-card.on { border-color: var(--sel); background: var(--sel-bg); }
.sh-card svg { display: block; width: 100%; max-width: 132px; height: auto; overflow: hidden; }
.sh-card svg .ft { stroke: var(--ink); stroke-width: 2.4; fill: none; }
.sh-card svg .in { fill: var(--steel-300); stroke: var(--ink); stroke-width: 1; }
.sh-card svg .bar { stroke: var(--load); stroke-width: 4; stroke-linecap: round; fill: none; }
.sh-ct { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 13px; }
.sh-ct b { font-weight: 600; }
.sh-cs { color: var(--text-3); font-size: 11.5px; line-height: 1.35; }
.sec-tag { font-style: normal; font-size: 10.5px; color: var(--text-3); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; white-space: nowrap; }
#shMod .ch-g { stroke: var(--grid); stroke-width: 1; }
#shMod .ch-ax { stroke: var(--line-2); stroke-width: 1; }
#shMod .ch-c { fill: none; stroke-width: 2; stroke-linejoin: round; }
#shMod .ch-c.dim { stroke-width: 1.4; stroke-dasharray: 1.5 3.5; opacity: .75; }
#shMod .ch-v { stroke: var(--sel); stroke-width: 1.2; stroke-dasharray: 4 3; }
#shMod .ch-dot { stroke: var(--halo); stroke-width: 1.5; }
#shMod .ch-hit { fill: transparent; cursor: ew-resize; }
#shMod [data-drag] { cursor: ew-resize; }
#shMod { touch-action: pan-y; }
.sh-modnote { margin: 6px 0 8px; }
.sh-tbl td small, .sh-tbl td .note { color: var(--text-3); font-size: 11.5px; }
.sh-tbl td.l { white-space: normal; }
.sh-tbl tr.out td { color: var(--text-3); }
.sh-tbl .sw { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 8px; }
.sh-tbl small.ref { margin-left: 4px; }

/* ---------- materials strip ---------- */
.sh-strip { display: block; width: 100%; overflow: hidden; }
.sh-strip .sh-lane { stroke: var(--ink); stroke-width: 1.2; }
.sh-strip .sh-ltk { stroke: var(--ink); stroke-width: 1; }
.sh-strip .sh-lnum { font-size: 11px; fill: var(--text-3); font-variant-numeric: tabular-nums; }
.sh-strip .sh-lname { font-size: 12px; font-weight: 600; fill: var(--text); }
.sh-strip .sh-it { fill: var(--ink); }
.sh-strip .sh-cur { fill: var(--sel); }
.sh-strip .sh-itl line { stroke: var(--line-2); stroke-width: 1; }
.sh-strip .sh-itl text { font-size: 11.5px; fill: var(--text-2); }
.sh-strip .sh-xo { fill: none; stroke: var(--text-3); stroke-width: 1.2; stroke-dasharray: 4 3; }
.sh-strip .sh-xo.on { stroke: var(--sel); stroke-width: 2; }
.sh-two { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 8px; }
.sh-more > summary { cursor: pointer; font-size: 12.5px; color: var(--text-2); padding: 6px 0; }
#shXo tr[data-xo] { cursor: default; }
#shXo tr[data-xo]:hover td { background: var(--sel-bg); }

/* ---------- test conditions ---------- */
.sh-thick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0 0 10px; font-size: 12.5px; }
.sh-thick label { display: inline-flex; align-items: center; gap: 8px; color: var(--text-3); }
.sh-thick input { width: 72px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
.sh-thick i { font-style: normal; color: var(--text-3); }
.sh-tv.good { color: var(--good); } .sh-tv.warn { color: var(--x-9a6a12, #9a6a12); } .sh-tv.info { color: var(--text-3); }
.sh-test th { width: 30%; min-width: 150px; color: var(--text-2); font-weight: 500; font-size: 12.5px; white-space: normal; vertical-align: top; text-align: left; }
.sh-test td { vertical-align: top; }
@media (max-width: 640px) {
  .sh-test th { width: auto; min-width: 0; }
  .sh-test tr { display: grid; }
  .sh-test th { border-bottom: 0; padding-bottom: 0; }
}
.sh-tbl td.nw, .sh-tbl th.nw { white-space: nowrap; }
@media (max-width: 640px) {
  #shKind { display: grid; grid-auto-flow: row; width: 100%; }
  #shKind button { white-space: normal; }
}

/* metals mode: write names out in full (no ellipsis); the family wraps, the published value stays on one line */
#hdMats td:nth-child(2) { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: break-word; }
.hd-in small { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.25; }

/* 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-0891b2: #6ec2de; --x-4d7c0f: #8fb96b; --x-57534e: #9e9c98; --x-7c3aed: #af9af8; --x-9333ea: #be98f4;
    --x-9a6a12: #d0a66a; --x-a16207: #d8a067; --x-b91c1c: #ef8276; --x-b9dcc7: #2c4537; --x-be185d: #ee829f;
    --x-c26a1d: #eda16b; --x-f1d6a8: #463412;
  }
}
@media screen {
  :root[data-theme="dark"] {
    --x-0891b2: #6ec2de; --x-4d7c0f: #8fb96b; --x-57534e: #9e9c98; --x-7c3aed: #af9af8; --x-9333ea: #be98f4;
    --x-9a6a12: #d0a66a; --x-a16207: #d8a067; --x-b91c1c: #ef8276; --x-b9dcc7: #2c4537; --x-be185d: #ee829f;
    --x-c26a1d: #eda16b; --x-f1d6a8: #463412;
  }
}
/* theme-auto:end */
