/* ============================================================
   tidewater — coastal literary journal
   Shell paper, deep-sea ink, teal + coral accents. Huge airy
   whitespace, thin horizon rules, wave-crest dividers, tide-table
   datatables, pull quotes set like margin notes.
   All colors/fonts/sizing live in :root — factory overrides
   them in site.css.
   ============================================================ */

:root {
  --paper: #f6f6f2;           /* shell */
  --ink: #14232e;             /* deep sea ink */
  --muted: #64727c;           /* harbour grey */
  --accent: #0f6f6a;          /* teal */
  --accent2: #c96f4a;         /* coral */
  --font-head: "Spectral", "Iowan Old Style", Palatino, Georgia, serif;
  --font-body: "Nunito Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --radius: 10px;
  --maxw: 44rem;

  --tidewater-horizon: #d8dcd3;    /* hairline rule */
  --tidewater-wash: #edefe9;       /* pale panel wash */
  --tidewater-foam: #e6ebe9;       /* slightly cooler wash */
  --tidewater-wide: 68rem;         /* outer measure */
  --tidewater-mint-bg: #e1efe9;
  --tidewater-mint-ink: #1d5c4f;
  --tidewater-lav-bg: #e9e7f2;
  --tidewater-lav-ink: #59527a;
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body, "Helvetica Neue", Arial, sans-serif);
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
  transition: color 180ms ease, text-decoration-color 180ms ease;
}
a:hover { text-decoration-color: var(--accent); }

h1, h2, h3, h4 {
  font-family: var(--font-head, Georgia, serif);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: 0.005em;
  color: var(--ink);
  margin: 0 0 0.6em;
}

::selection { background: var(--accent); color: var(--paper); }

/* ---------- header: tide-head ---------- */

.tide-head {
  max-width: var(--tidewater-wide);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0;
}

.tide-head-band {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--tidewater-horizon);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.tide-identity {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.4rem 1.6rem;
  padding: 2.6rem 0 2.2rem;
}

.tide-name {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-head, Georgia, serif);
  font-weight: 400;
  font-size: clamp(2.3rem, 5.6vw, 3.7rem);
  line-height: 1.04;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
}
.tide-name:hover { color: var(--accent); }

.tide-mark {
  flex: none;
  width: 2.6rem;
  height: auto;
  color: var(--accent);
  transform: translateY(-0.1em);
}

.tide-strap {
  margin: 0;
  font-style: italic;
  font-size: 0.98rem;
  color: var(--muted);
}

.tide-nav { padding: 0.7rem 0 0.9rem; border-top: 1px solid var(--tidewater-horizon); }

.tide-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.5rem;
}

.tide-nav-list a {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 0.15em;
  transition: border-color 180ms ease, color 180ms ease;
}
.tide-nav-list a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- layout ---------- */

.basin {
  max-width: var(--tidewater-wide);
  margin: 0 auto;
  padding: 2.8rem 1.5rem 3.6rem;
}

.piece { max-width: var(--maxw); margin: 0 auto; }

/* ---------- swell divider (wave crests) ---------- */

.swell {
  display: flex;
  justify-content: center;
  margin: 3rem auto;
  max-width: var(--maxw);
  color: var(--accent);
}

.swell-art { width: 11rem; height: auto; display: block; }

/* ---------- placards, eyebrows, tidemarks ---------- */

.piece-eyebrow { margin: 0 0 1.1rem; }

.placard {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: 999px;
  padding: 0.34em 1.1em 0.28em;
  background: transparent;
}

.placard-quiet {
  font-size: 0.64rem;
  color: var(--muted);
  border-color: var(--tidewater-horizon);
}

.tidemark {
  display: inline-block;
  width: 0.72em;
  height: 0.72em;
  border-radius: 50%;
  border: 1.5px solid var(--tidewater-horizon);
  background: var(--paper);
}
.stamp-mint .tidemark { background: var(--tidewater-mint-bg); border-color: var(--tidewater-mint-ink); }
.stamp-lav  .tidemark { background: var(--tidewater-lav-bg);  border-color: var(--tidewater-lav-ink); }

/* ---------- article head ---------- */

.piece-head { margin-bottom: 2.6rem; }

.piece-title {
  font-weight: 400;
  font-size: clamp(2rem, 4.6vw, 3.05rem);
  line-height: 1.12;
  margin: 0.4em 0 0.5em;
}

.tideline {
  font-family: var(--font-head, Georgia, serif);
  font-size: 1.24rem;
  line-height: 1.5;
  color: var(--muted);
  max-width: 38rem;
  margin: 0 0 1.5rem;
}

.tidecredit {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.9rem;
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.tidecredit-name {
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.76rem;
  color: var(--ink);
}

.creditline-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent2);
  align-self: center;
  flex: none;
}

