/* The Random Belgian Car Project: the web as it was before social networks.
   System fonts only, no image, no script needed. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --paper: #e8e6df;
  --ink: #111;
  --soft: #444;
  --red: #b5121b;
  --yellow: #fdda24;
  --blue: #003399;
}

html {
  font: 16px/1.55 ui-monospace, "DejaVu Sans Mono", "Courier New", monospace;
}

body {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1rem;
  background: var(--paper);
  color: var(--ink);
}

h1 {
  margin: 1rem 0 0.8rem;
  font-size: 1.5rem;
  line-height: 1.25;
  border-bottom: 2px dashed #000;
  padding-bottom: 0.5rem;
}

h2 {
  margin: 1.8rem 0 0.6rem;
  font-size: 1.15rem;
}

img {
  max-width: 100%;
  height: auto;
}

/* Links keep the colours everybody knows. */
a:link {
  color: #0000ee;
}

a:visited {
  color: #551a8b;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #000;
  outline-offset: 2px;
  background: var(--yellow);
}

.skip {
  position: absolute;
  left: -10000px;
}

.skip:focus {
  position: static;
  display: block;
  padding: 0.4rem;
}

.sr-only,
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- header: a Belgian plate, and the menu ---- */

.site {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.4rem;
  margin-bottom: 0.5rem;
}

/* The plate: proportions of a real European plate (520 x 110 mm), red frame inside a thin edge, narrow bold letters. */
.plate {
  display: inline-flex;
  align-items: stretch;
  padding: 4px;
  border: 1px solid #999;
  border-radius: 7px;
  background: #fff;
  box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 4px var(--red), 2px 2px 0 #000;
  text-decoration: none;
}

.plate .eu {
  width: 17px;
  margin: 1px 0 1px 1px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 3px 0 2px;
  border-radius: 2px;
  background: var(--blue);
  color: #fff;
  font: bold 10px/1 Arial, "Liberation Sans", Helvetica, sans-serif;
}

.plate .reg {
  padding: 0 14px 0 12px;
  color: var(--red);
  font: bold 31px/36px "Arial Narrow", "Liberation Sans Narrow", "Nimbus Sans Narrow", "Helvetica Neue", Arial, sans-serif;
  font-stretch: condensed;
  letter-spacing: 1px;
}

nav {
  font-size: 0.95rem;
}

nav a {
  display: inline-block;
  padding: 0.3rem 0.15rem;
}

nav a[aria-current] {
  color: var(--ink);
  font-weight: bold;
  text-decoration: none;
}

/* ---- text blocks ---- */

.tagline {
  margin-top: 0;
}

.hint,
figcaption {
  font-size: 0.85rem;
  color: var(--soft);
}

.error,
.notice {
  padding: 0.5rem;
  border: 2px solid #b00;
  background: #fff0f0;
}

.notice {
  border-color: #060;
  background: #f0fff0;
}

.private-link,
.feed-banner {
  padding: 0.5rem 1rem;
  border: 2px dashed #000;
  background: #fffdf6;
  overflow-wrap: anywhere;
}

code {
  overflow-wrap: anywhere;
}

.steps {
  padding-left: 1.4rem;
}

/* ---- country oval, as stuck on the back of cars ---- */

.oval {
  display: inline-block;
  min-width: 2.2em;
  padding: 0 0.4em;
  border: 2px solid #000;
  border-radius: 50%;
  background: #fff;
  color: #000;
  font: bold 0.8rem/1.6 sans-serif;
  text-align: center;
  vertical-align: middle;
}

/* ---- forms ---- */

form {
  margin-top: 1rem;
  padding: 0 1rem 1rem;
  border: 2px solid #000;
  background: #fff;
}

fieldset {
  margin: 1rem 0 0;
  padding: 0.4rem 0 0;
  border: 0;
  border-top: 2px solid #000;
}

fieldset fieldset {
  margin-top: 0.8rem;
  padding: 0.5rem;
  border: 1px dashed #000;
}

legend {
  padding-right: 0.5rem;
  font-weight: bold;
}

.req {
  color: var(--red);
  font-size: 0.85rem;
  font-weight: normal;
}

label {
  display: block;
  margin-top: 0.8rem;
}

.choice {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  margin-top: 0.4rem;
}

.choice input {
  flex: none;
  margin: 0;
}

input[type="text"],
input[type="email"],
input[type="file"],
select,
textarea {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.45rem;
  border: 2px inset #ccc;
  background: #fafafa;
  color: var(--ink);
  font: inherit;
}

