@import url("typography.css");
:root {
  --ink: #102a43;
  --muted: #486581;
  --weak: #5d7288;
  --line: #d9e2ec;
  --cyan: #0a5382;
  --cyan-2: #1565c0;
  --blue: #1f7aa8;
  --bg: #f5f7fa;
  --card: rgba(255, 255, 255, 0.94);
  --fs-h1: clamp(38px, 4.6vw, 58px);
  --fs-h2: 22px;
  --fs-body: 14px;
  --fs-meta: 12px;
  --fs-micro: 10px;
  --shadow: 0 22px 54px rgba(16, 42, 67, 0.10);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  min-width: 960px;
  font-family:var(--font-app);
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 12%, rgba(147, 197, 216, 0.32), transparent 26%),
    radial-gradient(circle at 88% 8%, rgba(98, 151, 199, 0.22), transparent 28%),
    linear-gradient(145deg, #f8fbfd 0%, #edf5f8 48%, #f6f8fb 100%);
  overflow-x: auto;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

button, input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(10, 83, 130, 0.22);
  outline-offset: 2px;
}

.app-shell {
  min-height: 100vh;
  padding: 16px 18px 48px;
  position: relative;
  isolation: isolate;
}

.topbar {
  /* @hook account-menu-overlay 20260814: keep account dropdown above dashboard content. */
  position: relative;
  z-index: 1200;
  overflow: visible;
  min-height: 64px;
  display: grid;
  grid-template-columns: 250px minmax(170px, auto) minmax(260px, 1fr) minmax(430px, auto);
  gap: 16px;
  align-items: center;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(217, 226, 236, 0.95);
  border-radius: 18px;
  box-shadow: 0 16px 38px rgba(16, 42, 67, 0.08);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(10, 83, 130, 0.16), rgba(57, 185, 214, 0.18));
}

.brand-mark svg,
.module-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  shape-rendering: geometricPrecision;
}

.brand-mark svg {
  width: 30px;
  height: 30px;
  color: var(--cyan);
}

.brand strong {
  display: block;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 900;
}

.brand span {
  display: block;
  color: var(--muted);
  font-size: var(--fs-meta);
  line-height: 1.35;
  text-wrap: balance;
}

.nav {
  display: flex;
  gap: 8px;
  white-space: nowrap;
}

.nav button {
  padding: 9px 14px;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  transition: background 0.15s, color 0.15s;
}

.nav button:hover {
  background: #e5f0f8;
  color: var(--cyan);
  font-weight: 700;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.search span,
.search kbd,
#model-clock,
.metric-stack strong,
.module-card footer strong,
.mono,
.program-id {
  font-family:var(--font-app);
  font-variant-numeric: tabular-nums;
}

.search span {
  color: var(--weak);
  font-size: 18px;
}

.search input {
  width: 100%;
  min-width: 120px;
  border: 0;
  outline: 0;
  color: var(--ink);
}

.search em,
.search kbd {
  flex: 0 0 auto;
  font-style: normal;
  font-size: 11px;
  color: var(--cyan);
  background: #e5f0f8;
  border-radius: 999px;
  padding: 3px 8px;
}

.search kbd {
  color: var(--weak);
  border: 1px solid var(--line);
  background: #fff;
}

.account {
  position: relative;
  z-index: 1210;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  min-width: 430px;
}

.account-summary {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(96px, max-content) auto;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.92);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  overflow: hidden;
}

.account-summary:hover,
.account-summary[aria-expanded="true"] {
  border-color: rgba(10, 83, 130, 0.34);
  background: #fff;
  box-shadow: 0 10px 24px rgba(16, 42, 67, 0.08);
}

.account-summary strong,
.account-menu-head strong {
  max-width: clamp(108px, 14vw, 178px);
  color: #166534;
  background: #e8f7ee;
  border: 1px solid #bfe6ce;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
  text-align: left;
}

.auth-copy [data-auth-label] {
  color: var(--weak);
  font-size: 11px;
  line-height: 1.1;
  font-weight: 700;
}

.account-id {
  display: block;
  color: var(--ink);
  font-weight: 800;
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-caret {
  color: var(--weak);
  font-size: 15px;
  line-height: 1;
}

.account.auth-invalid .account-summary strong,
.account.auth-invalid .account-menu-head strong {
  color: #b91c1c;
  background: #fee2e2;
  border-color: #fecaca;
}

.auth-dot,
.live i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 5px rgba(22, 163, 74, 0.12);
}

.account.auth-invalid .auth-dot {
  background: #dc2626;
  box-shadow: 0 0 0 5px rgba(220, 38, 38, 0.12);
}

.avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--cyan);
  color: #fff;
  font: 700 12px var(--font-app);
}

