/* The Cruise Journal (waxwing.top)
   Visual = Nautical Chart: chart-grid seabed, bearing ticks, deep teal, no rounded corners. */

:root {
  --bg: #eef3f5;
  --panel: #f7fbfc;
  --ink: #1f3a44;
  --muted: #5c7a85;
  --line: #c2d6de;
  --accent: #0e7490;
  --accent-dark: #0a5a70;
  --chartline: rgba(14, 116, 144, 0.10);
  --grid: rgba(14, 116, 144, 0.055);
  --c-deals: #b45309;
  --c-onboard: #6d28d9;
  --c-ports: #0e7490;
  --c-ships: #33475b;
}

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

body.chart {
  font-family: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.66;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
}

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 22px; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }
h1, h2, h3 { font-weight: 600; line-height: 1.2; }

/* ---- bearing tick ruler (chart margin) ---- */
.ticks {
  height: 8px;
  background-image: repeating-linear-gradient(90deg, var(--accent) 0, var(--accent) 1px, transparent 1px, transparent 16px);
  background-size: 100% 100%;
  opacity: .55;
}
.ticks.fine {
  background-image: repeating-linear-gradient(90deg, var(--line) 0, var(--line) 1px, transparent 1px, transparent 7px);
  opacity: 1;
}

/* ---- masthead ---- */
.masthead {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.masthead-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; padding: 16px 22px;
}
.brand { display: flex; align-items: center; gap: 13px; color: var(--ink); }
.rose { width: 42px; height: 42px; flex: 0 0 42px; display: block; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 700; letter-spacing: .4px; font-size: 17px; }
.brand-sub {
  font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); margin-top: 2px;
}
.sea-nav { display: flex; gap: 20px; }
.sea-nav a {
  color: var(--ink); font-size: 14px; letter-spacing: .3px; padding-bottom: 3px;
  border-bottom: 2px solid transparent;
}
.sea-nav a:hover { border-bottom-color: var(--accent); color: var(--accent-dark); text-decoration: none; }

/* ---- hero ---- */
.chart-hero {
  position: relative;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 48px 0 40px;
  background-image:
    linear-gradient(var(--chartline) 1px, transparent 1px),
    linear-gradient(90deg, var(--chartline) 1px, transparent 1px);
  background-size: 44px 44px;
}
.hero-kicker {
  display: inline-block;
  font-size: 11px; letter-spacing: 2.6px; text-transform: uppercase; font-weight: 700;
  color: var(--accent); border-bottom: 2px solid var(--accent); padding-bottom: 4px; margin-bottom: 16px;
}
.hero-title { font-size: 36px; max-width: 760px; margin-bottom: 14px; }
.hero-lede { max-width: 660px; color: var(--muted); font-size: 17px; }

/* ---- section label ---- */
.sounding {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: 2.2px; text-transform: uppercase; color: var(--muted);
  font-weight: 700; margin: 0 0 18px;
}
.sounding::after { content: ""; flex: 1; height: 1px; background: var(--line); }

section { padding: 34px 0; }

/* ---- legend ---- */
.legend-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 28px; }
.legend-item { display: flex; align-items: baseline; gap: 10px; font-size: 14px; color: var(--muted); }
.bearing {
  display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
  padding: 3px 9px; color: #fff; background: var(--accent); white-space: nowrap;
}
.bearing.br-deals { background: var(--c-deals); }
.bearing.br-onboard { background: var(--c-onboard); }
.bearing.br-ports { background: var(--c-ports); }
.bearing.br-ships { background: var(--c-ships); }

/* ---- harbor (category) tiles ---- */
.harbor-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.harbor-card {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  padding: 16px 16px 18px; color: var(--ink);
}
.harbor-card:hover { border-color: var(--accent); text-decoration: none; }
.harbor-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 7px;
  background-image: repeating-linear-gradient(90deg, var(--accent) 0, var(--accent) 1px, transparent 1px, transparent 9px);
  opacity: .4;
}
.harbor-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.harbor-name { font-weight: 600; font-size: 17px; margin-top: 2px; }

/* ---- lane (category group on home) ---- */
.lane-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.lane-head h2 { font-size: 22px; }
.lane-more { font-size: 13px; letter-spacing: .3px; }
.itinerary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

