/* Japi Tours — "road atlas" theme. Mobile-first. System fonts only, no external requests. */
:root {
  --night: #121A21;
  --night-2: #1C2731;
  --bone: #F7F4EE;
  --white: #FFFFFF;
  --line: #E1DBD0;
  --ink: #1B1F23;
  --ink-2: #545B61;
  --sign: #17603F;
  --sign-d: #0F4A30;
  --sign-l: #E3EFE8;
  --mustard: #E0A526;
  --mustard-l: #FBF0D6;
  --sky: #E6EEF2;
  --head: "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
  --text: Georgia, Cambria, "Times New Roman", serif;
  --ui: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --g: 16px;
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bone); color: var(--ink); font: 400 1.0625rem/1.7 var(--text); overflow-wrap: break-word; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sign); text-underline-offset: 3px; }
a:hover { color: var(--sign-d); }
:focus-visible { outline: 3px solid var(--mustard); outline-offset: 2px; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.2em; }
li { margin-bottom: .35em; }
h1, h2, h3, h4 {
  font-family: var(--head); font-stretch: condensed; font-weight: 800; text-transform: uppercase;
  letter-spacing: .01em; line-height: 1.05; margin: 0 0 .5em; overflow-wrap: anywhere;
}
h1 { font-size: clamp(2.3rem, 9vw, 5rem); }
h2 { font-size: clamp(1.7rem, 5.5vw, 2.8rem); }
h3 { font-size: 1.3rem; letter-spacing: .02em; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--g); }
.skip { position: absolute; left: var(--g); top: -80px; background: var(--mustard); color: var(--night); padding: 8px 12px; z-index: 99; font-family: var(--ui); }
.skip:focus { top: 8px; }
.ui { font-family: var(--ui); }
.small { font-size: .9rem; }
.muted { color: var(--ink-2); }
.tag {
  display: inline-block; font: 700 .72rem/1 var(--ui); letter-spacing: .14em; text-transform: uppercase;
  color: var(--sign); margin: 0 0 12px;
}

