/* Kit geometry and theme, Hive tokens and the resting ground. */
@import url('../vendor/sdk-ui/gc/styles/tokens.css') layer(kit);
@import url('../vendor/sdk-ui/gc/styles/base.css') layer(kit);
@import url('../vendor/sdk-ui/gc/styles/motion.css') layer(kit);
@import url('../vendor/sdk-ui/gc/styles/icon.css') layer(kit);
@import url('../vendor/sdk-ui/gc/styles/button.css') layer(kit);
@import url('../vendor/sdk-ui/gc/styles/tabs.css') layer(kit);
@import url('../vendor/sdk-ui/gc/styles/app-bar.css') layer(kit);
@import url('../vendor/sdk-ui/gc/styles/text-field.css') layer(kit);
@import url('./marks.css');
/* The state line every surface uses for a session (session-state.js): the Map's cards, and the run sheet in the Map
   and the Queue. */
@import url('./session-state.css');
@import url('./session-summary.css');

/* ── Hive tokens ──────────────────────────────────────────────────────────────────────────────────────── */

.gc-root {
  /* The labels on these pages are read at phone width. */
  --gc-size-floor: var(--type-size-floor);

  --hive-ground: var(--gc-page);
  --hive-ink: var(--gc-ink);
  --hive-ink-mid: color-mix(in srgb, var(--gc-ink) 45%, transparent);
  --hive-ink-dim: color-mix(in srgb, var(--gc-ink) 24%, transparent);
  --hive-ink-faint: color-mix(in srgb, var(--gc-ink) 14%, transparent);
  --hive-dot: color-mix(in srgb, var(--gc-ink) 10%, transparent);
  --hive-contour: color-mix(in srgb, var(--gc-ink) 6%, transparent);
  --hive-you: var(--gc-cream);
  --hive-yours-fill: color-mix(in srgb, var(--gc-cream) 7%, transparent);
  --hive-crossing: var(--gc-amber);
  --hive-on-you: var(--gc-badge);
  --hive-label: var(--gc-ink-1);
  --hive-label-muted: var(--gc-ink-2);

  /* The resting ground: a hex-packed lattice of dots (rows 22 px apart along, 19.05 px down, every other row half a
     pitch over). Two tiles of one dot each, the second offset by half a tile, make the packing. */
  --hive-pitch: 22px;
  --hive-row: 19.053px;

  /* Layout sizes the shell and the pages share. The top bar is the page system's: 48 px on a desk. */
  --hive-top-h: 48px;
  --hive-nav-h: 56px;
  --hive-gutter: var(--gc-gutter);
  --hive-rule: var(--gc-card-edge);
}

/* The phone's top bar is 52 px. Declared here, after the token block, because the imported sheets cascade first. */
@media (max-width: 759.98px) {
  .gc-root {
    --hive-top-h: 52px;
  }
}

html {
  background: var(--gc-page);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body.gc-root {
  margin: 0;
}

/* Every page stands on the plain ground. The dot lattice is the Map's texture alone (its live stage draws its own over
   it): behind a list it read as a page that had failed to load. The open view is marked by the bar's current tab
   (workspace-bar.js `select`: the Map's tab is current on the Map and on a session opened over it), so the lattice
   follows that mark and the shell sets nothing new. */
body.gc-root {
  min-block-size: 100dvh;
  background-color: var(--hive-ground);
}
body.gc-root:has(.workspace [data-view='map'][aria-current='page']) {
  background-image:
    radial-gradient(circle, var(--hive-dot) 1px, transparent 1.6px),
    radial-gradient(circle, var(--hive-dot) 1px, transparent 1.6px);
  background-size: var(--hive-pitch) calc(2 * var(--hive-row));
  background-position: 0 0, calc(var(--hive-pitch) / 2) var(--hive-row);
}

/* Native form controls use the surrounding colour by default. */
:where(.gc-root) :where(button, input, textarea) {
  color: inherit;
}

:where(.gc-root) :where(a) {
  color: inherit;
}

::placeholder { color: var(--ink-proof); opacity: 1; }

/* Kit controls keep their native pressed, busy and keyboard behavior. The
   page can choose a face for a viewer's next action independently of its size. */
.gc-button {
  --button-face: transparent;
  --button-edge: transparent;
  --button-ink: var(--ink-context);
  --button-weight: var(--type-body-weight);
  border-radius: var(--radius-md);
}
.gc-button--row {
  --gc-cta-height: var(--gc-touch);
  --gc-cta-lip: 0px;
  --gc-cta-press: 0px;
}
.gc-button--primary {
  --button-face: var(--face-primary);
  --button-ink: var(--ink-on-primary);
  --button-weight: var(--type-lead-weight);
}
.gc-button--outline {
  --button-edge: var(--ink-control-edge);
  --button-ink: var(--ink-primary);
}
.gc-button:disabled {
  --button-face: transparent;
  --button-edge: var(--hive-rule);
  --button-ink: var(--ink-proof);
  --button-weight: var(--type-body-weight);
}
.gc-button__lip { display: none; }
.gc-button .gc-button__face {
  min-block-size: var(--gc-touch);
  border-radius: inherit;
  background: var(--button-face);
  box-shadow: inset 0 0 0 1px var(--button-edge);
  color: var(--button-ink);
}
.gc-button .gc-button__label {
  --type-action-weight: var(--button-weight);
  color: inherit;
}
.gc-button--outline .gc-button__face::after {
  box-shadow: inset 0 0 0 1px var(--button-edge);
}
.gc-button--outline .gc-button__face::before {
  background: var(--button-face);
}

/* Kit buttons resolve their icons to the local SVG masks. */
.hive-kit-glyph {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  background-color: currentColor;
  -webkit-mask: var(--hive-icon-url) center / contain no-repeat;
  mask: var(--hive-icon-url) center / contain no-repeat;
}

/* A glyph (marks.js `glyph()`) is a `.hive-icon`, painted and placed on the text's middle by marks.css; this rule only
   gives it the size its caller asked for. */
.hive-glyph {
  inline-size: var(--hive-glyph-size, 18px);
  block-size: var(--hive-glyph-size, 18px);
}
