:root {
  --bg: #f5f7fa;
  --ink: #16202a;
  --muted: #4b5863;
  --accent: #0a4d7a;
  --accent-2: #8f5d17;
  --panel: #ffffff;
  --line: #d4dde5;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(180deg, #eef3f8 0%, #f8fafc 40%, #f4f8fb 100%);
  color: var(--ink);
  line-height: 1.5;
}
.container { max-width: 1080px; margin: 0 auto; padding: 1rem; }
.site-header {
  background: linear-gradient(125deg, #0a4d7a, #0b2740);
  color: #fff;
  border-bottom: 4px solid #d8b46a;
}
.site-header h1 { margin: 0; padding-top: 1rem; }
.subtitle { opacity: 0.9; margin: 0.4rem 0 1rem 0; }
nav { display: flex; gap: 0.8rem; flex-wrap: wrap; padding-bottom: 1rem; }
nav a {
  color: #12354e;
  text-decoration: none;
  padding: 0.3rem 0.55rem;
  border: 1px solid #bfd3e6;
  border-radius: 8px;
  background: #edf5fd;
  font-weight: 600;
}

nav a.active {
  color: #ffffff;
  background: linear-gradient(135deg, #c99539, #8f5d17);
  border-color: #f0cf94;
  box-shadow: 0 0 0 2px rgba(240, 207, 148, 0.25);
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin: 1rem 0;
}
.grid.two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
a { color: var(--accent); }
.footer {
  color: var(--muted);
  font-size: 0.9rem;
  padding-bottom: 2rem;
}

.detail-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.8rem;
}

.detail-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fcfdff;
  overflow: hidden;
}

.detail-item > summary {
  cursor: pointer;
  list-style: none;
  padding: 0.7rem 0.9rem;
  font-weight: 700;
  color: #11324b;
  background: linear-gradient(135deg, #f8fbff, #eef5fc);
}

.detail-item > summary::-webkit-details-marker {
  display: none;
}

.detail-item > summary::after {
  content: "+";
  float: right;
  color: var(--accent);
}

.detail-item[open] > summary::after {
  content: "-";
}

#tech-catalog-list > .detail-item[open] {
  border-color: #9fbad3;
  box-shadow: 0 0 0 2px rgba(22, 75, 118, 0.12);
}

.detail-body {
  padding: 0.8rem 0.9rem 0.95rem;
}

.detail-body h4 {
  margin: 0.5rem 0 0.25rem;
  color: #16344a;
}

.detail-body p {
  margin: 0.35rem 0 0.7rem;
}

.detail-body ul {
  margin: 0.4rem 0 0.85rem;
}

.nested-detail {
  border-color: #dbe8f4;
  background: #f7fbff;
}

.nested-detail > summary {
  font-weight: 600;
  color: #214965;
  background: #f2f8ff;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.45rem 0 0.6rem;
}

.pill {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8rem;
  border: 1px solid #c6d9ea;
  color: #12314a;
  background: #f0f7ff;
}

.location-grid {
  display: grid;
  gap: 0.55rem;
}

.location-card {
  border: 1px solid #d8e1ea;
  border-left: 4px solid var(--accent-2);
  border-radius: 8px;
  background: #fff;
  padding: 0.6rem 0.7rem;
}

.location-card strong {
  color: #153246;
}

.chapter-meta {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: -0.25rem;
}

.chapter-text {
  white-space: pre-wrap;
  word-wrap: break-word;
  background: #fbfdff;
  border: 1px solid #dbe5ef;
  border-radius: 10px;
  padding: 1rem;
  font-family: "Consolas", "Menlo", "Monaco", monospace;
  font-size: 0.92rem;
  line-height: 1.45;
}

.chapter-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.chapter-nav a {
  display: inline-block;
  padding: 0.35rem 0.6rem;
  border: 1px solid #c7d8e8;
  border-radius: 8px;
  text-decoration: none;
  background: #f2f8ff;
}

