:root {
  color-scheme: light;
  --red: #ed1f24;
  --red-dark: #c4161b;
  --black: #111111;
  --ink: #1a1a1a;
  --muted: #5c5c5c;
  --paper: #f4f4f4;
  --panel: #ffffff;
  --field: #ffffff;
  --hover: #fafafa;
  --track: #ececec;
  --line: #e4e4e4;
  --ok-bg: #e8f6ec;
  --ok-line: #8fbfa0;
  --warn-bg: #fff6e0;
  --warn-line: #e2c27a;
  --bad-bg: #fde8ea;
  --bad-line: #e7a8ae;
  --low: #fff1f2;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f2f2f2;
  --muted: #b5b5b5;
  --paper: #1b1b1b;
  --panel: #262626;
  --field: #1a1a1a;
  --hover: #333333;
  --track: #3a3a3a;
  --line: #3d3d3d;
  --ok-bg: #16301f;
  --ok-line: #3d7a52;
  --warn-bg: #3a2e12;
  --warn-line: #c4a15a;
  --bad-bg: #3a1518;
  --bad-line: #8a3d44;
  --low: #3a1518;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.45 var(--font, "Segoe UI", "Helvetica Neue", Arial, sans-serif);
}

a { color: var(--red-dark); }

.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: #fff;
  color: var(--black);
  padding: .4rem .7rem;
  z-index: 5;
}

.skip:focus { top: .5rem; }

header { background: var(--black); color: #fff; }

.top {
  max-width: 1180px;
  margin: 0 auto;
  padding: .85rem 1.5rem .7rem;
  display: flex;
  gap: 1rem 1.5rem;
  align-items: center;
}

.brand { display: flex; line-height: 0; }

.brand .lockup-wide { height: 48px; width: auto; }

.brand .lockup-mark { display: none; height: 36px; width: auto; }

.brand-copy { display: flex; flex-direction: column; gap: .1rem; }

.brand-copy strong {
  font-family: Bahnschrift, "Arial Narrow", "Segoe UI", sans-serif;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: .95rem;
}

.brand-copy span { color: #bdbdbd; font-size: .85rem; }

.session { margin-left: auto; display: flex; align-items: center; gap: .75rem; }

.account-menu { position: relative; }

header button.account-button {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid #6d6d6d;
  background: transparent;
  color: #fff;
  display: grid;
  place-items: center;
  letter-spacing: 0;
  text-transform: none;
  line-height: 0;
}

header button.account-button svg { width: 1.2rem; height: 1.2rem; display: block; }

header button.account-button:hover,
header button.account-button[aria-expanded="true"] {
  border-color: var(--red);
  background: transparent;
  color: #fff;
}

.account-drop {
  position: absolute;
  right: 0;
  top: calc(100% + .45rem);
  min-width: 15rem;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .22);
  z-index: 30;
  padding: .35rem 0;
}

.account-drop[hidden] { display: none; }

.account-email {
  margin: 0;
  padding: .55rem .9rem .7rem;
  color: var(--muted);
  font-size: .82rem;
  border-bottom: 1px solid var(--line);
  word-break: break-all;
}

.account-drop a,
.account-drop button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--ink);
  border: 0;
  border-radius: 0;
  padding: .65rem .9rem;
  font: inherit;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
}

.account-drop a:hover,
.account-drop button:hover {
  background: var(--hover);
  color: var(--ink);
}

header button {
  background: transparent;
  color: #fff;
  border: 1px solid #6d6d6d;
  padding: .35rem .7rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: .78rem;
}

header button:hover { border-color: #fff; background: var(--red); }

header button.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: auto;
  height: auto;
  padding: 3px;
  border: 0;
  border-radius: 999px;
  background: #e6e8ee;
  color: #8b919c;
  letter-spacing: 0;
  text-transform: none;
  line-height: 0;
}

