/* chrisyellick.com — the one stylesheet (site/templates/styles/main.css).
   2026-11-09: the scorecard design extended to the whole site. System font, no web fonts, no scripts.
   Colours: ink #1d1f22, grey text #6b6f76 / #4a4e55, rules #d9d6d1 / #eeece8, and Paul Tol's high-contrast
   blue #004488 (links, "better", the boat in view), red #BB5566 ("worse", the winner), yellow #DDAA33 (the
   course on the maps). Rules that only the scorecard pages need are scoped to .sc, their #content. */

/* ---- Page and type ---- */
html { -webkit-text-size-adjust: 100%; }   /* stop phones enlarging text on rotate */
body {
  max-width: 960px; margin: 0 auto; padding: 36px 20px 40px;
  background: #fff; color: #1d1f22;
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
a { color: #004488; } a:hover { color: #002a55; }
hr { border: 0; border-top: 1px solid #d9d6d1; margin: 10px 0 0; }
h1 { font-size: 34px; line-height: 1.15; margin: 28px 0 26px; letter-spacing: -.01em; text-wrap: balance; }
h2 { font-size: 21px; margin: 30px 0 10px; }
h3 { font-size: 18px; margin: 22px 0 6px; }
p, ul, ol { margin: 0 0 14px; }
li { margin: 0 0 3px; }
.of { color: #6b6f76; font-size: 13px; }           /* a quiet aside next to a figure: "of 8", "nm", "(ours)" */

/* ---- Top nav and footer (the ids come from _main.php) ---- */
#topnav, #footer { margin: 0; font-size: 13px; color: #6b6f76; }
#topnav a, #footer a { color: #6b6f76; } #topnav a:hover, #footer a:hover { color: #1d1f22; }
#footer { font-size: 12px; margin-top: 6px; }
#footer small { font-size: inherit; }              /* _main.php wraps the footer in <small>; don't shrink twice */
#content + hr { margin-top: 28px; }                /* space between the page body and the footer line */

/* ---- Eyebrow line and headline numbers (the scorecard template puts these around the site's h1) ---- */
.eyebrow { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #6b6f76; margin: 36px 0 0; }
.eyebrow + h1 { margin: 6px 0 28px; }
.stats { display: flex; flex-wrap: wrap; gap: 12px 40px; margin: -4px 0 28px; font-variant-numeric: tabular-nums; }
.stats dt { font-size: 13px; color: #6b6f76; }
.stats dd { margin: 0; font-size: 26px; font-weight: 700; }
.stats .of { font-size: 16px; font-weight: 400; }
.stats .muted { color: #6b6f76; }                  /* same size as the other figures, just greyed */

/* ---- Tables: one style for editor tables in notes and for the scorecards ---- */
table { width: 100%; border-collapse: collapse; margin: 10px 0 14px; font-size: 15px; line-height: 1.45; border: 0;
  font-variant-numeric: tabular-nums; }           /* border: 0 cancels the border="1" the editor adds */
th, td { border: 0; padding: 7px 10px; text-align: left; vertical-align: top; }
th { font-size: 12px; font-weight: 600; color: #6b6f76; vertical-align: bottom; padding: 8px 10px; }
thead tr:last-child { border-bottom: 2px solid #1d1f22; }
th:first-child, td:first-child { padding-left: 0; }
tbody tr { border-bottom: 1px solid #eeece8; }
td ul { margin: 0; padding-left: 16px; }           /* bulleted lists inside cells */
.num { text-align: right; } td.num { white-space: nowrap; }
/* Alignment classes the editor adds when you pick left / center / right. */
.align_left { text-align: left; } .align_center { text-align: center; } .align_right { text-align: right; }
/* Tables with class="narrow-first": the first column is half as wide as each of the others. CSS can't count
   columns, so each rule matches a row length: n columns -> first column is 100% / (2n - 1). */
table.narrow-first { table-layout: fixed; }
table.narrow-first:has(tr > :last-child:nth-child(2)) tr > :first-child { width: calc(100% / 3); }
table.narrow-first:has(tr > :last-child:nth-child(3)) tr > :first-child { width: calc(100% / 5); }
table.narrow-first:has(tr > :last-child:nth-child(4)) tr > :first-child { width: calc(100% / 7); }
table.narrow-first:has(tr > :last-child:nth-child(5)) tr > :first-child { width: calc(100% / 9); }
table.narrow-first:has(tr > :last-child:nth-child(6)) tr > :first-child { width: calc(100% / 11); }
table.narrow-first:has(tr > :last-child:nth-child(7)) tr > :first-child { width: calc(100% / 13); }
table.narrow-first:has(tr > :last-child:nth-child(8)) tr > :first-child { width: calc(100% / 15); }
table.narrow-first col { width: auto !important; } /* the editor writes <col style="width: ..."> into tables; ignore those here */

/* ---- Scorecard pages (.sc is their #content) ---- */
.sc h2 { margin: 0 0 14px; }
.sc section + section { padding-top: 48px; }
.sc.race section + section { padding-top: 40px; }
.sc table { margin: 0; }
.sc .gaps table { font-size: 14px; }
.sc th { white-space: normal; }
.sc th:first-child, .sc td:first-child { white-space: nowrap; }
.sc .scroll { overflow-x: auto; }                  /* wide tables scroll sideways with the first column pinned */
.sc .scroll th:first-child, .sc .scroll td:first-child { position: sticky; left: 0; background: #fff; }
.sc tbody tr:hover, .sc tbody tr:hover td:first-child { background: #f7f6f3; }   /* row highlight, scorecards only */
@media (max-width: 600px) { .sc table.measures th:first-child, .sc table.measures td:first-child { white-space: normal; max-width: 150px; } }
/* series page: results by day, places, markers, notes */
.sc .day td { padding: 20px 0 6px; border-bottom: 1px solid #d9d6d1; }
.sc .day:hover { background: none; }
.sc .day strong { font-weight: 700; }
.sc .day span { color: #6b6f76; font-size: 14px; }
.sc .place b { font-weight: 600; }
.sc .mark { color: #6b6f76; font-size: 11px; line-height: 0; padding-left: 2px; }   /* a <sup>, so † ‡ sit raised */
.sc .drop { color: #9a9da3; }
.sc .note { min-width: 220px; }
.sc td.note { color: #4a4e55; font-size: 14px; width: 45%; max-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* series gap table: leg groups, separators, the median row; race pages: the port / starboard blocks */
.sc .group { text-align: center; font-size: 12px; font-weight: 700; color: #1d1f22; letter-spacing: .06em; text-transform: uppercase; border-bottom: 1px solid #d9d6d1; }
.sc .sep { border-left: 1px solid #d9d6d1; }
/* darker rules between groups of rows go on the cells, not the row: in collapsed tables a row's border
   loses to the previous row's bottom border of the same width, but a cell's border beats both */
.sc .new-day td { border-top: 1px solid #bdb9b2; }
.sc tr.grp td { border-top: 1px solid #6b6f76; }
.sc .better { color: #004488; } .sc .worse { color: #BB5566; }
.sc .median { border-top: 2px solid #1d1f22; border-bottom: 2px solid #1d1f22; font-weight: 700; }
.sc tr.me { font-weight: 600; } .sc tr.me td:first-child { color: #004488; }
/* notes under tables and charts: a legend line (markers or swatches), then a footnote */
.sc .footnote { font-size: 14px; color: #4a4e55; margin: 16px 0 0; }
.sc .legend { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; color: #4a4e55; margin: 6px 0 0; }
.sc table + .legend, .sc .scroll + .legend, .sc svg + .legend { margin-top: 16px; }
.sc .legend + .footnote { margin-top: 6px; }
.sc .legend .better, .sc .legend .worse { font-weight: 600; }
.sc .legend svg { width: 30px; height: 10px; display: inline-block; margin: 0 6px 0 0; vertical-align: middle; }   /* line swatches */
.sc .legend svg.dot { width: 10px; margin: 0 6px 0 -20px; }   /* the minute dot sits on the blue swatch */
/* race pages: crumb, warnings, headline numbers, conditions table, charts, prev/next links */
.sc .crumb { font-size: 14px; margin: 0 0 20px; }
.sc .flag { font-size: 14px; font-weight: 600; color: #BB5566; margin: 8px 0 0; }
.sc .stats { margin: 20px 0 0; }
.sc .stats dd .of { font-size: 14px; }
.sc table.wind { max-width: 480px; }
.sc svg { width: 100%; max-width: 680px; height: auto; display: block; margin: 0.5em 0; }
.sc svg + .footnote { margin-top: 8px; }
/* rank chart + gap table: both full width of .cp; the table's label column is as wide as the chart's
   left margin (110 of 600) and its five equal columns centre under the five checkpoints */
.sc .cpscroll { overflow-x: auto; }
.sc .cp { min-width: 640px; }
.sc .cp svg { max-width: none; margin: 0.5em 0 0; }
.sc .cp table { table-layout: fixed; }
.sc .cp col.lbl { width: 18.333%; }
.sc .cp td { text-align: center; white-space: nowrap; }
.sc .cp td:first-child { text-align: left; }
.sc .cp tbody tr:first-child { border-top: 1px solid #d9d6d1; }
.sc .cpscroll + .footnote { margin-top: 12px; }
.sc .pager { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; margin: 48px 0 0; }

/* ---- Small screens ---- */
@media (max-width: 600px) {
  body { padding: 24px 14px 32px; }
  h1 { font-size: 28px; }
  table { font-size: 13px; }
  th, td { padding: 6px 4px; }
}

/* ---- Print ---- */
@media print {
  body { max-width: none; padding: 0; font-size: 11pt; }
  a { color: #1d1f22; text-decoration: none; }
  h2, h3 { break-after: avoid; }            /* keep a heading with what follows */
  tr { break-inside: avoid; }               /* don't split a table row across pages */
}
