/* Cord Stack — track-support identity
   Named CSS Grid board + vertical conduit + conic dial.
   Independent of Way Beacon / Waypoint board / other Appily track UIs. */

body.cs-cord *,
body.cs-cord *::before,
body.cs-cord *::after {
  box-sizing: border-box;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.cs-root {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.cs-root > .page-main {
  flex: 1;
  width: 100%;
  padding: 0;
  overflow: visible;
}

body.cs-cord {
  --cs-fog: #EEF2F6;
  --cs-paper: #F7F9FC;
  --cs-ink: #10151F;
  --cs-mute: #3d4654;
  --cs-teal: #00BFA6;
  --cs-teal-deep: #008F7A;
  --cs-ember: #FF8A00;
  --cs-void: #141A24;
  --cs-line: rgba(16, 21, 31, 0.12);
  --cs-white: #FFFFFF;
  --cs-display: 'Rajdhani', system-ui, sans-serif;
  --cs-body: 'Hind Madurai', system-ui, sans-serif;
  --cs-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --cs-progress: 0;
  --cs-step: 0;

  margin: 0;
  min-height: 100vh;
  font-family: var(--cs-body);
  color: var(--cs-ink);
  background:
    radial-gradient(ellipse 70% 45% at 100% 0%, rgba(0, 191, 166, 0.16), transparent 55%),
    radial-gradient(ellipse 50% 40% at 0% 80%, rgba(255, 138, 0, 0.12), transparent 50%),
    linear-gradient(165deg, var(--cs-fog) 0%, var(--cs-paper) 50%, #E8EDF4 100%);
  -webkit-font-smoothing: antialiased;
}

body.cs-cord .a63-fold-wrap,
body.cs-cord .a63-ribbon,
body.cs-cord .a63-mast,
body.cs-cord .a63-colophon {
  display: none !important;
}

body.cs-cord .page-main {
  padding: 0;
  max-width: none;
  overflow: visible;
}

.cs-shell {
  position: relative;
  padding: 0 0 2.5rem;
  overflow-x: clip;
}

.cs-grid-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
  background-image:
    linear-gradient(rgba(16, 21, 31, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 21, 31, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
}

.cs-shell > *:not(.cs-grid-bg) {
  position: relative;
  z-index: 1;
}

/* Top */

.cs-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.1rem clamp(1rem, 3vw, 1.75rem) 0;
}

.cs-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--cs-ink);
}

.cs-brand em {
  font-style: normal;
  font-family: var(--cs-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.08em;
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cs-void);
  color: var(--cs-teal);
  border-radius: 4px 12px 4px 12px;
}

.cs-brand span {
  font-family: var(--cs-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cs-brand:hover { color: var(--cs-teal-deep); text-decoration: none; }

.cs-top-nav {
  display: flex;
  gap: 0.35rem;
}

.cs-top-nav a {
  padding: 0.4rem 0.8rem;
  font-family: var(--cs-display);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cs-mute);
  border-radius: 999px;
  transition: background 0.25s ease, color 0.25s ease;
}

.cs-top-nav a:hover {
  background: var(--cs-white);
  color: var(--cs-ink);
  text-decoration: none;
}

/* Named grid board */

.cs-board {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.85fr);
  grid-template-areas:
    "mast kpi"
    "console stage"
    "conduit stage"
    "lanes lanes";
  gap: 1rem 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem clamp(1rem, 3vw, 1.75rem) 0;
  align-items: start;
}

.cs-mast { grid-area: mast; }
.cs-kpi { grid-area: kpi; }
.cs-console { grid-area: console; }
.cs-stage { grid-area: stage; }
.cs-conduit { grid-area: conduit; }
.cs-lanes { grid-area: lanes; }

.cs-kicker {
  margin: 0 0 0.35rem;
  font-family: var(--cs-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cs-teal-deep);
}

.cs-mast h1 {
  margin: 0;
  display: flex;
  flex-direction: column;
  line-height: 0.88;
}

.cs-fluid {
  font-family: var(--cs-display);
  font-weight: 700;
  font-size: clamp(3.2rem, 11vw, 7rem);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--cs-ink);
}

.cs-fluid-soft {
  color: var(--cs-teal-deep);
  -webkit-text-stroke: 0;
  margin-left: clamp(0.5rem, 3vw, 2rem);
}

