/* Recolor's design tokens, plain CSS: the app maps them into Tailwind (index.css), the content pages read them as is. */

@font-face {
  font-family: "Figtree Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url("/fonts/figtree-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC,
    U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ui-ground: #f9fafb;
  --ui-surface: #ffffff;
  --ui-muted: #f3f4f6;
  --ui-line: #e5e7eb;
  --ui-line-2: #f3f4f6;

  --ui-ink: #101828;
  --ui-ink-2: #4a5565;
  --ui-ink-3: #6a7282;
  --ui-ink-4: #99a1af;

  /* Blue 600, not the reference's brighter blue: white labels on it reach AA (5.3:1, the brighter one 3.8:1). */
  --ui-brand: #155dfc;
  --ui-brand-hover: #1447e6;
  --ui-brand-soft: #eff6ff;
  --ui-brand-line: #bedbff;
  --ui-brand-ink: #193cb8;

  --ui-success: #00c950;
  --ui-success-soft: #f0fdf4;
  --ui-success-ink: #008236;
  --ui-warning: #fd9a00;
  --ui-warning-soft: #fffbeb;
  --ui-warning-ink: #bb4d00;
  --ui-danger: #fb2c36;
  --ui-danger-soft: #fef2f2;
  --ui-danger-ink: #c10007;

  --ui-radius-card: 12px;
  --ui-radius-control: 8px;
  --ui-radius-dialog: 16px;

  --ui-shadow-pop: 0 4px 16px rgb(16 24 40 / 0.08), 0 1px 2px rgb(16 24 40 / 0.04);
  --ui-shadow-dialog: 0 24px 48px rgb(16 24 40 / 0.16);
  --ui-shadow-segment: 0 1px 2px rgb(16 24 40 / 0.06);
  --ui-ring: 0 0 0 3px #dbeafe;
  --ui-glow: 0 0 0 4px rgb(21 93 252 / 0.3);
  --ui-backdrop: rgb(16 24 40 / 0.5);

  --ui-font: "Figtree Variable", "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ui-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* The content site, on the app's tokens: the build writes tokens.css and then this file into public/content.css. */

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

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

body {
  margin: 0;
  background: var(--ui-ground);
  color: var(--ui-ink-2);
  font: 400 16px/1.65 var(--ui-font);
  -webkit-font-smoothing: antialiased;
  color-scheme: light;
}

a {
  color: var(--ui-brand);
}

:focus-visible {
  outline: 2px solid var(--ui-brand);
  outline-offset: 2px;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.column {
  width: 100%;
  max-width: 808px;
  margin: 0 auto;
  padding: 0 24px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 8px 12px;
  border-radius: var(--ui-radius-control);
  background: var(--ui-surface);
  color: var(--ui-ink);
  box-shadow: var(--ui-shadow-pop);
  font-size: 14px;
  font-weight: 600;
}

.skip:focus {
  top: 12px;
}

/* The header takes the app's toolbar: surface, a hairline, the logo tile and the wordmark, one primary. */

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

.header-row {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 56px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ui-ink);
  text-decoration: none;
}

.logo {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  box-shadow: 0 0 0 1px var(--ui-line);
  background: linear-gradient(90deg, #264653 0 20%, #2a9d8f 20% 40%, #e9c46a 40% 60%, #f4a261 60% 80%, #e76f51 80%);
}

.wordmark {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  gap: 24px;
  margin-right: auto;
}

.nav a {
  padding: 6px 0;
  color: var(--ui-ink-2);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.nav a:hover,
.nav a[aria-current] {
  color: var(--ui-ink);
}

.nav a[aria-current] {
  font-weight: 600;
}

/* Buttons, as the app's Button primitive. */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--ui-radius-control);
  font: 500 13px/1 var(--ui-font);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.button.primary {
  background: var(--ui-brand);
  color: var(--ui-surface);
  font-weight: 600;
}

.button.primary:hover {
  background: var(--ui-brand-hover);
}

.button.primary:focus-visible {
  outline: none;
  box-shadow: var(--ui-glow);
}

.button.secondary {
  background: var(--ui-surface);
  border-color: var(--ui-line);
  color: var(--ui-ink);
}

.button.secondary:hover {
  background: var(--ui-ground);
}

.button.small {
  height: 32px;
  padding: 0 10px;
}

/* The breadcrumb and the hero: verdict, question, answer, date. */

.crumbs {
  margin: 28px 0 0;
  font-size: 13px;
  color: var(--ui-ink-3);
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.crumbs li + li::before {
  content: "/";
  margin: 0 8px;
  color: var(--ui-ink-4);
}

.crumbs a {
  color: var(--ui-ink-2);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--ui-ink);
  text-decoration: underline;
}

.hero {
  padding: 20px 0 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--ui-brand-ink);
  font-size: 14px;
  font-weight: 600;
}

h1 {
  margin: 0;
  color: var(--ui-ink);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.lede {
  margin: 16px 0 0;
  color: var(--ui-ink);
  font-size: 18px;
  line-height: 1.55;
}

.updated {
  margin: 12px 0 0;
  color: var(--ui-ink-3);
  font-size: 13px;
}

/* Cards and tables: what sits has a border, nothing here floats. */

.card {
  background: var(--ui-surface);
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-card);
}

.glance {
  margin: 28px 0 0;
  overflow: hidden;
}

.glance figcaption {
  padding: 12px 16px;
  border-bottom: 1px solid var(--ui-line-2);
  color: var(--ui-ink-3);
  font-size: 13px;
  line-height: 1.5;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

th,
td {
  min-width: 7.5rem;
  padding: 11px 16px;
  border-bottom: 1px solid var(--ui-line-2);
  text-align: left;
  vertical-align: top;
}

thead th {
  padding-top: 10px;
  padding-bottom: 10px;
  color: var(--ui-ink-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

tbody th {
  color: var(--ui-ink);
  font-weight: 500;
}

tbody tr:last-child > * {
  border-bottom: 0;
}

tbody tr:hover {
  background: var(--ui-ground);
}

.prose .table-wrap {
  margin: 20px 0;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-card);
  background: var(--ui-surface);
}

/* State as a pill with a dot. */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--ui-muted);
  color: var(--ui-ink-2);
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  white-space: nowrap;
}

.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ui-ink-3);
}

