:root {
  --bridge-navy: #041b3d;
  --bridge-navy-2: #062753;
  --bridge-line: rgba(124, 184, 238, .16);
  --bridge-text: #ecf7ff;
  --bridge-muted: #8faed0;
  --bridge-cyan: #4fd2e6;
  --bridge-green: #4fd69a;
  --bridge-yellow: #f2bf43;
  --bridge-red: #ff5a58;
}

.bridge-page { background: #f3f7fc; }
.bridge-page .side-link { text-decoration: none; }
.bridge-page .app-shell { min-height: 100vh; }
.bridge-main { grid-column: 2; min-width: 0; min-height: 100vh; background: #f3f7fc; }

.bridge-hero {
  position: relative;
  height: 222px;
  overflow: hidden;
  border-bottom: 0;
  background-color: #d5ebff;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,.04) 0%, rgba(239,247,253,.12) 58%, rgba(239,246,252,.76) 100%),
    url("../img/hrzn-header-coast.png");
  background-repeat: no-repeat;
  background-size: 100% 100%, 112% auto;
  background-position: center, right 88%;
}

.bridge-hero::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: auto 0 0;
  height: 34px;
  background: linear-gradient(180deg, rgba(243,247,252,0), #f3f7fc);
  pointer-events: none;
}

.bridge-title { position: relative; z-index: 5; padding: 35px 32px 0; }
.bridge-title .eyebrow { margin: 0 0 5px; color: #47709e; font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.bridge-title h1 { margin: 0; color: #082b61; font-size: 43px; line-height: 1; letter-spacing: -.05em; }
.bridge-title > p:last-child { margin: 9px 0 0; color: #4c6892; font-size: 15px; }
.bridge-utility { top: 23px; right: 28px; }

.classic-button {
  position: absolute;
  z-index: 6;
  right: 28px;
  top: 86px;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 14px;
  background: rgba(248,252,255,.78);
  color: #143968;
  box-shadow: 0 8px 24px rgba(27,75,128,.07);
  backdrop-filter: blur(14px);
  cursor: pointer;
}
.classic-button span { font-size: 18px; }
.classic-button b { font-size: 11px; }

.bridge-pulse-cards { position: absolute; z-index: 5; left: 32px; bottom: 24px; display: flex; gap: 10px; }
.bridge-pulse-cards > div {
  width: 150px;
  height: 58px;
  display: grid;
  grid-template-columns: 35px 1fr;
  grid-template-rows: 1fr 1fr;
  column-gap: 8px;
  align-items: center;
  padding: 9px 13px;
  border: 1px solid rgba(169,196,224,.46);
  border-radius: 11px;
  background: rgba(255,255,255,.73);
  box-shadow: 0 6px 16px rgba(26,74,127,.05);
  backdrop-filter: blur(12px);
}
.bridge-pulse-cards .material-symbols-rounded { grid-row: 1 / 3; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #eef6ff; color: #0873ed; font-size: 18px; }
.bridge-pulse-cards small { align-self: end; color: #60799d; font-size: 8px; font-weight: 800; letter-spacing: .06em; }
.bridge-pulse-cards b { align-self: start; color: #102e59; font-size: 12px; }

.bridge-content { position: relative; z-index: 8; margin-top: -1px; padding: 7px 28px 26px; }
.bridge-deck {
  position: relative;
  min-height: 510px;
  display: grid;
  grid-template-columns: 300px minmax(570px, 1fr) 310px;
  overflow: hidden;
  border: 1px solid rgba(8,51,102,.24);
  border-radius: 13px;
  background: var(--bridge-navy);
  color: var(--bridge-text);
  box-shadow: 0 16px 35px rgba(13,49,94,.15);
}
.bridge-deck::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .72;
  background:
    repeating-radial-gradient(ellipse at 25% 72%, transparent 0 24px, rgba(78,139,195,.045) 25px, transparent 26px 34px),
    repeating-radial-gradient(ellipse at 82% 17%, transparent 0 18px, rgba(78,139,195,.04) 19px, transparent 20px 31px),
    linear-gradient(118deg, rgba(15,69,119,.16), transparent 45%, rgba(10,48,91,.26));
}
.bridge-deck > article { position: relative; z-index: 2; min-width: 0; }
.impact-queue { padding: 21px 16px 16px; border-right: 1px solid var(--bridge-line); background: rgba(1,18,42,.48); }
.bridge-briefing { padding: 21px 20px 13px; border-left: 1px solid var(--bridge-line); background: rgba(8,38,78,.72); }
.deck-heading { min-height: 25px; border-bottom: 1px solid rgba(144,188,227,.17); }
.deck-heading h2, .map-heading h2 { margin: 0; color: #dfeeff; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.deck-heading h2 > span { color: #718eae; font-weight: 600; }
.impact-list { display: flex; flex-direction: column; }
.impact-item {
  min-height: 68px;
  display: grid;
  grid-template-columns: 28px 25px minmax(0,1fr) auto;
  gap: 7px;
  align-items: center;
  padding: 8px 2px;
  border: 0;
  border-bottom: 1px solid rgba(129,175,217,.14);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.impact-item:hover, .impact-item:focus-visible { background: rgba(42,104,164,.12); }
.queue-number { width: 23px; height: 23px; display: grid; place-items: center; border: 1px solid rgba(128,177,222,.22); border-radius: 50%; color: #a9c5e1; font: 700 8px/1 Manrope, sans-serif; }
.severity { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; color: white; }
.severity i { font-size: 14px; }
.severity.critical { background: rgba(255,78,79,.82); }
.severity.alert { color: #d5e8f8; background: rgba(80,128,176,.25); }
.severity.neutral { color: #eaf5ff; background: rgba(89,150,202,.18); }
.severity.warning { color: #ffd67a; background: rgba(207,146,35,.14); }
.impact-copy { min-width: 0; }
.impact-copy b { display: block; overflow: hidden; color: #edf7ff; font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.impact-copy small { display: block; margin-top: 4px; color: #ff6d69; font: 700 7.4px/1.2 Manrope, sans-serif; letter-spacing: .04em; text-transform: uppercase; }
.impact-item em { color: #96afca; font: 700 6.8px/1 Manrope, sans-serif; letter-spacing: .06em; font-style: normal; }
.deck-link { width: 100%; height: 43px; display: flex; align-items: center; justify-content: space-between; margin-top: 8px; padding: 0 13px; border: 1px solid rgba(116,171,219,.28); border-radius: 10px; background: rgba(4,29,61,.5); color: #dfefff; font-size: 10px; font-weight: 600; cursor: pointer; }
.deck-link:hover { background: rgba(34,94,151,.2); }
.deck-link span { color: #78b7f0; font-size: 17px; }

.system-map { min-height: 510px; overflow: hidden; }
.system-map::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, rgba(27,78,126,.28), transparent 40%); pointer-events: none; }
.map-heading { position: absolute; z-index: 8; left: 50%; top: 20px; display: flex; align-items: center; gap: 8px; transform: translateX(-50%); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--bridge-green); box-shadow: 0 0 0 5px rgba(79,214,154,.06); }
#systemRoutes { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; }
.coordinate { position: absolute; z-index: 2; color: rgba(151,190,224,.36); font: 700 7px/1 Manrope, sans-serif; letter-spacing: .09em; }
.coordinate-a { left: 6%; top: 57%; }.coordinate-b { right: 5%; bottom: 12%; }
.vessel-marker { position: absolute; z-index: 5; left: 27%; top: 44%; width: 18px; height: 7px; border-radius: 60% 40% 45% 45%; background: #f5fbff; box-shadow: 0 0 11px rgba(211,240,255,.4); animation: vessel-drift 12s ease-in-out infinite alternate; }
.vessel-marker::after { content: ""; position: absolute; left: 8px; top: -5px; border-left: 5px solid transparent; border-bottom: 6px solid rgba(238,249,255,.82); }

.system-node {
  position: absolute;
  z-index: 6;
  width: 112px;
  height: 112px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(97,181,228,.64);
  border-radius: 50% 50% 45% 45%;
  background: linear-gradient(180deg, rgba(13,64,109,.94), rgba(6,31,67,.95));
  color: var(--bridge-text);
  box-shadow: inset 0 0 0 7px rgba(7,29,61,.42), 0 9px 22px rgba(0,15,35,.28);
  cursor: pointer;
  transition: transform .25s ease, border-color .25s ease;
}
.system-node:hover, .system-node:focus-visible, .system-node.is-pulsing { transform: translateY(-3px); border-color: #c0e7ff; }
.system-node .material-symbols-rounded { margin-bottom: 2px; color: var(--bridge-cyan); font-size: 23px; }
.system-node small { color: #c2dbef; font-size: 7px; font-weight: 700; letter-spacing: .08em; }
.system-node b { margin: 4px 0 2px; font-size: 21px; line-height: 1; }
.system-node em { color: #a8bfd6; font-size: 6.5px; font-style: normal; letter-spacing: .04em; }
.system-node strong { margin-top: 4px; color: var(--bridge-red); font-size: 6.4px; letter-spacing: .03em; }
.node-finops { left: 16%; top: 13%; }
.node-automations { right: 12%; top: 13%; }
.node-sources { left: 11%; bottom: 11%; border-color: rgba(60,211,166,.64); }
.node-sources .material-symbols-rounded, .node-sources strong { color: var(--bridge-green); }
.node-adoption { left: 47%; bottom: 4%; }
.node-adoption .material-symbols-rounded { color: #6fe0eb; }
.node-insights { right: 8%; bottom: 18%; border-color: rgba(234,186,61,.65); }
.node-insights .material-symbols-rounded, .node-insights strong { color: var(--bridge-yellow); }

.engine-core {
  position: absolute;
  z-index: 7;
  left: 50%;
  top: 48%;
  width: 154px;
  height: 154px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translate(-50%,-50%);
  border: 1px solid rgba(135,188,234,.55);
  border-radius: 50%;
  background: radial-gradient(circle, #0b3767 0 38%, #09284e 39% 58%, #061d3f 59% 100%);
  box-shadow: 0 0 0 9px rgba(77,139,198,.13), 0 0 0 17px rgba(86,143,196,.08), 0 14px 40px rgba(0,12,30,.4);
}
.engine-core::before { content: ""; position: absolute; inset: -12px; border: 1px solid rgba(121,180,229,.18); border-radius: 50%; animation: engine-pulse 5s ease-out infinite; }
.engine-core > small { color: #eff8ff; font-size: 7px; font-weight: 700; letter-spacing: .1em; }
.engine-core > span { display: flex; align-items: center; gap: 5px; margin-top: 6px; color: #9fc3df; font-size: 7px; letter-spacing: .08em; }
.engine-core > span i { width: 6px; height: 6px; border-radius: 50%; background: var(--bridge-green); }
.engine-core > em { margin-top: 4px; color: #7c9bb8; font-size: 5.8px; font-style: normal; letter-spacing: .05em; }
.waveform { height: 31px; display: flex; align-items: center; gap: 2px; margin-top: 8px; }
.waveform i { width: 2px; height: 8px; border-radius: 2px; background: #eaf7ff; animation: waveform 2.4s ease-in-out infinite; }
.waveform i:nth-child(2n) { animation-delay: -.4s; }.waveform i:nth-child(3n) { animation-delay: -.9s; }.waveform i:nth-child(5n) { animation-delay: -1.3s; }

.bridge-briefing section { padding: 13px 0 0; }
.bridge-briefing h3 { margin: 0 0 7px; color: #8fa9c5; font-size: 7.5px; font-weight: 800; letter-spacing: .1em; }
.bridge-briefing p { margin: 0; color: #e8f2fb; font-size: 10.5px; line-height: 1.55; }
.impact-totals { display: grid; grid-template-columns: 1fr 1fr; }
.impact-totals > div + div { padding-left: 18px; border-left: 1px solid rgba(131,177,218,.13); }
.impact-totals b { display: block; color: var(--bridge-red); font-size: 22px; line-height: 1; }.impact-totals b small { font-size: 9px; }
.impact-totals > div:last-child b { color: #eef8ff; }
.impact-totals span { display: block; margin-top: 4px; color: #9bb3cb; font-size: 8px; }
.bridge-briefing ol { margin: 0; padding: 0; list-style: none; counter-reset: actions; }
.bridge-briefing li { counter-increment: actions; }
.bridge-briefing li button { width: 100%; height: 24px; display: grid; grid-template-columns: 18px 1fr 16px; align-items: center; padding: 0; border: 0; background: transparent; color: #eaf4fc; text-align: left; font-size: 8.5px; cursor: pointer; }
.bridge-briefing li button::before { content: counter(actions); width: 13px; height: 13px; display: grid; place-items: center; border-radius: 50%; background: rgba(80,133,182,.26); color: #b9d4eb; font-size: 6px; }
.bridge-briefing li button span { justify-self: end; color: #cce8ff; font-size: 14px; }
.bridge-briefing dl { margin: 0; }
.bridge-briefing dl > div { display: flex; align-items: center; justify-content: space-between; height: 23px; color: #a8bdd2; font-size: 7.7px; }
.bridge-briefing dd { display: flex; align-items: center; gap: 6px; margin: 0; color: #cfe5f6; }.bridge-briefing dd i { width: 6px; height: 6px; border-radius: 50%; background: var(--bridge-green); }.bridge-briefing dd.danger { color: var(--bridge-red); }
.review-findings { width: 100%; height: 37px; display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding: 0 14px; border: 0; border-radius: 9px; background: linear-gradient(105deg,#0873f1,#0757d8); color: white; font-size: 10px; font-weight: 700; cursor: pointer; }
.full-briefing { width: 100%; height: 25px; display: flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: transparent; color: #b5cae0; font-size: 8px; cursor: pointer; }.full-briefing span { font-size: 12px; }

.bridge-rail { display: grid; grid-template-columns: 1.05fr 2fr repeat(4,.7fr); gap: 10px; margin-top: 14px; }
.bridge-rail > article, .module-tile { min-height: 132px; border: 1px solid #d8e3ef; border-radius: 11px; background: rgba(255,255,255,.92); box-shadow: 0 7px 20px rgba(22,66,117,.05); }
.course-card { padding: 14px; }
.course-card header { display: flex; align-items: center; gap: 5px; color: #365d8c; font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.course-card > div { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.course-card b { color: #123a73; font-size: 20px; }.course-card b small { color: #5a7398; font-size: 10px; }.course-card canvas { width: 105px; height: 45px; }
.course-card p { margin: 3px 0 10px; color: #6980a0; font-size: 9px; }
.course-card a { color: #0869ea; text-decoration: none; font-size: 9px; font-weight: 700; }
.horizon-command { display: flex; flex-direction: column; padding: 13px; }
.horizon-command form { height: 46px; display: grid; grid-template-columns: 30px 1fr 34px; align-items: center; gap: 6px; padding: 0 8px; border: 1px solid #d1e0ef; border-radius: 11px; background: #fbfdff; }
.command-mark { color: #2365ad; font-size: 21px; }.horizon-command input { min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: #15385f; font-size: 11px; }.horizon-command form button { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #d3e2ef; border-radius: 8px; background: white; color: #355f8b; cursor: pointer; }.horizon-command form button span { font-size: 17px; }
.command-answer { min-height: 22px; padding: 6px 3px 3px; color: #587295; font-size: 8.5px; line-height: 1.35; }
.suggestion-chips { display: flex; gap: 5px; margin-top: auto; overflow: hidden; }.suggestion-chips button { flex: 1; min-width: 0; height: 27px; overflow: hidden; padding: 0 8px; border: 1px solid #d5e2ef; border-radius: 999px; background: white; color: #355b84; font-size: 7.6px; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.module-tile { display: flex; flex-direction: column; padding: 13px; color: #14365f; text-decoration: none; }
.module-tile > .material-symbols-rounded { color: #567da7; font-size: 16px; }.module-tile small { margin-top: -17px; padding-left: 22px; color: #4f6e93; font-size: 7px; font-weight: 800; letter-spacing: .07em; }.module-tile b { margin-top: 18px; font-size: 19px; }.module-tile em { margin-top: 5px; color: #ec4a43; font-size: 7px; font-weight: 700; font-style: normal; letter-spacing: .03em; }.module-tile strong { margin-top: auto; color: #0b68e6; font-size: 7.8px; }
.tile-insights em { color: #d18c00; }.tile-adoption em { color: #e8514b; }.tile-sources em { color: #18a96f; }
.module-tile:hover { border-color: #a9c9e8; transform: translateY(-1px); }

.briefing-dialog { width: min(470px,calc(100% - 32px)); padding: 30px; border: 0; border-radius: 20px; color: #0a2d58; box-shadow: 0 30px 100px rgba(3,28,65,.3); }.briefing-dialog::backdrop { background: rgba(2,18,40,.48); backdrop-filter: blur(5px); }.briefing-dialog h2 { margin: 8px 0 10px; font-size: 25px; }.briefing-dialog p { color: #577092; font-size: 12px; line-height: 1.6; }.briefing-dialog > div { margin: 20px 0; padding: 15px; border-radius: 12px; background: #edf5fd; }.briefing-dialog > div b { display: block; color: #ef433b; font-size: 25px; }.briefing-dialog > div span { color: #6580a3; font-size: 10px; }

.classic-view .system-map { display: grid; grid-template-columns: repeat(2,1fr); align-content: center; gap: 10px; padding: 55px 28px 24px; }
.classic-view #systemRoutes, .classic-view .vessel-marker, .classic-view .coordinate { display: none; }
.classic-view .engine-core, .classic-view .system-node { position: relative; inset: auto; width: auto; height: 68px; transform: none; border-radius: 12px; }
.classic-view .engine-core { grid-column: 1 / -1; justify-self: stretch; }
.classic-view .waveform { height: 18px; margin-top: 2px; }
.classic-view .system-node { display: grid; grid-template-columns: 28px 1fr auto; grid-template-rows: 1fr 1fr; padding: 8px 12px; text-align: left; }
.classic-view .system-node .material-symbols-rounded { grid-row: 1 / 3; }.classic-view .system-node small, .classic-view .system-node em, .classic-view .system-node strong { justify-self: start; }.classic-view .system-node b { grid-row: 1 / 3; grid-column: 3; }

@keyframes engine-pulse { 0% { transform: scale(.96); opacity: .5; } 65%,100% { transform: scale(1.16); opacity: 0; } }
@keyframes waveform { 0%,100% { height: 7px; opacity: .7; } 50% { height: 26px; opacity: 1; } }
@keyframes vessel-drift { from { transform: translate(-5px,4px) rotate(-4deg); } to { transform: translate(27px,-13px) rotate(6deg); } }

@media (max-width: 1320px) {
  .bridge-deck { grid-template-columns: 280px minmax(500px,1fr); }
  .bridge-briefing { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; border-top: 1px solid var(--bridge-line); border-left: 0; }
  .bridge-briefing .deck-heading { grid-column: 1 / -1; }.bridge-briefing .review-findings, .bridge-briefing .full-briefing { align-self: end; }
  .bridge-rail { grid-template-columns: 1fr 2fr repeat(2,.8fr); }.module-tile { min-height: 118px; }
}

@media (max-width: 1080px) {
  .bridge-title { padding-left: 24px; }.bridge-content { padding-left: 20px; padding-right: 20px; }
  .bridge-deck { display: flex; flex-direction: column; }
  .impact-queue { order: 1; border-right: 0; }.system-map { order: 2; min-height: 520px; }.bridge-briefing { order: 3; display: grid; }
  .bridge-rail { grid-template-columns: repeat(2,1fr); }.horizon-command { grid-column: span 1; }.module-tile { min-height: 112px; }
}

@media (max-width: 880px) {
  .bridge-hero { height: 280px; background-size: auto 100%; background-position: 72% center; }
  .bridge-title { padding-top: 84px; }.bridge-title h1 { font-size: 38px; }
  .bridge-utility { top: 14px; left: 16px; right: auto; }
  .classic-button { right: 16px; top: 84px; }.bridge-pulse-cards { left: 16px; bottom: 22px; }
  .bridge-content { padding: 8px 14px 20px; }
  .bridge-briefing { grid-template-columns: 1fr 1fr; }
  .system-map { display: grid; grid-template-columns: 1fr 1fr; align-content: center; gap: 10px; padding: 58px 18px 20px; }
  #systemRoutes, .vessel-marker, .coordinate { display: none; }
  .engine-core, .system-node { position: relative; inset: auto; width: auto; height: 76px; transform: none; border-radius: 12px; }
  .engine-core { grid-column: 1 / -1; justify-self: stretch; }.waveform { height: 18px; margin-top: 2px; }
  .system-node { display: grid; grid-template-columns: 28px 1fr auto; grid-template-rows: 1fr 1fr; padding: 8px 12px; text-align: left; }
  .system-node .material-symbols-rounded { grid-row: 1 / 3; }.system-node small, .system-node em, .system-node strong { justify-self: start; }.system-node b { grid-row: 1 / 3; grid-column: 3; }
}

@media (max-width: 600px) {
  .bridge-title > p:last-child { max-width: 260px; font-size: 12px; }.bridge-pulse-cards > div { width: 135px; }.classic-button b { display: none; }.classic-button { width: 42px; padding: 0; justify-content: center; }
  .bridge-deck { border-radius: 10px; }.bridge-briefing { display: block; }.bridge-briefing .deck-heading { margin-bottom: 8px; }
  .system-map { grid-template-columns: 1fr; }.engine-core { grid-column: auto; }.system-node { height: 70px; }
  .bridge-rail { grid-template-columns: 1fr; }.horizon-command { min-height: 150px; }.suggestion-chips { flex-wrap: wrap; }.suggestion-chips button { flex: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .engine-core::before, .waveform i, .vessel-marker { animation: none !important; }
}
