/* ============================================================
   RAMP SEQUENCE — HoosAI ✕ BNSF Railway
   ink + glass control-room console. Barlow Condensed / Inter /
   Fraunces italic / JetBrains Mono. No gradients, no CDN.
   ============================================================ */

:root {
  --ink: #06070A;
  --ink-2: #0B0D12;
  --text: #E9ECF2;
  --muted: rgba(233, 236, 242, 0.56);
  --faint: rgba(233, 236, 242, 0.32);
  --line: rgba(233, 236, 242, 0.10);
  --glass: rgba(255, 255, 255, 0.035);
  --glass-2: rgba(255, 255, 255, 0.06);
  --accent: #F35D0A;
  --accent-soft: rgba(243, 93, 10, 0.16);
  --warn: #E8484A;
  --warn-soft: rgba(232, 72, 74, 0.14);

  /* destination-block identifiers — muted data-vis hues, functional
     only, never used for brand/CTA purposes */
  --blk-kcy: #4D8DEE;
  --blk-ftw: #35B37E;
  --blk-den: #B98CE8;
  --blk-sea: #4DC9D6;
  --blk-lac: #E8799E;

  --disp: "Barlow Condensed", sans-serif;
  --body: "Inter", sans-serif;
  --serif: "Fraunces", serif;
  --mono: "JetBrains Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
/* the hidden attribute must always win, even over classes that set their own display */
[hidden]{ display:none !important; }


html, body { overflow-x: hidden; }

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

.wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

em { font-family: var(--serif); font-style: italic; font-weight: 400; }

h1, h2, h3 { font-family: var(--disp); text-transform: uppercase; letter-spacing: 0.04em; line-height: 1.05; font-weight: 700; }

a { color: inherit; }

::selection { background: var(--accent); color: #fff; }

button { font: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.4; }

/* ---------- pulse dot ---------- */
.pulse {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(243,93,10,0.5); }
  50% { box-shadow: 0 0 0 6px rgba(243,93,10,0); }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--disp);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 12px 24px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
  white-space: nowrap;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover:not(:disabled) { background: #ff6f1f; }
.btn-ghost { background: var(--glass); backdrop-filter: blur(8px); }
.btn-ghost:hover:not(:disabled) { background: var(--glass-2); border-color: rgba(233,236,242,0.25); }
.btn-text {
  border-color: transparent;
  background: transparent;
  color: var(--faint);
  padding: 12px 10px;
  font-size: 14px;
}
.btn-text:hover:not(:disabled) { color: var(--muted); transform: none; }

/* ---------- brand lockup ---------- */
.brand-badge { display: inline-flex; align-items: center; flex: none; }
.brand-badge img { display: block; height: 20px; width: auto; }
.lockup { display: flex; align-items: center; gap: 9px; font-family: var(--disp); font-weight: 700; font-size: 17px; letter-spacing: 0.1em; flex: none; }
.lockup-x { color: var(--accent); font-size: 13px; }

/* ============================================================
   HEADER
   ============================================================ */
.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(6, 7, 10, 0.86);
  backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid var(--line);
}
.head-row {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 14px 0;
  flex-wrap: wrap;
}
.head-meta { display: flex; flex-direction: column; gap: 2px; }
.head-title { font-family: var(--disp); font-weight: 700; font-size: 15px; letter-spacing: 0.14em; color: var(--text); }
.head-sub { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; color: var(--faint); text-transform: uppercase; }
.head-clock {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 7px 14px;
  background: var(--glass);
}

/* ============================================================
   CONSOLE LAYOUT
   ============================================================ */
.console { padding: 28px 0 70px; position: relative; z-index: 2; }

.glass-card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 10px;
  backdrop-filter: blur(14px) saturate(150%);
}

.panel { padding: clamp(18px, 3vw, 28px); margin-bottom: 22px; }
.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.panel-head h2 { font-size: 20px; letter-spacing: 0.06em; }
.panel-count { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--muted); white-space: nowrap; }

