@font-face {
  font-family: "MetaTrade Outfit";
  src: url("./assets/fonts/Outfit-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "MetaTrade Outfit";
  src: url("./assets/fonts/Outfit-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "MetaTrade Outfit";
  src: url("./assets/fonts/Outfit-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "MetaTrade Plex Condensed";
  src: url("./assets/fonts/IBM-Plex-Sans-Condensed-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "MetaTrade Plex Condensed";
  src: url("./assets/fonts/IBM-Plex-Sans-Condensed-SemiBold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "MetaTrade JetBrains Mono";
  src: url("./assets/fonts/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f5f4ef;
  --bg-soft: #e8e6de;
  --surface: rgba(255, 255, 252, 0.78);
  --surface-solid: #fffffb;
  --surface-muted: #efede6;
  --ink: #171b18;
  --ink-soft: #454c47;
  --muted: #7a8179;
  --line: rgba(30, 37, 32, 0.1);
  --line-strong: rgba(30, 37, 32, 0.18);
  --accent: #315f4f;
  --accent-strong: #173d33;
  --accent-soft: #e2ece6;
  --accent-faint: rgba(49, 95, 79, 0.1);
  --cream: #fbfaf6;
  --warm: #b88b45;
  --amber: #b7832e;
  --red: #a8534c;
  --mint: #315f4f;
  --cyan: #546f69;
  --shadow: 0 34px 90px rgba(38, 34, 28, 0.13);
  --shadow-soft: 0 18px 46px rgba(38, 34, 28, 0.08);
  --shadow-apple: 0 28px 80px rgba(28, 34, 30, 0.1), 0 1px 0 rgba(255, 255, 255, 0.84) inset;
  --route-panel: rgba(20, 31, 26, 0.7);
  --inner: inset 0 1px 0 rgba(255, 255, 255, 0.82);
  --display: "MetaTrade Outfit", "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --body: "MetaTrade Outfit", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --condensed: "MetaTrade Plex Condensed", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "MetaTrade JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  background:
    radial-gradient(circle at 50% -8%, rgba(255, 255, 255, 0.98) 0 22%, transparent 50%),
    radial-gradient(circle at 50% 34%, rgba(49, 95, 79, 0.09), transparent 34%),
    linear-gradient(180deg, #faf9f5 0%, #f2f0ea 42%, #e8e4dc 100%);
  color: var(--ink);
  font-family: var(--body);
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: rgba(63, 109, 92, 0.18);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(47, 61, 51, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 61, 51, 0.026) 1px, transparent 1px),
    radial-gradient(circle at 25% 15%, rgba(47, 61, 51, 0.06) 0 1px, transparent 1.2px);
  background-size: 36px 36px, 36px 36px, 11px 11px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent 86%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  touch-action: manipulation;
}

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

svg {
  width: 1.05em;
  height: 1.05em;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

button:focus-visible,
textarea:focus-visible,
input:focus-visible,
.drop-zone:focus-within,
.skip-link:focus-visible,
[tabindex="-1"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgba(63, 109, 92, 0.16);
}

.skip-link {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: max(12px, env(safe-area-inset-left));
  z-index: 8;
  transform: translateY(-140%);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface-solid);
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

.process-toast {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 9;
  width: min(420px, calc(100vw - 32px));
  min-height: 82px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(49, 95, 79, 0.18);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 254, 250, 0.88);
  backdrop-filter: blur(26px) saturate(1.1);
  box-shadow: 0 24px 70px rgba(38, 34, 28, 0.16), var(--inner);
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(0.98);
  transition:
    opacity 220ms ease,
    transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.process-toast.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.thinking-spinner {
  width: 34px;
  height: 34px;
  border: 2px solid rgba(49, 95, 79, 0.16);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: thinking-spin 820ms linear infinite;
}

.process-toast:not(.is-thinking) .thinking-spinner {
  border-color: rgba(49, 95, 79, 0.22);
  border-top-color: rgba(49, 95, 79, 0.22);
  animation: none;
}

.process-toast:not(.is-thinking) .thinking-spinner::after {
  content: "";
  display: block;
  width: 10px;
  height: 17px;
  margin: 5px auto;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(42deg);
}

.process-toast strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
}

.process-toast p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.toast-action {
  display: none;
  min-height: 36px;
  border: 1px solid rgba(49, 95, 79, 0.22);
  border-radius: 10px;
  padding: 0 10px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
}

.process-toast.has-action .toast-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.guide-tab {
  position: fixed;
  right: 0;
  top: 42%;
  z-index: 8;
  min-height: 118px;
  width: 42px;
  writing-mode: vertical-rl;
  letter-spacing: 0;
  border: 1px solid rgba(49, 95, 79, 0.22);
  border-right: 0;
  border-radius: 14px 0 0 14px;
  background: rgba(255, 254, 250, 0.88);
  color: var(--accent-strong);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 18px 44px rgba(38, 34, 28, 0.12), var(--inner);
  backdrop-filter: blur(20px) saturate(1.08);
}

.guide-tab:hover {
  transform: translateX(-2px);
}

.guide-drawer {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  justify-items: end;
  background: rgba(23, 27, 24, 0);
  pointer-events: none;
  transition: background-color 220ms ease;
}

.guide-drawer.is-open {
  background: rgba(23, 27, 24, 0.22);
  pointer-events: auto;
}

.guide-panel {
  width: min(460px, calc(100vw - 24px));
  height: 100%;
  overflow: auto;
  border-left: 1px solid rgba(49, 95, 79, 0.16);
  padding: 28px;
  background:
    radial-gradient(circle at 20% 8%, rgba(255, 255, 252, 0.96), transparent 30%),
    linear-gradient(180deg, rgba(255, 254, 250, 0.97), rgba(241, 245, 240, 0.94));
  box-shadow: -28px 0 80px rgba(38, 34, 28, 0.18), var(--inner);
  transform: translateX(100%);
  transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

.guide-drawer.is-open .guide-panel {
  transform: translateX(0);
}

.guide-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 254, 250, 0.74);
  color: var(--accent-strong);
  font-size: 24px;
  line-height: 1;
}

.guide-panel h2 {
  max-width: 10ch;
  margin: 18px 0 12px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 38px;
  line-height: 1.02;
  font-weight: 800;
}

.guide-lead {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
}

.guide-steps {
  margin: 22px 0;
  padding: 0;
  display: grid;
  gap: 10px;
  list-style: none;
  counter-reset: guide;
}

.guide-steps li {
  counter-increment: guide;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  border: 1px solid rgba(49, 95, 79, 0.12);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 254, 250, 0.68);
  box-shadow: var(--inner);
}

.guide-steps li::before {
  content: counter(guide, decimal-leading-zero);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 11px;
}

.guide-steps strong,
.guide-steps span {
  grid-column: 2;
}

.guide-steps strong {
  color: var(--ink);
  font-size: 14px;
}

.guide-steps span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.guide-note,
.guide-contact {
  border: 1px solid rgba(49, 95, 79, 0.12);
  border-radius: 12px;
  padding: 14px;
  background: rgba(255, 254, 250, 0.68);
  box-shadow: var(--inner);
}

.guide-note strong,
.guide-contact span {
  display: block;
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 11px;
}

.guide-note p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
}

.guide-contact {
  margin-top: 12px;
  font-style: normal;
}

.guide-contact a {
  display: inline-block;
  margin-top: 8px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  text-decoration-color: rgba(49, 95, 79, 0.34);
  overflow-wrap: anywhere;
}

.app-shell {
  position: relative;
  z-index: 1;
  display: block;
  min-height: 100dvh;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 22px 38px;
}

.sidebar {
  position: sticky;
  top: 14px;
  z-index: 5;
  min-height: 76px;
  height: auto;
  min-width: 0;
  margin: 14px auto 0;
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(210px, 0.48fr) minmax(420px, 1fr) minmax(230px, 0.46fr);
  align-items: stretch;
  gap: 12px;
  border: 1px solid rgba(30, 37, 32, 0.08);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 252, 0.88), rgba(248, 247, 241, 0.74)),
    rgba(255, 255, 252, 0.58);
  backdrop-filter: blur(30px) saturate(1.12);
  box-shadow: 0 12px 38px rgba(38, 34, 28, 0.08), var(--inner);
  overflow: visible;
}

.upload-panel {
  display: grid;
  grid-template-columns: minmax(190px, 0.95fr) minmax(150px, 0.62fr) minmax(210px, 0.92fr);
  align-items: stretch;
  gap: 10px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.upload-panel::before {
  display: none;
}

.upload-panel .panel-heading {
  grid-column: 1 / -1;
  padding: 0 2px 2px;
  border: 0;
}

.upload-panel .drop-zone {
  grid-row: span 2;
}

.upload-panel .backend-status,
.upload-panel .button-row {
  grid-column: 3;
}

.compact {
  align-self: stretch;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  padding: 4px 8px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background:
    linear-gradient(150deg, #fefcf7 0%, #dfe9e2 56%, #b7c6ba 100%);
  border: 1px solid rgba(63, 109, 92, 0.24);
  color: var(--accent-strong);
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
  box-shadow: var(--shadow-soft), var(--inner);
}

.brand h1,
.brand p,
.topbar h2,
.topbar p {
  margin: 0;
}

.brand h1 {
  font-family: var(--display);
  font-size: 23px;
  line-height: 1;
  color: var(--ink);
  letter-spacing: 0;
}

.brand p {
  margin-top: 6px;
  color: var(--muted);
  font-family: var(--condensed);
  font-size: 13px;
  line-height: 1.2;
}

.workspace {
  min-width: 0;
  padding: 30px 0 0;
}

.panel,
.step-card,
.hero-band,
.ops-strip,
.story-overview,
.module-detail-band {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-apple);
  backdrop-filter: blur(26px) saturate(1.08);
  transition:
    transform 260ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 260ms ease,
    box-shadow 260ms ease,
    background-color 260ms ease;
}

.panel::before,
.step-card::before,
.hero-band::before,
.ops-strip::before,
.story-overview::before,
.module-detail-band::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.66), transparent 42%);
}

