/* ============================================================
   Beacon — the portal stylesheet.

   One sheet for every module. A module links this and nothing
   else; it pulls the Pixated design system in for you.

   Rules live in BEACON-UI.md. This file is that document made
   executable, so a new module inherits the shell, the type
   ladder and the shape language rather than restating them.

   Convention: a class carries the parts of a component that
   never change. Anything the logic computes — a border that
   turns pink on select, a width that animates on collapse —
   stays as an inline style on the element, which wins over the
   class.

   Hover and focus are NOT in this file. An inline style beats a
   class :hover, and most of these elements carry a computed
   colour inline, so hover lives on the element as style-hover /
   style-focus, which the runtime compiles to !important rules.
   One mechanism, not two competing ones. The only exception is
   :focus-visible, which nothing sets inline.
   ============================================================ */

@import url("_ds/pixated-design-system-78dbcc83-ca38-457f-8c9b-e99d6720fb19/colors_and_type.css");
/* Prototype only. Production self-hosts the Poppins woff2 subset — see the DS README. */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

/* ── Foundation ───────────────────────────────────────────── */

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

/* The literal, not var(--forest). The token arrives via the @import above, so
   a page painting between those two round trips would flash white waiting for
   it. Everything else uses the token; this one place cannot afford to. */
html {
  background: #0F0F16;
  color-scheme: dark;
}

body {
  margin: 0;
  background: #0F0F16;
  -webkit-font-smoothing: antialiased;
}

/* Portal type ladder — the app-only roles. The five marketing
   roles come from colors_and_type.css. BEACON-UI.md section 3. */
:root {
  --fs-screen-title: 30px;   /* the one h1 per screen */
  --fs-metric: 24px;         /* metric tile value */
  --fs-metric-sm: 16px;      /* metric value inside a card or modal */
  --fs-chip: 11px;           /* status chips, count badges, ticks */

  --bx-ease: cubic-bezier(.16, 1, .3, 1);
  --bx-fast: .18s var(--bx-ease);   /* hover and state */
  --bx-enter: .35s var(--bx-ease);  /* screen entry */
  --bx-pane: .22s var(--bx-ease);   /* pane collapse */

  --bx-line: rgba(255, 255, 255, .14);
  --bx-line-soft: rgba(255, 255, 255, .08);
  --bx-surface: rgba(255, 255, 255, .04);
  --bx-menu-bg: #14141d;
  --bx-pane-solid: #0C0C12;   /* the pane's desktop tint, flattened, for the drawer */
  --bx-float: rgba(15, 15, 22, .82);  /* keys floating over content */
  --bx-shadow: 0 18px 40px rgba(0, 0, 0, .45);
  --bx-orange-hover: #d4147c;

  /* ── State palette ───────────────────────────────────────────
     Pink is brand, active and selected — one job. How the numbers
     are actually doing is a separate scale, because pink cannot
     say "bad" and a colour that means everything means nothing.

     Hues are chosen to clear brand pink (328deg) so a status chip is
     never mistaken for a selection: good 177deg away, warn 69deg,
     bad 47deg, info 62deg. All pass WCAG AA on --forest.
     ────────────────────────────────────────────────────────── */
  --bx-good: #3DD68C;   /* 10.18:1 — scaling, top performer, moving the right way */
  --bx-warn: #F5A524;   /*  9.35:1 — capped, under review, fatiguing */
  --bx-bad:  #FF7043;   /*  6.95:1 — failed, lost, moving the wrong way */
  --bx-info: #B984FF;   /*  7.10:1 — informational, the DS secondary purple */

  --bx-good-fill: rgba(61,214,140,.14);  --bx-good-line: rgba(61,214,140,.35);
  --bx-warn-fill: rgba(245,165,36,.14);  --bx-warn-line: rgba(245,165,36,.35);
  --bx-bad-fill:  rgba(255,112,67,.14);  --bx-bad-line:  rgba(255,112,67,.35);
  --bx-info-fill: rgba(185,132,255,.14); --bx-info-line: rgba(185,132,255,.32);

  --bx-neutral: var(--txt-cream-muted);
  --bx-neutral-fill: rgba(255,255,255,.08);
  --bx-neutral-line: rgba(255,255,255,.16);
}

