/* The generated search pages (scripts/seo/*.mjs), on top of guide.css: its tokens, header,
   footer, type, tables and both themes. Copied to dist/guides/seo-page.css by trial-post.mjs.
   Plain CSS, no script: every page works with JavaScript off. */
.sp h1 { margin-bottom: 6px; }
.sp-sec { margin-top: 34px; scroll-margin-top: 16px; }
.sp-sec > h2 { border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 12px; }
.sp-sec h3 { font-size: 15px; margin: 18px 0 6px; }
.sp-mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; font-size: 13px; }
.sp .note { font-size: 13.5px; color: var(--muted); }

/* Key facts: a grid of tiles (label · figure · what it means). */
.sp-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-2); overflow: hidden; margin: 18px 0 6px; max-width: none !important; }
.sp-tiles > div { background: var(--surface); padding: 12px 14px; display: grid; gap: 3px; align-content: start; }
.sp-tiles span { font: 600 11px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-hi); }
.sp-tiles b { font-size: 19px; font-weight: 650; font-variant-numeric: tabular-nums; }
.sp-tiles em { font-style: normal; font-size: 13px; color: var(--ink-2); }

/* Link lists: hubs, related pages. */
.sp-links { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; max-width: none !important; }
.sp-links li { display: grid; gap: 1px; }
.sp-links li span { font-size: 13px; color: var(--muted); }
.sp-cols { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 18px; }
.sp-cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.sp-cards li { align-content: start; border: 1px solid var(--line-strong); border-radius: var(--r-2); padding: 12px 14px; background: var(--surface); }
.sp-cards li a { font-weight: 600; }

/* A big figure line ("8,414 nm via Suez"). */
.sp-figs { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 4px; max-width: none !important; }
.sp-fig { flex: 1 1 200px; border: 1px solid var(--line-strong); border-radius: var(--r-2); padding: 12px 14px; background: var(--surface); }
.sp-fig b { display: block; font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.sp-fig span { font-size: 13px; color: var(--ink-2); }
.sp-fig.best { border-color: var(--accent-line); background: var(--accent-soft); }

/* A drawn route / area map. */
.sp-map { margin: 16px 0 6px; max-width: none !important; }
.sp-map svg, .sp-map img { display: block; width: 100%; height: auto; border-radius: var(--r-2); border: 1px solid var(--line-strong); }
.sp-map figcaption { margin-top: 6px; font-size: 12.5px; color: var(--muted); }

/* Steps (how-to pages). */
.sp-steps { margin: 0 0 12px; padding-left: 22px; display: grid; gap: 8px; }
.sp-steps li::marker { font-weight: 700; color: var(--accent-hi); }
.sp-kbd { font: 600 12.5px var(--f-mono); border: 1px solid var(--line-strong); border-radius: 6px; padding: 1px 6px; background: var(--surface); white-space: nowrap; }

/* Key facts: --cols across on a computer (tilesHtml picks a count that leaves no gap), two
   on a phone with an odd last tile spanning both. */
.sp-tiles { grid-template-columns: repeat(var(--cols, 3), 1fr); }
@media (max-width: 720px) {
  .sp-tiles { grid-template-columns: repeat(2, 1fr); }
  .sp-tiles > div:last-child:nth-child(odd) { grid-column: span 2; }
}

/* Long lists (a country's ports): stay a real table on a phone instead of guide.css's
   stacked cards (53 cards is a long scroll), with the minor columns dropped. */
@media (max-width: 720px) {
  table.sp-list { display: table; background: var(--surface); border: 1px solid var(--line-strong); }
  table.sp-list thead { display: table-header-group; position: static; width: auto; height: auto; clip: auto; overflow: visible; }
  table.sp-list tbody { display: table-row-group; }
  table.sp-list tr { display: table-row; border: 0; background: none; padding: 0; margin: 0; }
  table.sp-list th, table.sp-list td { display: table-cell; padding: 8px 10px; }
  table.sp-list td::before { content: none; }
  table.sp-trim :is(th, td):nth-child(2), table.sp-trim :is(th, td):nth-child(5) { display: none; }
}
