/* Caseboard — blank-slate track & support desk (no lv-beacon / a74-track patterns) */
:root {
  --cx-ink: #14201c;
  --cx-mute: #5c6b66;
  --cx-paper: #eef3f0;
  --cx-sheet: #fbfcfb;
  --cx-line: rgba(20, 32, 28, 0.12);
  --cx-hot: #e85d04;
  --cx-lime: #8ac926;
  --cx-teal: #1d7a6c;
  --cx-display: "Syne", "Segoe UI", sans-serif;
  --cx-sans: "Figtree", "Segoe UI", sans-serif;
  --cx-ease: cubic-bezier(0.2, 0.9, 0.2, 1);
  --cx-max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body.cx-track {
  margin: 0;
  min-height: 100vh;
  color: var(--cx-ink);
  font-family: var(--cx-sans);
  background:
    radial-gradient(70% 45% at 100% 0%, rgba(232, 93, 4, 0.12), transparent 55%),
    radial-gradient(55% 40% at 0% 80%, rgba(138, 201, 38, 0.14), transparent 50%),
    linear-gradient(165deg, #e4ebe7 0%, var(--cx-paper) 42%, #e8f0ec 100%);
  -webkit-font-smoothing: antialiased;
}

.a74-bare-main { min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
img { max-width: 100%; display: block; }

.cx-shell {
  position: relative;
  z-index: 1;
  width: min(var(--cx-max), calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 1rem 0 2.75rem;
}

.cx-atmosphere {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.cx-ribbon {
  position: absolute;
  width: 42vw;
  height: 42vw;
  border-radius: 40% 60% 55% 45%;
  filter: blur(40px);
  opacity: 0.35;
  animation: cx-drift 18s ease-in-out infinite alternate;
}
.cx-ribbon-a {
  top: -12%;
  right: -8%;
  background: rgba(232, 93, 4, 0.28);
}
.cx-ribbon-b {
  bottom: -18%;
  left: -10%;
  background: rgba(29, 122, 108, 0.22);
  animation-delay: -6s;
}
.cx-grid {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(20, 32, 28, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 32, 28, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%);
}

.cx-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
  padding: 0.5rem 0.55rem 0.5rem 0.7rem;
  background: rgba(251, 252, 251, 0.88);
  border: 1px solid var(--cx-line);
  border-radius: 1.15rem;
  backdrop-filter: blur(10px);
}
.cx-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}
.cx-brand-chip {
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border-radius: 0.7rem;
  background: var(--cx-ink);
  color: #fff;
  font-family: var(--cx-display);
  font-size: 0.7rem;
  font-weight: 800;
  transform: rotate(-6deg);
}
.cx-brand-copy strong {
  display: block;
  font-family: var(--cx-display);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.1;
}
.cx-brand-copy em {
  display: block;
  font-style: normal;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cx-mute);
  font-weight: 700;
}
.cx-top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}
.cx-top-nav a {
  padding: 0.45rem 0.75rem;
  border-radius: 0.7rem;
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--cx-mute);
  transition: color 0.2s, background 0.2s, transform 0.2s var(--cx-ease);
}
.cx-top-nav a:hover {
  color: var(--cx-ink);
  background: rgba(20, 32, 28, 0.05);
  transform: translateY(-1px);
}
.cx-top-cart {
  background: var(--cx-hot) !important;
  color: #fff !important;
}

