/* Sandsend Notes: sea mist paper, kelp and alum. Prefix sn-, coastal survey
   lexicon (run, band, marker, tideline, ledger, scarp, staith). No external
   request, no third party script, system fonts only. */

:root {
  --paper: #e8eef0;
  --paper-raised: #f6fafb;
  --paper-sunk: #dbe4e7;
  --ink: #131519;
  --ink-soft: #4d5a5c;
  --kelp: #2c5c4d;
  --kelp-deep: #1c4034;
  --alum: #a8481f;
  --rule: #c2cdd0;
  --rule-strong: #94a4a8;
  --shadow: rgba(19, 21, 25, 0.16);
  /* bandes volontairement sombres : ce jeton ne s inverse JAMAIS,
     sinon le texte pale du heros et du pied passe sur un fond clair. */
  --band: #131519;
  --serif: Baskerville, "Libre Baskerville", "Hoefler Text", "Times New Roman", Times, serif;
  --sans: "Trebuchet MS", "Lucida Grande", "Segoe UI", Tahoma, Verdana, sans-serif;
  --marker: Futura, "Century Gothic", "Avenir Next Condensed", "Arial Narrow", sans-serif;
  --run: 74rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #12181a;
    --paper-raised: #182022;
    --paper-sunk: #0d1214;
    --ink: #e4ebec;
    --ink-soft: #a1b0b2;
    --kelp: #79b79f;
    --kelp-deep: #a3d0bd;
    --alum: #e08a5c;
    --rule: #2c3a3d;
    --rule-strong: #46595d;
    --shadow: rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.95rem + 0.22vw, 1.11rem);
  line-height: 1.62;
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.16; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 1.2rem + 3vw, 3.5rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.4vw, 2.15rem); }
h3 { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.36rem); }
p { margin: 0 0 1.1em; }

a { color: var(--kelp-deep); text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; transition: color 150ms ease; }
a:hover { color: var(--alum); }
a:focus-visible { outline: 2px solid var(--alum); outline-offset: 3px; }
::selection { background: var(--kelp); color: var(--paper-raised); }

img { max-width: 100%; height: auto; display: block; }

/* --- structure ------------------------------------------------------- */
.sn-run { width: min(100% - 2.4rem, var(--run)); margin-inline: auto; }
.sn-run--tight { width: min(100% - 2.4rem, 44rem); margin-inline: auto; }
.sn-run--read { width: min(100% - 2.4rem, 58rem); margin-inline: auto; }
.sn-run--read .sn-column { max-width: 70ch; }

.sn-skip { position: absolute; left: -9999px; }
.sn-skip:focus { left: 1rem; top: 1rem; position: fixed; z-index: 20; background: var(--paper-raised); padding: 0.7rem 1rem; border: 2px solid var(--alum); }

/* --- masthead -------------------------------------------------------- */
.sn-masthead { border-bottom: 1px solid var(--rule); background: var(--paper-raised); }
.sn-menu { position: relative; }
.sn-masthead__row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 1.05rem 0 0.9rem; flex-wrap: wrap; }
.sn-wordmark { font-family: var(--serif); font-size: 1.45rem; text-decoration: none; color: var(--ink); line-height: 1.1; }
.sn-wordmark span { display: block; font-family: var(--marker); font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-soft); margin-top: 0.35rem; }

.sn-menu { border: 0; }
.sn-menu__check { position: absolute; width: 1px; height: 1px; opacity: 0; }
.sn-menu__button { display: inline-block; font-family: var(--marker); font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink); cursor: pointer; padding: 0.5rem 0.85rem; border: 1px solid var(--rule-strong); background: var(--paper); }
.sn-menu__word { display: inline-block; line-height: 1; }
.sn-menu__check:focus-visible + .sn-menu__button { outline: 2px solid var(--alum); outline-offset: 3px; }
.sn-menu__check:checked + .sn-menu__button { background: var(--paper-sunk); border-color: var(--alum); }
.sn-menu__panel { display: none; }
.sn-menu__check:checked ~ .sn-menu__panel { display: block; }
.sn-menu__list { list-style: none; margin: 0.8rem 0 0.4rem; padding: 0; display: grid; gap: 0.15rem; }
.sn-menu__list a { display: block; padding: 0.55rem 0; font-family: var(--marker); font-size: 0.86rem; letter-spacing: 0.09em; text-transform: uppercase; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--rule); }
.sn-menu__list a[aria-current="page"] { color: var(--alum); border-bottom-color: var(--alum); }

