/* Mobile first. One stylesheet, system fonts, no layout shift from webfonts. */

:root {
  --navy: #0f172a;
  --navy-deep: #0f172a;
  --ink: #0f172a;
  --muted: #334155;
  --paper: #f8fafc;
  --card: #ffffff;
  --line: #e2e8f0;
  --accent: #0f766e;
  --accent-hover: #115e59;
  --accent-bright: #0f766e;
  --flag-bg: #f0fdfa;
  --flag-ink: #115e59;
  --header: 4.25rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}

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

.wrap {
  width: min(68rem, calc(100% - 2rem));
  margin-inline: auto;
}

h1,
h2,
h3,
.site-name,
.footer-name {
  font-family: Georgia, "Iowan Old Style", Palatino, "Palatino Linotype", serif;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(2rem, 6vw, 3.25rem);
}

h2 {
  margin: 2.25rem 0 0.75rem;
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  scroll-margin-top: 5.5rem;
}

h3 {
  margin: 0 0 0.4rem;
  font-size: 1.3rem;
}

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

a {
  color: var(--accent);
}

a:visited {
  color: var(--accent);
}

a:hover {
  color: var(--accent-hover);
}

a:focus-visible,
summary:focus-visible,
.button:focus-visible {
  outline: 3px solid var(--accent-bright);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  background: #fff;
  color: var(--ink);
  padding: 0.5rem 0.75rem;
  z-index: 40;
  transform: translateY(-180%);
}

.skip:focus {
  transform: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--navy);
  color: #f8fafc;
  min-height: var(--header);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header);
}

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

.brand:visited {
  color: #f8fafc;
}

.logo {
  display: block;
  width: 32px;
  height: 32px;
  flex: none;
}

.site-name {
  font-size: 1.25rem;
  color: inherit;
}

.menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 0.85rem;
  color: #f8fafc;
  background: transparent;
  border: 1px solid rgba(248, 250, 252, 0.35);
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
}

.nav-toggle:focus-visible + .menu-button {
  outline: 3px solid #5eead4;
  outline-offset: 3px;
}

.nav-toggle:checked + .menu-button {
  background: rgba(255, 255, 255, 0.12);
}

.guides-menu summary::-webkit-details-marker {
  display: none;
}

.guides-menu summary::marker {
  content: "";
}

.guides-menu > summary {
  cursor: pointer;
}

.guides-menu > summary::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  margin-left: 0.4rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-0.12rem) rotate(45deg);
}

.primary {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.primary > a,
.guides-menu > summary {
  color: #f8fafc;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-weight: 600;
}

.primary a:visited {
  color: #f8fafc;
}

.primary a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.28em;
}

.guides-menu ul {
  list-style: none;
  margin: 0;
  padding: 0 0 0.5rem 0.85rem;
}

.guides-menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: #f8fafc;
  text-decoration: none;
}

@media (max-width: 879px) {
  .primary {
    display: none;
  }

  .nav-toggle:checked ~ .primary {
    display: flex;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 31;
    background: var(--navy-deep);
    padding: 0.4rem 1.25rem 1rem;
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.28);
  }
}

