:root {
  --blue: #1b3f77;
  --blue-dark: #122c55;
  --red: #8c1c1c;
  --ink: #17202e;
  --muted: #566070;
  --line: #d3d7de;
  --paper: #f5f4f0;
  --panel: #fff;
  --grid: rgba(27, 63, 119, .07);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html { font-size: 17px; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--paper); line-height: 1.6; }
img { max-width: 100%; height: auto; }
a { color: var(--blue); }
a:hover { color: var(--red); }
h1, h2, h3 { line-height: 1.25; color: var(--ink); }
h1 { font-size: 2.1rem; margin: 0 0 .5rem; letter-spacing: -.01em; }
h2 { font-size: 1.3rem; margin: 2.4rem 0 .6rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
h3 { font-size: 1.05rem; margin: 1.5rem 0 .4rem; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
main { padding: 36px 0 64px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px; z-index: 10; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 46rem; }
.prose { max-width: 46rem; }
.prose.wrap { max-width: calc(46rem + 40px); margin-left: auto; margin-right: auto; }
.small { font-size: .85rem; color: var(--muted); }
.kicker, .crumbs, .num, .badge, .specs th, thead th, .plate dd, .topbar { font-family: var(--mono); }
.kicker { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--blue); margin: 0 0 12px; }

/* header: a blue strip that points buyers to Ithegi, then the logo and navigation */
.topbar { background: var(--blue); color: #dbe4f2; font-size: .74rem; letter-spacing: .02em; }
.topbar .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 20px; padding-top: 6px; padding-bottom: 6px; }
.topbar a { color: #fff; }
.site-header { background: var(--panel); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 0; }
.logo { padding-bottom: 12px; }
.logo img { display: block; width: 190px; height: auto; }
nav { display: flex; flex-wrap: wrap; gap: 0 22px; align-items: flex-end; }
nav a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: .9rem; padding: 8px 0 12px; border-bottom: 3px solid transparent; }
nav a:hover, nav a[aria-current] { border-bottom-color: var(--blue); color: var(--blue); }
nav a.login { font-weight: 400; color: var(--muted); }

.button { display: inline-block; background: var(--blue); color: #fff; text-decoration: none; font-weight: 600; font-size: 1rem; font-family: inherit; padding: 10px 20px; border: 1px solid var(--blue); border-radius: 2px; margin: 4px 8px 4px 0; cursor: pointer; }
.button:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.button.ghost { background: transparent; color: var(--blue); }
.button.ghost:hover { background: var(--blue); color: #fff; }
.product .button, .prose .button { margin-top: 8px; }

/* landing page */
.home-top { margin-top: -36px; }
.ithegi-notice { background: var(--panel); border-bottom: 1px solid var(--line); }
.ithegi-notice .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 14px; padding-bottom: 14px; }
.ithegi-notice p { margin: 0; flex: 1 1 28rem; border-left: 4px solid var(--red); padding-left: 14px; }
.ithegi-notice .button { margin: 0; white-space: nowrap; }
.hero { padding: 56px 0 52px; border-bottom: 1px solid var(--line); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 28px 28px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(240px, 1fr); gap: 40px; align-items: center; }
.hero h1 { font-size: 2.6rem; max-width: 18ch; }
.hero-photo { display: block; width: 100%; max-height: 420px; object-fit: cover; object-position: center 35%; border: 1px solid var(--ink); }
.plate { margin: 0; background: var(--panel); border: 1px solid var(--ink); }
.plate div { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.plate div:last-child { border-bottom: 0; }
.plate dt { font-size: 1.7rem; font-weight: 700; line-height: 1.2; color: var(--blue); }
.plate dd { margin: 2px 0 0; font-size: .78rem; color: var(--muted); }
.routes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 36px; }

.three { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 28px; margin-bottom: 8px; }
.card { display: block; border: 1px solid var(--line); border-radius: 2px; padding: 18px 20px; text-decoration: none; color: var(--ink); background: var(--panel); }
.card:hover { background: #eef2f8; color: var(--ink); }
.card .num { display: block; font-size: .78rem; color: var(--red); margin-bottom: 6px; }
.card h2 { margin: 0 0 6px; padding: 0; border: 0; font-size: 1.1rem; color: var(--blue); }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.tile { border: 1px solid var(--line); border-radius: 2px; overflow: hidden; text-decoration: none; color: var(--ink); background: var(--panel); }
.tile:hover { border-color: var(--blue); }
.tile img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--paper); }
.tile span { display: block; padding: 8px 10px; font-weight: 600; font-size: .9rem; border-top: 1px solid var(--line); }

/* product library */
.filter { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 2px; padding: 12px 16px; margin: 20px 0 8px; }
.filter input[type=search] { flex: 1 1 240px; padding: 8px 10px; font-size: 1rem; border: 1px solid #aab1bd; border-radius: 2px; }
.records { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.records a { display: grid; grid-template-columns: 84px 1fr; grid-template-rows: auto auto 1fr; column-gap: 12px; row-gap: 2px; border: 1px solid var(--line); border-radius: 2px; padding: 10px; text-decoration: none; color: var(--ink); height: 100%; background: var(--panel); }
.records a:hover { border-color: var(--blue); }
.records img, .records .noimg { grid-row: 1 / span 3; width: 84px; height: 64px; object-fit: cover; background: var(--paper); }
.records .name { font-weight: 700; color: var(--blue); }
.records .sum { font-size: .85rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.badge { justify-self: start; display: inline-block; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 2px; background: var(--paper); color: var(--muted); border: 1px solid var(--line); }
.badge.current { background: #e7f4ea; color: #1d6a34; border-color: #bfe0c8; }
.badge.developed { background: #e8eef8; color: var(--blue); border-color: #c3d1e8; }
.badge.legacy { background: #fff4dd; color: #7a5200; border-color: #f0dba8; }
.badge.retired { background: #eeeef0; color: #555c69; }

/* product record and articles */
.crumbs { font-size: .78rem; color: var(--muted); margin: 0 0 12px; }
.product-head { display: grid; grid-template-columns: 1fr minmax(220px, 380px); gap: 28px; align-items: start; }
.main-photo { border: 1px solid var(--line); background: var(--panel); width: 100%; }
.aka, .made { color: var(--muted); font-size: .9rem; }
.notice { background: #fff4dd; border-left: 4px solid #e0a92b; padding: 10px 14px; max-width: 46rem; }
.in-short { max-width: 46rem; }
table { border-collapse: collapse; width: 100%; max-width: 46rem; margin: .6rem 0 1rem; background: var(--panel); border: 1px solid var(--line); }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: #ebedf1; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.specs th { width: 40%; font-weight: 400; font-size: .82rem; color: var(--muted); }
.links, .downloads { list-style: none; padding: 0; margin: 0; }
.links li, .downloads li { padding: 6px 0; border-bottom: 1px solid var(--line); max-width: 46rem; }
.links.wide .sum { display: block; color: var(--muted); font-size: .9rem; }
.meta { color: var(--muted); font-size: .85rem; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gallery img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border: 1px solid var(--line); }
.video { display: block; width: 100%; max-width: 46rem; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--line); }
.help { margin-top: 2.5rem; }
code, pre { font-family: var(--mono); font-size: .9rem; background: #ebedf1; border-radius: 2px; }
code { padding: 1px 5px; }
pre { padding: 12px 14px; overflow-x: auto; }
pre code { padding: 0; }

/* enquiry and contact form */
.enquiry form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; background: var(--panel); border: 1px solid var(--line); padding: 8px 20px 12px; }
.enquiry .field, .enquiry .wide { margin: 10px 0; }
.enquiry .wide { grid-column: 1 / -1; }
.enquiry label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
.enquiry input, .enquiry select, .enquiry textarea { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid #aab1bd; border-radius: 2px; background: #fff; color: var(--ink); }
.enquiry .trap { position: absolute; left: -9999px; }

/* WhatsApp button, on every page */
.whatsapp { position: fixed; right: 16px; bottom: 16px; z-index: 20; display: flex; align-items: center; gap: 8px; background: #0f7a55; color: #fff; text-decoration: none; font-weight: 600; font-size: .9rem; padding: 10px 16px; border-radius: 99px; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.whatsapp:hover { background: #0b5f42; color: #fff; }

.site-footer { background: var(--panel); border-top: 3px solid var(--blue); color: var(--muted); padding: 32px 0 72px; font-size: .92rem; }
.site-footer strong { color: var(--ink); }
.site-footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.site-footer .small { margin-top: 16px; }

/* contact page: social media */
.social ul { list-style: none; display: flex; flex-wrap: wrap; gap: 12px 28px; padding: 0; margin: .4rem 0 0; }
.social a { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; }
.social svg { display: block; }

/* about page: the history text between two film strips */
.about { display: grid; grid-template-columns: 190px minmax(0, 1fr) 190px; gap: 36px; align-items: start; }
.about .prose { max-width: 46rem; }
.about .prose h1 { margin-top: 0; }
.film { background-color: #1c1c1e; padding: 0 22px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; scrollbar-width: thin;
  background-image: radial-gradient(circle, var(--paper) 3px, transparent 3.5px), radial-gradient(circle, var(--paper) 3px, transparent 3.5px);
  background-size: 22px 18px, 22px 18px; background-position: 0 4px, 100% 4px; background-repeat: repeat-y, repeat-y; }
.film ol { list-style: none; margin: 0; padding: 10px 0; display: flex; flex-direction: column; gap: 10px; }
.film li { display: flex; flex-direction: column; }
.film img, .frame-empty { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #3a3a3e; }
.frame-empty { display: flex; align-items: center; justify-content: center; color: #9a9aa2; font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; border: 1px dashed #6a6a72; }
.frame-caption { color: #e6e6ea; font-size: .74rem; line-height: 1.35; padding: 5px 0 2px; }
.frame-caption b { font-family: var(--mono); color: #f2c14e; font-weight: 700; margin-right: 4px; }

@media (max-width: 760px) {
  .about { grid-template-columns: 1fr; }
  .about .prose { order: -1; }
  .film { position: static; max-height: none; padding: 22px 0; overflow-x: auto; overflow-y: hidden;
    background-size: 18px 22px, 18px 22px; background-position: 4px 0, 4px 100%; background-repeat: repeat-x, repeat-x; }
  .film ol { flex-direction: row; padding: 0 10px; }
  .film li { flex: 0 0 150px; }
  html { font-size: 16px; }
  .product-head, .hero .wrap, .enquiry form { grid-template-columns: 1fr; }
  .hero { padding: 36px 0; }
  .hero h1 { font-size: 1.9rem; }
  .site-header .wrap { align-items: flex-start; }
  .whatsapp span { display: none; }
  .whatsapp { padding: 12px; }
}
@media print {
  .topbar, nav, .whatsapp, .ithegi-notice .button { display: none; }
  body { background: #fff; }
}