/* ---- itinerary card ---- */
.itinerary {
  display: flex; flex-direction: column; gap: 11px;
  background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--accent);
  padding: 16px 16px 18px; color: var(--ink);
}
.itinerary:hover { border-color: var(--accent); border-top-color: var(--accent-dark); text-decoration: none; }
.itinerary-route {
  font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); font-weight: 700;
  display: flex; align-items: center; gap: 8px;
}
.itinerary-route::before { content: ""; width: 16px; height: 1px; background: var(--accent); display: inline-block; }
.itinerary-title { font-size: 16px; font-weight: 600; }
.itinerary-log {
  display: grid; grid-template-columns: 1fr 1fr; gap: 7px 12px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 0;
}
.log-field { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.log-k { font-size: 9.5px; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.log-v { font-size: 13px; color: var(--ink); overflow-wrap: break-word; }
.itinerary-desc { font-size: 13px; color: var(--muted); }

/* ---- page head (waypoint) ---- */
.waypoint { padding: 36px 0 10px; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.crumb a { color: var(--muted); }
.waypoint h1 { font-size: 30px; max-width: 820px; }
.lede { color: var(--muted); margin-top: 10px; max-width: 720px; }

/* ---- itinerary layout (entry page) ---- */
.itinerary-layout {
  display: grid; grid-template-columns: 320px 1fr; gap: 28px;
  padding-top: 26px; padding-bottom: 44px; align-items: start;
}
.manifest {
  background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--accent);
  position: relative;
}
.manifest::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 7px;
  background-image: repeating-linear-gradient(90deg, var(--accent) 0, var(--accent) 1px, transparent 1px, transparent 9px);
  opacity: .4;
}
.manifest-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px; border-bottom: 1px solid var(--line);
}
.manifest-label { font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.manifest-list { margin: 0; }
.manifest-row { display: flex; border-bottom: 1px solid var(--line); font-size: 14px; }
.manifest-row:last-child { border-bottom: 0; }
.manifest-row dt {
  flex: 0 0 44%; padding: 10px 14px; color: var(--muted);
  font-size: 11px; letter-spacing: .7px; text-transform: uppercase; font-weight: 700;
  border-right: 1px solid var(--line);
}
.manifest-row dd { flex: 1; padding: 10px 14px; }

/* ---- course (prose) ---- */
.course { background: var(--panel); border: 1px solid var(--line); padding: 28px 32px; }
.course-sec { margin-bottom: 26px; }
.course-sec:last-child { margin-bottom: 0; }
.course h2 { font-size: 19px; margin-bottom: 11px; display: flex; align-items: baseline; gap: 11px; }
.course-num {
  flex: 0 0 auto; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--accent);
  border: 1px solid var(--accent); padding: 1px 7px; letter-spacing: .5px;
}
.course p { margin-bottom: 12px; color: #2c444e; }
.course p:last-child { margin-bottom: 0; }

/* ---- related ---- */
.related-list { list-style: none; }
.related-list li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.related-list li:last-child { border-bottom: 0; }

/* ---- legal / 404 prose ---- */
.prose-box { background: var(--panel); border: 1px solid var(--line); padding: 28px 32px; }
.prose-box h2 { font-size: 18px; margin: 20px 0 10px; }
.prose-box h2:first-child { margin-top: 0; }
.prose-box p { margin-bottom: 12px; color: #2c444e; }

/* ---- footer ---- */
.site-footer {
  background: var(--panel); border-top: 1px solid var(--line); margin-top: 26px;
  padding: 30px 0 34px;
}
.footer-inner { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.footer-brand { flex: 1 1 320px; }
.footer-brand .brand-name { font-size: 16px; }
.footer-brand p { color: var(--muted); font-size: 14px; margin-top: 6px; }
.footer-nav { display: flex; gap: 16px; }
.footer-nav a { color: var(--ink); font-size: 14px; }
.copyright { flex: 1 1 100%; font-size: 12px; color: var(--muted); margin-top: 12px; }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .harbor-grid { grid-template-columns: repeat(2, 1fr); }
  .itinerary-grid { grid-template-columns: repeat(2, 1fr); }
  .legend-grid { grid-template-columns: 1fr; }
  .itinerary-layout { grid-template-columns: 1fr; }
}
@media (max-width: 580px) {
  .harbor-grid, .itinerary-grid { grid-template-columns: 1fr; }
  .masthead-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .sea-nav { gap: 14px; flex-wrap: wrap; }
  .hero-title { font-size: 28px; }
  .course, .prose-box { padding: 22px 18px; }
}