/* ---------- Top bar ---------- */
.topbar { background: var(--night); color: var(--white); position: relative; z-index: 40; }
.topbar__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding-top: 10px; padding-bottom: 10px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; font: 800 1.15rem/1 var(--head); text-transform: uppercase; letter-spacing: .06em; }
.logo svg { width: 34px; height: 34px; flex: none; }
.logo:hover { color: var(--mustard); }
.nav { display: flex; gap: 4px; font-family: var(--ui); width: 100%; }
.nav__group { position: static; flex: 1; }
.nav__group > summary {
  list-style: none; cursor: pointer; padding: 9px 10px; border: 1px solid #34424F; border-radius: 4px;
  font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-align: center; white-space: nowrap;
}
.nav__group > summary::-webkit-details-marker { display: none; }
.nav__group > summary::after { content: " +"; color: var(--mustard); }
.nav__group[open] > summary { background: var(--mustard); color: var(--night); border-color: var(--mustard); }
.nav__group[open] > summary::after { content: " –"; color: var(--night); }
.nav__panel {
  position: absolute; left: 0; right: 0; top: 100%; background: var(--night-2); border-top: 3px solid var(--mustard);
  padding: 12px var(--g) 18px; box-shadow: 0 18px 30px rgba(0,0,0,.25);
}
.nav__panel ul { list-style: none; margin: 0 auto; padding: 0; max-width: var(--max); display: grid; grid-template-columns: 1fr; }
.nav__panel li { margin: 0; }
.nav__panel a { display: block; padding: 10px 0; color: var(--white); text-decoration: none; border-bottom: 1px solid #2E3B47; font-size: 1rem; }
.nav__panel a:hover, .nav__panel a[aria-current="page"] { color: var(--mustard); }

/* ---------- Road sign chips ---------- */
.sign {
  display: inline-flex; align-items: baseline; gap: 8px; background: var(--sign); color: var(--white);
  border: 2px solid var(--white); outline: 2px solid var(--sign); border-radius: 6px; padding: 6px 12px;
  font: 700 .9rem/1.2 var(--ui); white-space: nowrap;
}
.sign b { font-size: 1.05rem; }
.signs { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 0; list-style: none; }
.signs li { margin: 0; }

/* ---------- Cover (home) ---------- */
.cover { position: relative; min-height: 88vh; display: flex; align-items: flex-end; color: var(--white); background: var(--night); overflow: hidden; }
.cover__img { position: absolute; inset: 0; margin: 0; }
.cover__img img { width: 100%; height: 100%; object-fit: cover; }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,26,33,.15) 0%, rgba(18,26,33,.35) 45%, rgba(18,26,33,.92) 100%); }
.cover__body { position: relative; z-index: 2; padding-top: 120px; padding-bottom: 40px; }
.cover h1 { color: var(--white); max-width: 14ch; }
.cover .tag, .banner .tag { color: var(--mustard); background: var(--night); padding: 7px 10px; }
.cover__lede { font-size: 1.15rem; max-width: 56ch; color: #E9EEF2; }
.cover .signs { margin-top: 24px; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 0; }
.btn {
  display: inline-block; background: var(--mustard); color: var(--night); text-decoration: none; padding: 13px 22px;
  font: 800 .9rem/1 var(--ui); letter-spacing: .08em; text-transform: uppercase; border-radius: 3px; border: 2px solid var(--mustard);
}
.btn:hover { background: var(--white); border-color: var(--white); color: var(--night); }
.btn--line { background: transparent; color: var(--white); border-color: var(--white); }
.btn--dark { background: var(--night); color: var(--white); border-color: var(--night); }
.btn--dark:hover { background: var(--sign); border-color: var(--sign); color: var(--white); }

/* ---------- Banner (inner pages) ---------- */
.banner { position: relative; min-height: 360px; display: flex; align-items: flex-end; background: var(--night); color: var(--white); overflow: hidden; }
.banner__img { position: absolute; inset: 0; margin: 0; }
.banner__img img { width: 100%; height: 100%; object-fit: cover; }
.banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(18,26,33,.88) 0%, rgba(18,26,33,.55) 60%, rgba(18,26,33,.25) 100%); }
.banner__body { position: relative; z-index: 2; padding-top: 90px; padding-bottom: 32px; }
.banner h1 { color: var(--white); font-size: clamp(2.1rem, 7vw, 4.2rem); max-width: 18ch; }
.banner .tag { color: var(--mustard); }
.banner__lede { max-width: 60ch; color: #E9EEF2; margin: 0; }
.crumbs { font: 600 .78rem/1 var(--ui); letter-spacing: .08em; text-transform: uppercase; margin: 0 0 14px; }
.crumbs a { color: #C9D3DB; text-decoration: none; }
.crumbs a:hover { color: var(--mustard); }

/* ---------- Bands ---------- */
.band { padding: 52px 0; }
.band--white { background: var(--white); }
.band--night { background: var(--night); color: #DCE3E8; }
.band--night h2, .band--night h3 { color: var(--white); }
.band--night a { color: var(--mustard); }
.band--sign { background: var(--sign); color: var(--white); }
.band--sign h2 { color: var(--white); }
.band--sky { background: var(--sky); }
.band__head { display: grid; gap: 8px; margin-bottom: 28px; max-width: 760px; }
.band__head p { margin: 0; color: var(--ink-2); }
.band--night .band__head p { color: #AFBAC3; }

/* ---------- Fact tiles ---------- */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.tiles li { background: var(--white); margin: 0; padding: 18px 16px; font-family: var(--ui); }
.tiles strong { display: block; font: 800 1.5rem/1.1 var(--head); text-transform: uppercase; color: var(--sign); }
.tiles span { font-size: .9rem; color: var(--ink-2); }

/* ---------- Three columns ---------- */
.cols { display: grid; gap: 28px; }
.col img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.col h3 { margin-top: 16px; }
.col .more { font: 700 .82rem var(--ui); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }

/* ---------- Age band ---------- */
.age { display: grid; gap: 20px; align-items: center; }
.age__mark {
  font: 800 clamp(5rem, 24vw, 10rem)/.85 var(--head); color: var(--mustard); letter-spacing: -.02em;
}
.age__mark small { display: block; font-size: .9rem; letter-spacing: .14em; color: #AFBAC3; margin-top: 10px; }

/* ---------- Mileage board ---------- */
.board { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--night); }
.board li { margin: 0; border-bottom: 1px solid var(--line); }
.board a { display: grid; grid-template-columns: 92px 1fr; gap: 6px 14px; padding: 16px 0; color: var(--ink); text-decoration: none; align-items: center; }
.board a:hover h3 { color: var(--sign); }
.board__dist { grid-row: span 2; background: var(--sign); color: var(--white); text-align: center; padding: 10px 6px; border-radius: 5px; border: 2px solid var(--white); outline: 2px solid var(--sign); font: 800 1rem/1.15 var(--ui); }
.board__dist small { display: block; font-weight: 600; font-size: .75rem; opacity: .85; }
.board h3 { margin: 0; font-size: 1.25rem; }
.board p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.board__thumb { display: none; }

/* ---------- Steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: s; }
.steps li { counter-increment: s; margin: 0; padding: 18px 0 18px 64px; position: relative; border-left: 3px dashed var(--mustard); margin-left: 22px; }
.steps li::before {
  content: counter(s); position: absolute; left: -24px; top: 14px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--night); color: var(--mustard); font: 800 1.2rem/44px var(--ui); text-align: center;
}
.steps h3 { margin-bottom: .3em; }
.steps p { margin: 0; }

/* ---------- Mosaic ---------- */
.mosaic { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mosaic figure { margin: 0; position: relative; }
.mosaic img { width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.mosaic figure:first-child { grid-column: span 2; }
.mosaic figure:first-child img { aspect-ratio: 16 / 9; }
.mosaic figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 8px; font: 600 .78rem/1.3 var(--ui); color: var(--white); background: linear-gradient(transparent, rgba(0,0,0,.7)); }

/* ---------- Ways in ---------- */
.ways { display: grid; gap: 16px; }
.way { background: var(--white); border-top: 4px solid var(--sign); padding: 20px; }
.way svg { width: 40px; height: 40px; color: var(--sign); margin-bottom: 10px; }
.way h3 { margin-bottom: .35em; }
.way p { margin: 0; font-size: .98rem; }

/* ---------- Seasons ---------- */
.seasons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; list-style: none; margin: 0; padding: 0; }
.seasons li { margin: 0; padding: 18px 16px; background: var(--white); border-left: 6px solid var(--mustard); }
.seasons li:nth-child(2) { border-color: #D2562C; }
.seasons li:nth-child(3) { border-color: var(--sign); }
.seasons li:nth-child(4) { border-color: #5B8DB5; }
.seasons h3 { margin-bottom: .25em; font-size: 1.1rem; }
.seasons p { margin: 0; font-size: .95rem; }

/* ---------- Inner layout ---------- */
.layout { display: grid; gap: 32px; padding-top: 40px; padding-bottom: 56px; }
.article { min-width: 0; }
.article h2 { font-size: clamp(1.5rem, 4.5vw, 2.1rem); margin-top: 1.4em; }
.article h2:first-child { margin-top: 0; }
.article .lead { font-size: 1.2rem; line-height: 1.6; }
.article figure { margin: 26px 0; }
.article figure img { width: 100%; }
figcaption { font: 500 .82rem/1.4 var(--ui); color: var(--ink-2); margin-top: 8px; }
.sheet { background: var(--white); border: 2px solid var(--night); align-self: start; font-family: var(--ui); min-width: 0; }
.sheet__title { background: var(--night); color: var(--mustard); margin: 0; padding: 12px 18px; font: 800 .85rem/1 var(--ui); letter-spacing: .14em; text-transform: uppercase; }
.sheet dl { margin: 0; padding: 4px 18px 14px; }
.sheet dl > div { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.sheet dl > div:last-child { border-bottom: 0; }
.sheet dt { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); font-weight: 700; }
.sheet dd { margin: 2px 0 0; font-size: .95rem; }
.sheet__note { margin: 0; padding: 12px 18px; background: var(--mustard-l); font-size: .85rem; }

/* ---------- Callouts, tables, badges ---------- */
.callout { background: var(--night); color: #E5EBEF; padding: 18px 20px; margin: 24px 0; display: flex; gap: 16px; align-items: flex-start; }
.callout strong.big { font: 800 2.2rem/1 var(--head); color: var(--mustard); flex: none; }
.callout p { margin: 0; font-family: var(--ui); font-size: .95rem; }
.note { border: 1px solid var(--line); background: var(--white); padding: 14px 16px; font: .92rem/1.5 var(--ui); margin: 20px 0; }
.table-wrap { overflow-x: auto; margin: 20px 0; }
table { width: 100%; border-collapse: collapse; font: .93rem/1.45 var(--ui); background: var(--white); }
th, td { text-align: left; vertical-align: top; padding: 11px 12px; border-bottom: 1px solid var(--line); }
th { background: var(--night); color: var(--white); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; }
td .badge { white-space: normal; }
@media (max-width: 480px) {
  th, td { padding: 8px 6px; font-size: .84rem; overflow-wrap: anywhere; }
}
.badge {
  display: inline-block; font: 700 .68rem/1.3 var(--ui); letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 7px; border-radius: 2px; vertical-align: 2px; margin-left: 4px; white-space: nowrap;
}
.badge--ok { background: var(--sign-l); color: var(--sign-d); }
.badge--check { background: var(--mustard-l); color: #7A5410; border: 1px solid #E8C774; }
.badge--forecast { background: var(--sky); color: #2D5875; }
.ticks { list-style: none; padding: 0; }
.ticks li { position: relative; padding-left: 30px; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: .45em; width: 12px; height: 7px; border-left: 3px solid var(--sign); border-bottom: 3px solid var(--sign); transform: rotate(-45deg); }
.pair { display: grid; gap: 10px; margin: 26px 0; }
.pair figure { margin: 0; }
.pair img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------- Next stops ---------- */
.next { background: var(--white); border-top: 1px solid var(--line); padding: 40px 0 48px; }
.next__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.next__list li { margin: 0; }
.next__list a { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; text-decoration: none; color: var(--ink); }
.next__list img { width: 96px; height: 72px; object-fit: cover; }
.next__list strong { display: block; font: 800 1.05rem/1.15 var(--head); text-transform: uppercase; }
.next__list span { font: .85rem var(--ui); color: var(--sign); font-weight: 700; }

/* ---------- Footer ---------- */
.foot { background: var(--night); color: #B9C4CC; font: .92rem/1.6 var(--ui); }
.foot a { color: var(--white); }
.foot__age { background: var(--mustard); color: var(--night); padding: 14px 0; font-weight: 600; }
.foot__age b { font: 800 1.3rem/1 var(--head); margin-right: 8px; }
.foot__grid { display: grid; gap: 28px; padding-top: 40px; padding-bottom: 32px; }
.foot__brand { font: 800 1.4rem/1 var(--head); text-transform: uppercase; letter-spacing: .06em; color: var(--white); margin-bottom: 10px; }
.foot h4 { color: var(--mustard); font-size: .9rem; letter-spacing: .14em; margin-bottom: 10px; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin-bottom: 6px; }
.foot__base { border-top: 1px solid #2E3B47; padding: 18px 0 28px; font-size: .82rem; }
.foot__base p { margin: 0 0 6px; }

/* ---------- 404 ---------- */
.lost { min-height: 70vh; display: flex; align-items: center; background: var(--night); color: var(--white); }
.lost h1 { color: var(--white); }

/* ---------- 600px+ ---------- */
@media (min-width: 600px) {
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .seasons { grid-template-columns: repeat(4, 1fr); }
  .mosaic { grid-template-columns: repeat(3, 1fr); }
  .mosaic figure:first-child { grid-column: span 2; grid-row: span 2; }
  .mosaic figure:first-child img { aspect-ratio: auto; }
  .pair { grid-template-columns: 1fr 1fr; }
  .next__list { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 900px+ ---------- */
@media (min-width: 900px) {
  :root { --g: 28px; }
  .band { padding: 84px 0; }
  .topbar__in { flex-wrap: nowrap; }
  .nav { width: auto; gap: 8px; }
  .nav__group { flex: none; }
  .nav__group > summary { border: 0; padding: 10px 14px; }
  .nav__panel ul { grid-template-columns: repeat(3, 1fr); column-gap: 32px; }
  .cols { grid-template-columns: repeat(3, 1fr); }
  .age { grid-template-columns: 280px 1fr; gap: 48px; }
  .board a { grid-template-columns: 110px 1fr 160px; }
  .board__dist { grid-row: auto; }
  .board__thumb { display: block; width: 160px; height: 96px; object-fit: cover; grid-row: 1; grid-column: 3; }
  .board p { grid-column: 2; }
  .board h3 { grid-column: 2; }
  .board a { grid-template-rows: auto auto; }
  .board__dist { grid-row: 1 / span 2; }
  .board__thumb { grid-row: 1 / span 2; }
  .ways { grid-template-columns: repeat(3, 1fr); }
  .layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; }
  .sheet { position: sticky; top: 20px; }
  .next__list { grid-template-columns: repeat(3, 1fr); }
  .foot__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .cover__body { padding-bottom: 64px; }
}
@media (min-width: 1400px) {
  :root { --max: 1260px; }
}
