/* Love of the Sea — one stylesheet, system fonts only, no external requests. */

:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #3d3d3d;
  --faint: #4a4a4a;
  --line: #111111;
  --fill: #000000;
  --on-fill: #ffffff;
  --placeholder-bg: #f4f4f4;
  --max-text: 40rem;
  --max-page: 66rem;
  --space: 1.25rem;
  --focus: 2px solid var(--fg);
  --radius: 0;
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}

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

a {
  color: var(--fg);
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -100px;
  z-index: 100;
  background: var(--fill);
  color: var(--on-fill);
  padding: 0.5rem 0.85rem;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
}

/* ----- Header ----- */

.site-header {
  border-bottom: 2px solid var(--line);
  background: var(--bg);
}

.header-inner,
.footer-inner,
.wrap,
.wrap-wide {
  width: 100%;
  margin: 0 auto;
  padding-left: var(--space);
  padding-right: var(--space);
}

.header-inner,
.footer-inner,
.wrap-wide {
  max-width: var(--max-page);
}

.wrap {
  max-width: var(--max-text);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  min-height: 4.25rem;
  flex-wrap: wrap;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
  min-height: 44px;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.brand-name {
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  line-height: 1;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.7rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  border-bottom-color: currentColor;
  text-decoration: none;
}

/* ----- Main ----- */

main {
  flex: 1 0 auto;
  padding: 2.5rem 0 4rem;
}

.kicker {
  margin: 0 0 0.7rem;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
}

h1,
h2,
h3 {
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4.5vw, 2.85rem);
}

h1 + .lede,
.hero .lede {
  margin-top: 0;
}

h2 {
  margin: 2.75rem 0 0.9rem;
  font-size: 1.4rem;
  padding-top: 0.25rem;
}

h3 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.12rem;
}

.lede {
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 1.5rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

.prose ul,
.prose ol,
.article-body ul,
.article-body ol {
  padding-left: 1.3rem;
}

.prose li + li,
.article-body li + li {
  margin-top: 0.35rem;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.25rem 0;
}

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

.factcheck {
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
}

/* ----- Pillars ----- */

.section-label {
  margin: 2.25rem 0 0.9rem;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.85rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.pillar {
  display: block;
  border: 1px solid var(--line);
  padding: 1.15rem 1.2rem 1.2rem;
  text-decoration: none;
  color: inherit;
  height: 100%;
  min-height: 44px;
}

.pillar:hover,
.pillar:focus-visible {
  background: var(--fill);
  color: var(--on-fill);
  text-decoration: none;
  outline-offset: 3px;
}

.pillar-num {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
  font-weight: 600;
}

.pillar-title {
  margin: 0 0 0.45rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  padding: 0;
}

.pillar p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.5;
}

/* ----- Posts list / coming soon ----- */

.post-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.post-list li + li {
  margin-top: 0.75rem;
}

.coming-soon {
  border: 1px dashed var(--line);
  padding: 1.1rem 1.2rem;
  color: var(--muted);
  margin: 0;
}

/* ----- Author / placeholders ----- */

.author-box {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  border: 1px solid var(--line);
  padding: 1.1rem 1.2rem;
  margin: 2.25rem 0 0;
}

.author-box img {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.author-box h2,
.author-box .author-name {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  letter-spacing: 0;
}

.author-box p {
  margin: 0 0 0.35rem;
  font-size: 0.98rem;
}

.author-box p:last-child {
  margin-bottom: 0;
}

.bird-fill {
  border: 1px dashed var(--line);
  background: var(--placeholder-bg);
  padding: 0.9rem 1rem;
  margin: 1rem 0;
}

.bird-fill > :last-child {
  margin-bottom: 0;
}

.bird-label {
  display: block;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.official-sources {
  margin: 2rem 0 0;
}

.disclaimer,
.fineprint {
  font-size: 0.92rem;
  color: var(--muted);
}

/* ----- Footer ----- */

.site-footer {
  background: var(--fill);
  color: var(--on-fill);
  padding: 2.25rem 0;
  margin-top: auto;
}

.site-footer a {
  color: var(--on-fill);
}

.site-footer :focus-visible {
  outline-color: var(--on-fill);
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem 2rem;
  flex-wrap: wrap;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  text-decoration: none;
  color: inherit;
  min-height: 44px;
}

.footer-logo:hover {
  text-decoration: none;
}

.footer-logo img {
  width: 36px;
  height: 36px;
}

.xkor-word {
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: lowercase;
  font-size: 1.05rem;
  line-height: 1;
  padding-right: 0.32em; /* optical balance for last letter-spacing */
}

.footer-copy {
  flex: 1 1 16rem;
}

.footer-copy p {
  margin: 0 0 0.35rem;
}

.footer-title {
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 0.2rem !important;
}

.footer-meta {
  margin-top: 0.85rem !important;
  font-size: 0.92rem;
}

/* ----- 404 ----- */

.page-404 h1 {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  letter-spacing: -0.04em;
}

/* ----- Article template ----- */

.article-header {
  margin-bottom: 1.75rem;
}

.article-body > * + * {
  margin-top: 1rem;
}

.article-body h2:first-child {
  margin-top: 0;
}

/* ----- Dark mode (monochrome invert; logos flipped to stay correct) ----- */

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --fg: #f3f3f3;
    --muted: #d0d0d0;
    --faint: #c8c8c8;
    --line: #f3f3f3;
    --fill: #ffffff;
    --on-fill: #000000;
    --placeholder-bg: #161616;
  }

  .brand-mark,
  .author-box img {
    filter: invert(1);
  }

  /* Footer stays black-on-black in dark mode would vanish; invert the bar. */
  .site-footer {
    background: #ffffff;
    color: #111111;
  }

  .site-footer a {
    color: #111111;
  }

  .site-footer :focus-visible {
    outline-color: #111111;
  }

  .footer-logo img {
    filter: invert(1);
  }
}

/* ----- Print ----- */

@media print {
  .skip-link,
  .site-nav {
    display: none;
  }

  .site-header,
  .site-footer {
    background: transparent;
    color: #000;
    border: 0;
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
  }

  .site-footer a,
  .site-footer {
    color: #000;
  }

  .brand-mark,
  .author-box img,
  .footer-logo img {
    filter: none;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    font-weight: 400;
  }

  body {
    background: #fff;
    color: #000;
  }
}
