:root {
  color-scheme: light;
  --bg: #f5f7f4;
  --ink: #17201b;
  --muted: #647169;
  --line: #d9e0d7;
  --panel: #ffffff;
  --accent: #0c7c59;
  --accent-dark: #07553d;
  --gold: #c8922b;
  --deep: #101b16;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

.shell {
  width: min(1180px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
}

h2 {
  font-size: 18px;
  margin-bottom: 16px;
}

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

button {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  height: 40px;
  padding: 0 16px;
  font-weight: 750;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.button-link {
  align-items: center;
  background: var(--accent);
  border-radius: 8px;
  color: white;
  display: inline-flex;
  font-weight: 750;
  height: 40px;
  justify-content: center;
  padding: 0 16px;
  text-decoration: none;
}

.button-link.secondary {
  background: #23372f;
}

.button-link.compact {
  height: 36px;
  padding: 0 14px;
}

.button-link.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}

button.secondary {
  background: #23372f;
}

button.wide {
  width: 100%;
  margin-top: 16px;
}

button:hover {
  background: var(--accent-dark);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.market {
  grid-column: span 2;
}

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

.metric-row div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfa;
}

.metric-row span,
label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric-row strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
}

.muted {
  color: var(--muted);
  line-height: 1.55;
}

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

input {
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  height: 38px;
  padding: 0 10px;
  font: inherit;
}

select,
textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

select {
  background: white;
  height: 38px;
  padding: 0 10px;
}

textarea {
  min-height: 96px;
  padding: 12px;
  resize: vertical;
  width: 100%;
}

.hidden {
  display: none !important;
}

.code {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101815;
  color: #d9fff0;
  padding: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  overflow-x: auto;
}

.history {
  margin-top: 16px;
}

.landing-body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(245, 247, 244, 0.78)),
    radial-gradient(circle at 76% 18%, rgba(213, 160, 55, 0.14), transparent 28%),
    #f8faf7;
}

.landing-shell {
  width: min(1180px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 22px 0 56px;
}

.landing-nav {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 58px;
  padding-bottom: 14px;
}

.brand {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  gap: 10px;
  font-size: 18px;
  font-weight: 850;
  text-decoration: none;
}

.brand-mark {
  align-items: center;
  background: var(--deep);
  border-radius: 8px;
  color: #f6d27d;
  display: inline-flex;
  font-size: 14px;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.landing-nav-actions {
  align-items: center;
  display: flex;
  gap: 20px;
}

.landing-nav-actions > a:not(.button-link) {
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
}

.landing-hero {
  align-items: center;
  display: grid;
  gap: 44px;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  min-height: 500px;
  padding: 58px 0 44px;
}

.hero-copy h1 {
  font-size: clamp(52px, 7.2vw, 92px);
  line-height: 0.92;
  margin: 0 0 20px;
}

.hero-text {
  color: #46544c;
  font-size: 17px;
  line-height: 1.78;
  max-width: 660px;
}

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

.hero-stats {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 34px;
  max-width: 610px;
  padding-top: 18px;
}

.hero-stats span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 750;
}

.hero-stats strong {
  display: block;
  font-size: 22px;
  margin-top: 6px;
}

.hero-panel {
  background: var(--deep);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(14, 30, 22, 0.18);
  color: white;
  overflow: hidden;
  padding: 28px;
}

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

.panel-head h2 {
  color: white;
  font-size: 26px;
  margin: 6px 0 0;
}

.panel-kicker {
  color: #9fb9ad;
  font-size: 13px;
  font-weight: 800;
}

.live-pill {
  background: rgba(12, 124, 89, 0.22);
  border: 1px solid rgba(84, 211, 159, 0.28);
  border-radius: 999px;
  color: #9df0cd;
  font-size: 12px;
  font-weight: 850;
  padding: 7px 10px;
  white-space: nowrap;
}

.price-block {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 18px;
}

.price-block span,
.price-block small {
  color: #abc4b8;
  display: block;
  font-size: 13px;
  font-weight: 750;
}

.price-block strong {
  display: block;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1;
  margin: 10px 0 8px;
}

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

.status-line {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 17px 0;
}

.status-line:nth-child(odd) {
  padding-right: 16px;
}

.status-line:nth-child(even) {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  padding-left: 16px;
}

.status-line:nth-last-child(-n + 2) {
  border-bottom: 0;
  padding-bottom: 2px;
}

.status-line span {
  color: #abc4b8;
  display: block;
  font-size: 13px;
  font-weight: 750;
}

.status-line strong {
  display: block;
  font-size: 22px;
  margin-top: 8px;
}

.landing-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.landing-grid article {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}

.landing-grid h2 {
  font-size: 22px;
}

.landing-grid p {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0;
}

.landing-workflow {
  align-items: start;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 28px;
  grid-template-columns: 0.75fr 1.25fr;
  margin-top: 34px;
  padding-top: 34px;
}

.landing-workflow h2 {
  font-size: 30px;
  line-height: 1.18;
  max-width: 380px;
}

.workflow-list {
  display: grid;
  gap: 12px;
}

.workflow-list div {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 16px;
  grid-template-columns: 42px 1fr;
  padding: 16px 18px;
}

.workflow-list strong {
  color: var(--gold);
  font-size: 15px;
}

.workflow-list span {
  color: #38473f;
  line-height: 1.55;
}

.dashboard-body {
  background: #eef2ed;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: var(--deep);
  color: white;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 26px 20px;
}

.sidebar .brand {
  color: white;
}

.sidebar .brand-mark {
  background: #f6d27d;
  color: var(--deep);
}

.side-nav {
  display: grid;
  gap: 6px;
}

.side-nav a {
  border-radius: 8px;
  color: #b9c9c1;
  font-size: 14px;
  font-weight: 760;
  padding: 11px 12px;
  text-decoration: none;
}

.side-nav a:hover {
  background: rgba(255, 255, 255, 0.07);
  color: white;
}

.side-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-top: auto;
  padding: 16px;
}

