/* Tech Console: metallic instrument panel. CSS gradients and inline SVG only, no images (keeps files and inodes minimal). */
:root {
  --bg: #14171b; --bg2: #1b1f24;
  --steel-hi: #eef1f4; --steel-mid: #aeb5bd; --steel-lo: #6d747d; --steel-dk: #3a4048;
  --panel-a: #2d3238; --panel-b: #1d2126; --panel-edge: #0c0e10;
  --ink: #e6e9ec; --ink-dim: #9aa3ad; --engrave: #7d8691;
  --led: #ffb000; --led-glow: rgba(255, 176, 0, .55); --led-off: #3a2a05;
  --good: #7dff6b; --bad: #ff5e5e; --accent: #00d4ff;
  --c0: #ffb000; --c1: #00d4ff; --c2: #7dff6b; --c3: #ff5ea8; --c4: #b48cff;
  --radius: 14px;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.45;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.018) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, var(--bg2), var(--bg));
  min-height: 100vh;
}
.rig { max-width: 1280px; margin: 0 auto; padding: 18px 16px 40px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
/* Embedded in a WordPress page (iframe): the host page draws ONE dark rounded panel around us, so we paint no background of our own,
   which removes the square-edged rectangle and any seam between the console and its frame. */
html.embed, html.embed body { background: transparent; min-height: 0; }
html.embed .rig { max-width: none; padding: 0 0 4px; }

/* ---------- brushed-metal plate ---------- */
.plate {
  min-width: 0; position: relative; border-radius: var(--radius); padding: 18px 20px;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, rgba(0,0,0,.05) 1px 2px),
    linear-gradient(145deg, var(--panel-a), var(--panel-b));
  border: 1px solid var(--panel-edge);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), inset 0 -1px 0 rgba(0,0,0,.5), 0 10px 24px rgba(0,0,0,.35), 0 2px 0 rgba(255,255,255,.04);
}
.screw {
  position: absolute; width: 12px; height: 12px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--steel-mid) 40%, var(--steel-dk) 100%);
  box-shadow: 0 1px 1px rgba(0,0,0,.6), inset 0 0 0 1px rgba(0,0,0,.25);
}
.screw::after { content: ""; position: absolute; left: 2px; right: 2px; top: 50%; height: 1.5px; background: rgba(0,0,0,.55); transform: rotate(35deg); }
.screw.tl { top: 8px; left: 8px; } .screw.tr { top: 8px; right: 8px; } .screw.bl { bottom: 8px; left: 8px; } .screw.br { bottom: 8px; right: 8px; }
h1, h2 { margin: 0; font-weight: 700; }
.engrave {
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--engrave);
  text-shadow: 0 1px 0 rgba(255,255,255,.12), 0 -1px 0 rgba(0,0,0,.6); margin-bottom: 10px;
}
.hint { letter-spacing: .02em; text-transform: none; font-weight: 400; color: var(--ink-dim); margin-left: 8px; font-size: 12px; }
.small { font-size: 12px; color: var(--ink-dim); margin: 6px 0 0; }

