:root {
  --bg: #0a0a0b; --card: #121214; --border: #232326;
  --text: #fafafa; --muted: #a1a1aa; --dim: #71717a; --red: #e0303a;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: Inter, system-ui, sans-serif;
  background: var(--bg); color: var(--text);
  min-height: 100vh; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.75rem 1.5rem; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: rgba(10,10,11,0.92);
  backdrop-filter: blur(12px); z-index: 20;
}
.brand { display: flex; align-items: center; gap: 0.55rem; font-weight: 650; font-size: 0.95rem; letter-spacing: -0.02em; }
.mark {
  width: 22px; height: 22px; border-radius: 6px; background: var(--red);
  display: grid; place-items: center; font-size: 0.7rem; font-weight: 700; color: #fff;
}
.brand em { font-style: normal; color: var(--red); }
nav { display: flex; align-items: center; gap: 1.1rem; font-size: 0.85rem; color: var(--muted); flex-wrap: wrap; }
nav a:hover { color: var(--text); }
nav a.active { color: var(--text); font-weight: 550; }
main.home { max-width: 1200px; margin: 0 auto; padding: 2rem 1.25rem 3.5rem; }
.hero { margin-bottom: 1.5rem; }
.hero .eyebrow {
  font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--red); margin-bottom: 0.65rem; font-weight: 650;
}
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.2rem); letter-spacing: -0.045em;
  font-weight: 700; line-height: 1.05; margin-bottom: 0.75rem;
}
.hero h1 .muted { color: var(--dim); font-weight: 600; }
.hero p { color: var(--muted); max-width: 38rem; font-size: 1rem; line-height: 1.55; }
.strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin: 1.25rem 0 1.5rem; }
@media (max-width: 700px) { .strip { grid-template-columns: 1fr; } }
.strip article {
  border: 1px solid var(--border); background: var(--card);
  border-radius: 12px; padding: 1rem 1.1rem;
}
.strip h3 {
  font-size: 0.8rem; color: var(--red); letter-spacing: 0.04em;
  text-transform: uppercase; margin-bottom: 0.4rem; font-weight: 650;
}
.strip p { font-size: 0.88rem; color: var(--muted); line-height: 1.45; }
.legend {
  display: flex; flex-wrap: wrap; gap: 0.45rem 0.85rem; align-items: center;
  margin: 0 0 1.35rem; padding: 0.75rem 0.9rem;
  border: 1px solid rgba(224, 48, 58, 0.55);
  border-radius: 10px; background: var(--card); font-size: 0.72rem; color: var(--muted);
}
.legend .title {
  color: var(--text); font-weight: 650; margin-right: 0.25rem;
  text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.68rem;
}
.legend span { display: inline-flex; align-items: center; gap: 0.3rem; white-space: nowrap; }
.sym {
  display: inline-grid; place-items: center; min-width: 1.35rem; height: 1.35rem;
  padding: 0 0.28rem; border-radius: 5px; border: 1px solid #3f3f46;
  background: #0e0e10; color: #f4f4f5; font-size: 0.62rem; font-weight: 700;
  letter-spacing: -0.02em; line-height: 1;
}
.sym.veh { border-color: rgba(224,48,58,0.55); color: #fda4af; }
.sym.nrg { border-color: rgba(56,189,248,0.5); color: #7dd3fc; }
.sym.mat { border-color: rgba(250,204,21,0.45); color: #fde047; }
.sym.ai { border-color: rgba(167,139,250,0.55); color: #c4b5fd; }
.section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 0 0 1rem; gap: 1rem; flex-wrap: wrap;
}
.section-head h2 { font-size: 1.05rem; font-weight: 650; letter-spacing: -0.02em; }
.section-head span { font-size: 0.8rem; color: var(--dim); }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.tile {
  position: relative; display: block; aspect-ratio: 16 / 11; border-radius: 14px;
  overflow: hidden; border: 1px solid var(--border); background: var(--card);
  isolation: isolate; transition: border-color 0.15s, transform 0.15s;
}
.tile:hover { border-color: var(--red); transform: translateY(-2px); }
.tile img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.02); transition: transform 0.35s ease;
}
.tile:hover img { transform: scale(1.06); }
.tile .shade {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.2) 40%, rgba(0,0,0,0.9) 100%);
}
.tile .body { position: absolute; left: 0; right: 0; bottom: 0; padding: 0.95rem 1rem 1.05rem; z-index: 2; }
.tile .badge {
  display: inline-block; font-size: 0.62rem; font-weight: 650; letter-spacing: 0.06em;
  text-transform: uppercase; color: #fff; background: var(--red); border-radius: 4px;
  padding: 0.16rem 0.38rem; margin-bottom: 0.4rem;
}
.tile h3 { font-size: 1.08rem; font-weight: 650; letter-spacing: -0.02em; margin-bottom: 0.18rem; }
.tile .loc { font-size: 0.75rem; color: #d4d4d8; margin-bottom: 0.45rem; }
.tile .products { display: flex; flex-wrap: wrap; gap: 0.28rem; }
.note {
  margin-top: 2rem; padding: 1.25rem 1.35rem; border: 1px solid var(--border);
  border-radius: 12px; background: linear-gradient(180deg, #141416, #101012);
}
.note h2 { font-size: 1rem; margin-bottom: 0.45rem; }
.note p { color: var(--muted); font-size: 0.9rem; line-height: 1.5; max-width: 46rem; }
main.factory { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1.25rem 3.5rem; }
.crumb { font-size: 0.8rem; color: var(--dim); margin-bottom: 0.85rem; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--red); }
.fhero {
  display: flex; gap: 1rem; align-items: stretch; margin-bottom: 1.1rem;
  padding: 0.85rem 1rem; border: 1px solid var(--border); border-radius: 14px; background: var(--card);
}
@media (max-width: 700px) {
  .fhero { flex-direction: column; }
  .fhero-media { width: 100%; flex: none; min-height: 140px; }
}
.fhero-media {
  position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--border);
  width: 200px; flex: 0 0 200px; align-self: stretch; background: #0e0e10; min-height: 100%;
}
.fhero-media img { width: 100%; height: 100%; object-fit: cover; display: block; position: absolute; inset: 0; }
.fhero-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 0.15rem 0; }
.fhero-copy h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); letter-spacing: -0.04em; margin-bottom: 0.35rem; }
.fhero-copy .sub { color: var(--muted); margin-bottom: 0.75rem; font-size: 0.95rem; }
.fhero-copy .products { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tabs {
  display: flex; gap: 0.4rem; border-bottom: 1px solid var(--border); margin: 0.5rem 0 1rem; flex-wrap: wrap;
}
.tabs button {
  appearance: none; border: 0; background: transparent; color: var(--muted);
  padding: 0.7rem 0.85rem; font: inherit; font-size: 0.88rem; font-weight: 550; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button.active { color: var(--text); border-bottom-color: var(--red); }
.panel { border: 1px solid var(--border); border-radius: 14px; background: var(--card); padding: 1rem; }
.panel.hidden { display: none; }
#compare-root {
  border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: #000;
  max-width: 100%; margin: 0 auto; width: 100%;
}
#compare-root .juxtapose,
#compare-root .jx-slider {
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
}
#compare-root img { object-fit: contain; }
#compare-root .jx-knightlab,
#compare-root .jx-credit { display: none !important; }
main.factory { padding-top: 1rem; padding-bottom: 2rem; }
.fhero { margin-bottom: 0.75rem; padding: 0.7rem 0.9rem; }
.tabs { margin: 0.35rem 0 0.75rem; }
.panel.compare-panel { padding: 0.75rem; }
.compare-empty { padding: 2.5rem 1rem; text-align: center; color: var(--muted); font-size: 0.9rem; }
.labels { display: flex; justify-content: space-between; margin-top: 0.65rem; font-size: 0.8rem; color: var(--muted); gap: 0.75rem; }
.controls {
  display: grid; grid-template-columns: 1fr 1fr auto; gap: 0.75rem 0.85rem;
  margin-top: 0.9rem; align-items: start;
}
@media (max-width: 700px) { .controls { grid-template-columns: 1fr; } }
label { display: block; font-size: 0.7rem; color: var(--dim); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.3rem; font-weight: 650; }
.controls-spacer { visibility: hidden; user-select: none; }
select {
  width: 100%; background: #0e0e10; color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.55rem 0.65rem; font: inherit;
}
.datepicker { position: relative; min-width: 0; }
.date-field {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  background: #0e0e10; color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.55rem 0.7rem; font: inherit; font-size: 0.9rem;
  text-align: left; cursor: pointer; line-height: 1.2;
}
.date-field:hover { border-color: #3f3f46; }
.date-field[aria-expanded="true"] { border-color: var(--red); }
.date-field-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.date-field::after {
  content: ""; width: 0; height: 0; flex-shrink: 0;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid var(--muted);
}
.date-field[aria-expanded="true"]::after { transform: rotate(180deg); border-top-color: var(--red); }
.date-field:focus-visible,
.cal-nav:focus-visible,
.cal-day:focus-visible,
.source-toggle button:focus-visible {
  outline: 2px solid var(--red); outline-offset: 2px;
}
.source-toggle {
  display: flex; width: 100%; margin-top: 0.35rem;
  border: 1px solid var(--border); border-radius: 7px; overflow: hidden; background: #0e0e10;
}
.source-toggle[hidden] { display: none; }
.source-toggle button {
  flex: 1; appearance: none; border: 0; background: transparent;
  color: var(--muted); font: inherit; font-size: 0.68rem; font-weight: 650;
  letter-spacing: 0.02em; padding: 0.28rem 0.4rem; cursor: pointer; line-height: 1.2;
}
.source-toggle button + button { border-left: 1px solid var(--border); }
.source-toggle button.active { background: var(--red); color: #fff; }
.source-toggle button:hover:not(.active) { color: var(--text); }
.cal-popover {
  display: block; position: absolute; z-index: 40; top: calc(100% + 6px); left: 0;
  width: 100%; min-width: 260px; box-sizing: border-box;
  background: var(--card); color: var(--text); border: 1px solid var(--border);
  border-radius: 12px; padding: 0.7rem 0.7rem 0.75rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}
.datepicker[data-side="right"] .cal-popover { left: auto; right: 0; }
.cal-popover[hidden] { display: none; }
.cal-head {
  display: grid; grid-template-columns: 2rem 1fr 2rem; align-items: center;
  gap: 0.35rem; margin-bottom: 0.55rem;
}
.cal-month { text-align: center; font-size: 0.85rem; font-weight: 650; letter-spacing: -0.02em; }
.cal-nav {
  appearance: none; width: 2rem; height: 2rem; border: 1px solid var(--border);
  border-radius: 8px; background: #0e0e10; color: var(--text); font: inherit;
  font-size: 1.15rem; line-height: 1; cursor: pointer;
}
.cal-nav:hover:not(:disabled) { border-color: var(--red); }
.cal-nav:disabled { opacity: 0.28; cursor: default; }
.cal-weekdays, .cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
}
.cal-weekdays { margin-bottom: 0.2rem; }
.cal-weekdays span {
  text-align: center; font-size: 0.62rem; font-weight: 650; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--dim); padding: 0.2rem 0;
}
.cal-pad { min-height: 2rem; }
.cal-day {
  appearance: none; border: 0; background: transparent; color: var(--text);
  min-height: 2rem; border-radius: 7px; font: inherit; font-size: 0.78rem;
  font-weight: 550; cursor: pointer; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; padding: 0.15rem 0;
}
.cal-day.is-disabled { color: var(--dim); opacity: 0.38; cursor: default; font-weight: 400; }
.cal-day.is-archive { background: #1a1a1e; color: var(--text); }
.cal-day.is-archive:hover { background: #242428; }
.cal-day.is-selected, .cal-day.is-selected:hover { background: var(--red); color: #fff; }
.cal-day.is-dup::after {
  content: ""; width: 3px; height: 3px; border-radius: 50%; background: var(--red);
}
.cal-day.is-selected.is-dup::after { background: #fff; }
.datepicker-action .btn { width: 100%; white-space: nowrap; min-height: 2.5rem; }
@media (max-width: 700px) {
  .cal-popover { min-width: 0; }
  .cal-day, .cal-pad { min-height: 2.25rem; }
}
.btn {
  background: transparent; border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 0.55rem 0.8rem; font: inherit; font-size: 0.85rem; font-weight: 550; cursor: pointer;
}
.btn:hover { border-color: var(--red); }
.jobs-card {
  margin-top: 1rem; border: 1px solid var(--border); border-radius: 12px; background: #101012;
  padding: 1rem 1.1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.jobs-card .jobs-label {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--red); margin-bottom: 0.25rem;
}
.jobs-card h3 { font-size: 0.95rem; margin-bottom: 0.3rem; }
.jobs-card p { font-size: 0.82rem; color: var(--muted); line-height: 1.45; max-width: 36rem; }
.jobs {
  display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap;
  background: var(--red); color: #fff; font-weight: 650; font-size: 0.85rem;
  padding: 0.55rem 0.9rem; border-radius: 9px;
}
.jobs:hover { filter: brightness(1.08); }
.side { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 1rem; }
@media (max-width: 700px) { .side { grid-template-columns: 1fr; } }
.card {
  border: 1px solid var(--border); border-radius: 12px; background: #101012; padding: 0.95rem 1rem;
}
.card h3 { font-size: 0.9rem; margin-bottom: 0.35rem; }
.card p { font-size: 0.82rem; color: var(--muted); line-height: 1.45; margin-bottom: 0.65rem; }
.card a { color: var(--red); font-size: 0.82rem; font-weight: 600; }
footer {
  max-width: 1200px; margin: 0 auto; padding: 1.25rem 1.25rem 2.5rem;
  border-top: 1px solid var(--border); color: var(--dim); font-size: 0.75rem;
}