.creditline-minutes { font-style: italic; }

.piece-horizon {
  position: relative;
  height: 1px;
  background: var(--tidewater-horizon);
  margin: 1.8rem 0 0;
}
.piece-horizon::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1.5px;
  width: 3.6rem;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
}

/* ---------- body copy ---------- */

.piece p { margin: 0 0 1.45em; }

.piece h2 {
  font-weight: 600;
  font-size: 1.6rem;
  margin: 2.4em 0 0.6em;
  padding-top: 1.2em;
  border-top: 1px solid var(--tidewater-horizon);
}
.piece h2::before {
  content: "≈";
  color: var(--accent);
  margin-right: 0.5em;
  font-weight: 400;
}

.piece h3 { font-size: 1.22rem; margin: 1.9em 0 0.5em; }

.piece ul, .piece ol { margin: 0 0 1.45em; padding-left: 1.5em; }
.piece li { margin-bottom: 0.45em; }

.piece blockquote {
  margin: 2em 0;
  padding: 0.3em 0 0.3em 1.5em;
  border-left: 2px solid var(--accent2);
  font-style: italic;
  color: var(--muted);
}

.piece a { text-underline-offset: 0.22em; }

/* ---------- fragment: ledegraf (answer-first) ---------- */

.ledegraf {
  font-size: 1.15rem;
  line-height: 1.7;
  padding: 1.35rem 1.5rem;
  background: var(--tidewater-wash);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 0 0 2em;
}

/* ---------- fragment: datatable (tide table) ---------- */

.datatable {
  width: 100%;
  border-collapse: collapse;
  margin: 1.8em 0 2.2em;
  font-size: 0.92rem;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
}

.datatable caption {
  caption-side: top;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  padding: 0 0 0.8em;
}

.datatable th {
  font-family: var(--font-head, Georgia, serif);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: left;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 0.6em 1em 0.55em 0;
}

.datatable td {
  padding: 0.6em 1em 0.6em 0;
  border-bottom: 1px solid var(--tidewater-horizon);
  vertical-align: top;
}

.datatable tbody tr:nth-child(even) td { background: var(--tidewater-foam); }
.datatable tbody tr:last-child td { border-bottom: 0; }

/* ---------- fragment: faqblock ---------- */

.faqblock {
  margin: 2.4em 0;
  border-top: 1.5px solid var(--ink);
  padding-top: 0.2em;
}

.faqblock h2 {
  border-top: 0;
  padding-top: 0.5em;
  margin-top: 0.5em;
}
.faqblock h2::before { content: none; }

.faqblock details { border-bottom: 1px solid var(--tidewater-horizon); }

.faqblock summary {
  cursor: pointer;
  font-family: var(--font-head, Georgia, serif);
  font-weight: 600;
  font-size: 1.08rem;
  line-height: 1.45;
  list-style: none;
  padding: 0.85em 2.2em 0.85em 0;
  position: relative;
  transition: color 180ms ease;
}
.faqblock summary::-webkit-details-marker { display: none; }
.faqblock summary::after {
  content: "+";
  position: absolute;
  right: 0.2em;
  top: 0.72em;
  font-family: var(--font-body, Arial, sans-serif);
  font-weight: 400;
  font-size: 1.3em;
  line-height: 1;
  color: var(--accent);
  transition: transform 220ms ease;
}
.faqblock details[open] summary::after { transform: rotate(45deg); }
.faqblock summary:hover { color: var(--accent); }

.faqblock details p { margin: 0 0 1.1em; }

/* ---------- fragment: pullquote (margin note) ---------- */

.pullquote {
  font-family: var(--font-head, Georgia, serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--accent);
  padding: 0.9em 0 0;
  border-top: 2px solid var(--accent);
  margin: 2.4em 0;
}

.pullquote::after {
  content: "≈";
  display: block;
  margin-top: 0.7em;
  font-size: 0.9rem;
  line-height: 1;
  color: var(--accent2);
}

@media (min-width: 1200px) {
  .pullquote {
    float: left;
    clear: left;
    width: 14.5rem;
    margin: 0.5em 2.2em 1.4em -11.5rem;
  }
}

/* ---------- article footer ---------- */

.piece-foot { margin-top: 0.6rem; }
.piece-foot .swell { margin-bottom: 1.6rem; }

.piece-foot-note {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}

/* ---------- homepage: opening ---------- */

.opening {
  max-width: var(--maxw);
  margin: 0 auto 0.5rem;
}

.opening-eyebrow { margin: 0 0 1.1rem; }

.opening-title {
  font-weight: 400;
  font-size: clamp(2rem, 4.8vw, 3.1rem);
  line-height: 1.12;
  margin: 0.4em 0 0.55em;
}

