/* ============================================================
   Kindling V2 blend layer
   The V2 page is the original markup with every colour routed
   through the original page variables (--ref-*). Each group below
   swaps a set of those variables for kit 0.6.0 values. The groups
   are switched on and off from <html data-blend="...">.
   With every group off, V2 renders the same as the original.
   ============================================================ */

/* Ink: the kit Ink replaces the warm near-ink for text. */
html[data-blend~="ink"] [data-direction="kindling"] {
  --ref-n-900: #001721; /* neutral.ink */
  --ref-n-950: #001721;
}

/* Paper: the lightest neutral step becomes Paper. */
html[data-blend~="paper"] [data-direction="kindling"] {
  --ref-n-0: #FFFCF6; /* neutral.paper */
}

/* Lagoon: the teal ramp moves to the kit's Lagoon steps.
   teal-100 and teal-50 have no kit step and stay. */
html[data-blend~="lagoon"] [data-direction="kindling"] {
  --ref-teal-700: #005861; /* lagoon.deep */
  --ref-teal-500: #147681; /* lagoon.strong */
  --ref-teal-400: #59AFBA; /* lagoon.centre */
  --ref-teal-300: #85DBE6; /* lagoon.light */
  --fn-info: #147681;
}

/* Ember: burnt orange moves to the kit's Ember steps.
   ember-800, -100 and -50 have no kit step and stay. */
html[data-blend~="ember"] [data-direction="kindling"] {
  --ref-ember-900: #783A00; /* ember.deep */
  --ref-ember-700: #A05000; /* ember.strong */
  --ref-ember-500: #F88114; /* ember.centre */
  --ref-ember-400: #FF903C; /* ember.bright */
  --ref-ember-300: #FFB98B; /* ember.light */
}

/* Ink ground: the dark teal grounds become the kit's Ink surfaces. */
html[data-blend~="ground"] [data-direction="kindling"] {
  --ref-teal-950: #001721; /* dark color.background */
  --ref-teal-900: #022331; /* dark color.surface */
  --ref-teal-800: #213C49; /* dark color.border */
}

/* Lagoon leads on Paper: the theme-pairing rule applied to the page's
   accent. Ember marks (dots, the spark) keep their own variables. */
html[data-blend~="accent"] [data-direction="kindling"] {
  --accent: var(--ref-teal-500);
  --accent-warm: var(--ref-teal-700);
  --accent-soft: var(--ref-teal-100);
}

/* Copy: drop the "literal flame logo" line (decided 15 Nov 2026). */
html[data-blend~="copy"] [data-blend-copy="flame"] { display: none; }

/* ---------- The switch panel itself ---------- */
.blend-panel {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  width: min(320px, calc(100vw - 32px));
  background: rgba(14, 12, 9, .9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(250, 246, 241, .12);
  border-radius: 14px;
  color: #FAF6F1;
  font: 12px/1.4 "JetBrains Mono", ui-monospace, monospace;
  box-shadow: 0 12px 40px -12px rgba(14, 12, 9, .6);
}
.blend-panel summary {
  cursor: pointer;
  padding: 12px 14px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 11px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.blend-panel summary::-webkit-details-marker { display: none; }
.blend-panel__count { color: #A99B85; }
.blend-panel__body { padding: 0 14px 14px; display: grid; gap: 8px; }
.blend-panel label { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; cursor: pointer; }
.blend-panel input { margin-top: 2px; accent-color: #ED7A3D; }
.blend-panel label b { font-weight: 600; display: block; }
.blend-panel small { color: #A99B85; font-size: 11px; }
.blend-panel__actions { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.blend-panel__actions button {
  background: transparent;
  color: #FAF6F1;
  border: 1px solid rgba(250, 246, 241, .2);
  border-radius: 999px;
  padding: 6px 10px;
  font: inherit;
  font-size: 11px;
}
.blend-panel__actions button:hover { border-color: #ED7A3D; }

.blend-panel { max-height: calc(100vh - 32px); overflow-y: auto; }
.blend-panel__intro { margin: 0; color: #E5DCCC; font-size: 11px; }
.blend-panel__row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: start; }
.blend-panel__see, .blend-panel__hold {
  background: transparent;
  color: #FAF6F1;
  border: 1px solid rgba(250, 246, 241, .2);
  border-radius: 999px;
  padding: 4px 8px;
  font: inherit;
  font-size: 10px;
  white-space: nowrap;
}
.blend-panel__hold { padding: 8px 10px; font-size: 11px; user-select: none; -webkit-user-select: none; touch-action: none; }
.blend-panel__see:hover, .blend-panel__hold:hover { border-color: #ED7A3D; }
.blend-panel__hold:active { background: #ED7A3D; color: #0A1F22; }
@keyframes blend-flash { 0% { box-shadow: inset 0 0 0 3px #ED7A3D; } 100% { box-shadow: inset 0 0 0 3px transparent; } }
section.s.blend-flash { animation: blend-flash 1.6s ease-out; scroll-margin-top: 64px; }
section.s { scroll-margin-top: 64px; }
