/* World of Shrimp: light, calm and easy to read. */

@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --bg: #ffffff;
  --text: #1f2933;
  --muted: #52606d;
  --line: #e4e7eb;
  --panel: #f2f7f6;
  --accent: #0b6e6e;
  --accent-hover: #084f4f;
  --warm: #d9482b;
  --serif: "Newsreader", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.7;
}

@media (min-width: 600px) {
  body { font-size: 19px; }
}

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

a { color: var(--accent); text-decoration: underline; text-underline-offset: .15em; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; color: var(--text); }
h1 { font-size: clamp(34px, 6vw, 46px); margin: 0 0 .4em; }
h2 { font-size: clamp(27px, 4vw, 32px); margin: 2.2em 0 .6em; }
h3 { font-size: 23px; font-weight: 500; margin: 1.8em 0 .4em; }

p, ul, ol { margin: 0 0 1.1em; }
li { margin-bottom: .4em; }
strong { font-weight: 650; }


.skip-link { position: absolute; z-index: 30; left: 16px; top: -100px; padding: 10px 16px; background: var(--text); color: #fff; }
.skip-link:focus { top: 8px; }

/* Layout */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; padding-top: 8px; padding-bottom: 8px; }

.wordmark { display: inline-block; padding: 7px 0; font-family: var(--serif); font-size: 26px; font-weight: 600; line-height: 1.2; color: var(--text); text-decoration: none; }
.wordmark em, .home-title em { font-style: italic; font-weight: 400; }
.wordmark:hover { color: var(--accent); }
.wordmark img { display: inline-block; width: 52px; height: auto; margin: -4px 10px 0 0; vertical-align: middle; }

@media (max-width: 420px) {
  .wordmark { font-size: 22px; padding: 9px 0; }
  .wordmark img { width: 40px; margin-right: 8px; }
  .site-header .menu-open { padding: 0 12px; }
}
@media (max-width: 340px) {
  .wordmark { font-size: 20px; padding: 10px 0; }
  .wordmark img { width: 34px; }
}

/* Menu: dropdowns on wide screens (1060px and up), a full-screen menu on phones and tablets (HTML popover, no JavaScript) */
.site-nav { position: static; inset: auto; width: auto; height: auto; overflow: visible; margin: 0; padding: 0; border: 0; color: inherit; background: none; } /* undo popover defaults */
.nav-list, .dd-menu { margin: 0; padding: 0; list-style: none; }
.nav-list li { margin: 0; }
.site-nav a { display: flex; align-items: center; min-height: 44px; color: var(--text); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent); text-decoration: underline; }
.nav-list > li > a { font-weight: 600; }