/* ---------- masthead ---------- */
.masthead { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0, #cfd5db 25%, #6d747d 70%, #2b3036 100%);
  box-shadow: inset 0 0 0 4px rgba(0,0,0,.25), inset 0 0 0 7px rgba(255,255,255,.18), 0 3px 6px rgba(0,0,0,.5); position: relative;
}
.brand-mark::after { content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 17px; background: var(--led); box-shadow: 0 0 8px var(--led-glow); border-radius: 2px; transform-origin: 50% 16px; transform: translateX(-50%) rotate(35deg); }
h1 {
  font-size: 28px; letter-spacing: .14em;
  background: linear-gradient(180deg, #fff 0%, #aab1b9 45%, #6d747d 55%, #d9dde2 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,.6));
}
.sub { margin: 2px 0 0; color: var(--ink-dim); font-size: 13px; }
.synth { max-width: 100%; padding: 6px 12px; border-radius: 6px; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: #1a1200; background: repeating-linear-gradient(45deg, #ffb000 0 12px, #ffd25e 12px 24px); box-shadow: 0 0 0 1px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.4); }
.head-actions { display: flex; gap: 10px; }

/* ---------- buttons / switches ---------- */
.btn {
  font: 600 13px var(--sans); letter-spacing: .04em; color: #12161a; cursor: pointer; padding: 9px 14px; border-radius: 8px; border: 1px solid #5d646c;
  background: linear-gradient(180deg, #f4f6f8, #b4bbc3 55%, #8f969e); box-shadow: inset 0 1px 0 #fff, 0 2px 0 #4a5057, 0 4px 8px rgba(0,0,0,.4);
}
.btn:hover { filter: brightness(1.06); } .btn:active { transform: translateY(1px); box-shadow: inset 0 1px 0 #fff, 0 1px 0 #4a5057; }
.btn.ghost { color: var(--ink); background: linear-gradient(180deg, #4a5058, #2c3137); border-color: #0c0e10; box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 2px 0 #0c0e10, 0 4px 8px rgba(0,0,0,.35); }
.btn:focus-visible, .sw:focus-visible, input:focus-visible, .cell:focus-visible, .tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2.2fr); gap: 20px; }
.ctl.wide { min-width: 0; }
.switchbank { display: flex; flex-wrap: wrap; gap: 8px; }
.sw {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px 8px 10px; border-radius: 8px; cursor: pointer; color: var(--ink); font: 600 13px var(--sans);
  background: linear-gradient(180deg, #3d434b, #25292f); border: 1px solid #0c0e10; box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 2px 0 #0c0e10;
}
.sw .pilot { width: 9px; height: 9px; border-radius: 50%; background: #2a2205; box-shadow: inset 0 1px 1px rgba(0,0,0,.8); }
.sw[aria-checked="true"] { background: linear-gradient(180deg, #23272c, #30353b); box-shadow: inset 0 2px 4px rgba(0,0,0,.7); }
.sw[aria-checked="true"] .pilot { background: var(--led); box-shadow: 0 0 8px var(--led-glow), 0 0 2px #fff inset; }

/* ---------- product slots ---------- */
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); gap: 10px; }
.slot { position: relative; border-radius: 10px; padding: 8px 10px; background: linear-gradient(180deg, #181b1f, #202428); border: 1px solid #07090b; box-shadow: inset 0 2px 5px rgba(0,0,0,.7), 0 1px 0 rgba(255,255,255,.08); min-height: 58px; }
.slot .num { position: absolute; top: 6px; right: 8px; font: 700 11px var(--mono); color: var(--c); }
.slot .lamp { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--c); box-shadow: 0 0 8px var(--c); }
.slot input[type="search"] { width: 100%; background: transparent; border: 0; color: var(--ink); font: 14px var(--sans); padding: 4px 0; }
.slot input::placeholder { color: var(--engrave); }
.slot .pname { font-weight: 600; font-size: 14px; padding-right: 22px; }
.slot .pmeta { font-size: 12px; color: var(--ink-dim); }
.slot .rm { position: absolute; bottom: 6px; right: 8px; background: none; border: 0; color: var(--ink-dim); cursor: pointer; font-size: 12px; text-decoration: underline; }
.results { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin-top: 4px; max-height: 280px; overflow: auto; list-style: none; padding: 4px; border-radius: 10px; background: #1b1f24; border: 1px solid #000; box-shadow: 0 12px 28px rgba(0,0,0,.6); }
.results li { padding: 7px 9px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.results li:hover, .results li[aria-selected="true"] { background: #2d343c; }
.results .m { color: var(--ink-dim); font-size: 11px; }

/* ---------- gauges ---------- */
.dialhead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.focus-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab { cursor: pointer; font: 600 12px var(--sans); padding: 6px 10px; border-radius: 999px; color: var(--ink); background: #22272c; border: 1px solid #000; box-shadow: inset 0 1px 0 rgba(255,255,255,.12); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab[aria-selected="true"] { background: #0f1214; box-shadow: inset 0 2px 4px rgba(0,0,0,.8), 0 0 0 1px var(--c), 0 0 10px -2px var(--c); }
.tab .lamp { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; background: var(--c); }
.gauge-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; align-items: start; margin-top: 8px; }
.gauge { text-align: center; }
.gauge.score { grid-column: span 1; }
.gauge svg { width: 100%; max-width: 270px; height: auto; display: block; margin: 0 auto; overflow: visible; }
.gauge .needle { transform-origin: 100px 100px; transition: transform .7s cubic-bezier(.2, .9, .25, 1.15); }
.gauge .glabel { font: 700 12px var(--sans); letter-spacing: .12em; text-transform: uppercase; fill: var(--ink-dim); }
.gauge .num { font: 700 22px var(--mono); fill: var(--led); filter: drop-shadow(0 0 4px var(--led-glow)); }
.gauge .unit { font: 11px var(--mono); fill: var(--ink-dim); }
.gauge .tick { stroke: #8d949c; stroke-width: 1.2; } .gauge .tick.major { stroke: #d9dde2; stroke-width: 2; }
.gauge .scale-t { font: 9px var(--mono); fill: var(--ink-dim); }
.gauge button.gname { all: unset; cursor: pointer; display: inline-block; margin-top: 4px; font-size: 12px; color: var(--ink-dim); text-decoration: underline dotted; }
.gauge .badge-line { margin-top: 2px; }
.empty { padding: 30px 10px; text-align: center; color: var(--ink-dim); }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
.led-table th, .led-table td, .spec-table th, .spec-table td { padding: 8px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(255,255,255,.06); }
th { font: 600 11px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--engrave); white-space: nowrap; }
th .lamp { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; background: var(--c); box-shadow: 0 0 6px var(--c); }
th.pname { max-width: 180px; overflow: hidden; text-overflow: ellipsis; text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--ink); }
.cell { cursor: pointer; }
.led { font-family: var(--mono); font-weight: 700; font-size: 16px; color: var(--led); text-shadow: 0 0 7px var(--led-glow); background: #100c02; padding: 3px 8px; border-radius: 5px; box-shadow: inset 0 1px 3px rgba(0,0,0,.9); display: inline-block; min-width: 70px; text-align: right; }
.led.off { color: var(--led-off); text-shadow: none; }
.led.win { color: var(--good); text-shadow: 0 0 8px rgba(125,255,107,.6); }
.led-unit { font: 11px var(--mono); color: var(--ink-dim); margin-left: 6px; }
.rowlabel { font-weight: 600; } .reported { font-size: 12px; color: var(--ink-dim); margin-top: 3px; }
.spec-table .group td { background: rgba(0,0,0,.28); font: 700 11px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--engrave); }
.spec-table td.v { font-family: var(--mono); font-size: 13px; }
.spec-table td.win { color: var(--good); font-weight: 700; }
.spec-table .pct { display: block; font-size: 11px; color: var(--ink-dim); }
.spec-table .unk { color: var(--bad); opacity: .85; font-style: italic; }
.meta { font-size: 11px; color: var(--ink-dim); display: block; }

.badge { display: inline-block; font: 700 10px var(--mono); letter-spacing: .08em; padding: 2px 6px; border-radius: 4px; border: 1px solid currentColor; vertical-align: middle; }
.badge.official { color: #6ee7a8; } .badge.reported { color: #8ec5ff; } .badge.calc { color: #ffd27a; } .badge.est { color: #ff9f7a; } .badge.edited { color: #ff7ad9; } .badge.unknown { color: #aaa; }

.scoreboard { margin-top: 16px; display: grid; gap: 10px; }
.sbrow { display: grid; grid-template-columns: minmax(120px, 220px) 1fr 70px; gap: 12px; align-items: center; font-size: 13px; }
.sbbar { height: 14px; border-radius: 8px; background: #0e1013; box-shadow: inset 0 2px 4px rgba(0,0,0,.8); overflow: hidden; }
.sbbar i { display: block; height: 100%; width: 0; border-radius: 8px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 70%, white), var(--c)); transition: width .6s ease; }
.sbnum { font: 700 16px var(--mono); color: var(--led); text-align: right; }

/* ---------- what-if sliders ---------- */
.sliders { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 24px; }
.slider label { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.slider .val { font-family: var(--mono); color: var(--led); }
.slider .orig { font-size: 11px; color: var(--ink-dim); display: flex; justify-content: space-between; margin-top: 4px; }
.slider .orig button { all: unset; cursor: pointer; text-decoration: underline; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; }
input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 6px; background: linear-gradient(180deg, #0d0f11, #2a2f35); box-shadow: inset 0 2px 3px rgba(0,0,0,.9), 0 1px 0 rgba(255,255,255,.1); }
input[type="range"]::-moz-range-track { height: 8px; border-radius: 6px; background: linear-gradient(180deg, #0d0f11, #2a2f35); box-shadow: inset 0 2px 3px rgba(0,0,0,.9); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -8px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #b4bbc3 40%, #565d65 100%); border: 1px solid #000; box-shadow: 0 2px 4px rgba(0,0,0,.7), inset 0 0 0 3px rgba(0,0,0,.12); cursor: grab; }
input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #b4bbc3 40%, #565d65 100%); border: 1px solid #000; cursor: grab; }

/* ---------- drawer ---------- */
.drawer { position: fixed; inset: 0 0 0 auto; width: min(460px, 100%); z-index: 50; padding: 12px; }
.drawer[hidden] { display: none; }
.drawer-inner { height: 100%; overflow: auto; border-radius: var(--radius); padding: 22px 20px; background: linear-gradient(145deg, #30353b, #181b1f); border: 1px solid #000; box-shadow: -10px 0 40px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.18); }
.drawer .close { float: right; }
.drawer h3 { margin: 6px 0 4px; font-size: 20px; } .drawer h4 { margin: 18px 0 6px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--engrave); }
.drawer code { display: block; font: 13px var(--mono); padding: 10px; border-radius: 8px; background: #0b0d0f; color: #9ff; overflow-x: auto; }
.drawer table td { padding: 5px 8px; font-size: 13px; } .drawer td.n { font-family: var(--mono); text-align: right; }
.drawer ul { margin: 6px 0; padding-left: 18px; font-size: 13px; }
.drawer a { color: var(--accent); word-break: break-all; }
.foot { text-align: center; } .foot p { margin: 4px 0; font-size: 12px; color: var(--ink-dim); }

@media (max-width: 880px) {
  .controls { grid-template-columns: minmax(0, 1fr); }
  h1 { font-size: 22px; }
  .sbrow { grid-template-columns: 1fr 60px; } .sbrow .sbbar { grid-column: 1 / -1; order: 3; }
  .plate { padding: 16px 14px; }
}
/* Touch screens: fingertip-sized targets (about 44px), without changing the desktop look. */
@media (pointer: coarse), (max-width: 640px) {
  .sw, .btn, .tab { min-height: 44px; }
  .slot input[type="search"] { min-height: 44px; font-size: 16px; }   /* 16px also stops iOS from zooming in when the box is tapped */
  [data-rm] { display: inline-block; padding: 14px 10px; margin: -10px -6px; }
  .cell { min-height: 44px; }
  input[type="range"] { min-height: 32px; }
  input[type="range"]::-webkit-slider-thumb { width: 30px; height: 30px; margin-top: -11px; }
  input[type="range"]::-moz-range-thumb { width: 28px; height: 28px; }
}
@media (prefers-reduced-motion: reduce) { .gauge .needle, .sbbar i { transition: none; } }

.buyrow{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}
.buy{font-size:.68rem;padding:1px 6px;border:1px solid #6d747d;border-radius:3px;color:#ffb000;text-decoration:none;white-space:nowrap}
.buy:hover{background:#2b3036}

/* browse & filter */
.browse-grid { display: grid; gap: 14px; }
.bf { display: flex; flex-direction: column; gap: 5px; font: 600 11px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-dim); min-width: 0; }
.bf-label { font: 600 11px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 6px; }
.bf-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.bf select, .bf input { width: 100%; min-width: 0; background: #14171a; color: var(--ink); border: 1px solid #000; border-radius: 8px; padding: 9px 10px; font: 14px var(--sans); box-shadow: inset 0 2px 4px rgba(0,0,0,.6); text-transform: none; letter-spacing: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { cursor: pointer; border: 1px solid #0c0e10; border-radius: 999px; padding: 7px 13px; font: 600 13px var(--sans); color: var(--ink); background: linear-gradient(180deg, #4a5058, #2c3137); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 2px 0 #0c0e10; }
.chip small { color: var(--ink-dim); font-weight: 400; margin-left: 4px; }
.chip[aria-pressed="true"] { background: linear-gradient(180deg, #23272c, #30353b); box-shadow: inset 0 2px 4px rgba(0,0,0,.7); color: var(--led); }
.chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.browse-results { margin-top: 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.bcard { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 10px; background: #14171a; border: 1px solid #000; box-shadow: inset 0 1px 0 rgba(255,255,255,.05); min-width: 0; }
.bcard .n { font: 600 14px var(--sans); color: var(--ink); overflow-wrap: anywhere; }
.bcard .m { font-size: 12px; color: var(--ink-dim); }
.bcard .btn { margin-top: 4px; align-self: flex-start; padding: 6px 12px; font-size: 13px; }
.browse-more { text-align: center; margin-top: 12px; }
.browse-empty { grid-column: 1 / -1; color: var(--ink-dim); font-size: 14px; padding: 8px 2px; }
@media (max-width: 640px) { .bf select, .bf input { min-height: 44px; font-size: 16px; } .browse-results { grid-template-columns: 1fr; } }

/* suggestion popup */
.buy.sg { background: none; color: var(--ink-dim); border-style: dashed; cursor: pointer; font-family: inherit; }
.buy.sg:hover { color: var(--ink); background: #2b3036; }
.cell-sg { display: block; margin-top: 4px; }
.bf-note { margin: 8px 0 0; font-size: 13px; } .bf-note a { color: var(--accent); }
.sgdlg { border: 1px solid #000; border-radius: 16px; padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); color: var(--ink); background: linear-gradient(180deg, #2f343a, #1b1f24); box-shadow: 0 24px 60px rgba(0,0,0,.7); }
.sgdlg::backdrop { background: rgba(0,0,0,.6); }
.sgdlg form { padding: 20px 22px 22px; display: grid; gap: 12px; max-height: calc(100vh - 28px); overflow: auto; }
.sgdlg h2 { margin: 0; font: 700 20px var(--sans); }
.sg-lead { margin: 0; font-size: 14px; color: var(--ink); } .sg-lead.small { color: var(--ink-dim); font-size: 13px; }
.sg-f { display: flex; flex-direction: column; gap: 5px; font: 600 12px var(--sans); color: var(--ink-dim); min-width: 0; }
.sg-opt { font-weight: 400; }
.sg-f input, .sg-f select, .sg-f textarea { width: 100%; background: #14171a; color: var(--ink); border: 1px solid #000; border-radius: 8px; padding: 10px; font: 15px var(--sans); box-shadow: inset 0 2px 4px rgba(0,0,0,.6); }
.sg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sg-msg { min-height: 20px; margin: 0; font-size: 14px; } .sg-msg.ok { color: #7dff6b; } .sg-msg.err { color: #ff8a8a; }
.sg-actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 560px) { .sg-row { grid-template-columns: 1fr; } .sg-f input, .sg-f select, .sg-f textarea { font-size: 16px; } }

/* keep the card buttons clear of the remove link */
.slot .buyrow { margin-bottom: 24px; }
.slot:has(.buyrow) { padding-bottom: 8px; }
