:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --ink: #0f1b2d;
  --muted: #55637a;
  --line: #dce1e8;
  --line-strong: #b8c2cf;
  --navy: #0b2a4a;
  --navy-2: #143d6b;
  --navy-tint: #e8eef6;
  --link: #1250b8;
  --plate: #ffcf00;
  --plate-ink: #111111;
  --ok: #157347;
  --ok-bg: #e6f4ec;
  --alert: #b42318;
  --alert-bg: #fdecea;
  --focus: #1250b8;
  --wide: 1200px;
  --sans: "Source Sans 3", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --cond: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --radius: 8px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { font-size: 17px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 1rem; line-height: 1.5; background: var(--bg); color: var(--ink); }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 1.5rem; }
header.site { background: var(--navy); color: #fff; }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 60px; flex-wrap: wrap; }
.brand { font-family: var(--cond); font-weight: 700; font-size: 1.6rem; letter-spacing: 0.01em; color: #fff; text-decoration: none; }
header.site nav { display: flex; gap: 1.5rem; align-items: center; font-size: 0.95rem; }
header.site nav a, header.site nav button.link { color: #fff; }
main { max-width: var(--wide); margin: 0 auto; padding: 1.75rem 1.5rem 3rem; }
footer.site { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
footer.site .wrap { display: flex; gap: 1.5rem; flex-wrap: wrap; padding-top: 1.25rem; padding-bottom: 1.5rem; }
footer.site a { color: var(--muted); }

h1 { font-family: var(--cond); font-weight: 700; font-size: 2.5rem; line-height: 1.05; margin: 0 0 0.6rem; }
h2 { font-family: var(--cond); font-weight: 600; font-size: 1.5rem; line-height: 1.15; margin: 0 0 0.6rem; }
h3 { font-weight: 600; font-size: 1.05rem; margin: 0 0 0.2rem; }
p { margin: 0.5rem 0; }
.muted { color: var(--muted); font-size: 0.93rem; }
.narrow { max-width: 460px; }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.inline { display: inline; }
code { font-family: var(--cond); font-size: 1.05em; font-weight: 600; letter-spacing: 0.02em; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.4rem; }
.card h2 { margin-top: 0; }

.plate {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--plate); color: var(--plate-ink);
  font-family: var(--cond); font-weight: 700; text-transform: uppercase;
  border: 2px solid var(--plate-ink); border-radius: 6px; box-shadow: inset 0 0 0 3px var(--plate);
  padding: 0.05em 0.45em; letter-spacing: 0.08em; line-height: 1; white-space: nowrap; vertical-align: middle;
}
.plate-lg { font-size: 4.4rem; padding: 0.1em 0.35em; border-width: 3px; border-radius: 10px; box-shadow: inset 0 0 0 5px var(--plate), 0 12px 30px rgba(11, 42, 74, 0.18); }
.plate-sm { font-size: 1.15rem; }

button, .button {
  display: inline-block; font: inherit; font-weight: 600; cursor: pointer;
  border: 1.5px solid var(--navy); border-radius: 6px; padding: 0.6rem 1.2rem;
  background: var(--navy); color: #fff; text-decoration: none; line-height: 1.2;
}
button:hover, .button:hover { background: var(--navy-2); border-color: var(--navy-2); }
button.secondary, .button.secondary { background: var(--surface); color: var(--navy); }
button.secondary:hover, .button.secondary:hover { background: var(--navy-tint); }
button.danger { background: var(--surface); color: var(--alert); border-color: var(--alert); }
button.danger:hover { background: var(--alert-bg); }
button.small { padding: 0.3rem 0.7rem; font-size: 0.85rem; }
button.link { background: none; border: 0; color: var(--link); padding: 0; font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
button.link:hover { background: none; }
button.block { width: 100%; }
button:disabled { opacity: 0.55; cursor: default; }

form label { display: block; margin: 0.85rem 0 0; font-weight: 600; font-size: 0.93rem; }
form label.check { font-weight: 500; display: flex; gap: 0.5rem; align-items: center; margin-top: 1rem; }
input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  display: block; width: 100%; margin-top: 0.3rem; font: inherit; padding: 0.55rem 0.7rem;
  border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--ink);
}
input:focus, select:focus, textarea:focus { border-color: var(--focus); }
textarea { resize: vertical; min-height: 6rem; }
fieldset { border: 0; padding: 0; margin: 0 0 1.25rem; }
legend { font-family: var(--cond); font-weight: 600; font-size: 1.4rem; padding: 0; margin-bottom: 0.25rem; }
.listing-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
.listing-form fieldset { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.4rem 1.4rem; display: grid; grid-template-columns: 1fr 1fr; column-gap: 1.25rem; }
.listing-form fieldset > legend { float: left; width: 100%; }
.listing-form fieldset > legend + * { clear: both; }
.listing-form fieldset > p, .listing-form fieldset > .wide { grid-column: 1 / -1; }
.listing-form fieldset.span { grid-column: 1 / -1; }
.listing-form > button { grid-column: 1 / -1; justify-self: start; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--alert); }
.field-error { display: block; color: var(--alert); font-weight: 500; font-size: 0.88rem; margin-top: 0.25rem; }
.error { background: var(--alert-bg); border: 1px solid #f2b8b0; border-radius: 6px; padding: 0.6rem 0.9rem; margin: 0.9rem 0; }
.flash { background: var(--ok-bg); border: 1px solid #b7dfc6; border-radius: 6px; padding: 0.6rem 0.9rem; margin: 0.9rem 0; }
.dev { background: var(--navy-tint); border: 1px dashed var(--line-strong); border-radius: 6px; padding: 0.6rem 0.9rem; margin: 0.9rem 0; word-break: break-all; font-size: 0.93rem; }
.banner { background: var(--navy); color: #fff; font-family: var(--cond); font-weight: 700; font-size: 1.2rem; letter-spacing: 0.08em; text-align: center; padding: 0.45rem 1rem; border-radius: 6px; margin-bottom: 1.25rem; }

.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 3rem; align-items: center; padding: 2rem 0 2.5rem; }
.hero h1 { font-size: 3.4rem; }
.hero .lead { font-size: 1.2rem; max-width: 36ch; color: var(--muted); }
.hero .cta { display: flex; gap: 1rem; align-items: center; margin-top: 1.25rem; flex-wrap: wrap; }
.hero-plate { text-align: center; }
.hero-plate .caption { font-family: var(--cond); font-size: 1.5rem; font-weight: 600; margin-top: 1rem; }
.hero-plate .caption span { color: var(--muted); font-weight: 500; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin: 0 0 2.5rem; }
.features .card p { color: var(--muted); margin-bottom: 0; }
.features .card h3 { font-family: var(--cond); font-size: 1.35rem; font-weight: 600; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0.75rem 0 2.5rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem 1.2rem; }
.steps li::before { content: counter(step); display: block; font-family: var(--cond); font-weight: 700; font-size: 1.8rem; color: var(--navy); margin-bottom: 0.25rem; }
.faq dl { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 2.5rem; margin: 0.5rem 0 0; }
.faq dt { font-weight: 600; margin-top: 0.75rem; }
.faq dd { margin: 0.2rem 0 0; color: var(--muted); }

table.listings { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 1rem 0; font-size: 0.95rem; }
table.listings th { text-align: left; font-weight: 600; color: var(--muted); padding: 0.7rem 1rem; background: var(--bg); border-bottom: 1px solid var(--line); }
table.listings td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.listings tr:last-child td { border-bottom: 0; }
.status { display: inline-block; font-weight: 600; font-size: 0.85rem; padding: 0.15rem 0.6rem; border-radius: 999px; background: var(--navy-tint); color: var(--navy); }
.status.active { background: var(--ok-bg); color: var(--ok); }
.status.suspended, .status.expired { background: var(--alert-bg); color: var(--alert); }
.status-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.4rem; margin: 1rem 0 1.5rem; display: grid; grid-template-columns: 1fr auto; gap: 0.5rem 2rem; align-items: center; }
.status-box p { margin: 0.2rem 0; }
.status-box .actions { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: flex-end; }

.listing-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.listing-head h1 { margin: 0; font-size: 2.2rem; }
.listing-head .variant { color: var(--muted); margin: 0; font-size: 1.1rem; }
.listing-body { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 1.5rem; align-items: start; }
.listing-side { position: sticky; top: 1rem; display: grid; gap: 1.25rem; }
.price-card .price { font-family: var(--cond); font-weight: 700; font-size: 2.8rem; line-height: 1; margin: 0; color: var(--navy); }
.price-card .sub { color: var(--muted); margin: 0.25rem 0 0; }
.price-card .location { margin: 0.75rem 0 0; font-weight: 600; }
.facts { margin: 0; }
.facts .spec { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
.facts .spec:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.gallery { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.gallery .main { margin: 0; background: #0f1b2d; aspect-ratio: 4 / 3; position: relative; }
.gallery .main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.thumbs { display: flex; gap: 0.4rem; overflow-x: auto; padding: 0.6rem; }
.thumb { flex: 0 0 auto; padding: 0; border: 2px solid transparent; border-radius: 4px; background: none; width: 96px; height: 72px; overflow: hidden; cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.active { border-color: var(--navy); }
.description { margin-top: 1.25rem; }
.description p { max-width: 72ch; }
.contact form { margin-top: 0.25rem; }
.contact form label:first-child { margin-top: 0.25rem; }
.contact form button { margin-top: 1rem; }
.phone { font-family: var(--cond); font-size: 1.6rem; font-weight: 600; margin: 0.25rem 0 0.5rem; }
details.report { margin-top: 1.25rem; color: var(--muted); font-size: 0.9rem; }
details.report summary { cursor: pointer; }
details.report form { max-width: 420px; }
.empty { padding: 3rem 0; }

.photos { margin-top: 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.4rem 1.4rem; }
.photos h2 { margin-top: 0; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.6rem; margin: 0.75rem 0; }
.photo { position: relative; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; cursor: grab; }
.photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photo form { position: absolute; right: 0.35rem; bottom: 0.35rem; }
.photo.dragging { opacity: 0.5; }
.photo.uploading::after { content: attr(data-progress); position: absolute; inset: 0; display: grid; place-items: center; background: rgba(15,27,45,0.55); color: #fff; font-family: var(--cond); font-weight: 700; font-size: 1.4rem; }
.photo.failed { border-color: var(--alert); }
label.upload { display: inline-block; cursor: pointer; margin-top: 0.5rem; padding: 0.55rem 1.1rem; border: 1.5px solid var(--navy); border-radius: 6px; color: var(--navy); font-weight: 600; background: var(--surface); }
label.upload:hover { background: var(--navy-tint); }
label.upload input { display: none; }
.js .nojs { display: none; }
.nojs { margin-top: 0.75rem; }

@media (max-width: 960px) {
  .listing-body { grid-template-columns: minmax(0, 1fr); }
  .listing-side { display: contents; }
  .price-card { order: -1; }
  .features, .steps { grid-template-columns: 1fr 1fr; }
  .listing-form { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  html { font-size: 16px; }
  header.site nav { gap: 1rem; font-size: 0.9rem; }
  header.site nav a:first-child { display: none; }
  main { padding: 1.25rem 1rem 2.5rem; }
  .wrap { padding: 0 1rem; }
  .hero { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 1.25rem; }
  .hero h1 { font-size: 2.5rem; }
  .plate-lg { font-size: 3rem; }
  .features, .steps, .faq dl { grid-template-columns: 1fr; }
  .listing-form fieldset { grid-template-columns: 1fr; }
  .status-box { grid-template-columns: 1fr; }
  .status-box .actions { justify-content: flex-start; }
  table.listings th:nth-child(4), table.listings td:nth-child(4) { display: none; }
}
