:root {
  color-scheme: dark;
  --canvas: #081017;
  --canvas-alt: #0d1721;
  --surface: rgba(15, 28, 39, 0.92);
  --surface-strong: rgba(19, 37, 52, 0.96);
  --surface-soft: rgba(14, 25, 36, 0.78);
  --text: #f3f7fb;
  --muted: #8fa7ba;
  --line: rgba(130, 159, 181, 0.16);
  --accent: #6ef2c3;
  --accent-2: #66a7ff;
  --accent-3: #ffc85f;
  --up: #62e4a3;
  --down: #ff6f7c;
  --urgent: #ff875b;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.35);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --display: "Sora", "IBM Plex Sans", sans-serif;
  --container: 1440px;
  --header-height: 82px;
  --motion: 180ms ease;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

html {
  background:
    radial-gradient(circle at 10% 0%, rgba(102, 167, 255, 0.17), transparent 34%),
    radial-gradient(circle at 100% 0%, rgba(110, 242, 195, 0.11), transparent 30%),
    linear-gradient(180deg, #081017 0%, #071018 58%, #09111a 100%);
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--body);
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(110, 242, 195, 0.06) 0, rgba(110, 242, 195, 0.06) 1px, transparent 1px, transparent 80px),
    linear-gradient(rgba(102, 167, 255, 0.03) 0, rgba(102, 167, 255, 0.03) 1px, transparent 1px, transparent 80px),
    transparent;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 0%, rgba(110, 242, 195, 0.04) 45%, transparent 100%),
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.018) 0 1px,
      transparent 1px 3px
    );
  pointer-events: none;
  opacity: 0.55;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.app-shell {
  min-height: 100vh;
}

.shell {
  width: min(var(--container), calc(100vw - 28px));
  margin: 0 auto;
  padding: 18px 0 48px;
}

.top-alert {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 135, 91, 0.3);
  border-radius: 16px;
  background: rgba(39, 17, 18, 0.84);
  color: #ffd8ca;
  backdrop-filter: blur(16px);
}

.top-alert.hidden {
  display: none;
}

.top-alert strong {
  font-family: var(--display);
  font-size: 0.92rem;
}

