/* Parts Finder: one column, phone first. Location labels look like yellow label tape. */
:root {
  --bg: #eef0f2;
  --panel: #ffffff;
  --ink: #1d2329;
  --muted: #5d6873;
  --line: #d3d8dd;
  --tape: #f2c230;
  --tape-ink: #1d2329;
  --accent: #1f5f8b;
  --accent-ink: #ffffff;
  --good: #2e7d4f;
  --warn: #b26a00;
  --bad: #b3261e;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15191d; --panel: #1e2328; --ink: #e6e9ec; --muted: #9aa5b0; --line: #333b43;
    --tape: #e8b923; --tape-ink: #15191d; --accent: #5aa3d6; --accent-ink: #0d1114;
    --good: #5cbf85; --warn: #e0a040; --bad: #ef6b62;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.45 var(--font); }
.wrap { max-width: 860px; margin: 0 auto; padding: 16px; display: grid; gap: 14px; }
a { color: var(--accent); }
h1 { font-size: 22px; margin: 0 0 8px; }
h2 { font-size: 18px; margin: 0 0 8px; }
.sr { position: absolute; left: -9999px; }

header.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.brand { font-weight: 800; font-size: 22px; letter-spacing: .02em; text-transform: uppercase; color: var(--ink); text-decoration: none; }
nav { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
nav a { font-weight: 600; text-decoration: none; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.narrow { max-width: 420px; }
.stack { display: grid; gap: 6px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline { display: inline; margin: 0; }
label { font-size: 13px; font-weight: 600; color: var(--muted); }
label.check { display: flex; gap: 8px; align-items: center; color: var(--ink); font-size: 15px; font-weight: 500; }
label.check input { width: 22px; height: 22px; }

input[type=text], input[type=url], input[type=password], textarea, select {
  font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 12px; min-height: 44px; width: 100%;
}
textarea { min-height: 80px; resize: vertical; }

button, .button {
  font: 600 15px var(--font); min-height: 44px; padding: 10px 14px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink); text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; line-height: 1.2;
}
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.good { border-color: var(--good) !important; color: var(--good); }
.warn { border-color: var(--warn) !important; color: var(--warn); }
.bad { border-color: var(--bad) !important; color: var(--bad); }
button.bad.solid { background: var(--bad); color: #fff; }
button.link { background: none; border: 0; padding: 0; min-height: 0; color: var(--accent); font-weight: 600; }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.search { display: grid; grid-template-columns: 1fr auto auto auto; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.search select { width: auto; }
@media (max-width: 600px) {
  .search { grid-template-columns: 1fr 1fr; }
  .search input[type=text] { grid-column: 1 / -1; }
  .two { grid-template-columns: 1fr; }
}

.flash { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--panel); border-left: 4px solid var(--good); }
.flash.err { border-left-color: var(--bad); color: var(--bad); }
.note, .hint, .count { color: var(--muted); font-size: 14px; margin: 0; }
.note b { color: var(--ink); }

.results { display: grid; gap: 8px; }
.item { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 4px; }
.item .name { font-weight: 600; overflow-wrap: anywhere; }
.item .meta { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.item .notes { font-size: 14px; overflow-wrap: anywhere; }
.tape {
  font: 600 14px var(--mono); background: var(--tape); color: var(--tape-ink);
  padding: 3px 8px; border-radius: 3px; white-space: nowrap; text-decoration: none; letter-spacing: .02em;
}
.tape.big { font-size: 20px; padding: 4px 10px; }
.site { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 4px; border: 1px solid var(--line); color: var(--muted); }
.checked { font-size: 12px; color: var(--muted); }
.checked.never { color: var(--warn); }

.binhead { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; margin-top: 6px; }
.actions details { display: inline-block; }
.actions details[open] { display: block; flex-basis: 100%; }
.actions summary { list-style: none; }
.actions summary::-webkit-details-marker { display: none; }
.actions details form { margin-top: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }

table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
td.num, th.num { text-align: right; }
tfoot td { font-weight: 700; border-bottom: 0; }
.checks td.ok { color: var(--good); font-weight: 700; }
.checks td.bad { color: var(--bad); font-weight: 700; }
