/* Armory. Only .arm-* rules live here; tokens and shared classes come from site.css and chrome.css.
   Field-manual theme: thumbnails sit on white wells with a hairline, the active filter is a red left bar,
   sort arrows are ink. */

/* ---------- page head ---------- */
.arm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.arm-head .h1 { margin-bottom: .4rem; }
.arm-head .lede { margin-bottom: .2rem; }
.arm-actions { display: flex; gap: .5rem; flex-wrap: wrap; padding-bottom: .25rem; }
.arm-crumbs { margin: 0 0 .5rem; }
.arm-crumbs a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 2px; }
.arm-crumbs a:hover { color: var(--red); }
.arm-meta { margin: 0; font-family: var(--serif); font-size: 1rem; color: var(--ink-2); }
.arm-meta .arm-price { font-family: var(--mono); font-weight: 700; font-size: 1.3rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.arm-meta .conf { vertical-align: 2px; }
.hud-note { margin: .5rem 0 0; font-family: var(--serif); font-style: italic; font-size: .88rem; color: var(--ink-2); }

/* ---------- filter rail ---------- */
.arm-grid { display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.arm-rail .label { margin: 0 0 .25rem; padding-left: .55rem; }
.arm-fgroup { margin-bottom: 1rem; border-top: 1px solid var(--ink); padding-top: .5rem; }
.arm-f { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; padding: .28rem .55rem .28rem .5rem; border-left: 3px solid transparent; color: var(--ink-2); font-family: var(--serif); font-size: .92rem; line-height: 1.3; }
.arm-f:hover { color: var(--red); }
.arm-f.on { color: var(--ink); font-weight: 600; border-left-color: var(--red); background: var(--plate); }
.arm-f .n { font-family: var(--mono); font-size: .74rem; font-weight: 400; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.arm-f.on .n { color: var(--ink-2); }
.arm-f.sub { padding-left: 1.25rem; font-size: .86rem; }
.arm-f .conf { font-size: .66rem; }
.arm-fits { display: flex; flex-direction: column; gap: .3rem; padding: 0 .55rem; }
.arm-fits select, .arm-compare select, .arm-cmp-form select { width: 100%; background: #fff; color: var(--ink); border: 1px solid var(--ink); padding: .4rem .45rem; font: inherit; font-size: .92rem; }
.arm-fits select:focus, .arm-compare select:focus, .arm-cmp-form select:focus { border-color: var(--red); outline: none; }

/* ---------- toolbar ---------- */
.arm-bar { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin: 0 0 .5rem; }
.arm-bar .search { width: min(100%, 300px); margin: 0; }
.arm-bar .search:focus { border-color: var(--red); outline: none; }
.arm-count { font-family: var(--mono); font-size: .8rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.arm-count b { color: var(--ink); font-weight: 700; }
.arm-reset { margin-left: auto; font-family: var(--mono); font-size: .74rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
.arm-reset:hover { color: var(--red); }

/* ---------- item rows ---------- */
.arm-wrap { margin-bottom: .6rem; }
.arm-table th, .arm-table td { padding: .32rem .7rem; vertical-align: middle; }
.arm-table th { font-size: .68rem; }
.arm-table th a { color: inherit; display: inline-flex; align-items: center; gap: .3rem; }
.arm-table th a:hover { color: var(--red); }
.arm-table th.sorted a { color: var(--ink); }
.arm-table th.sorted a::after { content: ""; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 5px solid var(--ink); }
.arm-table th.sorted.desc a::after { border-bottom: 0; border-top: 5px solid var(--ink); }
.arm-table th.num a { justify-content: flex-end; }
.arm-table td.img, .arm-table th.img { width: 64px; padding: .22rem .3rem .22rem .6rem; }
.arm-thumb { display: block; width: 56px; height: 42px; object-fit: contain; padding: 2px; background: #fff; border: 1px solid var(--rule); }
.arm-thumb.none { background: #fff; border-style: dashed; border-color: var(--rule-2); }
.arm-table td.name { font-weight: 600; font-size: .95rem; color: var(--ink); }
.arm-table td.name a { color: var(--ink); }
.arm-table td.name a:hover { color: var(--red); text-decoration: underline; text-underline-offset: 2px; }
.arm-note { display: block; font-size: .78rem; font-weight: 400; font-style: italic; color: var(--ink-3); }
.arm-table td.cat { color: var(--ink-2); font-size: .86rem; }
.arm-table td.stat { color: var(--ink-2); font-size: .84rem; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.arm-table td.price .conf { margin-left: .35rem; vertical-align: 1px; }
.arm-table tbody tr[data-href] { cursor: pointer; }
.arm-table tbody tr:hover { background: var(--plate); }
.arm-table .dim { color: var(--ink-3); }
.arm-empty { margin: 1rem 0; color: var(--ink-3); font-style: italic; font-size: .92rem; }
.fineprint .arm-fp-link { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
.fineprint .arm-fp-link:hover { color: var(--red); }

/* effects and fits cells wrap; everything else in a .table stays on one line */
.arm-table td.eff, .arm-table td.fits { white-space: normal; min-width: 240px; max-width: 420px; font-size: .84rem; line-height: 1.45; }
.arm-eff { display: inline-block; margin: 0 .55rem .1rem 0; font-size: .8rem; color: var(--ink-2); font-family: var(--mono); }
.arm-eff.plus { color: var(--good); }
.arm-eff.minus { color: var(--bad); }
.arm-table td.fits a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 2px; }
.arm-table td.fits a:hover { color: var(--red); text-decoration-color: var(--red); }
.arm-fitcat { display: inline-block; margin-right: .5rem; font-weight: 600; color: var(--ink); }
.arm-table td.fits .conf { margin-left: .2rem; }

/* ---------- item detail ---------- */
.arm-detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; align-items: start; margin-bottom: 1.6rem; }
.arm-well { min-height: 220px; }
.arm-well img { max-height: 280px; }
.arm-noimg { color: var(--ink-3); font-style: italic; font-size: .92rem; }
.arm-stats { margin-top: .8rem; }
.arm-facts .kv { gap: 1rem; }
.arm-facts .kv span:last-child { text-align: right; }
.arm-src span:last-child { font-weight: 400; font-size: .78rem; color: var(--ink-2); overflow-wrap: anywhere; }
.arm-compare { margin-top: .9rem; padding-top: .8rem; border-top: 1px solid var(--ink); }
.arm-compare .label { display: block; margin-bottom: .35rem; }
.arm-compare-row { display: flex; gap: .4rem; }
.arm-compare-row select { flex: 1; min-width: 0; }
.arm-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.arm-sec-head .h2 { margin: 0; }
.arm-h2 { margin-top: 1.6rem; }
.arm-h2-n { margin-left: .5rem; font-family: var(--mono); font-size: 1rem; font-weight: 400; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.arm-link { font-family: var(--mono); font-size: .76rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
.arm-link:hover { color: var(--red); }
.arm-slot { margin-bottom: .8rem; }
.arm-att { font-size: .88rem; }
.arm-att th { background: var(--plate-2); border-bottom: 1px solid var(--ink); }
.arm-att tbody tr { background: transparent; }
.arm-att tbody tr:last-child td { border-bottom: 0; }
.arm-att td.name { font-weight: 600; font-size: .9rem; }
.arm-slot-empty { padding: .7rem .85rem; margin: 0; }

/* ---------- compare ---------- */
.arm-cmp-form { display: grid; grid-template-columns: minmax(180px, 320px) minmax(180px, 320px) auto auto; gap: .6rem; align-items: end; margin-bottom: 1.2rem; }
.arm-cmp-form label { display: grid; gap: .3rem; }
.arm-cmp { width: 100%; }
.arm-cmp th, .arm-cmp td { white-space: normal; }
.arm-cmp thead th { text-align: center; padding: .8rem; vertical-align: bottom; }
.arm-cmp thead th:first-child { width: 190px; }
.arm-cmp thead th a { display: grid; justify-items: center; gap: .5rem; color: var(--ink); }
.arm-cmp thead th a:hover .arm-cmp-name { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.arm-cmp thead th img { max-height: 130px; width: auto; background: #fff; border: 1px solid var(--rule); padding: .4rem; }
.arm-cmp-name { font-family: var(--serif); font-weight: 600; font-size: 1.25rem; line-height: 1.1; text-transform: none; letter-spacing: 0; }
.arm-cmp tbody th { text-align: left; font-family: var(--mono); font-weight: 400; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); background: transparent; }
.arm-cmp tbody td { text-align: center; font-family: var(--mono); font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.arm-cmp tbody td .conf { vertical-align: 2px; }
.arm-cmp td.win { color: var(--good); }
.arm-cmp td.win small { display: block; font-family: var(--mono); font-weight: 400; font-size: .62rem; letter-spacing: .04em; text-transform: uppercase; }
.arm-cmp-links { display: flex; gap: 1.2rem; flex-wrap: wrap; margin: .2rem 0 0; }

/* ---------- narrow screens ---------- */
@media (max-width: 900px) {
  .arm-grid, .arm-detail { grid-template-columns: 1fr; }
  .arm-rail { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 1rem; }
  .arm-cmp-form { grid-template-columns: 1fr 1fr; }
  .arm-cmp thead th:first-child { width: 110px; }
}
@media (max-width: 480px) {
  .arm-cmp-form { grid-template-columns: 1fr; }
  .arm-table td.eff, .arm-table td.fits { min-width: 180px; }
}

/* ---------- phones: nothing wider than the viewport ---------- */
.arm-slot { overflow-x: auto; }
@media (max-width: 900px) {
  .arm-grid, .arm-detail { grid-template-columns: minmax(0, 1fr); }
  .arm-main, .arm-rail, .arm-detail-main { min-width: 0; }
}
@media (max-width: 600px) {
  .arm-head { flex-direction: column; align-items: stretch; }
  .arm-actions .btn { flex: 1 1 auto; }
  .arm-rail { grid-template-columns: 1fr; }
  .arm-bar .search { width: 100%; }
}