header button.theme-toggle:hover { background: #e6e8ee; border-color: transparent; }

.theme-toggle svg { width: 1.05rem; height: 1.05rem; display: block; }

.theme-icon {
  width: 1.65rem;
  height: 1.65rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  flex: 0 0 auto;
}

html:not([data-theme="dark"]) .theme-sun {
  background: #fff;
  color: #1c1c1c;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .16);
}

html[data-theme="dark"] header button.theme-toggle,
html[data-theme="dark"] header button.theme-toggle:hover {
  background: #2a2a2a;
  box-shadow: inset 0 0 0 1px #4a4a4a;
}

html[data-theme="dark"] .theme-moon {
  background: #fff;
  color: #111;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}

body > nav { background: #1a1a1a; }

.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
}

body > nav a {
  flex: 1 1 0;
  text-align: center;
  color: #ececec;
  text-decoration: none;
  padding: .8rem .35rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .82rem;
  font-weight: 650;
}

body > nav a:hover { color: #fff; background: #262626; }

body > nav a.active { color: #fff; box-shadow: inset 0 -3px 0 var(--red); }

.accent { height: 4px; background: var(--red); }

main {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.6rem 0 2.5rem;
  flex: 1;
}

h1, h2, h3, .kicker, .tile strong, body > nav a, button, .button {
  font-family: Bahnschrift, "Arial Narrow", "Segoe UI", sans-serif;
}

h1 {
  margin: 0 0 .35rem;
  font-size: 2.15rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1;
}

h2 {
  margin: 1.6rem 0 .55rem;
  font-size: 1.15rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h3 { margin: 1rem 0 .4rem; letter-spacing: .04em; text-transform: uppercase; font-size: 1rem; }

.kicker {
  margin: 0 0 .35rem;
  color: var(--red);
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: .78rem;
  font-weight: 650;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
}

.page-head h1 { margin: 0; }

.page-head .parts-search {
  margin: 0 0 0 auto;
  align-items: center;
}

.page-head input#q {
  width: min(36rem, 46vw);
  min-width: min(100%, 18rem);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lede, .hero p:last-child { color: var(--muted); max-width: 40rem; }

.muted { color: var(--muted); }

.pager {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas: "count pages sizes";
  align-items: center;
  width: 100%;
  gap: .85rem 1rem;
  margin: .9rem 0;
}

.pager-count { grid-area: count; justify-self: start; }

.pager-pages-wrap { grid-area: pages; justify-self: center; }

.pager-per-page { grid-area: sizes; justify-self: end; margin-left: 0; }

.pager-count { margin: 0; color: var(--muted); }

.pager-group {
  display: flex;
  align-items: center;
  gap: .55rem;
}

.pager-label {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.pager-sizes, .pager-pages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
}

.pager a, .pager .gap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 2.1rem;
  padding: .35rem .55rem;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
  font-size: .85rem;
  box-shadow: none;
}

.pager-pages a.active {
  background: var(--black);
  border-color: var(--black);
  color: #fff;
  box-shadow: none;
}

.pager-sizes a.active {
  background: var(--panel);
  border-color: var(--red);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--red);
}

.pager .gap { color: var(--muted); background: transparent; border-color: transparent; }

td.photo { width: 4.2rem; }

td select { width: 12.5rem; margin: 0; }

.parts-table { table-layout: fixed; }

.parts-table th:nth-child(1),
.parts-table td:nth-child(1) { width: 4.2rem; }
.parts-table th:nth-child(2) { width: 11rem; }
.parts-table th:nth-child(4) { width: 9.5rem; }
.parts-table th:nth-child(5) { width: 8rem; }
.parts-table th:nth-child(6) { width: 5.5rem; }
.parts-table th:nth-child(7) { width: 5.5rem; }

.parts-table tbody tr,
.parts-table tbody td {
  height: 4.75rem;
  max-height: 4.75rem;
}

.parts-table tbody td {
  overflow: hidden;
  vertical-align: middle;
}

.parts-table .cell-clip {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  line-height: 1.3;
  max-height: 2.6rem;
  overflow-wrap: anywhere;
}

.part-thumb {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
  background: var(--panel);
  border: 1px solid var(--line);
}

.part-photo {
  display: block;
  width: min(100%, 320px);
  max-height: 240px;
  object-fit: contain;
  background: var(--panel);
  border: 1px solid var(--line);
  margin: 0 0 1rem;
}

.hero { margin-bottom: 1.2rem; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .8rem;
  padding: 0;
  margin: 0 0 1rem;
  list-style: none;
}

.stats li, .tile, .card, table {
  background: var(--panel);
  border: 1px solid var(--line);
}

.stats li { padding: .9rem 1rem 1rem; }

.stats strong {
  display: block;
  font-size: 1.8rem;
  letter-spacing: .02em;
  line-height: 1;
}

.stats span {
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .75rem;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .8rem;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: 1rem 1.05rem 1.1rem;
  text-decoration: none;
  color: inherit;
  border-top: 3px solid var(--black);
  min-height: 8.5rem;
}

.tile:hover { border-top-color: var(--red); }

.tile span {
  color: var(--red);
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .72rem;
  font-weight: 700;
}

.tile strong {
  font-size: 1.35rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.tile p { margin: .2rem 0 0; color: var(--muted); }

.trends { margin: 1.4rem 0 1.6rem; }

.trends-form { align-items: end; margin-bottom: .4rem; }

.trends-form label { margin: 0; }

.trends-form select { width: 14rem; }

.trend-chart {
  list-style: none;
  margin: .8rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.trend-chart li {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1.2fr) minmax(8rem, 2fr) 3.5rem;
  gap: .6rem;
  align-items: center;
}

.trend-chart a { font-weight: 650; }

.trend-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--muted);
}

.trend-track {
  display: block;
  height: .7rem;
  background: var(--track);
}

.trend-bar {
  display: block;
  height: 100%;
  background: var(--black);
}

.trend-chart li:first-child .trend-bar { background: var(--red); }

.trend-chart strong { text-align: right; font-variant-numeric: tabular-nums; }

@media (max-width: 800px) {
  .trend-chart li { grid-template-columns: 1fr auto; }
  .trend-name { display: none; }
  .trend-track { grid-column: 1 / -1; }
}

.card { padding: 1rem 1.15rem 1.15rem; margin: .8rem 0 1rem; }

.notes .card h2 { margin-top: .15rem; }

table { width: 100%; border-collapse: collapse; }

th, td {
  border-bottom: 1px solid var(--line);
  padding: .6rem .7rem;
  text-align: left;
  vertical-align: top;
}

th {
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
  font-weight: 650;
  background: var(--black);
  border-bottom-color: var(--black);
}

tr:hover td { background: var(--hover); }

tr.low td { background: var(--low); }

.num { text-align: right; font-variant-numeric: tabular-nums; }

label { display: block; font-weight: 650; margin: .7rem 0 .25rem; }

label.inline {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: auto;
  margin-top: .95rem;
  font-weight: 500;
  line-height: 1.3;
}

input, select, textarea {
  font: inherit;
  color: inherit;
  background: var(--field);
  border: 1px solid var(--line);
  padding: .55rem .65rem;
  width: min(100%, 32rem);
}

input#q {
  width: min(100%, 64rem);
  min-width: min(100%, 40ch);
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--red);
  outline-offset: 1px;
  border-color: var(--red);
}