.account-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 1300;
  width: min(380px, calc(100vw - 36px));
  max-height: min(620px, calc(100vh - 120px));
  overflow: auto;
  padding: 16px;
  border: 1px solid rgba(217, 226, 236, 0.96);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 60px rgba(16, 42, 67, 0.18);
}

main {
  position: relative;
  z-index: 1;
}

.account-menu[hidden] {
  display: none;
}

.account-menu-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(217, 226, 236, 0.9);
}

.account-menu-head strong {
  display: inline-flex;
  margin-bottom: 6px;
}

.account-menu-head span:last-child {
  display: block;
  color: var(--muted);
  font-size: var(--fs-meta);
  line-height: 1.55;
  white-space: normal;
}

.account-detail-list {
  display: grid;
  gap: 0;
  margin: 12px 0;
}

.account-detail-list div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 8px 0;
  border-bottom: 1px solid rgba(217, 226, 236, 0.65);
}

.account-detail-list div:last-child {
  border-bottom: 0;
}

.account-detail-list dt {
  color: var(--weak);
  font-size: var(--fs-meta);
  font-weight: 700;
}

.account-detail-list dd {
  margin: 0;
  color: var(--ink);
  font-size: var(--fs-body);
  font-weight: 800;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.account-menu-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 10px;
}

.account-menu-actions button {
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  color: #fff;
  background: var(--cyan);
  font-weight: 800;
}

.account-menu-actions button.secondary {
  color: var(--cyan);
  background: #e5f0f8;
}

.profile-list {
  display: grid;
  grid-template-columns: minmax(88px, auto) minmax(220px, 1fr);
  gap: 10px 14px;
  margin: 6px 0 14px;
}

.profile-list div {
  display: contents;
}

.profile-list dt {
  color: var(--weak);
  font-size: var(--fs-meta);
  font-weight: 700;
}

.profile-list dd {
  margin: 0;
  color: var(--text);
  font-size: var(--fs-body);
  font-weight: 700;
}

.profile-warning {
  color: #b45309;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  padding: 10px 12px;
}

main {
  max-width: 1440px;
  margin: 18px auto 0;
}

.hero {
  min-height: 474px;
  display: grid;
  grid-template-columns: minmax(380px, 0.76fr) minmax(820px, 1.45fr);
  gap: 20px;
  align-items: stretch;
}

.hero-copy,
.model-panel,
.info-strip,
.module-card,
.more-card {
  background: var(--card);
  border: 1px solid rgba(217, 226, 236, 0.95);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero-copy {
  position: relative;
  padding: 52px;
  border-radius: 26px;
  overflow: hidden;
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.055;
  mask-image: linear-gradient(90deg, #000 0%, transparent 82%);
  background:
    repeating-linear-gradient(-8deg, transparent 0 30px, #0a5382 31px 32px),
    radial-gradient(circle at 20% 30%, #0a5382 0 2px, transparent 3px);
}

.hero-copy > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  color: var(--blue);
  font: 700 var(--fs-meta) var(--font-app);
  letter-spacing: 0.08em;
}

h1 {
  max-width: 620px;
  margin: 12px 0 16px;
  font-size: var(--fs-h1);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: 0;
  background: linear-gradient(90deg, #102a43 0%, #0a5382 60%, #39b9d6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-wrap: balance;
}

.lead {
  max-width: 640px;
  font-size: 20px;
  line-height: 1.35;
  color: var(--cyan);
  font-weight: 800;
  margin: 0 0 16px;
  text-wrap: balance;
}

.summary {
  color: var(--muted);
  line-height: 1.7;
  font-size: var(--fs-body);
  max-width: 620px;
  margin: 0 0 28px;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  gap: 14px;
}

.hero-actions button {
  height: 44px;
  min-width: 132px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}

.hero-actions button:hover {
  transform: translateY(-1px);
}

.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), #1f7aa8);
  box-shadow: 0 14px 26px rgba(10, 83, 130, 0.18);
}

.secondary {
  color: var(--cyan);
  border: 1px solid #bcd3e5;
  background: #fff;
}

.model-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  border-radius: 26px;
  padding: 18px;
  overflow: hidden;
  align-self: start;
}

.model-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background:
    linear-gradient(115deg, transparent 0 76%, rgba(10, 83, 130, 0.08) 76.5% 77%, transparent 77.5%),
    radial-gradient(circle at 76% 20%, rgba(80, 163, 173, 0.16), transparent 30%),
    radial-gradient(circle at 28% 72%, rgba(147, 197, 216, 0.22), transparent 32%);
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
  min-width: 0;
}

.panel-title-group {
  min-width: 0;
  flex: 1 1 auto;
}

.panel-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.28;
  white-space: nowrap;
}

