/* fw.kylecreative.xyz: same brand as the console (main/manager-web/src/styles/brand.scss).
   Palette "night garden": Ink (the Ball's dark round screen), Leaf green, Petal pink only in the
   halo behind the Ball. Bricolage Grotesque for the wordmark and titles, Instrument Sans for text. */

@font-face {
  font-family: 'Bricolage Grotesque Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/assets/fonts/bricolage-grotesque-latin-wght-normal.woff2) format('woff2-variations');
  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;
}
@font-face {
  font-family: 'Bricolage Grotesque Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/assets/fonts/bricolage-grotesque-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face { font-family: 'Instrument Sans'; font-weight: 400; font-display: swap; src: url(/assets/fonts/instrument-sans-latin-400-normal.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; }
@font-face { font-family: 'Instrument Sans'; font-weight: 500; font-display: swap; src: url(/assets/fonts/instrument-sans-latin-500-normal.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; }
@font-face { font-family: 'Instrument Sans'; font-weight: 600; font-display: swap; src: url(/assets/fonts/instrument-sans-latin-600-normal.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; }
@font-face { font-family: 'Instrument Sans'; font-weight: 400; font-display: swap; src: url(/assets/fonts/instrument-sans-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Instrument Sans'; font-weight: 500; font-display: swap; src: url(/assets/fonts/instrument-sans-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Instrument Sans'; font-weight: 600; font-display: swap; src: url(/assets/fonts/instrument-sans-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --kc-canvas: #f2f4f1;
  --kc-surface: #ffffff;
  --kc-ink: #1d2b27;
  --kc-ink-soft: #5c6b66;
  --kc-line: #dde4e0;
  --kc-leaf: #2d7a62;
  --kc-leaf-strong: #236150;
  --kc-leaf-tint: #dcebe3;
  --kc-petal: #f3d9e2;
  --kc-signal: #c2410c;
  --kc-eye: #e9f5ef;

  --kc-font-display: 'Bricolage Grotesque Variable', 'Instrument Sans', system-ui, sans-serif;
  --kc-font-ui: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --kc-radius-control: 8px;
  --kc-radius-surface: 16px;

  /* esp-web-tools dialog, in brand colours */
  --mdc-theme-primary: var(--kc-leaf);
  --mdc-theme-secondary: var(--kc-leaf-strong);
}

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

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

body {
  margin: 0;
  font-family: var(--kc-font-ui);
  font-size: 17px;
  line-height: 1.55;
  color: var(--kc-ink);
  background: var(--kc-canvas);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--kc-leaf-strong); text-underline-offset: 2px; }
a:hover { color: var(--kc-leaf); }
:focus-visible { outline: 2px solid var(--kc-leaf); outline-offset: 3px; border-radius: 4px; }
strong { font-weight: 600; }

.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;
}

/* The Ball mark */
.ball-body { fill: var(--kc-ink); }
.ball-eyes { fill: var(--kc-eye); transform-origin: 32px 30px; }
.ball-eyes--blink { animation: blink 0.32s ease-in-out 0.9s 1; }
@keyframes blink { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(0.08); } }

/* Top bar: like the console header, a white bar with the brand on the left */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px max(16px, calc((100vw - 760px) / 2));
  background: var(--kc-surface);
  border-bottom: 1px solid var(--kc-line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--kc-ink); text-decoration: none; }
.brand__ball { width: 30px; height: 30px; flex: none; }
.brand__word { font-family: var(--kc-font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; line-height: 1; }
.topbar__link { font-weight: 500; font-size: 15px; }

main { max-width: 760px; margin: 0 auto; padding: 0 16px; }

/* Hero: the Ball on its petal halo, the one place pink appears */
.hero { display: flex; align-items: center; gap: 28px; padding: 40px 0 8px; }
.hero__ball {
  width: 80px; height: 80px; flex: none;
  border-radius: 50%;
  box-shadow: 0 0 0 12px var(--kc-petal);
  margin-left: 12px;
}
.hero__ball svg { display: block; width: 100%; height: 100%; }
.hero__text { min-width: 0; }
h1, h2 { font-family: var(--kc-font-display); letter-spacing: -0.02em; color: var(--kc-ink); }
h1 { font-size: clamp(28px, 5.2vw, 40px); line-height: 1.1; font-weight: 700; margin: 0 0 8px; }
.lead { font-size: 18px; color: var(--kc-ink-soft); margin: 0; max-width: 52ch; }

/* Steps: a real sequence, so they are numbered */
.steps { list-style: none; counter-reset: step; margin: 28px 0 0; padding: 0; }
.step {
  counter-increment: step;
  position: relative;
  padding: 28px 0 32px 64px;
  border-top: 1px solid var(--kc-line);
}
.step::before {
  content: counter(step);
  position: absolute; left: 0; top: 26px;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--kc-font-display); font-weight: 700; font-size: 19px;
  color: var(--kc-leaf-strong); background: var(--kc-leaf-tint);
}
.step h2 { font-size: 26px; font-weight: 650; line-height: 1.2; margin: 6px 0 14px; }

.checklist, .substeps { margin: 0; padding-left: 20px; max-width: 60ch; }
.checklist li, .substeps li { margin: 6px 0; }
.checklist li::marker { color: var(--kc-leaf); }
.substeps { margin-top: 18px; }

/* Board choice */
.boards { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.board {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  padding: 16px;
  background: var(--kc-surface);
  border: 1.5px solid var(--kc-line);
  border-radius: var(--kc-radius-surface);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.board:hover { border-color: #b9c8c1; }
.board input { position: absolute; opacity: 0; pointer-events: none; }
.board:has(input:focus-visible) { outline: 2px solid var(--kc-leaf); outline-offset: 3px; }
.board:has(input:checked) { border-color: var(--kc-leaf); background: #f6faf8; box-shadow: inset 0 0 0 1px var(--kc-leaf); }
.board__pic { width: 72px; height: 72px; flex: none; }
.pic-shell { fill: #c9d3ce; }
.pic-screen { fill: var(--kc-ink); }
.pic-eyes { fill: var(--kc-eye); }
.pic-lens { fill: #3a4a45; }
.pic-lens-core { fill: #8fb3a5; }
.pic-button { fill: #9aa8a2; }
.board__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.board__name { font-weight: 600; font-size: 18px; }
.board__model { font-size: 14px; font-weight: 500; color: var(--kc-leaf-strong); line-height: 1.35; }
.board__hint { font-size: 15px; color: var(--kc-ink-soft); line-height: 1.4; margin-top: 2px; }
.step__lead { margin: 0 0 14px; color: var(--kc-ink-soft); }
.boards__empty { grid-column: 1 / -1; margin: 0; color: var(--kc-signal); }
.board__version { font-size: 13px; color: var(--kc-ink-soft); margin-top: 4px; min-height: 1em; }

/* Install button */
.install {
  font: inherit; font-weight: 600; font-size: 17px;
  padding: 14px 22px;
  min-height: 52px;
  border: 0; border-radius: var(--kc-radius-control);
  color: #fff; background: var(--kc-leaf);
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.install:hover:not(:disabled) { background: var(--kc-leaf-strong); }
.install:disabled { color: var(--kc-ink-soft); background: #e3e9e6; cursor: not-allowed; }

/* Plugged-in status under the install button (returning users only) */
.port-status { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; font-size: 15px; color: var(--kc-ink-soft); }
.port-status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; flex: none; background: #b9c4bf; }
.port-status[data-state="on"] { color: var(--kc-leaf-strong); font-weight: 500; }
.port-status[data-state="on"]::before { background: var(--kc-leaf); box-shadow: 0 0 0 3px var(--kc-leaf-tint); }

.notice {
  margin: 0; padding: 14px 16px; max-width: 60ch;
  border-radius: var(--kc-radius-control);
  background: #fdf1ea; color: #7a2a07; border-left: 3px solid var(--kc-signal);
}
.note {
  margin: 20px 0 0; padding: 14px 16px; max-width: 60ch;
  font-size: 15px; color: var(--kc-ink-soft);
  background: var(--kc-surface); border: 1px solid var(--kc-line); border-radius: var(--kc-radius-control);
}

/* Help */
.help { padding: 28px 0 8px; border-top: 1px solid var(--kc-line); }
.help h2 { font-size: 22px; font-weight: 650; margin: 0 0 12px; }
details {
  background: var(--kc-surface);
  border: 1px solid var(--kc-line);
  border-radius: var(--kc-radius-control);
  margin: 8px 0;
}
summary { cursor: pointer; padding: 12px 16px; font-weight: 500; list-style-position: inside; }
summary::marker { color: var(--kc-leaf); }
details[open] summary { border-bottom: 1px solid var(--kc-line); }
details p { margin: 12px 16px; max-width: 62ch; font-size: 16px; }

/* Same footer line as the console (manager-web VersionFooter.vue) */
.footer { max-width: 760px; margin: 0 auto; padding: 32px 16px 40px; font-size: 13px; color: var(--kc-ink-soft); text-align: center; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero { gap: 18px; padding-top: 28px; }
  .hero__ball { width: 52px; height: 52px; box-shadow: 0 0 0 8px var(--kc-petal); margin-left: 8px; }
  .lead { font-size: 16px; }
  .step { padding: 22px 0 26px 44px; }
  .step::before { top: 22px; width: 32px; height: 32px; font-size: 16px; }
  .step h2 { font-size: 22px; margin-top: 2px; }
  .boards { grid-template-columns: 1fr; }
  .install { width: 100%; }
  .topbar__link { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .ball-eyes--blink { animation: none; }
  .board, .install { transition: none; }
}