.panel:hover,
.step-card:hover,
.hero-band:hover,
.ops-strip:hover,
.story-overview:hover,
.module-detail-band:hover {
  border-color: rgba(49, 95, 79, 0.17);
  box-shadow: 0 32px 86px rgba(38, 34, 28, 0.12), var(--inner);
  transform: translateY(-2px);
}

.panel-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.panel-heading span,
.decision-kicker span,
.decision-footer span,
.ops-strip strong,
.step-card h3,
.step-card p,
.hero-copy strong,
.risk-list li,
.evidence-item b,
.evidence-item p,
.timeline li span {
  overflow-wrap: anywhere;
}

.panel-heading span:last-child,
.status-pill {
  text-align: right;
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
}

.status-pill {
  padding: 5px 8px;
  border: 1px solid rgba(63, 109, 92, 0.2);
  border-radius: 8px;
  background: var(--accent-soft);
  box-shadow: var(--inner);
}

.drop-zone {
  margin: 0;
  min-height: 92px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 13px 16px;
  text-align: center;
  border: 1px dashed rgba(63, 109, 92, 0.38);
  border-radius: 14px;
  background:
    linear-gradient(rgba(63, 109, 92, 0.04) 1px, transparent 1px) 0 0 / 18px 18px,
    rgba(255, 254, 250, 0.62);
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), border-color 180ms ease, background-color 180ms ease;
}

.drop-zone:hover {
  transform: translateY(-1px);
  border-color: rgba(63, 109, 92, 0.58);
  background-color: rgba(255, 254, 250, 0.92);
}

.drop-zone input {
  display: none;
}

.drop-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid rgba(63, 109, 92, 0.18);
  color: var(--accent-strong);
  box-shadow: var(--inner);
}

.drop-zone strong {
  max-width: 24ch;
  color: var(--ink);
  font-family: var(--display);
  font-size: 15px;
  line-height: 1.35;
  text-wrap: balance;
}

.drop-zone small,
.backend-status span,
.backend-status small,
.nft-state span,
.oracle-sim label,
.finance-grid span,
.decision-metric span,
.ops-strip span,
.field-item span {
  color: var(--muted);
}

.language-strip {
  margin: 0;
  padding: 8px;
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 254, 250, 0.58);
}

.language-strip span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
}

.language-strip b {
  min-height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(63, 109, 92, 0.14);
  border-radius: 7px;
  background: rgba(63, 109, 92, 0.07);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.backend-status {
  margin: 0;
  padding: 10px 12px;
  display: grid;
  gap: 6px;
  border: 1px solid rgba(63, 109, 92, 0.16);
  border-radius: 13px;
  background: rgba(63, 109, 92, 0.06);
}

.backend-status span,
.backend-status small {
  font-size: 12px;
  line-height: 1.42;
}

.backend-status strong {
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 44px;
  gap: 10px;
  padding: 0;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.icon-btn,
.download-btn {
  min-height: 42px;
  border-radius: 13px;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0;
  transition:
    transform 180ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease;
}

.primary-btn,
.secondary-btn,
.download-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.primary-btn {
  border: 1px solid rgba(37, 77, 64, 0.24);
  color: #f7f4ec;
  background: linear-gradient(180deg, #456f60 0%, #274f42 100%);
  box-shadow: 0 18px 30px rgba(37, 77, 64, 0.18), var(--inner);
}

.icon-btn {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--accent-strong);
  background: rgba(255, 254, 250, 0.68);
}

.secondary-btn {
  width: calc(100% - 32px);
  margin: 0 16px 16px;
  border: 1px solid rgba(63, 109, 92, 0.24);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.download-btn {
  border: 1px solid var(--line);
  background: rgba(255, 254, 250, 0.72);
  color: var(--accent-strong);
  padding: 0 13px;
  text-align: center;
}

.primary-btn:hover,
.secondary-btn:hover,
.icon-btn:hover,
.ghost-btn:hover,
.download-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(57, 50, 38, 0.12), var(--inner);
}

.primary-btn:active,
.secondary-btn:active,
.icon-btn:active,
.ghost-btn:active,
.download-btn:active:not(:disabled) {
  transform: translateY(1px) scale(0.99);
}

.asset-facts {
  margin: 0;
  padding: 6px 14px 14px;
  display: grid;
  gap: 6px;
}

.asset-facts div {
  display: grid;
  grid-template-columns: minmax(72px, 0.8fr) minmax(0, 1.2fr);
  align-items: baseline;
  gap: 12px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
}

.asset-facts div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.asset-facts dt {
  color: var(--muted);
  font-size: 12px;
}

.asset-facts dd {
  margin: 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.topbar {
  max-width: 1040px;
  margin: 0 auto 22px;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  gap: 22px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}

.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 34px;
  height: 1px;
  background: rgba(49, 95, 79, 0.28);
}

.topbar h2 {
  max-width: calc(100vw - 44px);
  margin-top: 12px;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(23px, 4.8vw, 56px);
  line-height: 0.96;
  font-weight: 800;
  text-wrap: nowrap;
  white-space: nowrap;
}

.hero-subcopy {
  max-width: 640px;
  margin: 12px auto 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.62;
  text-align: center;
  text-wrap: balance;
}

.top-actions {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.ghost-btn {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: rgba(255, 254, 250, 0.64);
  color: var(--ink-soft);
  white-space: nowrap;
}

.ghost-btn.active,
.ghost-btn[aria-pressed="true"] {
  border-color: rgba(63, 109, 92, 0.28);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.decision-layer {
  display: grid;
  grid-template-columns: minmax(380px, 1.5fr) repeat(3, minmax(150px, 0.5fr));
  gap: 14px;
  margin: 16px auto 12px;
}

.reveal-item {
  opacity: 0;
  transform: none;
}

.reveal-item.is-visible {
  opacity: 1;
  transform: none;
  transition:
    opacity 720ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 720ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--reveal-index, 0) * 70ms);
}

.spotlight-card {
  --spot-x: 50%;
  --spot-y: 50%;
}

.spotlight-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 220ms ease;
  background: radial-gradient(circle at var(--spot-x) var(--spot-y), rgba(255, 255, 255, 0.72), transparent 34%);
  mix-blend-mode: soft-light;
}

.spotlight-card:hover::after {
  opacity: 0.9;
}

.decision-hero {
  min-height: 142px;
  padding: 20px 22px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 252, 0.92), rgba(231, 237, 229, 0.72)),
    var(--surface);
}