.cs-lede {
  margin: 0.9rem 0 0;
  max-width: 34rem;
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--cs-mute);
}

/* KPI */

.cs-kpi {
  display: grid;
  gap: 0.5rem;
  align-content: end;
}

.cs-kpi-cell {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.75rem 1rem;
  background: var(--cs-void);
  color: var(--cs-white);
  border-radius: 4px 16px 4px 16px;
}

@media (prefers-reduced-motion: no-preference) {
  .cs-kpi-cell {
    animation: cs-rise 0.5s var(--cs-ease);
    animation-delay: calc(var(--ki, 0) * 0.08s);
  }
}

.cs-kpi-cell span {
  font-family: var(--cs-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.85; color: rgba(255,255,255,0.9);
}

.cs-kpi-cell strong {
  font-family: var(--cs-display);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--cs-teal);
  letter-spacing: 0.04em;
}

@keyframes cs-rise {
  from { transform: translateY(10px); filter: saturate(0.9); }
  to { transform: none; filter: none; }
}

/* Console */

.cs-console {
  background: var(--cs-white);
  border: 1px solid var(--cs-line);
  border-radius: 8px 28px 8px 28px;
  padding: 1.25rem 1.35rem 1.4rem;
  box-shadow: 0 18px 40px rgba(16, 21, 31, 0.06);
  transition: border-color 0.3s ease, box-shadow 0.35s var(--cs-ease);
}

.cs-console.is-focused {
  border-color: rgba(0, 191, 166, 0.45);
  box-shadow: 0 18px 40px rgba(0, 191, 166, 0.12);
}

.cs-console-head h2 {
  margin: 0 0 0.25rem;
  font-family: var(--cs-display);
  font-weight: 700;
  font-size: 1.55rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cs-console-head p {
  margin: 0 0 1.1rem;
  color: var(--cs-mute);
  font-size: 0.95rem;
}

.cs-fields {
  display: grid;
  gap: 0.85rem;
}

.cs-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cs-field span {
  font-family: var(--cs-display);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cs-mute);
}

.cs-field input {
  width: 100%;
  border: 1.5px solid rgba(16, 21, 31, 0.18);
  border-radius: 6px 14px 6px 14px;
  padding: 0.85rem 0.95rem;
  font: inherit;
  font-size: 1.02rem;
  color: var(--cs-ink);
  background: #fff;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(16, 21, 31, 0.04);
  transition: border-color 0.25s ease, box-shadow 0.3s var(--cs-ease), background 0.25s ease;
}

.cs-field input::placeholder {
  color: #5c6678;
}

.cs-field input:focus {
  border-color: var(--cs-teal);
  box-shadow: 0 0 0 4px rgba(0, 191, 166, 0.18);
  background: #fff;
}

.cs-submit {
  margin-top: 1.1rem;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3rem;
  border: 0;
  border-radius: 6px 18px 6px 18px;
  background: linear-gradient(120deg, var(--cs-teal), #00D4C8 50%, var(--cs-ember));
  background-size: 160% 100%;
  color: var(--cs-void);
  font-family: var(--cs-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-position 0.4s var(--cs-ease), transform 0.3s var(--cs-ease), box-shadow 0.35s ease;
}

.cs-submit:hover {
  background-position: 100% 0;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 191, 166, 0.3);
}

.cs-submit em { font-style: normal; }

/* Stage / result */

.cs-stage {
  min-height: 320px;
  background: var(--cs-white);
  border: 1px solid var(--cs-line);
  border-radius: 28px 8px 28px 8px;
  padding: 1.25rem 1.35rem;
  box-shadow: 0 18px 40px rgba(16, 21, 31, 0.05);
  position: sticky;
  top: 1rem;
}

.cs-result-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.15rem;
}

.cs-pulse {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--cs-display);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cs-teal-deep);
}

.cs-pulse i {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--cs-teal);
  box-shadow: 0 0 0 0 rgba(0, 191, 166, 0.5);
  animation: cs-ping 1.6s var(--cs-ease) infinite;
}

@keyframes cs-ping {
  0% { box-shadow: 0 0 0 0 rgba(0, 191, 166, 0.55); }
  100% { box-shadow: 0 0 0 12px rgba(0, 191, 166, 0); }
}

