/* Expedition Review Desk — global.css
   Design system: "Glacial Truth" — editorial minimalism, institutional authority.
   Source: _source/reference-home, _source/reference-operator, _source/reference-methodology (Google Stitch, shared DESIGN.md).
*/

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
img, svg { display: block; max-width: 100%; }
a { color: var(--arctic-teal); text-decoration: underline; text-decoration-color: rgba(13, 148, 136, 0.4); text-underline-offset: 2px; }
a:hover, a:focus-visible { text-decoration-color: currentColor; }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }
button { font: inherit; cursor: pointer; }

/* ---------- Design tokens ---------- */
:root {
  /* Palette */
  --navy: #0F172A;
  --ice-blue: #BAE6FD;
  --arctic-teal: #0D9488;
  --warning-gold: #F59E0B;
  --warning-gold-10: rgba(245, 158, 11, 0.1);
  --soft-slate: #F8FAFC;
  --outline: #E2E8F0;
  --white: #FFFFFF;
  --text-body: #1E293B;
  --text-muted: #64748B;

  /* Type — system stack (no font CDN, no self-hosted files to keep the build dependency-free).
     Display face approximates Playfair Display's high-contrast serif; body face approximates Inter. */
  --font-display: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Shape */
  --radius: 0.25rem;
  --shadow-floating: 0px 4px 20px rgba(15, 23, 42, 0.08);

  /* Layout */
  --max-width: 1280px;
  --section-gap: 80px;
  --base: 8px;
}

/* ---------- Base ---------- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-body);
  background: var(--white);
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.2;
}

h1 {
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
@media (min-width: 768px) {
  h1 { font-size: 48px; line-height: 56px; }
}

h2 {
  font-weight: 700;
  font-size: 24px;
  line-height: 1.25;
  margin-bottom: 0.6em;
}
@media (min-width: 768px) {
  h2 { font-size: 32px; line-height: 40px; }
}

h3 {
  font-weight: 600;
  font-size: 20px;
  line-height: 1.3;
  margin-bottom: 0.5em;
}
@media (min-width: 768px) {
  h3 { font-size: 24px; line-height: 32px; }
}

p { margin-bottom: 1.1em; max-width: 68ch; }
/* Text blocks that sit directly above/below a full-width table or card
   should span that width instead of wrapping at the 68ch paragraph limit. */
.text-wide { max-width: none; }
p:last-child { margin-bottom: 0; }

.tabular-nums { font-feature-settings: 'tnum' 1; font-variant-numeric: tabular-nums; }

/* ---------- Layout ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 48px 0; }
@media (min-width: 768px) {
  .section { padding: var(--section-gap) 0; }
}

.section--slate { background: var(--soft-slate); }

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--outline);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .container {
  max-width: 1480px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--navy);
  text-decoration: none;
  white-space: nowrap;
}
.site-nav {
  display: none;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}
@media (min-width: 768px) {
  .site-nav { display: flex; }
}
.site-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-body);
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--navy);
  border-bottom-color: var(--arctic-teal);
}
.site-nav a.active {
  color: var(--navy);
  border-bottom-color: var(--navy);
  font-weight: 600;
}

/* Operator Reviews dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown details {
  position: relative;
  border: none;
  padding: 0;
  margin: 0;
  display: inline-block;
}
.nav-dropdown summary {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-body);
  text-decoration: none;
  cursor: pointer;
  list-style: none;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-dropdown summary::after,
.nav-dropdown details[open] summary::after {
  content: '';
  float: none;
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-top: -3px;
}
.nav-dropdown summary:hover,
.nav-dropdown summary:focus-visible {
  color: var(--navy);
  border-bottom-color: var(--arctic-teal);
}
.nav-dropdown details[open] summary { color: var(--navy); }
.nav-dropdown__menu {
  display: flex;
  flex-direction: column;
  min-width: 280px;
  background: var(--white);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-floating);
  padding: 8px;
  margin-top: 4px;
}
@media (min-width: 768px) {
  .nav-dropdown__menu { position: absolute; top: 100%; left: 0; margin-top: 0; z-index: 60; }
}
.nav-dropdown__menu a {
  padding: 8px 12px;
  font-size: 14px;
  color: var(--text-body);
  text-decoration: none;
  border-radius: var(--radius);
  white-space: nowrap;
}
.nav-dropdown__menu a:hover { background: var(--soft-slate); color: var(--navy); }

/* Mobile nav toggle */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--outline);
  border-radius: var(--radius);
}
@media (min-width: 768px) {
  .nav-toggle { display: none; }
}
.nav-toggle svg { width: 20px; height: 20px; color: var(--navy); }

.site-nav.is-open {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--outline);
  padding: 12px 24px 20px;
}

.updated-badge {
  display: none;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--soft-slate);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: 6px 10px;
}
@media (min-width: 1024px) {
  .updated-badge { display: inline-block; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--navy);
  color: var(--white);
}
.btn-primary:hover { opacity: 0.9; }
.btn-primary:focus-visible { outline: 2px solid var(--arctic-teal); outline-offset: 2px; }
.btn-secondary {
  background: var(--white);
  color: var(--navy);
  border-color: var(--navy);
}
.btn-secondary:hover { background: var(--soft-slate); }
.btn-secondary:focus-visible { outline: 2px solid var(--arctic-teal); outline-offset: 2px; }

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: 20px;
}