/* ---------- ramp info strip ---------- */
.ramp-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 18px;
  background: var(--glass);
}
.ramp-strip-item { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rs-label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; color: var(--faint); text-transform: uppercase; }
.rs-value { font-family: var(--disp); font-weight: 600; font-size: 16px; letter-spacing: 0.02em; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- control bar ---------- */
.control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 18px 22px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.control-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.control-status { flex: 1 1 280px; min-width: 220px; }
.status-line { font-size: 13.5px; color: var(--muted); }
.status-line b { color: var(--text); font-weight: 600; }
.status-line.is-warn { color: var(--accent); }
.progress-track {
  margin-top: 8px;
  height: 3px;
  width: 100%;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.progress-track.active { opacity: 1; }
.progress-track i { display: block; height: 100%; width: 0%; background: var(--accent); }
.progress-track.animating i { transition: width 1.3s cubic-bezier(0.4, 0, 0.2, 1); width: 100%; }

/* ---------- console grid ---------- */
.console-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 22px;
  align-items: start;
}

/* ============================================================
   INBOUND QUEUE
   ============================================================ */
.queue-list { display: flex; flex-direction: column; gap: 8px; }
.queue-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255,255,255,0.015);
  transition: border-color 0.3s ease, background 0.3s ease;
}
.queue-row.is-placed { border-color: rgba(233,236,242,0.16); }
.queue-row.is-held { border-color: rgba(232,72,74,0.35); background: rgba(232,72,74,0.05); }
.queue-row.is-bumped { border-color: rgba(243,93,10,0.4); background: var(--accent-soft); }
.queue-row.is-late { border-color: rgba(243,93,10,0.5); }

.q-id { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--text); flex: 0 0 auto; }
.q-equip {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 2px 8px;
}
.q-block {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid currentColor;
  opacity: 0.92;
}
.q-weight { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-left: auto; }
.q-status {
  font-family: var(--disp);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 100px;
  border: 1px solid var(--line);
  color: var(--faint);
  flex: 1 1 100%;
}
.queue-row.is-placed .q-status { color: var(--text); border-color: rgba(233,236,242,0.2); }
.queue-row.is-held .q-status { color: var(--warn); border-color: rgba(232,72,74,0.5); background: var(--warn-soft); }
.queue-row.is-bumped .q-status { color: var(--accent); border-color: rgba(243,93,10,0.5); background: var(--accent-soft); }
.q-tag {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--accent);
  border: 1px solid rgba(243,93,10,0.45);
  background: var(--accent-soft);
  padding: 2px 7px;
  border-radius: 100px;
}

@media (min-width: 561px) {
  .q-status { flex: 0 0 auto; margin-left: 8px; }
}

/* ============================================================
   TRACK MAP
   ============================================================ */