.masthead {
  position: sticky;
  top: 14px;
  z-index: 25;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border: 1px solid rgba(130, 159, 181, 0.18);
  border-radius: 24px;
  background: rgba(6, 13, 20, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

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

.brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  padding: 8px;
  background: linear-gradient(145deg, rgba(110, 242, 195, 0.16), rgba(102, 167, 255, 0.18));
  border: 1px solid rgba(110, 242, 195, 0.24);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.brand-copy {
  min-width: 0;
}

.brand-copy p,
.hero-copy p,
.status-text,
.risk-strip p,
.small-note,
.subtle {
  color: var(--muted);
}

.brand-title {
  margin: 0;
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-subtitle {
  margin: 2px 0 0;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.masthead-tools {
  min-width: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: min(420px, 44vw);
  padding: 8px 10px 8px 14px;
  border: 1px solid rgba(130, 159, 181, 0.18);
  border-radius: 18px;
  background: rgba(15, 28, 39, 0.84);
}

.search-form input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
}

.search-form button,
.ghost-button,
.chip-button,
.tab-chip,
.control-button {
  white-space: nowrap;
}

.nav-row {
  display: flex;
  gap: 10px;
  align-items: center;
  overflow-x: auto;
  padding: 14px 4px 0;
}

.nav-row::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar,
.activity-stream::-webkit-scrollbar,
.modal-card::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.nav-row::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb,
.activity-stream::-webkit-scrollbar-thumb,
.modal-card::-webkit-scrollbar-thumb {
  background: rgba(143, 167, 186, 0.28);
  border-radius: 999px;
}

.nav-pill {
  padding: 11px 15px;
  border-radius: 14px;
  border: 1px solid rgba(130, 159, 181, 0.16);
  background: rgba(10, 17, 24, 0.74);
  color: var(--muted);
  font-size: 0.95rem;
  transition: transform var(--motion), border-color var(--motion), color var(--motion), background var(--motion);
}

.nav-pill.is-active,
.nav-pill:hover {
  color: var(--text);
  border-color: rgba(110, 242, 195, 0.3);
  background: linear-gradient(180deg, rgba(110, 242, 195, 0.12), rgba(102, 167, 255, 0.08));
  transform: translateY(-1px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.95fr);
  gap: 18px;
  margin-top: 22px;
}

.panel,
.hero-panel,
.right-rail,
.card,
.table-card,
.modal-card {
  border: 1px solid rgba(130, 159, 181, 0.15);
  background: linear-gradient(180deg, rgba(14, 24, 35, 0.92), rgba(10, 19, 28, 0.94));
  box-shadow: var(--shadow);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border-radius: 32px;
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 24px;
  border: 1px solid rgba(110, 242, 195, 0.09);
  pointer-events: none;
}

.hero-thesis {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.hero-badge,
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(110, 242, 195, 0.22);
  background: rgba(9, 17, 24, 0.76);
  color: #b4fae2;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero-badge::before,
.section-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(110, 242, 195, 0.65);
}

.hero-copy {
  display: grid;
  gap: 18px;
  max-width: 680px;
}

.hero-title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.4rem, 4.5vw, 4.3rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.hero-copy p {
  margin: 0;
  max-width: 58ch;
  font-size: 1rem;
  line-height: 1.7;
}

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

.primary-button,
.ghost-button,
.chip-button,
.control-button,
.tab-chip {
  padding: 11px 15px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: rgba(16, 28, 41, 0.78);
  transition: transform var(--motion), background var(--motion), border-color var(--motion), color var(--motion);
}

.primary-button {
  background: linear-gradient(135deg, rgba(110, 242, 195, 0.24), rgba(102, 167, 255, 0.22));
  border-color: rgba(110, 242, 195, 0.32);
  color: #f2fffb;
}

.ghost-button,
.chip-button,
.control-button,
.tab-chip {
  border-color: rgba(130, 159, 181, 0.18);
  color: var(--text);
}

.primary-button:hover,
.ghost-button:hover,
.chip-button:hover,
.control-button:hover,
.tab-chip:hover {
  transform: translateY(-1px);
}

.hero-visual {
  display: grid;
  align-content: end;
  gap: 14px;
}

.hero-visual img {
  width: 100%;
  aspect-ratio: 1.18;
  object-fit: cover;
  border-radius: 26px;
  border: 1px solid rgba(130, 159, 181, 0.14);
}

.scan-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.scan-rail .rail-cell {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(6, 14, 20, 0.76);
  border: 1px solid rgba(102, 167, 255, 0.13);
}

.rail-cell span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.rail-cell strong {
  display: block;
  margin-top: 6px;
  font-family: var(--display);
  font-size: 1.08rem;
}

.right-rail {
  padding: 22px;
  border-radius: 28px;
  display: grid;
  gap: 18px;
}

.status-board {
  display: grid;
  gap: 12px;
}

.status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.status-head h2,
.panel-header h2,
.panel-header h3,
.card h3,
.card h4,
.modal-card h2 {
  margin: 0;
  font-family: var(--display);
  letter-spacing: -0.02em;
}

.status-head p,
.panel-header p,
.card p {
  margin: 3px 0 0;
}

.status-pill {
  padding: 8px 10px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.72rem;
  border: 1px solid rgba(130, 159, 181, 0.16);
}

.status-pill.live {
  color: #cafff0;
  border-color: rgba(110, 242, 195, 0.28);
  background: rgba(22, 62, 52, 0.28);
}

.status-pill.delay {
  color: #ffe7a7;
  border-color: rgba(255, 200, 95, 0.26);
  background: rgba(81, 53, 11, 0.32);
}

.status-pill.offline,
.status-pill.error {
  color: #ffd3d8;
  border-color: rgba(255, 111, 124, 0.28);
  background: rgba(70, 20, 25, 0.4);
}

.signal-list,
.mini-grid,
.stats-grid,
.card-grid,
.alert-grid,
.watch-grid,
.settings-grid {
  display: grid;
  gap: 14px;
}

.mini-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stats-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.signal-item,
.stat-card,
.card,
.timeline-item,
.watch-card,
.rule-card,
.setting-card {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(10, 18, 25, 0.82);
  border: 1px solid rgba(130, 159, 181, 0.12);
}

.signal-item strong,
.stat-card strong,
.timeline-item strong,
.watch-card strong,
.rule-card strong {
  display: block;
  font-family: var(--display);
}

.signal-item .metric,
.stat-card .metric {
  margin-top: 6px;
  font-size: clamp(1.1rem, 1.8vw, 1.6rem);
}

.metric-up,
.metric-positive {
  color: var(--up);
}

.metric-down,
.metric-negative {
  color: var(--down);
}

.market-layout,
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(330px, 0.92fr);
  gap: 18px;
  margin-top: 18px;
}

.panel {
  border-radius: 26px;
  padding: 22px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-header h2 {
  font-size: 1.5rem;
}

.panel-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.table-card,
.chart-card,
.detail-summary,
.detail-header {
  border-radius: 24px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 880px;
}

th,
td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(130, 159, 181, 0.12);
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(8, 16, 23, 0.98);
  font-family: var(--mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

tbody tr:hover {
  background: rgba(102, 167, 255, 0.06);
}

.sortable {
  cursor: pointer;
}

.collection-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.collection-art {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  object-fit: cover;
  background: rgba(15, 28, 39, 0.92);
  border: 1px solid rgba(130, 159, 181, 0.14);
}

.collection-name {
  font-weight: 600;
}

.collection-meta,
.mono,
.event-meta,
.stat-label,
.status-text,
.tiny {
  font-family: var(--mono);
  font-size: 0.78rem;
}

.collection-meta,
.event-meta,
.stat-label,
.tiny {
  color: var(--muted);
}

.metric-flash-up,
.metric-flash-down {
  position: relative;
}

.metric-flash-up::after,
.metric-flash-down::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 12px;
  pointer-events: none;
  animation: pulseFade 1.6s ease-out;
}

.metric-flash-up::after {
  box-shadow: 0 0 0 1px rgba(98, 228, 163, 0.45);
}

.metric-flash-down::after {
  box-shadow: 0 0 0 1px rgba(255, 111, 124, 0.45);
}

@keyframes pulseFade {
  0% {
    opacity: 0.95;
    transform: scale(0.98);
  }
  100% {
    opacity: 0;
    transform: scale(1.02);
  }
}

.rank-list,
.alert-list,
.result-list,
.activity-stream,
.detail-list-grid {
  display: grid;
  gap: 12px;
}

.rank-item,
.alert-item,
.result-item,
.timeline-item,
.list-card,
.link-card {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(130, 159, 181, 0.13);
  background: rgba(11, 18, 25, 0.82);
}

.rank-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
}

.rank-ordinal {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.78rem;
  background: rgba(102, 167, 255, 0.16);
  color: #d6e6ff;
}

.rank-copy h4,
.alert-item h4,
.timeline-item h4,
.list-card h4,
.watch-card h4,
.rule-card h4,
.setting-card h4 {
  margin: 0 0 4px;
  font-family: var(--display);
}

.alert-item,
.timeline-item,
.watch-card,
.rule-card,
.setting-card {
  display: grid;
  gap: 12px;
}

.alert-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.severity {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.72rem;
}

.severity::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
}

.severity.normal {
  color: #cff6e7;
  background: rgba(18, 52, 44, 0.32);
}

.severity.normal::before {
  background: var(--accent);
}

.severity.important {
  color: #ffe3ba;
  background: rgba(76, 47, 7, 0.4);
}

.severity.important::before {
  background: var(--accent-3);
}

.severity.urgent {
  color: #ffd8cb;
  background: rgba(79, 28, 18, 0.46);
}

.severity.urgent::before {
  background: var(--urgent);
}

.timeline-item {
  position: relative;
  padding-left: 22px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 20px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent-2);
  box-shadow: 0 0 12px rgba(102, 167, 255, 0.65);
}

