/* ============================================================================
   Tacit — design system
   Bone-white gallery canvas, ink graphite, one ultramarine accent.
   Display: Space Grotesk (self-hosted variable). Body: Inter (self-hosted variable).
   ========================================================================= */

@font-face {
  font-family: "InterVar";
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: "GroteskVar";
  src: url("/assets/fonts/space-grotesk-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
  font-style: normal;
}

:root {
  --bone: #f6f4f0;
  --paper: #fffdfa;
  --ink: #14161a;
  --ink-70: #4a5058;
  --ink-45: #868d96;
  --line: #e4e0d8;
  --line-soft: #eeebe4;
  --ion: #2437e8;
  --ion-deep: #131e96;
  --ion-wash: #eceefd;
  --moss: #4a6350;
  --graphite: #3a3d42;
  --ok: #0f7a52;

  --banner-h: 34px;
  --nav-h: 62px;

  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 56px);
  --r-s: 8px;
  --r-m: 16px;
  --r-l: 26px;

  --shadow-s: 0 1px 2px rgba(20, 22, 26, 0.05), 0 6px 18px rgba(20, 22, 26, 0.05);
  --shadow-m: 0 2px 6px rgba(20, 22, 26, 0.06), 0 22px 50px rgba(20, 22, 26, 0.09);
}

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

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

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: "InterVar", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.005em;
  font-feature-settings: "cv05" 1, "ss03" 1;
  padding-top: calc(var(--banner-h) + var(--nav-h));
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: "GroteskVar", "InterVar", system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }

.wrap {
  width: min(100% - calc(var(--gutter) * 2), var(--wrap));
  margin-inline: auto;
}

.eyebrow {
  font-family: "GroteskVar", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ion);
}

.lede { font-size: clamp(16px, 1.5vw, 19px); color: var(--ink-70); max-width: 58ch; }

/* ---------- demo banner ribbon -------------------------------------------- */

.ribbon {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--banner-h);
  z-index: 60;
  background: var(--ink);
  color: var(--bone);
  display: flex;
  align-items: center;
  overflow: hidden;
}
.ribbon-track {
  display: flex;
  width: max-content;
  animation: ribbon 42s linear infinite;
}
.ribbon:hover .ribbon-track { animation-play-state: paused; }
.ribbon-chunk {
  display: flex;
  align-items: center;
  gap: 34px;
  padding-right: 34px;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(246, 244, 240, 0.82);
  font-family: "GroteskVar", sans-serif;
}
.ribbon-chunk b { color: var(--bone); font-weight: 600; }
.ribbon-chunk i {
  font-style: normal;
  width: 5px;
  height: 5px;
  background: var(--ion);
  display: inline-block;
}
@keyframes ribbon {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ribbon-track { animation: none; }
}

/* ---------- navigation ---------------------------------------------------- */

.nav {
  position: fixed;
  top: var(--banner-h);
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 55;
  background: rgba(246, 244, 240, 0.88);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-in {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 34px;
}
.brand { display: flex; align-items: center; text-decoration: none; }
.brand svg { height: 19px; width: auto; }
.nav-links {
  display: flex;
  gap: 28px;
  margin-left: 8px;
  font-size: 14.5px;
  color: var(--ink-70);
}
.nav-links a { text-decoration: none; padding: 6px 0; transition: color 0.15s; }
.nav-links a:hover { color: var(--ink); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }

.login-ctl {
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 999px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-45);
  text-decoration: none;
  cursor: not-allowed;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.login-ctl::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-45);
}
.login-ctl[data-active="true"] {
  cursor: pointer;
  color: var(--ink);
  border-color: var(--ink);
  background: transparent;
}
.login-ctl[data-active="true"]::before { background: var(--ion); }
.login-ctl[data-active="true"]:hover { background: var(--ink); color: var(--bone); }
.login-ctl[data-active="true"]:hover::before { background: var(--bone); }

/* ---------- buttons ------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  border-radius: 999px;
  padding: 13px 26px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--ink); color: var(--bone); }
.btn-primary:hover { background: var(--ion); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }
.link-arrow {
  font-size: 15px;
  color: var(--ion);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
}
.link-arrow:hover { text-decoration: underline; }

/* ---------- hero ---------------------------------------------------------- */

