/* Foreable hub. The launch's language, turned down to the subconscious:
   charcoal, glass with fine rims, a faint warmth from below. Gold marks only what is active, live or confirmed. */

:root {
  --bg: #111316;
  --bg-raise: #15171b;
  --glass: rgba(255, 255, 255, 0.026);
  --glass-2: rgba(255, 255, 255, 0.045);
  --glass-3: rgba(255, 255, 255, 0.07);
  --rim: rgba(255, 255, 255, 0.07);
  --rim-2: rgba(255, 255, 255, 0.11);
  --text: #E8E6E1;
  --text-2: #A4A6AA;
  --text-3: #6F7277;
  --gold: #E2C27E;
  --gold-2: #C9A55A;
  --gold-wash: rgba(226, 194, 126, 0.10);
  --gold-rim: rgba(226, 194, 126, 0.32);
  --chart: #B48E3E;             /* validated against the dark surface */
  --danger: #E08B7B;
  --focus: rgba(226, 194, 126, 0.55);

  --strip: 56px;
  --top: 56px;
  --side: 300px;
  --assist: 360px;
  --column: 700px;
  --radius: 12px;
  --radius-s: 8px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --fast: 160ms;
  --mid: 220ms;

  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --display: 'Sora', 'Inter', -apple-system, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
/* a faint warmth from below and a hint of mist: nobody should consciously notice it */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(90% 55% at 50% 118%, rgba(214, 178, 100, 0.06), transparent 62%),
    radial-gradient(60% 40% at 12% 110%, rgba(214, 178, 100, 0.035), transparent 70%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.008' numOctaves='3' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 0.95 0 0 0 0 0.85 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 660px 660px;
}

a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
/* fields whose container already shows focus */
.as-input textarea:focus-visible, .reply textarea:focus-visible, .search input:focus-visible { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -40px; z-index: 100; background: var(--bg-raise); padding: 8px 12px; border-radius: 8px; border: 1px solid var(--rim-2); }
.skip:focus { top: 12px; }

.i { display: inline-flex; width: 18px; height: 18px; flex: none; }
.i svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ───────── Strip ───────── */
.strip {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--strip);
  z-index: 40;
  border-right: 1px solid var(--rim);
  background: rgba(17, 19, 22, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px;
}
.strip-fog {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 34% at 50% 100%, rgba(214, 178, 100, 0.10), transparent 75%),
    radial-gradient(100% 20% at 50% 62%, rgba(214, 178, 100, 0.03), transparent 80%);
}
.mark {
  position: relative;
  z-index: 1;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 0; border-radius: 10px;
  background: transparent;
  color: var(--text-2);
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.mark svg { width: 22px; height: 22px; fill: currentColor; }
.mark svg .stem { fill: var(--gold-2); opacity: 0.8; }
.mark:hover, .mark[aria-expanded="true"] { background: var(--glass-2); color: var(--text); }
.mark-mobile { display: none; }

/* ───────── Top bar ───────── */
.topbar {
  position: fixed;
  top: 0; left: var(--strip); right: 0;
  height: var(--top);
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid var(--rim);
  background: rgba(17, 19, 22, 0.72);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
}
.sections { grid-column: 2; display: flex; gap: 10px; }
.sections a {
  position: relative;
  width: 46px; height: 40px;
  display: grid; place-items: center;
  border-radius: 10px;
  color: var(--text-3);
  transition: color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.sections a .i { width: 22px; height: 22px; }
.sections a:hover { color: var(--text-2); background: var(--glass); }
.sections a[aria-current="page"] { color: var(--gold); }
.sections a[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: -9px; left: 12px; right: 12px;
  height: 2px; border-radius: 2px;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(226, 194, 126, 0.55);
}
.main:focus, .main:focus-visible { outline: none; }
@media (min-width: 1181px) { .ask-toggle { display: none !important; } }
.topbar-end { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 10px; }

.tenant { position: relative; }
.tenant-btn {
  display: flex; align-items: center; gap: 10px;
  height: 36px; padding: 0 6px 0 12px;
  border: 1px solid var(--rim); border-radius: 10px;
  background: var(--glass);
  color: var(--text-2);
  transition: border-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.tenant-btn:hover { color: var(--text); border-color: var(--rim-2); }
.avatar {
  display: inline-grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
  flex: none;
}
.menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 260px;
  padding: 6px;
  border: 1px solid var(--rim-2); border-radius: var(--radius);
  background: rgba(24, 26, 30, 0.92);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  animation: pop var(--fast) var(--ease);
}
.menu-label { padding: 8px 10px 4px; color: var(--text-3); font-size: 12px; }
.menu button {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; text-align: left;
}
.menu button:hover, .menu button:focus-visible { background: var(--glass-2); }
.menu .sub { color: var(--text-3); font-size: 12px; }
.menu .check { margin-left: auto; color: var(--gold); }

.ask-toggle {
  display: flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 12px;
  border: 1px solid var(--rim); border-radius: 10px;
  background: var(--glass); color: var(--text-2);
}
.ask-toggle:hover, .ask-toggle[aria-expanded="true"] { color: var(--text); border-color: var(--rim-2); }

/* ───────── Sidebar: glass, slides over the content ───────── */
.sidebar {
  position: fixed;
  top: 0; bottom: 0; left: var(--strip);
  width: var(--side);
  z-index: 35;
  display: flex; flex-direction: column;
  border-right: 1px solid var(--rim-2);
  background: rgba(21, 23, 27, 0.74);
  backdrop-filter: blur(22px) saturate(130%);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
  box-shadow: 18px 0 60px rgba(0, 0, 0, 0.35);
  transform: translateX(calc(-100% - var(--strip)));
  visibility: hidden;
  transition: transform var(--mid) var(--ease), visibility 0s linear var(--mid);
}
.sidebar::before {   /* the misty glow inside the glass */
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(110% 35% at 20% 100%, rgba(214, 178, 100, 0.09), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 30%);
}
.sidebar.open { transform: none; visibility: visible; transition: transform var(--mid) var(--ease), visibility 0s; }
.side-head { position: relative; padding: 16px 16px 10px; }
.side-title { margin: 0 0 12px; font: 500 13px/1 var(--sans); color: var(--text-3); letter-spacing: 0.04em; text-transform: uppercase; }
.side-body { position: relative; flex: 1; overflow-y: auto; padding: 0 8px 16px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.08) transparent; }
.scrim { position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, 0.35); }