.pill.success {
  background: var(--ui-success-soft);
  color: var(--ui-success-ink);
}

.pill.success::before {
  background: var(--ui-success);
}

.pill.warning {
  background: var(--ui-warning-soft);
  color: var(--ui-warning-ink);
}

.pill.warning::before {
  background: var(--ui-warning);
}

.pill.danger {
  background: var(--ui-danger-soft);
  color: var(--ui-danger-ink);
}

.pill.danger::before {
  background: var(--ui-danger);
}

.pill.info {
  background: var(--ui-brand-soft);
  color: var(--ui-brand-ink);
}

.pill.info::before {
  background: var(--ui-brand);
}

/* The body text. */

section > h2,
.related > h2 {
  margin: 44px 0 12px;
  color: var(--ui-ink);
  font-size: 22px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.prose > :first-child {
  margin-top: 0;
}

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

.prose h3 {
  margin: 28px 0 8px;
  color: var(--ui-ink);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 16px;
}

.prose ul,
.prose ol {
  padding-left: 22px;
}

.prose li {
  margin: 6px 0;
}

.prose li::marker {
  color: var(--ui-ink-3);
}

.prose strong {
  color: var(--ui-ink);
  font-weight: 600;
}

.prose a,
.lede a,
.glance a,
.cta p a,
.sources a {
  color: var(--ui-brand);
  text-decoration: underline;
  text-decoration-color: var(--ui-brand-line);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.prose a:hover,
.lede a:hover,
.glance a:hover,
.cta p a:hover,
.sources a:hover {
  text-decoration-color: currentColor;
}

code {
  font-family: var(--ui-mono);
  font-size: 0.875em;
}

:not(pre) > code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--ui-muted);
  color: var(--ui-ink);
  overflow-wrap: anywhere;
}

/* In a table a value breaks only where it has a space, so the column grows to fit it and the table scrolls instead. */
td > code,
th > code {
  overflow-wrap: normal;
}

/* Code blocks, as in the app's Export drawer: the name and Copy above the code. */

.code {
  margin: 20px 0;
  overflow: hidden;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-control);
  background: var(--ui-ground);
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 4px 4px 4px 14px;
  border-bottom: 1px solid var(--ui-line-2);
  background: var(--ui-surface);
}