.decision-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -120px;
  width: 250px;
  height: 250px;
  border: 1px solid rgba(63, 109, 92, 0.12);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(63, 109, 92, 0.1), transparent 62%);
}

.decision-kicker {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(63, 109, 92, 0.12);
  animation: breathe 2.8s ease-in-out infinite;
}

.decision-hero h3 {
  position: relative;
  z-index: 1;
  margin: 16px 0 8px;
  max-width: 780px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 28px;
  line-height: 1.08;
  font-weight: 800;
  text-wrap: balance;
}

.decision-hero p {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 78ch;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.5;
}

.decision-footer {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.decision-metric {
  min-height: 142px;
  display: grid;
  align-content: space-between;
  padding: 16px;
  overflow: hidden;
}

.decision-metric::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 13px;
  height: 16px;
  pointer-events: none;
  opacity: 0.4;
  background:
    linear-gradient(90deg, rgba(49, 95, 79, 0.38), transparent 18% 26%, rgba(49, 95, 79, 0.22) 32%, transparent 46% 53%, rgba(184, 139, 69, 0.34) 60%, transparent 78%),
    linear-gradient(180deg, transparent 0 7px, rgba(49, 95, 79, 0.28) 7px 9px, transparent 9px);
}

.decision-metric strong {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 29px;
  font-weight: 400;
  line-height: 1;
}

.decision-metric small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
}

.ops-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 12px;
  overflow: hidden;
}

.ops-strip div {
  position: relative;
  z-index: 1;
  padding: 13px 15px;
  border-right: 1px solid var(--line);
}

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

.ops-strip span {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
}

.ops-strip strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 12px;
}

.step-card {
  min-height: 104px;
  padding: 15px;
  overflow: hidden;
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), border-color 180ms ease, background-color 180ms ease;
}

.step-card.active {
  border-color: rgba(63, 109, 92, 0.36);
  background:
    linear-gradient(145deg, rgba(255, 254, 250, 0.98), rgba(228, 237, 231, 0.84)),
    rgba(255, 254, 250, 0.96);
  transform: translateY(-1px);
}

.step-card.active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), rgba(201, 166, 107, 0.7));
  animation: line-flow 1.8s ease-in-out infinite;
}

.step-card.is-running {
  border-color: rgba(184, 139, 69, 0.42);
  box-shadow: 0 18px 42px rgba(184, 139, 69, 0.14), var(--inner);
}

.step-card.is-running::after {
  background: linear-gradient(90deg, rgba(184, 139, 69, 0), var(--warm), rgba(184, 139, 69, 0));
  animation-duration: 900ms;
}

.step-card.is-running .step-index::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 8px;
  border: 2px solid rgba(184, 139, 69, 0.22);
  border-top-color: var(--warm);
  border-radius: 999px;
  vertical-align: -2px;
  animation: thinking-spin 820ms linear infinite;
}

.step-index {
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 11px;
}

.step-card h3 {
  margin: 8px 0 6px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
}

.step-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.workspace-accordion {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.work-section {
  position: relative;
  min-width: 0;
  border: 1px solid rgba(30, 37, 32, 0.1);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 252, 0.86), rgba(247, 246, 240, 0.72)),
    rgba(255, 255, 252, 0.68);
  box-shadow: var(--shadow-soft), var(--inner);
  overflow: clip;
  transition:
    border-color 220ms ease,
    box-shadow 220ms ease,
    background-color 220ms ease;
}

.work-section[open],
.work-section.is-active {
  border-color: rgba(49, 95, 79, 0.24);
  box-shadow: 0 24px 64px rgba(38, 34, 28, 0.1), var(--inner);
}

.work-section summary {
  min-height: 76px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto 26px;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  list-style: none;
  cursor: pointer;
}

.work-section summary::-webkit-details-marker {
  display: none;
}

.work-section summary::after {
  content: "";
  width: 12px;
  height: 12px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  color: var(--muted);
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.work-section[open] summary::after {
  transform: rotate(225deg) translate(-2px, -1px);
}

.section-index {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(49, 95, 79, 0.18);
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 11px;
}

.section-title {
  min-width: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: 20px;
  font-weight: 800;
  text-wrap: balance;
}

.work-section summary small {
  justify-self: end;
  border: 1px solid rgba(49, 95, 79, 0.14);
  border-radius: 8px;
  padding: 6px 8px;
  background: rgba(255, 254, 250, 0.56);
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 11px;
  white-space: nowrap;
}

.section-body {
  display: grid;
  gap: 14px;
  padding: 0 14px 14px;
  animation: section-open 360ms cubic-bezier(0.16, 1, 0.3, 1);
}

.document-body {
  grid-template-columns: minmax(320px, 0.95fr) minmax(340px, 1.05fr);
}

.risk-body,
.event-body {
  grid-template-columns: minmax(300px, 0.8fr) minmax(420px, 1.2fr);
}

.finance-body {
  grid-template-columns: minmax(280px, 0.58fr) minmax(520px, 1.42fr);
  align-items: stretch;
}

.hero-band {
  max-width: 1240px;
  margin: 0 auto;
  min-height: min(560px, 58dvh);
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 255, 252, 0.52), transparent 42%),
    #dfe4dc;
  transform-style: preserve-3d;
  isolation: isolate;
}