.panel-title-group p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: var(--fs-meta);
  line-height: 1.45;
  text-wrap: pretty;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 700 12px var(--font-app);
  color: #16a34a;
}

.forecast-pills {
  display: flex;
  gap: 6px;
  white-space: nowrap;
}

.forecast-pills span {
  height: 26px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: var(--fs-micro);
  font-weight: 800;
  border: 1px solid #d7e7f3;
  background: #fff;
  color: #0a5382;
}

.forecast-pills span:first-child {
  background: #1565c0;
  color: #fff;
  border-color: #1565c0;
}

#model-clock {
  color: var(--weak);
  font-size: var(--fs-meta);
  white-space: nowrap;
}

.intel-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(172px, 0.68fr) minmax(360px, 1.48fr) minmax(168px, 0.72fr);
  gap: 12px;
  align-items: start;
  margin-top: 14px;
  min-height: 356px;
}

.gis-card,
.forecast-card,
.metric-group {
  border: 1px solid rgba(217, 226, 236, 0.95);
  background: rgba(255, 255, 255, 0.86);
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(16, 42, 67, 0.06);
}

.gis-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 14px;
  min-width: 0;
}

.mini-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.mini-head strong,
.metric-group h3 {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
}

.mini-head span {
  padding: 3px 7px;
  border-radius: 999px;
  background: #edf5fb;
  color: var(--cyan);
  font-size: var(--fs-micro);
  font-weight: 800;
  white-space: nowrap;
}

.basin-map {
  width: 100%;
  min-height: 190px;
}

.tdt-map-wrap {
  position: relative;
  width: 100%;
  min-height: 190px;
  overflow: hidden;
  border: 1px solid #d9e8f2;
  border-radius: 16px;
  background: linear-gradient(135deg, #eef7fb, #f7fbfd);
}

.tdt-map-wrap[hidden] {
  display: none;
}

.tdt-map {
  width: 100%;
  height: 210px;
  min-height: 190px;
  position: relative;
  z-index: 1;
}

.tdt-preview-backdrop {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  background: #dce8ef;
  pointer-events: none;
}

.tdt-preview-grid {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 420px;
  height: 420px;
  transform: translate(-50%, -50%);
}

.tdt-preview-grid span {
  display: block;
  position: absolute;
  width: 33.333%;
  height: 33.333%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.tdt-preview-grid span.label {
  z-index: 2;
}

.tdt-preview-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.preview-basin {
  position: absolute;
  left: 22%;
  top: 20%;
  width: 52%;
  height: 50%;
  border: 2px solid rgba(21, 101, 192, 0.8);
  border-radius: 50%;
  background: rgba(21, 101, 192, 0.12);
  transform: rotate(-15deg);
}

.preview-river {
  position: absolute;
  left: 31%;
  top: 34%;
  width: 42%;
  height: 24%;
  border-left: 4px solid rgba(10, 83, 130, 0.94);
  border-bottom: 4px solid rgba(10, 83, 130, 0.94);
  border-radius: 0 0 0 100%;
  transform: rotate(-32deg);
  filter: drop-shadow(0 3px 6px rgba(10, 83, 130, 0.22));
}

.preview-pin {
  position: absolute;
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  max-width: 92px;
  border: 1px solid rgba(10, 83, 130, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--cyan);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  padding: 4px 7px;
  box-shadow: 0 8px 18px rgba(16, 42, 67, 0.12);
  white-space: nowrap;
}

.preview-pin::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  background: #d32f2f;
}

.preview-pin.center { left: 45%; top: 43%; }
.preview-pin.section { left: 28%; top: 29%; }
.preview-pin.cad { left: 53%; top: 61%; }

.preview-credit {
  position: absolute;
  left: 8px;
  bottom: 7px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.86);
  color: #b76b00;
  font-size: 12px;
  font-weight: 900;
  padding: 3px 6px;
}