@media (max-width: 720px) {
  :root { --fs-screen-title: 24px }
}

a { color: #fff }
a:hover { color: var(--orange) }

input::placeholder, textarea::placeholder { color: rgba(255, 255, 255, .34) }
input:focus, select:focus, textarea:focus { outline: none }
select option { background: var(--forest); color: #fff }

input[type=date] { color-scheme: dark }
input[type=date]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(2);
  opacity: 1;
  cursor: pointer;
  transition: opacity .18s;
}
input[type=date]::-webkit-calendar-picker-indicator:hover { opacity: .7 }

/* Hover and selection are signalled by border and fill, which keyboard
   users never see. BEACON-UI.md section 10. */
:is(button, a, label, input, select, textarea):focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* ── Motion ───────────────────────────────────────────────── */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px) }
  to { opacity: 1; transform: none }
}
@keyframes beaconGlow {
  0%, 100% { filter: drop-shadow(0 0 1px rgba(240, 24, 140, .35)) brightness(.62) }
  50% { filter: drop-shadow(0 0 10px rgba(240, 24, 140, .95)) brightness(1.35) }
}
@keyframes bxShimmer {
  0% { background-position: -200% 0 }
  100% { background-position: 200% 0 }
}
@keyframes confettiFall {
  0% { opacity: 0; transform: translateY(0) rotate(0deg) }
  8% { opacity: 1 }
  100% { opacity: 0; transform: translateY(112vh) rotate(720deg) }
}

/* ── Shell ────────────────────────────────────────────────── */

.bx-app {
  position: relative;
  min-height: 100vh;
  width: 100%;
  background: var(--forest);
  color: var(--cream);
  font-family: var(--font-sans);
  display: flex;
}

/* The design system's glow, verbatim. Opacity is state: 60% behind a
   working screen, full on entry and completion. BEACON-UI.md section 2. */
.bx-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: opacity .5s var(--bx-ease);
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(240, 24, 140, .45), rgba(240, 24, 140, 0) 70%),
    radial-gradient(50% 40% at 50% 10%, rgba(120, 40, 200, .35), rgba(120, 40, 200, 0) 70%);
}

/* No overflow:hidden — collapsing removes pane text from the DOM, and
   clipping would swallow the pane's own dropdowns. */
.bx-pane {
  position: sticky;
  top: 0;
  align-self: flex-start;
  z-index: 2;
  flex: none;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-top: 24px;
  padding-bottom: 24px;
  transition: width var(--bx-pane);
  border-right: 1px solid rgba(255, 255, 255, .10);
  background: rgba(6, 6, 12, .35);
}

.bx-pane-head { position: relative; flex: none; display: flex; align-items: center; gap: 10px }
.bx-lockup { display: flex; align-items: center; gap: 9px; min-width: 0 }
.bx-wordmark { height: 18px; width: auto; display: block; align-self: center }
.bx-beacon {
  flex: none; display: flex; align-items: center; align-self: center;
  line-height: 0; color: var(--orange);
  animation: beaconGlow 2.8s ease-in-out infinite;
}

/* Bare icons, no tile behind them. BEACON-UI.md section 1. */
.bx-pane-keys { flex: none; display: flex; align-items: center; gap: 2px }
.bx-pane-key {
  position: relative;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 12px; background: transparent;
  color: rgba(255, 255, 255, .55);
  cursor: pointer; transition: all var(--bx-fast);
}

.bx-badge {
  position: absolute; top: 1px; right: 0;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--orange); color: #fff;
  font-size: var(--fs-chip); font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}

/* The collapsed rail's stand-in for the workspace switcher. */
.bx-workspace-key {
  flex: none; width: 30px; height: 30px; margin: 0 auto;
  border-radius: 12px; border: 1px solid var(--bx-line);
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .05); color: var(--cream);
  font-family: inherit; font-size: var(--fs-chip); font-weight: 600;
  cursor: pointer; transition: all var(--bx-fast);
}