.phase-grid {
  display: grid;
  gap: 0.65rem;
}

.phase-band {
  border: 1px solid #d3deea;
  border-left: 5px solid #2f6b92;
  background: #f9fcff;
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
}

.linked-band {
  display: block;
  text-decoration: none;
  color: inherit;
}

.linked-band:hover {
  border-color: #9fbad3;
  box-shadow: 0 0 0 2px rgba(22, 75, 118, 0.12);
  background: #f4f9ff;
}

.clickable-panel {
  cursor: pointer;
}

.clickable-panel:hover {
  border-color: #9fbad3;
  box-shadow: 0 0 0 2px rgba(22, 75, 118, 0.12);
  background: #f4f9ff;
}

.clickable-panel:focus-visible {
  outline: 3px solid rgba(10, 77, 122, 0.35);
  outline-offset: 2px;
}

.card h2 a {
  color: inherit;
  text-decoration: none;
}

.card h2 a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.phase-band h4 {
  margin: 0 0 0.3rem;
  color: #16344a;
}

.year-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.65rem;
}

.year-card {
  border: 1px solid #d6e0ea;
  border-radius: 9px;
  background: #fff;
  padding: 0.65rem 0.7rem;
}

.year-card h4 {
  margin: 0 0 0.35rem;
  color: #13344b;
}

.year-card p {
  margin: 0.2rem 0;
  font-size: 0.92rem;
}

.flow-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.flow-links a {
  display: inline-block;
  padding: 0.35rem 0.6rem;
  border: 1px solid #c7d8e8;
  border-radius: 8px;
  text-decoration: none;
  background: #f2f8ff;
}

.topic-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.65rem 0 0.85rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin: 0.8rem 0 1rem;
}

.stat-card {
  border: 1px solid #d6e0ea;
  border-radius: 10px;
  background: #fbfdff;
  padding: 0.75rem 0.85rem;
}

.stat-card h4 {
  margin: 0 0 0.35rem;
  color: #14354d;
}

.stat-card p {
  margin: 0.2rem 0;
  font-size: 0.94rem;
}

.note-box {
  border: 1px solid #d8e1ea;
  border-left: 4px solid var(--accent-2);
  border-radius: 10px;
  background: #fffdf8;
  padding: 0.75rem 0.85rem;
  margin: 0.8rem 0 1rem;
}

.note-box p:last-child,
.note-box ul:last-child {
  margin-bottom: 0;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.8rem 0 1rem;
  font-size: 0.95rem;
}

.spec-table th,
.spec-table td {
  border: 1px solid #d6e0ea;
  padding: 0.6rem 0.7rem;
  text-align: left;
  vertical-align: top;
}

.spec-table th {
  background: #f2f8ff;
  color: #14344b;
}

.spec-table tbody tr:nth-child(even) td {
  background: #fbfdff;
}

.topic-menu a {
  display: inline-block;
  padding: 0.35rem 0.6rem;
  border: 1px solid #c7d8e8;
  border-radius: 8px;
  text-decoration: none;
  background: #f2f8ff;
  font-weight: 600;
}

.render-frame {
  margin-top: 0.8rem;
  border: 1px solid #d5e2ee;
  border-radius: 10px;
  background: #f7fbff;
  padding: 0.6rem;
}

.render-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid #ccddeb;
  background: #eef5fb;
}

.render-caption {
  margin-top: 0.55rem;
  color: #355066;
  font-size: 0.92rem;
}

.schedule-wrap {
  margin-top: 0.8rem;
  border: 1px solid #dbe5ef;
  border-radius: 10px;
  overflow: auto;
  background: #fcfeff;
}

.schedule-table {
  width: 100%;
  min-width: 1260px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.79rem;
}