.timeline-item::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 28px;
  bottom: -14px;
  width: 1px;
  background: linear-gradient(180deg, rgba(102, 167, 255, 0.2), transparent);
}

.timeline-item:last-child::after {
  display: none;
}

.section-stack {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.detail-header {
  overflow: hidden;
  padding: 0;
}

.detail-cover {
  position: relative;
  aspect-ratio: 2.65;
  overflow: hidden;
  background: rgba(11, 18, 26, 0.88);
}

.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 13, 20, 0.06), rgba(6, 13, 20, 0.88));
}

.detail-meta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  padding: 22px;
  align-items: start;
}

.detail-logo {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  border: 1px solid rgba(130, 159, 181, 0.16);
  object-fit: cover;
}

.detail-heading h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.9rem, 3vw, 2.8rem);
}

.link-row,
.tag-row,
.filter-row,
.rule-actions,
.watch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(18, 28, 40, 0.76);
  border: 1px solid rgba(130, 159, 181, 0.12);
  font-family: var(--mono);
  font-size: 0.74rem;
}

.chart-card {
  padding: 20px;
  background: linear-gradient(180deg, rgba(13, 21, 32, 0.94), rgba(9, 17, 26, 0.95));
}

.chart-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.tab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tab-chip.is-active {
  background: rgba(102, 167, 255, 0.14);
  border-color: rgba(102, 167, 255, 0.28);
}

