/* Variant 2: UAE highway signs. Green = direction (navigation), brown = tourist destination (places). */
:root {
  --asphalt: #3a3d41;
  --asphalt-2: #2f3235;
  --green: #00694a;
  --green-2: #005a3f;
  --brown: #74401f;
  --brown-2: #5f3418;
  --white: #fff;
  --yellow: #f2c200;
  --works: #f08a00;
  --board: #f3f4f2;
  --ink: #1d2125;
  --muted: #c3c7cb;
  --sign: "Overpass", "Arial Narrow", system-ui, sans-serif;
  --ar: "Noto Kufi Arabic", "Geeza Pro", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--asphalt); -webkit-text-size-adjust: 100%; }
body {
  margin: 0 auto;
  max-width: 760px;
  padding: 0 16px 24px;
  font: 400 16px/1.5 var(--sign);
  color: var(--white);
  overflow-wrap: break-word;
  /* road edge: solid yellow on the left, dashed white lane line on the right */
  background:
    linear-gradient(var(--yellow), var(--yellow)) 4px 0 / 3px 100% no-repeat,
    repeating-linear-gradient(180deg, rgba(255,255,255,.55) 0 26px, transparent 26px 60px) calc(100% - 4px) 0 / 3px 100% no-repeat,
    var(--asphalt);
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
p { margin: 0; }

/* ---------- Hero: overhead gantry sign ---------- */
.site-head { padding-top: 26px; }
.gantry { position: relative; }
.gantry-tab {
  position: relative; z-index: 1;
  display: inline-block; margin-left: 18px;
  padding: 3px 12px 2px;
  background: var(--green); color: var(--white);
  border: 2px solid var(--white); border-bottom: 0;
  border-radius: 7px 7px 0 0;
  font-weight: 800; font-size: 15px; line-height: 1.3;
  box-shadow: 0 2px 0 var(--green);
}
.gantry-sign {
  background: var(--green);
  border-radius: 12px;
  padding: 14px 16px 10px;
  box-shadow: inset 0 0 0 4px var(--green), inset 0 0 0 6px var(--white);
}
.gantry-ar {
  font: 700 17px/1.6 var(--ar);
  text-align: right;
}
.site-title {
  margin: 0 0 10px;
  font-size: 31px; line-height: 1.05; font-weight: 800;
  letter-spacing: -.01em;
}
.gantry-routes { list-style: none; margin: 0; padding: 0; }
.gantry-routes li {
  display: grid; grid-template-columns: 26px auto 1fr auto; align-items: center; gap: 8px;
  padding: 7px 0 5px;
  border-top: 2px solid var(--white);
  font-weight: 800; font-size: 18px; line-height: 1.1;
}
.arr { width: 24px; height: 24px; fill: var(--white); }
.arr-r { transform: scaleX(-1); }
.route {
  background: var(--white); color: var(--ink);
  border-radius: 4px; padding: 2px 5px 0;
  font-size: 13px; font-weight: 800; line-height: 1.3;
}
.dest i { display: block; font: 700 12px/1.5 var(--ar); font-style: normal; opacity: .9; }
.gantry-routes b { font-weight: 800; font-size: 20px; white-space: nowrap; }
.site-sub { margin: 10px 2px 0; color: var(--muted); font-size: 14px; }
/* the full route sign greets you on the place lists; elsewhere the gantry shrinks to its title */
body:not(:has(.view-cat)) .gantry-routes,
body:not(:has(.view-cat)) .site-sub { display: none; }
body:not(:has(.view-cat)) .site-title { margin-bottom: 2px; font-size: 26px; }
body:not(:has(.view-cat)) .gantry-ar { font-size: 14px; }

/* ---------- Main tabs: lane strip ---------- */
.tabs {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin: 16px 0 4px;
  border-top: 3px solid var(--white); border-bottom: 3px solid var(--white);
}
.tabs a {
  padding: 10px 2px 8px; text-align: center; text-decoration: none;
  font-weight: 600; font-size: 15px;
  border-left: 2px dashed rgba(255,255,255,.55);
}
.tabs a:first-child { border-left: 0; }
.tabs a[aria-current] { background: var(--white); color: var(--asphalt); font-weight: 800; }

/* ---------- Sticky category bar: lane signs on a gantry ---------- */
.cats {
  position: sticky; top: 0; z-index: 5;
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -16px; padding: 8px 16px 9px;
  background: var(--asphalt-2);
  border-bottom: 3px solid #55595e;
}
.cats::-webkit-scrollbar { display: none; }
.cats a {
  flex: none; display: flex; align-items: center; gap: 6px;
  padding: 7px 11px 5px;
  background: var(--green); color: var(--white);
  border-radius: 7px; text-decoration: none; white-space: nowrap;
  font-weight: 600; font-size: 14px; line-height: 1.2;
  box-shadow: inset 0 0 0 2px var(--green), inset 0 0 0 3px rgba(255,255,255,.7);
}
.cats a[aria-current] {
  background: var(--white); color: var(--green); font-weight: 800;
  box-shadow: inset 0 0 0 2px var(--white), inset 0 0 0 4px var(--green);
}
.cats a[aria-current]::after {
  content: ""; width: 0; height: 0;
  border: 6px solid transparent; border-top: 9px solid var(--green); border-bottom: 0;
}

/* ---------- Category view ---------- */
.view { padding-top: 18px; }
.view-title { margin: 0 0 14px; font-size: 26px; line-height: 1.15; font-weight: 800; }
.filters { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-bottom: 12px; }
.seg {
  flex: 1 1 100%;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border: 2px solid var(--white); border-radius: 6px; overflow: hidden;
}
.seg button {
  font: 600 14px/1.2 var(--sign); color: var(--white);
  background: none; border: 0; border-left: 2px dashed rgba(255,255,255,.5); border-top: 2px dashed rgba(255,255,255,.5);
  padding: 9px 4px 7px; cursor: pointer; margin: -2px 0 0 -2px;
}
.seg button[aria-pressed=true], .seg button[aria-selected=true] { background: var(--white); color: var(--asphalt); font-weight: 800; }
.toggle { display: inline-flex; align-items: center; gap: 7px; font-size: 15px; cursor: pointer; }
.toggle input { width: 18px; height: 18px; margin: 0; accent-color: var(--yellow); }
.sort { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--muted); }
.sort select {
  font: 600 15px var(--sign); color: var(--ink); background: var(--white);
  border: 0; border-radius: 5px; padding: 5px 6px 3px;
}
.count { color: var(--muted); font-size: 14px; margin: 0 0 6px; }