.search {
  display: flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 10px;
  border: 1px solid var(--rim); border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-3);
}
.search:focus-within { border-color: var(--gold-rim); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); }
.search input::placeholder { color: var(--text-3); }
.search kbd { font: 11px var(--sans); color: var(--text-3); border: 1px solid var(--rim); border-radius: 5px; padding: 1px 5px; }

.filters { display: flex; gap: 4px; margin-top: 10px; }
.filters button {
  flex: 1;
  height: 30px; border: 1px solid transparent; border-radius: 8px;
  background: transparent; color: var(--text-3); font-size: 13px;
  transition: color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.filters button:hover { color: var(--text-2); }
.filters button[aria-pressed="true"] { color: var(--text); background: var(--glass-2); border-color: var(--rim); }
.filters .n { color: var(--text-3); margin-left: 4px; font-size: 12px; }

.case-list { list-style: none; margin: 0; padding: 0; }
.case-item {
  display: block; width: 100%;
  padding: 10px 10px 11px; margin: 1px 0;
  border: 1px solid transparent; border-radius: 10px;
  background: transparent; text-align: left; text-decoration: none;
  transition: background var(--fast) var(--ease);
}
.case-item:hover { background: var(--glass-2); }
.case-item[aria-current="true"] { background: var(--glass-3); border-color: var(--rim); }
.case-item .row { display: flex; align-items: baseline; gap: 8px; }
.case-item .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.case-item .when { color: var(--text-3); font-size: 12px; flex: none; }
.case-item .subj { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.case-item .snip { color: var(--text-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; align-self: center; background: transparent; }
.dot.live { background: var(--gold); box-shadow: 0 0 8px rgba(226, 194, 126, 0.7); }
.dot.answered { background: var(--text-3); }
.lang { font-size: 10px; letter-spacing: 0.06em; color: var(--text-3); border: 1px solid var(--rim); border-radius: 4px; padding: 0 4px; line-height: 15px; }
.more { width: 100%; margin-top: 6px; height: 34px; border: 1px dashed var(--rim); border-radius: 10px; background: transparent; color: var(--text-3); }
.more:hover { color: var(--text-2); border-color: var(--rim-2); }
.empty { padding: 24px 12px; color: var(--text-3); text-align: center; }

.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-list a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; margin: 2px 0;
  border-radius: 10px; text-decoration: none; color: var(--text-2);
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.nav-list a:hover { background: var(--glass-2); color: var(--text); }
.nav-list a[aria-current="page"] { background: var(--glass-3); color: var(--text); }
.nav-list a[aria-current="page"] .i { color: var(--gold); }
.nav-list .hint { margin-left: auto; color: var(--text-3); font-size: 12px; }

/* ───────── Main column ───────── */
.main {
  position: relative; z-index: 1;
  min-height: 100vh;
  padding: calc(var(--top) + 36px) 32px 64px calc(var(--strip) + 32px);
}
body.has-assistant .main { padding-right: calc(var(--assist) + 32px); }
.column { max-width: var(--column); margin: 0 auto; }
.column.wide { max-width: 760px; }
.eyebrow { color: var(--text-3); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 8px; }
h1.title { margin: 0; font: 500 22px/1.3 var(--display); letter-spacing: -0.01em; }
h2.h2 { margin: 40px 0 14px; font: 500 15px/1.3 var(--sans); color: var(--text); }
.lede { color: var(--text-2); margin: 8px 0 0; }
.muted { color: var(--text-3); }
.gold { color: var(--gold); }

/* ── Case thread ── */
.case-head { padding-bottom: 22px; border-bottom: 1px solid var(--rim); }
.case-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 10px; color: var(--text-2); }
.ext { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; border-bottom: 1px solid var(--rim-2); }
.ext:hover { color: var(--text); border-color: var(--text-3); }
.ext .i { width: 12px; height: 12px; color: var(--text-3); }
.status { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); }
.thread { list-style: none; margin: 0; padding: 8px 0 0; }
.msg { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 18px 0 4px; }
.msg .who { display: flex; align-items: baseline; gap: 8px; }
.msg .name { font-weight: 500; }
.msg .role { color: var(--text-3); font-size: 12px; }
.msg .time { color: var(--text-3); font-size: 12px; margin-left: auto; }
.msg .body { color: var(--text); white-space: pre-wrap; margin-top: 3px; }
.msg.bot .body { color: var(--text-2); }
.msg.seller .bubble { margin-top: 6px; padding: 12px 14px; border: 1px solid var(--rim); border-radius: var(--radius); background: var(--glass); }
.msg.seller .bubble .body { margin: 0; }
.msg .avatar.bot { background: transparent; border: 1px solid var(--rim-2); }
.msg .avatar.bot svg { width: 14px; height: 14px; fill: var(--text-2); }
.msg .avatar.bot svg .stem { fill: var(--gold-2); }
.msg .avatar.me { background: var(--gold-wash); color: var(--gold); }
.msg.fresh { animation: rise var(--mid) var(--ease); }
.event { display: flex; align-items: center; gap: 10px; padding: 16px 0 2px 42px; color: var(--text-3); font-size: 13px; }
.event .i { width: 15px; height: 15px; }
.event.confirmed { color: var(--text-2); }
.event.confirmed .i { color: var(--gold); }
.event .line { flex: 1; height: 1px; background: var(--rim); }

.reply {
  margin-top: 30px;
  border: 1px solid var(--rim); border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.022);
  transition: border-color var(--fast) var(--ease);
}
.reply:focus-within { border-color: var(--rim-2); }
.reply-from { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 10px 14px; border-bottom: 1px solid var(--rim); color: var(--text-3); font-size: 13px; }
.reply-from b { color: var(--text-2); font-weight: 500; }
.reply textarea { display: block; width: 100%; min-height: 110px; resize: vertical; padding: 14px; border: 0; background: transparent; color: var(--text); line-height: 1.6; }
.reply textarea::placeholder { color: var(--text-3); }
.signature { padding: 0 14px 12px; color: var(--text-3); white-space: pre-wrap; font-size: 13px; }
.reply-foot { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; border-top: 1px solid var(--rim); color: var(--text-3); font-size: 12px; }
.reply-foot .spacer { flex: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 34px; padding: 0 14px;
  border: 1px solid var(--rim-2); border-radius: 9px;
  background: var(--glass-2); color: var(--text);
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.btn:hover { border-color: rgba(255, 255, 255, 0.2); background: var(--glass-3); }
.btn.primary { border-color: var(--gold-rim); color: var(--gold); background: var(--gold-wash); }
.btn.primary:hover { border-color: rgba(226, 194, 126, 0.55); }
.btn.quiet { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.quiet:hover { color: var(--text); background: var(--glass-2); }
.btn.danger { color: var(--danger); border-color: rgba(224, 139, 123, 0.3); background: transparent; }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn .i { width: 16px; height: 16px; }

/* ── Analytics ── */
.figures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 28px; border: 1px solid var(--rim); border-radius: var(--radius); overflow: hidden; background: var(--rim); }
.figure { padding: 18px 18px 16px; background: rgba(19, 21, 25, 0.92); }
.figure .label { color: var(--text-3); font-size: 12.5px; }
.figure .value { margin-top: 6px; font: 500 26px/1.1 var(--display); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.figure .delta { margin-top: 6px; color: var(--text-3); font-size: 12.5px; }
.chart-wrap { margin-top: 26px; }
.chart-title { display: flex; justify-content: space-between; color: var(--text-3); font-size: 12.5px; margin-bottom: 8px; }
.chart { position: relative; height: 120px; }
.chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.chart .grid { stroke: rgba(255, 255, 255, 0.06); stroke-width: 1; }
.chart .bar { fill: rgba(255, 255, 255, 0.16); }
.chart .bar.hover { fill: var(--chart); }   /* gold only marks what you point at */
.chart .axis { fill: var(--text-3); font: 11px var(--sans); }
.tip { position: absolute; pointer-events: none; padding: 6px 9px; border: 1px solid var(--rim-2); border-radius: 8px; background: rgba(24, 26, 30, 0.95); font-size: 12px; white-space: nowrap; transform: translate(-50%, -100%); margin-top: -8px; }
.observations { list-style: none; margin: 0; padding: 0; }
.observations li { padding: 16px 0; border-top: 1px solid var(--rim); color: var(--text); line-height: 1.65; }
.observations li:first-child { border-top: 0; }
.observations .src { display: block; margin-top: 6px; color: var(--text-3); font-size: 12.5px; }
.observations .src a { color: var(--text-2); text-decoration: none; border-bottom: 1px solid var(--rim-2); }
.observations .src a:hover { color: var(--text); }

.bill-total { display: flex; align-items: baseline; gap: 14px; margin-top: 20px; }
.bill-total .value { font: 500 40px/1 var(--display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.split { display: flex; gap: 24px; margin-top: 10px; color: var(--text-2); }
.split b { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.lines { border: 1px solid var(--rim); border-radius: var(--radius); overflow: hidden; }
.line-item { border-top: 1px solid var(--rim); }
.line-item:first-child { border-top: 0; }
.line-head {
  width: 100%; display: grid; grid-template-columns: 1fr auto auto 18px; align-items: center; gap: 16px;
  padding: 14px 16px; border: 0; background: transparent; text-align: left;
  transition: background var(--fast) var(--ease);
}
.line-head:hover { background: var(--glass); }
.line-head .what { font-weight: 500; }
.line-head .what small { display: block; color: var(--text-3); font-weight: 400; font-size: 12.5px; margin-top: 2px; }
.line-head .qty { color: var(--text-2); font-variant-numeric: tabular-nums; }
.line-head .amt { font-variant-numeric: tabular-nums; min-width: 80px; text-align: right; }
.line-head .chev { color: var(--text-3); transition: transform var(--fast) var(--ease); }
.line-head[aria-expanded="true"] .chev { transform: rotate(90deg); }
.line-detail { padding: 0 16px 14px; }
.trace { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rim-2); }
.trace li { display: grid; grid-template-columns: 70px 1fr auto; gap: 12px; padding: 6px 0 6px 14px; color: var(--text-2); font-size: 13px; }
.trace a { color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trace a:hover { text-decoration: underline; text-decoration-color: var(--text-3); }
.trace .amt { font-variant-numeric: tabular-nums; color: var(--text-3); }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-weight: 400; color: var(--text-3); font-size: 12.5px; padding: 0 0 8px; }
.table td { padding: 12px 0; border-top: 1px solid var(--rim); font-variant-numeric: tabular-nums; }
.table td.r, .table th.r { text-align: right; }
.paid { color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; }
.paid .i { width: 14px; height: 14px; color: var(--gold); }

/* ── Settings ── */
.panel { margin-top: 24px; border: 1px solid var(--rim); border-radius: var(--radius); background: rgba(255, 255, 255, 0.018); }
.panel + .panel { margin-top: 14px; }
.panel-row { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-top: 1px solid var(--rim); }
.panel-row:first-child { border-top: 0; }
.panel-row .grow { flex: 1; min-width: 0; }
.panel-row .t { font-weight: 500; }
.panel-row .d { color: var(--text-3); font-size: 13px; margin-top: 2px; }
.limit { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--text-2); font-size: 13px; }
.limit input, .field input, .field textarea, .field select {
  height: 34px; padding: 0 10px; border: 1px solid var(--rim); border-radius: 8px; background: rgba(255, 255, 255, 0.03); color: var(--text);
}
.limit input { width: 76px; text-align: right; font-variant-numeric: tabular-nums; }
.limit input:focus, .field input:focus, .field textarea:focus { border-color: var(--gold-rim); }
.switch { position: relative; width: 40px; height: 22px; flex: none; border: 0; border-radius: 11px; background: rgba(255, 255, 255, 0.1); transition: background var(--fast) var(--ease); }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #C9CACD; transition: transform var(--fast) var(--ease), background var(--fast) var(--ease); }
.switch[aria-checked="true"] { background: rgba(226, 194, 126, 0.35); }
.switch[aria-checked="true"]::after { transform: translateX(18px); background: var(--gold); }
.field { display: grid; gap: 6px; padding: 16px 18px; border-top: 1px solid var(--rim); }
.field:first-child { border-top: 0; }
.field label { color: var(--text-2); font-size: 13px; }
.field textarea { height: auto; min-height: 120px; padding: 10px; line-height: 1.6; resize: vertical; }
.verified { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 13px; }
.verified .i { width: 14px; height: 14px; color: var(--gold); }
.badge { font-size: 11px; color: var(--text-3); border: 1px solid var(--rim); border-radius: 5px; padding: 1px 6px; }
.badge.gold { color: var(--gold); border-color: var(--gold-rim); }
.snippet { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 6px 6px 6px 14px; border: 1px solid var(--rim); border-radius: 10px; background: rgba(0, 0, 0, 0.25); }
.snippet code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text-2); scrollbar-width: none; }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 12px 20px; padding: 18px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; }
.kbd-list { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; padding: 18px; color: var(--text-2); }
kbd.k { font: 11.5px var(--sans); color: var(--text-2); border: 1px solid var(--rim-2); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; }

