/* Paint roles of the documentation shell. */
:root, :root[data-theme="dark"] {
  --page: var(--v2-page);
  --nav: var(--v2-surface);
  --quiet: var(--v2-secondary);
  --ink: var(--v2-text);
  --fine: var(--v2-line);
  --tint: var(--v2-subtle);
  --deep: var(--v2-link);
  --glass: var(--v2-surface);
  --grid-dot: var(--v2-line);
  --film-text: var(--v2-fog);
  --film-bg: var(--v2-graphite);
}

.swatch-strip small { color: var(--quiet); font-size: 12px }
[data-edition="v2"] .swatch-strip i { height: 18px }

.paint-areas { gap: 1px; background: var(--fine) }
.paint-areas .paint-area {
  padding: clamp(12px, 3vw, 32px);
  color: var(--v2-text);
  background: var(--v2-page);
}
.paint-area > small { margin-bottom: 12px; color: var(--v2-secondary) }
.paint-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  background: var(--v2-surface);
  box-shadow: var(--ui-shadow-1);
  font-size: 12px;
}
.paint-card > div { display: flex; flex-wrap: wrap; gap: 5px; justify-content: end }
.paint-card span {
  padding: 5px 6px;
  border: 1px solid var(--v2-line-strong);
  border-radius: 4px;
  background: var(--v2-field);
}
.paint-card > div span:first-child { background: var(--v2-subtle) }
.paint-card > div span:last-child {
  border-color: var(--v2-action-edge);
  color: var(--v2-on-action);
  background: var(--v2-action);
}

[data-edition="v2"][data-page] .form-demo :is(input:not([type=checkbox]):not(:disabled), select),
[data-edition="v2"][data-page] .auth-spec input { background: var(--v2-field) }
[data-edition="v2"][data-page] :is(.form-demo, .auth-spec) :is(input, select):focus-visible { border-color: var(--v2-focus) }
[data-edition="v2"][data-page] :is(.form-demo, .auth-spec) input[aria-invalid=true] { border-color: var(--v2-attention) }

