/* ГДЕ ПАРОМ? — «навигационная карта». Светлый холодный картографический справочник.
   Ничего не переиспользовано из prototype/assets или prototype/market. */

@import url('https://fonts.googleapis.com/css2?family=PT+Serif:wght@400;700&family=PT+Sans:wght@400;700&family=PT+Mono&display=swap');

:root {
  --chart: #EDF2F4;
  --surface: #FFFFFF;
  --depth: #DCE5E9;
  --deep: #12232E;
  --slate: #4A6274;
  --sea: #0E5A8A;
  --sea-deep: #0A4368;
  --ok: #1E7A4C;
  --warn: #7A6017; /* AA ≥4.5 на --chart и --depth (замер 06.08.2026) */
  --off: #55636C;
  --line: #C9D6DC;

  --font-serif: 'PT Serif', Georgia, serif;
  --font-sans: 'PT Sans', Arial, sans-serif;
  --font-mono: 'PT Mono', 'SFMono-Regular', Consolas, monospace;

  --radius: 4px;
  --maxw: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--chart);
  color: var(--deep);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  min-width: 320px;
}

img { max-width: 100%; display: block; }

a { color: var(--sea); text-decoration-color: rgba(14, 90, 138, .35); }
a:hover { color: var(--sea-deep); }
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 2px solid var(--sea);
  outline-offset: 2px;
  border-radius: 2px;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--deep);
  margin: 0 0 .5em;
  line-height: 1.2;
}

h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); }
h2 { font-size: clamp(1.25rem, 1.05rem + .8vw, 1.6rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }

.mono { font-family: var(--font-mono); }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--sea);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Header ---------- */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.site-header__bar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 0;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  margin-right: auto;
}
.brand__name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--deep);
  letter-spacing: .01em;
}
.brand__name .go { color: var(--sea); }
.brand__name .q { color: var(--deep); }
.brand__tag {
  font-family: var(--font-sans);
  font-size: .72rem;
  color: var(--slate);
  text-transform: none;
}

.site-nav {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  white-space: nowrap;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  color: var(--deep);
  border-bottom: 2px solid transparent;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--sea);
  border-bottom-color: var(--sea);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background: var(--chart);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero__isobaths {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.hero__inner {
  position: relative;
  z-index: 1;
  padding: 40px 0 44px;
}
.hero__coords {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--slate);
  margin-bottom: 14px;
  letter-spacing: .01em;
}
.hero p.lede {
  max-width: 62ch;
  color: var(--slate);
  font-size: 1.05rem;
}

/* ---------- Route scheme (карта-схема) ---------- */

.chart-frame {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px;
}
.chart-frame::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid var(--line);
  border-radius: 2px;
  pointer-events: none;
}
.chart-frame__inner {
  position: relative;
  padding: 14px;
}

.route-scheme {
  width: 100%;
  height: auto;
  display: block;
}

.chart-caption {
  font-size: .85rem;
  color: var(--slate);
  margin-top: 10px;
}
.chart-caption a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
}
/* Внешняя ссылка на источник AIS — намеренно мелко и без акцента */
.chart-caption--ext {
  font-size: .78rem;
}
.chart-caption--ext a {
  font-weight: 400;
}

/* ---------- Ad slot ---------- */

.ad-slot {
  position: relative;
  background: var(--depth);
  border: 1px dashed #A9BCC6;
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 28px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-height: 140px;
}
.ad-slot--a1 { min-height: 200px; }
.ad-slot--a2,
.ad-slot--a4 { min-height: 120px; }
.ad-slot--a3 { min-height: 160px; }

.ad-slot__eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--slate);
}
.ad-slot__format {
  font-size: .9rem;
  color: var(--slate);
}
.ad-slot__cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  color: var(--sea);
  text-decoration: none;
}
.ad-slot__cta:hover { color: var(--sea-deep); }