.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.hero-particles span {
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1px solid rgba(255, 254, 250, 0.7);
  border-radius: 999px;
  background: rgba(49, 95, 79, 0.38);
  box-shadow: 0 0 26px rgba(49, 95, 79, 0.28);
  animation: particle-drift 8s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.hero-particles span:nth-child(1) { left: 18%; top: 36%; animation-delay: 0ms; }
.hero-particles span:nth-child(2) { left: 34%; top: 58%; animation-delay: 620ms; }
.hero-particles span:nth-child(3) { left: 51%; top: 30%; animation-delay: 1240ms; }
.hero-particles span:nth-child(4) { left: 67%; top: 62%; animation-delay: 1860ms; }
.hero-particles span:nth-child(5) { left: 78%; top: 42%; animation-delay: 2480ms; }
.hero-particles span:nth-child(6) { left: 44%; top: 73%; animation-delay: 3100ms; }

.hero-band::before {
  background:
    linear-gradient(120deg, transparent 0 36%, rgba(255, 255, 255, 0.42) 47%, transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), transparent 42%);
  transform: translateX(-90%);
  animation: glass-sweep 8.5s ease-in-out infinite;
}

.hero-band img {
  width: 100%;
  height: 100%;
  min-height: 560px;
  display: block;
  object-fit: cover;
  filter: saturate(0.7) contrast(0.95) brightness(1.06);
  transform: scale(1.04);
  animation: product-drift 14s ease-in-out infinite;
}

.hero-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(14, 22, 18, 0.28), transparent 24%, transparent 76%, rgba(14, 22, 18, 0.22)),
    radial-gradient(circle at 50% 42%, transparent 0 24%, rgba(255, 255, 252, 0.08) 42%, transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 252, 0.08), transparent 36%, rgba(29, 36, 31, 0.62));
}

.route-console {
  position: absolute;
  top: 22px;
  left: 22px;
  right: 22px;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(255, 254, 250, 0.22);
  border-radius: 12px;
  background: rgba(255, 254, 250, 0.12);
  backdrop-filter: blur(24px) saturate(1.08);
  box-shadow: 0 20px 52px rgba(25, 35, 29, 0.18);
}

.route-console div {
  min-width: 0;
  padding: 12px 14px;
  background: var(--route-panel);
  color: #fffefa;
}

.route-console span {
  display: block;
  color: rgba(255, 254, 250, 0.64);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
}

.route-console strong {
  display: block;
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.route-reticle {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 46%;
  width: 168px;
  height: 168px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 254, 250, 0.3);
  border-radius: 999px;
  pointer-events: none;
  mix-blend-mode: soft-light;
}

.route-reticle span {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 254, 250, 0.32);
  border-radius: inherit;
  animation: reticle-pulse 3.4s ease-in-out infinite;
}

.route-reticle span:nth-child(2) {
  inset: 44px;
  animation-delay: 220ms;
}

.route-reticle span:nth-child(3) {
  inset: 72px;
  background: rgba(255, 254, 250, 0.36);
  animation-delay: 440ms;
}

.hero-copy {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 1;
  width: min(760px, calc(100% - 48px));
  color: var(--ink);
  text-align: center;
}

.hero-copy span {
  display: block;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  opacity: 0.74;
}

.hero-copy strong {
  display: block;
  color: var(--ink);
  font-family: var(--display);
  font-size: 38px;
  line-height: 1.08;
  font-weight: 800;
  text-wrap: balance;
}

.scroll-cue {
  position: absolute;
  right: 26px;
  bottom: 26px;
  z-index: 3;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(255, 254, 250, 0.28);
  border-radius: 999px;
  padding: 0 14px 0 16px;
  color: #fffefa;
  background: rgba(20, 31, 26, 0.46);
  backdrop-filter: blur(20px) saturate(1.06);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 18px 42px rgba(19, 29, 24, 0.18);
  transition:
    transform 180ms cubic-bezier(0.16, 1, 0.3, 1),
    background-color 180ms ease,
    border-color 180ms ease;
}

.scroll-cue svg {
  transform: rotate(90deg);
}

.scroll-cue:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 254, 250, 0.52);
  background: rgba(20, 31, 26, 0.62);
}

.story-overview {
  margin: 16px auto 14px;
  padding: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 255, 252, 0.86), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 252, 0.86), rgba(232, 236, 228, 0.72));
}

.story-intro {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(360px, 0.58fr);
  gap: 24px;
  align-items: end;
  margin-bottom: 22px;
}

.story-intro .eyebrow {
  align-self: start;
}

.story-intro h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: 34px;
  line-height: 1.08;
  font-weight: 800;
  text-wrap: balance;
}

.module-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.9fr 1.15fr 0.95fr;
  gap: 12px;
}

.module-card {
  position: relative;
  min-height: 188px;
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
  border: 1px solid rgba(30, 37, 32, 0.1);
  border-radius: 14px;
  padding: 16px;
  background: rgba(255, 254, 250, 0.58);
  color: var(--ink);
  text-align: left;
  box-shadow: var(--inner);
  overflow: hidden;
  transition:
    transform 200ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 200ms ease,
    background-color 200ms ease,
    box-shadow 200ms ease;
}

.module-card::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  height: 18px;
  opacity: 0.28;
  background:
    linear-gradient(90deg, rgba(49, 95, 79, 0.36), transparent 18% 28%, rgba(49, 95, 79, 0.2) 34%, transparent 50%, rgba(184, 139, 69, 0.28) 64%, transparent 78%),
    linear-gradient(180deg, transparent 0 7px, rgba(49, 95, 79, 0.24) 7px 9px, transparent 9px);
}

.module-card:hover,
.module-card.active {
  transform: translateY(-2px);
  border-color: rgba(49, 95, 79, 0.28);
  background: rgba(255, 254, 250, 0.9);
  box-shadow: 0 22px 48px rgba(38, 34, 28, 0.09), var(--inner);
}

.module-card.active {
  background:
    linear-gradient(145deg, rgba(255, 255, 252, 0.96), rgba(226, 236, 230, 0.74)),
    rgba(255, 254, 250, 0.9);
}

.module-card.active::before {
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 254, 250, 0.7), transparent 28%),
    linear-gradient(90deg, rgba(49, 95, 79, 0.16), transparent 72%);
}

.module-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(63, 109, 92, 0.18);
  border-radius: 10px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  box-shadow: var(--inner);
}

.module-index {
  position: absolute;
  top: 16px;
  right: 16px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}

.module-card strong {
  align-self: end;
  max-width: 12ch;
  color: var(--ink);
  font-family: var(--display);
  font-size: 24px;
  line-height: 1.02;
  font-weight: 800;
  text-wrap: balance;
}

.module-card small {
  position: relative;
  z-index: 1;
  max-width: 28ch;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.48;
}

.connectivity-band {
  position: relative;
  min-height: 360px;
  margin: 14px auto 18px;
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(360px, 1.2fr);
  gap: 18px;
  border: 1px solid rgba(30, 37, 32, 0.1);
  border-radius: 18px;
  padding: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 8%, rgba(255, 255, 252, 0.9), transparent 32%),
    linear-gradient(135deg, rgba(245, 250, 246, 0.94), rgba(231, 237, 229, 0.76));
  box-shadow: var(--shadow-apple);
  backdrop-filter: blur(26px) saturate(1.08);
}

.connectivity-copy {
  position: relative;
  z-index: 2;
  align-self: center;
}

.connectivity-copy h2 {
  max-width: 13ch;
  margin: 16px 0 14px;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.02;
  font-weight: 800;
  text-wrap: balance;
}

.connectivity-copy p:last-child {
  max-width: 54ch;
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.72;
}

.connectivity-visual {
  position: relative;
  min-height: 246px;
  border: 1px solid rgba(49, 95, 79, 0.14);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 50%, rgba(49, 95, 79, 0.13), transparent 24%),
    linear-gradient(rgba(49, 95, 79, 0.07) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(49, 95, 79, 0.055) 1px, transparent 1px) 0 0 / 28px 28px,
    rgba(255, 254, 250, 0.52);
  box-shadow: var(--inner);
}

