/* ContainerPulse — navy/steel maritime design system */
:root {
  --navy-900: #061d2c;
  --navy-800: #0b2a3f;
  --navy-700: #133b56;
  --navy-600: #1d4f73;
  --steel-300: #aebcc8;
  --steel-200: #c9d4dd;
  --steel-100: #e6ecf1;
  --paper: #f6f8fa;
  --paper-warm: #fbf7ef;
  --ink: #0e1f2c;
  --ink-soft: #3b4d5b;
  --muted: #6a7989;
  --rust: #b94a23;
  --gold: #f3a738;
  --gold-soft: #fde7bd;
  --line: #d4dde4;
  --shadow-sm: 0 1px 2px rgba(11,42,63,.06), 0 1px 1px rgba(11,42,63,.04);
  --shadow-md: 0 4px 18px rgba(11,42,63,.08), 0 1px 3px rgba(11,42,63,.05);
  --radius: 10px;
  --maxw: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
img { max-width: 100%; height: auto; }

/* Typography */
h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  line-height: 1.18;
  color: var(--navy-900);
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 900; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); margin-top: 2.4em; }
h3 { font-size: 1.2rem; margin-top: 1.6em; }
h4 { font-size: .95rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); margin: 0 0 .8em; }
p { margin: 0 0 1.1em; }
a { color: var(--navy-700); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .15s; }
a:hover { color: var(--rust); }
code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: .92em; background: var(--steel-100); padding: 2px 6px; border-radius: 4px; color: var(--navy-800); }
strong { font-weight: 700; color: var(--navy-900); }
.muted { color: var(--muted); }
.eyebrow { font-family: 'JetBrains Mono', monospace; font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--rust); margin: 0 0 .8em; font-weight: 700; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--navy-900); color: #fff; padding: 12px 16px; z-index: 999; }
.skip:focus { left: 16px; top: 16px; }

/* Header */
.site-header {
  background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-800) 100%);
  color: #fff;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
}
.header-wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand-mark { width: 40px; height: 40px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: 'Fraunces', serif; font-weight: 900; font-size: 1.4rem; letter-spacing: -.02em; }
.brand-name em { color: var(--gold); font-style: normal; }
.brand-tag { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; color: var(--steel-300); margin-top: 2px; }
.primary-nav { display: flex; gap: 28px; }
.primary-nav a { color: var(--steel-200); text-decoration: none; font-weight: 500; font-size: .95rem; }
.primary-nav a:hover { color: var(--gold); }

.search-strip { background: var(--navy-700); border-top: 1px solid rgba(255,255,255,.06); padding: 12px 0; }
.search-wrap {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
}
.search-strip label { color: var(--gold); font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; }
.search-strip input {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18);
  color: #fff; padding: 10px 14px; border-radius: 6px; font-family: 'JetBrains Mono', monospace;
  font-size: .98rem; letter-spacing: .04em;
}
.search-strip input::placeholder { color: rgba(255,255,255,.4); }
.search-strip button {
  background: var(--gold); color: var(--navy-900); border: 0;
  padding: 10px 18px; border-radius: 6px; font-weight: 700; cursor: pointer;
  font-size: .92rem;
}
.search-strip button:hover { background: #f8b85a; }
.search-strip small { grid-column: 1 / -1; color: var(--steel-300); font-size: .78rem; margin-top: 2px; }
@media (max-width: 720px) {
  .search-wrap { grid-template-columns: 1fr; }
  .search-strip small { margin-top: 0; }
  .primary-nav { display: none; }
}

/* Hero */
.hero {
  background:
    radial-gradient(1100px 500px at 80% 0%, rgba(243,167,56,.10) 0%, transparent 60%),
    radial-gradient(800px 400px at 0% 100%, rgba(29,79,115,.18) 0%, transparent 60%),
    linear-gradient(180deg, var(--navy-900) 0%, var(--navy-800) 100%);
  color: #fff;
  padding: 64px 0 80px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(255,255,255,.025) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(255,255,255,.025) 39px 40px);
  pointer-events: none;
}
.hero-wrap { display: grid; grid-template-columns: 1.3fr 1fr; gap: 60px; align-items: center; position: relative; }
@media (max-width: 900px) { .hero-wrap { grid-template-columns: 1fr; gap: 40px; } }
.hero-copy h1 { color: #fff; font-size: clamp(2.4rem, 5.5vw, 4rem); margin-bottom: 18px; }
.hero-copy .lede { font-size: 1.15rem; line-height: 1.55; color: var(--steel-200); max-width: 56ch; }
.hero-cta { display: flex; gap: 14px; margin: 28px 0; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 14px 26px; border-radius: 8px; text-decoration: none;
  font-weight: 600; font-size: 1rem; transition: transform .12s, background .12s;
}
.btn.primary { background: var(--gold); color: var(--navy-900); }
.btn.primary:hover { background: #f8b85a; transform: translateY(-1px); }
.btn.ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.3); }
.btn.ghost:hover { background: rgba(255,255,255,.08); color: var(--gold); }
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 36px 0 0; padding: 0; }
.hero-stats div { padding: 18px 0; border-top: 2px solid rgba(255,255,255,.12); }
.hero-stats dt { font-family: 'Fraunces', serif; font-weight: 900; font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--gold); margin: 0; line-height: 1; }
.hero-stats dd { margin: 6px 0 0; color: var(--steel-300); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; }
@media (max-width: 600px) { .hero-stats { grid-template-columns: repeat(2, 1fr); } }