.menu-open, .menu-close { display: none; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.menu-open:hover, .menu-close:hover { border-color: var(--accent); color: var(--accent); }

@supports selector(:popover-open) {
  @media (max-width: 1059px) {
    .menu-open, .menu-close { display: inline-flex; }
  }
}

@media (max-width: 1059px) {
  .site-nav:popover-open { position: fixed; inset: 0; overflow: auto; padding: 12px 20px 32px; background: var(--bg); }
  .menu-close { display: flex; margin: 0 0 8px auto; }
  .nav-list > li { padding: 4px 0 8px; border-bottom: 1px solid var(--line); }
  .nav-list > li > a { font-family: var(--serif); font-size: 23px; }
  .dd-menu a { padding-left: 16px; }
}

@media (min-width: 1060px) {
  .site-nav { display: block; }
  .nav-list { display: flex; gap: 4px; }
  .nav-list > li { position: relative; }
  .nav-list > li > a { padding: 0 12px; }
  .dd > a::after { content: "\25BE"; margin-left: 6px; font-size: .8em; }
  .dd-menu { display: none; position: absolute; top: 100%; left: 0; z-index: 10; min-width: 260px; padding: 8px 0; background: var(--bg); border: 1px solid var(--line); border-radius: 4px; }
  .dd-end .dd-menu { left: auto; right: 0; }
  .dd:hover .dd-menu, .dd:focus-within .dd-menu { display: block; }
  .dd-menu a { padding: 4px 16px; line-height: 1.4; }
}


/* Home hero */
.hero { display: grid; gap: 32px; padding: 40px 0 16px; }
.home-title { font-size: clamp(56px, 11vw, 96px); line-height: .98; letter-spacing: -.01em; margin: 0 0 .3em; }
.hero-sub { font-size: 22px; line-height: 1.5; margin-bottom: .6em; }
.button { display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px; border-radius: 4px; background: var(--accent); color: #fff; font-weight: 600; text-decoration: none; }
.button:hover { background: var(--accent-hover); color: #fff; }
.hero figure { margin: 0; }
.hero img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }

@media (min-width: 860px) {
  .hero { grid-template-columns: 1.05fr 1fr; align-items: center; gap: 56px; padding: 64px 0 24px; }
}

/* Home sections */
.home-section { padding-top: 24px; }
.home-section > h2 { margin-top: 1.6em; }
.home-section > p { max-width: 40em; }

.features { display: grid; margin: 0; padding: 0; list-style: none; }
.features li { margin: 0; padding: 20px 0; border-top: 1px solid var(--line); }
.features h3 { margin: 0 0 .3em; }
.features p { margin: 0; }

@media (min-width: 760px) {
  .features { grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .features li { border-top: 0; padding: 24px 28px; }
  .features li + li { border-left: 1px solid var(--line); }
  .features li:first-child { padding-left: 0; }
}

/* Guide lists (home "Start here" and guides.html) */
.guide-list { margin: 0 0 1em; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.guide-list li { display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: start; margin: 0; padding: 20px 0; border-bottom: 1px solid var(--line); }
.guide-list img { width: 96px; height: 66px; object-fit: cover; border-radius: 4px; }
.guide-list a { display: inline-block; padding: 7px 0; font-family: var(--serif); font-size: 22px; font-weight: 500; line-height: 1.3; }
.guide-list p { margin: 0; }

@media (min-width: 600px) {
  .guide-list li { grid-template-columns: 160px 1fr; gap: 24px; }
  .guide-list img { width: 160px; height: 110px; }
  .guide-list a { font-size: 24px; }
}

.more-link a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

/* Pages and guides */
.page { padding-top: 32px; padding-bottom: 16px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; margin: 0 0 8px; padding: 0; list-style: none; font-size: 16px; }
.breadcrumb li { margin: 0; }
.breadcrumb li + li::before { content: "/"; margin: 0 8px; color: var(--muted); }
.breadcrumb a { display: inline-flex; align-items: center; min-height: 44px; }

.published { color: var(--muted); font-size: 16px; margin-bottom: 24px; }
.lead { font-size: 21px; line-height: 1.6; }

figure { margin: 32px 0; }
figure img { border-radius: 4px; }
figcaption { margin-top: 8px; color: var(--muted); font-size: 15px; line-height: 1.5; }
figcaption a { color: var(--muted); }
figcaption a:hover { color: var(--accent-hover); }
.page-hero { margin-top: 0; }

.quick { margin: 32px 0; padding: 20px 24px; background: var(--panel); border-radius: 4px; }
.quick-label { margin: 0 0 .4em; color: var(--warm); font-size: 19px; font-weight: 700; }
.quick ul { padding-left: 1.2em; }
.quick > :last-child { margin-bottom: 0; }

.toc { margin: 32px 0; padding: 4px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.toc summary { display: list-item; min-height: 44px; padding: 8px 0; cursor: pointer; font-family: var(--serif); font-size: 22px; font-weight: 600; line-height: 1.3; }
.toc ol { margin: 0 0 12px; padding-left: 1.4em; }
.toc li { margin: 0; }
.toc a { display: inline-block; padding: 7px 0; }

.steps > li { margin-bottom: .9em; padding-left: .2em; }

.table-wrap { margin: 24px 0 28px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 17px; line-height: 1.5; }
th, td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { background: var(--panel); font-weight: 650; }
tbody th { font-weight: 650; }

.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary { min-height: 44px; padding: 12px 0; cursor: pointer; font-weight: 650; }
.faq details p { margin: 0 0 1em; }

.sources { font-size: 17px; padding-left: 1.4em; }
.sources li { margin-bottom: .2em; overflow-wrap: anywhere; }
.sources a { display: inline-block; padding: 8px 0; }

.keep-reading { padding-left: 1.2em; }
.keep-reading a { display: inline-block; padding: 7px 0; }

.byline { display: flex; align-items: center; gap: 14px; margin-top: 40px; padding: 12px 20px; background: var(--panel); border-radius: 4px; }
.byline img { flex: none; width: 52px; height: auto; }
.byline p { margin: 0; }
.byline a { display: inline-block; padding: 9px 0; }

.credits-table td, .credits-table th { overflow-wrap: anywhere; }

/* Footer */
.site-footer { margin-top: 64px; padding: 32px 0 24px; background: var(--panel); border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; }
.footer-brand { grid-column: 1 / -1; }
.footer-brand p { margin: 0 0 8px; color: var(--muted); font-size: 16px; }
.footer-col h2 { margin: 8px 0 4px; font-size: 19px; }
.footer-col ul { margin: 0; padding: 0; list-style: none; }
.footer-col li { margin: 0; }
.footer-col a { display: flex; align-items: center; min-height: 44px; }
.footer-bottom { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.footer-bottom p { margin: 0; color: var(--muted); font-size: 16px; }
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  .footer-brand { grid-column: auto; }
}

/* Wide screens: the "In this guide" list is always open (where the browser supports it) */
@supports selector(::details-content) {
  @media (min-width: 820px) {
    .toc details::details-content { content-visibility: visible; }
    .toc summary { list-style: none; pointer-events: none; cursor: default; }
    .toc summary::-webkit-details-marker { display: none; }
  }
}

/* Phones and tablets: the header with the Menu button stays at the top */
@media (max-width: 1059px) {
  .site-header { position: sticky; top: 0; z-index: 20; background: var(--bg); }
  [id] { scroll-margin-top: 76px; }
}

/* Phones */
@media (max-width: 819px) {
  .page { padding-top: 20px; }
}

@media (max-width: 599px) {
  /* Tables stack: one block per row, each value with its column name */
  .table-wrap { overflow: visible; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap th, .table-wrap td { display: block; width: auto; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .table-wrap tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .table-wrap tr:first-child { border-top: 1px solid var(--line); }
  .table-wrap th, .table-wrap td { padding: 2px 0; border: 0; }
  .table-wrap tbody th { margin-bottom: 4px; font-size: 18px; }
  .table-wrap td[data-label]::before { content: attr(data-label) ": "; font-weight: 650; }
}

/* Small topic label above headings */
.kicker { margin: 0 0 4px; color: var(--accent); font-size: 16px; font-weight: 700; line-height: 1.4; }
.kicker a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.kicker a:hover { text-decoration: underline; }

/* Full-width soft band on the homepage */
.band { margin-top: 56px; padding: 32px 0; background: var(--panel); }
.band h2 { margin-top: 0; }
.band p { max-width: 40em; }

/* Quick numbers */
.numbers { display: grid; grid-template-columns: repeat(2, 1fr); margin: 20px 0; }
.numbers div { padding: 12px 16px 12px 0; border-top: 1px solid var(--line); }
.numbers dt { font-size: 16px; font-weight: 600; }
.numbers dd { margin: 0; font-family: var(--serif); font-size: 26px; font-weight: 600; line-height: 1.25; }
@media (max-width: 420px) { .numbers dd { font-size: 23px; } }

@media (min-width: 760px) {
  .numbers { grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); }
  .numbers div { border-top: 0; padding: 16px 16px 4px 0; }
  .numbers div + div { padding-left: 16px; border-left: 1px solid var(--line); }
}

/* Topic hub on the homepage */
.topic-hub { display: grid; margin: 20px 0 0; padding: 0; list-style: none; }
.topic-hub > li { margin: 0; padding: 12px 0; border-top: 1px solid var(--line); }
.topic-hub h3 { margin: 0; }
.topic-hub h3 a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); text-decoration: none; }
.topic-hub h3 a:hover { color: var(--accent); text-decoration: underline; }
.topic-hub ul { margin: 0; padding: 0; list-style: none; }
.topic-hub ul li { margin: 0; }
.topic-hub ul a { display: flex; align-items: center; min-height: 44px; line-height: 1.35; }

@media (min-width: 760px) {
  .topic-hub { grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .topic-hub > li { border-top: 0; padding: 16px 20px 16px 0; }
  .topic-hub > li + li { padding-left: 20px; border-left: 1px solid var(--line); }
}

/* Blog posts: rows on phones, three columns on the homepage on wide screens */
.post-date { margin: 0; color: var(--muted); font-size: 15px; }
.post-cols { display: grid; margin: 20px 0 8px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.post-cols li { display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: start; margin: 0; padding: 20px 0; border-bottom: 1px solid var(--line); }
.post-cols img { width: 96px; height: 66px; object-fit: cover; border-radius: 4px; }
.post-cols a { display: inline-block; padding: 8px 0; font-family: var(--serif); font-size: 22px; font-weight: 500; line-height: 1.3; }
.post-cols p { margin: 0; }

@media (min-width: 760px) {
  .post-cols { grid-template-columns: repeat(3, 1fr); gap: 32px; border-top: 0; }
  .post-cols li { display: block; padding: 0; border-bottom: 0; }
  .post-cols img { width: 100%; height: auto; aspect-ratio: 3 / 2; margin-bottom: 12px; }
}

/* "From our tank": a short note from the site's own tank. Text in [brackets] is a placeholder to fill in. */
.from-our-tank { margin: 32px 0; padding: 16px 20px; background: var(--bg); border: 1px solid var(--line); border-radius: 4px; }
.from-our-tank-label { display: flex; align-items: center; gap: 10px; margin: 0 0 .4em; color: var(--accent); font-size: 19px; font-weight: 700; }
.from-our-tank-label img { flex: none; width: 32px; height: auto; }
.from-our-tank > :last-child { margin-bottom: 0; }