.hero {
  background: linear-gradient(165deg, var(--navy) 0%, #1e293b 100%);
  color: #f8fafc;
  padding: 3.25rem 0 3.5rem;
}

.hero h1,
.eyebrow,
.hero-lead {
  color: #f8fafc;
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5eead4;
}

.hero-lead {
  max-width: 40rem;
  margin: 0 0 1.4rem;
  font-size: 1.125rem;
  line-height: 1.6;
}

.hero .button {
  background: var(--accent);
  color: #fff;
}

.hero .button:visited {
  color: #fff;
}

.hero .button:hover {
  background: var(--accent-hover);
}

.hero .button:focus-visible {
  outline-color: #5eead4;
}

.lede {
  padding: 2rem 0 0.25rem;
}

.lede p {
  max-width: 42rem;
}

.draft-banner {
  margin: 0;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: #fff;
  text-align: center;
}

.todo-note,
.setup-todo {
  margin: 1rem 0;
  padding: 0.75rem 0.9rem;
  background: var(--flag-bg);
  color: var(--flag-ink);
  border-radius: 8px;
}

.guide-head {
  padding-top: 1.75rem;
}

.kicker,
.card-area,
.card-meta,
.byline {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.kicker {
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.disclaimer,
.callout.verify,
.author-box,
.rate-card,
.card,
.signup {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.disclaimer {
  border-left: 4px solid var(--navy);
  padding: 1rem 1.1rem;
  margin-top: 1rem;
  max-width: 42rem;
}

.disclaimer p,
.callout.verify p:first-child,
.author-box p:last-child,
.card p:last-child,
.signup p:last-child {
  margin-bottom: 0;
}

.callout.verify {
  border-left: 4px solid var(--accent-bright);
  background: var(--flag-bg);
  padding: 1rem 1.1rem;
  margin: 1.25rem 0;
}

.callout.verify p:first-child {
  margin-top: 0;
}

mark.verify {
  background: #ccfbf1;
  color: var(--flag-ink);
  font-weight: 700;
  padding: 0.05em 0.2em;
  border-radius: 4px;
}

.flag {
  color: var(--flag-ink);
}

.author-box {
  padding: 0.9rem 1.1rem;
  margin: 1rem 0;
  max-width: 42rem;
}

.author-name {
  margin: 0;
  font-weight: 700;
}

.updated {
  margin: 0.35rem 0 0;
  font-weight: 700;
  color: var(--muted);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.rate-card {
  padding: 1.15rem 1.15rem 1.25rem;
  margin-top: 1.5rem;
}

.rate-card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: baseline;
  justify-content: space-between;
}

.rate-card h2 {
  margin: 0;
}

.last-checked {
  margin: 0;
  font-weight: 700;
  color: var(--navy);
  background: #f0fdfa;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
}

.legend {
  padding-left: 1.15rem;
  color: var(--muted);
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 0.5rem;
}

table {
  width: 100%;
  min-width: 36rem;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}

tbody tr:nth-child(even) {
  background: #f1f5f9;
}

tr.is-unverified,
tr.is-unverified th,
tr.is-unverified td {
  background: var(--flag-bg);
}

tbody tr.is-unverified:nth-child(even),
tbody tr.is-unverified:nth-child(even) th,
tbody tr.is-unverified:nth-child(even) td {
  background: #ccfbf1;
}

thead th {
  background: var(--navy);
  color: #f8fafc;
  font-weight: 650;
  font-size: 0.92rem;
}

.source-line {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
}

.content > :is(h2, h3, p, ul, ol, .callout),
.page > :is(h1, h2, p, .callout, .author-box) {
  max-width: 42rem;
}

.content,
.page {
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.page {
  padding-top: 1.75rem;
  padding-bottom: 1rem;
}

.guide-list,
.hub-list {
  list-style: none;
  margin: 1rem 0 2rem;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  height: 100%;
  color: inherit;
  text-decoration: none;
  padding: 1.15rem 1.2rem 1.2rem;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.card:visited {
  color: inherit;
}

.card:hover,
.card:focus-visible {
  border-color: var(--navy);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.card-audience {
  margin: 0.15rem 0 0;
  font-weight: 700;
  color: var(--accent);
  font-size: 0.95rem;
}

.hub-card {
  justify-content: center;
  min-height: 4.5rem;
  font-family: Georgia, "Iowan Old Style", Palatino, serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.signup {
  margin: 2.5rem auto;
  padding: 1.25rem 1.3rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.6rem 1.15rem;
  background: var(--navy);
  color: #f8fafc;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
}

.button:visited,
.signup .button:visited {
  color: #f8fafc;
}

.button:hover {
  background: #1e293b;
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.45rem;
  list-style: none;
  margin: 0 0 0.85rem;
  padding: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.crumbs li {
  display: inline;
}

.crumbs a {
  text-decoration: none;
}

.related ul {
  padding-left: 1.15rem;
}

.ad-reserve {
  min-height: 100px;
  margin-block: 1.5rem;
}

.site-footer {
  background: var(--navy-deep);
  color: #e2e8f0;
  padding: 2.5rem 0 2.75rem;
  margin-top: 1rem;
}

.footer-inner {
  display: grid;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
}

.footer-name,
.tagline {
  margin: 0;
}

.footer-name {
  color: #f8fafc;
  font-size: 1.35rem;
}

.tagline {
  flex-basis: 100%;
  color: #5eead4;
  font-weight: 600;
}

.footer-disclaimer {
  font-weight: 700;
  color: #fff;
}

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

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
}

.site-footer .setup-todo {
  background: transparent;
  color: #f8fafc;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

code {
  font-size: 0.92em;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 720px) {
  .wrap {
    width: min(68rem, calc(100% - 3rem));
  }

  .guide-list,
  .hub-list {
    grid-template-columns: 1fr 1fr;
  }

  .hub-list {
    grid-template-columns: repeat(3, 1fr);
  }

  .ad-reserve {
    min-height: 250px;
  }

  .footer-inner {
    grid-template-columns: 16rem 1fr;
    align-items: start;
    gap: 2rem;
  }

  .tagline {
    flex-basis: auto;
  }
}

@media (min-width: 880px) {
  .menu-button {
    display: none;
  }

  .primary {
    display: flex;
    flex: none;
    flex-direction: row;
    align-items: center;
    gap: 0.25rem 1.35rem;
    position: static;
    background: transparent;
    padding: 0;
    box-shadow: none;
  }

  .guides-menu {
    position: relative;
  }

  .guides-menu ul {
    position: absolute;
    z-index: 32;
    top: calc(100% + 0.35rem);
    right: 0;
    min-width: 18rem;
    max-height: 70vh;
    overflow: auto;
    padding: 0.4rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
  }

  .guides-menu a,
  .guides-menu a:visited {
    color: var(--navy);
    padding: 0 0.75rem;
    border-radius: 8px;
  }

  .guides-menu a:hover {
    background: #f1f5f9;
  }
}