.hero-card { display: flex; justify-content: center; }
.hero-container {
  background: linear-gradient(180deg, #c63e1c, #8a2a13);
  border: 3px solid var(--navy-900);
  border-radius: 8px;
  padding: 18px 22px;
  width: 100%; max-width: 380px;
  box-shadow: 0 20px 50px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.15);
  color: #fff; transform: rotate(-2deg);
}
.hero-container .hc-top { height: 6px; background: repeating-linear-gradient(90deg, rgba(0,0,0,.3) 0 6px, transparent 6px 12px); border-radius: 3px; margin-bottom: 14px; }
.hero-container .hc-prefix { font-family: 'JetBrains Mono', monospace; font-size: 1.4rem; font-weight: 700; letter-spacing: .1em; }
.hero-container .hc-meta { display: flex; justify-content: space-between; margin-top: 6px; font-size: .82rem; opacity: .9; font-family: 'JetBrains Mono', monospace; }
.hero-container .hc-bars { display: flex; gap: 4px; margin-top: 16px; }
.hero-container .hc-bars span { flex: 1; height: 28px; background: rgba(0,0,0,.25); border-radius: 2px; }

/* Main grid */
.main-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; padding: 48px 24px 64px; align-items: start; }
@media (max-width: 960px) { .main-grid { grid-template-columns: 1fr; } }
.full { padding: 48px 24px 64px; max-width: var(--maxw); margin: 0 auto; }

.content {
  background: #fff;
  padding: 44px 48px 56px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  max-width: 820px;
}
@media (max-width: 720px) { .content { padding: 28px 22px 36px; } }
.content h1 { margin-top: 0; }
.content > p:first-of-type { font-size: 1.08rem; color: var(--ink-soft); }
.article-meta { color: var(--muted); font-family: 'JetBrains Mono', monospace; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; margin: -8px 0 28px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.article-meta strong { color: var(--navy-700); }

.link-arrow { font-weight: 600; }

/* Sidebar */
.sidebar { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 100px; align-self: start; }
@media (max-width: 960px) { .sidebar { position: static; } }
.sidebar .card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: var(--shadow-sm);
}
.sidebar .card h3 { margin: 0 0 14px; font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; color: var(--navy-700); padding-bottom: 12px; border-bottom: 2px solid var(--gold); }
.list-tight { list-style: none; padding: 0; margin: 0; }
.list-tight li { padding: 6px 0; font-size: .94rem; line-height: 1.4; }
.list-tight li a { text-decoration: none; }
.list-tight li a:hover { text-decoration: underline; }
.pbn-card { background: var(--paper-warm); border-color: var(--gold-soft); }
.pbn-card h3 { color: var(--rust); border-bottom-color: var(--gold); }

/* Ad slot */
.ad-slot {
  display: block;
  background: repeating-linear-gradient(45deg, var(--steel-100) 0 10px, var(--paper) 10px 20px);
  border: 1px dashed var(--steel-300);
  border-radius: 8px;
  padding: 22px;
  margin: 32px 0;
  text-align: center;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: .85rem;
}
.ad-slot .ad-tag { display: inline-block; background: var(--navy-700); color: var(--steel-100); font-size: .7rem; padding: 2px 8px; border-radius: 3px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.ad-slot .ad-body { color: var(--ink-soft); }
.sidebar .ad-slot { margin: 0; }

/* Cards / grids */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 28px 0; }
.card-link {
  background: #fff; padding: 18px 18px 16px; border-radius: 8px;
  border: 1px solid var(--line); text-decoration: none;
  display: flex; flex-direction: column; gap: 6px;
  transition: transform .12s, border-color .12s, box-shadow .12s;
}
.card-link:hover { transform: translateY(-2px); border-color: var(--navy-600); box-shadow: var(--shadow-md); }
.card-eyebrow { font-family: 'JetBrains Mono', monospace; font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--rust); }
.card-title { font-family: 'Fraunces', serif; font-size: 1.05rem; font-weight: 700; color: var(--navy-900); line-height: 1.25; }
.card-meta { font-size: .82rem; color: var(--muted); }
.route-card .card-title::before { content: ""; display: inline-block; width: 0; }
.format-grid .card-link { background: linear-gradient(180deg, #fff 0%, var(--paper) 100%); }

/* Card list (used in body content) */
.card-list { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 10px; }
.card-list li { background: var(--paper); border-left: 3px solid var(--gold); padding: 12px 16px; border-radius: 0 6px 6px 0; line-height: 1.5; }
.card-list li strong { color: var(--navy-800); }

/* Tables */
.table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: .94rem; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.table th { background: var(--steel-100); font-weight: 700; color: var(--navy-800); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: var(--paper); }

/* Prefix grid */
.prefix-grid { list-style: none; padding: 0; margin: 18px 0 28px; display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.prefix-grid li { background: var(--navy-800); color: var(--gold); padding: 10px 12px; border-radius: 6px; text-align: center; font-family: 'JetBrains Mono', monospace; font-weight: 700; letter-spacing: .08em; }
.prefix-grid code { background: transparent; color: var(--gold); font-size: 1.02rem; padding: 0; }

.country-block { margin: 36px 0; }
.country-block h2 { margin-top: 0; padding-bottom: 10px; border-bottom: 2px solid var(--gold); }

/* Footer */
.site-footer { background: var(--navy-900); color: var(--steel-200); margin-top: 64px; padding: 56px 0 24px; border-top: 4px solid var(--gold); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 36px; padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,.08); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } }
.site-footer strong { color: #fff; font-family: 'Fraunces', serif; font-size: 1.2rem; }
.site-footer h4 { color: var(--gold); margin: 0 0 14px; font-size: .78rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 4px 0; font-size: .9rem; }
.site-footer a { color: var(--steel-200); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.footer-bottom { padding-top: 20px; }
.footer-bottom small { color: var(--steel-300); font-size: .82rem; }
.pbn-footer li::before { content: "›"; color: var(--gold); margin-right: 6px; }