.cx-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(12rem, 16rem);
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.15rem;
  animation: cx-rise 0.55s var(--cx-ease) both;
}
.cx-kicker,
.cx-panel-kicker {
  margin: 0 0 0.3rem;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--cx-teal);
}
.cx-hero h1 {
  margin: 0;
  font-family: var(--cx-display);
  font-size: clamp(1.9rem, 5vw, 3.15rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
}
.cx-lede {
  margin: 0.55rem 0 0;
  max-width: 36rem;
  color: var(--cx-mute);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.45;
}
.cx-hero-meter {
  padding: 0.9rem 1rem;
  background: var(--cx-sheet);
  border: 1px solid var(--cx-line);
  border-radius: 1.1rem;
  box-shadow: 0 16px 32px rgba(20, 32, 28, 0.06);
}
.cx-meter-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--cx-mute);
}
.cx-meter-value {
  display: block;
  margin: 0.2rem 0 0.55rem;
  font-family: var(--cx-display);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.cx-meter-bar {
  display: block;
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(20, 32, 28, 0.08);
  overflow: hidden;
}
.cx-meter-bar i {
  display: block;
  height: 100%;
  width: calc(var(--cx-pct, 0) * 1%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cx-teal), var(--cx-lime));
  transition: width 0.8s var(--cx-ease);
}
.cx-hero-meter.miss .cx-meter-value { color: var(--cx-hot); }
.cx-hero-meter.found .cx-meter-value { color: var(--cx-teal); }

/* Passkey strip */
.cx-passkey {
  margin-bottom: 1.25rem;
  padding: 1rem 1.05rem 0.95rem;
  background: var(--cx-sheet);
  border: 1px solid var(--cx-line);
  border-radius: 1.35rem;
  box-shadow: 0 18px 40px rgba(20, 32, 28, 0.06);
  animation: cx-rise 0.55s var(--cx-ease) 0.05s both;
}
.cx-passkey-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
}
.cx-passkey-field label,
.cx-field span {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 750;
  color: var(--cx-mute);
}
.cx-passkey-field input,
.cx-field input,
.cx-field select,
.cx-field textarea {
  width: 100%;
  min-height: 2.85rem;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid var(--cx-line);
  border-radius: 0.85rem;
  background: #fff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.cx-field textarea {
  min-height: 6.5rem;
  resize: vertical;
  line-height: 1.45;
}
.cx-passkey-field input:focus,
.cx-field input:focus,
.cx-field select:focus,
.cx-field textarea:focus {
  border-color: var(--cx-teal);
  box-shadow: 0 0 0 3px rgba(29, 122, 108, 0.15);
}
.cx-passkey-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.cx-passkey-hint {
  margin: 0.7rem 0 0;
  font-size: 0.82rem;
  color: var(--cx-mute);
}

.cx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.55rem 1.1rem;
  border-radius: 0.85rem;
  font-size: 0.9rem;
  font-weight: 750;
  transition: transform 0.22s var(--cx-ease), background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.cx-btn:hover { transform: translateY(-2px); }
.cx-btn-hot {
  background: var(--cx-hot);
  color: #fff;
}
.cx-btn-hot:hover { filter: brightness(1.05); }
.cx-btn-ink {
  background: var(--cx-ink);
  color: #fff;
}
.cx-btn-ghost {
  border: 1.5px solid var(--cx-line);
  background: transparent;
  color: var(--cx-ink);
}
.cx-btn-ghost:hover { border-color: var(--cx-ink); }

.cx-toast {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 0.9rem;
  background: rgba(138, 201, 38, 0.18);
  border: 1px solid rgba(138, 201, 38, 0.45);
  color: #2f4a12;
  font-weight: 650;
  animation: cx-rise 0.4s var(--cx-ease) both;
}

/* Dashboard board */
.cx-board {
  display: grid;
  gap: 0.9rem;
  animation: cx-rise 0.55s var(--cx-ease) 0.1s both;
}
.cx-shell[data-cx-mode="found"] .cx-board {
  grid-template-columns: minmax(12rem, 15rem) minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: start;
}

.cx-pulse,
.cx-dossier,
.cx-tickets,
.cx-empty,
.cx-idle-card {
  background: var(--cx-sheet);
  border: 1px solid var(--cx-line);
  border-radius: 1.25rem;
  box-shadow: 0 16px 36px rgba(20, 32, 28, 0.05);
}