.opening-blurb {
  font-family: var(--font-head, Georgia, serif);
  font-size: 1.26rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 1.7em;
}

.opening p { margin: 0 0 1.45em; }

/* ---------- homepage: currents (section teasers) ---------- */

.currents {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.6rem;
  max-width: var(--tidewater-wide);
  margin: 0 auto;
}

.current {
  border-top: 1.5px solid var(--ink);
  padding-top: 1.3rem;
  position: relative;
}
.current::before {
  content: "";
  position: absolute;
  left: 0;
  top: -3px;
  width: 2.2rem;
  height: 4px;
  border-radius: 2px;
  background: var(--accent);
}
.current:nth-child(2)::before { background: var(--accent2); }

.current-head {
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 0 0 0.8em;
}

.current p { font-size: 0.95rem; color: var(--muted); margin: 0; }

/* ---------- homepage: latest / driftline ---------- */

.driftline { max-width: var(--maxw); margin: 0 auto; }

.latest-head {
  font-weight: 400;
  font-size: clamp(1.7rem, 3.6vw, 2.3rem);
  margin: 0 0 0.3em;
}

/* ---------- homepage: promise ---------- */

.promise {
  max-width: var(--maxw);
  margin: 0 auto;
  border-top: 1px solid var(--tidewater-horizon);
  padding-top: 1.8rem;
}

.promise-head {
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 0 0 0.9em;
}
.promise p { color: var(--muted); margin: 0; }

/* ---------- story list / tidecards ---------- */

.storylist {
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
}

.tidecard {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1.8rem;
  padding: 1.7rem 0 1.6rem;
  border-top: 1px solid var(--tidewater-horizon);
}

.tidecard-when {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  padding-top: 0.35rem;
}

.tidecard-date {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.tidecard-title {
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.2;
  margin: 0 0 0.45em;
}
.tidecard-title a {
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 260ms ease, color 180ms ease;
}
.tidecard-title a:hover { color: var(--accent); background-size: 100% 1px; }

.tidecard-excerpt {
  margin: 0 0 0.75em;
  color: var(--muted);
  font-size: 0.99rem;
}

.tidecard-credit {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- static pages ---------- */

.tidepage { max-width: var(--maxw); margin: 0 auto; }
.tidepage p { margin: 0 0 1.45em; }

.adrift {
  text-align: left;
  border-top: 1px solid var(--tidewater-horizon);
  padding-top: 2.2rem;
  margin-top: 1rem;
}

/* ---------- footer: shoreline ---------- */

.shoreline { margin-top: 1rem; }

.shoreline-inner {
  max-width: var(--tidewater-wide);
  margin: 0 auto;
  padding: 0 1.5rem 2.8rem;
}

.shoreline .swell { margin: 0 auto 2.2rem; max-width: none; }

.shoreline-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.4rem 3rem;
  padding-top: 0.4rem;
}

.shoreline-name {
  font-family: var(--font-head, Georgia, serif);
  font-weight: 600;
  font-size: 1.35rem;
  margin: 0 0 0.25em;
}

.shoreline-strap {
  font-style: italic;
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

.shoreline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
}
.shoreline-links a {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 0.15em;
  transition: border-color 180ms ease, color 180ms ease;
}
.shoreline-links a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.shoreline-lang { margin: 0.7rem 0 0; font-size: 0.82rem; }
.shoreline-lang a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--tidewater-horizon);
}
.shoreline-lang a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.shoreline-copy {
  margin: 1.8rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--tidewater-horizon);
  font-size: 0.78rem;
  color: var(--muted);
}

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .currents { grid-template-columns: 1fr; gap: 1.8rem; }
}

@media (max-width: 720px) {
  .tidecard { grid-template-columns: 1fr; gap: 0.7rem; }
  .tidecard-when { flex-direction: row; align-items: center; gap: 0.7rem; padding-top: 0; }
  .tide-head-band { flex-direction: column; gap: 0.25rem; }
  .tide-identity { padding: 2rem 0 1.7rem; }
  .datatable { display: block; overflow-x: auto; }
  .shoreline-grid { flex-direction: column; }
}

/* ---------- motion & print ---------- */

@media (prefers-reduced-motion: reduce) {
  a, .tide-nav-list a, .shoreline-links a, .tidecard-title a,
  .faqblock summary, .faqblock summary::after { transition: none; }
}

@media print {
  body { background: #fff; font-size: 11pt; }
  .tide-nav, .shoreline-links, .shoreline-lang, .tidemark, .swell { display: none; }
  .ledegraf { background: none; border-left-color: #000; }
  .datatable { border-color: #000; }
  .datatable tbody tr:nth-child(even) td { background: none; }
  .pullquote { float: none; width: auto; margin: 2em 0; border-top-color: #000; color: #000; }
  a { color: #000; }
}