.schedule-table thead th {
  position: static;
  z-index: 1;
  background: #eff5fb;
  color: #14364f;
  font-weight: 700;
  text-align: center;
  padding: 0.56rem 0.48rem;
  border-bottom: 1px solid #cfdbe8;
  border-right: 1px solid #dde7f1;
  white-space: nowrap;
}

.schedule-table thead tr.group-row th {
  background: #e7f0f9;
  color: #0f3046;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
}

.schedule-table thead tr.sub-row th {
  background: #f2f7fc;
  font-size: 0.84rem;
}

.schedule-table tbody td {
  text-align: center;
  padding: 0.48rem 0.42rem;
  border-top: 1px solid #e4ecf4;
  border-right: 1px solid #edf2f8;
  white-space: nowrap;
}

.schedule-table tbody tr:nth-child(2n) {
  background: #f8fbff;
}

.schedule-table tbody td:first-child,
.schedule-table thead th:first-child {
  position: static;
  background: #f4f9ff;
  font-weight: 700;
}

.schedule-table thead th:first-child {
  z-index: 1;
}

/* Strong separators between metric groups */
.schedule-table thead tr.sub-row th:nth-child(3),
.schedule-table thead tr.sub-row th:nth-child(6),
.schedule-table thead tr.sub-row th:nth-child(10),
.schedule-table thead tr.sub-row th:nth-child(13),
.schedule-table thead tr.sub-row th:nth-child(16),
.schedule-table thead tr.sub-row th:nth-child(19),
.schedule-table tbody td:nth-child(4),
.schedule-table tbody td:nth-child(7),
.schedule-table tbody td:nth-child(11),
.schedule-table tbody td:nth-child(14),
.schedule-table tbody td:nth-child(17),
.schedule-table tbody td:nth-child(20) {
  border-right: 2px solid #c8d8e8;
}

.quick-stack {
  display: grid;
  gap: 0.65rem;
}

.quick-item {
  border: 1px solid #d7e1eb;
  border-left: 4px solid #2f6b92;
  background: #f9fcff;
  border-radius: 8px;
  padding: 0.6rem 0.7rem;
}

.quick-item strong {
  display: block;
  color: #16344a;
}

.step-list {
  margin: 0.45rem 0 0;
  padding-left: 1.1rem;
}

.step-list li {
  margin: 0.35rem 0 0.55rem;
}

.section-note {
  color: var(--muted);
  margin-top: -0.2rem;
}

.explore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.75rem;
  margin-top: 0.8rem;
}

.explore-card {
  border: 1px solid #d4e0ec;
  border-top: 4px solid #1f5d86;
  border-radius: 10px;
  background: #f9fcff;
  padding: 0.75rem 0.8rem;
}

.explore-card h3 {
  margin: 0 0 0.35rem;
  color: #12354e;
}

.explore-card p {
  margin: 0 0 0.65rem;
  font-size: 0.94rem;
}

.explore-card a {
  display: inline-block;
  text-decoration: none;
  border: 1px solid #bfd3e6;
  border-radius: 8px;
  background: #edf5fd;
  padding: 0.3rem 0.55rem;
  font-weight: 600;
}

.explore-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tech-page-link {
  margin: 0.2rem 0 0.75rem;
}

.tech-page-link a {
  display: inline-block;
  padding: 0.28rem 0.55rem;
  border: 1px solid #c3d6e8;
  border-radius: 8px;
  background: #eef6ff;
  text-decoration: none;
  font-weight: 600;
}

.yard-sat-link {
  display: inline-block;
  margin-left: 0.45rem;
  padding: 0.1rem 0.4rem;
  border: 1px solid #c3d6e8;
  border-radius: 7px;
  background: #eef6ff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.55rem 0 0.85rem;
  border: 1px solid #d6e1ec;
  background: #fff;
}

table th,
table td {
  border: 1px solid #dfe8f1;
  padding: 0.45rem 0.55rem;
  text-align: left;
  vertical-align: top;
}