.bx-switcher {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  padding: 11px 14px; border-radius: 16px;
  border: 1px solid var(--bx-line); background: rgba(255, 255, 255, .05);
  font-family: inherit; cursor: pointer; transition: all var(--bx-fast);
}

.bx-rail { flex: none; height: 3px; border-radius: 999px; background: rgba(255, 255, 255, .10) }
.bx-rail-fill { height: 100%; border-radius: 999px; background: var(--orange); transition: width .4s var(--bx-ease) }

.bx-nav {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  display: flex; flex-direction: column; gap: 4px;
}
.bx-nav-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  padding: 11px 12px; border-radius: 12px; border: 0;
  font-family: inherit; cursor: pointer; transition: all var(--bx-fast);
}
.bx-nav-icon { flex: none; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center }
.bx-nav-label {
  flex: 1; min-width: 0;
  font-size: var(--fs-label); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bx-nav-count {
  flex: none; min-width: 20px; padding: 2px 7px; border-radius: 999px;
  background: rgba(240, 24, 140, .18); color: var(--orange);
  font-size: var(--fs-chip); font-weight: 600; text-align: center;
}
.bx-nav-kids { display: flex; flex-direction: column; gap: 1px; margin: 3px 0 8px 33px }
.bx-nav-kid {
  position: relative; display: flex; align-items: center; gap: 11px;
  width: 100%; text-align: left;
  padding: 8px 12px; border-radius: 12px; border: 0;
  font-family: inherit; cursor: pointer; transition: all var(--bx-fast);
}
.bx-nav-kid-dot { flex: none; width: 5px; height: 5px; border-radius: 999px; transition: all var(--bx-fast) }

/* Numbered step dot in a flow's nav. */
.bx-step-dot {
  flex: none; width: 22px; height: 22px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  line-height: 1; font-size: var(--fs-chip); font-weight: 600;
}

.bx-user-wrap {
  position: relative; flex: none; margin-top: auto;
  display: flex; flex-direction: column; gap: 2px;
  padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .10);
}
.bx-user {
  display: flex; align-items: center; gap: 11px;
  width: 100%; text-align: left;
  padding: 10px 12px; border-radius: 12px; border: 0;
  font-family: inherit; cursor: pointer; transition: background var(--bx-fast);
}
.bx-avatar {
  flex: none; width: 26px; height: 26px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(240, 24, 140, .22); color: var(--cream);
  font-size: var(--fs-chip); font-weight: 600;
}

.bx-caret { flex: none; display: flex; color: rgba(255, 255, 255, .4); transition: transform var(--bx-fast) }
.bx-caret-soft { color: rgba(255, 255, 255, .45) }

.bx-main {
  position: relative; z-index: 1; flex: 1; min-width: 0;
  display: flex; justify-content: center;
  padding: 92px 40px 56px;
}
.bx-col { width: 100%; animation: fadeUp var(--bx-enter) both }


/* ── Icons ────────────────────────────────────────────────────
   Nav glyphs as masks rather than inline SVG. An interpolated `d`
   attribute is parsed by the browser before the runtime fills it,
   and it rejects "{{ ... }}" as a path — valid markup that logs an
   error on every load. A class name interpolates cleanly.
   ─────────────────────────────────────────────────────────── */