.hero { padding: clamp(38px, 5.5vw, 74px) 0 clamp(34px, 4vw, 54px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.hero h1 {
  font-size: clamp(40px, 4.7vw, 64px);
  margin: 14px 0 18px;
}
.hero h1 em {
  font-style: normal;
  color: var(--ion);
}
.hero-sub { font-size: clamp(16px, 1.4vw, 18.5px); color: var(--ink-70); max-width: 46ch; }
.hero-price {
  margin-top: 26px;
  font-family: "GroteskVar", sans-serif;
  font-size: 15px;
  color: var(--ink-70);
}
.hero-price b { color: var(--ink); font-weight: 600; }
.hero-cta { display: flex; align-items: center; gap: 18px; margin-top: 14px; flex-wrap: wrap; }
.swatches { display: flex; align-items: center; gap: 10px; margin-top: 26px; }
.swatches span {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(20, 22, 26, 0.16);
}
.swatches small { font-size: 12.5px; color: var(--ink-45); margin-left: 6px; letter-spacing: 0.02em; }
.sw-bone { background: #ece5d8; }
.sw-graphite { background: #3a3d42; }
.sw-ion { background: #2437e8; }
.sw-moss { background: #4a6350; }

.hero-media {
  position: relative;
  border-radius: var(--r-l);
  overflow: hidden;
  background: linear-gradient(168deg, #fbf7ef 0%, #f0ece3 100%);
  aspect-ratio: 1 / 1;
  max-height: 560px;
  box-shadow: var(--shadow-s);
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; transform: scale(1.12); }
.hero-tag {
  position: absolute;
  left: 20px;
  bottom: 20px;
  background: rgba(255, 253, 250, 0.92);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-family: "GroteskVar", sans-serif;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-tag i {
  font-style: normal;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
}

/* ---------- section furniture --------------------------------------------- */

.section { padding: clamp(52px, 6.5vw, 96px) 0; }
.section-alt { background: var(--paper); border-block: 1px solid var(--line-soft); }
.section-ink { background: var(--ink); color: var(--bone); }
.section-ink h2, .section-ink h3 { color: var(--bone); }
.section-head { max-width: 62ch; margin-bottom: clamp(26px, 3vw, 42px); }
.section-head h2 { font-size: clamp(30px, 3.6vw, 46px); margin: 12px 0 14px; }
.section-ink .lede { color: rgba(246, 244, 240, 0.72); }

/* ---------- signature element: Sense Console ------------------------------ */

.console-grid {
  display: grid;
  grid-template-columns: minmax(0, 270px) minmax(0, 1fr);
  gap: clamp(26px, 4vw, 62px);
  align-items: center;
}

.phone {
  --screen: #0e1016;
  width: 100%;
  max-width: 250px;
  margin-inline: auto;
  aspect-ratio: 308 / 614;
  position: relative;
}
.phone svg { width: 100%; height: 100%; display: block; }
.phone-screen {
  position: absolute;
  inset: 2.12% 4.87%;
  border-radius: 34px;
  background: var(--screen);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: #f2f4f8;
  font-size: 13px;
}
.screen-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px 4px;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: rgba(242, 244, 248, 0.6);
  font-family: "GroteskVar", sans-serif;
}
.screen-bar .badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #7ee3b0;
}
.screen-bar .badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #35d68d;
}
.screen-bar[data-mode="cloud"] .badge { color: #ffd479; }
.screen-bar[data-mode="cloud"] .badge::before { background: #ffb02e; }

.screen-body { padding: 10px 17px 4px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.screen-title {
  font-family: "GroteskVar", sans-serif;
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.screen-note { font-size: 12.5px; color: rgba(242, 244, 248, 0.6); line-height: 1.45; }
.bubble {
  background: rgba(255, 255, 255, 0.07);
  border-radius: 14px 14px 14px 5px;
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(6px);
  animation: rise 0.32s ease forwards;
}
.bubble.out {
  background: rgba(36, 55, 232, 0.9);
  border-radius: 14px 14px 5px 14px;
  align-self: flex-end;
  max-width: 88%;
}
.bubble:nth-child(2) { animation-delay: 0.12s; }
.bubble:nth-child(3) { animation-delay: 0.26s; }
.bubble:nth-child(4) { animation-delay: 0.4s; }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .bubble { animation: none; opacity: 1; transform: none; }
}
.screen-foot {
  margin: auto 17px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding: 9px 0 18px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  overflow: hidden;
  white-space: nowrap;
  font-size: 9.5px;
  color: rgba(242, 244, 248, 0.5);
  font-family: "GroteskVar", sans-serif;
  letter-spacing: 0.03em;
}

.console-panel { min-width: 0; }
.task-chips { display: flex; flex-wrap: wrap; gap: 9px; margin: 4px 0 26px; }
.chip {
  font: inherit;
  font-size: 14px;
  padding: 9px 17px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-70);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: "GroteskVar", sans-serif;
}
.chip:hover { border-color: var(--ink-45); color: var(--ink); }
.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bone);
}
.chip.chip-cloud[aria-pressed="true"] { background: var(--ion); border-color: var(--ion); }

.readout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: var(--paper);
  overflow: hidden;
}
.readout div { padding: 20px; border-right: 1px solid var(--line-soft); }
.readout div:last-child { border-right: 0; }
.readout dt {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-45);
  font-family: "GroteskVar", sans-serif;
  margin-bottom: 8px;
}
.readout dd {
  margin: 0;
  font-family: "GroteskVar", sans-serif;
  font-size: clamp(20px, 2.2vw, 27px);
  font-weight: 600;
  letter-spacing: -0.03em;
}
.readout dd small { font-size: 14px; font-weight: 500; color: var(--ink-45); margin-left: 3px; }
.readout .val-on { color: var(--ok); }
.readout .val-cloud { color: var(--ion); }
.console-caption { margin-top: 14px; font-size: 13px; color: var(--ink-45); }

/* ---------- demo thesis: governed AI trace -------------------------------- */

.trace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(26px, 4vw, 60px);
  align-items: start;
}
.scenario { display: flex; flex-direction: column; gap: 9px; margin-top: 22px; }
.scenario button {
  font: inherit;
  text-align: left;
  padding: 15px 18px;
  border-radius: var(--r-m);
  border: 1px solid rgba(246, 244, 240, 0.16);
  background: rgba(246, 244, 240, 0.03);
  color: rgba(246, 244, 240, 0.74);
  cursor: pointer;
  transition: all 0.15s ease;
  display: block;
  width: 100%;
}
.scenario button strong {
  display: block;
  font-family: "GroteskVar", sans-serif;
  font-weight: 600;
  color: var(--bone);
  font-size: 15px;
  margin-bottom: 3px;
}
.scenario button span { font-size: 13px; line-height: 1.45; }
.scenario button:hover { border-color: rgba(246, 244, 240, 0.4); }
.scenario button[aria-pressed="true"] {
  border-color: var(--ion);
  background: rgba(36, 55, 232, 0.16);
  color: var(--bone);
}

.trace {
  border: 1px solid rgba(246, 244, 240, 0.14);
  border-radius: var(--r-l);
  padding: clamp(18px, 2.4vw, 28px);
  background: rgba(246, 244, 240, 0.03);
}
.trace-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px dashed rgba(246, 244, 240, 0.14);
}
.trace-row:last-child { border-bottom: 0; }
.trace-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(246, 244, 240, 0.28);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-family: "GroteskVar", sans-serif;
  color: rgba(246, 244, 240, 0.55);
}
.trace-name {
  font-family: "GroteskVar", sans-serif;
  font-size: 14.5px;
  color: rgba(246, 244, 240, 0.92);
}
.trace-name em { display: block; font-style: normal; font-size: 12.5px; color: rgba(246, 244, 240, 0.5); }
.trace-state {
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: "GroteskVar", sans-serif;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(246, 244, 240, 0.2);
  color: rgba(246, 244, 240, 0.55);
  white-space: nowrap;
}
.trace-row[data-state="pass"] .trace-state { color: #7ee3b0; border-color: rgba(126, 227, 176, 0.45); }
.trace-row[data-state="pass"] .trace-dot { border-color: rgba(126, 227, 176, 0.5); color: #7ee3b0; }
.trace-row[data-state="block"] .trace-state { color: #ff9a8b; border-color: rgba(255, 154, 139, 0.5); background: rgba(255, 154, 139, 0.1); }
.trace-row[data-state="block"] .trace-dot { border-color: rgba(255, 154, 139, 0.6); color: #ff9a8b; }
.trace-row[data-state="skip"] { opacity: 0.4; }
.trace-out {
  margin-top: 16px;
  border-radius: var(--r-m);
  padding: 15px 17px;
  font-size: 14px;
  line-height: 1.5;
  background: rgba(246, 244, 240, 0.06);
  color: rgba(246, 244, 240, 0.85);
}
.trace-out[data-kind="block"] { background: rgba(255, 154, 139, 0.12); color: #ffc9c0; }
.demo-note {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(246, 244, 240, 0.42);
  font-family: "GroteskVar", sans-serif;
  margin-top: 16px;
}

/* ---------- lineup -------------------------------------------------------- */

.lineup {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.device {
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: var(--paper);
  padding: 26px 26px 24px;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.device:hover { box-shadow: var(--shadow-m); transform: translateY(-3px); }
.device-art {
  height: 210px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: var(--r-m);
  background: radial-gradient(120% 90% at 50% 10%, #f7f4ee 0%, #efebe2 100%);
}
.device-art svg { height: 190px; width: auto; }
.device h3 { font-size: 22px; }
.device .device-claim { font-size: 14.5px; color: var(--ink-70); margin: 8px 0 16px; }
.device-specs {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  font-size: 13.5px;
  color: var(--ink-70);
  display: grid;
  gap: 6px;
}
.device-specs li { display: flex; gap: 8px; }
.device-specs li::before { content: ""; width: 5px; height: 5px; background: var(--ion); margin-top: 8px; flex: none; }
.device-foot {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-top: 1px solid var(--line-soft);
  padding-top: 16px;
}
.device-price { font-family: "GroteskVar", sans-serif; font-weight: 600; font-size: 18px; }
.device-price small { font-weight: 400; color: var(--ink-45); font-size: 12.5px; display: block; letter-spacing: 0.02em; }

/* ---------- feature bands -------------------------------------------------- */

.band {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(26px, 4vw, 62px);
  align-items: center;
}
.band + .band { margin-top: clamp(46px, 6vw, 86px); }
.band-media {
  border-radius: var(--r-l);
  overflow: hidden;
  aspect-ratio: 4 / 3.4;
  background: var(--line-soft);
  box-shadow: var(--shadow-s);
}
.band-media img { width: 100%; height: 100%; object-fit: cover; }
.band.rev .band-media { order: 2; }
.band h3 { font-size: clamp(24px, 2.7vw, 34px); margin: 12px 0 14px; }
.band p { color: var(--ink-70); font-size: 16.5px; }
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.stats b {
  display: block;
  font-family: "GroteskVar", sans-serif;
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 600;
  letter-spacing: -0.03em;
}
.stats span { font-size: 12.5px; color: var(--ink-45); letter-spacing: 0.02em; }

.feature-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 14px; }
.feature-list li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; font-size: 15.5px; color: var(--ink-70); }
.feature-list b { color: var(--ink); font-weight: 600; }
.feature-list .fi {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--ion-wash);
  display: grid;
  place-items: center;
  margin-top: 2px;
}
.feature-list .fi::after { content: ""; width: 7px; height: 7px; background: var(--ion); }

/* ---------- studios -------------------------------------------------------- */

.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(26px, 4vw, 56px);
  align-items: center;
}
.studio-media { border-radius: var(--r-l); overflow: hidden; box-shadow: var(--shadow-s); }
.studio-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.studio-list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.studio-list li { background: var(--bone); padding: 15px 18px; }
.studio-list b { display: block; font-family: "GroteskVar", sans-serif; font-size: 15px; font-weight: 600; }
.studio-list span { font-size: 12.5px; color: var(--ink-45); }
.hours { margin-top: 18px; font-size: 14px; color: var(--ink-70); }

/* ---------- footer --------------------------------------------------------- */

.foot { background: var(--ink); color: rgba(246, 244, 240, 0.62); padding: clamp(44px, 5vw, 72px) 0 34px; }
.foot-top { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 34px; }
.foot svg { height: 20px; width: auto; }
.foot h4 { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--bone); margin-bottom: 14px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 14px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--bone); }
.foot-note {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid rgba(246, 244, 240, 0.14);
  font-size: 12.5px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  color: rgba(246, 244, 240, 0.45);
}
.foot-blurb { font-size: 14px; margin-top: 16px; max-width: 34ch; }

/* ---------- chat widget ---------------------------------------------------- */

#chatLaunch {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 70;
  font: inherit;
  font-family: "GroteskVar", sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--bone);
  background: var(--ink);
  /* 1px bone ring keeps the ink pill legible when it floats over an ink section. */
  border: 1px solid rgba(246, 244, 240, 0.28);
  border-radius: 999px;
  padding: 13px 21px 13px 17px;
  cursor: pointer;
  box-shadow: var(--shadow-m);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: background 0.15s ease, transform 0.15s ease;
}
#chatLaunch::before {
  content: "";
  width: 9px;
  height: 9px;
  background: var(--ion);
}
#chatLaunch:hover { background: var(--ion-deep); transform: translateY(-2px); }