.track-map { display: flex; flex-direction: column; gap: 16px; }
.track-lane { border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.track-lane.is-short { border-color: rgba(232,72,74,0.28); }
.lane-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.lane-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.lane-name { font-family: var(--disp); font-weight: 700; font-size: 16px; letter-spacing: 0.04em; }
.lane-note { font-family: var(--mono); font-size: 10.5px; color: var(--warn); letter-spacing: 0.02em; }
.lane-weight { font-family: var(--mono); font-size: 12.5px; color: var(--muted); white-space: nowrap; }

.slot-row { display: flex; flex-wrap: wrap; gap: 8px; }
.slot {
  flex: 1 1 118px;
  min-width: 108px;
  min-height: 74px;
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  border: 1px dashed var(--line);
  color: var(--faint);
}
.slot-open {
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.slot-filled {
  border-style: solid;
  border-color: currentColor;
  background: rgba(255,255,255,0.03);
  color: var(--text);
}
.slot-filled .s-id { font-family: var(--mono); font-size: 12.5px; font-weight: 500; color: var(--text); }
.slot-filled .s-meta { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.slot-filled .s-block {
  font-size: 9.5px;
  letter-spacing: 0.06em;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid currentColor;
}
.slot.flash { animation: flashHighlight 1.6s ease; }
@keyframes flashHighlight {
  0% { box-shadow: 0 0 0 2px var(--accent); background: var(--accent-soft); }
  100% { box-shadow: 0 0 0 0 rgba(243,93,10,0); background: rgba(255,255,255,0.03); }
}

/* ============================================================
   WEIGHT & BALANCE
   ============================================================ */
.weight-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.w-card { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; }
.w-card.is-split { border-color: rgba(243,93,10,0.3); }
.w-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; color: var(--faint); text-transform: uppercase; }
.w-value { font-family: var(--disp); font-weight: 700; font-size: 26px; margin-top: 6px; letter-spacing: 0.01em; }
.w-sub { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 3px; }
.w-bar { margin-top: 10px; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.w-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.6s ease; }
.w-split { display: flex; gap: 3px; margin-top: 10px; height: 22px; border-radius: 4px; overflow: hidden; }
.w-split div:first-child { background: rgba(77,141,238,0.55); }
.w-split div:last-child { background: rgba(233,236,242,0.18); }

/* ============================================================
   EXCEPTIONS
   ============================================================ */
.exceptions-list { display: flex; flex-direction: column; gap: 10px; }
.ex-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 12px 14px;
  border-radius: 6px;
  border: 1px solid rgba(232,72,74,0.35);
  background: rgba(232,72,74,0.06);
}
.ex-row.is-bumped { border-color: rgba(243,93,10,0.4); background: var(--accent-soft); }
.ex-id { font-family: var(--mono); font-size: 13px; font-weight: 500; }
.ex-badge {
  font-family: var(--disp);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 100px;
  color: var(--warn);
  border: 1px solid rgba(232,72,74,0.5);
}
.ex-row.is-bumped .ex-badge { color: var(--accent); border-color: rgba(243,93,10,0.5); }
.ex-detail { font-size: 13px; color: var(--muted); flex: 1 1 100%; }

/* ============================================================
   SWITCH LIST
   ============================================================ */
.switch-table-wrap { width: 100%; }
.switch-table { width: 100%; border-collapse: collapse; }
.switch-table th {
  text-align: left;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 0 10px 10px;
  border-bottom: 1px solid var(--line);
}
.switch-table td {
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  vertical-align: middle;
}
.switch-table tbody tr:last-child td { border-bottom: none; }
.switch-table tr.is-new td { color: var(--accent); }
.switch-table tr.is-empty td { color: var(--faint); font-family: var(--body); font-size: 13.5px; padding: 18px 10px; }
.sw-flag {
  font-family: var(--disp);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  border: 1px solid rgba(243,93,10,0.5);
  background: var(--accent-soft);
  padding: 1px 6px;
  border-radius: 100px;
  margin-left: 6px;
}

/* ============================================================
   PLANNER LOG
   ============================================================ */
.planner-log { list-style: none; display: flex; flex-direction: column; gap: 8px; max-height: 220px; overflow-y: auto; }
.planner-log li {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  padding-left: 14px;
  border-left: 2px solid var(--line);
}
.planner-log li b { color: var(--text); }
.planner-log li.is-flag { border-left-color: var(--accent); color: var(--text); }
.planner-log li time { color: var(--faint); margin-right: 8px; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-foot { border-top: 1px solid var(--line); padding: 30px 0 44px; position: relative; z-index: 2; }
.foot-lockup { font-family: var(--disp); font-weight: 700; font-size: 15px; letter-spacing: 0.12em; display: flex; align-items: center; gap: 8px; }
.foot-lockup span { color: var(--accent); }
.site-foot p { margin-top: 12px; max-width: 780px; font-size: 12px; color: var(--faint); line-height: 1.7; }

/* ============================================================
   REVEAL (lightweight entrance, respects reduced motion)
   ============================================================ */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ============================================================
   BLOCK COLOR UTILITIES
   ============================================================ */
.blk-KCY { color: var(--blk-kcy); }
.blk-FTW { color: var(--blk-ftw); }
.blk-DEN { color: var(--blk-den); }
.blk-SEA { color: var(--blk-sea); }
.blk-LAC { color: var(--blk-lac); }

/* ============================================================
   MOBILE — no horizontal scroll anywhere
   ============================================================ */
@media (max-width: 900px) {
  .console-grid { grid-template-columns: 1fr; }
  .ramp-strip { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .head-row { gap: 10px; }
  .head-meta { order: 3; flex-basis: 100%; }
  .head-clock { margin-left: auto; }
  .ramp-strip { grid-template-columns: 1fr 1fr; gap: 12px 16px; padding: 14px; }
  .control-bar { flex-direction: column; align-items: stretch; }
  .control-actions { justify-content: stretch; }
  .control-actions .btn { flex: 1 1 auto; }
  .q-weight { margin-left: 0; }
  .switch-table thead { display: none; }
  .switch-table, .switch-table tbody, .switch-table tr, .switch-table td { display: block; width: 100%; }
  .switch-table tr { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 10px; padding: 10px 12px; }
  .switch-table tr.is-empty { border: none; padding: 0; }
  .switch-table td { border-bottom: none; padding: 3px 0; }
  .switch-table td::before {
    content: attr(data-label);
    display: inline-block;
    width: 92px;
    color: var(--faint);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .pulse { animation: none; }
  .slot.flash { animation: none; }
  .progress-track.animating i { transition: none; }
}