/* widget preview: a mock website with the chat widget on it */
.site { position: relative; margin-top: 22px; height: 470px; border: 1px solid var(--rim); border-radius: var(--radius); overflow: hidden; background: #f4f2ee; color: #2a2c30; }
.site-bar { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; background: #e6e3de; }
.site-bar i { width: 9px; height: 9px; border-radius: 50%; background: #cfcac2; }
.site-bar span { margin-left: 12px; font-size: 11.5px; color: #8b867e; }
.site-page { padding: 26px 30px; }
.site-page .logo { font: 600 15px var(--display); color: #2a2c30; }
.site-page h3 { margin: 26px 0 8px; font: 600 24px/1.2 var(--display); max-width: 360px; }
.site-page p { margin: 0; color: #6b665f; max-width: 360px; font-size: 13px; }
.site-page .ph { height: 9px; border-radius: 5px; background: #e2ded7; margin-top: 10px; }
.w { position: absolute; bottom: 16px; width: 270px; font-size: 12.5px; transition: all var(--mid) var(--ease); }
.w.right { right: 16px; }
.w.left { left: 16px; }
.w-panel { overflow: hidden; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18); }
.w-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; font-weight: 600; }
.w-body { padding: 12px 12px 6px; display: grid; gap: 8px; }
.w-msg { padding: 8px 10px; max-width: 85%; line-height: 1.45; }
.w-msg.me { justify-self: end; }
.w-input { margin: 6px 12px 12px; padding: 8px 10px; opacity: 0.7; }
.w-launch { margin-top: 10px; display: flex; justify-content: flex-end; }
.w.left .w-launch { justify-content: flex-start; }
.w-launch span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); }

/* ───────── Assistant column (one component everywhere) ───────── */
.assistant {
  position: fixed;
  top: var(--top); right: 0; bottom: 0;
  width: var(--assist);
  z-index: 15;
  display: flex; flex-direction: column;
  border-left: 1px solid var(--rim);
  background: rgba(18, 20, 24, 0.55);
}
.assistant::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 30% at 80% 100%, rgba(214, 178, 100, 0.06), transparent 70%); }
.as-head { position: relative; display: flex; align-items: baseline; gap: 10px; padding: 18px 18px 12px; }
.as-head h2 { margin: 0; font: 500 14px/1.2 var(--sans); }
.as-head .price { margin-left: auto; color: var(--text-3); font-size: 12px; }
.as-close { display: none; }
.as-log { position: relative; flex: 1; overflow-y: auto; padding: 4px 18px 12px; display: flex; flex-direction: column; gap: 14px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.08) transparent; }
.as-intro { color: var(--text-3); font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: 30px; padding: 0 11px; border: 1px solid var(--rim); border-radius: 15px; background: transparent; color: var(--text-2); font-size: 12.5px; transition: border-color var(--fast) var(--ease), color var(--fast) var(--ease); }
.chip:hover { color: var(--text); border-color: var(--rim-2); }
.as-msg { line-height: 1.6; animation: rise var(--fast) var(--ease); }
.as-msg.user { align-self: flex-end; max-width: 88%; padding: 8px 12px; border: 1px solid var(--rim); border-radius: 12px 12px 4px 12px; background: var(--glass-2); }
.as-msg.bot { color: var(--text-2); white-space: pre-wrap; }
.as-msg.bot b { color: var(--text); font-weight: 500; }
.as-msg.thinking { color: var(--text-3); }
.as-msg.thinking span { display: inline-block; width: 4px; height: 4px; margin-right: 3px; border-radius: 50%; background: currentColor; animation: blink 1s infinite; }
.as-msg.thinking span:nth-child(2) { animation-delay: 0.15s; }
.as-msg.thinking span:nth-child(3) { animation-delay: 0.3s; }
.as-form { position: relative; padding: 12px 14px 14px; border-top: 1px solid var(--rim); }
.as-input { display: flex; align-items: flex-end; gap: 8px; padding: 6px 6px 6px 12px; border: 1px solid var(--rim); border-radius: 12px; background: rgba(255, 255, 255, 0.03); }
.as-input:focus-within { border-color: var(--gold-rim); }
.as-input textarea { flex: 1; min-height: 22px; max-height: 120px; padding: 6px 0; border: 0; background: transparent; color: var(--text); resize: none; line-height: 1.5; }
.as-input textarea::placeholder { color: var(--text-3); }
.as-send { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 8px; background: var(--glass-2); color: var(--text-2); }
.as-send:hover { color: var(--gold); }
.as-meter { display: flex; justify-content: space-between; margin-top: 8px; color: var(--text-3); font-size: 11.5px; font-variant-numeric: tabular-nums; }

