/* Dark Fleet Watch — brand stylesheet
 *
 * Two-format brand identity:
 *   Variation A — per-record format (austere; .dfw-record class)
 *   Variation B — heritage masthead (digest, homepage; .dfw-masthead class)
 *
 * Palette
 *   --navy:    #1D2D44   wordmark, headings, primary borders
 *   --brass:   #B8935F   accent rules, eyebrow text
 *   --cream:   #F5F1E8   record background tint
 *   --oxblood: #6B1818   designation pill, sanctions text
 */

:root {
  --navy: #1D2D44;
  --brass: #B8935F;
  --cream: #F5F1E8;
  --cream-deep: #E5DECC;
  --oxblood: #6B1818;
  --text: #1A1A1A;
  --muted: #6B6B66;
  --bg: #FAFAF5;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --mono: "Consolas", "SF Mono", "Monaco", monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--navy); }
a:hover { color: var(--oxblood); }

/* ===================================================================
   Variation B — masthead (heritage gazette)
   =================================================================== */
.dfw-masthead {
  max-width: 880px;
  margin: 0 auto;
  padding: 28px 24px 0;
}
.dfw-masthead-rule-top {
  border-top: 4px solid var(--navy);
  margin-bottom: 16px;
}
.dfw-masthead-content {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}
.dfw-wordmark {
  margin: 0;
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 500;
  color: var(--navy);
  letter-spacing: -0.005em;
}
.dfw-wordmark a { text-decoration: none; color: inherit; }
.dfw-subtitle {
  margin: 6px 0 0;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--brass);
}
.dfw-volume {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--muted);
  font-style: italic;
}
.dfw-masthead-rule-bottom {
  border-top: 1px solid var(--brass);
}
.dfw-nav {
  padding: 14px 0;
  font-size: 14px;
}
.dfw-nav a {
  margin-right: 22px;
  text-decoration: none;
  color: var(--navy);
  font-weight: 500;
}

/* ===================================================================
   Main content
   =================================================================== */
.dfw-main {
  max-width: 880px;
  margin: 32px auto;
  padding: 0 24px 60px;
}

h1, h2, h3 {
  font-family: var(--serif);
  color: var(--navy);
  font-weight: 500;
}
h1 { font-size: 30px; margin: 8px 0 18px; line-height: 1.25; }
h2 { font-size: 22px; margin: 32px 0 12px; }
h3 { font-size: 18px; margin: 24px 0 10px; }

p { margin: 0 0 16px; }
ul { margin: 0 0 16px; padding-left: 24px; }
li { margin-bottom: 8px; }

.dfw-section-rule {
  border-top: 1px solid var(--brass);
  margin: 36px 0 28px;
}
.dfw-muted { color: var(--muted); }

/* ===================================================================
   Variation A — per-record format
   =================================================================== */
.dfw-record {
  background: var(--bg);
  border: 1px solid var(--navy);
  border-radius: 4px;
  padding: 24px 28px;
  margin: 24px 0;
}
.dfw-record-header {
  margin-bottom: 18px;
}
.dfw-record-title {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  color: var(--navy);
  margin: 0;
  line-height: 1.2;
}
.dfw-record-rule {
  height: 1.5px;
  background: var(--brass);
  width: 60px;
  margin: 10px 0;
}
.dfw-record-tagline {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 0;
}
.dfw-record-subhead {
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--navy);
  margin: 24px 0 10px;
  padding-top: 14px;
  border-top: 1px dashed var(--brass);
  text-transform: uppercase;
}

.dfw-observation-pill {
  display: inline-block;
  background: var(--oxblood);
  color: var(--cream);
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: 0.14em;
  padding: 5px 11px;
  margin-bottom: 16px;
  border-radius: 2px;
}

.dfw-record-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.dfw-record-table td {
  padding: 5px 0;
  vertical-align: top;
}
.dfw-record-table td:first-child {
  color: var(--muted);
  width: 140px;
  font-size: 13px;
}
.dfw-record-value {
  color: var(--text);
}
.dfw-vessel-name {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--navy);
}
.dfw-sanctions {
  color: var(--oxblood);
  font-weight: 500;
}
.dfw-source-code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--navy);
}
.dfw-record-when {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

/* ===================================================================
   Watchlist index table
   =================================================================== */
.dfw-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 16px 0;
  border: 1px solid var(--cream-deep);
  border-radius: 3px;
  max-height: 75vh;
}
.dfw-table-scroll::-webkit-scrollbar { height: 8px; }
.dfw-table-scroll::-webkit-scrollbar-thumb {
  background: var(--brass);
  border-radius: 4px;
}
.dfw-watchlist-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-family: var(--sans);
}
.dfw-watchlist-table thead th {
  position: sticky;
  top: 0;
  background: var(--cream);
  color: var(--navy);
  font-family: var(--serif);
  font-weight: 500;
  text-align: left;
  letter-spacing: 0.04em;
  font-size: 12px;
  padding: 10px 12px;
  border-bottom: 1.5px solid var(--brass);
  white-space: nowrap;
}
.dfw-watchlist-table tbody td {
  padding: 7px 12px;
  vertical-align: top;
  border-bottom: 1px solid var(--cream-deep);
  color: var(--text);
}
.dfw-watchlist-table tbody tr:nth-child(even) td {
  background: var(--cream-deep);
}
.dfw-watchlist-table tbody tr:hover td {
  background: var(--cream);
}
.dfw-watchlist-table .dfw-watchlist-name {
  font-family: var(--serif);
  color: var(--navy);
  font-size: 14px;
  white-space: nowrap;
}
.dfw-watchlist-table .dfw-watchlist-name a {
  text-decoration: none;
}
.dfw-watchlist-table .dfw-watchlist-name a:hover {
  text-decoration: underline;
  color: var(--oxblood);
}
.dfw-watchlist-table .dfw-watchlist-sources {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--navy);
}
.dfw-watchlist-table .col-name     { min-width: 200px; }
.dfw-watchlist-table .col-category { width: 140px; }
.dfw-watchlist-table .col-flag     { width: 50px; }
.dfw-watchlist-table .col-imo      { width: 90px; }
.dfw-watchlist-table .col-mmsi     { width: 90px; }
.dfw-watchlist-table .col-sources  { width: 110px; }
.dfw-watchlist-table .col-type     { width: 90px; }
.dfw-watchlist-table .col-first    { width: 100px; white-space: nowrap; }

