/* Design References — site styling.
   Built in the DeepMind design language from this library: monochrome chrome so the
   references themselves carry all the colour. Values from deepmind/DESIGN.md. */

:root {
  --ink: #121317;
  --ink-variant: #45474d;
  --ink-tertiary: #80868b;
  --surface: #ffffff;
  --surface-container: #f8f9fc;
  --surface-container-high: #eff2f7;
  --surface-container-highest: #e1e6ec;
  --outline: rgba(33, 34, 38, 0.12);
  --outline-variant: rgba(33, 34, 38, 0.06);
  --state-hover: rgba(33, 34, 38, 0.04);

  --font: "Google Sans Flex", Arial, Helvetica, sans-serif;
  --w-body: 350; --w-eyebrow: 400; --w-label: 450; --w-heading: 500;

  --radius-media: 16px;
  --radius-card: 24px;
  --radius-pill: 9999px;

  --container: 1440px;
  --header-h: 64px;
  --section: 72px;
  --block: 88px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
@media (min-width: 1024px) { :root { --block: 120px; } }
@media (min-width: 1280px) { :root { --block: 180px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17.5px; line-height: 1.45; letter-spacing: 0.01188em;
  font-weight: var(--w-body);
  color: var(--ink); background: var(--surface);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
a { color: inherit; text-decoration: none; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: 28px; }
@media (min-width: 1024px) { .container { padding-inline: 40px; } }
@media (min-width: 1280px) { .container { padding-inline: 72px; } }

.divider { border: 0; border-top: 1px solid var(--outline); margin: 0; }
.section { padding-top: var(--section); padding-bottom: var(--section); }
.section--hero { padding-top: calc(var(--header-h) + var(--section)); }

/* ---- header / footer ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--outline);
}
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wordmark { font-weight: var(--w-heading); font-size: 17.5px; letter-spacing: -0.00389em; }
.site-footer { border-top: 1px solid var(--outline); padding-block: 48px; }
.site-footer .caption { max-width: 62ch; }

/* ---- type ---- */
.display {
  font-size: clamp(2rem, 1.2rem + 4vw, 3.375rem);
  line-height: 1.06; letter-spacing: -0.00625em; font-weight: var(--w-heading);
  text-wrap: balance; max-width: 20ch;
}
.eyebrow {
  font-size: 10px; font-weight: var(--w-eyebrow); letter-spacing: 0.00917em;
  text-transform: uppercase; color: var(--ink-variant); margin-bottom: 16px;
}
.lede {
  font-size: 17.5px; color: var(--ink-variant); max-width: 68ch;
  margin-top: 24px; text-wrap: pretty;
}
.meta, .caption { font-size: 14.5px; font-weight: var(--w-body); color: var(--ink-variant); }
.meta { margin-top: 16px; }

/* ---- buttons: pills, monochrome ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-size: 14.5px; font-weight: var(--w-label); letter-spacing: 0.01143em;
  border-radius: var(--radius-pill); border: 0; cursor: pointer;
  padding: 8px 16px; background: transparent; color: var(--ink);
  transition: background-color 150ms ease;
}
.btn--primary { background: var(--ink); color: var(--surface); padding: 12px 24px; }
.btn--primary:hover { opacity: 0.92; }
.btn--outlined { box-shadow: inset 0 0 0 1px var(--outline); }
.btn--outlined:hover { background: var(--state-hover); }
.btn:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--ink); background: var(--surface-container-highest); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* ---- index grid ---- */
.grid { display: grid; gap: 48px 40px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.card { display: grid; gap: 12px; align-content: start; }
.card-media {
  display: flex; height: 200px; border-radius: var(--radius-card); overflow: hidden;
  transition: transform 250ms var(--ease);
  /* hairline bounds so palettes containing white stay legible on a white page */
  box-shadow: inset 0 0 0 1px var(--outline);
}
/* divider on every band, so a #ffffff swatch still reads as a swatch */
.card-media > span { flex: 1; box-shadow: inset -1px 0 0 var(--outline); }
.card-media > span:last-child { box-shadow: none; }
.card:hover .card-media { transform: translateY(-4px); }
.card-title { font-size: 20px; font-weight: var(--w-heading); line-height: 1.3; letter-spacing: -0.00389em; margin-top: 4px; }
.card-desc { color: var(--ink-variant); text-wrap: pretty; }
.card .meta { margin-top: 0; }

/* ---- swatches ---- */
.swatches { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.swatch { display: grid; grid-template-columns: 28px 1fr; grid-template-rows: auto auto; gap: 2px 12px; align-items: center; }
.swatch .chip { grid-row: 1 / 3; width: 28px; height: 28px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--outline-variant); }
.swatch-name { font-size: 14.5px; font-weight: var(--w-label); }
.swatch-val { font-size: 14.5px; color: var(--ink-tertiary); }

/* ---- tabs ---- */
.tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--outline); margin-bottom: 36px; }
.tab {
  font: inherit; font-size: 14.5px; font-weight: var(--w-label);
  background: none; border: 0; cursor: pointer; color: var(--ink-variant);
  padding: 12px 16px; border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color 150ms ease, border-color 150ms ease;
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--ink); border-bottom-color: var(--ink); }
.panel { display: none; }
.panel.is-active { display: block; }
.panel iframe {
  width: 100%; height: 78vh; min-height: 520px; border: 0;
  border-radius: var(--radius-media); background: var(--surface-container);
  box-shadow: inset 0 0 0 1px var(--outline-variant);
}

/* ---- rendered DESIGN.md ---- */
.doc { max-width: 78ch; }
.doc h2 {
  font-size: 32px; line-height: 1.08; letter-spacing: -0.00867em; font-weight: var(--w-heading);
  margin-top: 72px; padding-top: 36px; border-top: 1px solid var(--outline);
}
.doc > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.doc h3 { font-size: 20px; line-height: 1.3; letter-spacing: -0.00389em; font-weight: var(--w-heading); margin-top: 36px; }
.doc h4 { font-size: 17.5px; font-weight: var(--w-heading); margin-top: 24px; }
.doc p, .doc ul, .doc ol { margin-top: 16px; text-wrap: pretty; }
.doc ul, .doc ol { padding-left: 1.25em; }
.doc li { margin-top: 8px; }
.doc li::marker { color: var(--ink-tertiary); }
.doc strong { font-weight: var(--w-label); }
.doc code {
  font-family: "Google Sans Code", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em; background: var(--surface-container-high);
  padding: 0.1em 0.35em; border-radius: 4px;
}
.doc pre {
  margin-top: 16px; padding: 16px 20px; overflow-x: auto;
  background: var(--surface-container); border-radius: 12px;
}
.doc pre code { background: none; padding: 0; font-size: 14.5px; line-height: 1.45; }
.doc blockquote {
  margin: 24px 0 0; padding: 16px 20px;
  background: var(--surface-container); border-radius: 12px; color: var(--ink-variant);
}
.doc blockquote strong { color: var(--ink); }
.table-scroll { overflow-x: auto; margin-top: 24px; }
.doc table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.doc th, .doc td { text-align: left; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--outline-variant); vertical-align: top; }
.doc th { font-weight: var(--w-label); border-bottom-color: var(--outline); white-space: nowrap; }
.doc td code { white-space: nowrap; }

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