.stat-plate {
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  background: var(--soft-slate);
  padding: 16px 18px;
  text-align: center;
}
.stat-plate__value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  color: var(--navy);
}
.stat-plate__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Score-weight breakdown (used on homepage and methodology page) */
.weight-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 24px 0;
}
@media (min-width: 768px) {
  .weight-grid { grid-template-columns: repeat(4, 1fr); }
}
.weight-card {
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: 18px;
}
.weight-card__pct {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  color: var(--navy);
}
.weight-card__pct.is-editorial { color: var(--warning-gold); }
.weight-card__label { font-size: 14px; font-weight: 600; margin: 6px 0 4px; }
.weight-card__note { font-size: 13px; color: var(--text-muted); }

/* Callout / methodology aside — same card language as .alt-card / .ship-card */
.callout {
  background: var(--white);
  border: 1px solid var(--outline);
  border-radius: calc(var(--radius) * 3);
  box-shadow: var(--shadow-floating);
  padding: 24px;
  margin: 24px 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout--label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--arctic-teal);
  margin-bottom: 10px;
}
.callout--label::before {
  content: '';
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background-color: var(--arctic-teal);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='16' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='16' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

/* Icon + label row */
.icon-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.icon-row svg {
  width: 22px;
  height: 22px;
  color: var(--arctic-teal);
  flex-shrink: 0;
  margin-top: 2px;
}
.icon-row__body p { margin-bottom: 0.3em; }

/* Badge */
.badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--warning-gold);
  background: var(--warning-gold-10);
  border: 1px solid var(--warning-gold);
  border-radius: var(--radius);
  padding: 4px 8px;
}

/* ---------- Tables ---------- */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  margin-bottom: 24px;
}
table.data-table {
  min-width: 720px;
  font-size: 14px;
}
table.data-table thead th {
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  text-align: left;
  padding: 12px 14px;
  white-space: nowrap;
  position: sticky;
  top: 0;
}
table.data-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--outline);
  font-feature-settings: 'tnum' 1;
}
table.data-table tbody tr:nth-child(even) { background: var(--soft-slate); }
table.data-table tbody tr:hover { background: var(--ice-blue); }
table.data-table th:first-child,
table.data-table td:first-child { width: 36px; min-width: 36px; }
table.data-table th:nth-child(2),
table.data-table td:nth-child(2) { min-width: 160px; }
.check-yes { color: var(--arctic-teal); }

/* ---------- Progress bar (sub-metrics) ---------- */
.metric-bar {
  height: 4px;
  background: var(--outline);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}
.metric-bar__fill { height: 100%; background: var(--arctic-teal); }

/* ---------- Details / accordion (FAQ, score breakdown) ---------- */
details {
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 10px;
}
details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--navy);
  list-style: none;
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: '+';
  float: right;
  font-weight: 400;
  color: var(--arctic-teal);
}
details[open] summary::after { content: '\2212'; }
details p { margin-top: 10px; }

/* Inline score-breakdown details (no border, sits in a table cell) */
details.score-detail {
  border: none;
  padding: 0;
  margin: 0;
  display: inline-block;
}
details.score-detail summary {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--navy);
}
details.score-detail summary::after { content: none; }

/* ---------- Shared components: suits-grid, review cards, checklist, FAQ (used on homepage, operator pages, methodology) ---------- */
.suits-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 16px;
}
@media (min-width: 768px) {
  .suits-grid { grid-template-columns: 1fr 1fr; }
}

.review-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 16px 0;
}
@media (min-width: 640px) {
  .review-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .review-cards { grid-template-columns: repeat(4, 1fr); }
}
.review-card {
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.review-card__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--arctic-teal);
}
.review-card__text { font-size: 14px; line-height: 1.5; flex-grow: 1; }
.review-card__source { font-size: 11px; color: var(--text-muted); }
.review-card--critical { border-color: var(--warning-gold); }

.aggregate-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.aggregate-line::before {
  content: '';
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  background-color: var(--warning-gold);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black' stroke='none'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87L18.18 21 12 17.27 5.82 21 7 14.14l-5-4.87 6.91-1.01L12 2z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black' stroke='none'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87L18.18 21 12 17.27 5.82 21 7 14.14l-5-4.87 6.91-1.01L12 2z'/%3E%3C/svg%3E");
}

.checklist { margin: 16px 0; }
.checklist li {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--outline);
  font-size: 15px;
}
.checklist li svg { width: 18px; height: 18px; color: var(--arctic-teal); flex-shrink: 0; margin-top: 2px; }

.faq-list details summary { font-family: var(--font-display); font-size: 17px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.75);
  padding: 56px 0 28px;
  margin-top: var(--section-gap);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}
.footer-col h4 {
  color: var(--white);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.footer-col a, .footer-col p { font-size: 14px; }
.footer-col a { color: rgba(255,255,255,0.75); text-decoration: underline; text-decoration-color: rgba(255,255,255,0.35); }
.footer-col ul li { margin-bottom: 8px; }
.footer-col a:hover, .footer-col a:focus-visible { color: var(--white); text-decoration-color: currentColor; }
.footer-independence {
  font-size: 13px;
  line-height: 1.6;
  max-width: 46ch;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 40px;
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}

/* ---------- Utility ---------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.text-muted { color: var(--text-muted); }
.mt-0 { margin-top: 0; }
