/* ============================================================
   HOE WAʻA · Regatta analytics
   Light editorial. Dark sturdy type, one accent, color only
   where it carries data. Nothing decorative.
   ============================================================ */

:root {
  --ink: #16181a;
  --ink-2: #444a4f;     /* secondary text — still dark */
  --hair: #e3e5e7;      /* hairlines */
  --paper: #ffffff;
  --wash: #f5f7f8;      /* hover / soft fill */
  --accent: #0b5fa5;    /* links, active controls */
  --up: #1a8a46;
  --dn: #c0392b;
  --font: "Libre Franklin", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.5;
}

a { color: var(--accent); font-weight: 700; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
strong, b, th { font-weight: 800; }
::selection { background: #cfe5f7; }

/* ---------- masthead ---------- */
.masthead { border-bottom: 3px solid var(--ink); background: var(--paper); }
.masthead-inner {
  max-width: 1100px; margin: 0 auto; padding: 18px 20px 12px;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 18px;
}
.wordmark { font-size: 23px; font-weight: 900; letter-spacing: .02em; color: var(--ink); }
.wordmark a { color: var(--ink); display: inline-flex; align-items: center; gap: 9px; }
.wordmark a:hover { text-decoration: none; }
.brand-mark { flex: 0 0 auto; position: relative; top: 1px; }

/* hoverable data-label descriptions */
.has-tip { cursor: help; text-decoration: underline dotted 1.5px #9aa1a7; text-underline-offset: 3px; }

/* club logos (club pages) */
.club-logo { height: 52px; width: auto; max-width: 130px; object-fit: contain; flex: 0 0 auto; }

/* race-day event blocks */
.rd-event { margin-bottom: 18px; }
.rd-title { font-size: 14px; font-weight: 900; margin: 0 0 6px; }
.rd-title .sub { color: var(--ink-2); font-weight: 700; font-size: 12px; }
.masthead-tag { color: var(--ink-2); font-size: 13.5px; font-weight: 700; }

.tabs {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--hair);
  display: flex; gap: 2px; overflow-x: auto;
  max-width: 1100px; margin: 0 auto; padding: 0 12px;
}
.tab {
  padding: 11px 14px; font-size: 14px; font-weight: 800; color: var(--ink);
  white-space: nowrap; border-bottom: 3px solid transparent;
}
.tab:hover { text-decoration: none; background: var(--wash); }
.tab.is-active { border-bottom-color: var(--ink); }

/* ---------- layout ---------- */
main { max-width: 1100px; margin: 0 auto; padding: 30px 20px 70px; }
.page-title { font-size: clamp(26px, 4vw, 36px); font-weight: 900; line-height: 1.15; margin: 0 0 6px; letter-spacing: -.01em; }
.dek { color: var(--ink-2); font-size: 16.5px; font-weight: 600; margin: 0 0 18px; max-width: 760px; }
.dateline { font-family: var(--mono); font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin: 0 0 22px; }

section.block { border-top: 1px solid var(--hair); padding-top: 20px; margin-top: 28px; }
.block-title { font-size: 13px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; margin: 0 0 12px; }
.block-title .sub { color: var(--ink-2); font-weight: 700; text-transform: none; letter-spacing: 0; }

.cols { display: grid; gap: 28px; }
.cols--3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.cols--2 { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }

.footnote { color: var(--ink-2); font-size: 13.5px; font-weight: 600; border-top: 1px solid var(--hair); margin-top: 18px; padding-top: 10px; max-width: 760px; }

/* ---------- controls ---------- */
.controls { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 0 0 18px; }
.controls label { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
select, input[type="search"] {
  font-family: var(--font); font-weight: 700; font-size: 14.5px; color: var(--ink);
  background: var(--paper); border: 1.5px solid #c9cdd1; border-radius: 6px; padding: 7px 10px;
}
select:focus, input:focus, .seg button:focus, .chip:focus { outline: 2.5px solid var(--accent); outline-offset: 1px; }

.seg { display: inline-flex; border: 1.5px solid #c9cdd1; border-radius: 7px; overflow: hidden; }
.seg button {
  font-family: var(--font); font-weight: 800; font-size: 13.5px; color: var(--ink);
  background: var(--paper); border: 0; padding: 8px 13px; cursor: pointer;
}
.seg button + button { border-left: 1.5px solid #c9cdd1; }
.seg button.on { background: var(--ink); color: #fff; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 4px 0 14px; }
.chip {
  font-family: var(--font); font-weight: 800; font-size: 13px; color: var(--ink-2);
  background: var(--paper); border: 1.5px solid #c9cdd1; border-radius: 999px;
  padding: 5px 11px; cursor: pointer;
}
.chip .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; background: #c9cdd1; }
.chip.on { border-color: currentColor; color: var(--ink); background: var(--wash); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
.table-wrap.narrow { max-width: 560px; }
table.data { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.data th {
  text-align: left; font-size: 11px; font-weight: 800; letter-spacing: .07em;
  text-transform: uppercase; color: var(--ink-2);
  border-bottom: 2px solid var(--ink); padding: 6px 9px; white-space: nowrap;
}
table.data td { padding: 7.5px 9px; border-bottom: 1px solid var(--hair); white-space: nowrap; }
table.data tr:hover > td { background: var(--wash); }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
table.data .mono { font-family: var(--mono); font-weight: 600; font-size: 13.5px; }
table.data .rank { color: var(--ink-2); font-weight: 800; width: 30px; }
table.data th.sortable { cursor: pointer; user-select: none; }
table.data th.sortable:hover { color: var(--accent); }
.clickable { cursor: pointer; }

.swatch { width: 11px; height: 11px; border-radius: 3px; display: inline-block; margin-right: 8px; vertical-align: baseline; }
.delta-up { color: var(--up); }
.delta-dn { color: var(--dn); }

tr.detail-row > td { background: var(--wash); padding: 10px 9px 14px; white-space: normal; }
.top5 { margin: 0; padding: 0; list-style: none; font-size: 13.5px; }
.top5 li { padding: 3px 0; }
.top5 .mono { font-family: var(--mono); font-weight: 700; }

/* ---------- stat strip (club pages) ---------- */
.stat-strip { display: flex; flex-wrap: wrap; gap: 26px 38px; margin: 14px 0 6px; }
.stat-strip .stat .n { font-family: var(--mono); font-weight: 700; font-size: 24px; display: block; line-height: 1.1; }
.stat-strip .stat .l { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }

.club-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 2px; }
.club-head h1 { margin: 0; }
.club-meta { color: var(--ink-2); font-weight: 700; font-size: 14.5px; }
.backlink { display: inline-block; margin-bottom: 14px; font-size: 14px; }

.divbar { display: grid; grid-template-columns: 92px 1fr 64px; gap: 10px; align-items: center; margin: 6px 0; font-size: 13.5px; }
.divbar .bar { height: 13px; border-radius: 4px; background: var(--hair); overflow: hidden; }
.divbar .bar i { display: block; height: 100%; background: var(--ink); border-radius: 4px; }

/* ---------- charts ---------- */
.chart { width: 100%; display: block; }
.chart text { font-family: var(--font); font-weight: 700; fill: var(--ink-2); font-size: 12px; }
.chart .gridline { stroke: var(--hair); stroke-width: 1; }
.chart .series { fill: none; stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.chart .series.dim { opacity: .25; stroke: #b9bfc4 !important; stroke-width: 1.6; }
.chart .series.hot { stroke-width: 3.4; }
.chart .dot-pt { stroke: #fff; stroke-width: 1.6; }
.chart .label-end { font-size: 12px; font-weight: 800; }

.tooltip {
  position: fixed; z-index: 90; pointer-events: none;
  background: var(--paper); border: 1.5px solid var(--ink); border-radius: 7px;
  color: var(--ink); font-size: 13px; font-weight: 600;
  padding: 8px 11px; max-width: 300px; box-shadow: 0 6px 22px rgba(20, 28, 34, .18);
}
.tooltip .t-title { font-weight: 800; margin-bottom: 2px; }

/* ---------- prose (About) ---------- */
.prose { max-width: 740px; font-size: 16px; }
.prose p { margin: 0 0 14px; }
.prose h2 { font-size: 19px; font-weight: 900; margin: 26px 0 8px; }
.prose ul { margin: 0 0 14px; padding-left: 22px; }
.prose li { margin-bottom: 7px; }
.gloss { color: var(--ink-2); }
.gloss b { color: var(--ink); }

/* ---------- photos ---------- */
.photo-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 22px 0; }
.photo-row figure { margin: 0; }
.photo-row img { width: 100%; height: 210px; object-fit: cover; border-radius: 6px; display: block; }
.photo-row figcaption { font-size: 12px; font-weight: 700; color: var(--ink-2); margin-top: 6px; line-height: 1.45; }

/* ---------- footer ---------- */
.site-footer { border-top: 3px solid var(--ink); }
.site-footer p { max-width: 1100px; margin: 14px auto; padding: 0 20px; color: var(--ink-2); font-size: 13px; font-weight: 600; }

@media (max-width: 700px) {
  main { padding: 22px 14px 60px; }
  .cols { gap: 20px; }
  .stat-strip { gap: 16px 26px; }
}