/* ---- section titles on index and detail ---- */
.section-title {
  font-size: 20px; line-height: 1.3; letter-spacing: -0.00389em;
  font-weight: var(--w-heading); margin-bottom: 24px;
}
.grid + .section-title { margin-top: 72px; }

/* ---- typography specimen ---- */
.specimen { display: grid; gap: 4px; margin-top: 24px; }
.specimen-row {
  display: grid; gap: 8px;
  padding: 24px 0; border-top: 1px solid var(--outline-variant);
}
.specimen-row:first-child { border-top: 0; padding-top: 8px; }
.specimen-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; }
.specimen-head code {
  font-family: "Google Sans Code", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14.5px; background: var(--surface-container-high);
  padding: 0.1em 0.4em; border-radius: 4px;
}
.specimen-specs { font-size: 14.5px; color: var(--ink-tertiary); }
.specimen-sample {
  color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: clip;
  /* samples render at their true size — that is the point of a specimen */
}

/* ---- search + category filters ---- */
.search { margin-top: 36px; max-width: 640px; }
.search input {
  width: 100%; font: inherit; font-size: 17.5px; font-weight: var(--w-body);
  color: var(--ink); background: var(--surface-container);
  border: 0; border-radius: var(--radius-pill);
  padding: 14px 24px;
  transition: background-color 150ms ease, box-shadow 150ms ease;
}
.search input::placeholder { color: var(--ink-tertiary); }
.search input:hover { background: var(--surface-container-high); }
.search input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--ink); background: var(--surface); }
.search .meta { margin-top: 12px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.chip {
  font: inherit; font-size: 14.5px; font-weight: var(--w-label); letter-spacing: 0.01143em;
  color: var(--ink); background: transparent; cursor: pointer;
  border: 0; box-shadow: inset 0 0 0 1px var(--outline);
  border-radius: var(--radius-pill); padding: 8px 16px;
  transition: background-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}
.chip:hover { background: var(--state-hover); }
.chip.is-active { background: var(--ink); color: var(--surface); box-shadow: none; }
.chip:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--ink); }

.empty { color: var(--ink-variant); max-width: 60ch; }
.cat + .cat { margin-top: 72px; }
.cat .section-title { margin-bottom: 24px; }

/* ---- card: overlay link + separate visit link ---- */
.card { position: relative; }
.card-overlay { position: absolute; inset: 0; z-index: 1; border-radius: var(--radius-card); }
.card-overlay:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.card > *:not(.card-overlay) { position: relative; }
.card-visit {
  position: relative; z-index: 2; justify-self: start;
  font-size: 14.5px; font-weight: var(--w-label); color: var(--ink-variant);
  border-radius: var(--radius-pill); box-shadow: inset 0 0 0 1px var(--outline);
  padding: 6px 14px; margin-top: 4px;
  transition: background-color 150ms ease, color 150ms ease;
}
.card-visit:hover { background: var(--state-hover); color: var(--ink); }
.card-visit:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--ink); }
