/* AssemblyAI brand tokens */
:root {
  --aai-blue: #06f;
  --aai-blue-light: #3385ff;
  --aai-blue-dark: #0052cc;
  --ink: #1d1d1f;
  --paper: #fff;
  --rule: #e5e5e7;
  --muted: #6e6e73;
  --soft: #f5f5f7;
  --hairline: #e5e5e7;
  --accent: var(--aai-blue);
  --sans: "Inter", -apple-system, blinkmacsystemfont, "Segoe UI", roboto, sans-serif;
  --mono: "SF Mono", ui-monospace, sfmono-regular, menlo, consolas, monospace;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 5rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f5f5f7;
    --paper: #0d0d0d;
    --rule: #2a2a2a;
    --muted: #8e8e93;
    --soft: #1c1c1e;
    --hairline: #1c1c1e;
  }
}

/* Reset */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 19px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 150ms ease;
}

a:hover {
  color: var(--aai-blue-light);
}

/* Layout */
.container {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-3);
}

@media (width >= 720px) {
  .container {
    padding: var(--space-6) var(--space-4);
  }
}

/* Page header — editorial display */
.page-header {
  margin: 0 0 var(--space-5);
}

h1 {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(3rem, 9vw, 5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0;
}

/* Overview — strategic summary above the nav */
.overview {
  margin: 0 0 var(--space-5);
}

.overview__title {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 var(--space-3);
}

.overview__lead {
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--ink);
  margin: 0 0 var(--space-3);
  letter-spacing: -0.01em;
}

.overview__priorities {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: priority;
}

.overview__priority {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--hairline);
  counter-increment: priority;
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: var(--space-2);
}

.overview__priority:first-child {
  border-top: 1px solid var(--hairline);
}

.overview__priority::before {
  content: counter(priority, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding-top: 0.2rem;
}

.overview__priority-title {
  font-size: 1.1875rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.25rem;
  grid-column: 2;
}

.overview__priority-body {
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.55;
  grid-column: 2;
}

.overview__priority-body p {
  margin: 0;
}

.overview__footer {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
  margin: var(--space-3) 0 0;
}

/* Section nav — hairline rules, plain text links, single line */
.section-nav {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: var(--space-2);
  margin: 0 0 var(--space-3);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.section-nav__label {
  display: none;
}

.section-nav__links {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--space-2);
  font-size: 0.75rem;
  white-space: nowrap;
  width: 100%;
  justify-content: space-between;
}

.section-nav__links a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition:
    color 150ms ease,
    border-color 150ms ease;
}

.section-nav__links a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Section */
.section {
  padding: var(--space-4) 0 var(--space-3);
  scroll-margin-top: var(--space-3);
}

.section:first-of-type {
  padding-top: var(--space-3);
}

/* Permalink anchors — hover-revealed "#" next to headings and item titles */
.anchor {
  color: var(--muted);
  text-decoration: none;
  font-weight: 400;
  opacity: 0;
  margin-left: 0.25rem;
  transition:
    opacity 150ms ease,
    color 150ms ease;
}

h2:hover .anchor,
.item:hover .anchor,
.shipped__item:hover .anchor,
.anchor:focus {
  opacity: 1;
}

.anchor:hover {
  color: var(--accent);
}

@media (hover: none) {
  .anchor {
    opacity: 1;
  }
}

h2 {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(1.875rem, 4vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 var(--space-2);
}

.section__tagline {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.1875rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 var(--space-4);
}

.section__subheading {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin: var(--space-4) 0 0;
}

/* Items — typographic entries, hairline-separated, not cards */
.section__items {
  list-style: none;
  padding: 0;
  margin: 0;
}

.item {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--hairline);
  display: block;
  scroll-margin-top: var(--space-3);
}

.item:first-child {
  border-top: 1px solid var(--hairline);
}

.item__title {
  font-size: 1.1875rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.375rem 0.625rem;
}

.item__desc {
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.55;
}

.item__desc p {
  margin: 0;
}

.item__desc > * + * {
  margin-top: var(--space-1);
}

.item__list {
  padding-left: 1rem;
  margin: 0;
}

.item__list li {
  padding: 0.0625rem 0;
}

/* Pills */
.pill {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  font-weight: 600;
  line-height: 1;
  padding: 0.3125rem 0.5625rem;
  border-radius: 4px;
  text-transform: uppercase;
  white-space: nowrap;
  vertical-align: 2px;
}

.pill--quarter {
  background: var(--soft);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* Recently shipped */
.shipped {
  margin-top: var(--space-5);
  padding-top: 0;
}

.shipped__heading {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 var(--space-2);
}

.shipped__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.shipped__item {
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--hairline);
  display: flex;
  gap: var(--space-3);
  align-items: baseline;
  font-size: 1rem;
  scroll-margin-top: var(--space-3);
}

.shipped__item:first-child {
  border-top: 1px solid var(--hairline);
}

.shipped__item time {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.875rem;
  color: var(--muted);
  flex-shrink: 0;
  min-width: 5.5rem;
}

.shipped__body {
  flex: 1;
  min-width: 0;
  color: var(--muted);
}

.shipped__title {
  color: var(--ink);
  font-weight: 500;
}

.shipped__desc {
  color: var(--muted);
}

/* Selection — AssemblyAI blue accent */
::selection {
  background: var(--aai-blue);
  color: #fff;
}