table thead th {
  background: #eef5fc;
  color: #12354e;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.card {
  min-width: 0;
}

.card a {
  overflow-wrap: anywhere;
}

.hero-card {
  border-top: 4px solid #c89d4e;
  background: linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
}

.hero-kicker {
  margin: 0 0 0.35rem;
  color: #2f5f7e;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.branch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.path-card {
  border: 1px solid #d4e0ec;
  border-left: 5px solid #2f6b92;
  border-radius: 10px;
  background: #f9fcff;
  padding: 0.75rem 0.8rem;
}

.path-card h3 {
  margin: 0 0 0.35rem;
  color: #13344b;
}

.path-card p {
  margin: 0.2rem 0 0.6rem;
}

.path-card ul {
  margin: 0.3rem 0 0.7rem;
  padding-left: 1.1rem;
}

.action-link {
  display: inline-block;
  text-decoration: none;
  border: 1px solid #bfd3e6;
  border-radius: 8px;
  background: #edf5fd;
  padding: 0.3rem 0.55rem;
  font-weight: 700;
}

.query-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.7rem;
  margin-top: 0.7rem;
}

.query-card {
  display: block;
  text-decoration: none;
  border: 1px solid #d2dfec;
  border-radius: 10px;
  background: #f8fbff;
  padding: 0.72rem 0.78rem;
  color: #16344a;
}

.query-card strong {
  display: block;
  color: #12314a;
  margin-bottom: 0.25rem;
}

.query-card span {
  display: block;
  color: #33556c;
  font-size: 0.93rem;
}

.query-card:hover {
  border-color: #aac4de;
  background: #f0f7ff;
}

.atlas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.atlas-card {
  border: 1px solid #d4e0ec;
  border-left: 5px solid #2f6b92;
  border-radius: 10px;
  background: #f9fcff;
  padding: 0.8rem 0.85rem;
}

.atlas-card h3,
.atlas-card h4 {
  margin: 0 0 0.35rem;
  color: #12354e;
}

.atlas-card p {
  margin: 0.2rem 0 0.5rem;
}

.atlas-card ul {
  margin: 0.3rem 0 0.65rem;
  padding-left: 1.1rem;
}

.site-switcher,
.role-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.4rem 0 0.55rem;
}

.site-choice,
.role-choice {
  appearance: none;
  border: 1px solid #bfd3e6;
  border-radius: 999px;
  background: #edf5fd;
  color: #12354e;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.28rem 0.62rem;
  cursor: pointer;
}

.site-choice.active,
.role-choice.active {
  background: #d9ebfb;
  border-color: #8eb4d4;
}

.site-selection {
  margin: 0.1rem 0 0.45rem;
  color: #2b4c63;
  font-size: 0.94rem;
}

.role-panel {
  border: 1px solid #d7e3ee;
  border-radius: 9px;
  background: #ffffff;
  padding: 0.65rem 0.75rem;
  margin-top: 0.35rem;
}

.role-copy {
  margin: 0;
}

.is-hidden {
  display: none !important;
}

.atlas-tier {
  display: inline-block;
  margin-bottom: 0.45rem;
  padding: 0.14rem 0.52rem;
  border-radius: 999px;
  border: 1px solid #c6d9ea;
  background: #eef6ff;
  color: #173a52;
  font-size: 0.8rem;
  font-weight: 700;
}

.animation-panel {
  border: 1px solid #d5e2ee;
  border-radius: 12px;
  background: #f7fbff;
  padding: 0.8rem;
  overflow: hidden;
}

.animation-panel svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid #ccddeb;
  background: #eef5fb;
}

.anim-heavy-module {
  animation: imm-drop 8s ease-in-out infinite;
}

.anim-iso-module {
  animation: iso-slide 7s ease-in-out infinite;
}