.side-card span,
.side-card small {
  color: #abc4b8;
  display: block;
  font-size: 12px;
  font-weight: 760;
}

.side-card strong {
  display: block;
  font-size: 24px;
  margin: 8px 0 6px;
}

.dashboard-main {
  min-width: 0;
  padding: 28px;
}

.dashboard-topbar {
  align-items: start;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 20px;
}

.dashboard-topbar h1 {
  font-size: clamp(28px, 3.2vw, 42px);
}

.page-subtitle {
  color: var(--muted);
  line-height: 1.6;
  margin: 12px 0 0;
}

.status-strip {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
}

.status-strip div {
  border-right: 1px solid var(--line);
  min-width: 0;
  padding: 18px;
}

.status-strip div:last-child {
  border-right: 0;
}

.status-strip span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 780;
}

.status-strip strong {
  display: block;
  font-size: clamp(18px, 2vw, 26px);
  margin-top: 8px;
  overflow-wrap: anywhere;
}

.source-note {
  margin: 10px 0 18px;
}

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

.config-panel,
.integration-panel,
.rule-panel {
  min-height: 260px;
}

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

.panel-title h2 {
  font-size: 22px;
  margin-bottom: 0;
}

.mini-pill {
  background: #e9f0eb;
  border-radius: 999px;
  color: #315243;
  font-size: 12px;
  font-weight: 830;
  padding: 7px 10px;
  white-space: nowrap;
}

.mini-pill.gold {
  background: #fbefd8;
  color: #8a641d;
}

.rule-list {
  display: grid;
  gap: 12px;
}

.rule-list div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.rule-list strong,
.rule-list span {
  display: block;
}

.rule-list strong {
  font-size: 15px;
  margin-bottom: 6px;
}

.rule-list span {
  color: var(--muted);
  line-height: 1.5;
}