.tdt-map-tools {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 4;
  display: flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(207, 224, 236, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 18px rgba(16, 42, 67, 0.08);
  backdrop-filter: blur(8px);
}

.tdt-map-tools button {
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--cyan);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  padding: 5px 8px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tdt-map-tools button.active {
  border-color: var(--cyan);
  background: var(--cyan);
  color: #ffffff;
}

.gis-card.map-live .basin-map {
  display: none;
}

.gis-basin {
  fill: url(#basinTerrain);
  stroke: #b9d3e6;
  stroke-width: 1.2;
}

.gis-contour {
  fill: none;
  stroke: rgba(10, 83, 130, 0.28);
  stroke-width: 1.2;
}

.gis-contour.thin {
  stroke: rgba(10, 83, 130, 0.16);
}

.gis-river {
  fill: none;
  stroke: #0a5382;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: url(#softGlow);
}

.gis-tributary {
  fill: none;
  stroke: #4ba4c7;
  stroke-width: 2;
  stroke-linecap: round;
}

.rain-core circle:first-child {
  fill: rgba(245, 158, 11, 0.14);
  stroke: rgba(245, 158, 11, 0.35);
}

.rain-core circle:nth-child(2) {
  fill: rgba(245, 158, 11, 0.25);
  stroke: #f59e0b;
}

.rain-core text,
.gis-stations text {
  fill: var(--muted);
  font-size: 11px;
}

.gis-stations circle {
  fill: #fff;
  stroke: var(--cyan);
  stroke-width: 2;
}

.gis-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 4px 0 0;
}

.gis-meta div {
  min-width: 0;
  padding: 8px 6px;
  border-radius: 10px;
  background: #f6f9fc;
  border: 1px solid #e5edf4;
}

.gis-meta dt,
.gis-meta dd {
  margin: 0;
}

.gis-meta dt {
  color: var(--weak);
  font-size: 10px;
}

.gis-meta dd {
  margin-top: 3px;
  color: var(--cyan);
  font-size: 10px;
  font-weight: 800;
  white-space: normal;
  text-align: center;
}

.forecast-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 12px;
  min-width: 0;
}

.model-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 10px;
  position: relative;
  z-index: 1;
}

.model-tabs button {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-weight: 700;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.model-tabs button.active {
  background: #e5f0f8;
  color: var(--cyan);
  border-color: #bad4e8;
}

.visual-stage {
  position: relative;
  min-height: 300px;
  height: 300px;
  z-index: 1;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(248, 251, 253, 0.9), rgba(255, 255, 255, 0.72));
  border: 1px solid #e4edf5;
  overflow: hidden;
}