/* ---------- Place row: brown tourist sign ---------- */
.list { display: flex; flex-direction: column; gap: 26px; padding-top: 16px; }
.item {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  grid-template-areas:
    "icon title drive"
    "icon ru    drive"
    "verd verd  verd"
    "flag flag  flag"
    "hrs  hrs   emi";
  column-gap: 11px;
  padding: 16px 14px 12px;
  background: var(--brown); color: var(--white);
  border-radius: 11px; text-decoration: none;
  box-shadow: inset 0 0 0 4px var(--brown), inset 0 0 0 6px var(--white);
}
.item-main, .item-facts { display: contents; }
.item-icon {
  grid-area: icon; align-self: start;
  width: 42px; height: 42px; display: grid; place-items: center;
  background: var(--white); border-radius: 7px; font-size: 24px; line-height: 1;
}
.item-title { grid-area: title; font-weight: 800; font-size: 19px; line-height: 1.15; padding-top: 2px; }
.item-ru { grid-area: ru; font-size: 14px; line-height: 1.3; opacity: .85; margin-top: 3px; }
.item-ru:empty { display: none; }
.item-verdict {
  grid-area: verd; margin-top: 10px; padding-top: 9px;
  border-top: 2px solid rgba(255,255,255,.85);
  font-size: 15px; line-height: 1.35;
}
.item .flag { grid-area: flag; margin-top: 8px; }
.fact { font-size: 13px; line-height: 1.3; }
/* drive time: the distance column, big first line ("1 ч 40"), small "от центра" */
.fact-drive {
  grid-area: drive; align-self: start; justify-self: end;
  display: block; width: 88px; text-align: right;
  font-size: 12px; font-weight: 600; line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.fact-drive::first-line { font-size: 22px; font-weight: 800; line-height: 1.1; }
.fact-hours { grid-area: hrs; margin-top: 10px; align-self: center; }
.fact-emirate {
  grid-area: emi; margin-top: 10px; justify-self: end; align-self: center;
  background: var(--white); color: var(--ink); border-radius: 4px;
  padding: 2px 6px 0; font-weight: 800; font-size: 12px;
}
/* format: exit-number tab on top of the panel */
.fact-format {
  position: absolute; top: -20px; left: 16px;
  padding: 2px 10px 1px;
  background: var(--brown); color: var(--white);
  border: 2px solid var(--white); border-bottom: 0; border-radius: 6px 6px 0 0;
  font-weight: 800; font-size: 13px; line-height: 1.3;
  box-shadow: 0 2px 0 var(--brown);
}
.item:hover { background: var(--brown-2); box-shadow: inset 0 0 0 4px var(--brown-2), inset 0 0 0 6px var(--white); }

/* closed: a sign covered for roadworks */
.item.is-closed {
  background: #5b5e62 repeating-linear-gradient(135deg, transparent 0 14px, rgba(0,0,0,.12) 14px 28px);
  box-shadow: inset 0 0 0 4px #5b5e62, inset 0 0 0 6px #c9cccf;
}
.item.is-closed .fact-format { background: #5b5e62; box-shadow: 0 2px 0 #5b5e62; }
.flag {
  display: inline-block; justify-self: start;
  font-size: 13px; font-weight: 800; line-height: 1.3;
  padding: 4px 8px 2px; border-radius: 4px;
}
.flag-check { background: var(--works); color: #1d1a14; }
.flag-closed { background: var(--white); color: #b3261e; }

/* trips list: green route panels */
.item-trip {
  display: block; padding: 16px 16px 12px;
  background: var(--green); box-shadow: inset 0 0 0 4px var(--green), inset 0 0 0 6px var(--white);
}
.item-trip:hover { background: var(--green-2); box-shadow: inset 0 0 0 4px var(--green-2), inset 0 0 0 6px var(--white); }
.item-trip .item-main { display: block; }
.item-trip .item-title, .item-trip .item-verdict { display: block; }
.item-trip .item-verdict { border-top: 0; margin-top: 4px; padding-top: 0; opacity: .9; }
.item-trip .item-facts { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; padding-top: 8px; border-top: 2px solid rgba(255,255,255,.85); }
.item-trip .fact { font-weight: 600; font-size: 14px; }
.item-trip .fact-format { background: var(--green); box-shadow: 0 2px 0 var(--green); font-size: 13px; }

/* ---------- TLDR ---------- */
.seg-tldr { margin-bottom: 18px; }
.tldr-group h3 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tldr-group h4 { margin: 28px 0 10px; font-size: 20px; font-weight: 800; }
.trip-links, .guide-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.trip-links a, .guide-list a {
  display: grid; grid-template-columns: 1fr 22px; align-items: center; gap: 10px;
  padding: 12px 14px 10px;
  background: var(--green); border-radius: 8px; text-decoration: none;
  font-weight: 800; font-size: 17px; line-height: 1.25;
  box-shadow: inset 0 0 0 3px var(--green), inset 0 0 0 5px var(--white);
}
.trip-links a::after, .guide-list a::after {
  content: ""; width: 22px; height: 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M22 12l-8 8v-6H2v-4h12V4z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.trip-links a:hover, .guide-list a:hover { background: var(--green-2); }

/* ---------- Detail ---------- */
.crumb { margin: 0 0 12px; font-size: 15px; font-weight: 600; }
.crumb a { color: var(--muted); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.detail-title {
  margin: 0;
  padding: 16px 18px 13px;
  background: var(--brown); border-radius: 12px;
  box-shadow: inset 0 0 0 4px var(--brown), inset 0 0 0 6px var(--white);
  font-size: 28px; line-height: 1.1; font-weight: 800;
}
.detail-trip .detail-title { background: var(--green); box-shadow: inset 0 0 0 4px var(--green), inset 0 0 0 6px var(--white); }
.detail-ru { margin: 10px 2px 0; color: var(--muted); font-size: 16px; }
.detail-verdict { margin: 10px 2px 12px; font-size: 19px; line-height: 1.35; font-weight: 600; }
.detail > .flag { margin: 0 0 14px; }
/* facts: green distance sign, destination left, value right */
dl.facts {
  margin: 6px 0 14px; padding: 8px 16px;
  background: var(--green); border-radius: 10px;
  box-shadow: inset 0 0 0 4px var(--green), inset 0 0 0 6px var(--white);
}
dl.facts div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  padding: 8px 0 6px;
}
dl.facts div + div { border-top: 2px solid rgba(255,255,255,.85); }
dl.facts dt { font-size: 14px; font-weight: 600; opacity: .9; flex: 0 1 auto; }
dl.facts dd { margin: 0; text-align: right; font-weight: 800; font-size: 17px; line-height: 1.25; }
.map-link {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 18px; padding: 11px 14px 9px;
  background: var(--white); color: var(--ink); border-radius: 8px;
  font-weight: 800; font-size: 16px; text-decoration: none;
}
.map-link::before {
  content: ""; width: 20px; height: 20px; flex: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%2300694a' d='M12 1a8 8 0 0 0-8 8c0 6 8 14 8 14s8-8 8-14a8 8 0 0 0-8-8zm0 11a3 3 0 1 1 0-6 3 3 0 0 1 0 6z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* prose: a calm white information board, not a sign */
.prose {
  background: var(--board); color: var(--ink);
  border-radius: 10px; padding: 18px 18px 20px;
  font-size: 16.5px; line-height: 1.6;
}
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 .9em; }
.prose h1 { margin: 0 0 .5em; font-size: 28px; line-height: 1.1; font-weight: 800; color: var(--green); }
.prose h2 {
  margin: 1.5em 0 .5em; padding-left: 10px;
  border-left: 5px solid var(--green);
  font-size: 21px; line-height: 1.2; font-weight: 800; color: var(--ink);
}
.prose h3 { margin: 1.3em 0 .4em; font-size: 18px; font-weight: 800; }
.prose ul, .prose ol { margin: 0 0 1em; padding-left: 1.3em; }
.prose li { margin-bottom: .3em; }
.prose li::marker { color: var(--green); font-weight: 800; }
.prose a { color: var(--green); font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.prose a:focus-visible { outline-color: var(--works); }
.prose strong { font-weight: 800; }
.prose table {
  display: block; overflow-x: auto; max-width: 100%;
  border-collapse: collapse; margin: 0 0 1.2em;
  font-size: 14.5px; line-height: 1.4;
}
.prose th {
  background: var(--green); color: var(--white); font-weight: 800; text-align: left;
  padding: 7px 8px 5px; vertical-align: bottom;
}
.prose td { padding: 8px 8px 7px; border-bottom: 1px solid #c9cdcb; vertical-align: top; }
.prose td:first-child { font-weight: 800; }
.prose tbody tr:nth-child(even) td { background: #e8eae7; }
.prose blockquote { margin: 0 0 1em; padding: 8px 12px; border-left: 5px solid var(--works); background: #fbefdc; }
.prose code { font-size: .9em; }

.sources { margin-top: 16px; font-size: 13.5px; color: var(--muted); }
.sources ul { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.sources a { color: var(--white); text-underline-offset: 2px; }

.loading, .error { padding: 30px 0; color: var(--muted); }
.site-foot { margin-top: 36px; padding-top: 12px; border-top: 3px solid var(--white); font-size: 13px; color: var(--muted); }

@media (min-width: 640px) {
  body { padding: 0 28px 32px; }
  .cats { margin: 0 -28px; padding: 8px 28px 9px; }
  .site-title { font-size: 40px; }
  .seg { grid-template-columns: repeat(6, auto); flex: 0 1 auto; }
  .seg-tldr { grid-template-columns: repeat(5, 1fr); }
  .item { grid-template-columns: 46px 1fr auto; padding: 18px 18px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