.bx-icon {
  display: block; width: 16px; height: 16px;
  background: currentColor;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
}
.bx-icon--home { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='1.7'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M3%2010.5%2012%203l9%207.5M5.5%209.5V20h13V9.5'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='1.7'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M3%2010.5%2012%203l9%207.5M5.5%209.5V20h13V9.5'/%3E%3C/svg%3E") }
.bx-icon--dashboard { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='1.7'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M3.5%203.5h7v7h-7zM13.5%203.5h7v4h-7zM13.5%2010.5h7v10h-7zM3.5%2013.5h7v7h-7z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='1.7'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M3.5%203.5h7v7h-7zM13.5%203.5h7v4h-7zM13.5%2010.5h7v10h-7zM3.5%2013.5h7v7h-7z'/%3E%3C/svg%3E") }
.bx-icon--campaigns { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='1.7'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M4%2020V9M10%2020V4M16%2020v-7M22%2020H2'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='1.7'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M4%2020V9M10%2020V4M16%2020v-7M22%2020H2'/%3E%3C/svg%3E") }
.bx-icon--creatives { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='1.7'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M3.5%204.5h17v15h-17zM3.5%2015l4.5-4.5%204%204%203.5-3.5%205%205'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='1.7'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M3.5%204.5h17v15h-17zM3.5%2015l4.5-4.5%204%204%203.5-3.5%205%205'/%3E%3C/svg%3E") }
.bx-icon--projects { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='1.7'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M4%205h16M4%2012h16M4%2019h10'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='1.7'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M4%205h16M4%2012h16M4%2019h10'/%3E%3C/svg%3E") }
.bx-icon--recs { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='1.7'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%203.5%2014%209l5.5%202-5.5%202-2%205.5L10%2013l-5.5-2L10%209z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='1.7'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%203.5%2014%209l5.5%202-5.5%202-2%205.5L10%2013l-5.5-2L10%209z'/%3E%3C/svg%3E") }
.bx-icon--summaries { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='1.7'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M3.5%206.5h17v11h-17zM3.5%207l8.5%206%208.5-6'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='1.7'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M3.5%206.5h17v11h-17zM3.5%207l8.5%206%208.5-6'/%3E%3C/svg%3E") }

/* ── Menus ────────────────────────────────────────────────── */

/* 24px, wherever it hangs from. BEACON-UI.md section 4. */
.bx-menu {
  position: absolute; z-index: 8;
  padding: 8px; border-radius: 24px;
  border: 1px solid var(--bx-line); background: var(--bx-menu-bg);
  box-shadow: var(--bx-shadow);
}
.bx-menu--pane { z-index: 6; min-width: 212px; padding: 6px }
.bx-menu-row {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  padding: 10px 12px; border-radius: 12px; border: 0; background: transparent;
  font-family: inherit; font-size: var(--fs-label); font-weight: 500;
  cursor: pointer; transition: background var(--bx-fast);
}
.bx-menu-row--split { justify-content: space-between; padding: 10px 14px }
.bx-menu-divider { height: 1px; margin: 6px 4px; background: rgba(255, 255, 255, .10) }
.bx-menu-add { gap: 9px; font-weight: 600; color: var(--orange) }
.bx-tick { flex: none; font-size: var(--fs-chip); font-weight: 600; color: var(--orange) }

/* ── Controls ─────────────────────────────────────────────── */

/* 999px — anything with a text label that performs an action. */
.bx-pill {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 16px; border-radius: 999px;
  font-family: inherit; font-size: var(--fs-micro); font-weight: 600;
  color: var(--cream); cursor: pointer; transition: all var(--bx-fast);
}
.bx-key {
  flex: none; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px; font-family: inherit;
  cursor: pointer; transition: all var(--bx-fast);
}
.bx-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; border: 0;
  background: var(--orange); color: #fff;
  font-family: inherit; font-weight: 600;
  cursor: pointer; transition: background var(--bx-fast);
}
.bx-ghost {
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, .18);
  background: transparent; color: var(--txt-cream-muted);
  font-family: inherit; font-size: var(--fs-micro); font-weight: 600;
  cursor: pointer; transition: all var(--bx-fast);
}
.bx-dashed {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 18px; border-radius: 999px;
  border: 1px dashed rgba(255, 255, 255, .22); background: transparent;
  color: var(--cream); font-family: inherit;
  font-size: var(--fs-micro); font-weight: 600;
  cursor: pointer; transition: all var(--bx-fast);
}
.bx-plain {
  padding: 0; border: 0; background: transparent;
  font-family: inherit; font-size: var(--fs-micro); font-weight: 600;
  color: rgba(255, 255, 255, .5); cursor: pointer; transition: color var(--bx-fast);
}
/* An icon drawn as a character. The one size outside the ladder. */
.bx-glyph { font-size: 14px; line-height: 1 }

.bx-toggle {
  flex: none; width: 46px; height: 26px;
  border-radius: 999px; border: 0; padding: 3px;
  display: flex; cursor: pointer; transition: all var(--bx-fast);
}
.bx-toggle-knob { width: 20px; height: 20px; border-radius: 999px; background: #fff; display: block }

/* Pager — flows only. BEACON-UI.md section 5. */
.bx-pager { display: flex; gap: 8px; padding: 6px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 18px }
.bx-pager-key {
  width: 52px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 12px;
  cursor: pointer; transition: all var(--bx-fast);
}
.bx-pager-back { background: rgba(240, 24, 140, .14); color: rgba(255, 255, 255, .62) }

/* ── Surfaces ─────────────────────────────────────────────── */

/* 24px — panels, dropdown menus, modals. */
.bx-panel { border: 1px solid var(--line-on-dark); background: var(--bx-surface); border-radius: 24px }
.bx-panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 24px; border-bottom: 1px solid var(--bx-line-soft);
}
.bx-panel-body { padding: 6px 24px 18px }

/* 16px — anything you select or type into. */
.bx-card { border-radius: 16px; transition: all var(--bx-fast) }
.bx-choice {
  display: flex; align-items: center; gap: 14px;
  width: 100%; text-align: left;
  padding: 17px 20px; border-radius: 16px;
  font-family: inherit; font-size: var(--fs-body-sm); font-weight: 500;
  cursor: pointer; transition: all var(--bx-fast);
}
.bx-mark {
  flex: none; width: 22px; height: 22px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
}

.bx-field { display: block; border: 1px solid var(--line-on-dark); background: var(--bx-surface); border-radius: 16px; padding: 14px 20px }
.bx-field-label {
  display: block; font-size: var(--fs-micro); font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
  color: rgba(255, 255, 255, .5); margin-bottom: 4px;
}
.bx-input {
  width: 100%; padding: 2px 0;
  background: transparent; border: 0; color: var(--cream);
  font-family: inherit; font-size: var(--fs-body-sm); font-weight: 500;
}
/* Underlined variant, used for the contact rows. */
.bx-input--rule {
  padding: 6px 0;
  border-bottom: 1px solid var(--line-on-dark);
  transition: border-color var(--bx-fast);
}
/* A CSS caret, never default browser chrome. */
.bx-select {
  width: 100%; padding: 2px 0;
  background: transparent; border: 0;
  font-family: inherit; font-size: var(--fs-body-sm); font-weight: 500;
  cursor: pointer; appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, .5) 50%),
    linear-gradient(135deg, rgba(255, 255, 255, .5) 50%, transparent 50%);
  background-position: calc(100% - 9px) 12px, calc(100% - 4px) 12px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.bx-tile { padding: 20px; border-radius: 16px; transition: all var(--bx-fast) }
.bx-tile-value { margin-top: 10px; font-size: var(--fs-metric); font-weight: 500; letter-spacing: -.01em; color: var(--cream) }

/* Metric pair grid inside a card or modal — 1px gaps show as hairlines. */
.bx-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border-radius: 12px; overflow: hidden; background: rgba(255, 255, 255, .10) }
.bx-stat { display: block; background: rgba(15, 15, 22, .55) }
.bx-stat-label { display: block; font-size: var(--fs-micro); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .5) }
.bx-stat-value { display: block; margin-top: 3px; font-size: var(--fs-metric-sm); font-weight: 600; letter-spacing: -.01em }

.bx-chip { padding: 3px 8px; border-radius: 999px; font-size: var(--fs-chip); font-weight: 600 }
.bx-chip--pink { background: rgba(240, 24, 140, .16); color: var(--orange) }
.bx-tag { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; font-size: var(--fs-micro); font-weight: 500 }


.bx-modal-backdrop {
  position: fixed; inset: 0; z-index: 20;
  background: rgba(6, 6, 12, .72); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 40px;
}
/* Always a sibling of main, never inside the content column — that column
   animates on entry, and a transformed ancestor breaks position:fixed. */
.bx-modal { width: 100%; border-radius: 24px; border: 1px solid var(--bx-line); overflow: hidden }

/* ── Data states ──────────────────────────────────────────────
   Every surface that renders data has four states besides having
   it: nothing yet, still loading, failed, and showing something
   older than it should be. They are defined once here so a module
   cannot invent its own — four different empty states across four
   modules is how a product stops feeling like one product.
   ─────────────────────────────────────────────────────────── */

.bx-empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 6px; padding: 54px 32px;
}
.bx-empty-mark {
  width: 40px; height: 40px; margin-bottom: 6px;
  border-radius: 999px; display: flex; align-items: center; justify-content: center;
  background: var(--bx-neutral-fill); color: rgba(255, 255, 255, .45);
}
.bx-empty-mark--good { background: var(--bx-good-fill); color: var(--bx-good) }
.bx-empty-title { font-size: var(--fs-label); font-weight: 600; color: var(--cream) }
.bx-empty-body {
  font-size: var(--fs-micro); font-weight: 500; line-height: 1.55;
  color: var(--txt-cream-muted); max-width: 320px; text-wrap: pretty;
}

/* An error is an empty state that knows why, and offers a way out. */
.bx-error-strip {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; border-radius: 16px;
  border: 1px solid var(--bx-bad-line); background: var(--bx-bad-fill);
}
.bx-error-mark { flex: none; display: flex; color: var(--bx-bad) }

/* Loading is a shape, not a spinner: the page should not jump when
   the data lands, so the skeleton occupies the room the row will need. */
.bx-skeleton {
  border-radius: 6px;
  background: linear-gradient(90deg,
    rgba(255, 255, 255, .05) 25%,
    rgba(255, 255, 255, .11) 37%,
    rgba(255, 255, 255, .05) 63%);
  background-size: 200% 100%;
  animation: bxShimmer 1.4s ease-in-out infinite;
}
.bx-skeleton-line { height: 11px; margin: 5px 0 }

/* Data older than it should be says so, rather than looking current. */
.bx-stale { color: var(--bx-warn) }
.bx-dot-live {
  flex: none; width: 6px; height: 6px; border-radius: 999px;
  background: var(--bx-good); display: inline-block;
}

/* ── Tones ────────────────────────────────────────────────────
   One chip, five meanings. Never restate these colours inline. */
.bx-chip--good    { background: var(--bx-good-fill);    color: var(--bx-good) }
.bx-chip--warn    { background: var(--bx-warn-fill);    color: var(--bx-warn) }
.bx-chip--bad     { background: var(--bx-bad-fill);     color: var(--bx-bad) }
.bx-chip--info    { background: var(--bx-info-fill);    color: var(--bx-info) }
.bx-chip--neutral { background: var(--bx-neutral-fill); color: var(--txt-cream-muted) }

/* ── Toast ────────────────────────────────────────────────────
   Nothing used to confirm anything. Every action that changes
   something the user cannot immediately see says so here. */
.bx-toast-layer {
  position: fixed; left: 0; right: 0; bottom: 26px; z-index: 30;
  display: flex; justify-content: center; pointer-events: none;
}
.bx-toast {
  display: flex; align-items: center; gap: 11px;
  max-width: min(520px, calc(100vw - 36px));
  padding: 13px 20px; border-radius: 999px;
  border: 1px solid var(--bx-line); background: var(--bx-menu-bg);
  box-shadow: var(--bx-shadow);
  font-size: var(--fs-label); font-weight: 500; color: var(--cream);
  animation: fadeUp .22s var(--bx-ease) both;
  pointer-events: auto;
}
.bx-toast-mark { flex: none; display: flex }

/* ── Drawer ───────────────────────────────────────────────────
   Tablet and mobile only. The pane is off canvas until asked for.
   ─────────────────────────────────────────────────────────── */

/* Hidden on desktop, where the pane is always in the layout. */
.bx-menu-key {
  display: none;
  position: fixed; top: 22px; left: 22px; z-index: 24;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border-radius: 999px; border: 1px solid var(--bx-line);
  background: var(--bx-float); backdrop-filter: blur(8px);
  color: var(--cream); cursor: pointer;
  transition: all var(--bx-fast);
}
@media (max-width: 720px) { .bx-menu-key { top: 18px; left: 18px } }

.bx-scrim {
  position: fixed; inset: 0; z-index: 25;
  background: rgba(6, 6, 12, .62);
  backdrop-filter: blur(2px);
  animation: bxFade .28s var(--bx-ease) both;
}
@keyframes bxFade { from { opacity: 0 } to { opacity: 1 } }

/* ── Chat ─────────────────────────────────────────────────────
   Ask Beacon is the same in every module: the same composer, the
   same options, the same bubbles. Only the placeholder subject
   and the answer differ, because those are content.
   ─────────────────────────────────────────────────────────── */

.bx-composer-box {
  position: relative;
  border-radius: 16px;
  border: 1px solid var(--bx-line);
  background: rgba(255, 255, 255, .05);
  transition: border-color var(--bx-fast);
}
.bx-composer-input {
  width: 100%; padding: 20px 20px 14px;
  background: transparent; border: 0; color: var(--cream);
  font-family: inherit; font-size: var(--fs-body-sm); font-weight: 500;
}
.bx-composer-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 8px 10px 10px;
}
.bx-composer-group { display: flex; align-items: center; gap: 6px }
/* 12px radius: an icon key inside a capsule. BEACON-UI.md section 4. */
.bx-composer-key {
  height: 32px; width: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 12px;
  font-family: inherit; font-size: var(--fs-micro); font-weight: 600;
  cursor: pointer; transition: all var(--bx-fast);
}
.bx-composer-key--wide { width: auto; padding: 0 12px; gap: 8px }
.bx-send {
  flex: none; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 999px;
  cursor: pointer; transition: all var(--bx-fast);
}