@keyframes imm-drop {
  0% { transform: translate(0, -74px); opacity: 0.4; }
  20% { transform: translate(0, -74px); opacity: 0.4; }
  46% { transform: translate(0, 18px); opacity: 1; }
  66% { transform: translate(0, 18px); opacity: 1; }
  100% { transform: translate(0, -74px); opacity: 0.4; }
}

@keyframes iso-slide {
  0% { transform: translate(90px, 0); opacity: 0.3; }
  18% { transform: translate(90px, 0); opacity: 0.3; }
  52% { transform: translate(-160px, 0); opacity: 1; }
  72% { transform: translate(-160px, 0); opacity: 1; }
  100% { transform: translate(90px, 0); opacity: 0.3; }
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 1rem;
  align-items: start;
}

.map-panel,
.map-sidebar {
  border: 1px solid #d5e2ee;
  border-radius: 12px;
  background: #f9fcff;
  padding: 0.8rem;
}

.map-panel svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fbff 0%, #edf5fd 100%);
}

.region-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.65rem 0 0.2rem;
}

.region-filter {
  border: 1px solid #bfd3e6;
  background: #edf5fd;
  color: #12344d;
  border-radius: 999px;
  padding: 0.38rem 0.7rem;
  cursor: pointer;
  font-weight: 700;
}

.region-filter.active {
  background: #d7e9fb;
  border-color: #9cbddd;
}

.map-region {
  fill: rgba(116, 157, 189, 0.14);
  stroke: #9cb6cb;
  stroke-width: 2;
  cursor: pointer;
}

.map-region.active {
  fill: rgba(61, 124, 168, 0.24);
  stroke: #3d7ca8;
}

.map-region-label {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 13px;
  fill: #355066;
  font-weight: 700;
  pointer-events: none;
}

.yard-marker {
  fill: #c98f3c;
  stroke: #8c5d17;
  stroke-width: 2;
  cursor: pointer;
  transition: transform 120ms ease, fill 120ms ease;
}

.yard-marker:hover,
.yard-marker.active {
  fill: #3d7ca8;
  stroke: #1f5d86;
  transform: scale(1.14);
}

.yard-label {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 10px;
  fill: #173a52;
  font-weight: 700;
  pointer-events: none;
}

.map-sidebar h3 {
  margin-top: 0;
}

.map-sidebar ul {
  padding-left: 1.1rem;
}

.map-sidebar .action-link {
  margin-top: 0.5rem;
}

@media (max-width: 980px) {
  .map-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  nav {
    gap: 0.5rem;
  }

  nav a {
    padding: 0.28rem 0.45rem;
    font-size: 0.9rem;
  }

  .path-card {
    padding: 0.7rem;
  }
}

.review-date {
  color: #526b7c;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.proposal-disclaimer,
.site-disclaimer {
  color: #526573;
  font-size: 0.86rem;
  line-height: 1.5;
}

.site-disclaimer {
  border-top: 1px solid #cedbe5;
  margin-top: 0.75rem;
  padding-top: 0.65rem;
}

@media print {
  .site-header nav,
  .pill-row,
  .action-link,
  .yard-sat-link,
  button {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #111 !important;
  }

  .container {
    max-width: none;
    width: 100%;
  }

  .card {
    break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #bbb !important;
  }

  a {
    color: #111 !important;
    text-decoration: none;
  }
}

.class-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.class-pill {
  border: 1px solid #bfd3e6;
  background: #edf5fd;
  color: #12344d;
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  font-weight: 700;
}

.class-pill span {
  display: block;
  font-weight: 500;
  font-size: 0.8rem;
  opacity: 0.92;
}

.class-pill.active {
  background: #d7e9fb;
  border-color: #9cbddd;
}

.baseline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.8rem;
}

.builder-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.9rem;
}

.builder-panel {
  border: 1px solid #d4e0ec;
  border-radius: 10px;
  background: #f9fcff;
  padding: 0.8rem;
}

.builder-panel h3 {
  margin-top: 0;
}