@media (min-width: 62rem) {
  .sn-menu__button, .sn-menu__check { display: none; }
  .sn-menu__panel, .sn-menu__check:checked ~ .sn-menu__panel { display: block; }
  .sn-menu__list { display: flex; gap: 1.5rem; margin: 0; }
  .sn-menu__list a { border-bottom: 0; padding: 0.2rem 0; font-size: 0.79rem; }
  .sn-menu__list a[aria-current="page"] { box-shadow: inset 0 -2px 0 0 var(--alum); }
}

/* --- hero ------------------------------------------------------------ */
.sn-tideline { position: relative; background: var(--band); }
.sn-tideline__vue { width: 100%; height: clamp(300px, 46vw, 560px); object-fit: cover; opacity: 0.62; }
.sn-tideline__plate { position: absolute; inset: 0; display: flex; align-items: flex-end; }
.sn-tideline__inner { padding: 1.6rem 0 2rem; max-width: 46rem; color: #f4f8f9; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6); }
.sn-tideline__inner h1 { color: #ffffff; margin-bottom: 0.45rem; }
.sn-tideline__deck { font-size: 1.03rem; margin: 0; max-width: 44rem; }
.sn-tideline__band { font-family: var(--marker); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; margin: 0 0 0.7rem; color: #cfe0da; }

@media (max-width: 48rem) {
  .sn-tideline__plate { position: static; background: var(--band); }
  .sn-tideline__vue { height: 240px; opacity: 0.85; }
  .sn-tideline__inner { padding: 1.3rem 0 1.6rem; }
}

/* --- bands (sections) ------------------------------------------------ */
.sn-band { padding: 3rem 0 2.4rem; }
.sn-band--sunk { background: var(--paper-sunk); }
.sn-band__head { display: flex; align-items: baseline; gap: 1rem; border-bottom: 2px solid var(--ink); padding-bottom: 0.5rem; margin-bottom: 0.9rem; flex-wrap: wrap; }
.sn-band__head h2 { margin: 0; }
.sn-band__count { font-family: var(--marker); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--alum); }
.sn-band__note { color: var(--ink-soft); max-width: 52rem; }

.sn-marker { font-family: var(--marker); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--alum); margin: 0 0 0.6rem; }

/* --- section cards --------------------------------------------------- */
.sn-cards { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; gap: 1.7rem; }
@media (min-width: 46rem) { .sn-cards { grid-template-columns: repeat(2, 1fr); gap: 2rem 2.2rem; } }
.sn-card { display: flex; flex-direction: column; }
.sn-card__frame { background: var(--paper-sunk); border: 1px solid var(--rule); }
.sn-card__vue { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.sn-card__title { margin: 0.85rem 0 0.35rem; }
.sn-card__title a { text-decoration: none; color: var(--ink); box-shadow: inset 0 -1px 0 0 var(--rule-strong); }
.sn-card__title a:hover { color: var(--alum); box-shadow: inset 0 -1px 0 0 var(--alum); }
.sn-card__note { color: var(--ink-soft); margin: 0; }

/* --- ledger (dated list with large thumbnails) ----------------------- */
.sn-ledger { list-style: none; margin: 1.4rem 0 0; padding: 0; }
.sn-entry { display: grid; gap: 0.9rem; padding: 1.5rem 0; border-top: 1px solid var(--rule); }
.sn-entry:first-child { border-top: 2px solid var(--ink); }
.sn-entry__frame { background: var(--paper-sunk); border: 1px solid var(--rule); }
.sn-entry__vue { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.sn-entry__day { font-family: var(--marker); font-size: 0.7rem; letter-spacing: 0.17em; text-transform: uppercase; color: var(--alum); margin: 0 0 0.4rem; }
.sn-entry h3 { margin: 0 0 0.4rem; }
.sn-entry h3 a { text-decoration: none; color: var(--ink); box-shadow: inset 0 -1px 0 0 var(--rule-strong); }
.sn-entry h3 a:hover { color: var(--alum); box-shadow: inset 0 -1px 0 0 var(--alum); }
.sn-entry__note { margin: 0; color: var(--ink-soft); }

@media (min-width: 52rem) {
  .sn-entry { grid-template-columns: minmax(0, 32fr) minmax(0, 68fr); gap: 1.8rem; align-items: start; }
}

/* --- article --------------------------------------------------------- */
.sn-fil { margin: 1.2rem 0 0; font-family: var(--marker); font-size: 0.72rem; letter-spacing: 0.13em; text-transform: uppercase; }
.sn-fil ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0; padding: 0; color: var(--ink-soft); }
.sn-fil li + li::before { content: "› "; color: var(--rule-strong); }
.sn-fil a { color: var(--ink-soft); text-decoration: none; box-shadow: inset 0 -1px 0 0 var(--rule); }
.sn-fil a:hover { color: var(--alum); }
.sn-fil [aria-current="page"] { color: var(--ink); }

.sn-opening { padding: 1.4rem 0 1.5rem; }
.sn-opening h1 { max-width: 20ch; }
.sn-opening__deck { font-size: 1.14rem; color: var(--ink-soft); max-width: 56ch; margin: 0 0 1rem; }
.sn-stamps { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem 1.3rem; margin: 0; padding: 0.7rem 0 0; border-top: 1px solid var(--rule); font-family: var(--marker); font-size: 0.73rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-soft); }
.sn-stamps a { color: var(--ink-soft); }

.sn-plate { margin: 0 0 1.8rem; }
.sn-plate__vue { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--rule); background: var(--paper-sunk); }

