:root {
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --color-page: #f9f9f8;
  --color-card: #ffffff;
  --color-footer: #f5f3f3;
  --color-text: #1f1f1f;
  --color-text-muted: #6b6b6b;
  --color-eyebrow: #5f5e5e;
  --color-nav: #5a4138;
  --color-line: #e9e8e7;
  --color-card-line: #eaeaea;
  --color-card-line-hover: #e0e0de;
  --color-saffron: #e8590c;
  --color-saffron-tint: #fff2eb;
  /* Darker than the design's #e8590c, which is only 3.6:1 against white; this is 4.8:1. */
  --color-saffron-text: #c54a0a;
  --color-saffron-text-hover: #a23a00;
  --color-on-saffron: #ffffff;
  --color-focus: #1f1f1f;

  --shadow-card: 0 1px 3px rgba(31, 31, 31, 0.04), 0 4px 12px rgba(31, 31, 31, 0.02);
  --shadow-card-hover: 0 4px 8px rgba(31, 31, 31, 0.06), 0 12px 24px rgba(31, 31, 31, 0.04);

  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-card: 1.25rem;
  --radius-full: 9999px;

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --gutter: 1rem;
  --page-max: 75rem;
  --measure: 48rem;
  --header-height: 4rem;
  --tap-min: 3rem;

  --size-mark: 2.25rem;
  --size-mark-icon: 1.25rem;
  --size-icon-lg: 3rem;
  --size-icon-md: 2.5rem;
  --size-icon-glyph-lg: 1.5rem;
  --size-icon-glyph-md: 1.25rem;
  --size-arrow: 0.875rem;

  --text-brand: 1.25rem;
  --lh-brand: 1.75rem;
  --text-nav: 0.8125rem;
  --text-small: 0.8125rem;
  --lh-small: 1.125rem;
  --text-body: 0.9375rem;
  --lh-body: 1.375rem;
  --text-body-lg: 1.0625rem;
  --lh-body-lg: 1.625rem;
  --text-lead: 1.125rem;
  --text-button: 1rem;
  --text-h1: 2.25rem;
  --text-h2: 1.375rem;
  --lh-h2: 1.875rem;
  --text-h3: 1.25rem;
  --lh-h3: 1.75rem;
  --track-h1: -0.025em;
  --track-h2: -0.01em;

  --section-pad: 3rem;
  --hero-pad: 4rem;
  --card-pad: 1.5rem;
  --grid-gap: 1.5rem;
}

@media (min-width: 40rem) {
  :root { --text-h1: 3rem; --text-lead: 1.25rem; }
}

@media (min-width: 48rem) {
  :root {
    --gutter: 2rem;
    --text-h1: 3.75rem;
    --text-h2: 1.75rem;
    --lh-h2: 2.25rem;
    --track-h2: -0.015em;
    --section-pad: 4rem;
    --hero-pad: 6rem;
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 7rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: var(--lh-body);
  color: var(--color-text);
  background: var(--color-page);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }

a { color: inherit; }

a:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

svg { flex-shrink: 0; }

.icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.container {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-header {
  background: var(--color-page);
  border-bottom: 1px solid var(--color-line);
}

.site-header .container {
  min-height: var(--header-height);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: var(--space-lg);
}

@media (min-width: 40rem) {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(249, 249, 248, 0.95);
    backdrop-filter: blur(4px);
  }
  html { scroll-padding-top: 5rem; }
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: var(--tap-min);
  font-size: var(--text-brand);
  line-height: var(--lh-brand);
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  width: var(--size-mark);
  height: var(--size-mark);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--color-saffron);
  color: var(--color-on-saffron);
}

.brand-mark svg { width: var(--size-mark-icon); height: var(--size-mark-icon); }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-lg);
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  font-size: var(--text-nav);
  font-weight: 500;
  color: var(--color-nav);
  text-decoration: none;
  transition: color 150ms;
}

.site-nav a:hover { color: var(--color-saffron-text-hover); }