/* ===================================================================
   Counter strip, maps, today's reading (homepage + vessel record)
   =================================================================== */
.dfw-counter-strip {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  border-top: 1px solid var(--brass);
  border-bottom: 2px solid var(--navy);
  padding: 28px 0;
  margin: 0 0 24px;
  background: var(--bg);
}
.dfw-counter-cell {
  flex: 1 1 0;
  min-width: 150px;
  text-align: center;
  padding: 0 10px;
  border-right: 1px solid var(--brass);
}
.dfw-counter-cell:last-child { border-right: none; }
.dfw-counter-number {
  font-family: var(--serif);
  font-size: 42px;
  line-height: 1.05;
  color: var(--navy);
  margin: 0;
  font-weight: 500;
}
.dfw-counter-caption {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  max-width: 150px;
  margin: 8px auto 0;
  line-height: 1.4;
}

.dfw-map-container {
  border: 1px solid var(--brass);
  margin: 24px 0;
  padding: 16px;
  background: var(--bg);
}
.dfw-map-title {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--navy);
  margin: 0 0 12px;
  font-weight: 500;
}
.dfw-map { width: 100%; }
.dfw-home-map   { height: 600px; }
.dfw-vessel-map { height: 400px; border: 1px solid var(--brass); margin: 12px 0; }

.dfw-todays-reading {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--muted);
  padding: 16px 0;
  border-top: 1px solid var(--brass);
  border-bottom: 1px solid var(--brass);
  margin: 24px 0;
  line-height: 1.55;
}

.dfw-hotspot-label.leaflet-tooltip {
  background: transparent;
  border: none;
  box-shadow: none;
  color: var(--brass);
  font-family: var(--serif);
  font-style: italic;
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 0;
}
.dfw-hotspot-label.leaflet-tooltip::before { display: none; }

.dfw-popup {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
}
.dfw-popup-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 15px;
  color: var(--navy);
  margin: 0 0 4px;
}
.dfw-popup-line { margin: 0; }
.dfw-popup-line a { color: var(--navy); }

.dfw-vessel-photo {
  display: block;
  max-width: 600px;
  width: 100%;
  height: auto;
  margin: 16px auto;
  border: 4px solid var(--navy);
  padding: 2px;
  background: var(--cream);
}
.dfw-photo-caption {
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--muted);
  margin: 8px 0 24px;
}
.dfw-photo-caption-imo {
  color: var(--muted);
  font-size: 0.9em;
  font-weight: normal;
}
.dfw-photo-methodological-note {
  text-align: center;
  font-family: var(--serif);
  font-size: 12px;
  color: var(--muted);
  margin: 4px auto 24px;
  max-width: 540px;
  line-height: 1.5;
}
.dfw-photo-methodological-note em {
  font-style: italic;
}

/* ===================================================================
   Footer
   =================================================================== */
.dfw-footer {
  max-width: 880px;
  margin: 0 auto;
  padding: 28px 24px 36px;
  border-top: 1px solid var(--brass);
  text-align: center;
}
.dfw-tagline {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--brass);
  margin: 0 0 10px;
}
.dfw-copyright {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.dfw-copyright a { color: var(--muted); }

/* ===================================================================
   Mobile
   =================================================================== */
@media (max-width: 1099px) {
  .dfw-watchlist-table .col-imo,
  .dfw-watchlist-table .col-mmsi { display: none; }
}
@media (max-width: 767px) {
  .dfw-watchlist-table .col-type,
  .dfw-watchlist-table .col-first { display: none; }

  .dfw-counter-strip {
    flex-direction: column;
    padding: 16px 0;
  }
  .dfw-counter-cell {
    border-right: none;
    border-bottom: 1px solid var(--brass);
    padding: 14px 12px;
  }
  .dfw-counter-cell:last-child { border-bottom: none; }
  .dfw-counter-number { font-size: 40px; }

  .dfw-home-map   { height: 350px; }
  .dfw-vessel-map { height: 300px; }
  .dfw-map-title  { font-size: 18px; }
  .dfw-todays-reading { font-size: 16px; }
}
@media (max-width: 600px) {
  .dfw-wordmark { font-size: 28px; }
  .dfw-record { padding: 18px 20px; }
  .dfw-record-table td:first-child { width: 110px; }
  h1 { font-size: 24px; }
}