input[type="checkbox"],
input[type="radio"] {
  width: 1.1rem;
  height: 1.1rem;
}

/* Buttons: bevelled, like the ones of the late nineties. */
button {
  margin-top: 1rem;
  padding: 0.45rem 1.3rem;
  border: 3px outset #eee;
  background: #c0c0c0;
  color: #000;
  font: bold 1rem ui-monospace, "DejaVu Sans Mono", monospace;
  cursor: pointer;
}

button:active {
  border-style: inset;
}

button.danger {
  background: #f3c9c9;
}

button.small {
  margin-top: 0.6rem;
  padding: 0.25rem 0.8rem;
  font-size: 0.9rem;
}

/* ---- maps ---- */

figure {
  margin: 1rem 0;
}

.pixel-map {
  display: block;
  width: 100%;
  height: auto;
  border: 2px solid #000;
  background: #e6eef5;
}

.pixel-map .sea {
  fill: #e6eef5;
}

.pixel-map .land {
  fill: #5a5a5a;
}

.pixel-map .pin {
  fill: var(--yellow);
  stroke: #000;
  stroke-width: 0.25;
}

.pixel-map a:hover .pin,
.pixel-map a:focus .pin {
  fill: #ef3340;
}

.pixel-map .route {
  stroke: #ef3340;
  stroke-width: 0.5;
  stroke-dasharray: 1.2 0.8;
}

.pixel-map .step {
  fill: #000;
  font-family: monospace;
  font-weight: bold;
  pointer-events: none;
}

details {
  margin: 1rem 0;
}

summary {
  cursor: pointer;
  font-weight: bold;
}

/* ---- postcards: one per sighting ---- */

.postcards,
.thumbs {
  margin: 0;
  padding: 0;
  list-style: none;
}

.postcard {
  margin: 1.2rem 0;
  padding: 0.7rem 0.8rem 0.5rem;
  border: 1px solid #000;
  background: #fffdf6;
  box-shadow: 4px 4px 0 #000;
}

.postcard header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.8rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px dashed #000;
  font-size: 0.9rem;
}

.postcard .step {
  padding: 0 0.4rem;
  background: #111;
  color: var(--yellow);
  font-weight: bold;
}

.postcard .photo-link {
  display: block;
  text-align: center;
  background: #111;
  border: 1px solid #000;
}

.postcard img {
  display: block;
  margin: 0 auto;
  max-height: 28rem;
  width: auto;
  object-fit: contain;
}

.postcard p {
  margin: 0.6rem 0;
}

.postcard footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--soft);
}

/* ---- home ---- */

.stats {
  padding: 0.5rem 1rem;
  border: 2px solid #000;
  background: #fff;
}

.odo {
  display: inline-flex;
  gap: 2px;
  vertical-align: middle;
}

.odo span {
  padding: 0 0.3rem;
  border-radius: 2px;
  background: #111;
  color: var(--yellow);
  font-weight: bold;
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.7rem;
}

.thumbs li {
  padding: 0.3rem;
  border: 1px solid #000;
  background: #fff;
  font-size: 0.8rem;
}

.thumbs img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.thumbs .oval {
  margin-top: 0.3rem;
}

.inline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---- hall of traces ---- */

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.9rem;
}

th,
td {
  padding: 0.3rem 0.45rem;
  white-space: nowrap;
  border: 1px solid #000;
  text-align: left;
}

th {
  background: #c0c0c0;
}

td.n {
  text-align: right;
}

/* ---- footer: 88x31 buttons, drawn in CSS ---- */

a.badge:link,
a.badge:visited {
  color: #000;
}

footer.site-footer {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px dashed #000;
  font-size: 0.85rem;
  color: var(--soft);
  text-align: center;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.badge {
  display: flex;
  width: 88px;
  height: 31px;
  border: 1px solid #000;
  background: #fff;
  color: #000;
  font: bold 9px/1.05 Verdana, sans-serif;
  text-decoration: none;
  text-transform: uppercase;
  overflow: hidden;
}

.badge b {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  background: #111;
  color: var(--yellow);
  font-size: 11px;
}

.badge .t {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.badge.html b,
.badge.rss b {
  background: #b83a0c;
  color: #fff;
}

.badge.css b {
  background: #1d3fd0;
  color: #fff;
}

.badge.be b {
  background: linear-gradient(90deg, #000 33%, var(--yellow) 33% 66%, #ef3340 66%);
}

@media print {
  .site,
  .site-footer,
  .skip,
  button {
    display: none;
  }

  body {
    max-width: none;
    background: #fff;
  }

  .private-link {
    font-size: 1.2rem;
  }
}