.radar-sweep {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 220px;
  aspect-ratio: 1;
  border: 1px solid rgba(49, 95, 79, 0.12);
  border-radius: 999px;
  transform: translate(-50%, -50%);
  background:
    conic-gradient(from 20deg, rgba(49, 95, 79, 0.2), transparent 18%, transparent 100%),
    radial-gradient(circle, rgba(49, 95, 79, 0.08), transparent 62%);
  animation: radar-spin 8s linear infinite;
}

.signal-node {
  position: absolute;
  z-index: 2;
  width: 116px;
  min-height: 84px;
  display: grid;
  align-content: center;
  place-items: center;
  gap: 5px;
  border: 1px solid rgba(49, 95, 79, 0.22);
  border-radius: 18px;
  color: var(--accent-strong);
  background: rgba(255, 254, 250, 0.78);
  backdrop-filter: blur(18px) saturate(1.08);
  font-family: var(--mono);
  box-shadow: 0 18px 40px rgba(38, 34, 28, 0.1), var(--inner);
}

.signal-node b {
  font-size: 18px;
  font-weight: 400;
}

.signal-node small {
  color: var(--muted);
  font-size: 10px;
}

.node-main { left: 6%; top: 32px; }
.node-warehouse { left: 28%; bottom: 30px; }
.node-hk { left: 52%; top: 86px; }
.node-bank { right: 6%; top: 32px; }

.signal-path {
  position: absolute;
  z-index: 1;
  height: 2px;
  transform-origin: left center;
  background: linear-gradient(90deg, rgba(49, 95, 79, 0), rgba(49, 95, 79, 0.56), rgba(184, 139, 69, 0.42));
}

.path-a {
  left: 17%;
  top: 82px;
  width: 18%;
  transform: rotate(31deg);
}

.path-b {
  left: 39%;
  top: 159px;
  width: 20%;
  transform: rotate(-25deg);
}

.path-c {
  left: 63%;
  top: 118px;
  width: 26%;
  transform: rotate(-15deg);
}

.signal-pulse {
  position: absolute;
  z-index: 3;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 8px rgba(49, 95, 79, 0.12), 0 0 28px rgba(49, 95, 79, 0.34);
  animation: signal-travel 3.4s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.pulse-a { left: 20%; top: 88px; }
.pulse-b { left: 39%; top: 156px; animation-delay: 1.1s; }
.pulse-c { left: 63%; top: 114px; animation-delay: 2.2s; }

.data-chip {
  position: absolute;
  z-index: 4;
  border: 1px solid rgba(49, 95, 79, 0.14);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 254, 250, 0.78);
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 10px;
  box-shadow: var(--inner);
  animation: data-float 5s ease-in-out infinite;
}

.chip-a { left: 8%; bottom: 24px; }
.chip-b { left: 45%; top: 22px; animation-delay: 900ms; }
.chip-c { right: 8%; bottom: 28px; animation-delay: 1800ms; }

.connectivity-grid {
  grid-column: 1 / -1;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.connectivity-grid article {
  min-width: 0;
  border: 1px solid rgba(49, 95, 79, 0.12);
  border-radius: 12px;
  padding: 14px;
  background: rgba(255, 254, 250, 0.68);
  box-shadow: var(--inner);
}

.connectivity-grid span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}

.connectivity-grid strong {
  display: block;
  margin: 8px 0 7px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 17px;
}

.connectivity-grid p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.55;
}

.module-detail-band {
  min-height: 320px;
  margin: 14px auto 18px;
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(420px, 1.05fr);
  gap: 24px;
  align-items: stretch;
  padding: 20px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(20, 31, 26, 0.94), rgba(43, 63, 54, 0.86)),
    #1c2923;
  color: #fffefa;
}

.module-detail-band::before {
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 254, 250, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 46%);
}

.module-stage,
.module-detail-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.module-stage {
  min-height: 280px;
  border: 1px solid rgba(255, 254, 250, 0.14);
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(226, 236, 230, 0.18), transparent 34%),
    linear-gradient(rgba(255, 254, 250, 0.055) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(90deg, rgba(255, 254, 250, 0.045) 1px, transparent 1px) 0 0 / 34px 34px,
    rgba(255, 254, 250, 0.05);
}

.stage-grid {
  position: absolute;
  inset: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.stage-grid span {
  border: 1px solid rgba(255, 254, 250, 0.14);
  border-radius: 10px;
  background: rgba(255, 254, 250, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.stage-grid span:nth-child(2),
.stage-grid span:nth-child(5) {
  background: rgba(226, 236, 230, 0.14);
}

.stage-orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(230px, 64%);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  display: grid;
  place-content: center;
  justify-items: center;
  border: 1px solid rgba(255, 254, 250, 0.22);
  border-radius: 999px;
  color: #fffefa;
  background: rgba(15, 25, 20, 0.58);
  box-shadow: 0 28px 70px rgba(9, 17, 13, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.stage-orbit::before,
.stage-orbit::after {
  content: "";
  position: absolute;
  inset: -24px;
  border: 1px solid rgba(255, 254, 250, 0.14);
  border-radius: inherit;
  animation: reticle-pulse 3.8s ease-in-out infinite;
}

.stage-orbit::after {
  inset: -48px;
  animation-delay: 250ms;
}

.stage-orbit b {
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
  overflow-wrap: anywhere;
}

.stage-orbit small {
  margin-top: 8px;
  color: rgba(255, 254, 250, 0.62);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
}

.module-detail-copy {
  display: grid;
  align-content: center;
  padding: 18px clamp(12px, 3vw, 42px) 18px 8px;
}

.module-detail-copy > span {
  color: rgba(255, 254, 250, 0.62);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}

.module-detail-copy h3 {
  margin: 18px 0 12px;
  color: #fffefa;
  font-family: var(--display);
  font-size: clamp(30px, 3.5vw, 38px);
  line-height: 1.02;
  font-weight: 800;
  text-wrap: balance;
}

.module-detail-copy p {
  margin: 0;
  max-width: 62ch;
  color: rgba(255, 254, 250, 0.76);
  font-size: 15px;
  line-height: 1.72;
}

.module-detail-copy ul {
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
  list-style: none;
}

.module-detail-copy li {
  position: relative;
  padding-left: 22px;
  color: rgba(255, 254, 250, 0.82);
  font-size: 13px;
  line-height: 1.5;
}

.module-detail-copy li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 10px;
  height: 1px;
  background: rgba(226, 236, 230, 0.72);
}

.module-jump {
  width: fit-content;
  min-height: 42px;
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid rgba(255, 254, 250, 0.2);
  border-radius: 12px;
  padding: 0 14px 0 16px;
  color: #20362e;
  background: #fffefa;
  font-family: var(--display);
  font-weight: 700;
  box-shadow: 0 20px 46px rgba(9, 17, 13, 0.2);
  transition:
    transform 180ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 180ms ease;
}

.module-jump:hover {
  transform: translateY(-1px);
  box-shadow: 0 24px 54px rgba(9, 17, 13, 0.26);
}

.module-jump:active {
  transform: translateY(1px) scale(0.99);
}

.document-preview {
  padding: 12px;
}

.document-preview img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-solid);
}

.mock-document {
  min-height: 398px;
  padding: 24px;
  display: grid;
  align-content: start;
  gap: 12px;
  border: 1px solid rgba(47, 61, 51, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(rgba(47, 61, 51, 0.035) 1px, transparent 1px) 0 0 / 100% 42px,
    #fffefa;
  box-shadow: inset 0 0 0 8px rgba(237, 231, 220, 0.42);
}

.mock-document span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.mock-document strong {
  color: var(--ink);
  font-family: var(--display);
  font-size: 24px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.mock-document p {
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.45;
}

.fields-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 12px;
}

.field-item,
.finance-grid div,
.nft-state div,
.evidence-item {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 254, 250, 0.58);
  box-shadow: var(--inner);
}

.field-item {
  min-height: 64px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 10px;
}

.field-item span,
.finance-grid span,
.nft-state span,
.oracle-sim label {
  display: block;
  font-size: 11px;
}

.field-item strong,
.finance-grid strong,
.nft-state strong {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.risk-meter {
  display: grid;
  grid-template-columns: 114px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 16px;
}

.risk-meter svg {
  width: 114px;
  height: 114px;
  transform: rotate(-90deg);
}

.risk-meter circle {
  fill: none;
  stroke-width: 8;
}

.meter-bg {
  stroke: rgba(47, 61, 51, 0.11);
}

.meter-value {
  stroke: var(--accent);
  stroke-dasharray: 314;
  stroke-dashoffset: 314;
  transition: stroke-dashoffset 640ms cubic-bezier(0.16, 1, 0.3, 1), stroke 180ms ease;
}

.risk-meter strong {
  display: block;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 40px;
  font-weight: 400;
  line-height: 1;
}

.risk-meter span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
}

.risk-list {
  margin: 0;
  padding: 0 16px 16px 34px;
  display: grid;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.45;
}

.risk-list li::marker {
  color: var(--accent);
}

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

.finance-grid div {
  padding: 13px;
}

.finance-grid strong {
  display: block;
  margin-top: 9px;
  font-size: 22px;
}

.finance-brief {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(49, 95, 79, 0.18);
  border-radius: 12px;
  padding: 20px;
  background:
    radial-gradient(circle at 15% 14%, rgba(255, 255, 252, 0.9), transparent 34%),
    linear-gradient(155deg, rgba(32, 54, 46, 0.96), rgba(49, 95, 79, 0.78));
  color: #fffefa;
  box-shadow: 0 22px 58px rgba(38, 34, 28, 0.12);
}

.finance-brief::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.2;
  background:
    linear-gradient(rgba(255, 254, 250, 0.12) 1px, transparent 1px) 0 0 / 26px 26px,
    linear-gradient(90deg, rgba(255, 254, 250, 0.1) 1px, transparent 1px) 0 0 / 26px 26px;
}