/* Documentation layout and brand specimen. Product examples use the compiled source styles. */
@font-face {
  font-family: "Google Sans";
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/sans.woff2") format("woff2")
}
* {
  box-sizing: border-box
}
:root {
  --rail-width: 238px;
  --guide-max: 1160px;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  color-scheme: light;
  scroll-padding-top: 84px
}
:root[data-theme=dark] {
  color-scheme: dark
}
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 15px/1.5 "Google Sans", Arial, sans-serif
}
button,
input,
select,
textarea {
  font: inherit
}
button,
select,
summary {
  cursor: pointer
}
button:disabled {
  cursor: not-allowed
}
button {
  color: inherit
}
a {
  color: inherit;
  text-decoration: none
}
h1,
h2,
h3,
p,
figure {
  margin: 0
}
h1,
h2,
h3 {
  line-height: 1.15
}
h1,
h2,
h3,
b,
strong {
  font-weight: 650
}
h2 {
  font-size: clamp(24px, 2.1vw, 32px);
  letter-spacing: -.045em
}
h3 {
  font-size: 18px;
  letter-spacing: -.022em
}
code,
kbd {
  font: 400 .85em/1.45 var(--mono);
  overflow-wrap: anywhere
}
.glyph {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: none;
  vertical-align: middle;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round
}
[hidden] {
  display: none !important
}
:root :where(a, button, input, select, summary):focus-visible {
  outline: none;
  background-color: var(--tint);
  color: var(--deep);
  border-color: var(--deep);
  text-decoration: underline;
  text-underline-offset: 3px
}
.skip {
  position: fixed;
  top: -100px;
  left: 10px;
  background: var(--glass);
  padding: 10px;
  z-index: 200
}
.skip:focus {
  top: 8px
}
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail-width);
  background: var(--nav);
  border-right: 1px solid var(--fine);
  z-index: 10;
  display: flex;
  flex-direction: column
}
.brand {
  height: 64px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 22px;
  border-bottom: 1px solid var(--fine);
  font-size: 26px;
  letter-spacing: -1.5px;
  font-weight: 650
}
.brand span {
  font-size: 12px;
  color: var(--quiet);
  letter-spacing: 0;
  font-weight: 500;
  border-left: 1px solid var(--fine);
  margin-left: 4px;
  padding-left: 12px
}
.rail nav {
  overflow: auto;
  min-height: 0;
  padding: 18px 14px 12px;
  scrollbar-width: thin
}
.nav-group {
  margin: 0 0 12px
}
.nav-group p {
  font-size: 11px;
  font-weight: 700;
  color: var(--quiet);
  letter-spacing: .065em;
  text-transform: uppercase;
  margin: 0 12px 5px
}
.nav-group a {
  height: 32px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.2
}
.nav-group a .glyph {
  width: 16px;
  height: 16px;
  color: var(--quiet)
}
.nav-group a[aria-current=page] {
  background: var(--tint);
  color: var(--deep);
  font-weight: 650
}
.nav-group a[aria-current=page] .glyph {
  color: inherit
}
.nav-group a:hover,
.nav-group a:focus-visible {
  background: var(--tint)
}
.edition {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border-top: 1px solid var(--fine);
  margin-top: auto;
  padding: 15px 22px;
  font-size: 11px;
  color: var(--quiet)
}
.edition time {
  font: 10px var(--mono)
}
.stage {
  margin-left: var(--rail-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column
}
.top {
  position: sticky;
  z-index: 8;
  top: 0;
  height: 64px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 clamp(24px, 3.5vw, 60px);
  border-bottom: 1px solid var(--fine);
  background: var(--page)
}
.crumb,
.top-actions,
.button-row,
.between,
.toolbar,
.example-line,
.route-bar {
  display: flex;
  align-items: center;
  gap: 12px
}
.crumb {
  font-size: 13px;
  color: var(--quiet)
}
.crumb i {
  font: 12px var(--mono);
  color: var(--quiet)
}
.crumb b {
  color: var(--ink);
  font-weight: 500
}
.top-actions {
  gap: 9px
}
.tool,
.search-trigger {
  height: 34px;
  border: 1px solid var(--fine);
  border-radius: 7px;
  background: var(--glass);
  display: inline-flex;
  align-items: center;
  justify-content: center
}
.tool {
  width: 35px;
  padding: 0
}
.tool:hover,
.search-trigger:hover {
  background: var(--tint)
}
.search-trigger {
  padding: 0 8px 0 10px;
  gap: 8px;
  color: var(--quiet);
  font-size: 12px
}
.search-trigger .glyph {
  width: 15px
}
.search-trigger kbd {
  border: 1px solid var(--fine);
  border-radius: 3px;
  padding: 0 5px;
  margin-left: 12px
}
.mobile-menu,
.theme .glyph:first-child,
:root[data-theme=dark] .theme .glyph:last-child {
  display: none
}
:root[data-theme=dark] .theme .glyph:first-child {
  display: block
}
main,
.foot {
  width: 100%;
  max-width: var(--guide-max);
  margin-inline: auto;
  padding-inline: clamp(24px, 3.5vw, 60px)
}
main {
  flex: 1;
  padding-top: clamp(28px, 3vw, 48px);
  padding-bottom: 44px;
  min-width: 0
}
main:focus {
  outline: none
}
.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--quiet);
  font-size: 12px;
  padding-block: 18px;
  flex-wrap: wrap;
  border-top: 1px solid var(--fine)
}
.foot a:hover,
.inline-link:hover {
  text-decoration: underline
}

/* Chapter rhythm and page titles. */
.chapter {
  margin-top: 32px
}
.chapter>h2 {
  margin: 0 0 16px
}
.chapter>.intro {
  color: var(--quiet);
  max-width: 75ch;
  margin: -4px 0 16px
}
.page-intro {
  max-width: 900px;
  margin: 4px 0 28px
}
.page-intro h1 {
  font-size: clamp(32px, 3.6vw, 52px);
  letter-spacing: -.062em;
  font-weight: 550;
  line-height: 1.04
}
.page-intro p {
  max-width: 70ch;
  margin-top: 13px;
  color: var(--quiet);
  font-size: 16px;
  line-height: 1.55
}