/* ───────── Toast & dialog ───────── */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 60;
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; border: 1px solid var(--rim-2); border-radius: 10px;
  background: rgba(24, 26, 30, 0.95); color: var(--text);
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  transition: opacity var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .i { width: 16px; height: 16px; color: var(--gold); }
.dialog-back { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, 0.5); animation: fade var(--fast) var(--ease); }
.dialog { width: min(420px, 100%); padding: 22px; border: 1px solid var(--rim-2); border-radius: 14px; background: rgba(24, 26, 30, 0.98); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); animation: pop var(--fast) var(--ease); }
.dialog h2 { margin: 0 0 8px; font: 500 16px var(--sans); }
.dialog p { margin: 0; color: var(--text-2); }
.dialog .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes blink { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }

/* ───────── Narrower: the assistant becomes a sheet ───────── */
@media (max-width: 1180px) {
  body.has-assistant .main { padding-right: 32px; }
  .assistant {
    top: var(--top); width: min(var(--assist), 92vw);
    z-index: 45;
    background: rgba(20, 22, 26, 0.94);
    backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
    box-shadow: -18px 0 60px rgba(0, 0, 0, 0.4);
    transform: translateX(100%);
    transition: transform var(--mid) var(--ease);
  }
  .assistant.open { transform: none; }
  .as-close { display: inline-flex; margin-left: 8px; }
}