.report {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

.report:first-child {
  border-top: 0;
}

.report pre {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 10px 0 0;
  color: #26352d;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.55;
}

.empty-state {
  background: #f7faf6;
  border: 1px dashed var(--line);
  border-radius: 8px;
  margin: 0;
  padding: 18px;
}

.login-body {
  background:
    radial-gradient(circle at 22% 18%, rgba(212, 175, 55, 0.16), transparent 28%),
    radial-gradient(circle at 76% 28%, rgba(18, 48, 61, 0.58), transparent 36%),
    linear-gradient(135deg, #050706 0%, #07110d 46%, #08141a 100%);
  color: white;
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}

.login-body::after {
  background:
    radial-gradient(circle at center, transparent 0 38%, rgba(0, 0, 0, 0.36) 76%, rgba(0, 0, 0, 0.7) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.22), transparent 28%, transparent 70%, rgba(0, 0, 0, 0.42));
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: 0;
}

.gold-world {
  inset: 0;
  overflow: hidden;
  position: fixed;
  z-index: 0;
}

.gold-world::before {
  animation: goldSweep 16s ease-in-out infinite alternate, worldRotate 34s linear infinite;
  background:
    radial-gradient(circle at 28% 32%, rgba(240, 200, 106, 0.24), transparent 25%),
    radial-gradient(circle at 68% 44%, rgba(30, 90, 71, 0.2), transparent 32%),
    linear-gradient(116deg, transparent 0 24%, rgba(240, 200, 106, 0.18) 36%, transparent 49% 100%),
    radial-gradient(ellipse at center, rgba(198, 137, 35, 0.2), transparent 62%);
  content: "";
  inset: -24%;
  position: absolute;
  transform: perspective(900px) rotateX(58deg) scale(1.26);
  transform-origin: 50% 55%;
}

.gold-world::after {
  animation: dataDrift 11s linear infinite, shimmerPulse 6s ease-in-out infinite alternate;
  background-image:
    linear-gradient(180deg, rgba(255, 232, 149, 0), rgba(255, 232, 149, 0.2), rgba(255, 232, 149, 0)),
    linear-gradient(180deg, rgba(68, 255, 196, 0), rgba(68, 255, 196, 0.12), rgba(68, 255, 196, 0));
  background-position: 18% 0, 74% 0;
  background-repeat: repeat-y;
  background-size: 2px 190px, 1px 140px;
  content: "";
  inset: 0;
  opacity: 0.72;
  position: absolute;
}

.market-particles,
.grid-layer,
.world-map-layer,
.chart-line-layer {
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.market-particles {
  opacity: 0.72;
  z-index: 3;
}

.grid-layer {
  animation: gridFloat 22s linear infinite;
  background-image:
    linear-gradient(rgba(240, 200, 106, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(86, 220, 174, 0.038) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle at center, black 0 58%, transparent 84%);
  opacity: 0.9;
  transform: perspective(900px) rotateX(58deg) translateY(10vh) scale(1.35);
  transform-origin: 50% 62%;
  z-index: 1;
}

.grid-layer::after {
  animation: scanLine 8s ease-in-out infinite;
  background: linear-gradient(90deg, transparent, rgba(240, 200, 106, 0.18), transparent);
  content: "";
  height: 100%;
  left: -35%;
  position: absolute;
  top: 0;
  transform: skewX(-16deg);
  width: 28%;
}

.world-map-layer {
  height: 100%;
  opacity: 0.24;
  right: -8%;
  top: 2%;
  width: 100%;
  z-index: 2;
}

.world-map-layer .latitudes * {
  fill: none;
  stroke: rgba(147, 190, 174, 0.28);
  stroke-width: 1.2;
}

.world-map-layer .market-nodes circle {
  animation: nodePulse 4.8s ease-in-out infinite alternate;
  fill: rgba(240, 200, 106, 0.78);
  filter: drop-shadow(0 0 8px rgba(240, 200, 106, 0.42));
}

.world-map-layer .market-nodes path {
  fill: none;
  stroke: rgba(240, 200, 106, 0.22);
  stroke-dasharray: 12 14;
  stroke-width: 1.4;
}

.chart-line-layer {
  opacity: 0.58;
  z-index: 4;
}

.gold-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
}

.gold-line.main {
  animation: lineTravel 10s ease-in-out infinite;
  filter: drop-shadow(0 0 14px rgba(240, 200, 106, 0.32));
  stroke: rgba(240, 200, 106, 0.74);
  stroke-width: 3;
}

.gold-line.secondary {
  animation: lineTravel 13s ease-in-out infinite 1.4s;
  stroke: rgba(105, 232, 181, 0.32);
  stroke-width: 2;
}

.gold-line.tertiary {
  animation: lineTravel 15s ease-in-out infinite 2.2s;
  stroke: rgba(240, 200, 106, 0.2);
  stroke-width: 1.4;
}

.gold-world span {
  animation: tickerFlow 14s linear infinite;
  color: rgba(255, 220, 120, 0.22);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  left: calc(14% * var(--i, 1));
  position: absolute;
  top: -30%;
  writing-mode: vertical-rl;
}

.gold-world span:nth-child(1) { --i: 1; animation-delay: -1s; }
.gold-world span:nth-child(2) { --i: 2; animation-delay: -4s; }
.gold-world span:nth-child(3) { --i: 3; animation-delay: -7s; }
.gold-world span:nth-child(4) { --i: 4; animation-delay: -2s; }
.gold-world span:nth-child(5) { --i: 5; animation-delay: -6s; }
.gold-world span:nth-child(6) { --i: 6; animation-delay: -9s; }

.gold-world span::before {
  content: "XAU USD AU99.99 DXY NEWS FLOW RATE ALERT ";
}

.pocket-watch {
  animation: watchFloat 13s ease-in-out infinite;
  height: 340px;
  left: calc(52% - 170px);
  opacity: 0.62;
  position: absolute;
  top: 16vh;
  transform-style: preserve-3d;
  width: 340px;
  z-index: 2;
}

.watch-face {
  animation: watchSpin 11s ease-in-out infinite alternate;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.74), transparent 10%),
    radial-gradient(circle at center, #ffe39b 0 10%, #c98f2b 42%, #6f4314 72%, #1b1209 100%);
  border: 10px solid rgba(255, 226, 138, 0.72);
  border-radius: 50%;
  box-shadow:
    0 0 42px rgba(255, 202, 76, 0.42),
    inset 0 0 26px rgba(0, 0, 0, 0.38);
  height: 230px;
  left: 55px;
  position: absolute;
  top: 78px;
  width: 230px;
}

.watch-face::before {
  border: 1px solid rgba(255, 245, 205, 0.42);
  border-radius: 50%;
  content: "";
  inset: 24px;
  position: absolute;
}

.watch-loop {
  border: 12px solid rgba(255, 214, 106, 0.7);
  border-bottom: 0;
  border-radius: 80px 80px 0 0;
  height: 62px;
  left: 126px;
  position: absolute;
  top: 28px;
  width: 88px;
}

.watch-chain {
  animation: chainWave 5s ease-in-out infinite alternate;
  border-top: 2px dashed rgba(255, 221, 132, 0.42);
  height: 180px;
  left: -18px;
  position: absolute;
  top: 48px;
  transform: rotate(-18deg);
  width: 190px;
}

.watch-hand {
  background: #1b1209;
  border-radius: 999px;
  left: 50%;
  position: absolute;
  top: 50%;
  transform-origin: 50% 100%;
}

.hour-hand {
  animation: handDrift 18s linear infinite;
  height: 62px;
  width: 6px;
}

.minute-hand {
  animation: handDrift 9s linear infinite;
  height: 86px;
  width: 4px;
}

.watch-core {
  background: #1b1209;
  border: 4px solid #ffe39b;
  border-radius: 50%;
  height: 20px;
  left: calc(50% - 10px);
  position: absolute;
  top: calc(50% - 10px);
  width: 20px;
}

.login-shell {
  align-items: center;
  display: grid;
  justify-items: center;
  min-height: 100vh;
  padding: 28px;
  position: relative;
  z-index: 2;
}

.login-brand {
  position: absolute;
  text-align: center;
  top: 6vh;
}

.login-logo {
  font-size: clamp(44px, 8vw, 92px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.95;
  text-shadow: 0 0 34px rgba(255, 206, 86, 0.34);
}

.login-brand p {
  color: rgba(236, 209, 140, 0.88);
  font-weight: 750;
  margin: 16px 0 0;
}

.login-card {
  backdrop-filter: blur(18px) saturate(1.2);
  background:
    linear-gradient(180deg, rgba(14, 24, 20, 0.86), rgba(7, 13, 11, 0.78)),
    radial-gradient(circle at 20% 0, rgba(240, 200, 106, 0.1), transparent 38%);
  border: 1px solid rgba(255, 221, 130, 0.28);
  border-radius: 8px;
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(255, 255, 255, 0.035),
    0 0 52px rgba(212, 175, 55, 0.08);
  margin-top: 130px;
  max-width: 420px;
  padding: 28px;
  position: relative;
  width: min(100%, 420px);
}

.login-card::before {
  background: linear-gradient(90deg, transparent, rgba(240, 200, 106, 0.42), transparent);
  content: "";
  height: 1px;
  left: 12%;
  position: absolute;
  right: 12%;
  top: 0;
}

.login-card h1 {
  color: white;
  font-size: 30px;
}

.login-card label {
  color: #d8e5dd;
  margin-top: 14px;
}

.login-card input {
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(255, 255, 255, 0.18);
  color: white;
}

.login-card input:focus {
  border-color: rgba(240, 200, 106, 0.7);
  box-shadow: 0 0 0 3px rgba(240, 200, 106, 0.12);
  outline: none;
}

.login-copy,
.form-message {
  color: #aebeb6;
  line-height: 1.6;
}

.form-message {
  min-height: 22px;
}

@keyframes goldSweep {
  from { transform: perspective(900px) rotateX(58deg) translateY(0) scale(1.26); }
  to { transform: perspective(900px) rotateX(58deg) translateY(6%) scale(1.34); }
}

@keyframes worldRotate {
  from { filter: hue-rotate(0deg) brightness(1); }
  to { filter: hue-rotate(18deg) brightness(1.1); }
}

@keyframes dataDrift {
  from { transform: translateY(-120px); }
  to { transform: translateY(120px); }
}

@keyframes shimmerPulse {
  from { opacity: 0.74; }
  to { opacity: 1; }
}

@keyframes tickerFlow {
  from { transform: translateY(-10vh); }
  to { transform: translateY(140vh); }
}

@keyframes watchFloat {
  0% { transform: translate3d(-18vw, 4vh, 0) rotate(-10deg) scale(0.82); }
  35% { transform: translate3d(18vw, -2vh, 0) rotate(11deg) scale(0.96); }
  70% { transform: translate3d(10vw, 8vh, 0) rotate(-6deg) scale(0.9); }
  100% { transform: translate3d(-18vw, 4vh, 0) rotate(-10deg) scale(0.82); }
}

@keyframes watchSpin {
  from { transform: rotateY(-18deg) rotateX(8deg); }
  to { transform: rotateY(24deg) rotateX(-8deg); }
}

@keyframes chainWave {
  from { transform: rotate(-22deg) translateY(0); }
  to { transform: rotate(-8deg) translateY(18px); }
}

@keyframes handDrift {
  from { transform: translate(-50%, -100%) rotate(0deg); }
  to { transform: translate(-50%, -100%) rotate(360deg); }
}

@keyframes gridFloat {
  from { background-position: 0 0, 0 0; }
  to { background-position: 54px 54px, 54px 54px; }
}

@keyframes scanLine {
  0%, 100% { opacity: 0; transform: translateX(0) skewX(-16deg); }
  22%, 55% { opacity: 1; }
  78% { opacity: 0; transform: translateX(520%) skewX(-16deg); }
}

@keyframes lineTravel {
  0% { stroke-dashoffset: 1200; opacity: 0; }
  18% { opacity: 1; }
  56% { stroke-dashoffset: 0; opacity: 0.9; }
  100% { stroke-dashoffset: -1200; opacity: 0; }
}

@keyframes nodePulse {
  from { opacity: 0.35; transform: scale(0.86); }
  to { opacity: 0.9; transform: scale(1.18); }
}

.home-body {
  background: #f4f6f3;
}

.home-shell {
  margin: 0 auto;
  max-width: 1240px;
  padding: 22px 20px 60px;
}

.home-nav,
.home-actions {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.home-nav {
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.home-hero {
  align-items: end;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 34px 0 24px;
}

.home-hero h1 {
  font-size: clamp(34px, 5vw, 62px);
  max-width: 760px;
}

.profile-chip {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 820;
  padding: 14px 16px;
}

.home-grid,
.detail-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.module-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  min-height: 190px;
  padding: 22px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.module-card:hover {
  box-shadow: 0 18px 40px rgba(20, 35, 28, 0.1);
  transform: translateY(-2px);
}

.module-card span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  font-weight: 820;
}

.module-card strong {
  display: block;
  font-size: 28px;
  line-height: 1.1;
  margin: 18px 0 12px;
}

.module-card p {
  color: var(--muted);
  line-height: 1.58;
  margin: 0;
}

.module-primary {
  background: var(--deep);
  color: white;
}

.module-primary p,
.module-primary span {
  color: #abc4b8;
}

.detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}

.detail-panel {
  scroll-margin-top: 18px;
}

.wide-detail {
  grid-column: span 2;
}

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

.insight-list,
.forum-list,
.users-list {
  display: grid;
  gap: 12px;
}

.insight-list div,
.forum-post,
.user-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.insight-list strong,
.insight-list span {
  display: block;
}

.insight-list span,
.forum-post small,
.user-row span {
  color: var(--muted);
  line-height: 1.5;
}

.forum-compose {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr auto;
  margin-bottom: 14px;
}

.forum-compose button {
  height: auto;
}

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

.profile-button,
.user-pill {
  background: #e9f0eb;
  color: var(--ink);
  height: 34px;
}

.user-directory {
  background: #f8faf7;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 14px;
  padding: 14px;
}

.user-directory > strong {
  display: block;
  margin-bottom: 10px;
}

.user-directory > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.account-panel {
  grid-column: span 2;
}

.account-create {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr 1fr 150px auto;
  margin-bottom: 16px;
}

.account-create input {
  margin-top: 0;
}

.user-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 1fr) 130px minmax(120px, 160px) 86px auto;
}