/* Product-area specimens and overview cards. */
.three,
.weights,
.shadow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px
}
.example-line,
.note,
.spec-box,
.weights>div,
.snapshots article,
.pair-grid article,
.form-demo,
.directory,
.map-zone {
  border: 1px solid var(--fine);
  border-radius: 9px;
  background: var(--glass);
  min-width: 0
}
.example-line p,
.note p,
.snapshots p {
  font-size: 13px;
  color: var(--quiet);
  line-height: 1.5;
  margin-top: 5px
}
.two,
.pair-grid,
.snapshots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px
}
.inline-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--deep)
}
.example-line {
  padding: 18px 20px;
  justify-content: space-between;
  gap: 18px
}

/* Source notes, navigation dialogs and search. */
.note,
.spec-box,
.weights>div,
.snapshots article,
.pair-grid article,
.map-zone {
  padding: 18px
}
.annotation {
  margin: 12px 0 0;
  color: var(--quiet);
  font-size: 14px;
  line-height: 1.55
}
.sources {
  margin-top: 13px;
  font-size: 12px;
  color: var(--quiet);
  min-width: 0
}
.sources summary {
  display: inline-flex;
  align-items: center;
  gap: 6px
}
.sources summary::after {
  content: "+";
  margin-left: 3px
}
.sources[open] summary::after {
  content: "−"
}
.sources .glyph {
  width: 14px;
  height: 14px
}
.sources>div {
  padding: 10px 14px;
  margin-top: 6px;
  border-left: 2px solid var(--fine)
}
.sources small,
.sources code {
  display: block;
  overflow-wrap: anywhere
}
.sources code {
  font-size: 11px;
  margin-top: 4px
}
.between {
  justify-content: space-between
}
.toolbar,
.button-row {
  flex-wrap: wrap
}
.toolbar {
  margin-bottom: 14px;
  gap: 8px
}
.searchbox {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--glass);
  color: var(--quiet);
  border: 1px solid var(--fine);
  border-radius: 6px;
  padding: 0 10px
}
.searchbox:focus-within {
  border-color: var(--deep)
}
.searchbox input {
  min-width: 0;
  width: 100%;
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--ink);
  outline: 0
}
#search-dialog {
  width: min(520px, calc(100vw - 24px));
  background: var(--glass);
  color: var(--ink);
  border-color: var(--fine)
}
#search-results {
  max-height: 48dvh;
  overflow: auto
}
#search-results a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 7px 8px;
  gap: 10px;
  border-radius: 4px
}
#search-results a:hover {
  background: var(--tint)
}
#search-results small {
  color: var(--quiet);
  text-align: right
}
#mobile-nav {
  position: fixed;
  inset: 0 auto 0 0;
  margin: 0;
  width: min(310px, 90vw);
  height: 100dvh;
  max-height: 100dvh;
  max-width: none;
  padding: 18px;
  background: var(--nav);
  color: var(--ink);
  border: 0;
  border-right: 1px solid var(--fine)
}
#mobile-nav>.between {
  margin-bottom: 18px
}
#mobile-nav::backdrop,
.drawer-dialog::backdrop {
  background: var(--ui-color-scrim)
}

/* Responsive shell and overview. */
@media(max-width:1180px) {
  :root {
    --rail-width: 210px
  }
  .nav-group a {
    font-size: 13px
  }
  .brand {
    padding: 0 18px
  }
}
@media(max-width:900px) {
  .rail {
    display: none
  }
  .stage {
    margin: 0
  }
  .mobile-menu {
    display: inline-flex
  }
  .top {
    height: 56px
  }
  .foot {
    margin-top: 8px
  }
}
@media(max-width:640px) {
  .top,
  main,
  .foot {
    padding-inline: 16px
  }
  .top {
    gap: 5px
  }
  .crumb {
    gap: 7px;
    font-size: 12px
  }
  .search-trigger {
    width: 34px;
    height: 34px;
    padding: 0
  }
  .search-trigger span,
  .search-trigger kbd {
    display: none
  }
  .top-actions {
    gap: 5px
  }
  main {
    padding-top: 18px
  }
  .chapter {
    margin-top: 25px
  }
  .chapter>h2 { margin-bottom: 12px }
  .three, .two, .snapshots, .pair-grid { grid-template-columns: 1fr }
  .page-intro p {
    font-size: 14px
  }
  .page-intro {
    margin-bottom: 20px
  }
  .foot {
    font-size: 11px
  }
  .nav-group a {
    height: 37px
  }
}
@media(prefers-reduced-motion:reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important
  }
}