.view {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.view.active {
  opacity: 1;
  pointer-events: auto;
}

.grid line {
  stroke: rgba(16, 42, 67, 0.08);
  stroke-width: 1;
  shape-rendering: crispEdges;
}

.confidence {
  fill: #dbe7f5;
  opacity: 0.85;
  animation: breatheSoft 3.8s ease-in-out infinite;
}

.flow-actual,
.flow-forecast,
.river-main,
.water-line {
  fill: none;
  stroke: #0a5382;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.flow-forecast {
  stroke-dasharray: 10 8;
  animation: dashMove 2.6s linear infinite;
}

.net-rain-line {
  fill: none;
  stroke: #2e7d32;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.now-line {
  stroke: #64748b;
  stroke-width: 1.4;
  stroke-dasharray: 6 6;
}

.warn-line,
.danger-line {
  stroke: #dc2626;
  stroke-width: 1.8;
  stroke-dasharray: 8 7;
}

.warn-label,
.danger-text {
  fill: #dc2626;
  font-weight: 700;
  font-size: 13px;
}

.backwater-line {
  stroke: #f59e0b;
  stroke-width: 1.8;
  stroke-dasharray: 8 7;
}

.backwater-text {
  fill: #f59e0b;
  font-weight: 700;
  font-size: 13px;
}

.axis-label,
.legend text,
.stations text {
  fill: var(--muted);
  font-size: 12px;
}

.stations text {
  font-family:var(--font-app);
}

.rain rect {
  fill: url(#rainBars);
  rx: 3;
  animation: barRise 2.8s ease-in-out infinite alternate;
}

.peak,
.stations circle {
  fill: #dc2626;
  stroke: #fff;
  stroke-width: 2;
}

.confidence-box { fill: #dbe7f5; }
.basin-shape { fill: rgba(147, 197, 216, 0.18); stroke: rgba(10, 83, 130, 0.20); }
.sub-basin { fill: rgba(80, 163, 173, 0.12); stroke: rgba(0, 131, 143, 0.26); }
.sub-basin-alt { fill: rgba(98, 151, 199, 0.14); }
.river-glow { fill: none; stroke: rgba(57, 185, 214, 0.22); stroke-width: 18; stroke-linecap: round; }
.wave { fill: none; stroke: #39b9d6; stroke-width: 8; stroke-linecap: round; animation: routeWave 7s linear infinite; }
.rain-lines line { stroke: #39b9d6; stroke-width: 2; stroke-linecap: round; animation: rainBlink 1.8s ease-in-out infinite; }
.slope-arrows path { fill: none; stroke: #0a5382; stroke-width: 2; marker-end: url(#arrow); opacity: 0.75; }
.bank { fill: none; stroke: #829ab1; stroke-width: 2; }
.channel { fill: rgba(184, 201, 221, 0.18); stroke: #0a5382; stroke-width: 2; }
.water-surface { fill: rgba(57, 185, 214, 0.28); animation: waterPulse 5s ease-in-out infinite; }
.structure-shape { fill: none; stroke: #829ab1; stroke-width: 3; }
.safe-line { stroke: #16a34a; stroke-width: 1.8; stroke-dasharray: 7 6; }
.safe-text { fill: #15803d; font-weight: 700; font-size: 13px; }

.metric-stack {
  position: static;
  width: auto;
  display: grid;
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  z-index: 2;
  min-width: 0;
}

.metric-group {
  display: grid;
  gap: 7px;
  padding: 12px;
  align-content: start;
}

.metric-group h3 {
  margin: 0 0 2px;
}

.metric-stack article {
  display: grid;
  grid-template-columns: minmax(58px, auto) minmax(54px, 1fr);
  grid-template-areas:
    "label value"
    "status status";
  column-gap: 8px;
  row-gap: 2px;
  align-items: baseline;
  padding: 8px 9px;
  border-radius: 10px;
  background: #f8fbfd;
  border: 1px solid #e3edf5;
  min-width: 0;
}

.metric-stack span {
  grid-area: label;
  color: var(--muted);
  font-size: var(--fs-meta);
  white-space: nowrap;
}

.metric-stack strong {
  grid-area: value;
  margin: 0;
  color: var(--cyan);
  font-size: 20px;
  line-height: 1.15;
  font-weight: 700;
  text-align: right;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-stack em {
  grid-area: status;
  color: var(--weak);
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chart-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chart-tools button {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #d3e2ee;
  color: var(--cyan);
  background: #fff;
  font-size: var(--fs-meta);
  font-weight: 800;
}

.intel-readiness {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.intel-readiness span {
  min-width: 0;
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(248, 251, 253, 0.86);
  border: 1px solid #e3edf5;
  color: var(--muted);
  font-size: var(--fs-meta);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.intel-readiness strong {
  margin-left: 6px;
  color: var(--cyan);
  font-family:var(--font-app);
  font-weight: 800;
}

.info-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 0.6fr)) minmax(420px, 2fr);
  gap: 12px;
  padding: 14px;
  margin: 18px 0;
  border-radius: 20px;
}

.info-strip .node,
.info-strip .engine {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(229, 240, 248, 0.62);
  border: 1px solid rgba(217, 226, 236, 0.82);
}

.info-strip .node.active {
  background: #1565c0;
  border-color: #1565c0;
  color: #fff;
}

.info-strip strong {
  display: block;
  color: inherit;
  font-size: 14px;
}

.info-strip span {
  display: block;
  color: var(--muted);
  font-size: var(--fs-meta);
  line-height: 1.45;
  margin-top: 4px;
}

.info-strip .active span { color: rgba(255, 255, 255, 0.86); }
.info-strip .engine { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: center; }
.info-strip .engine span { margin: 0; text-wrap: balance; }

.classic-module-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin: 0 0 26px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 4px;
}

.classic-module-copy { min-width: 0; }
.classic-module-copy span { display: block; color: #0a5382; font-size: 13px; font-weight: 800; }
.classic-module-copy strong { display: block; margin-top: 5px; color: var(--ink); font-size: 18px; line-height: 1.35; }
.classic-module-copy p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.classic-module-enter { flex: 0 0 auto; border: 1px solid #0a5382; border-radius: 8px; background: #0a5382; color: #fff; font-weight: 800; padding: 10px 16px; }
.classic-module-enter:hover { background: #084368; }

.module-section { padding-bottom: 20px; }

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin: 4px 4px 14px;
}

.section-title span {
  font-size: var(--fs-h2);
  line-height: 1.3;
  font-weight: 900;
  text-wrap: balance;
}

.section-title p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  text-wrap: pretty;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 206px;
  gap: 18px;
}

.module-card,
.more-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 24px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.module-card:hover,
.more-card:hover {
  transform: translateY(-2px);
  border-color: var(--cyan);
  box-shadow: 0 24px 52px rgba(16, 42, 67, 0.12);
}

.module-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: var(--module);
}

.module-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--module);
  background: color-mix(in srgb, var(--module) 12%, white);
  border: 1px solid color-mix(in srgb, var(--module) 36%, white);
  transition: transform 0.15s;
}

.module-card:hover .module-icon {
  transform: scale(1.05);
}

.module-icon svg {
  width: 32px;
  height: 32px;
}

.module-card span {
  position: absolute;
  top: 28px;
  left: 88px;
  color: var(--module);
  font-size: var(--fs-meta);
  font-weight: 800;
}

.module-card h3 {
  margin: 16px 0 8px;
  font-size: 20px;
  line-height: 1.28;
  font-weight: 900;
  text-wrap: balance;
}

.module-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 13px;
  max-width: 92%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-wrap: pretty;
}

.module-card footer {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.module-card footer button {
  color: #fff;
  background: var(--cyan);
  border-radius: 10px;
  padding: 9px 18px;
  font-weight: 800;
  transition: background 0.15s;
}

.module-card footer button:hover {
  background: #0d47a1;
}

.module-card footer strong {
  color: var(--muted);
  font-size: var(--fs-meta);
  font-weight: 700;
  text-align: right;
}

.basin { --module: #1565c0; }
.irrigation { --module: #2e7d32; }
.levee { --module: #ef6c00; }
.waterline { --module: #6a1b9a; }
.reservoir { --module: #00838f; }
.hydropower { --module: #4527a0; }
.structure { --module: #0a5382; }
.wide { grid-column: span 2; }

.more-card {
  border-style: dashed;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--muted);
}

.more-card:hover {
  border-style: solid;
}

.more-card span {
  font-size: 18px;
  font-weight: 900;
  color: var(--cyan);
}

.more-card p {
  margin: 8px auto 0;
  max-width: 280px;
  line-height: 1.6;
  text-wrap: pretty;
}

.statusbar {
  position: relative;
  min-height: 32px;
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: center;
  margin: 20px 22px 28px;
  border: 1px solid rgba(217, 226, 236, 0.95);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  color: var(--muted);
  font-size: var(--fs-meta);
  padding: 6px 14px;
}

.membership-modal,
.dialog-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 50;
  background: rgba(16, 42, 67, 0.22);
  backdrop-filter: blur(8px);
}

.dialog-card,
.membership-card {
  width: min(620px, calc(100vw - 48px));
  max-height: min(720px, calc(100vh - 48px));
  overflow: auto;
  padding: 26px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(217, 226, 236, 0.95);
  box-shadow: 0 28px 70px rgba(16, 42, 67, 0.22);
}

.dialog-card h3,
.membership-card strong {
  display: block;
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.35;
  color: var(--ink);
}

.dialog-card p,
.membership-card p {
  margin: 10px 0;
  color: var(--muted);
  line-height: 1.7;
}

.login-status {
  margin: 14px 0 6px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(10, 83, 130, 0.16);
  background: #f4f9fd;
  color: var(--muted);
  font-size: var(--fs-meta);
  line-height: 1.6;
}

.dialog-card ul {
  margin: 12px 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.7;
}

.dialog-card menu,
.membership-card menu {
  position: sticky;
  bottom: -26px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 18px -26px -26px;
  padding: 12px 26px 16px;
  flex-wrap: wrap;
  background: linear-gradient(180deg, rgba(255,255,255,0.82), #fff 38%);
  border-top: 1px solid rgba(217, 226, 236, 0.86);
}

.dialog-card button,
.membership-card button {
  height: 40px;
  min-width: 112px;
  padding: 0 16px;
  border-radius: 12px;
  color: #fff;
  background: var(--cyan);
  font-weight: 800;
  white-space: nowrap;
  flex: 0 0 auto;
}

.dialog-card button:disabled,
.membership-card button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.dialog-card button.secondary,
.membership-card button.secondary {
  color: var(--cyan);
  background: #e5f0f8;
}

#toast {
  position: fixed;
  left: 50%;
  bottom: 56px;
  transform: translateX(-50%);
  max-width: min(520px, calc(100vw - 48px));
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(16, 42, 67, 0.92);
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 60;
}

#toast.show {
  opacity: 1;
}

.fatal-error {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 20% 18%, rgba(147, 197, 216, 0.24), transparent 26%),
    linear-gradient(145deg, #f8fbfd, #eef5f8);
}

.fatal-error > div {
  width: min(680px, calc(100vw - 56px));
  padding: 28px;
  border: 1px solid rgba(217, 226, 236, 0.95);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(16, 42, 67, 0.18);
}

.fatal-error strong {
  display: block;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.3;
}

.fatal-error p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.7;
}

.fatal-error pre {
  max-height: 180px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #334e68;
  background: #f8fbfd;
  white-space: pre-wrap;
  font: 12px/1.55 var(--font-app);
}

.fatal-error menu {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
}

.fatal-error button {
  height: 40px;
  min-width: 110px;
  padding: 0 16px;
  border-radius: 12px;
  color: #fff;
  background: var(--cyan);
  font-weight: 800;
}

.fatal-error button.secondary {
  color: var(--cyan);
  background: #e5f0f8;
}

@keyframes breatheSoft { 0%,100% { opacity: 0.62; } 50% { opacity: 0.95; } }
@keyframes dashMove { to { stroke-dashoffset: -36; } }

/* @hook art-pass-dialogs 20260811
   统一弹窗、登录授权和提示层视觉，保持工程软件的清晰边界和低干扰反馈。 */
.membership-modal,
.dialog-backdrop {
  background:
    radial-gradient(circle at 32% 24%, rgba(147, 197, 216, 0.26), transparent 28%),
    rgba(16, 42, 67, 0.24);
}

.dialog-card,
.membership-card {
  width: min(680px, calc(100vw - 48px));
  border-radius: 16px;
  border: 1px solid rgba(195, 212, 228, 0.95);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 254, 0.98)),
    #fff;
  box-shadow: 0 30px 80px rgba(16, 42, 67, 0.24);
}

.dialog-card::before,
.membership-card::before {
  content: "";
  display: block;
  height: 4px;
  width: 64px;
  margin: 0 0 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), #50a3ad);
}

.dialog-card h3,
.membership-card strong {
  font-size: 21px;
  letter-spacing: 0;
}

.dialog-card p,
.membership-card p,
.dialog-card li {
  color: #486581;
  font-size: 14px;
  line-height: 1.75;
}

.login-status {
  border-radius: 10px;
  border-color: rgba(10, 83, 130, 0.20);
  background:
    linear-gradient(135deg, rgba(232, 243, 248, 0.82), rgba(255, 255, 255, 0.92));
  color: #274866;
}

/* @hook wechat-membership-payment 20260814
   Logged-in unpaid WeChat accounts show purchase plans instead of another QR-login prompt. */
.payment-account-box {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid rgba(10, 83, 130, 0.16);
  border-radius: 12px;
  background: #f7fbfd;
}

.payment-account-box span {
  color: #5d7288;
  font-size: 13px;
  font-weight: 700;
}

.payment-account-box b {
  min-width: 0;
  color: #102a43;
  font-family:var(--font-app);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.plan-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(10, 83, 130, 0.18);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(16, 42, 67, 0.06);
}

.plan-card.disabled {
  border-color: #d9e2ec;
  background: #f7fafc;
  box-shadow: none;
  opacity: 0.86;
}

.plan-name {
  color: #102a43;
  font-size: 15px;
  font-weight: 900;
}

.plan-price {
  color: var(--cyan);
  font-family:var(--font-app);
  font-size: 24px;
  font-weight: 900;
}

.plan-card.disabled .plan-price {
  color: #829ab1;
}

.plan-card small {
  min-height: 20px;
  color: #5d7288;
  font-size: 12px;
  line-height: 1.55;
}

.plan-note {
  color: #486581;
  font-size: 12px;
  font-style: normal;
  line-height: 1.55;
}

.plan-disabled {
  padding: 6px 8px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  color: #b45309 !important;
}

.plan-card button {
  width: 100%;
  min-width: 0;
  margin-top: 4px;
}

.plan-card button:disabled {
  border-color: #cbd5e1;
  background: #d9e2ec;
  color: #64748b;
  box-shadow: none;
  cursor: not-allowed;
}

.payment-status {
  padding: 10px 12px;
  border: 1px solid rgba(10, 83, 130, 0.14);
  border-radius: 10px;
  background: #f4f9fd;
  color: #486581;
  font-size: 13px;
  line-height: 1.6;
}

.payment-status.error {
  border-color: rgba(220, 38, 38, 0.22);
  background: #fff1f2;
  color: #b91c1c;
}

/* @hook AUTH-device-seat-confirm-ui 20260814
   Device-seat conflicts are resolved inside the client instead of failing the WeChat callback page. */
.device-conflict-panel {
  display: grid;
  gap: 12px;
}

.device-conflict-panel strong {
  margin: 0;
  color: #8a1f11;
  font-size: 17px;
}

.device-conflict-panel p {
  margin: 0;
  color: #486581;
}

.device-conflict-panel dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.device-conflict-panel dl div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 10px;
  background: #fffbeb;
}

.device-conflict-panel dt {
  color: #78350f;
  font-size: 12px;
  font-weight: 700;
}

.device-conflict-panel dd {
  margin: 4px 0 0;
  color: #102a43;
  font-weight: 800;
  word-break: break-word;
}

.device-conflict-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.device-conflict-actions button {
  min-width: 142px;
}

.dialog-card menu,
.membership-card menu {
  border-top: 1px solid rgba(16, 42, 67, 0.08);
  padding-top: 16px;
}

.dialog-card button,
.membership-card button,
.fatal-error button {
  border: 1px solid var(--cyan);
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.dialog-card button:hover,
.membership-card button:hover,
.fatal-error button:hover {
  background: #0d47a1;
  transform: translateY(-1px);
}

.dialog-card button.secondary:hover,
.membership-card button.secondary:hover,
.fatal-error button.secondary:hover {
  color: #0d47a1;
  background: #dcecf6;
  transform: translateY(-1px);
}

.profile-list {
  display: grid;
  gap: 10px;
  margin: 12px 0 4px;
}

.profile-list div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(217, 226, 236, 0.92);
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
}

.profile-list dt {
  color: #5d7288;
  font-size: 13px;
  font-weight: 700;
}

.profile-list dd {
  margin: 0;
  color: #102a43;
  font-weight: 700;
}

.profile-warning {
  border: 1px solid rgba(245, 158, 11, 0.36);
  border-radius: 10px;
  background: #fffbeb;
  padding: 10px 12px;
  color: #78350f !important;
}

.profile-bind-form {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid rgba(10, 83, 130, 0.18);
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fcff 0%, #eef7fc 100%);
}

.profile-bind-form h4 {
  margin: 0;
  color: #0a3658;
  font-size: 16px;
  font-weight: 800;
}

.profile-bind-form p {
  margin: 0;
  color: #486581;
  font-size: 13px;
  line-height: 1.55;
}

.profile-bind-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.profile-bind-field {
  display: grid;
  gap: 4px;
}

.profile-bind-field span {
  color: #5d7288;
  font-size: 12px;
  font-weight: 700;
}

.profile-bind-field input {
  width: 100%;
  height: 36px;
  border: 1px solid #c7d8e6;
  border-radius: 9px;
  padding: 0 10px;
  color: #102a43;
  font: 700 14px var(--font-app);
  outline: none;
}

.profile-bind-field input:focus-visible {
  border-color: #0a5382;
  box-shadow: 0 0 0 3px rgba(10, 83, 130, 0.12);
}

.profile-bind-row button {
  min-width: 104px;
  height: 36px;
}

.profile-bind-message {
  min-height: 20px;
  color: #486581 !important;
  font-size: 13px;
}

.profile-bind-message[data-state="ok"] {
  color: #047857 !important;
}

.profile-bind-message[data-state="error"] {
  color: #b91c1c !important;
}

#toast {
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 16px 42px rgba(16, 42, 67, 0.22);
}
@keyframes barRise { to { transform: translateY(-8px); } }
@keyframes routeWave { 0% { stroke-dasharray: 0 430; stroke-dashoffset: 0; } 55% { stroke-dasharray: 42 430; } 100% { stroke-dasharray: 0 430; stroke-dashoffset: -430; } }
@keyframes rainBlink { 0%,100% { opacity: 0.25; transform: translateY(-2px); } 50% { opacity: 0.9; transform: translateY(8px); } }
@keyframes waterPulse { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

@media (max-width: 1180px) {
  .topbar { grid-template-columns: 220px 1fr; height: auto; padding: 12px; }
  .search, .account { grid-column: 1 / -1; }
  .account { justify-content: flex-start; flex-wrap: wrap; width: 100%; min-width: 0; }
  .account-summary { max-width: calc(100% - 154px); }
  .account-inline-actions { margin-left: auto; }
  .hero { grid-template-columns: 1fr; }
  .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wide { grid-column: span 1; }
  .info-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .info-strip .engine { grid-column: 1 / -1; }
}

@media (max-width: 1360px) and (min-width: 1181px) {
  .topbar {
    grid-template-columns: 230px minmax(148px, auto) minmax(220px, 1fr) minmax(390px, auto);
    gap: 12px;
    padding-inline: 14px;
  }
  .account {
    min-width: 390px;
    gap: 6px;
  }
  .account-summary {
    grid-template-columns: auto minmax(0, 1fr) minmax(82px, max-content) auto;
    gap: 7px;
    padding-inline: 8px;
  }
  .account-summary strong {
    max-width: 126px;
    padding-inline: 8px;
  }
}

@media (max-width: 960px) {
  body { min-width: 960px; }
  .app-shell { padding: 12px 14px 48px; }
  .hero-copy { padding: 40px; }
  .panel-head { flex-wrap: wrap; }
  .forecast-pills { margin-left: 0; }
  .view { inset-right: 0; width: 100%; }
  .metric-stack { position: static; width: auto; grid-template-columns: repeat(3, 1fr); margin-top: 12px; }
  .visual-stage { min-height: 300px; }
  .model-panel { grid-template-rows: auto auto auto auto; }
}

@media (max-width: 720px) {
  body { min-width: 720px; }
  .topbar { grid-template-columns: 1fr; }
  .nav, .hero-actions, .statusbar { flex-wrap: wrap; }
  .account-summary { flex: 1 0 100%; max-width: 100%; }
  .account-inline-actions { margin-left: 0; }
  .classic-module-section { align-items: flex-start; flex-direction: column; gap: 12px; }
  .module-grid { grid-template-columns: 1fr; grid-auto-rows: 206px; }
  .info-strip { grid-template-columns: 1fr; }
  .info-strip .engine { grid-template-columns: 1fr; }
}