.finance-brief > * {
  position: relative;
  z-index: 1;
}

.finance-brief .eyebrow {
  color: rgba(255, 254, 250, 0.72);
}

.finance-brief h3 {
  max-width: 14ch;
  margin: 18px 0 14px;
  color: #fffefa;
  font-family: var(--display);
  font-size: 34px;
  line-height: 1.04;
  font-weight: 800;
  text-wrap: balance;
}

.finance-brief p {
  margin: 0;
  color: rgba(255, 254, 250, 0.78);
  font-size: 14px;
  line-height: 1.72;
}

.brief-list {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
}

.brief-list div {
  border: 1px solid rgba(255, 254, 250, 0.14);
  border-radius: 10px;
  padding: 12px;
  background: rgba(255, 254, 250, 0.08);
}

.brief-list dt {
  color: #fffefa;
  font-family: var(--mono);
  font-size: 11px;
}

.brief-list dd {
  margin: 6px 0 0;
  color: rgba(255, 254, 250, 0.74);
  font-size: 12px;
  line-height: 1.45;
}

.credential-workbench {
  display: grid;
  grid-template-columns: minmax(300px, 0.92fr) minmax(360px, 1.08fr);
  gap: 12px;
  padding: 0 12px 12px;
}

.credential-visual {
  position: relative;
  min-height: 322px;
  overflow: hidden;
  border: 1px solid rgba(49, 95, 79, 0.2);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 36%, rgba(49, 95, 79, 0.18), transparent 36%),
    linear-gradient(rgba(49, 95, 79, 0.08) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(49, 95, 79, 0.06) 1px, transparent 1px) 0 0 / 22px 22px,
    rgba(246, 249, 244, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 18px 46px rgba(38, 34, 28, 0.08);
}

.credential-visual::before,
.credential-visual::after {
  content: "";
  position: absolute;
  inset: 18px;
  pointer-events: none;
  border: 1px solid rgba(49, 95, 79, 0.16);
  border-radius: 999px;
}

.credential-visual::after {
  inset: 48px;
  opacity: 0.72;
  animation: credential-ring 3.4s ease-in-out infinite;
}

.credential-matrix {
  position: absolute;
  inset: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 8px;
  opacity: 0.58;
}

.credential-matrix span {
  border: 1px solid rgba(49, 95, 79, 0.12);
  border-radius: 8px;
  background: rgba(255, 254, 250, 0.22);
}

.credential-brief {
  position: absolute;
  left: 14px;
  top: 14px;
  width: min(210px, calc(100% - 28px));
  z-index: 2;
  border: 1px solid rgba(49, 95, 79, 0.16);
  border-radius: 10px;
  padding: 12px;
  background: rgba(255, 254, 250, 0.72);
  backdrop-filter: blur(18px) saturate(1.08);
  box-shadow: var(--inner);
}

.credential-brief span {
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 10px;
}

.credential-brief p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
}

.fingerprint-core {
  position: absolute;
  left: 50%;
  top: 44%;
  width: 170px;
  transform: translate(-50%, -50%);
  color: var(--accent-strong);
  filter: drop-shadow(0 18px 30px rgba(49, 95, 79, 0.18));
}

.fingerprint-core svg {
  width: 100%;
  height: auto;
  stroke-width: 4.5;
}

.fingerprint-core path {
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  animation: fingerprint-draw 3.8s ease-in-out infinite;
}

.fingerprint-core path:nth-child(2) { animation-delay: 120ms; }
.fingerprint-core path:nth-child(3) { animation-delay: 240ms; }
.fingerprint-core path:nth-child(4) { animation-delay: 360ms; }
.fingerprint-core path:nth-child(5) { animation-delay: 480ms; }
.fingerprint-core path:nth-child(6) { animation-delay: 600ms; }
.fingerprint-core path:nth-child(7) { animation-delay: 720ms; }
.fingerprint-core path:nth-child(8) { animation-delay: 840ms; }

.credential-scan {
  position: absolute;
  left: 20px;
  right: 20px;
  top: 38px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(49, 95, 79, 0.82), transparent);
  box-shadow: 0 0 18px rgba(49, 95, 79, 0.32);
  animation: credential-scan 3.2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.credential-chip {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid rgba(49, 95, 79, 0.16);
  border-radius: 10px;
  background: rgba(255, 254, 250, 0.68);
  backdrop-filter: blur(18px) saturate(1.08);
}

.credential-chip span {
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 10px;
}