.cx-pulse {
  padding: 1.05rem 0.95rem 1.15rem;
  position: relative;
  overflow: hidden;
}
.cx-pulse::before {
  content: "";
  position: absolute;
  left: 1.55rem;
  top: 5.2rem;
  bottom: 1.4rem;
  width: 3px;
  border-radius: 999px;
  background: rgba(20, 32, 28, 0.08);
  z-index: 0;
}
.cx-pulse h2 {
  margin: 0 0 1rem;
  font-family: var(--cx-display);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.cx-pulse-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
  position: relative;
  z-index: 1;
}
.cx-pulse-step {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.55rem 0.45rem;
  border-radius: 0.8rem;
  transition: background 0.25s, transform 0.25s var(--cx-ease);
  animation: cx-rise 0.45s var(--cx-ease) both;
  animation-delay: calc(var(--cx-i, 0) * 0.07s);
}
.cx-pulse-code {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 0.55rem;
  background: rgba(20, 32, 28, 0.06);
  font-family: var(--cx-display);
  font-weight: 800;
  font-size: 0.85rem;
}
.cx-pulse-step strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 750;
}
.cx-pulse-step em {
  display: block;
  font-style: normal;
  font-size: 0.75rem;
  color: var(--cx-mute);
}
.cx-pulse-pip {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: rgba(20, 32, 28, 0.18);
}
.cx-pulse-step.is-done {
  background: rgba(29, 122, 108, 0.08);
}
.cx-pulse-step.is-done .cx-pulse-code {
  background: var(--cx-teal);
  color: #fff;
}
.cx-pulse-step.is-done .cx-pulse-pip {
  background: var(--cx-teal);
}
.cx-pulse-step.is-live {
  background: rgba(232, 93, 4, 0.1);
  transform: translateX(4px);
}
.cx-pulse-step.is-live .cx-pulse-code {
  background: var(--cx-hot);
  color: #fff;
}
.cx-pulse-step.is-live .cx-pulse-pip {
  background: var(--cx-hot);
  box-shadow: 0 0 0 5px rgba(232, 93, 4, 0.2);
  animation: cx-ping 1.6s ease-out infinite;
}
.cx-pulse-step.is-muted { opacity: 0.45; }
.cx-pulse-cancel {
  margin: 0.85rem 0 0;
  padding: 0.55rem 0.65rem;
  border-radius: 0.7rem;
  background: rgba(232, 93, 4, 0.12);
  color: #8a3200;
  font-size: 0.86rem;
  font-weight: 650;
}

.cx-dossier {
  padding: 1.15rem 1.2rem 1.25rem;
}
.cx-dossier-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.cx-dossier-head h2 {
  margin: 0;
  font-family: var(--cx-display);
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  word-break: break-word;
}
.cx-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0 0 1rem;
}
.cx-facts > div {
  padding: 0.7rem 0.75rem;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, rgba(29, 122, 108, 0.07), rgba(138, 201, 38, 0.08));
  border: 1px solid rgba(29, 122, 108, 0.12);
}
.cx-facts dt {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 750;
  color: var(--cx-mute);
}
.cx-facts dd {
  margin: 0.2rem 0 0;
  font-family: var(--cx-display);
  font-size: 1.1rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}
.cx-lines {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}
.cx-lines li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.15rem;
  border-bottom: 1px dashed var(--cx-line);
  font-size: 0.9rem;
  font-weight: 600;
}
.cx-lines em {
  font-style: normal;
  color: var(--cx-mute);
  font-variant-numeric: tabular-nums;
}
.cx-lines-more {
  border: 0 !important;
  color: var(--cx-mute);
  font-weight: 600 !important;
  font-size: 0.82rem !important;
}

.cx-tickets {
  padding: 1.15rem 1.15rem 1.25rem;
}
.cx-tickets h2 {
  margin: 0;
  font-family: var(--cx-display);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.cx-tickets-note {
  margin: 0.35rem 0 0.9rem;
  color: var(--cx-mute);
  font-size: 0.9rem;
}
.cx-ticket-form {
  display: grid;
  gap: 0.7rem;
}
.cx-ticket-log {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--cx-line);
}
.cx-ticket-log h3 {
  margin: 0 0 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.95rem;
  font-weight: 750;
}
.cx-ticket-log h3 span {
  display: inline-grid;
  place-items: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--cx-ink);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}