.chart-shell {
  display: grid;
  gap: 14px;
}

.chart-svg {
  width: 100%;
  min-height: 240px;
  height: 240px;
  border-radius: 20px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    rgba(7, 14, 21, 0.72);
  background-size: 100% 48px, calc(100% / 6) 100%, auto;
  border: 1px solid rgba(130, 159, 181, 0.1);
}

.chart-legend {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.detail-list-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.list-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 12px;
}

.meta-split {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.risk-strip {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
  margin-top: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 135, 91, 0.22);
  background: rgba(31, 16, 16, 0.76);
}

.risk-strip p {
  margin: 0;
}

.empty-state,
.error-state,
.skeleton-grid {
  display: grid;
  gap: 14px;
}

.empty-state,
.error-state {
  padding: 20px;
  border-radius: 20px;
  border: 1px dashed rgba(130, 159, 181, 0.22);
  background: rgba(10, 17, 24, 0.66);
}

.skeleton-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.skeleton-card {
  height: 124px;
  border-radius: 20px;
  border: 1px solid rgba(130, 159, 181, 0.1);
  background:
    linear-gradient(
      90deg,
      rgba(17, 28, 38, 0.9) 0%,
      rgba(40, 62, 78, 0.52) 45%,
      rgba(17, 28, 38, 0.9) 100%
    );
  background-size: 220% 100%;
  animation: loadingShift 1.2s linear infinite;
}

@keyframes loadingShift {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 8, 12, 0.72);
  backdrop-filter: blur(10px);
}

.modal-card {
  width: min(760px, calc(100vw - 24px));
  max-height: min(90vh, 920px);
  overflow-y: auto;
  padding: 24px;
  border-radius: 28px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-family: var(--mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid rgba(130, 159, 181, 0.16);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(10, 17, 24, 0.92);
  color: var(--text);
  outline: none;
}

.field textarea {
  min-height: 96px;
  max-height: 220px;
  resize: vertical;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(130, 159, 181, 0.12);
  color: var(--muted);
  font-size: 0.84rem;
}

.hidden {
  display: none !important;
}

@media (max-width: 1180px) {
  .hero-grid,
  .market-layout,
  .detail-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .shell {
    width: min(100vw - 16px, var(--container));
    padding-top: 10px;
  }

  .masthead {
    position: static;
    grid-template-columns: 1fr;
  }

  .masthead-tools,
  .search-form {
    min-width: 0;
  }

  .hero-panel,
  .right-rail,
  .panel,
  .modal-card {
    padding: 18px;
  }

  .scan-rail,
  .mini-grid,
  .stats-grid,
  .detail-list-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .detail-meta {
    grid-template-columns: 1fr;
  }

  .detail-logo {
    width: 72px;
    height: 72px;
  }

  table {
    min-width: 760px;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 2rem;
  }

  .brand-title,
  .brand-subtitle {
    white-space: normal;
  }

  .masthead-tools {
    flex-wrap: wrap;
  }

  .search-form {
    width: 100%;
  }

  .masthead-tools > .ghost-button {
    width: 100%;
  }

  .nav-row {
    flex-wrap: wrap;
    overflow: visible;
    padding-top: 10px;
    padding-bottom: 4px;
  }

  .nav-pill {
    flex: 1 1 calc(50% - 10px);
    text-align: center;
  }

  .hero-panel {
    border-radius: 24px;
  }

  .panel,
  .right-rail,
  .table-card,
  .modal-card {
    border-radius: 22px;
  }

  .footer-bar,
  .alert-bar,
  .chart-toolbar,
  .status-head,
  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }
}
