@charset "UTF-8";

:root {
  color-scheme: dark;

  --palette-grey-1200: #121317;
  --palette-grey-1100: #18191d;
  --palette-grey-1000: #212226;
  --palette-grey-900: #2f3034;
  --palette-grey-800: #45474d;
  --palette-grey-600: #6b7787;
  --palette-grey-400: #9aa5b5;
  --palette-grey-200: #cdd4dc;
  --palette-grey-100: #e1e6ec;
  --palette-grey-50: #eff2f7;
  --palette-grey-0: #ffffff;

  --palette-blue-600: #3279f9;
  --palette-blue-500: #1a73e8;
  --palette-mint-500: #00e599;

  --bg: var(--palette-grey-1200);
  --surface: var(--palette-grey-1100);
  --surface-raised: var(--palette-grey-1000);
  --table: var(--palette-grey-1100);
  --table-heading: var(--palette-grey-1000);

  --text: #f8f9fc;
  --text-muted: var(--palette-grey-400);
  --text-subtle: var(--palette-grey-600);

  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  --accent: var(--palette-blue-600);
  --accent-hover: #4f8dfa;
  --accent-on-accent: #ffffff;
  --active: rgba(50, 121, 249, 0.16);
  --callout: rgba(50, 121, 249, 0.08);

  --font-sans: 'Google Sans Flex', 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Google Sans Code', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --font-symbols: 'Google Symbols', sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-full: 999px;
}

:root[data-theme='light'] {
  color-scheme: light;
  --bg: #f8f9fc;
  --surface: #ffffff;
  --surface-raised: #f1f4f9;
  --table: #ffffff;
  --table-heading: #eff2f7;

  --text: #121317;
  --text-muted: #535d6e;
  --text-subtle: #7e8b9e;

  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.16);

  --accent: var(--palette-blue-500);
  --accent-hover: #1558b0;
  --accent-on-accent: #ffffff;
  --active: rgba(26, 115, 232, 0.12);
  --callout: rgba(26, 115, 232, 0.06);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --bg: #f8f9fc;
    --surface: #ffffff;
    --surface-raised: #f1f4f9;
    --table: #ffffff;
    --table-heading: #eff2f7;

    --text: #121317;
    --text-muted: #535d6e;
    --text-subtle: #7e8b9e;

    --line: rgba(0, 0, 0, 0.08);
    --line-strong: rgba(0, 0, 0, 0.16);

    --accent: var(--palette-blue-500);
    --accent-hover: #1558b0;
    --accent-on-accent: #ffffff;
    --active: rgba(26, 115, 232, 0.12);
    --callout: rgba(26, 115, 232, 0.06);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 32px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

a:focus-visible,
button:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  top: -80px;
  left: 20px;
  padding: 10px 18px;
  background: var(--accent);
  color: var(--accent-on-accent);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  z-index: 999;
  transition: top 0.2s ease;
}
.skip:focus {
  top: 16px;
}

/* Google Symbols */
.symbol {
  font-family: var(--font-symbols);
  font-weight: 300;
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  font-variation-settings: 'FILL' 0, 'wght' 350, 'GRAD' 0, 'ROND' 50, 'opsz' 24;
}

/* Docs Header */
.docs-header {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 max(32px, calc((100vw - 1200px) / 2));
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
}
.brand .mark {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.docs-header nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.docs-header nav a {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 450;
  color: var(--text-muted);
  transition: all 0.15s ease;
}
.docs-header nav a:hover {
  color: var(--text);
  background: var(--surface-raised);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Theme Toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: var(--surface-raised);
  border: 1px solid var(--line);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}
.theme-toggle:hover {
  color: var(--text);
  border-color: var(--line-strong);
}
.theme-icon-sun {
  display: none;
}
:root[data-theme='light'] .theme-icon-sun {
  display: inline-flex;
}
:root[data-theme='light'] .theme-icon-moon {
  display: none;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .theme-icon-sun {
    display: inline-flex;
  }
  :root:not([data-theme]) .theme-icon-moon {
    display: none;
  }
}

/* Language Picker */
.language-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.language-picker select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 450;
  padding: 8px 30px 8px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.language-picker select:hover {
  color: var(--text);
  border-color: var(--line-strong);
}
.language-picker .picker-arrow {
  position: absolute;
  right: 10px;
  pointer-events: none;
  color: var(--text-subtle);
  font-size: 14px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Docs Layout */
.docs-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 840px);
  gap: 56px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 56px 32px 96px;
}

.docs-sidebar {
  position: sticky;
  top: 36px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-right: 1px solid var(--line);
  padding-right: 24px;
}
.docs-sidebar a {
  padding: 8px 14px;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 450;
  border-radius: var(--radius-full);
  transition: all 0.15s ease;
}
.docs-sidebar a:hover {
  color: var(--text);
  background: var(--surface-raised);
}
.docs-sidebar .active {
  background: var(--active);
  color: var(--accent);
  font-weight: 500;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--palette-mint-500);
  box-shadow: 0 0 8px rgba(0, 229, 153, 0.6);
}

h1 {
  font-size: clamp(36px, 4.5vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin-bottom: 16px;
}
.lead {
  font-size: 18px;
  line-height: 1.7;
  max-width: 680px;
  color: var(--text-muted);
  margin-bottom: 40px;
}

section {
  margin-top: 56px;
}
h2 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-bottom: 14px;
  color: var(--text);
}
p, li {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.7;
}
ul {
  padding-left: 22px;
  margin: 16px 0;
}
li + li {
  margin-top: 8px;
}
strong {
  color: var(--text);
  font-weight: 600;
}

/* Tables */
.docs-table {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--table);
  margin: 20px 0;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
  text-align: left;
}
th, td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 13.5px;
}
th {
  background: var(--table-heading);
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
}
td:first-child {
  width: 160px;
  color: var(--text);
  font-weight: 600;
}
tr:last-child td {
  border-bottom: 0;
}
code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent);
  background: var(--active);
  padding: 2px 6px;
  border-radius: 4px;
}

.callout {
  border-left: 3px solid var(--accent);
  background: var(--callout);
  padding: 18px 22px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-muted);
  font-size: 14px;
  margin: 20px 0;
}
.note {
  font-size: 12.5px;
  color: var(--text-subtle);
  margin-top: 12px;
}

.docs-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 32px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-subtle);
}
.docs-footer a {
  color: var(--accent);
}

@media (max-width: 820px) {
  .docs-layout {
    display: block;
    padding: 36px 20px 64px;
  }
  .docs-sidebar {
    position: static;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 0 0 20px;
    margin-bottom: 36px;
  }
}