.ad-slot--occupied {
  background: var(--surface);
  border: 1px solid var(--sea);
  align-items: flex-start;
}
.ad-badge {
  position: absolute;
  top: 10px;
  right: 12px;
  font-family: var(--font-mono);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--slate);
  background: var(--chart);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 2px 6px;
}
.ad-slot--occupied h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
  padding-right: 80px;
}
.ad-slot--occupied p {
  color: var(--slate);
  margin-bottom: 10px;
  max-width: 60ch;
}
.btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  background: var(--sea);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid var(--sea);
}
.btn:hover { background: var(--sea-deep); border-color: var(--sea-deep); color: #fff; }

/* ---------- Sections ---------- */

.section {
  padding: 40px 0;
}
.section--tight { padding: 24px 0; }
.section-title {
  margin-bottom: 18px;
}

/* ---------- Fleet table ---------- */

.fleet-table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
table.fleet {
  width: 100%;
  border-collapse: collapse;
  font-size: .93rem;
}
table.fleet caption { text-align: left; }
table.fleet thead th {
  text-align: left;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--slate);
  background: var(--depth);
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
table.fleet tbody th.group-row {
  text-align: left;
  background: var(--chart);
  color: var(--deep);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: .95rem;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
table.fleet tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.fleet tbody tr:last-child td { border-bottom: 0; }
table.fleet a.vessel-link,
table.fleet a.map-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}
table.fleet a.vessel-link { font-weight: 700; }
table.fleet a.vessel-link:hover { text-decoration: underline; }
table.fleet a.map-link { white-space: nowrap; }
table.fleet a.map-link:hover { text-decoration: underline; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.status__dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex: none;
}
.status--ok .status__dot { background: var(--ok); }
.status--warn .status__dot { background: var(--warn); }
.status--off .status__dot { background: var(--off); }
.status--ok { color: var(--ok); }
.status--warn { color: var(--warn); }
.status--off { color: var(--off); }

/* mobile card fallback for fleet table */
@media (max-width: 640px) {
  table.fleet thead { display: none; }
  table.fleet, table.fleet tbody, table.fleet tr, table.fleet td {
    display: block;
    width: 100%;
  }
  table.fleet tbody th.group-row {
    display: block;
  }
  table.fleet tbody tr {
    border-bottom: 1px solid var(--line);
    padding: 10px 14px;
  }
  table.fleet tbody tr:last-child { border-bottom: 0; }
  table.fleet tbody td {
    border-bottom: 0;
    padding: 3px 0;
    display: flex;
    gap: 6px;
    align-items: baseline;
  }
  table.fleet tbody td::before {
    content: attr(data-label);
    flex: 0 0 92px;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .02em;
    color: var(--slate);
  }
}

/* ---------- Facts row (Как ходит паром) ---------- */

.facts-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.fact {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.fact strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--sea);
  margin-bottom: 4px;
}
.fact span { color: var(--slate); font-size: .9rem; }

@media (max-width: 640px) {
  .facts-row { grid-template-columns: 1fr; }
}

/* ---------- FAQ ---------- */

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 10px;
}
.faq-item summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 700;
  list-style: none;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
  content: "+";
  color: var(--sea);
  font-family: var(--font-mono);
  width: 1em;
  flex: none;
}
.faq-item[open] summary::before { content: "–"; }
.faq-item__answer {
  padding: 0 16px 16px 42px;
  color: var(--slate);
}

/* ---------- SEO text ---------- */

.seo-text {
  color: var(--slate);
  max-width: 76ch;
}
.seo-text p:last-child { margin-bottom: 0; }

/* ---------- Breadcrumbs ---------- */

.breadcrumbs {
  font-size: .85rem;
  color: var(--slate);
  padding: 14px 0 0;
}
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--deep); }

/* ---------- Vessel page ---------- */

.status-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: center;
  color: var(--slate);
  font-size: .95rem;
  margin: 6px 0 20px;
}
.status-line .checked { font-family: var(--font-mono); font-size: .8rem; }

.specs-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: .93rem;
}
.specs-table th, .specs-table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.specs-table tr:last-child th, .specs-table tr:last-child td { border-bottom: 0; }
.specs-table th {
  width: 40%;
  font-weight: 700;
  color: var(--slate);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.specs-table td.mono { font-family: var(--font-mono); }

.editorial { max-width: 74ch; color: var(--deep); }

.neighbors {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 20px;
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
}
.neighbors li { border-bottom: 1px solid var(--line); }
.neighbors a {
  display: flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  font-weight: 700;
}
.neighbors a:hover { text-decoration: underline; }
.all-fleet-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
}

@media (max-width: 640px) {
  .neighbors { grid-template-columns: 1fr; }
}

/* ---------- Ports table (liniya) ---------- */

.ports-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: .93rem;
}
.ports-table th, .ports-table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.ports-table tr:last-child th, .ports-table tr:last-child td { border-bottom: 0; }
.ports-table th { background: var(--depth); color: var(--slate); font-size: .8rem; text-transform: uppercase; }
.ports-table td.mono { font-family: var(--font-mono); }

/* ---------- Callout (не рекламный блок-подсказка) ---------- */

.callout {
  background: var(--surface);
  border: 1px solid var(--sea);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 24px 0;
}
.callout h3 { margin-bottom: 6px; }
.callout p { color: var(--slate); margin-bottom: 12px; }

/* ---------- Reklama page ---------- */

.slot-list {
  display: grid;
  gap: 14px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}
.slot-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.slot-card__code {
  font-family: var(--font-mono);
  color: var(--sea);
  font-size: .82rem;
}
.slot-card h3 { margin: 4px 0 6px; }
.slot-card p { color: var(--slate); margin: 0; }

.contact-line {
  background: var(--depth);
  border-radius: var(--radius);
  padding: 16px;
  font-weight: 700;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 28px 0;
  margin-top: 20px;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: center;
  justify-content: space-between;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
.site-footer nav a {
  text-decoration: none;
  font-size: .9rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.site-footer nav a:hover { text-decoration: underline; }
.site-footer__brand {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--deep);
}
.site-footer__meta {
  font-size: .82rem;
  color: var(--slate);
  margin-top: 14px;
}

/* ---------- Vessel map frame ---------- */

.map-frame iframe {
  display: block;
  width: 100%;
  border: 0;
}

/* ---------- 404 ---------- */

.notfound {
  padding: 80px 0;
  text-align: center;
}
.notfound h1 { margin-bottom: 12px; }
.notfound p { color: var(--slate); margin-bottom: 24px; }

/* ---------- Utility ---------- */

.mt-0 { margin-top: 0; }