.user-row span {
  display: block;
  font-size: 13px;
  margin-top: 4px;
}

.crawl-logs {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.crawl-log {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.crawl-log.ok {
  border-color: rgba(12, 124, 89, 0.32);
}

.crawl-log.error {
  border-color: rgba(176, 50, 50, 0.3);
}

.crawl-log span,
.crawl-log small {
  color: var(--muted);
}

.inline-check {
  align-items: center;
  display: flex;
  gap: 6px;
}

.inline-check input {
  height: auto;
  margin: 0;
  width: auto;
}

@media (max-width: 780px) {
  .shell {
    width: min(100vw - 24px, 1180px);
    padding-top: 20px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .actions,
  .grid,
  .metric-row,
  .form-grid,
  .landing-hero,
  .landing-grid,
  .landing-workflow,
  .dashboard-shell,
  .dashboard-grid,
  .status-strip,
  .home-hero,
  .home-grid,
  .detail-grid,
  .compact-strip,
  .account-create,
  .user-row,
  .forum-compose {
    grid-template-columns: 1fr;
  }

  .home-shell {
    padding: 16px 12px 42px;
  }

  .home-nav,
  .home-actions {
    align-items: stretch;
  }

  .home-nav {
    flex-direction: column;
  }

  .home-actions .button-link,
  .home-actions button {
    flex: 1;
  }

  .home-hero {
    align-items: start;
  }

  .module-card {
    min-height: 150px;
  }

  .wide-detail,
  .account-panel {
    grid-column: span 1;
  }

  .forum-compose button {
    height: 40px;
  }

  .login-shell {
    padding: 18px;
  }

  .login-brand {
    top: 4vh;
  }

  .login-card {
    margin-top: 128px;
    padding: 22px;
  }

  .login-logo {
    font-size: 42px;
  }

  .login-brand p {
    font-size: 14px;
    margin-top: 10px;
  }

  .pocket-watch {
    height: 240px;
    left: calc(54% - 120px);
    top: 20vh;
    transform: scale(0.72);
    width: 240px;
  }

  .world-map-layer {
    opacity: 0.16;
  }

  .chart-line-layer {
    opacity: 0.34;
  }

  .dashboard-main {
    padding: 18px 12px 28px;
  }

  .dashboard-topbar {
    flex-direction: column;
  }

  .dashboard-topbar .actions,
  .dashboard-topbar .actions button,
  .dashboard-topbar .actions .button-link {
    width: 100%;
  }

  .sidebar {
    gap: 16px;
    padding: 18px 12px;
  }

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

  .side-card {
    margin-top: 0;
  }

  .status-strip div,
  .status-strip div:last-child {
    border-bottom: 1px solid var(--line);
    border-right: 0;
  }

  .status-strip div:last-child {
    border-bottom: 0;
  }

  .landing-shell {
    width: min(100vw - 24px, 1180px);
    padding-top: 14px;
  }

  .landing-nav {
    align-items: stretch;
    gap: 12px;
  }

  .landing-nav-actions {
    gap: 10px;
    justify-content: space-between;
  }

  .landing-nav-actions > a:not(.button-link) {
    display: none;
  }

  .landing-hero {
    gap: 28px;
    min-height: 0;
    padding: 40px 0 30px;
  }

  .hero-copy h1 {
    font-size: 48px;
  }

  .hero-text {
    font-size: 16px;
  }

  .hero-stats,
  .status-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    gap: 16px;
  }

  .status-line,
  .status-line:nth-child(even),
  .status-line:nth-child(odd) {
    border-left: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 0;
    padding-right: 0;
  }

  .status-line:last-child {
    border-bottom: 0;
  }

  .grid {
    display: grid;
  }

  .market {
    grid-column: span 1;
  }

  .actions button {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gold-world::before,
  .gold-world::after,
  .grid-layer,
  .grid-layer::after,
  .gold-world span,
  .pocket-watch,
  .watch-face,
  .watch-chain,
  .watch-hand,
  .gold-line,
  .world-map-layer .market-nodes circle {
    animation: none !important;
  }

  .market-particles,
  .chart-line-layer {
    display: none;
  }

  .grid-layer {
    opacity: 0.36;
  }
}

/* Member terminal experience */
.terminal-body {
  --terminal-bg: #07110d;
  --terminal-panel: rgba(13, 28, 22, 0.92);
  --terminal-panel-2: rgba(18, 39, 31, 0.86);
  --terminal-line: rgba(208, 171, 88, 0.16);
  --terminal-text: #edf6ef;
  --terminal-muted: #94a79b;
  --terminal-gold: #d9aa43;
  --terminal-green: #22c55e;
  --terminal-red: #f15b5b;
  --terminal-blue: #67a6ff;
  background:
    radial-gradient(circle at 18% 12%, rgba(217, 170, 67, 0.14), transparent 34%),
    radial-gradient(circle at 86% 4%, rgba(34, 197, 94, 0.11), transparent 28%),
    linear-gradient(135deg, #050908 0%, #07110d 42%, #0d1712 100%);
  color: var(--terminal-text);
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
  overflow-x: hidden;
}

.terminal-body::before {
  animation: terminalFlow 18s linear infinite;
  background-image:
    linear-gradient(rgba(217, 170, 67, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(217, 170, 67, 0.04) 1px, transparent 1px);
  background-size: 34px 34px;
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: 0;
}

@keyframes terminalFlow {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(34px, 34px, 0); }
}

.member-sidebar,
.terminal-main {
  position: relative;
  z-index: 1;
}

.member-sidebar {
  background: rgba(4, 12, 9, 0.88);
  border-right: 1px solid var(--terminal-line);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 22px 18px;
}

.terminal-logo {
  border: 1px solid var(--terminal-line);
  border-radius: 8px;
  color: var(--terminal-text);
  display: grid;
  gap: 4px;
  padding: 16px;
  text-decoration: none;
}

.terminal-logo span {
  align-items: center;
  background: linear-gradient(135deg, #f4ce73, #9f6c12);
  border-radius: 6px;
  color: #10130f;
  display: inline-flex;
  font-weight: 900;
  height: 38px;
  justify-content: center;
  width: 48px;
}

.terminal-logo strong {
  font-size: 18px;
  letter-spacing: 0;
}

.terminal-logo small,
.sidebar-user span,
.terminal-card small,
.metric-card small,
.detail-meta dt {
  color: var(--terminal-muted);
}

.terminal-nav {
  display: grid;
  gap: 8px;
  margin: 22px 0;
}

.terminal-nav button,
.user-dropdown button,
.chart-toolbar button,
.filter-bar button,
.editor-toolbar button,
.market-tabs button {
  background: transparent;
  border: 1px solid transparent;
  color: var(--terminal-muted);
  justify-content: flex-start;
}

.terminal-nav button {
  height: 42px;
  text-align: left;
  width: 100%;
}

.terminal-nav button:hover,
.terminal-nav button.active,
.user-dropdown button:hover,
.chart-toolbar button.active,
.market-tabs button.active,
.filter-bar button:hover,
.editor-toolbar button:hover {
  background: rgba(217, 170, 67, 0.11);
  border-color: var(--terminal-line);
  color: var(--terminal-text);
}

.sidebar-user {
  align-items: center;
  border-top: 1px solid var(--terminal-line);
  display: grid;
  gap: 10px;
  grid-template-columns: 42px minmax(0, 1fr);
  margin-top: auto;
  padding-top: 16px;
}

.avatar {
  align-items: center;
  background: linear-gradient(135deg, #f5d070, #9a6711);
  border-radius: 50%;
  color: #10130f;
  display: inline-flex;
  font-weight: 900;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.avatar.small {
  height: 28px;
  width: 28px;
}

.sidebar-user strong,
.sidebar-user span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user button {
  grid-column: 1 / -1;
  width: 100%;
}

.terminal-main {
  min-width: 0;
}

.terminal-header {
  align-items: center;
  backdrop-filter: blur(18px);
  background: rgba(7, 17, 13, 0.72);
  border-bottom: 1px solid var(--terminal-line);
  display: grid;
  gap: 14px;
  grid-template-columns: auto minmax(180px, 1fr) auto auto;
  min-height: 74px;
  padding: 14px 28px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.menu-toggle {
  display: none;
}

.global-search input,
.filter-bar input,
.filter-bar select,
.forum-toolbar input,
.form-grid input,
.form-grid select,
textarea {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--terminal-line);
  border-radius: 8px;
  color: var(--terminal-text);
  min-height: 42px;
  outline: none;
  padding: 0 12px;
  width: 100%;
}

.global-search input:focus,
.filter-bar input:focus,
.forum-toolbar input:focus,
.form-grid input:focus,
textarea:focus {
  border-color: rgba(217, 170, 67, 0.58);
  box-shadow: 0 0 0 3px rgba(217, 170, 67, 0.12);
}

.notification-button,
.user-menu-button {
  align-items: center;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--terminal-line);
  color: var(--terminal-text);
  display: inline-flex;
  gap: 8px;
}

#notifyDot {
  background: var(--terminal-red);
  border-radius: 999px;
  display: none;
  height: 8px;
  width: 8px;
}

#notifyDot.visible {
  display: inline-block;
}

.user-menu-wrap {
  position: relative;
}

.user-dropdown {
  background: #0b1712;
  border: 1px solid var(--terminal-line);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
  display: grid;
  gap: 4px;
  min-width: 190px;
  padding: 8px;
  position: absolute;
  right: 0;
  top: 52px;
}

.content-shell {
  padding: 28px;
}

.page-head {
  align-items: end;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 20px;
}

.page-head h1 {
  color: var(--terminal-text);
  font-size: clamp(28px, 3.2vw, 48px);
}

.page-head p:not(.eyebrow) {
  color: var(--terminal-muted);
  line-height: 1.7;
  margin: 10px 0 0;
  max-width: 780px;
}

.terminal-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.terminal-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.terminal-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.terminal-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.terminal-grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.terminal-grid.compact { margin-bottom: 0; }

.terminal-card,
.terminal-panel,
.metric-card,
.news-card,
.post-card,
.state-card {
  background: linear-gradient(180deg, var(--terminal-panel), rgba(8, 18, 14, 0.92));
  border: 1px solid var(--terminal-line);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 20px 70px rgba(0, 0, 0, 0.18);
}

.terminal-card,
.metric-card {
  display: grid;
  gap: 10px;
  min-height: 164px;
  padding: 18px;
}

.terminal-card.clickable,
.news-card,
.post-card {
  cursor: pointer;
}

.terminal-card span,
.metric-card span {
  color: var(--terminal-muted);
  font-size: 13px;
  font-weight: 800;
}

.terminal-card strong,
.metric-card strong {
  color: var(--terminal-text);
  font-size: 28px;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.terminal-card p,
.terminal-panel p,
.news-card p,
.post-card p,
.detail-article p {
  color: #bfd0c6;
  line-height: 1.75;
}

.terminal-panel {
  padding: 20px;
}

.terminal-panel.wide {
  min-height: 320px;
}

.panel-title {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.panel-title h2,
.terminal-panel h2 {
  color: var(--terminal-text);
  margin-bottom: 0;
}

.mini-chart {
  height: 42px;
  width: 100%;
}

.mini-chart polyline {
  fill: none;
  stroke: var(--terminal-gold);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.chart-shell {
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 14px;
}

.market-connection {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--terminal-line);
  border-radius: 8px;
  color: var(--terminal-muted);
  font-weight: 800;
  margin-bottom: 16px;
  padding: 12px 14px;
}

.market-connection.connected {
  color: #8ee7ae;
}

.market-connection.reconnecting,
.market-connection.error,
.market-connection.disconnected {
  color: #ffd58a;
}

.terminal-card.unavailable strong {
  color: #ffd58a;
  font-size: 22px;
}

.quote-meta {
  display: grid;
  gap: 4px;
}

.quote-number {
  transition: color 360ms ease, text-shadow 360ms ease;
}

.line-chart-wrap {
  display: grid;
  gap: 10px;
}

.line-chart {
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 100% 70px, 72px 100%;
  border-radius: 8px;
  height: 280px;
  width: 100%;
}

.line-chart-grid {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
}

.line-chart-path {
  fill: none;
  filter: drop-shadow(0 0 10px rgba(217, 170, 67, 0.24));
  stroke: var(--terminal-gold);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.chart-tooltip,
.chart-axis,
.chart-state,
.source-note {
  color: var(--terminal-muted);
}

.chart-axis {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  line-height: 1.5;
}

.chart-state {
  align-items: center;
  border: 1px dashed rgba(217, 170, 67, 0.28);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  min-height: 280px;
  padding: 24px;
  text-align: center;
}

.chart-state strong {
  color: var(--terminal-text);
  font-size: 22px;
}

.analysis-block {
  border-color: rgba(217, 170, 67, 0.34);
}

.chart-toolbar,
.indicator-row,
.market-tabs,
.factor-grid,
.filter-bar,
.forum-toolbar,
.editor-toolbar,
.form-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kline {
  align-items: end;
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 100% 24px, 42px 100%;
  border-radius: 8px;
  display: flex;
  gap: 10px;
  height: 210px;
  overflow: hidden;
  padding: 18px;
}

.kline span {
  border-radius: 4px 4px 0 0;
  display: block;
  flex: 1;
  min-width: 8px;
}

.rise,
.kline .rise {
  color: var(--terminal-red);
}

.fall,
.kline .fall {
  color: var(--terminal-green);
}

.kline .rise {
  background: linear-gradient(#ff8b8b, #cf3434);
}

.kline .fall {
  background: linear-gradient(#6ee7a5, #15803d);
}

.flat,
.warning {
  color: var(--terminal-gold);
}

.gw-badge {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: #d9e8df;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  margin: 0 6px 6px 0;
  padding: 7px 9px;
}

.gw-badge.gold,
.gw-badge.yellow {
  background: rgba(217, 170, 67, 0.16);
  border-color: rgba(217, 170, 67, 0.32);
  color: #f6d783;
}

.gw-badge.red,
.gw-badge.orange {
  background: rgba(241, 91, 91, 0.13);
  border-color: rgba(241, 91, 91, 0.28);
  color: #ff9b9b;
}

.gw-badge.green {
  background: rgba(34, 197, 94, 0.13);
  border-color: rgba(34, 197, 94, 0.28);
  color: #88e7ad;
}

.gw-badge.blue {
  background: rgba(103, 166, 255, 0.13);
  border-color: rgba(103, 166, 255, 0.3);
  color: #a9ccff;
}

.metric-card {
  min-height: 118px;
}

.metric-card strong {
  font-size: 22px;
}

.level-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.clean-list {
  color: #c4d4cb;
  display: grid;
  gap: 10px;
  line-height: 1.65;
  margin: 0;
  padding-left: 18px;
}

.news-list {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.news-card,
.post-card {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.news-card h3,
.post-card h3 {
  color: var(--terminal-text);
  font-size: 20px;
  margin: 0;
}

.news-card footer {
  align-items: center;
  color: var(--terminal-muted);
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline div,
.notice-row {
  align-items: center;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 100px minmax(0, 1fr) auto auto auto;
  padding: 12px;
}

.detail-article h2 {
  color: var(--terminal-text);
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.18;
  margin: 14px 0;
}

.detail-meta {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 18px 0;
}

.detail-meta div {
  background: rgba(255, 255, 255, 0.045);
  border-radius: 8px;
  padding: 12px;
}

.detail-meta dd {
  color: var(--terminal-text);
  margin: 6px 0 0;
}

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

.form-grid label {
  color: var(--terminal-muted);
  display: grid;
  gap: 8px;
  font-weight: 800;
}

textarea {
  min-height: 180px;
  padding: 12px;
  resize: vertical;
}

.profile-layout {
  align-items: start;
  display: grid;
  gap: 20px;
  grid-template-columns: 120px minmax(0, 1fr);
}

.profile-avatar-large {
  align-items: center;
  background: linear-gradient(135deg, #f5d070, #9a6711);
  border-radius: 8px;
  color: #10130f;
  display: flex;
  font-size: 48px;
  font-weight: 950;
  height: 120px;
  justify-content: center;
  width: 120px;
}

.notice-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
  margin-bottom: 10px;
}

.notice-row.unread {
  border-color: rgba(241, 91, 91, 0.38);
}

.skeleton-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.skeleton-grid div {
  animation: pulse 1.6s ease-in-out infinite;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  height: 120px;
}

@keyframes pulse {
  0%, 100% { opacity: 0.42; }
  50% { opacity: 1; }
}

.state-card,
.empty-state,
.risk-disclaimer {
  color: var(--terminal-muted);
}

.state-card {
  padding: 18px;
}

.risk-disclaimer {
  border-top: 1px solid var(--terminal-line);
  font-size: 13px;
  line-height: 1.7;
  margin: 28px 0 0;
  padding-top: 18px;
}

.hidden {
  display: none !important;
}

@media (max-width: 1080px) {
  .terminal-body {
    grid-template-columns: 1fr;
  }

  .member-sidebar {
    bottom: 0;
    box-shadow: 24px 0 80px rgba(0, 0, 0, 0.4);
    left: 0;
    position: fixed;
    top: 0;
    transform: translateX(-102%);
    transition: transform 180ms ease;
    width: 280px;
    z-index: 20;
  }

  .member-sidebar.open {
    transform: translateX(0);
  }

  .menu-toggle {
    display: inline-flex;
  }

  .terminal-grid.four,
  .terminal-grid.five,
  .terminal-grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .terminal-header {
    grid-template-columns: auto 1fr;
    padding: 12px;
  }

  .global-search,
  .user-menu-wrap {
    grid-column: 1 / -1;
  }

  .notification-button {
    justify-self: end;
  }

  .content-shell {
    padding: 16px 12px 30px;
  }

  .page-head,
  .panel-title,
  .news-card footer {
    align-items: stretch;
    flex-direction: column;
  }

  .terminal-grid.two,
  .terminal-grid.three,
  .terminal-grid.four,
  .terminal-grid.five,
  .level-grid,
  .detail-meta,
  .form-grid,
  .profile-layout,
  .skeleton-grid {
    grid-template-columns: 1fr;
  }

  .timeline div {
    grid-template-columns: 1fr;
  }

  .profile-avatar-large {
    height: 92px;
    width: 92px;
  }
}