.cs-result-head h2 {
  margin: 0.35rem 0 0.15rem;
  font-family: var(--cs-display);
  font-weight: 700;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  letter-spacing: 0.04em;
  word-break: break-all;
}

.cs-status {
  margin: 0;
  font-weight: 600;
  color: var(--cs-ember);
}

/* Conic dial */

.cs-dial {
  position: relative;
  width: 6.5rem;
  height: 6.5rem;
  flex-shrink: 0;
}

.cs-dial-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from -90deg,
    var(--cs-teal) 0 calc(var(--cs-progress) * 1%),
    rgba(16, 21, 31, 0.08) calc(var(--cs-progress) * 1%) 100%
  );
  mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 calc(100% - 9px));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 calc(100% - 9px));
  transition: background 0.8s var(--cs-ease);
}

.cs-dial-core {
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: var(--cs-fog);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.cs-dial-core strong {
  font-family: var(--cs-display);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
  color: var(--cs-ink);
}

.cs-dial-core span {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cs-mute);
  margin-top: 0.15rem;
}

.cs-intel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.cs-intel-cell {
  padding: 0.7rem 0.8rem;
  background: var(--cs-fog);
  border-radius: 8px 16px 8px 16px;
}

.cs-intel-cell span {
  display: block;
  font-family: var(--cs-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cs-mute);
  margin-bottom: 0.2rem;
}

.cs-intel-cell strong {
  font-family: var(--cs-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.cs-mono {
  font-family: ui-monospace, monospace !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  word-break: break-all;
}

.cs-lines {
  list-style: none;
  margin: 0 0 1.15rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cs-lines li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.7rem;
  border: 1px dashed var(--cs-line);
  border-radius: 6px;
  font-size: 0.9rem;
}

.cs-lines em {
  font-style: normal;
  font-weight: 700;
  color: var(--cs-teal-deep);
}

.cs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 1.2rem;
  background: var(--cs-void);
  color: var(--cs-white);
  font-family: var(--cs-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 6px 16px 6px 16px;
  transition: background 0.25s ease, transform 0.3s var(--cs-ease);
}

.cs-btn:hover {
  background: var(--cs-teal-deep);
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
}

.cs-btn-ghost {
  background: transparent;
  color: var(--cs-ink);
  border: 1.5px solid var(--cs-ink);
}

.cs-btn-ghost:hover {
  background: var(--cs-ink);
  color: var(--cs-teal);
}

.cs-miss,
.cs-idle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 260px;
  position: relative;
}

.cs-miss h2,
.cs-idle h2 {
  margin: 0.25rem 0 0.5rem;
  font-family: var(--cs-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.1;
}

.cs-miss p,
.cs-idle p:not(.cs-kicker) {
  margin: 0 0 1.15rem;
  color: var(--cs-mute);
  max-width: 28ch;
}

.cs-idle-orb {
  position: absolute;
  right: 0.5rem;
  top: 0.5rem;
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  border: 2px dashed rgba(0, 191, 166, 0.35);
  animation: cs-spin 12s linear infinite;
}

.cs-idle-orb::before {
  content: '';
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 138, 0, 0.35), transparent 70%);
}

@keyframes cs-spin {
  to { transform: rotate(360deg); }
}

/* Vertical conduit pipeline */

.cs-conduit {
  position: relative;
  padding: 1.15rem 1.25rem 1.35rem;
  background: var(--cs-void);
  color: var(--cs-white);
  border-radius: 8px 32px 8px 32px;
  overflow: hidden;
}

.cs-conduit-head .cs-kicker {
  color: var(--cs-teal);
}