.credential-chip strong {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.credential-visual[data-status="idle"] .credential-scan,
.credential-visual[data-status="pricing"] .credential-scan {
  opacity: 0.55;
}

.credential-visual[data-status="minting"],
.credential-visual[data-status="minted"] {
  border-color: rgba(49, 95, 79, 0.32);
  background:
    radial-gradient(circle at 50% 36%, rgba(49, 95, 79, 0.24), transparent 36%),
    linear-gradient(rgba(49, 95, 79, 0.1) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(49, 95, 79, 0.08) 1px, transparent 1px) 0 0 / 22px 22px,
    rgba(241, 248, 243, 0.82);
}

.credential-visual[data-status="minted"] .fingerprint-core {
  filter: drop-shadow(0 0 22px rgba(49, 95, 79, 0.24)) drop-shadow(0 20px 30px rgba(49, 95, 79, 0.2));
}

.credential-visual[data-status="elevated"] {
  border-color: rgba(184, 139, 69, 0.38);
  background:
    radial-gradient(circle at 50% 36%, rgba(184, 139, 69, 0.2), transparent 36%),
    linear-gradient(rgba(184, 139, 69, 0.08) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(184, 139, 69, 0.06) 1px, transparent 1px) 0 0 / 22px 22px,
    rgba(250, 247, 238, 0.84);
}

.credential-visual[data-status="elevated"] .credential-scan {
  background: linear-gradient(90deg, transparent, rgba(184, 139, 69, 0.86), transparent);
  box-shadow: 0 0 18px rgba(184, 139, 69, 0.32);
}

.credential-data {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.nft-state {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
}

.nft-state div {
  padding: 11px;
}

.nft-state .status-warning {
  color: var(--amber);
}

.oracle-sim {
  display: grid;
  gap: 9px;
  padding: 0;
}

.oracle-sim textarea,
.oracle-sim pre {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 254, 250, 0.66);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.45;
}

.oracle-sim textarea {
  min-height: 78px;
  padding: 10px 11px;
  resize: vertical;
}

.oracle-sim pre {
  min-height: 92px;
  margin: 0;
  padding: 11px;
  white-space: pre-wrap;
  overflow: auto;
}

.mint-animation {
  display: none;
  align-items: center;
  gap: 8px;
  margin: 0 12px 12px;
  padding: 10px;
  border: 1px solid rgba(63, 109, 92, 0.2);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 10px;
}

.mint-animation.active {
  display: flex;
}

.mint-animation span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  animation: dot-shift 980ms ease-in-out infinite;
}

.mint-animation span:nth-child(2) {
  animation-delay: 130ms;
}

.mint-animation span:nth-child(3) {
  animation-delay: 260ms;
}

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

.credential-note {
  margin: 0;
  padding: 0 12px 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.insight-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 12px;
  margin-top: 12px;
}

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

.evidence-item {
  padding: 12px;
}

.evidence-item header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  margin-bottom: 8px;
}

.evidence-item b {
  color: var(--ink);
  font-size: 13px;
}

.evidence-tag,
.tag {
  flex: 0 0 auto;
  border: 1px solid rgba(63, 109, 92, 0.18);
  border-radius: 7px;
  padding: 3px 6px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
}

.evidence-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.48;
}

.timeline {
  margin: 0;
  padding: 12px;
  display: grid;
  gap: 8px;
  list-style: none;
  max-height: 410px;
  overflow: auto;
}

.timeline li {
  min-width: 0;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 254, 250, 0.58);
}

.timeline time {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}

.timeline span:not(.tag) {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.4;
}

.oracle-panel {
  min-width: 0;
}

.focus-pulse {
  animation: panel-focus 1.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes breathe {
  0%, 100% { transform: scale(0.92); box-shadow: 0 0 0 5px rgba(63, 109, 92, 0.1); }
  50% { transform: scale(1); box-shadow: 0 0 0 9px rgba(63, 109, 92, 0.16); }
}

@keyframes line-flow {
  0%, 100% { opacity: 0.52; transform: translateX(-8px); }
  50% { opacity: 1; transform: translateX(8px); }
}

@keyframes dot-shift {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(-4px); opacity: 1; }
}

@keyframes thinking-spin {
  to { transform: rotate(360deg); }
}

@keyframes product-drift {
  0%, 100% { transform: scale(1.035) translate3d(0, 0, 0); }
  50% { transform: scale(1.07) translate3d(0, -10px, 0); }
}

@keyframes glass-sweep {
  0%, 42%, 100% { transform: translateX(-90%); opacity: 0; }
  55% { opacity: 0.7; }
  70% { transform: translateX(90%); opacity: 0; }
}

@keyframes reticle-pulse {
  0%, 100% { opacity: 0.44; transform: scale(0.94); }
  50% { opacity: 0.86; transform: scale(1.04); }
}

@keyframes panel-focus {
  0% { box-shadow: 0 0 0 0 rgba(63, 109, 92, 0.22), var(--shadow-soft), var(--inner); }
  100% { box-shadow: 0 0 0 14px rgba(63, 109, 92, 0), var(--shadow-soft), var(--inner); }
}

@keyframes fingerprint-draw {
  0% { stroke-dashoffset: 420; opacity: 0.18; }
  32%, 72% { stroke-dashoffset: 0; opacity: 0.92; }
  100% { stroke-dashoffset: -420; opacity: 0.22; }
}

@keyframes credential-scan {
  0%, 100% { transform: translateY(0); opacity: 0; }
  12% { opacity: 0.88; }
  54% { opacity: 0.88; }
  72% { transform: translateY(205px); opacity: 0; }
}

@keyframes credential-ring {
  0%, 100% { transform: scale(0.94); opacity: 0.42; }
  50% { transform: scale(1.04); opacity: 0.82; }
}