.bx-messages { display: flex; flex-direction: column; gap: 16px; padding-bottom: 260px }
/* Your own words sit in a bubble; Beacon's are just text on the page. */
.bx-bubble {
  max-width: 82%; border-radius: 16px;
  font-size: var(--fs-body-sm); font-weight: 500; line-height: 1.65;
  text-wrap: pretty;
}
.bx-bubble--you { padding: 14px 18px; background: rgba(240, 24, 140, .12); color: var(--cream) }
.bx-bubble--beacon { padding: 0; background: transparent; color: var(--txt-cream-muted) }

/* Fixed to the bottom on an opaque band, reserving its own height in the
   message column so nothing hides behind it. */
.bx-composer-dock {
  position: fixed; bottom: 0; right: 0; z-index: 6;
  display: flex; flex-direction: column; align-items: center;
  background: var(--forest);
  transition: left var(--bx-pane);
}
.bx-composer-fade {
  align-self: stretch; height: 40px; flex: none; margin-top: -40px;
  background: linear-gradient(to top, var(--forest), rgba(15, 15, 22, 0));
  pointer-events: none;
}

/* ── Screen header ────────────────────────────────────────────
   Every screen opens the same way: the title on the left, the intro
   directly beneath it, sharing one left edge with the content below.

   Nothing is centred. A centred title makes the eye travel back and
   forth between the heading and the first field, and — worse — it
   forces a judgement about which screens are "hero enough" to centre.
   That judgement is how a product ends up with both, which is what
   this replaced.
   ─────────────────────────────────────────────────────────── */