.cx-ticket-log ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.cx-ticket-log li {
  padding: 0.7rem 0.75rem;
  border-radius: 0.8rem;
  background: rgba(20, 32, 28, 0.035);
  border-left: 3px solid var(--cx-teal);
}
.cx-ticket-log header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.25rem;
}
.cx-ticket-log time {
  font-size: 0.75rem;
  color: var(--cx-mute);
}
.cx-ticket-log p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--cx-ink);
}
.cx-ticket-empty {
  margin: 1rem 0 0;
  font-size: 0.88rem;
  color: var(--cx-mute);
}

.cx-empty {
  grid-column: 1 / -1;
  padding: 2.4rem 1.5rem;
  text-align: center;
}
.cx-empty h2 {
  margin: 0;
  font-family: var(--cx-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
}
.cx-empty p {
  margin: 0.5rem auto 1.1rem;
  max-width: 28rem;
  color: var(--cx-mute);
}
.cx-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.cx-idle {
  grid-column: 1 / -1;
}
.cx-idle-rail {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--cx-line);
  border-radius: 1.25rem;
  overflow: hidden;
  background: var(--cx-sheet);
  box-shadow: 0 16px 36px rgba(20, 32, 28, 0.05);
}
.cx-idle-rail li {
  padding: 1.2rem 1.05rem 1.3rem;
  border-right: 1px solid var(--cx-line);
  animation: cx-rise 0.5s var(--cx-ease) both;
  animation-delay: calc(var(--cx-i, 0) * 0.08s);
}
.cx-idle-rail li:last-child { border-right: 0; }
.cx-idle-rail span {
  display: block;
  margin-bottom: 0.45rem;
  font-family: var(--cx-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--cx-hot);
  line-height: 1;
}
.cx-idle-rail strong {
  display: block;
  font-family: var(--cx-display);
  font-size: 1.1rem;
  font-weight: 750;
}
.cx-idle-rail em {
  display: block;
  margin-top: 0.35rem;
  font-style: normal;
  color: var(--cx-mute);
  font-size: 0.9rem;
  line-height: 1.4;
}
.cx-idle-rail a {
  color: var(--cx-teal);
  font-weight: 700;
  word-break: break-word;
}
.cx-idle-rail a:hover { text-decoration: underline; }

.cx-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  justify-content: center;
  margin-top: 1.85rem;
  padding-top: 1rem;
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--cx-mute);
}
.cx-foot a:hover { color: var(--cx-hot); }

@keyframes cx-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes cx-drift {
  from { transform: translate(0, 0) rotate(0deg); }
  to { transform: translate(-3%, 4%) rotate(8deg); }
}
@keyframes cx-ping {
  0% { box-shadow: 0 0 0 0 rgba(232, 93, 4, 0.35); }
  100% { box-shadow: 0 0 0 12px rgba(232, 93, 4, 0); }
}

@media (max-width: 980px) {
  .cx-shell[data-cx-mode="found"] .cx-board {
    grid-template-columns: 1fr 1fr;
  }
  .cx-pulse { grid-column: 1 / -1; }
  .cx-pulse::before { display: none; }
  .cx-pulse-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
  }
  .cx-pulse-step {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
  .cx-pulse-step.is-live { transform: none; }
  .cx-idle-rail { grid-template-columns: 1fr 1fr; }
  .cx-idle-rail li:nth-child(2) { border-right: 0; }
  .cx-idle-rail li:nth-child(1),
  .cx-idle-rail li:nth-child(2) { border-bottom: 1px solid var(--cx-line); }
}

@media (max-width: 720px) {
  .cx-hero { grid-template-columns: 1fr; }
  .cx-passkey-form { grid-template-columns: 1fr; }
  .cx-shell[data-cx-mode="found"] .cx-board { grid-template-columns: 1fr; }
  .cx-pulse-list { grid-template-columns: 1fr 1fr; }
  .cx-facts { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .cx-shell { width: calc(100% - 1rem); }
  .cx-idle-rail { grid-template-columns: 1fr; }
  .cx-idle-rail li {
    border-right: 0 !important;
    border-bottom: 1px solid var(--cx-line);
  }
  .cx-idle-rail li:last-child { border-bottom: 0; }
  .cx-pulse-list { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