.cs-conduit-head h2 {
  margin: 0 0 1.15rem;
  font-family: var(--cs-display);
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cs-stack {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  z-index: 1;
}

.cs-chamber {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0.85rem;
  align-items: stretch;
  min-height: 4.5rem;
  opacity: 1;
}

.cs-chamber:nth-child(even) .cs-chamber-card {
  transform: translateX(0.75rem);
}

.cs-chamber-rail {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cs-chamber-bead {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  margin-top: 0.35rem;
  z-index: 1;
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.cs-chamber-wire {
  flex: 1;
  width: 2px;
  margin-top: 0.25rem;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
}

.cs-chamber-card {
  padding: 0.7rem 0.9rem 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px 18px 6px 18px;
  transition:
    background 0.35s ease,
    border-color 0.35s ease,
    transform 0.45s var(--cs-ease);
}

.cs-chamber-card em {
  display: block;
  font-style: normal;
  font-family: var(--cs-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--cs-ember);
  margin-bottom: 0.15rem;
}

.cs-chamber-card strong {
  display: block;
  font-family: var(--cs-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cs-chamber-card span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
}

.cs-chamber.is-done .cs-chamber-bead,
.cs-chamber.is-live .cs-chamber-bead {
  background: var(--cs-teal);
  border-color: var(--cs-teal);
  box-shadow: 0 0 0 4px rgba(0, 191, 166, 0.25);
}

.cs-chamber.is-done .cs-chamber-wire {
  background: linear-gradient(180deg, var(--cs-teal), rgba(0, 191, 166, 0.35));
}

.cs-chamber.is-live .cs-chamber-card {
  background: rgba(0, 191, 166, 0.16);
  border-color: rgba(0, 191, 166, 0.45);
  transform: translateX(0.35rem) scale(1.02);
}

.cs-chamber.is-done .cs-chamber-card {
  border-color: rgba(0, 191, 166, 0.28);
}

.cs-chamber.is-idle .cs-chamber-card {
  opacity: 0.72;
}

.cs-chamber.is-wait .cs-chamber-card {
  opacity: 0.82;
}

.cs-chamber.is-wait .cs-chamber-card strong {
  color: rgba(255, 255, 255, 0.92);
}

.cs-cord-fill {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 4px;
  height: calc(var(--cs-progress) * 1%);
  background: linear-gradient(0deg, var(--cs-ember), var(--cs-teal));
  transition: height 0.9s var(--cs-ease);
  border-radius: 0 4px 0 0;
}

/* Lanes */

.cs-lanes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.cs-lane {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem 1.05rem;
  background: var(--cs-white);
  border: 1px solid var(--cs-line);
  border-radius: 8px 20px 8px 20px;
  text-decoration: none;
  color: var(--cs-ink);
  box-shadow: 0 8px 20px rgba(16, 21, 31, 0.04);
  transition:
    transform 0.4s var(--cs-ease),
    background 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .cs-lane {
    animation: cs-rise 0.5s var(--cs-ease);
    animation-delay: calc(var(--li, 0) * 0.06s);
  }
}

.cs-lane span {
  font-family: var(--cs-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cs-teal-deep);
}

.cs-lane strong {
  font-family: var(--cs-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.cs-lane:hover {
  background: var(--cs-void);
  color: var(--cs-white);
  border-color: transparent;
  transform: translateY(-4px) rotate(-0.4deg);
  text-decoration: none;
}

.cs-lane:hover span {
  color: var(--cs-ember);
}

/* Foot */

.cs-foot {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem clamp(1rem, 3vw, 1.75rem) 1.75rem;
  border-top: 1px solid var(--cs-line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: space-between;
  font-family: var(--cs-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cs-mute);
}

.cs-foot a {
  color: var(--cs-ink);
  text-decoration: none;
}

.cs-foot a:hover { color: var(--cs-teal-deep); }

@media (max-width: 960px) {
  .cs-board {
    grid-template-columns: 1fr;
    grid-template-areas:
      "mast"
      "kpi"
      "console"
      "stage"
      "conduit"
      "lanes";
  }

  .cs-stage {
    position: relative;
    top: 0;
  }

  .cs-kpi {
    grid-template-columns: repeat(3, 1fr);
  }

  .cs-lanes {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .cs-top {
    flex-wrap: wrap;
  }

  .cs-kpi {
    grid-template-columns: 1fr;
  }

  .cs-result-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .cs-intel {
    grid-template-columns: 1fr;
  }

  .cs-lanes {
    grid-template-columns: 1fr;
  }

  .cs-chamber:nth-child(even) .cs-chamber-card {
    transform: none;
  }

  .cs-chamber.is-live .cs-chamber-card {
    transform: none;
  }

  .cs-miss,
  .cs-idle {
    min-height: 200px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cs-pulse i,
  .cs-idle-orb,
  .cs-kpi-cell,
  .cs-lane {
    animation: none !important;
  }

  .cs-lane:hover,
  .cs-submit:hover,
  .cs-btn:hover {
    transform: none;
  }
}