.bx-screen-head { text-align: left }
.bx-screen-head > .bx-lead { display: block; margin: 14px 0 0; max-width: 560px }

/* ── Type roles ───────────────────────────────────────────── */

.bx-title { margin: 0; font-size: var(--fs-screen-title); font-weight: 500; line-height: 1.2; letter-spacing: -.01em }
.bx-h3 { margin: 0; font-size: var(--fs-h3); font-weight: 500; line-height: 1.3; color: var(--cream) }
.bx-lead { font-size: var(--fs-body-sm); font-weight: 500; line-height: 1.6; color: var(--txt-cream-muted); text-wrap: pretty }
.bx-body { font-size: var(--fs-body-sm); font-weight: 500; line-height: 1.65; color: var(--cream); text-wrap: pretty }
.bx-name { display: block; font-size: var(--fs-label); font-weight: 600; color: var(--cream) }
.bx-sub { display: block; margin-top: 2px; font-size: var(--fs-micro); font-weight: 500; color: rgba(255, 255, 255, .45) }
.bx-micro { font-size: var(--fs-micro); font-weight: 500; color: var(--txt-cream-muted) }
.bx-body-muted { font-size: var(--fs-body-sm); font-weight: 500; color: var(--txt-cream-muted) }
.bx-meta { margin: 10px 0 0; font-size: var(--fs-micro); font-weight: 500; color: var(--txt-cream-muted) }
/* Uppercase micro: table column headings, panel sub-headings, brief sections. */
.bx-overline { font-size: var(--fs-micro); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: rgba(255, 255, 255, .5) }