.code-head span {
  color: var(--ui-ink-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.code pre {
  margin: 0;
  padding: 12px 14px;
  overflow-x: auto;
  color: var(--ui-ink);
  font: 400 13px/1.6 var(--ui-mono);
}

.code code {
  font-size: inherit;
}

/* Steps: a numbered list with the numbers in tiles. */

.prose ol.steps,
ol.steps {
  padding: 0;
  list-style: none;
  counter-reset: step;
}

ol.steps > li {
  position: relative;
  margin: 12px 0;
  padding-left: 40px;
  counter-increment: step;
}

ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ui-brand-soft);
  color: var(--ui-brand-ink);
  font-size: 13px;
  font-weight: 600;
}

/* The FAQ: details with a chevron. */

.faq {
  overflow: hidden;
}

.faq details + details {
  border-top: 1px solid var(--ui-line-2);
}

.faq summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  color: var(--ui-ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  list-style: none;
  cursor: pointer;
}

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

.faq summary::after {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin: 6px 4px 0 0;
  border-right: 1.75px solid var(--ui-ink-3);
  border-bottom: 1.75px solid var(--ui-ink-3);
  transform: rotate(45deg);
  transition: transform 120ms ease-out;
}

.faq details[open] summary::after {
  margin-top: 10px;
  transform: rotate(225deg);
}

.faq summary:hover {
  background: var(--ui-ground);
}

.faq .answer {
  padding: 0 16px 16px;
}

/* The call to action: the palette it opens, then the one primary. */

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin: 44px 0 0;
  padding: 20px;
}

.cta .strip {
  display: flex;
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 6px;
}

.strip > span,
.palette-strip > span {
  flex: 1;
}

.cta-text {
  flex: 1 1 320px;
}

.cta h2 {
  margin: 0;
  color: var(--ui-ink);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
}

.cta p {
  margin: 4px 0 0;
  font-size: 15px;
}

/* Sources and keep reading. */

.sources {
  margin: 0;
  padding-left: 22px;
}

.sources li {
  margin: 6px 0;
}

.sources li::marker {
  color: var(--ui-ink-3);
}

.host {
  color: var(--ui-ink-3);
  font-size: 13px;
}

.related {
  padding-bottom: 56px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.link-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 16px;
  color: var(--ui-ink-2);
  text-decoration: none;
}

.link-card:hover {
  border-color: var(--ui-brand-line);
}

.kicker {
  color: var(--ui-ink-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card-title {
  margin: 0;
  color: var(--ui-ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.card-text {
  font-size: 14px;
  line-height: 1.5;
}

.index-group {
  padding-bottom: 8px;
}

.index-group:last-child {
  padding-bottom: 56px;
}

/* Palettes: the swatches as blocks with their hex, strips in the index. */

.swatches {
  display: flex;
  height: 168px;
  margin: 28px 0 0;
  overflow: hidden;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-card);
}

.swatch {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
  padding: 12px;
}

.swatch .hex {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}

.swatch .name {
  font-size: 12px;
  line-height: 1.3;
}

.palette-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.palette-card {
  display: block;
  height: 100%;
  overflow: hidden;
  color: var(--ui-ink-2);
  text-decoration: none;
}

.palette-card:hover {
  border-color: var(--ui-brand-line);
}

.palette-strip {
  display: flex;
  height: 56px;
}

.palette-card .card-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px 14px;
}

/* The footer: the entity sentence and the sections. */

.site-footer {
  margin-top: 24px;
  padding: 32px 0 40px;
  border-top: 1px solid var(--ui-line);
  background: var(--ui-surface);
  font-size: 14px;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px 48px;
}

.entity {
  max-width: 460px;
  margin: 12px 0 0;
  line-height: 1.6;
}

.footer-nav ul {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 8px 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-nav a {
  color: var(--ui-ink-2);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--ui-ink);
  text-decoration: underline;
}

.not-found {
  padding-top: 72px;
  padding-bottom: 96px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 0;
}

@media (max-width: 720px) {
  .header-row {
    flex-wrap: wrap;
    gap: 4px 12px;
    padding-top: 10px;
  }

  .brand {
    margin-right: auto;
  }

  .nav {
    order: 3;
    width: 100%;
    gap: 20px;
    overflow-x: auto;
  }
}

@media (max-width: 640px) {
  .wrap,
  .column {
    padding: 0 16px;
  }

  h1 {
    font-size: 26px;
  }

  .lede {
    font-size: 17px;
  }

  .cards,
  .palette-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .swatches {
    flex-direction: column;
    height: auto;
  }

  .swatch {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .faq summary::after {
    transition: none;
  }
}