@keyframes section-open {
  0% { opacity: 0; transform: translateY(-8px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes particle-drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(0.82); opacity: 0.2; }
  25% { opacity: 0.9; }
  50% { transform: translate3d(36px, -24px, 0) scale(1); opacity: 0.66; }
  75% { transform: translate3d(-18px, 18px, 0) scale(0.9); opacity: 0.42; }
}

@keyframes signal-travel {
  0%, 100% { transform: translate3d(0, 0, 0) scale(0.86); opacity: 0.18; }
  12% { opacity: 1; }
  58% { transform: translate3d(170px, 42px, 0) scale(1); opacity: 0.86; }
  82% { opacity: 0; }
}

@keyframes radar-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes data-float {
  0%, 100% { transform: translateY(0); opacity: 0.72; }
  50% { transform: translateY(-8px); opacity: 1; }
}

@media (max-width: 1360px) and (min-width: 1121px) {
  .app-shell {
    max-width: 1260px;
  }

  .sidebar {
    grid-template-columns: minmax(190px, 0.44fr) minmax(360px, 1fr) minmax(210px, 0.46fr);
  }

  .upload-panel {
    grid-template-columns: minmax(180px, 0.9fr) minmax(200px, 1fr);
  }

  .backend-status,
  .button-row {
    grid-column: span 1;
  }

  .upload-panel .drop-zone {
    grid-row: auto;
  }

  .upload-panel .backend-status,
  .upload-panel .button-row {
    grid-column: auto;
  }

  .decision-layer {
    grid-template-columns: minmax(0, 1fr) repeat(3, minmax(128px, 0.38fr));
  }

  .decision-metric strong {
    font-size: 25px;
  }

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

  .module-card strong {
    font-size: 21px;
  }

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

  .credential-workbench {
    grid-template-columns: 1fr;
  }

  .credential-visual {
    min-height: 280px;
  }
}

@media (max-width: 1120px) {
  .app-shell {
    padding-inline: 16px;
  }

  .sidebar {
    position: relative;
    height: auto;
    display: grid;
    grid-template-columns: minmax(240px, 0.75fr) minmax(320px, 1fr) minmax(220px, 0.65fr);
    align-items: start;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .upload-panel {
    grid-template-columns: 1fr;
  }

  .brand {
    align-self: stretch;
    padding-top: 4px;
  }

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

  .decision-hero {
    grid-column: 1 / -1;
  }

  .story-intro {
    grid-template-columns: 1fr;
  }

  .story-intro h2 {
    max-width: 780px;
  }

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

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

  .connectivity-band {
    grid-template-columns: 1fr;
  }

  .connectivity-copy h2 {
    max-width: 18ch;
  }

  .module-stage {
    min-height: 310px;
  }

  .module-detail-copy {
    padding: 6px 8px 12px;
  }

  .hero-band,
  .hero-band img {
    min-height: 480px;
  }

  .document-body,
  .risk-body,
  .event-body,
  .finance-body {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 900px) {
  .sidebar {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .upload-panel {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .upload-panel .panel-heading,
  .backend-status,
  .button-row {
    grid-column: 1 / -1;
  }

  .topbar {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 16px;
  }

  .top-actions {
    justify-content: stretch;
  }

  .ghost-btn {
    flex: 1 1 calc(33.333% - 8px);
  }

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

  .story-overview {
    padding: 18px;
  }

  .story-intro h2 {
    font-size: 30px;
  }

  .module-detail-copy h3 {
    font-size: 34px;
  }

  .insight-row {
    grid-template-columns: 1fr;
  }

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

  .topbar h2 {
    font-size: 52px;
  }
}

@media (max-width: 680px) {
  .app-shell {
    padding-inline: 10px;
  }

  .workspace {
    padding: 14px 0 0;
  }

  .sidebar {
    margin-top: 10px;
    gap: 8px;
    padding: max(9px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
    border-radius: 14px;
  }

  .brand {
    gap: 9px;
    padding: 0 2px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    font-size: 18px;
  }

  .brand p {
    display: none;
  }

  .upload-panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
  }

  .upload-panel .panel-heading,
  .backend-status,
  .button-row {
    grid-column: 1 / -1;
  }

  .language-strip {
    display: none;
  }

  .drop-zone {
    min-height: 54px;
    grid-template-columns: 32px minmax(0, 1fr);
    place-content: stretch;
    justify-items: start;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    text-align: left;
  }

  .drop-icon {
    width: 30px;
    height: 30px;
  }

  .drop-zone strong {
    font-size: 13px;
    max-width: none;
  }

  .drop-zone small,
  .backend-status {
    display: none;
  }

  .compact {
    display: none;
  }

  .button-row {
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 8px;
  }

  .primary-btn,
  .icon-btn {
    min-height: 38px;
    border-radius: 10px;
  }

  .brand h1 {
    font-size: 21px;
  }

  .topbar h2 {
    font-size: min(7vw, 40px);
    line-height: 1;
  }

  .hero-subcopy {
    font-size: 15px;
  }

  .top-actions {
    display: none;
  }

  .ghost-btn {
    width: 100%;
  }

  .decision-layer,
  .ops-strip,
  .pipeline,
  .document-body,
  .risk-body,
  .event-body,
  .finance-body,
  .finance-grid,
  .nft-state,
  .credential-workbench,
  .evidence-grid,
  .download-actions {
    grid-template-columns: 1fr;
  }

  .credential-workbench {
    padding-inline: 12px;
  }

  .credential-visual {
    min-height: 240px;
  }

  .fingerprint-core {
    width: 132px;
  }

  .credential-matrix {
    inset: 10px;
    gap: 6px;
  }

  .decision-hero {
    min-height: auto;
    padding: 16px;
  }

  .decision-hero h3 {
    margin-top: 16px;
    font-size: 25px;
  }

  .decision-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .decision-metric {
    min-height: 108px;
  }

  .hero-band,
  .hero-band img {
    min-height: 330px;
  }

  .route-console {
    top: 12px;
    left: 12px;
    right: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-radius: 10px;
  }

  .route-console div {
    padding: 9px 10px;
  }

  .route-console strong {
    font-size: 13px;
  }

  .route-reticle {
    width: 122px;
    height: 122px;
  }

  .hero-copy {
    left: 50%;
    right: 16px;
    bottom: 54px;
    width: calc(100% - 32px);
    max-width: none;
  }

  .hero-copy strong {
    font-size: 22px;
  }

  .scroll-cue {
    right: 14px;
    bottom: 12px;
    min-height: 36px;
    padding-inline: 12px;
  }

  .story-overview {
    margin-top: 12px;
    padding: 14px;
  }

  .story-intro {
    gap: 12px;
    margin-bottom: 14px;
  }

  .story-intro h2 {
    font-size: 24px;
  }

  .module-grid,
  .module-detail-band {
    grid-template-columns: 1fr;
  }

  .connectivity-band {
    min-height: auto;
    padding: 14px;
  }

  .connectivity-visual {
    min-height: 230px;
  }

  .connectivity-grid {
    grid-template-columns: 1fr;
  }

  .signal-node {
    width: 86px;
    min-height: 68px;
    border-radius: 16px;
    font-size: 12px;
  }

  .signal-node b {
    font-size: 14px;
  }

  .node-main { left: 5%; top: 32px; }
  .node-warehouse { left: 20%; bottom: 28px; }
  .node-hk { left: 48%; top: 90px; }
  .node-bank { right: 5%; top: 32px; }

  .data-chip {
    font-size: 9px;
    padding: 6px 8px;
  }

  .module-card {
    min-height: 132px;
    padding: 14px;
  }

  .module-card strong {
    max-width: none;
    font-size: 22px;
  }

  .module-detail-band {
    min-height: auto;
    padding: 12px;
  }

  .module-stage {
    min-height: 260px;
  }

  .stage-grid {
    inset: 12px;
    gap: 6px;
  }

  .stage-orbit {
    width: min(190px, 64%);
  }

  .stage-orbit b {
    font-size: 24px;
  }

  .module-detail-copy h3 {
    font-size: 27px;
  }

  .module-detail-copy p {
    font-size: 14px;
  }

  .module-jump {
    width: 100%;
  }

  .mock-document {
    min-height: 340px;
    padding: 18px;
  }

  .risk-meter {
    grid-template-columns: 100px minmax(0, 1fr);
  }

  .risk-meter svg {
    width: 100px;
    height: 100px;
  }

  .timeline li {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .tag {
    justify-self: start;
  }
}

@media (max-width: 430px) {
  .guide-tab {
    top: auto;
    right: 10px;
    bottom: 78px;
    width: auto;
    min-height: 38px;
    writing-mode: horizontal-tb;
    border-right: 1px solid rgba(49, 95, 79, 0.22);
    border-radius: 999px;
    padding: 0 14px;
  }

  .guide-panel {
    width: 100%;
    padding: 22px 16px;
  }

  .guide-panel h2 {
    font-size: 31px;
  }

  .process-toast {
    left: 10px;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    width: auto;
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .process-toast.has-action {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .toast-action {
    grid-column: 1 / -1;
    width: 100%;
  }

  .thinking-spinner {
    width: 28px;
    height: 28px;
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-heading span:last-child {
    text-align: left;
  }

  .button-row {
    grid-template-columns: minmax(0, 1fr) 42px;
  }

  .icon-btn {
    width: auto;
  }

  .upload-panel .panel-heading {
    flex-direction: row;
    align-items: center;
  }

  .decision-metric strong,
  .risk-meter strong {
    font-size: 30px;
  }

  .topbar h2 {
    font-size: 6.9vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