#chatPanel {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  width: min(384px, calc(100vw - 32px));
  height: min(560px, calc(100vh - 120px));
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  box-shadow: var(--shadow-m);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.985);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
#chatPanel.open { opacity: 1; visibility: visible; transform: none; }
#chatPanel > header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bone);
}
#chatPanel > header > span:first-child {
  font-family: "GroteskVar", sans-serif;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 9px;
}
#chatPanel > header > span:first-child::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--ion);
}
.chat-sub { font-size: 11.5px; color: var(--ink-45); letter-spacing: 0.02em; }
#chatClose {
  margin-left: auto;
  background: transparent;
  border: 0;
  font-size: 21px;
  line-height: 1;
  color: var(--ink-45);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
}
#chatClose:hover { color: var(--ink); background: var(--line-soft); }

#chatLog {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  background: var(--paper);
}
.msg {
  max-width: 88%;
  padding: 11px 14px;
  border-radius: 16px;
  font-size: 14.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.msg.user { align-self: flex-end; background: var(--ink); color: var(--bone); border-bottom-right-radius: 5px; }
.msg.bot { align-self: flex-start; background: var(--bone); border: 1px solid var(--line-soft); border-bottom-left-radius: 5px; }
.msg.system {
  align-self: stretch;
  max-width: 100%;
  font-size: 13.5px;
  border-radius: var(--r-s);
  background: #fdeeea;
  color: #97341f;
  border: 1px solid #f6cdc2;
}
.msg.typing { color: var(--ink-45); font-style: italic; background: transparent; border: 0; }
.msg-sources { display: block; margin-top: 7px; font-size: 11.5px; color: var(--ink-45); }

#chatForm { display: flex; gap: 9px; padding: 12px; border-top: 1px solid var(--line-soft); background: var(--bone); }
#chatInput {
  flex: 1;
  font: inherit;
  font-size: 14.5px;
  padding: 11px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  min-width: 0;
}
#chatInput:focus { outline: 2px solid var(--ion); outline-offset: -1px; border-color: transparent; }
#chatSend {
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 11px 18px;
  border-radius: 999px;
  border: 0;
  background: var(--ink);
  color: var(--bone);
  cursor: pointer;
}
#chatSend:disabled { opacity: 0.45; cursor: progress; }

/* ---------- responsive ------------------------------------------------------ */

@media (max-width: 1080px) {
  .nav-links { display: none; }
}
@media (max-width: 900px) {
  body { font-size: 16.5px; }
  .hero-grid,
  .console-grid,
  .trace-grid,
  .band,
  .studio-grid { grid-template-columns: minmax(0, 1fr); }
  .band.rev .band-media { order: 0; }
  .hero-media { max-height: 420px; aspect-ratio: 4 / 3; }
  .hero-media img { object-position: 50% 45%; }
  .lineup { grid-template-columns: minmax(0, 1fr); }
  .device-art { height: 180px; }
  .device-art svg { height: 165px; }
  .foot-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .readout { grid-template-columns: minmax(0, 1fr); }
  .readout div { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .readout div:last-child { border-bottom: 0; }
}
@media (max-width: 560px) {
  .studio-list { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .foot-top { grid-template-columns: minmax(0, 1fr); }
  #chatPanel { right: 12px; left: 12px; bottom: 12px; width: auto; height: min(72vh, 540px); }
  #chatLaunch { right: 14px; bottom: 14px; }
}