main {
  flex: 1;
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.hero {
  max-width: var(--measure);
  padding-block: var(--hero-pad);
}

.eyebrow {
  margin-bottom: 0.75rem;
  font-size: var(--text-small);
  line-height: var(--lh-small);
  font-weight: 500;
  color: var(--color-eyebrow);
}

h1 {
  margin-bottom: var(--space-lg);
  font-size: var(--text-h1);
  line-height: 1;
  font-weight: 700;
  letter-spacing: var(--track-h1);
}

.lead {
  margin-bottom: var(--space-xl);
  font-size: var(--text-lead);
  line-height: 1.625;
  color: var(--color-text-muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap-min);
  padding: 0.75rem var(--space-lg);
  border-radius: var(--radius-md);
  background: var(--color-saffron-text);
  color: var(--color-on-saffron);
  font-size: var(--text-button);
  font-weight: 500;
  text-decoration: none;
  transition: background-color 150ms;
}

.button:hover { background: var(--color-saffron-text-hover); }

.section {
  padding-block: var(--section-pad);
  border-top: 1px solid var(--color-line);
}

h2 {
  margin-bottom: var(--space-md);
  font-size: var(--text-h2);
  line-height: var(--lh-h2);
  font-weight: 700;
  letter-spacing: var(--track-h2);
}

.section-intro {
  max-width: var(--measure);
  font-size: var(--text-body-lg);
  line-height: var(--lh-body-lg);
  color: var(--color-text-muted);
}

.section-note {
  margin-top: calc(var(--space-sm) * -0.5);
  margin-bottom: var(--space-xl);
  color: var(--color-text-muted);
}

.section h2.spaced { margin-bottom: var(--space-xl); }
.section h2.tight { margin-bottom: var(--space-xs); }

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--grid-gap);
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 48rem) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}

.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: var(--card-pad);
  background: var(--color-card);
  border: 1px solid var(--color-card-line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition: border-color 200ms, box-shadow 200ms;
}

.card:hover {
  border-color: var(--color-card-line-hover);
  box-shadow: var(--shadow-card-hover);
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--size-icon-lg);
  height: var(--size-icon-lg);
  margin-bottom: 1.25rem;
  border-radius: var(--radius-full);
  background: var(--color-saffron-tint);
  color: var(--color-saffron);
}

.card-icon svg { width: var(--size-icon-glyph-lg); height: var(--size-icon-glyph-lg); }

.tool .card-icon {
  width: var(--size-icon-md);
  height: var(--size-icon-md);
  margin-bottom: var(--space-md);
}

.tool .card-icon svg { width: var(--size-icon-glyph-md); height: var(--size-icon-glyph-md); }

h3 {
  margin-bottom: var(--space-sm);
  font-size: var(--text-h3);
  line-height: var(--lh-h3);
  font-weight: 600;
}

.card p {
  font-size: var(--text-body);
  line-height: 1.625;
  color: var(--color-text-muted);
}

.tool {
  height: 100%;
  justify-content: space-between;
  text-decoration: none;
}

.tool p { margin-bottom: var(--space-lg); }

.tool-body { display: flex; flex-direction: column; align-items: flex-start; }

.open {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--color-saffron-text);
  transition: color 150ms;
}

.open svg { width: var(--size-arrow); height: var(--size-arrow); }

.tool:hover .open { color: var(--color-saffron-text-hover); }

.tool:focus-visible { border-radius: var(--radius-card); }

.site-footer {
  margin-top: var(--space-3xl);
  background: var(--color-footer);
  border-top: 1px solid var(--color-line);
  font-size: var(--text-small);
  line-height: var(--lh-small);
  color: var(--color-text-muted);
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs);
  padding-block: var(--space-md);
  text-align: center;
}

@media (min-width: 40rem) {
  .site-footer .container { flex-direction: row; text-align: left; }
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  transition: color 150ms;
}

.site-footer a:hover { color: var(--color-saffron-text-hover); }

.not-found { padding-block: var(--hero-pad); }
.not-found p { margin-bottom: var(--space-xl); }