textarea { min-height: 5rem; }

button, .button {
  background: var(--red);
  color: #fff;
  border: 0;
  padding: .6rem 1rem;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  font: inherit;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .85rem;
  font-weight: 650;
}

button:hover, .button:hover { background: var(--red-dark); }

button.secondary, .button.secondary { background: var(--black); }

header button { width: auto; text-transform: uppercase; }

.card form input:not([type="checkbox"]):not([type="radio"]),
.card form select,
.card form textarea { width: 100%; }

.share-choice { border: 0; margin: .8rem 0; padding: 0; }
.share-choice legend { font-weight: 650; margin-bottom: .3rem; }
.share-choice label.inline { margin-top: .35rem; }

label.inline input[type="checkbox"],
label.inline input[type="radio"] {
  width: 1.05rem;
  height: 1.05rem;
  min-width: 1.05rem;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
}

.actions, .row-form {
  display: flex;
  gap: .7rem;
  flex-wrap: wrap;
  align-items: end;
  margin-top: .9rem;
}

.scan { font-size: 1.45rem; width: min(100%, 40rem); }

.scan-row {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.qty-step {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: .35rem;
}

.qty-step span {
  min-width: 1.4rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.qty-step button.step {
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  text-transform: none;
  letter-spacing: 0;
  font-size: 1.15rem;
  line-height: 1;
}

.qty-step button.step:hover {
  border-color: var(--red);
  background: var(--panel);
  color: var(--ink);
}

.card form .scan-row input.scan {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}

.alert {
  padding: .75rem .9rem;
  border: 1px solid var(--ok-line);
  background: var(--ok-bg);
  margin: 0 0 1rem;
}

.alert.error { background: var(--bad-bg); border-color: var(--bad-line); }

.alert.warn { background: var(--warn-bg); border-color: var(--warn-line); }

.toast { transition: opacity .28s ease; }

.toast-out { opacity: 0; }

.alert.validation-summary-valid { display: none; }

dl {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: .35rem .9rem;
  margin: 0;
}

dt { color: var(--muted); letter-spacing: .04em; text-transform: uppercase; font-size: .78rem; padding-top: .15rem; }

dd { margin: 0; }

footer {
  background: var(--black);
  color: #cfcfcf;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.1rem 1.5rem 1.3rem;
  font-size: .9rem;
}

footer strong {
  display: block;
  color: #fff;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-family: Bahnschrift, "Arial Narrow", "Segoe UI", sans-serif;
}

.foot-brand { display: flex; align-items: center; gap: .7rem; }

.foot-brand img { height: 26px; width: auto; }

.login-logo { display: block; width: min(100%, 340px); height: auto; margin: .4rem auto 1.4rem; }

.qr { display: block; width: 180px; height: 180px; background: #fff; padding: .4rem; }

body.account { background: #0b0b0b; }

body.account header { background: transparent; }

body.account .brand,
body.account .brand-copy { display: none; }

body.account main {
  width: min(440px, calc(100% - 2rem));
  padding-top: 1.2rem;
}

body.account h1, body.account .lede { color: #fff; }

body.account .lede { margin-top: 0; }

body.account .card { color: #1a1a1a; background: #fff; }

body.account .card input,
body.account .card select,
body.account .card textarea { color: #1a1a1a; background: #fff; }

body.account .login-notice {
  margin: 1.4rem 0 0;
  color: #9a9a9a;
  font-size: .82rem;
  letter-spacing: .02em;
  text-align: center;
}

:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

@media (max-width: 1100px) {
  .brand .lockup-wide { display: none; }
  .brand .lockup-mark { display: block; height: 36px; }
}

@media (max-width: 900px) {
  .stats, .tiles { grid-template-columns: 1fr 1fr; }
  .session { margin-left: 0; }
  body > nav { overflow: auto; }
  body > nav a { flex: 0 0 auto; padding: .8rem .85rem; }
}

@media (max-width: 640px) {
  .top, body > nav, .utility, footer { padding-left: 1rem; padding-right: 1rem; }
  .brand .lockup-wide { display: none; }
  .brand .lockup-mark { display: block; height: 34px; }
  .stats, .tiles { grid-template-columns: 1fr; }
  dl { grid-template-columns: 1fr; }
  table { display: block; overflow-x: auto; }
  h1 { font-size: 1.7rem; }
}
