/* Fälgkällaren: all stil. Grundstil först, sedan färgtema (variabler) och komponenter. */
/* Grundstil */
:root { color-scheme: light; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
body { margin: 0; font: 14px system-ui, sans-serif; }
img { max-width: 100%; }
[hidden] { display: none !important; }

/* Färger "Källaren": krita, asfalt och brons. En bakgrund, en textfärg, en accent (på knappar och val).
   Ljust läge är standard. Mörkt läge med data-theme="dark" på <html>.
   Ytor skiljs åt med ett steg i ton, inte med linjer eller skuggor. Text minst 4,5:1 i båda lägena. */
:root {
  --bg: #e9e9e6;
  --surface: #f4f4f2;
  --surface-2: #ffffff;
  --ink: #121314;
  --muted: #4f5357;
  --line: #d4d5d1;
  --line-strong: #b5b7b2;
  --accent: #9a6a26;
  --accent-ink: #ffffff;
  --accent-soft: #efe4d2;
  --violet: #4f5357;
  --tile: #f4f4f2;
  --tile-glow: #f4f4f2;
  --stripe: transparent;
  --well: #121314;
  --glow: transparent;
  --hot: #8a5c1c;
  --chrome: #e9e9e6;
  --chrome-fg: #121314;
  --chrome-muted: #4f5357;
  --plate-bg: #f4f4f2;
  --plate-line: transparent;
  color-scheme: light;
  --hero-fg: #ffffff;
  --hero-muted: #e4e4e2;
  --hero-shadow: transparent;
  --scrim: rgba(10, 10, 11, 0.8);
  --flame: #c9934a;
  --scene: none;
  --f-display: 'Chakra Petch', 'Barlow', system-ui, sans-serif;
  --f-body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-tech: 'Chakra Petch', 'Barlow', system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
:root[data-theme="dark"] {
  --bg: #101112;
  --surface: #17191b;
  --surface-2: #212427;
  --ink: #f1efea;
  --muted: #a7a9ab;
  --line: #2b2e31;
  --line-strong: #3d4145;
  --accent: #c9934a;
  --accent-ink: #111213;
  --accent-soft: #2c2318;
  --violet: #a7a9ab;
  --tile: #17191b;
  --tile-glow: #17191b;
  --well: #0b0c0d;
  --hot: #d9a35a;
  --chrome: #101112;
  --chrome-fg: #f1efea;
  --chrome-muted: #a7a9ab;
  --plate-bg: #17191b;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.5;
  padding-block: 0;
}
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap {
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Header */
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; }
.mark { display: flex; align-items: center; gap: 10px; color: var(--accent); }
.mark span {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1;
}

.btn {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  padding: 9px 14px;
  border-radius: 3px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  line-height: 1.2;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; }
.btn[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }

/* Intro */
.intro { padding-block: 28px 22px; }
.eyebrow {
  font-family: var(--f-tech);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}
h1 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(38px, 7vw, 68px);
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0 0 12px;
  max-width: 16ch;
  text-wrap: balance;
}
.lede { margin: 0 0 22px; max-width: 62ch; color: var(--muted); font-size: 16px; }
.legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.legend div { background: var(--surface); padding: 12px 14px; min-width: 0; }
.lv { font-family: var(--f-display); font-weight: 600; font-size: 28px; line-height: 1.1; letter-spacing: 0.02em; display: block; }
.ll { font-size: 12.5px; color: var(--muted); display: block; margin-top: 2px; }

/* Layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding-block: 10px 48px; }
@media (min-width: 900px) {
  .layout { grid-template-columns: 290px minmax(0, 1fr); gap: 26px; align-items: start; }
}

/* Filters */
.filters {
  display: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 4px 16px 16px;
  min-width: 0;
}
.filters[data-open="true"] { display: block; }
@media (min-width: 900px) {
  .filters {
    display: block;
    position: sticky;
    top: 12px;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
  }
  .only-m { display: none !important; }
}
.grp { padding-block: 14px; border-top: 1px solid var(--line); }
.grp:first-of-type { border-top: 0; }
.grp h3 {
  font-family: var(--f-tech);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}
.field {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  padding: 8px 10px;
  min-width: 0;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  appearance: none;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  padding: 6px 9px;
  font-family: var(--f-tech);
  font-size: 13px;
  cursor: pointer;
}
.chip i { font-style: normal; font-size: 11px; color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }
.chip.zero:not([aria-pressed="true"]) { opacity: 0.4; }
.list { display: flex; flex-direction: column; }
.list.scroll { max-height: 216px; overflow-y: auto; padding-right: 4px; }
.chk { display: flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; font-size: 14px; }
.chk input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; flex: none; }
.chk .ct { margin-left: auto; font-family: var(--f-tech); font-size: 12px; color: var(--muted); }
.chk.zero:not(.on) { opacity: 0.4; }
.sub { font-family: var(--f-tech); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); padding: 10px 0 2px; }
.sub:first-child { padding-top: 0; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pair label { font-size: 12.5px; color: var(--muted); display: grid; gap: 4px; }
.range { width: 100%; accent-color: var(--accent); }
.out { font-family: var(--f-tech); font-size: 13px; margin: 6px 0 0; }
.reset { margin-top: 6px; width: 100%; }

/* Toolbar */
.results { min-width: 0; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.count { font-size: 14px; color: var(--muted); }
.count b { color: var(--ink); font-weight: 600; }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sort { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 3px; padding: 8px 10px; }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 235px), 1fr)); gap: 14px; }
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.card:hover { border-color: var(--accent); }
.open {
  appearance: none;
  border: 0;
  background: none;
  margin: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  width: 100%;
  flex: 1;
  min-width: 0;
}
.tile {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 5 / 4;
  background: var(--tile);
  border-radius: 3px 3px 0 0;
}
.tile svg { height: 84%; width: auto; max-width: 100%; }
.badge {
  position: absolute;
  left: 10px;
  top: 10px;
  font-family: var(--f-tech);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 3px 6px;
  border-radius: 2px;
}
.badge.mine { top: auto; bottom: 10px; background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.body { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px 14px; flex: 1; width: 100%; min-width: 0; }
.brand { font-family: var(--f-tech); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.model { font-family: var(--f-display); font-weight: 600; font-size: 23px; line-height: 1.05; text-wrap: balance; }
.spec { font-family: var(--f-tech); font-size: 12.5px; margin-top: 4px; overflow-wrap: anywhere; }
.meta { font-size: 12.5px; color: var(--muted); }
.foot { margin-top: auto; padding-top: 12px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; }
.price { font-family: var(--f-display); font-weight: 700; font-size: 25px; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
.where { font-size: 12px; color: var(--muted); }
.fav {
  appearance: none;
  position: absolute;
  top: 8px;
  right: 8px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}
.fav:hover { color: var(--accent); border-color: var(--accent); }
.fav[aria-pressed="true"] { color: var(--accent); }
.fav[aria-pressed="true"] svg path { fill: currentColor; }

.empty { border: 1px dashed var(--line-strong); border-radius: 4px; padding: 40px 20px; text-align: center; color: var(--muted); grid-column: 1 / -1; }
.empty b { display: block; color: var(--ink); font-family: var(--f-display); font-size: 26px; font-weight: 600; margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }

footer { border-top: 1px solid var(--line); padding-block: 20px 28px; font-family: var(--f-tech); font-size: 12px; color: var(--muted); }

/* Navigation */
.nav { display: flex; gap: 4px; }
.nav a {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 8px 12px;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
@media (max-width: 640px) {
  .bar { flex-wrap: wrap; }
  .nav { order: 3; width: 100%; }
  .nav a { flex: 1; }
}

/* Bilar */
.mode { display: inline-block; margin: 0; font-family: var(--f-tech); font-size: 12px; line-height: 1.45; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 3px; background: var(--surface); max-width: 70ch; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 16px; min-width: 0; }
@media (min-width: 900px) { .panel { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; } }
.panel h2 { font-family: var(--f-display); font-weight: 700; font-size: 28px; line-height: 1; margin: 0 0 12px; }
.panel form { display: grid; gap: 12px; }
.panel label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); min-width: 0; }
.panel textarea { min-height: 76px; resize: vertical; }
.drop { position: relative; display: grid; place-items: center; text-align: center; gap: 4px; padding: 22px 12px; border: 1.5px dashed var(--line-strong); border-radius: 4px; cursor: pointer; color: var(--muted); font-size: 14px; }
.drop strong { color: var(--ink); font-weight: 600; }
.panel .drop:hover, .panel .drop.over, .panel .drop:focus-within { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.th { position: relative; aspect-ratio: 1 / 1; max-width: 100%; background: var(--tile); border-radius: 3px; overflow: hidden; }
.th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.th .rm { appearance: none; position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--surface); color: var(--ink); font-size: 18px; line-height: 1; cursor: pointer; padding: 0; }
.th .cv, .th .mk { position: absolute; left: 4px; bottom: 4px; font-family: var(--f-tech); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; background: var(--surface); color: var(--ink); border: 0; padding: 3px 6px; border-radius: 2px; }
.th .cv { background: var(--accent); color: var(--accent-ink); }
.th .mk { appearance: none; cursor: pointer; }
.cstat { margin: 0; font-size: 13px; min-height: 1.4em; color: var(--muted); }
.carcard .tile { aspect-ratio: 4 / 3; overflow: hidden; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph { color: var(--muted); font-size: 13px; padding: 12px; text-align: center; }
.cmain { position: relative; background: var(--tile); border-radius: 4px; aspect-ratio: 4 / 3; max-width: 100%; display: grid; place-items: center; overflow: hidden; }
.cmain img { width: 100%; height: 100%; object-fit: contain; display: block; }
.arr { appearance: none; position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; padding: 0; }
.arr.prev { left: 8px; }
.arr.next { right: 8px; }
.cthumbs { display: flex; gap: 6px; overflow-x: auto; margin-top: 8px; padding-bottom: 2px; }
.cthumbs button { appearance: none; flex: none; width: 66px; height: 50px; padding: 0; border: 2px solid transparent; background: var(--tile); border-radius: 3px; overflow: hidden; cursor: pointer; }
.cthumbs button[aria-current="true"] { border-color: var(--accent); }
.cthumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Konto */
.acc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-bottom: 16px; }
.acc-head .btn { margin-left: auto; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--tile); object-fit: cover; flex: none; }
.acc-name { font-family: var(--f-display); font-weight: 700; font-size: 28px; line-height: 1; }
.notice { border: 1px solid var(--accent); background: var(--accent-soft); border-radius: 4px; padding: 12px 14px; margin-bottom: 16px; font-size: 14px; max-width: 70ch; }
.asec { margin-top: 30px; }
.asec h2 { font-family: var(--f-display); font-weight: 700; font-size: 30px; line-height: 1; margin: 0 0 12px; letter-spacing: 0.01em; }
.alist { display: grid; gap: 10px; }
.arow { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 8px 14px; align-items: center; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; }
.athumb { appearance: none; border: 0; padding: 6px; width: 76px; height: 76px; background: var(--tile); border-radius: 3px; cursor: pointer; display: grid; place-items: center; }
.athumb svg { width: 100%; height: 100%; }
.ainfo { display: grid; gap: 2px; min-width: 0; }
.amodel { font-family: var(--f-display); font-weight: 600; font-size: 22px; line-height: 1.05; }
.aprice { display: grid; justify-items: end; gap: 4px; }
.aprice .price { font-size: 22px; }
.aact { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.pill { font-family: var(--f-tech); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; padding: 2px 7px; border-radius: 2px; border: 1px solid var(--line-strong); }
.pill.act { border-color: var(--accent); background: var(--accent-soft); }
.pill.sold { color: var(--muted); }
.box { display: grid; gap: 10px; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 16px; }
.box label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.box .btn { justify-self: start; }

.detail { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
@media (min-width: 720px) { .detail { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); } }
.big { background: var(--tile); border-radius: 4px; display: grid; place-items: center; aspect-ratio: 1 / 1; max-width: 100%; }
.big svg { width: 86%; height: auto; }
.fine { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.dh h2 { font-family: var(--f-display); font-weight: 700; font-size: 36px; line-height: 1; margin: 4px 0 8px; text-wrap: balance; padding-right: 36px; }
.dprice { font-family: var(--f-display); font-weight: 700; font-size: 34px; margin: 0 0 12px; font-variant-numeric: tabular-nums; }
.specs { width: 100%; border-collapse: collapse; margin: 0 0 14px; font-size: 14px; }
.specs th, .specs td { text-align: left; padding: 7px 0; border-top: 1px solid var(--line); vertical-align: top; }
.specs th { font-weight: 400; color: var(--muted); width: 42%; padding-right: 10px; }
.specs td { font-family: var(--f-tech); font-size: 13px; }
.note { margin: 0 0 14px; }
.fit { font-size: 13.5px; color: var(--muted); margin: 0 0 14px; }
.fit b { color: var(--ink); font-weight: 600; }
.copyline { display: flex; gap: 8px; margin-bottom: 12px; }
.copyline input { flex: 1; min-width: 0; font-family: var(--f-tech); font-size: 12.5px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; }

form.post { display: grid; gap: 14px; }
form.post h2 { font-family: var(--f-display); font-weight: 700; font-size: 34px; line-height: 1; margin: 0; padding-right: 36px; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.fgrid label, form.post > label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); min-width: 0; }
form.post textarea { min-height: 80px; resize: vertical; }

.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 30;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 3px;
  font-size: 14px;
  max-width: calc(100% - 32px);
  text-align: center;
}
@media (prefers-reduced-motion: no-preference) {
  .card, .chip, .btn { transition: border-color 0.15s ease, background-color 0.15s ease; }
}

/* ===== Källaren: stil och komponenter =====
   Regler (taste-skill): inga små versaler med spärrning, inga tunna linjer, inga gradienter eller skuggor i vila,
   inget glas. Raka hörn överallt. Rubriker i Chakra Petch, text i Barlow i full textfärg. */
body { font-synthesis: none; -webkit-font-smoothing: antialiased; font-size: 16px; }
h1, h2, h3, .model, .amodel, .acc-name, .empty b { text-wrap: balance; }
.eyebrow { display: none; }

/* Sidhuvud: samma bakgrund som sidan, ordmärke, några länkar och en knapp */
.top { background: var(--bg); border-bottom: 0; }
.bar { padding-block: 18px; }
.mark { color: var(--accent); }
.mark span { font-family: var(--f-display); font-weight: 700; font-size: 23px; letter-spacing: -0.02em; text-transform: none; color: var(--ink); }
.nav { gap: 6px; }
.nav a { position: relative; padding: 10px 12px; border-bottom: 0; font-family: var(--f-body); font-weight: 600; font-size: 16px; letter-spacing: 0; text-transform: none; color: var(--muted); white-space: nowrap; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 3px; background: var(--accent); }
.short { display: none; }
@media (max-width: 640px) {
  .nav a { padding: 10px 4px; font-size: 15px; }
  .nav a[aria-current="page"]::after { left: 4px; right: 4px; }
  .mark span { font-size: 20px; }
  .long { display: none; }
  .short { display: inline; }
}

/* Inledning på Garaget och Mitt konto */
.intro { position: relative; padding-block: 40px 44px; color: var(--ink); background: var(--bg); overflow: hidden; }
.intro h1 { max-width: 14ch; margin: 0 0 18px; font-family: var(--f-display); font-weight: 700; font-size: clamp(40px, 6vw, 88px); line-height: 0.92; letter-spacing: -0.035em; text-transform: none; color: var(--ink); text-shadow: none; }
.lede { margin: 0; max-width: 48ch; color: var(--ink); font-size: 19px; line-height: 1.5; }
.intro .mode { margin-top: 20px; background: var(--surface); border: 0; color: var(--ink); border-radius: 0; }
/* Egen banner från admin-sidan: bilden bakom texten, med mörk toning för läsbarheten */
.has-banner .intro { color: var(--hero-fg); background: linear-gradient(90deg, var(--scrim) 0%, rgba(10, 10, 11, 0.25) 75%), var(--scene) var(--scene-pos, center bottom) / cover no-repeat, #101112; }
.has-banner .intro h1, .has-banner .intro .lede { color: var(--hero-fg); }
.has-banner .hero-wheel { display: none; }

/* Startsidan: rubrik och passformsväljare till vänster, en stor bronsfälg som går ut över kanten */
.intro.home { padding-block: 32px 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: center; }
.home h1 { font-size: clamp(46px, 7vw, 116px); max-width: 12ch; }
.hero-wheel { width: min(78vw, 420px); justify-self: end; margin-right: -12%; }
.hero-wheel canvas { display: block; width: 100%; height: auto; aspect-ratio: 1; }
@media (min-width: 900px) {
  .intro.home { padding-block: 56px 0; }
  .hero-grid { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); min-height: min(calc(100svh - 240px), 720px); }
  .hero-wheel { width: 150%; max-width: 720px; margin-right: -50%; justify-self: start; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-wheel canvas { animation: roll-in 1.3s var(--ease) both; }
}
@keyframes roll-in { from { transform: translateX(28%) rotate(150deg); opacity: 0; } to { transform: none; opacity: 1; } }

/* Passformsväljaren (den levande delen) */
.fitter { display: grid; gap: 14px; justify-items: start; margin-top: 32px; max-width: 660px; }
.fit-q { margin: 0; font-size: 18px; font-weight: 600; }
.fit-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.fit-opt { appearance: none; display: grid; gap: 1px; min-height: 56px; min-width: 104px; padding: 9px 14px; border: 0; border-radius: 0; background: var(--surface-2); color: var(--ink); text-align: left; cursor: pointer; }
.fit-opt b { font-family: var(--f-display); font-weight: 700; font-size: 19px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.fit-opt span { font-size: 13.5px; color: var(--muted); }
.fit-opt:hover { background: color-mix(in srgb, var(--surface-2) 82%, var(--ink)); }
.fit-opt[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.fit-opt[aria-pressed="true"] span { color: inherit; }
.fit-cars { margin: 0; min-height: 3em; max-width: 52ch; font-size: 16px; }
.has-banner .fit-opt { background: rgba(16, 17, 18, 0.82); color: #fff; }
.has-banner .fit-opt span { color: #d8d8d6; }

/* Stämpeln: hur man läser märkningen på en fälg, satt stort som på fälgen */
.stamp { margin-top: 40px; background: var(--surface); }
.stamp .wrap { padding-block: 28px 34px; }
.stamp-h { margin: 0 0 16px; font-family: var(--f-body); font-weight: 700; font-size: 17px; letter-spacing: 0; }
.legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 18px 40px; margin: 0; background: none; border: 0; border-radius: 0; overflow: visible; }
.legend div { padding: 0; background: none; }
.lv { display: block; font-family: var(--f-display); font-weight: 700; font-size: clamp(30px, 3.4vw, 48px); line-height: 1; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.ll { display: block; margin: 6px 0 0; font-size: 15px; color: var(--muted); }

.layout { padding-block: 56px 96px; }

/* Knappar: raka, fyllda, minst 46 px höga */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 11px 20px; border: 0; border-radius: 0; background: var(--surface-2); font-family: var(--f-body); font-weight: 600; font-size: 15.5px; letter-spacing: 0; text-transform: none; color: var(--ink); }
.btn:hover { background: color-mix(in srgb, var(--surface-2) 82%, var(--ink)); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 86%, var(--ink)); filter: none; }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 2px var(--line-strong); }
.btn.ghost:hover { box-shadow: inset 0 0 0 2px var(--ink); background: transparent; }
.btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.btn:disabled { opacity: 0.5; cursor: default; }
@media (prefers-reduced-motion: no-preference) { .btn:active, .fit-opt:active, .chip:active { transform: translateY(1px); } }

/* Filter och fält */
.filters, .panel, .sheet, .box, .arow, .card, .empty, .notice, .sort, .field { border-radius: 0; }
.filters { background: var(--surface); border: 0; padding: 6px 20px 20px; }
.grp { padding-block: 16px; border-top: 0; }
.grp h3 { margin: 0 0 10px; font-family: var(--f-body); font-size: 15px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--ink); }
.field, .sort { min-height: 46px; padding: 10px 12px; border: 1px solid var(--line-strong); background: var(--bg); font-size: 16px; }
.field:focus { border-color: var(--accent); }
.chip { min-height: 36px; padding: 7px 11px; border: 0; border-radius: 0; background: var(--surface-2); font-family: var(--f-display); font-weight: 600; font-size: 14px; }
.chip:hover { background: color-mix(in srgb, var(--surface-2) 82%, var(--ink)); }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.chip[aria-pressed="true"] i { color: inherit; opacity: 0.8; }
.chip i { font-size: 12px; }
.chk { font-size: 15px; padding: 5px 0; }
.chk .ct { font-family: var(--f-display); }
.sub { padding: 12px 0 2px; font-family: var(--f-body); font-size: 14px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--muted); }
.pair label { font-size: 14px; }
.out { font-family: var(--f-body); font-size: 15px; }
.count { font-size: 16px; color: var(--ink); }
.count b { font-family: var(--f-display); font-weight: 700; }
.count:focus { outline: none; }
.toolbar { margin-bottom: 20px; }

/* Annonser: bilden först, texten direkt på bakgrunden */
.grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 36px 20px; }
.card { background: transparent; border: 0; }
.card:hover { border-color: transparent; box-shadow: none; }
.tile { aspect-ratio: 4 / 3; border-radius: 0; background: var(--surface); overflow: hidden; }
.tile img, .tile svg { transition: transform 0.45s var(--ease); }
.tile svg { height: 80%; filter: none; }
.card:hover .tile img, .card:hover .tile svg { transform: scale(1.04); }
.badge { top: 0; left: 0; padding: 5px 9px; border: 0; border-radius: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-weight: 600; font-size: 13px; letter-spacing: 0; text-transform: none; }
.badge.mine { top: auto; bottom: 0; background: var(--accent); color: var(--accent-ink); }
.body { gap: 3px; padding: 14px 0 0; }
.brand { font-family: var(--f-body); font-size: 14.5px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); }
.model { font-family: var(--f-display); font-weight: 700; font-size: 22px; line-height: 1.1; letter-spacing: -0.015em; }
.spec { margin-top: 2px; font-family: var(--f-display); font-weight: 600; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.meta { font-size: 14.5px; color: var(--muted); }
.tags { gap: 6px; }
.tag { border: 0; border-radius: 0; background: var(--surface-2); padding: 2px 7px; font-family: var(--f-body); font-size: 13.5px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); }
.tag::before { content: "#"; }
.foot { margin-top: 8px; padding-top: 6px; border-top: 0; }
.price, .dprice, .aprice .price { font-family: var(--f-display); font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.price { font-size: 24px; }
.where { font-size: 13.5px; }
.fav { top: 0; right: 0; width: 46px; height: 46px; border: 0; border-radius: 0; background: var(--bg); color: var(--ink); }
.fav:hover { color: var(--accent); border-color: transparent; }
.fav[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
@media (prefers-reduced-motion: no-preference) {
  .grid .card { animation: rise 0.5s var(--ease) both; }
  .grid .card:nth-child(2) { animation-delay: 0.05s; } .grid .card:nth-child(3) { animation-delay: 0.1s; }
  .grid .card:nth-child(4) { animation-delay: 0.15s; } .grid .card:nth-child(5) { animation-delay: 0.2s; }
  .grid .card:nth-child(6) { animation-delay: 0.25s; } .grid .card:nth-child(n+7) { animation-delay: 0.3s; }
  .btn, .chip, .fit-opt, .fav, .nav a { transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.empty { background: var(--surface); border: 0; }
.empty b { font-family: var(--f-display); font-weight: 700; }

/* Rubrikstorlekar */
.dh h2 { font-size: 30px; line-height: 1.05; }
.dprice { font-size: 40px; }
form.post h2, .panel h2, .asec h2 { font-family: var(--f-display); font-weight: 700; letter-spacing: -0.02em; }
form.post h2 { font-size: 30px; }
.panel h2 { font-size: 26px; }
.asec h2 { font-size: 28px; }
.acc-name { font-family: var(--f-display); font-weight: 700; font-size: 30px; letter-spacing: -0.02em; }
.empty b { font-size: 24px; }
.amodel { font-family: var(--f-display); font-weight: 700; font-size: 21px; }
.aprice .price { font-size: 22px; }

/* Sidfot: ett bronsfält med namnet i full bredd */
footer { position: relative; background: var(--accent); color: var(--accent-ink); border-top: 0; padding-block: 48px 36px; font-family: var(--f-body); font-size: 15px; }
.wordmark { margin: 0 auto 32px; padding-bottom: 0.08em; font-family: var(--f-display); font-weight: 700; font-size: clamp(52px, 17vw, 272px); line-height: 0.9; letter-spacing: -0.055em; white-space: nowrap; overflow: hidden; }
.foot-note { margin: 0; max-width: 72ch; }
.toast { border-radius: 0; }

/* ===== Egna sidor med egna adresser ===== */
a.btn { display: inline-block; text-decoration: none; text-align: center; }
a.mark, a.open, a.athumb, .nav a { text-decoration: none; }
a.open { color: inherit; }
.nav a { text-align: center; }
h1[tabindex="-1"]:focus { outline: none; }

/* Garaget är nu bara en lista, formuläret har flyttat till egen sida */
.layout.single { grid-template-columns: minmax(0, 1fr); }

/* Sidhuvud och brödsmulor */
.page { padding-block: 22px 64px; }
.page.narrow { max-width: 880px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; margin: 0 0 14px; font-family: var(--f-tech); font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; padding: 8px 0; }
.crumbs a:hover { color: var(--accent); }
.crumbs [aria-current="page"] { color: var(--ink); }
.phead { margin: 0 0 18px; }
.phead .eyebrow { color: var(--accent); margin: 0 0 8px; }
.phead .eyebrow::before { background: var(--accent); }
.ptitle { font-family: var(--f-display); font-weight: 400; font-size: clamp(30px, 5vw, 46px); line-height: 1.02; letter-spacing: 0.005em; margin: 4px 0 8px; text-wrap: balance; text-shadow: 3px 3px 0 var(--accent-soft); }
.plede { margin: 0; color: var(--muted); max-width: 62ch; }

/* Annons och bil: hel sida */
.page .detail { gap: 22px 36px; align-items: start; }
@media (min-width: 860px) {
  .page .detail { grid-template-columns: minmax(0, 480px) minmax(0, 1fr); }
  .page .detail.car { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
}
.dh .ptitle { margin: 4px 0 10px; }
.dh .notice { margin: 0 0 12px; }
.page .dprice { margin: 4px 0 14px; }
.page .row + .row { margin-top: 8px; }

/* Formulär på egen sida */
.panel.formpage { padding: 20px; }
@media (min-width: 900px) { .panel.formpage { position: static; max-height: none; overflow: visible; } }
.formgrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-items: start; }
.pvcol { display: none; }
@media (min-width: 980px) {
  .formgrid { grid-template-columns: minmax(0, 1fr) 300px; }
  .pvcol { display: block; position: sticky; top: 14px; }
}
.pvlabel { font-family: var(--f-tech); font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.pvwrap { pointer-events: none; }

/* ===== Taggar, kontakt och bilder i annonsen ===== */
.tile { overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tag { display: inline-block; font-family: var(--f-tech); font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line-strong); padding: 1px 6px; border-radius: 2px; text-decoration: none; }
a.tag { font-size: 11.5px; padding: 5px 10px; color: var(--ink); }
a.tag:hover, a.tag:focus-visible { border-color: var(--accent); color: var(--accent); }
.tagrow { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.fset { display: grid; gap: 8px; min-width: 0; }
.fset .lbl { font-size: 13px; color: var(--muted); }
.fset .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tagadd { display: flex; gap: 8px; }
.tagadd .field { flex: 1; min-width: 0; }
.athumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 2px; display: block; }
.athumb { overflow: hidden; }
.contact { margin: 0 0 16px; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; justify-items: start; }
.chead { font-family: var(--f-display); font-weight: 600; font-size: 22px; line-height: 1; margin: 0; }
.cpanel { display: grid; gap: 10px; width: 100%; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 2px; }
.cpanel label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.cpanel textarea { min-height: 96px; }

/* ===== Förstora bild ===== */
.zoom { appearance: none; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.zoom img { width: 100%; height: 100%; object-fit: contain; display: block; }
.lb { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; background: rgba(6, 3, 16, 0.96); color: #fff; }
.lb[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.lb::backdrop { background: rgba(6, 3, 16, 0.9); }
.lbbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; font-family: var(--f-tech); font-size: 13px; letter-spacing: 0.1em; }
.lbbar button, .lbarr { appearance: none; border: 0; background: rgba(255, 255, 255, 0.14); color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 26px; line-height: 1; cursor: pointer; }
.lbbar button:hover, .lbarr:hover { background: var(--accent); color: var(--accent-ink); }
.lbstage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 12px 16px; }
.lbstage img { width: 100%; height: calc(100vh - 90px); object-fit: contain; display: block; }
.lbarr { position: absolute; top: 50%; transform: translateY(-50%); }
.lbarr.prev { left: 10px; }
.lbarr.next { right: 10px; }

.mark img.logo { height: 34px; width: auto; max-width: 160px; object-fit: contain; display: block; }

/* ===== Meddelanden och kommentarer ===== */
.msgs { display: grid; gap: 10px; }
.msg { background: var(--surface); border: 1px solid var(--line); border-radius: 2px; padding: 10px 14px; max-width: 640px; min-width: 0; }
.msg.mine { justify-self: end; border-color: var(--accent); background: var(--accent-soft); }
.msg p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.msghead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-family: var(--f-tech); font-size: 12px; color: var(--muted); }
.msghead b { color: var(--ink); font-weight: 600; }
.msghead .tag { padding: 0 5px; }
.linkbtn { appearance: none; margin-left: auto; padding: 4px 0; border: 0; background: none; font: inherit; color: var(--muted); text-decoration: underline; cursor: pointer; }
.linkbtn:hover, .linkbtn:focus-visible { color: var(--accent); }
.thread { display: grid; gap: 16px; max-width: 760px; }
.comments { display: grid; gap: 12px; max-width: 760px; margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line); }
.contact .cpanel + .btn { margin-top: 2px; }
.conv { display: grid; gap: 2px; min-width: 0; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 2px; color: inherit; text-decoration: none; }
.conv:hover, .conv:focus-visible { border-color: var(--accent); }
.conv.unread { box-shadow: inset 4px 0 0 var(--accent); }
.conv-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; min-width: 0; }
.conv-body { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv .pill { justify-self: start; margin-top: 4px; }
.asec h2 .pill { font-size: 12px; vertical-align: middle; margin-left: 6px; }
/* ===== Admin: sajtinställningar ===== */
.asset { display: grid; place-items: center; min-height: 72px; max-width: 320px; padding: 12px; background: var(--chrome); border: 1px solid var(--line); border-radius: 2px; }
.asset.wide { max-width: 100%; aspect-ratio: 1200 / 420; padding: 0; overflow: hidden; }
.asset img { display: block; max-width: 100%; max-height: 64px; object-fit: contain; }
.asset.wide img { width: 100%; height: 100%; max-height: none; object-fit: cover; }
.asset .ph { color: var(--chrome-muted); }
.colorrow { display: flex; gap: 8px; align-items: center; }
.colorrow input[type="color"] { flex: none; width: 42px; height: 38px; padding: 2px; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 2px; cursor: pointer; }
.colorrow .field { flex: 1; font-family: var(--f-tech); }
/* Bannerns förhandsvisning: samma bakgrund som .intro, så urklippningen blir densamma */
.bannerpv { display: grid; grid-template-columns: minmax(0, 1fr) 132px; gap: 12px; align-items: start; }
.bframe {
  position: relative; min-width: 0; border: 1px solid var(--line-strong); border-radius: 2px; cursor: grab; touch-action: none; user-select: none;
  background: linear-gradient(90deg, var(--scrim) 0%, transparent 78%), var(--scene) var(--scene-pos, center bottom) / cover no-repeat, #0c0720;
}
.bframe.dragging { cursor: grabbing; border-color: var(--accent); }
.blabel { position: absolute; left: 6px; top: 6px; font-family: var(--f-tech); font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--hero-fg); background: var(--plate-bg); padding: 2px 6px; border-radius: 2px; }
@media (max-width: 560px) { .bannerpv { grid-template-columns: minmax(0, 1fr) 96px; } }
/* ===== Redigeringsläge: texterna redigeras direkt på sidan ===== */
.editing [data-site].editable { outline: 1px dashed var(--accent); outline-offset: 4px; cursor: text; min-width: 2ch; }
.editing [data-site].editable:hover { outline-style: solid; }
.editing [data-site].editable:focus { outline: 2px solid var(--accent); }
.editing { padding-bottom: 150px; }
.editbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: var(--chrome); color: var(--chrome-fg); border-top: 3px solid var(--accent); padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -10px 30px -10px var(--glow); }
.editbar .wrap { display: grid; gap: 6px; }
.editbar p { margin: 0; font-size: 14px; }
.editbar .fine { color: var(--chrome-muted); min-height: 1.4em; }
.editbar .btn { color: var(--chrome-fg); }
.editbar .btn.primary { color: var(--accent-ink); }
.editbar .btn::before { background: transparent; border-color: var(--chrome-muted); }
.editbar .btn.primary::before { background: var(--accent); border-color: var(--accent); }
.editing .toast { bottom: auto; top: calc(16px + env(safe-area-inset-top, 0px)); }
/* Kryssruta med text på samma rad även i formulärpaneler */
.panel label.chk { display: flex; color: var(--ink); font-size: 14px; }

/* ===== Juridiska sidor och sidfotens länkar ===== */
.legal { max-width: 760px; }
.legal section { margin-top: 26px; }
.legal h2 { font-family: var(--f-display); font-weight: 400; font-size: 24px; line-height: 1.1; margin: 0 0 8px; }
.legal p, .legal li { line-height: 1.6; }
.legal p { margin: 0 0 10px; }
.legal ul { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 6px; }
.legal a { color: var(--accent); }
.legal .notice { margin: 4px 0 6px; }
.legal-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.ph-legal { background: var(--accent-soft); outline: 1px dashed var(--accent); border-radius: 2px; padding: 0 4px; font-weight: 600; }
.footlinks { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 10px; }
.footlinks a { color: var(--chrome-fg); text-decoration: none; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.footlinks a:hover, .footlinks a:focus-visible { color: var(--accent); }

/* Kryssrutor med text (t.ex. godkännande vid registrering) */
.box label.chk { display: flex; align-items: flex-start; gap: 8px; color: var(--ink); font-size: 14px; }
.box label.chk input { margin-top: 3px; }
.box label.chk a { color: var(--accent); }

/* Anmäl annons */
.report { display: grid; gap: 10px; justify-items: start; margin-top: 8px; }
.report .cpanel a:not(.btn) { color: var(--accent); }

/* Radera konto */
.asec.danger h2 { color: var(--accent); }

/* Annons och bil: stor bild och beskrivning fyller första skärmen, kontakt och knappar ligger under */
#page-body:has(> .hero) { max-width: 1600px; }
.hero .dgal { min-width: 0; }
.hero .cmain .blur { position: absolute; inset: -24px; background: center / cover no-repeat; filter: blur(22px) brightness(0.55); }
.hero .cmain .zoom { position: relative; }
.hero .cmain img, .hero .zoom img { object-fit: contain; }
.hero .cthumbs button { width: 92px; height: 68px; }
@media (min-width: 960px) {
  .page .detail.hero, .page .detail.hero.car { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: stretch; gap: 0 44px; min-height: calc(100svh - var(--hero-off, 140px)); }
  .hero .dgal { display: flex; flex-direction: column; }
  .hero .cmain, .hero .big { flex: 1 1 auto; aspect-ratio: auto; min-height: 420px; }
  .hero .big svg { width: auto; max-width: 78%; max-height: 78%; }
  .hero .dh { align-self: center; padding-block: 8px; }
  .hero .dh .specs { width: 100%; }
}
.below { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); display: grid; gap: 28px; align-items: start; }
@media (min-width: 960px) { .below:has(> .owner) { grid-template-columns: minmax(0, 1fr) minmax(0, 400px); } }
.below .buyer { max-width: 760px; }
.below .buyer .contact { border-top: 0; padding-top: 0; }
.owner { display: grid; gap: 12px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line-strong); border-left: 4px solid var(--violet); border-radius: 4px; }
.owner .row { margin: 0; }

/* ===== Källaren: justeringar av delarna ovan ===== */
a.btn { display: inline-flex; }
.page { padding-block: 28px 96px; }
.crumbs { font-family: var(--f-body); font-size: 14.5px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.crumbs a:hover { color: var(--ink); }
.phead { margin: 0 0 28px; }
.ptitle { font-family: var(--f-display); font-weight: 700; font-size: clamp(36px, 4.8vw, 68px); line-height: 0.95; letter-spacing: -0.035em; text-transform: none; text-shadow: none; }
.plede { color: var(--ink); font-size: 18px; }
.dh .brand { font-size: 16px; }
.specs { font-size: 15.5px; }
.specs th, .specs td { padding: 10px 0; }
.specs th { font-weight: 500; }
.specs td { font-family: var(--f-display); font-weight: 600; font-size: 15.5px; }
.tagrow { gap: 8px; }
a.tag { padding: 6px 11px; font-size: 14px; color: var(--ink); }
a.tag:hover, a.tag:focus-visible { background: var(--accent); color: var(--accent-ink); }
.note { font-size: 17px; max-width: 60ch; }
.tag { border: 0; border-radius: 0; background: var(--surface-2); padding: 2px 7px; font-family: var(--f-body); font-size: 13.5px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); }
.contact { border-top: 0; padding-top: 0; }
.chead { font-family: var(--f-display); font-weight: 700; font-size: 26px; letter-spacing: -0.02em; text-transform: none; }
.cpanel { border: 0; border-radius: 0; background: var(--surface-2); }
.cmain, .big, .th, .athumb, .asset, .bframe, .mode, .msg, .conv { border-radius: 0; }
.cmain, .big { background: var(--surface); }
.cthumbs button { border-radius: 0; border: 0; outline: 3px solid transparent; outline-offset: -3px; }
.cthumbs button[aria-current="true"] { outline-color: var(--accent); }
.below { margin-top: 56px; padding: 32px; border-top: 0; background: var(--surface); }
@media (max-width: 640px) { .below { padding: 20px 16px; margin-inline: -16px; } }
.owner { padding: 20px; border: 0; border-left: 4px solid var(--accent); border-radius: 0; background: var(--surface-2); }
.comments { border-top: 0; margin-top: 56px; padding-top: 0; }
.notice { border: 0; border-left: 4px solid var(--accent); background: var(--accent-soft); color: var(--ink); }
.msg { border: 0; background: var(--surface); }
.msg.mine { background: var(--accent-soft); border: 0; }
.msghead { font-family: var(--f-body); font-size: 13.5px; }
.conv { border: 0; background: var(--surface); }
.conv:hover, .conv:focus-visible { background: var(--surface-2); }
.conv.unread { box-shadow: inset 4px 0 0 var(--accent); }
.pill { border: 0; border-radius: 0; background: var(--surface-2); font-family: var(--f-body); font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.pill.act { background: var(--accent); color: var(--accent-ink); }
.panel { border: 0; background: var(--surface); }
.box { border: 0; background: var(--surface); }
.arow { border: 0; background: var(--surface); }
.athumb { background: var(--surface-2); }
.drop { border-radius: 0; }
.th .cv, .th .mk, .pvlabel, .blabel, .lbbar { font-family: var(--f-body); letter-spacing: 0; text-transform: none; }
.pvlabel { font-size: 14px; color: var(--ink); }
.asec { margin-top: 44px; }
.asec.danger h2 { color: var(--ink); }
.legal h2 { font-family: var(--f-display); font-weight: 700; font-size: 24px; letter-spacing: -0.02em; }
.legal a, .box label.chk a, .report .cpanel a:not(.btn) { color: var(--ink); text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.legal p, .legal li { font-size: 16.5px; }
.footlinks { gap: 8px 24px; margin-bottom: 14px; }
.footlinks a { color: inherit; font-family: var(--f-body); font-size: 16px; font-weight: 600; letter-spacing: 0; text-transform: none; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.footlinks a:hover, .footlinks a:focus-visible { color: inherit; text-decoration-thickness: 3px; }
footer :focus-visible { outline-color: var(--accent-ink); }
.editbar { background: var(--surface); color: var(--ink); border-top: 4px solid var(--accent); box-shadow: none; }
.editbar .btn { color: var(--ink); }
.editbar .btn.primary { color: var(--accent-ink); }
.editbar .fine { color: var(--muted); }
.bframe { background: linear-gradient(90deg, var(--scrim) 0%, transparent 78%), var(--scene) var(--scene-pos, center bottom) / cover no-repeat, var(--surface); }
#acc-body { padding-top: 36px; }
.acc-head .btn { margin-left: 0; }
.lb { background: rgba(10, 10, 11, 0.97); }
.lb::backdrop { background: rgba(10, 10, 11, 0.9); }
.lbbar button:hover, .lbarr:hover { background: var(--accent); color: var(--accent-ink); }

/* Uppmaning att kontrollera förifyllda mått i annonsformuläret */
.specnote { margin: 0; padding: 12px 16px; border-left: 4px solid var(--accent); background: var(--accent-soft); color: var(--ink); font-size: 15.5px; line-height: 1.5; }
.specnote b { display: block; margin-bottom: 2px; font-family: var(--f-display); font-size: 17px; font-weight: 700; }

/* Startsidan (#/home): rubrik, en längre text om tanken och två val (annonser, garaget).
   Bild eller video (heroImage, heroVideo) bakom texten (.hero-behind) eller bredvid (.hero-side), valt med heroLayout.
   Utan bild och video visas bara texten. Startsidan använder inte bannern (--scene). */
.start { position: relative; background: var(--bg); color: var(--ink); }
.start h1 { max-width: 15ch; margin: 0 0 18px; font-family: var(--f-display); font-weight: 700; font-size: clamp(40px, 5vw, 88px); line-height: 0.92; letter-spacing: -0.035em; text-transform: none; text-shadow: none; text-wrap: balance; }
.start .lede { font-size: clamp(20px, 1.8vw, 26px); line-height: 1.35; max-width: 42ch; }
.start .story { margin: 14px 0 0; max-width: 48ch; font-size: 18px; line-height: 1.55; }
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 30px; max-width: 620px; }
.choice { display: grid; gap: 2px; padding: 18px 20px; background: var(--surface); color: var(--ink); text-decoration: none; transition: background 0.15s; }
.choice:hover { background: var(--surface-2); }
.choice b { font-family: var(--f-display); font-weight: 700; font-size: 24px; line-height: 1.1; letter-spacing: -0.02em; }
.choice span { font-size: 15px; color: var(--muted); }
.choice.main { background: var(--accent); color: var(--accent-ink); }
.choice.main span { color: inherit; }
.choice.main:hover { background: color-mix(in srgb, var(--accent) 86%, #000); }
.hero-media { position: relative; margin: 0; overflow: hidden; background: #1b1d1f; }
.hero-media.none { display: none; }
.hero-media img, .hero-media video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 70% 60%; }
.credit { position: absolute; right: 8px; bottom: 8px; z-index: 2; max-width: calc(100% - 16px); margin: 0; padding: 2px 6px; font-size: 12px; color: #e9e9e6; background: rgba(10, 10, 11, 0.6); }
.credit:empty { display: none; }
.start-grid { padding-block: 32px 64px; }
/* Bredvid texten */
.hero-side .start-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.hero-side .hero-media { order: -1; min-height: 300px; }
@media (min-width: 900px) {
  .hero-side .start-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 40px; align-items: stretch; min-height: min(calc(100svh - 120px), 820px); }
  .hero-side .start-copy { align-self: center; }
  .hero-side .hero-media { order: 0; }
}
/* Bakom texten: bilden fyller sidan, med en jämn mörk toning för läsbarheten */
.hero-behind .start-grid { display: flex; align-items: flex-end; min-height: min(calc(100svh - 80px), 900px); padding-block: 120px 56px; }
.hero-behind .start-copy { position: relative; z-index: 1; }
.hero-behind .hero-media { position: absolute; inset: 0; }
.hero-behind .hero-media::after { content: ''; position: absolute; inset: 0; background: var(--scrim); opacity: 0.7; }
.hero-behind:not(:has(.hero-media.none)) .start-copy, .hero-behind:not(:has(.hero-media.none)) h1, .hero-behind:not(:has(.hero-media.none)) .lede, .hero-behind:not(:has(.hero-media.none)) .story { color: #fff; }
.hero-behind .choice:not(.main) { background: rgba(244, 244, 242, 0.94); color: #121314; }
.hero-behind .choice:not(.main) span { color: #4f5357; }
@media (max-width: 560px) { .choices { grid-template-columns: minmax(0, 1fr); } }
.asset.wide video { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Galleriet: kort i bildens eget format (stående telefonbilder beskärs inte), gilla, spara och fälgen som länk */
.masonry { columns: 3 320px; column-gap: 20px; }
.masonry > .empty { column-span: all; }
.gcard { break-inside: avoid; margin: 0 0 30px; }
.gimg { position: relative; display: block; background: var(--surface); }
.gimg img { display: block; width: 100%; height: auto; }
.gimg .ph { display: grid; place-items: center; aspect-ratio: 4 / 3; color: var(--muted); }
.gallery .toolbar { flex-wrap: wrap; align-items: center; gap: 12px; }
.gallery .tools { flex: 1 1 auto; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.gallery .tools .btn.primary { margin-left: 8px; }
.gimg .badge { position: absolute; left: 0; top: 0; bottom: auto; }
.gimg .badge.mine { top: auto; bottom: 0; }
.gcap { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-top: 12px; }
.gtxt { min-width: 0; }
.gt { display: block; font-family: var(--f-display); font-weight: 700; font-size: 21px; line-height: 1.15; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.gs { display: block; font-size: 15px; color: var(--muted); }
.gstamp { display: inline-block; margin-top: 6px; font-family: var(--f-display); font-weight: 600; font-size: 14.5px; color: var(--accent); text-decoration: none; font-variant-numeric: tabular-nums; }
a.gstamp:hover { text-decoration: underline; }
.gstamp.plain { color: var(--muted); }
.gact { display: flex; gap: 4px; flex: none; }
.gact.lg { margin: 4px 0 18px; }
.gbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; min-width: 40px; justify-content: center; padding: 8px 10px; border: 0; border-radius: 0; background: var(--surface); color: var(--ink); font-family: var(--f-display); font-weight: 600; font-size: 15px; cursor: pointer; }
.gbtn:hover { background: var(--surface-2); }
.gbtn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.gbtn[aria-pressed="true"] svg path { fill: currentColor; }
.gact.lg .gbtn { min-height: 44px; padding: 10px 14px; }
.seg { display: inline-flex; background: var(--surface); }
.seg button { border: 0; border-radius: 0; background: none; color: var(--ink); padding: 10px 14px; font-family: var(--f-display); font-weight: 600; font-size: 15px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
#c-saved[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.wfilter { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 20px; margin-bottom: 22px; padding: 16px 20px; background: var(--accent-soft); }
.wfilter p { margin: 0; }
.wfilter p span { display: block; font-size: 15px; color: var(--muted); }
.wfilter b { font-family: var(--f-display); font-weight: 700; font-size: 26px; line-height: 1.1; }
.wheelbox { margin-top: 20px; padding: 18px 20px; background: var(--surface); }
.wheelbox .lbl { font-size: 15px; color: var(--muted); }
.wheelbox h2 { margin: 2px 0 4px; font-family: var(--f-display); font-weight: 700; font-size: 30px; line-height: 1.05; letter-spacing: -0.02em; }
.wheelbox .row { margin-top: 12px; }
.oncars { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; margin: 0 0 16px; padding: 14px; background: var(--surface); color: var(--ink); text-decoration: none; }
.oncars:hover { background: var(--surface-2); }
.oncars .stack { display: flex; padding-right: 14px; }
.oncars .stack img { width: 60px; height: 60px; object-fit: cover; margin-right: -14px; outline: 3px solid var(--surface); }
.oncars b { display: block; font-family: var(--f-display); font-weight: 700; font-size: 18px; line-height: 1.2; }
.oncars span span { font-size: 15px; color: var(--muted); }
/* Hela bilden på annons- och bilsidan. Ytan bredvid (t.ex. vid stående telefonbilder) fylls av en suddig, frostad kopia.
   Bildknappen fyller rutan exakt (absolut), annars blir den lika hög som bilden och bilden beskärs. Fast höjd på dator. */
.hero .cmain { position: relative; background: #1b1d1f; overflow: hidden; }
.hero .cmain .zoom { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.hero .cmain img { width: 100%; height: 100%; object-fit: contain; }
.hero .cmain .arr { z-index: 2; }
@media (min-width: 960px) { .hero .cmain { flex: none; height: min(calc(100svh - var(--hero-off, 140px) - 90px), 760px); min-height: 420px; } }
/* Stående bilder i kort och miniatyrer visas hela */
img.tall { object-fit: contain !important; background: var(--surface); }
@media (max-width: 700px) {
  .masonry { columns: 2 150px; column-gap: 12px; }
  .gcap { flex-direction: column; gap: 8px; }
  .gt { font-size: 18px; }
}

/* Mitt konto: nya meddelanden, rutor till undersidorna och siffran i menyn */
.navdot { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: 6px; padding: 0 6px; background: var(--accent); color: var(--accent-ink); font-family: var(--f-display); font-weight: 700; font-size: 13px; vertical-align: 2px; }
.newbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; margin: 4px 0 0; padding: 14px 18px; background: var(--accent); color: var(--accent-ink); }
.newbar b { font-family: var(--f-display); }
.newbar a { color: inherit; font-family: var(--f-display); font-weight: 600; }
.acctiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 20px 0 34px; }
.acctile { display: grid; gap: 4px; padding: 22px; background: var(--surface); color: var(--ink); text-decoration: none; }
.acctile:hover { background: var(--surface-2); }
.acctile b { font-family: var(--f-display); font-weight: 700; font-size: 26px; line-height: 1.1; }
.acctile span { font-size: 15px; color: var(--muted); }
.acctile.new { background: var(--accent); color: var(--accent-ink); }
.acctile.new span { color: inherit; }
.acctile.new:hover { background: color-mix(in srgb, var(--accent) 86%, #000); }
.convs { display: grid; gap: 6px; max-width: 880px; }
.conv { grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 16px; }
.conv-img { display: block; width: 56px; height: 56px; background: var(--surface-2); overflow: hidden; }
.conv-img img, .conv-img svg { display: block; width: 100%; height: 100%; object-fit: cover; }
.conv-txt { display: grid; gap: 1px; min-width: 0; }
.conv-when { display: grid; justify-items: end; gap: 4px; font-size: 14px; }
.conv.unread { background: var(--surface-2); box-shadow: inset 5px 0 0 var(--accent); }
.conv.unread .conv-top b, .conv.unread .conv-body { color: var(--ink); font-weight: 700; }
.newpill { background: var(--accent); color: var(--accent-ink); font-family: var(--f-display); font-weight: 700; font-size: 13px; padding: 2px 8px; }
.setpage { max-width: 620px; padding-bottom: 48px; }

/* Mitt konto: siffrorna överst under rubriken, och rubriken på listsidorna med en knapp bredvid */
.accstats { margin: 0 0 34px; }
.acclist-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; }
.acctile { align-content: start; }
.acctile.cars { grid-column: span 2; }
.tilepics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tilepics img { width: 96px; height: 72px; object-fit: cover; display: block; background: var(--surface-2); }
@media (max-width: 600px) { .acctile.cars { grid-column: auto; } .tilepics img { width: 72px; height: 54px; } }
.gedit { margin-top: 10px; }

/* Varje sida fyller minst hela skärmen, så att sidfotens bronsfält bara syns när man skrollar ner */
#view-hem, #view-falgar, #view-bilar, #view-ny-bil, #view-sida, #view-konto { min-height: 100vh; min-height: 100svh; }