.sn-column { max-width: 66ch; }
.sn-column h2 { margin-top: 2.1rem; padding-top: 0.3rem; border-top: 1px solid var(--rule); }
.sn-column h3 { margin-top: 1.5rem; }
.sn-column ul, .sn-column ol { padding-left: 1.25rem; margin: 0 0 1.1em; }
.sn-column li { margin-bottom: 0.4rem; }
.sn-column blockquote { margin: 1.4rem 0; padding-left: 1.1rem; border-left: 3px solid var(--kelp); color: var(--ink-soft); font-style: italic; }
.sn-column strong { color: var(--kelp-deep); }

.sn-table { overflow-x: auto; margin: 1.4rem 0; border: 1px solid var(--rule); }
.sn-table table { border-collapse: collapse; width: 100%; min-width: 30rem; font-size: 0.95rem; }
.sn-table th, .sn-table td { text-align: left; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--rule); }
.sn-table th { background: var(--paper-sunk); font-family: var(--marker); font-size: 0.74rem; letter-spacing: 0.11em; text-transform: uppercase; }

.sn-sources { margin: 2.4rem 0 0; padding: 1.1rem 1.2rem; background: var(--paper-raised); border-left: 3px solid var(--alum); }
.sn-sources h2 { margin: 0 0 0.5rem; border: 0; padding: 0; font-size: 1.1rem; }
.sn-sources ul { list-style: none; margin: 0; padding: 0; font-size: 0.94rem; }
.sn-sources li { margin-bottom: 0.35rem; }

.sn-next { margin: 2.4rem 0 0; padding-top: 1rem; border-top: 2px solid var(--ink); }
.sn-next h2 { margin: 0 0 0.6rem; border: 0; padding: 0; font-size: 1.2rem; }
.sn-next ul { list-style: none; margin: 0; padding: 0; }
.sn-next li { margin-bottom: 0.5rem; }

/* --- scarp separator -------------------------------------------------- */
.sn-scarp { border: 0; height: 0; border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule); margin: 0; }

/* --- staith (footer) -------------------------------------------------- */
.sn-staith { margin-top: 3rem; background: var(--band); color: #d3dedf; padding: 2.4rem 0 1.4rem; }
.sn-staith__row { display: grid; gap: 1.8rem; }
@media (min-width: 46rem) { .sn-staith__row { grid-template-columns: repeat(3, 1fr); } }
.sn-staith h2 { font-family: var(--marker); font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase; color: #8fb3a5; margin: 0 0 0.7rem; }
.sn-staith ul { list-style: none; margin: 0; padding: 0; }
.sn-staith li { margin-bottom: 0.4rem; }
.sn-staith a { color: #e4ebec; text-decoration: none; box-shadow: inset 0 -1px 0 0 #3d4f4a; }
.sn-staith a:hover { color: #f0b48c; }
.sn-staith p { color: #9fb1b2; margin: 0 0 0.6rem; }
.sn-staith__base { margin-top: 1.8rem; padding-top: 1rem; border-top: 1px solid #2b3a3c; font-family: var(--marker); font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; color: #819496; }

@media print {
  .sn-masthead, .sn-staith, .sn-menu { display: none; }
  body { background: #fff; color: #000; }
}