/* ───────── Phone: the same product, folded ───────── */
@media (max-width: 720px) {
  :root { --top: 52px; }
  .strip { display: none; }
  .mark-mobile { display: grid; grid-column: 1; justify-self: start; }
  .topbar { left: 0; padding: 0 8px; grid-template-columns: auto 1fr auto; }
  .sections { justify-self: center; }
  .sections a { width: 40px !important; }
  .topbar-end { gap: 6px; }
  .sections { gap: 4px; }
  .sections a { width: 44px; }
  .tenant-btn .tenant-name { display: none; }
  .tenant-btn { padding: 0 4px; }
  .ask-label { display: none; }
  .ask-toggle { width: 36px; padding: 0; justify-content: center; }
  .sidebar { left: 0; width: min(86vw, 340px); }
  .main { padding: calc(var(--top) + 24px) 18px 48px; }
  body.has-assistant .main { padding-right: 18px; }
  h1.title { font-size: 19px; }
  .figures { grid-template-columns: repeat(2, 1fr); }
  .figure .value { font-size: 22px; }
  .bill-total .value { font-size: 32px; }
  .assistant {
    top: auto; left: 0; right: 0; bottom: 0;
    width: auto; height: 78vh;
    border-left: 0; border-top: 1px solid var(--rim-2);
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
  }
  .assistant.open { transform: none; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 10px; }
  .line-head { grid-template-columns: 1fr auto 18px; }
  .line-head .qty { display: none; }
  .trace li { grid-template-columns: 56px 1fr auto; }
  .site { height: 430px; }
  .site-page h3 { font-size: 19px; }
  .w { width: 240px; }
  .msg { grid-template-columns: 26px 1fr; gap: 10px; }
  .event { padding-left: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ───────── Arrival from the launch: the launch's final gold, fading off the hub ───────── */
.arrival { display: none; }
html.arriving .arrival {
  display: block;
  position: fixed; inset: 0; z-index: 200;
  pointer-events: none;
  background: #E6C47A;            /* the launch's full-screen gold */
  animation: arrive 1100ms cubic-bezier(0.4, 0, 0.6, 1) 150ms forwards;
}
html.arriving .main { animation: settle 1200ms cubic-bezier(0.2, 0.7, 0.2, 1) 250ms both; }
@keyframes arrive { to { opacity: 0; visibility: hidden; } }
@keyframes settle { from { opacity: 0.6; } to { opacity: 1; } }

/* ───────── ablefy support: the seller's own channel, kept visibly apart ───────── */
.platform-link {
  display: flex; align-items: center; gap: 8px; position: relative;
  height: 36px; padding: 0 12px;
  border: 1px solid var(--rim); border-radius: 10px;
  color: var(--text-3); text-decoration: none; font-size: 13px;
  transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.platform-link:hover { color: var(--text-2); border-color: var(--rim-2); }
.platform-link[aria-current="page"] { color: var(--text); border-color: var(--rim-2); background: var(--glass-2); }
.platform-link .dot { position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; }
.platform-band {
  display: flex; align-items: center; gap: 10px;
  margin: -12px 0 26px; padding: 9px 12px;
  border: 1px solid var(--rim); border-radius: 10px;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,0.018) 0 8px, transparent 8px 16px);
  color: var(--text-3); font-size: 12.5px;
}
.platform-band b { color: var(--text-2); font-weight: 500; }
.platform-band .i { width: 16px; height: 16px; color: var(--text-2); }
.side-note { margin: -4px 0 12px; color: var(--text-3); font-size: 12.5px; line-height: 1.5; }
.side-head .btn { margin-bottom: 4px; text-decoration: none; }
.avatar.abl { background: #2A2F36; color: #DCE3EA; font-family: var(--display); font-weight: 600; font-size: 13px; border: 1px solid rgba(220, 227, 234, 0.25); }
.badge.abl { color: #C9D3DD; border-color: rgba(201, 211, 221, 0.3); }
.msg.platform .body { color: var(--text); }
.xlink { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 12px 0 0; color: var(--text-2); font-size: 13px; }
.xlink .i { width: 15px; height: 15px; color: var(--text-3); }
.xlink a { color: var(--text-2); text-decoration: none; border-bottom: 1px solid var(--rim-2); }
.xlink a:hover { color: var(--text); }
.linked { display: grid; gap: 2px; margin-top: 14px; padding: 10px 12px; border: 1px solid var(--rim); border-left: 2px solid var(--rim-2); border-radius: 8px; text-decoration: none; background: var(--glass); }
.linked:hover { border-color: var(--rim-2); }
.linked-k { color: var(--text-3); font-size: 12px; }
.linked-t { color: var(--text); }
.field .linked { margin-top: 0; }
.check { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; }
.check input { accent-color: var(--gold-2); width: 15px; height: 15px; }
.field select { height: 34px; padding: 0 10px; border: 1px solid var(--rim); border-radius: 8px; background: #191b1f; color: var(--text); }
.help { gap: 10px; background: rgba(255, 255, 255, 0.015); }
.help-k { color: var(--text-3); font-size: 12.5px; }
.help-i { display: grid; gap: 2px; padding-left: 12px; border-left: 1px solid var(--rim-2); color: var(--text-2); font-size: 13px; line-height: 1.55; }
.help-i b { color: var(--text); font-weight: 500; }
.tnum { font-variant-numeric: tabular-nums; font-weight: 500; color: var(--text); }
@media (max-width: 1180px) { .pl-label { display: none; } .platform-link { width: 36px; padding: 0; justify-content: center; } }
@media (max-width: 720px) { .xlink > .muted { display: none; } }
@media (max-width: 720px) { .hide-s { display: none; } }