.builder-row {
  border: 1px solid #e0e8f1;
  border-radius: 8px;
  padding: 0.6rem;
  background: #fff;
  margin-bottom: 0.6rem;
}

.builder-row h4 {
  margin: 0 0 0.45rem;
  color: #12354e;
}

.builder-field {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 0.45rem;
}

.builder-field span {
  font-size: 0.86rem;
  color: #36546a;
  font-weight: 700;
}

.builder-field select {
  width: 100%;
  border: 1px solid #c7d8e8;
  border-radius: 8px;
  background: #f8fbff;
  padding: 0.4rem 0.5rem;
}

.builder-field input[type="number"] {
  width: 100%;
  border: 1px solid #c7d8e8;
  border-radius: 8px;
  background: #f8fbff;
  padding: 0.4rem 0.5rem;
}

.mk41-loadout {
  margin-top: 0.35rem;
  border: 1px solid #d9e6f2;
  border-radius: 8px;
  background: #f8fbff;
  padding: 0.55rem 0.6rem;
}

.mk41-loadout h5 {
  margin: 0 0 0.35rem;
  color: #143a55;
}

.mk41-grid {
  display: grid;
  gap: 0.35rem;
}

.mk41-total {
  margin: 0.4rem 0 0;
  color: #173a52;
}

.mk41-loadout.invalid {
  border-color: #d18c8c;
  background: #fff8f8;
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.8rem;
}

.analysis-card {
  border: 1px solid #d4e0ec;
  border-top: 4px solid #1f5d86;
  border-radius: 10px;
  background: #f9fcff;
  padding: 0.75rem 0.8rem;
}

.analysis-card h3 {
  margin-top: 0;
}

.score-row {
  display: grid;
  grid-template-columns: 1.5fr 2.3fr auto;
  align-items: center;
  gap: 0.45rem;
  margin: 0.35rem 0;
}

.score-row span {
  font-size: 0.9rem;
}

.score-row em {
  font-style: normal;
  font-weight: 700;
  color: #12344d;
}

.score-bar {
  border: 1px solid #cfe0ef;
  height: 10px;
  border-radius: 999px;
  background: #eff6fd;
  overflow: hidden;
}

.score-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #2f6b92, #86b6d8);
}

.button-link {
  cursor: pointer;
}

.danger-link {
  background: #fff2f2;
  border-color: #e2b3b3;
  color: #7e2020;
}

.fleet-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.7rem;
}

.fleet-ship-card {
  margin-bottom: 0.85rem;
}

.fleet-ship-card.newly-added {
  animation: fleetCardDropIn 260ms ease-out;
}

.fleet-ship-card.shift-down {
  animation: fleetCardSlideDown 260ms ease-out;
}

.fleet-ship-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.module-info-btn {
  margin-top: 0.15rem;
}

.module-modal.hidden {
  display: none;
}

.module-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
}

.module-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 23, 36, 0.55);
}

.module-modal-panel {
  position: relative;
  max-width: 560px;
  margin: 6vh auto 0;
  background: #ffffff;
  border: 1px solid #c9d9e8;
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(9, 34, 55, 0.3);
  padding: 1rem 1rem 0.9rem;
  z-index: 1;
}

.module-modal-panel h3 {
  margin: 0 0 0.45rem;
  color: #12354e;
}

.module-modal-panel p {
  margin: 0.35rem 0;
}

.module-modal-close {
  float: right;
  border: 1px solid #bfd3e6;
  border-radius: 8px;
  background: #edf5fd;
  color: #12354e;
  font-weight: 700;
  padding: 0.3rem 0.5rem;
  cursor: pointer;
}

@keyframes fleetCardDropIn {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fleetCardSlideDown {
  from {
    transform: translateY(-8px);
  }
  to {
    transform: translateY(0);
  }
}

@media (max-width: 760px) {
  .module-modal-panel {
    margin: 5vh 0.7rem 0;
  }
}