/* ── Utilities ────────────────────────────────────────────── */

.bx-grow { flex: 1; min-width: 0 }
.bx-none { flex: none }
/* An inline success mark. The stylesheet owns the colour so a module never
   has to name a semantic token to draw a tick. */
.bx-ok { display: flex; flex: none; color: var(--bx-good) }
.bx-caution { color: var(--bx-warn) }
.bx-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.bx-rel { position: relative }

/* ── Responsive ───────────────────────────────────────────────
   Three tiers, keyed to data-r attributes, because inline styles
   cannot hold media queries. BEACON-UI.md section 7.
   ─────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  /* Below the desktop tier the pane leaves the layout entirely and becomes a
     drawer. A 76px or 60px icon rail asked the user to recognise seven glyphs
     with no labels and still cost the content its gutter; hidden until asked
     for is both calmer and gives the content the whole screen. */
  [data-r="pane"] {
    position: fixed !important;
    top: 0; left: 0; bottom: 0;
    width: 80% !important;
    height: 100% !important;
    z-index: 26;
    padding-left: 22px !important;
    padding-right: 22px !important;
    background: var(--bx-pane-solid) !important;
    box-shadow: 0 0 60px rgba(0, 0, 0, .55);
    transform: translateX(-100%);
    transition: transform .28s var(--bx-ease);
  }
  [data-r="pane"][data-open="true"] { transform: none }

  [data-r="main"] { padding-left: 26px !important; padding-right: 26px !important; margin-left: 0 !important }
  [data-r="composer"] { left: 0 !important }
  [data-r="grid2"] { grid-template-columns: minmax(0, 1fr) !important }
  /* A child still asking to span 2 would create an implicit second column and
     quietly un-collapse the grid, so the spans reset with it. */
  [data-r="grid2"] > * { grid-column: span 1 !important }

  /* The only way back to the pane, so it is always on screen. */
  [data-r="menu-key"] { display: flex !important }

  /* The flow's top-right action mirrors the menu key rather than shouting. */
  [data-r="topright"] {
    top: 22px !important; right: 22px !important;
    padding: 0 !important; border: 0 !important;
    background: transparent !important; backdrop-filter: none !important;
  }
  [data-r="topright"] > button {
    width: 40px; height: 40px; padding: 0 !important;
    justify-content: center;
    border-radius: 999px !important;
    border: 1px solid var(--bx-line) !important;
    background: var(--bx-float) !important;
    backdrop-filter: blur(8px);
    color: var(--cream) !important;
  }
  [data-r="topright-label"] { display: none !important }
}

@media (max-width: 720px) {
  [data-r="main"] { padding: 84px 18px 40px !important; margin-left: 0 !important }
  [data-r="composer"] { padding-left: 0 !important; padding-right: 0 !important }
  [data-r="composer"] > div { padding-left: 18px !important; padding-right: 18px !important }
  [data-r="header"] { flex-direction: column !important; align-items: flex-start !important; gap: 14px !important }
  [data-r="controls"] { flex-wrap: wrap !important }
  [data-r="grid2"], [data-r="tiles"] { grid-template-columns: minmax(0, 1fr) !important }
  [data-r="scroll"] { overflow-x: auto }
  [data-r="scroll"] > div { min-width: 640px }
  [data-r="modal"] { grid-template-columns: minmax(0, 1fr) !important; max-height: 88vh; overflow-y: auto }
  [data-r="row"] { flex-wrap: wrap !important }
  [data-r="topright"] { top: 18px !important; right: 18px !important }
}
