:root {
  --paper: #f2f0e9;
  --paper-deep: #e8e4da;
  --ink: #10140f;
  --muted: #686b63;
  --line: rgba(16, 20, 15, 0.14);
  --signal: #d9ff3f;
  --signal-dark: #9aba19;
  --cobalt: #2145d8;
  --orange: #ef5c2f;
  --positive: #157b59;
  --negative: #c2442e;
  --white: #fffef9;
  --radius: 20px;
  --shadow: 0 18px 60px rgba(24, 29, 20, 0.09);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; overflow-x: clip; background: var(--paper); color: var(--ink); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--cobalt);
  outline-offset: 3px;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .34;
  background-image:
    linear-gradient(rgba(16,20,15,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16,20,15,.022) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, #000, transparent 72%);
}

.site-head {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 76px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  padding: 13px clamp(20px, 4vw, 64px);
  border-bottom: 1px solid var(--line);
  background: rgba(242, 240, 233, .88);
  backdrop-filter: blur(18px) saturate(1.1);
}

.brand { display: inline-flex; width: max-content; align-items: center; gap: 12px; }
.quantx-logo {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid #303741;
  border-radius: 8px;
  background: #f4f0e8;
  color: #07100c;
  font-family: "Avenir Next", "Gill Sans", "Trebuchet MS", sans-serif;
  font-weight: 900;
  letter-spacing: -.025em;
}
.brand small { color: var(--muted); font-size: 10px; letter-spacing: .16em; }

.desktop-nav { display: flex; align-items: center; gap: 6px; }
.desktop-nav a {
  padding: 10px 15px;
  border-radius: 999px;
  color: #55594f;
  font-size: 13px;
  font-weight: 650;
  transition: .2s ease;
}
.desktop-nav a:hover, .desktop-nav a.is-active { background: var(--ink); color: var(--paper); }

.account-trigger {
  justify-self: end;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 17px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  transition: .2s ease;
}
.account-trigger:hover { background: var(--signal); box-shadow: 4px 4px 0 var(--ink); transform: translate(-2px,-2px); }
.account-led { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(239,92,47,.12); }
.account-trigger.is-auth .account-led { background: var(--positive); box-shadow: 0 0 0 4px rgba(21,123,89,.13); }

#app { min-height: calc(100vh - 76px); }
.page { width: min(1500px, 100%); margin: 0 auto; padding: clamp(30px, 5vw, 74px) clamp(18px, 4vw, 64px) 100px; animation: page-enter .48s cubic-bezier(.2,.75,.2,1) both; }
@keyframes page-enter { from { opacity: 0; transform: translateY(12px); } }

.loading-stage { min-height: 70vh; display: flex; align-items: center; justify-content: center; gap: 20px; }
.loading-index { width: 58px; height: 58px; display: grid; place-items: center; border: 1px solid var(--ink); border-radius: 50%; font: 800 20px/1 "DIN Alternate", sans-serif; animation: pulse 1.4s ease-in-out infinite; }
.loading-stage b, .loading-stage small { display: block; }
.loading-stage b { font-size: 16px; }
.loading-stage small { margin-top: 6px; color: var(--muted); }
@keyframes pulse { 50% { transform: scale(.9); background: var(--signal); } }

.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--orange); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(360px, .75fr); gap: clamp(28px, 5vw, 90px); align-items: center; }
.hero-copy { max-width: 680px; margin: 22px 0 0; color: var(--muted); font-size: clamp(15px, 1.5vw, 18px); line-height: 1.85; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.project-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 32px;
}
.project-switch button {
  min-width: 0;
  min-height: 76px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--ink);
  border-radius: 16px;
  background: rgba(255,254,249,.52);
  cursor: pointer;
  text-align: left;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.project-switch button:hover { transform: translateY(-3px); box-shadow: 0 5px 0 var(--ink); }
.project-switch button.is-loading { color: var(--muted); pointer-events: none; }
.project-switch button.is-loading::after { content: ""; width: 12px; height: 12px; border: 2px solid var(--line); border-top-color: var(--cobalt); border-radius: 50%; animation: spin .65s linear infinite; }
.project-switch button.is-loading > small { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.project-switch button.is-active { background: var(--ink); color: var(--paper); box-shadow: inset 0 -4px 0 var(--signal); }
.project-switch button > span, .project-switch button > small { color: var(--muted); font: 750 9px/1 "DIN Alternate", sans-serif; letter-spacing: .12em; }
.project-switch button.is-active > span, .project-switch button.is-active > small { color: #aeb4a9; }
.project-switch button > b { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.project-switch.is-compact { margin: 0 0 22px; }
.primary-btn, .secondary-btn, .ghost-btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: .2s ease;
}
.primary-btn { border: 1px solid var(--ink); background: var(--ink); color: var(--paper); }
.primary-btn:hover { background: var(--signal); color: var(--ink); box-shadow: 4px 4px 0 var(--ink); transform: translate(-2px,-2px); }
.secondary-btn { border: 1px solid var(--ink); background: transparent; }
.secondary-btn:hover { background: var(--white); }
.ghost-btn { min-height: 40px; border: 1px solid var(--line); background: transparent; padding: 0 15px; }
.ghost-btn:hover { border-color: var(--ink); }
.primary-btn[disabled], .secondary-btn[disabled], .ghost-btn[disabled] { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }

.terminal-card { position: relative; min-height: 310px; padding: 24px; overflow: hidden; border-radius: 28px; background: var(--ink); color: var(--paper); box-shadow: var(--shadow); }
.terminal-card::after { content: ""; position: absolute; right: -90px; bottom: -120px; width: 270px; height: 270px; border: 45px solid var(--signal); border-radius: 50%; opacity: .9; }
.terminal-card::before { content: ""; position: absolute; right: 20px; bottom: 20px; width: 86px; height: 86px; border: 1px solid rgba(255,255,255,.32); border-radius: 50%; animation: orbit 7s linear infinite; }
@keyframes orbit { to { transform: rotate(360deg) translateX(16px) rotate(-360deg); } }
.terminal-top { display: flex; justify-content: space-between; color: #a8afa1; font: 700 11px/1 "DIN Alternate", sans-serif; letter-spacing: .15em; }
.terminal-number { position: relative; z-index: 1; margin-top: 62px; font: 700 clamp(42px, 6vw, 74px)/1 "DIN Alternate", "Arial Narrow", sans-serif; letter-spacing: -.06em; }
.terminal-number small { margin-left: 5px; color: var(--signal); font-size: 16px; letter-spacing: 0; }
.terminal-foot { position: absolute; z-index: 1; left: 24px; right: 24px; bottom: 24px; display: flex; justify-content: space-between; color: #adb3a8; font-size: 11px; }
.live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 4px rgba(217,255,63,.12); }
.live-tape { width: 100%; margin-top: 34px; overflow: hidden; border-block: 1px solid var(--ink); background: var(--signal); }
.live-tape > div { width: max-content; display: flex; align-items: center; gap: 26px; padding: 10px 0; animation: tape 24s linear infinite alternate; }
.live-tape span { color: rgba(16,20,15,.62); font: 800 9px/1 "DIN Alternate", sans-serif; letter-spacing: .16em; }
.live-tape b { font-size: 11px; }
@keyframes tape { from { transform: translateX(24px); } to { transform: translateX(calc(-100% + 90vw)); } }

.home-title { margin: 18px 0 0; font-family: "Songti SC", "STSong", serif; font-size: clamp(64px, 8.7vw, 142px); font-weight: 500; letter-spacing: -.075em; line-height: .82; }
.home-title em { color: var(--cobalt); font-style: normal; }
.directory-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.sort-pills { display: flex; gap: 5px; padding: 4px; border: 1px solid var(--ink); border-radius: 999px; }
.sort-pills button { min-height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 750; cursor: pointer; }
.sort-pills button.is-active { background: var(--ink); color: var(--paper); }
.share-button { min-height: 43px; padding: 0 16px; border: 1px solid var(--ink); border-radius: 999px; background: var(--signal); color: var(--ink); font-size: 11px; font-weight: 800; cursor: pointer; transition: .2s ease; }
.share-button:hover { transform: translate(-2px,-2px); box-shadow: 4px 4px 0 var(--ink); }
.project-directory { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.project-card { min-width: 0; overflow: hidden; border: 1px solid var(--ink); border-radius: 22px; background: rgba(255,254,249,.62); box-shadow: 0 13px 34px rgba(16,20,15,.06); content-visibility: auto; contain-intrinsic-size: 360px; }
.project-card-main { width: 100%; min-height: 250px; display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto 1fr auto auto; gap: 8px 14px; padding: 22px; border: 0; background: transparent; color: inherit; cursor: pointer; text-align: left; }
.project-card-main:hover { background: var(--signal); }
.project-rank, .project-chain { color: var(--muted); font: 750 10px/1 "DIN Alternate", sans-serif; letter-spacing: .1em; }
.project-symbol { overflow: hidden; font-size: 17px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.project-chain { justify-self: end; letter-spacing: 0; }
.project-card-main strong { grid-column: 1 / -1; align-self: end; font: 750 clamp(38px,4vw,64px)/.9 "DIN Alternate", "Arial Narrow", sans-serif; letter-spacing: -.06em; }
.project-card-main strong small { margin-left: 7px; color: var(--cobalt); font-size: 14px; letter-spacing: 0; }
.project-pool-label { grid-column: 1 / -1; color: var(--muted); font-size: 10px; }
.project-card-trends { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--ink); }
.project-card-trends > div { padding: 15px 20px; border-right: 1px solid var(--ink); }
.project-card-trends > div:last-child { border-right: 0; }
.project-card-trends span, .project-card-trends b { display: block; }
.project-card-trends span { color: var(--muted); font-size: 9px; }
.project-card-trends b { margin-top: 7px; font: 750 17px/1 "DIN Alternate", sans-serif; }
.up { color: var(--positive) !important; }
.down { color: var(--negative) !important; }
.quick-tools { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.quick-tool { min-height: 210px; display: grid; align-content: space-between; padding: 22px; border: 1px solid var(--ink); border-radius: 20px; background: var(--white); transition: .22s ease; }
.quick-tool:nth-child(2) { background: var(--cobalt); color: var(--paper); }
.quick-tool:nth-child(3) { background: var(--signal); }
.quick-tool:hover { transform: translateY(-6px); box-shadow: 0 7px 0 var(--ink); }
.quick-tool span { color: var(--orange); font: 800 10px/1 "DIN Alternate", sans-serif; }
.quick-tool b { margin-top: 52px; font-family: "Songti SC", serif; font-size: 34px; }
.quick-tool small { margin-top: 10px; color: inherit; opacity: .68; font-size: 11px; line-height: 1.6; }

.project-title > div:last-child { display: grid; justify-items: end; gap: 14px; }
.data-status-bar { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0 0 18px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,254,249,.56); color: var(--muted); font-size: 10px; }
.risk-strip { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 12px; }
.risk-metric { min-height: 138px; padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,254,249,.55); }
.risk-metric span, .risk-metric small { display: block; color: var(--muted); font-size: 9px; line-height: 1.55; }
.risk-metric strong { display: block; margin: 17px 0 9px; font: 750 26px/1 "DIN Alternate", sans-serif; }
.analysis-tabs { position: sticky; top: 76px; z-index: 20; display: flex; gap: 5px; margin: 34px 0 18px; padding: 5px; overflow-x: auto; border: 1px solid var(--ink); border-radius: 16px; background: rgba(242,240,233,.92); backdrop-filter: blur(16px); scrollbar-width: none; }
.analysis-tabs::-webkit-scrollbar, .chart-selector::-webkit-scrollbar { display: none; }
.analysis-tabs button { flex: 1 0 auto; min-height: 43px; padding: 0 18px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 800; cursor: pointer; }
.analysis-tabs button.is-active { background: var(--ink); color: var(--paper); }
.analysis-stage { min-height: 430px; }
.chart-studio { min-height: 570px; padding: 0; overflow: hidden; }
.chart-selector { display: flex; gap: 0; overflow-x: auto; border-bottom: 1px solid var(--line); scroll-snap-type: x proximity; }
.chart-selector button { flex: 0 0 auto; min-height: 58px; padding: 0 18px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 10px; font-weight: 750; cursor: pointer; scroll-snap-align: start; }
.chart-selector button.is-active { background: var(--signal); color: var(--ink); }
.chart-title-row { padding: 22px 22px 0; }
.series-legend { display: flex; flex-wrap: wrap; gap: 9px 18px; padding: 0 22px; color: var(--muted); font-size: 9px; }
.series-legend i { display: inline-block; width: 17px; height: 3px; margin-right: 6px; background: var(--series-color); vertical-align: middle; }
.chart-wrap-large { height: 390px; margin: 8px 18px 18px; }
.analytics-loading { min-height: 430px; display: grid; place-content: center; justify-items: center; text-align: center; }
.analytics-loading span { width: 62px; height: 62px; border: 2px solid var(--line); border-top-color: var(--cobalt); border-radius: 50%; animation: spin .8s linear infinite; }
.analytics-loading b { margin-top: 18px; }
.analytics-loading small { margin-top: 7px; color: var(--muted); }
.ledger-shell { overflow: hidden; border: 1px solid var(--ink); border-radius: 18px; background: rgba(255,254,249,.62); }
.ledger-head, .ledger-row { display: grid; grid-template-columns: 1.1fr 1fr 1fr 1fr .8fr; gap: 14px; align-items: center; }
.ledger-head { padding: 14px 18px; background: var(--ink); color: #afb5a9; font-size: 9px; }
.ledger-row { min-height: 80px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.ledger-row:last-child { border-bottom: 0; }
.ledger-row time { color: var(--muted); font: 700 10px/1 monospace; }
.ledger-row b, .ledger-row small { display: block; }
.ledger-row b { font: 750 13px/1.35 "DIN Alternate", sans-serif; }
.ledger-row small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.ledger-row > span { color: var(--muted); font-size: 10px; }
.term-distribution { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 18px 0; }
.term-distribution article { padding: 19px; border: 1px solid var(--line); border-radius: 15px; background: var(--white); }
.term-distribution span, .term-distribution small { display: block; color: var(--muted); font-size: 9px; }
.term-distribution strong { display: block; margin: 15px 0 8px; font: 750 23px/1 "DIN Alternate", sans-serif; }

.tools-page { max-width: 1320px; }
.tool-tabs { position: static; width: max-content; min-width: 320px; }
.tool-workspace { display: grid; grid-template-columns: minmax(320px,.7fr) minmax(0,1.3fr); min-height: 620px; overflow: hidden; border: 1px solid var(--ink); border-radius: 25px; background: var(--white); box-shadow: var(--shadow); }
.tool-controls { padding: clamp(25px,4vw,48px); border-right: 1px solid var(--ink); background: var(--ink); color: var(--paper); }
.tool-controls h2 { margin: 16px 0 9px; font-family: "Songti SC", serif; font-size: 45px; }
.tool-controls > p { color: #aeb5aa; font-size: 11px; line-height: 1.75; }
.tool-fields { display: grid; gap: 12px; margin-top: 28px; }
.tool-field > span { display: block; margin-bottom: 6px; color: #aeb5aa; font-size: 9px; }
.tool-field > div { display: grid; grid-template-columns: 1fr auto; align-items: center; border: 1px solid #454b40; border-radius: 11px; background: #1a1f18; }
.tool-field input { min-width: 0; height: 48px; padding: 0 13px; border: 0; outline: 0; background: transparent; color: var(--paper); font-size: 16px; }
.tool-field small { padding: 0 13px; color: var(--signal); font-size: 9px; }
.tool-submit { width: 100%; margin-top: 18px; background: var(--signal); color: var(--ink); }
.tool-output { min-width: 0; display: grid; align-content: center; padding: clamp(25px,4vw,54px); }
.result-hero span, .result-hero b { display: block; }
.result-hero span { color: var(--muted); font-size: 10px; }
.result-hero strong { display: block; margin: 17px 0 12px; font: 750 clamp(52px,7vw,90px)/.9 "DIN Alternate", sans-serif; letter-spacing: -.06em; }
.result-hero strong small { color: var(--cobalt); font-size: 18px; letter-spacing: 0; }
.result-hero b { font-size: 13px; }
.result-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 28px; }
.result-grid > div { padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.result-grid span, .result-grid b { display: block; }
.result-grid span { color: var(--muted); font-size: 8px; }
.result-grid b { margin-top: 8px; font: 750 14px/1 "DIN Alternate", sans-serif; }
.calculator-chart { height: 230px; margin-top: 20px; }
.calculator-chart canvas { width: 100%; height: 100%; }
.tool-placeholder { text-align: center; }
.tool-placeholder > span { width: 130px; height: 130px; display: grid; place-items: center; margin: 0 auto 22px; border: 1px solid var(--ink); border-radius: 50%; box-shadow: inset 0 0 0 25px var(--signal); font: 800 34px/1 "DIN Alternate", sans-serif; }
.tool-placeholder h3 { margin: 0; font-family: "Songti SC", serif; font-size: 30px; }
.tool-placeholder p { color: var(--muted); font-size: 11px; }
.scenario-pills { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
.scenario-pills button { min-height: 38px; padding: 0 10px; border: 1px solid #4b5147; border-radius: 999px; background: transparent; color: var(--paper); font-size: 9px; cursor: pointer; }
.allocation-ring { --allocation: 0; width: 230px; height: 230px; display: grid; place-items: center; margin: 34px auto; border-radius: 50%; background: conic-gradient(var(--signal) calc(var(--allocation) * 1%), var(--paper-deep) 0); box-shadow: inset 0 0 0 1px var(--ink); }
.allocation-ring > div { width: 158px; height: 158px; display: grid; place-content: center; border-radius: 50%; background: var(--white); text-align: center; }
.allocation-ring b { font: 800 34px/1 "DIN Alternate", sans-serif; }
.allocation-ring span { margin-top: 8px; color: var(--muted); font-size: 9px; }

.reveal-item { opacity: 0; transform: translateY(18px); transition: opacity .55s ease var(--reveal-delay), transform .55s cubic-bezier(.2,.75,.2,1) var(--reveal-delay); }
.reveal-item.is-revealed { opacity: 1; transform: none; }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 82px 0 24px; }
.section-head h2 { margin: 8px 0 0; font-family: "Songti SC", "STSong", serif; font-size: clamp(30px, 4vw, 54px); letter-spacing: -.045em; }
.section-head p { max-width: 500px; margin: 0; color: var(--muted); line-height: 1.7; font-size: 13px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.metric {
  min-height: 170px;
  padding: 21px;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: rgba(255,254,249,.45);
  transition: .25s ease;
}
.metric:hover { background: var(--white); transform: translateY(-4px); box-shadow: 0 8px 0 var(--ink); }
.metric-top { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; letter-spacing: .08em; }
.metric strong { display: block; margin-top: 34px; font: 700 clamp(26px, 3.2vw, 46px)/1 "DIN Alternate", "Arial Narrow", sans-serif; letter-spacing: -.045em; white-space: nowrap; }
.metric small { display: block; margin-top: 10px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.metric.negative strong { color: var(--negative); }
.metric.positive strong { color: var(--positive); }

.data-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, .45fr); gap: 18px; }
.chart-card, .panel, .query-panel, .price-card, .position-card { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,254,249,.68); box-shadow: var(--shadow); }
.chart-card { min-height: 440px; padding: 22px; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.card-title h3 { margin: 0; font: 700 16px/1.2 "PingFang SC", sans-serif; }
.card-title small { color: var(--muted); font-size: 11px; }
.range-pills { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.range-pills button { padding: 6px 10px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 10px; cursor: pointer; }
.range-pills button.is-active { background: var(--ink); color: var(--paper); }
.chart-wrap { position: relative; height: 330px; }
.chart-wrap canvas { width: 100%; height: 100%; display: block; touch-action: pan-y; }
.chart-tooltip { position: absolute; z-index: 3; top: 8px; min-width: 146px; padding: 10px 12px; border: 1px solid var(--ink); border-radius: 10px; background: rgba(255,254,249,.96); box-shadow: 4px 4px 0 var(--signal); pointer-events: none; transform: translateX(-50%); font-size: 9px; }
.chart-tooltip b, .chart-tooltip span { display: block; }
.chart-tooltip span { margin-top: 4px; color: var(--muted); }
.chart-legend { display: flex; gap: 18px; color: var(--muted); font-size: 10px; }
.legend-swatch { display: inline-block; width: 18px; height: 3px; margin-right: 6px; vertical-align: middle; background: var(--cobalt); }
.legend-swatch.redeem { background: var(--orange); }

.panel { padding: 22px; }
.panel + .panel { margin-top: 18px; }
.contract-stack { list-style: none; padding: 0; margin: 20px 0 0; }
.contract-stack li { padding: 15px 0; border-top: 1px solid var(--line); }
.contract-stack b, .contract-stack small { display: block; }
.contract-stack b { font: 700 12px/1.5 "DIN Alternate", monospace; word-break: break-all; }
.contract-stack small { margin-top: 6px; color: var(--muted); font-size: 10px; }
.status-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 999px; background: rgba(21,123,89,.09); color: var(--positive); font-size: 10px; font-weight: 800; }
.status-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.insight-card { min-height: 440px; }
.insight-list { list-style: none; margin: 8px 0 0; padding: 0; }
.insight-list li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 19px 0; border-top: 1px solid var(--line); }
.insight-list li > span { color: var(--orange); font: 850 11px/1.5 "DIN Alternate", sans-serif; }
.insight-list p { margin: 0; color: #454a42; font-size: 13px; line-height: 1.75; }

.query-panel { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 14px; background: var(--ink); }
.query-panel input { min-width: 0; height: 52px; padding: 0 17px; border: 1px solid #3c4238; border-radius: 13px; outline: none; background: #191e17; color: var(--paper); font: 600 13px/1 monospace; }
.query-panel input:focus { border-color: var(--signal); box-shadow: 0 0 0 3px rgba(217,255,63,.12); }
.query-panel button { min-width: 142px; border: 0; border-radius: 13px; background: var(--signal); font-size: 13px; font-weight: 850; cursor: pointer; }

.page-title { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 42px; }
.page-title h1 { margin: 12px 0 0; font-family: "Songti SC", serif; font-size: clamp(42px, 6vw, 78px); letter-spacing: -.06em; line-height: 1; }
.page-title p { max-width: 480px; margin: 0; color: var(--muted); line-height: 1.8; font-size: 13px; }

.maturity-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-top: 18px; }
.maturity-item { padding: 21px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
.maturity-item span, .maturity-item small { display: block; color: var(--muted); font-size: 10px; }
.maturity-item strong { display: block; margin: 15px 0 7px; font: 700 27px/1 "DIN Alternate", sans-serif; }
.maturity-item:nth-child(3) { border-color: var(--orange); }

.wallet-shell { display: grid; grid-template-columns: 340px minmax(0,1fr); gap: 18px; align-items: start; }
.wallet-sidebar { position: sticky; top: 96px; }
.wallet-sidebar .panel { background: var(--ink); color: var(--paper); }
.wallet-sidebar h2 { margin: 8px 0 12px; font-family: "Songti SC", serif; font-size: 35px; }
.wallet-sidebar p { color: #abb1a5; font-size: 12px; line-height: 1.75; }
.wallet-input { width: 100%; height: 48px; margin-top: 18px; padding: 0 13px; border: 1px solid #444a40; border-radius: 12px; outline: 0; background: #1b2119; color: var(--paper); font: 600 11px/1 monospace; }
.wallet-input:focus { border-color: var(--signal); }
.wallet-sidebar .primary-btn { width: 100%; margin-top: 10px; background: var(--signal); color: var(--ink); }
.wallet-sidebar .secondary-btn { width: 100%; margin-top: 10px; border-color: #60665d; color: var(--paper); }
.privacy-note { margin-top: 18px; padding-top: 15px; border-top: 1px solid #383e35; color: #92998e; font-size: 10px; line-height: 1.65; }

.empty-state { min-height: 470px; display: grid; place-items: center; padding: 30px; border: 1px dashed rgba(16,20,15,.3); border-radius: var(--radius); text-align: center; }
.empty-orbit { width: 120px; height: 120px; display: grid; place-items: center; margin: 0 auto 24px; border: 1px solid var(--ink); border-radius: 50%; font: 800 30px/1 "DIN Alternate", sans-serif; box-shadow: inset 0 0 0 24px var(--signal); }
.empty-state h3 { margin: 0; font-family: "Songti SC", serif; font-size: 30px; }
.empty-state p { max-width: 460px; margin: 12px auto 0; color: var(--muted); font-size: 13px; line-height: 1.75; }

.portfolio-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.portfolio-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.address-display { font: 700 12px/1.5 monospace; word-break: break-all; }
.portfolio-meta { margin-top: 7px; color: var(--muted); font-size: 10px; }
.portfolio-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.asset-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; }
.asset-card { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.asset-card span, .asset-card small { display: block; }
.asset-card span { color: var(--muted); font-size: 10px; }
.asset-card strong { display: block; margin: 16px 0 8px; overflow: hidden; font: 750 23px/1 "DIN Alternate", sans-serif; text-overflow: ellipsis; }
.asset-card small { overflow: hidden; color: var(--muted); font: 650 9px/1.4 monospace; text-overflow: ellipsis; }
.community-strip { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,254,249,.52); }
.community-strip > div { min-width: 0; padding: 16px; border-right: 1px solid var(--line); }
.community-strip > div:last-child { border-right: 0; }
.community-strip span, .community-strip b { display: block; }
.community-strip span { color: var(--muted); font-size: 9px; }
.community-strip b { margin-top: 9px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; }
.section-mini-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 28px 0 12px; }
.section-mini-head h3 { margin: 0; font-family: "Songti SC", serif; font-size: 28px; }
.section-mini-head p { max-width: 640px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.protocol-records { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.protocol-record { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.protocol-record-top { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; }
.protocol-record-top span, .protocol-record-top small { color: var(--muted); font: 750 8px/1 "DIN Alternate", sans-serif; }
.protocol-record-top b { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.protocol-record > strong { display: block; margin-top: 24px; font: 750 24px/1 "DIN Alternate", sans-serif; }
.protocol-record > p { min-height: 46px; margin: 11px 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.protocol-record > a { color: var(--cobalt); font: 750 9px/1 monospace; }
.analysis-only-box { margin-top: 18px; padding: 18px; border: 1px solid var(--ink); border-radius: 15px; background: var(--signal); }
.analysis-only-box b, .analysis-only-box p { display: block; margin: 0; }
.analysis-only-box p { margin-top: 7px; font-size: 10px; line-height: 1.6; }
.empty-state.is-short { min-height: 190px; grid-column: 1 / -1; }
.portfolio-stat { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.portfolio-stat span { display: block; color: var(--muted); font-size: 10px; }
.portfolio-stat strong { display: block; margin-top: 14px; font: 700 24px/1 "DIN Alternate", sans-serif; }
.preview-banner { margin: 14px 0; padding: 13px 15px; border-left: 3px solid var(--orange); background: rgba(239,92,47,.08); color: #7d321c; font-size: 11px; line-height: 1.7; }
.position-list { display: grid; gap: 10px; margin-top: 18px; }
.position-card { display: grid; grid-template-columns: 70px 1.2fr 1fr 1fr auto; align-items: center; gap: 14px; padding: 15px 17px; box-shadow: none; }
.position-index { color: var(--muted); font: 800 11px/1 "DIN Alternate", sans-serif; }
.position-value b, .position-value small { display: block; }
.position-value b { font: 700 14px/1.4 "DIN Alternate", sans-serif; }
.position-value small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.state-pill { width: max-content; padding: 6px 9px; border-radius: 999px; background: var(--paper-deep); font-size: 9px; font-weight: 800; }
.state-pill.matured { background: var(--signal); }
.state-pill.redeemed { color: var(--muted); }

.operation-box { margin-top: 18px; padding: 22px; border: 1px solid var(--ink); border-radius: var(--radius); background: var(--ink); color: var(--paper); }
.operation-box h3 { margin: 0; font-family: "Songti SC", serif; font-size: 27px; }
.operation-box > p { max-width: 740px; color: #aeb5aa; font-size: 11px; line-height: 1.7; }
.operation-form { display: grid; grid-template-columns: 1fr 180px 140px auto; gap: 8px; margin-top: 18px; }
.operation-form input, .operation-form select { min-width: 0; height: 46px; padding: 0 12px; border: 1px solid #444a40; border-radius: 10px; outline: 0; background: #1b2119; color: var(--paper); }
.operation-form button { border: 0; border-radius: 10px; background: var(--signal); font-weight: 800; cursor: pointer; }

.price-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-top: 46px; }
.price-card { position: relative; padding: 25px; box-shadow: none; }
.price-card.featured { transform: translateY(-12px); background: var(--ink); color: var(--paper); box-shadow: 0 15px 0 var(--signal); }
.tier-label { font: 850 11px/1 "DIN Alternate", sans-serif; letter-spacing: .18em; }
.price-card h2 { margin: 18px 0 8px; font-family: "Songti SC", serif; font-size: 34px; }
.price-card > p { min-height: 64px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.price-card.featured > p { color: #aeb5aa; }
.price-value { display: flex; align-items: baseline; gap: 6px; margin: 26px 0; }
.price-value strong { font: 750 45px/1 "DIN Alternate", sans-serif; letter-spacing: -.05em; }
.price-value span { color: var(--muted); font-size: 11px; }
.price-card.featured .price-value span { color: #adb3a8; }
.plan-toggle { display: flex; gap: 5px; margin-bottom: 18px; }
.plan-toggle button { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: inherit; font-size: 9px; cursor: pointer; }
.plan-toggle button.is-active { background: var(--signal); color: var(--ink); border-color: var(--signal); }
.feature-list { min-height: 180px; list-style: none; margin: 0; padding: 0; }
.feature-list li { padding: 10px 0; border-top: 1px solid var(--line); font-size: 11px; }
.price-card.featured .feature-list li { border-color: #343a31; }
.feature-list li::before { content: "↳"; margin-right: 8px; color: var(--orange); font-weight: 900; }
.price-card .primary-btn { width: 100%; margin-top: 18px; }
.price-card.featured .primary-btn { background: var(--signal); color: var(--ink); }
.redeem-strip { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; margin-top: 22px; padding: 15px; border: 1px solid var(--line); border-radius: 16px; }
.redeem-strip strong { font-size: 12px; }
.redeem-strip input { height: 44px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; outline: 0; background: var(--white); text-transform: uppercase; }

.modal-layer { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 18px; }
.modal-layer[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; border: 0; background: rgba(9,12,8,.58); backdrop-filter: blur(8px); }
.modal-card { position: relative; width: min(560px,100%); max-height: min(760px, calc(100vh - 36px)); overflow: auto; padding: 28px; border: 1px solid var(--ink); border-radius: 24px; background: var(--paper); box-shadow: 12px 12px 0 var(--signal); animation: modal-in .25s ease both; }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.modal-close { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: transparent; font-size: 22px; cursor: pointer; }
.modal-kicker { color: var(--orange); font: 800 10px/1 "DIN Alternate", sans-serif; letter-spacing: .16em; }
.modal-card h2 { margin: 15px 40px 9px 0; font-family: "Songti SC", serif; font-size: 36px; letter-spacing: -.04em; }
.modal-copy { color: var(--muted); font-size: 12px; line-height: 1.75; }
.auth-choices { display: grid; gap: 9px; margin-top: 22px; }
.auth-choice { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); cursor: pointer; text-align: left; }
.auth-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--signal); font-weight: 850; }
.auth-choice b, .auth-choice small { display: block; }
.auth-choice small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.auth-choice > span:last-child { color: var(--muted); }
.email-form { display: grid; gap: 10px; margin-top: 20px; }
.email-form input { height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 11px; outline: 0; background: var(--white); }
.email-form input:focus { border-color: var(--cobalt); box-shadow: 0 0 0 3px rgba(33,69,216,.1); }
.email-form button { width: 100%; }
.account-list { display: grid; gap: 8px; margin-top: 20px; }
.account-wallet { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.account-wallet b { display: block; font: 700 10px/1.5 monospace; word-break: break-all; }
.account-wallet small { color: var(--muted); font-size: 9px; }
.admin-code-box { margin-top: 18px; padding: 16px; border: 1px solid var(--ink); border-radius: 15px; background: var(--signal); }
.admin-code-box h3 { margin: 9px 0 12px; font-family: "Songti SC", serif; font-size: 23px; }
.admin-code-form { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 7px; }
.admin-code-form input, .admin-code-form select { min-width: 0; height: 43px; padding: 0 10px; border: 1px solid var(--ink); border-radius: 9px; background: var(--white); }
.admin-code-form input:last-child { grid-column: 1 / -1; }
.admin-code-box .primary-btn { width: 100%; margin-top: 9px; }
.generated-code { margin: 18px 0; padding: 18px 12px; border: 1px dashed var(--ink); border-radius: 12px; background: var(--white); font: 800 18px/1.4 monospace; text-align: center; word-break: break-all; user-select: all; }
.tx-summary { margin: 20px 0; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.tx-row { display: flex; justify-content: space-between; gap: 18px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.tx-row:last-child { border-bottom: 0; }
.tx-row span { color: var(--muted); }
.tx-row b { max-width: 68%; text-align: right; word-break: break-all; }
.risk-box { padding: 14px; border-left: 3px solid var(--orange); background: rgba(239,92,47,.08); color: #76321f; font-size: 11px; line-height: 1.7; }
.modal-actions { display: flex; gap: 9px; margin-top: 20px; }
.modal-actions > * { flex: 1; }

.toast-stack { position: fixed; z-index: 200; right: 20px; bottom: 20px; display: grid; gap: 9px; width: min(380px, calc(100vw - 40px)); }
.toast { padding: 14px 16px; border: 1px solid var(--ink); border-radius: 13px; background: var(--ink); color: var(--paper); box-shadow: 6px 6px 0 var(--signal); font-size: 11px; line-height: 1.6; animation: toast-in .25s ease both; }
.toast.error { box-shadow: 6px 6px 0 var(--orange); }
@keyframes toast-in { from { opacity: 0; transform: translateX(16px); } }
.mobile-nav { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1080px) {
  .site-head { grid-template-columns: 1fr auto; }
  .desktop-nav { display: none; }
  .hero-grid, .data-layout { grid-template-columns: 1fr; }
  .terminal-card { min-height: 260px; }
  .metric-grid { grid-template-columns: repeat(2,1fr); }
  .wallet-shell { grid-template-columns: 1fr; }
  .wallet-sidebar { position: static; }
  .portfolio-grid { grid-template-columns: repeat(2,1fr); }
  .asset-grid { grid-template-columns: repeat(3,1fr); }
  .protocol-records { grid-template-columns: repeat(2,1fr); }
  .position-card { grid-template-columns: 54px 1fr 1fr auto; }
  .position-card .position-value:nth-of-type(3) { display: none; }
  .project-directory { grid-template-columns: repeat(2,1fr); }
  .tool-workspace { grid-template-columns: 1fr; }
  .tool-controls { border-right: 0; border-bottom: 1px solid var(--ink); }
}

@media (max-width: 760px) {
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .site-head { min-height: 64px; padding: 9px 15px; }
  .brand small { display: none; }
  .account-trigger { min-height: 46px; padding: 0 12px; }
  #account-label { max-width: 100px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .page { padding: 28px 15px 60px; }
  .home-title { font-size: clamp(66px,22vw,102px); line-height: .85; }
  .hero-grid { align-items: stretch; }
  .project-switch { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; }
  .project-switch button { min-height: 62px; grid-template-columns: 1fr; gap: 4px; padding: 9px 5px; text-align: center; }
  .project-switch button > span { display: none; }
  .project-switch button > b { font-size: 12px; }
  .project-switch button > small { font-size: 7px; }
  .section-head, .page-title { display: block; }
  .project-title > div:last-child { justify-items: start; }
  .section-head p, .page-title p { margin-top: 14px; }
  .metric-grid { display: flex; margin-inline: -15px; padding: 0 15px 10px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; border: 0; scrollbar-width: none; }
  .metric-grid::-webkit-scrollbar, .price-grid::-webkit-scrollbar, .maturity-grid::-webkit-scrollbar { display: none; }
  .metric { flex: 0 0 78vw; min-height: 145px; padding: 16px; border: 1px solid var(--ink); border-right: 0; scroll-snap-align: start; }
  .metric:last-child { border-right: 1px solid var(--ink); }
  .metric strong { margin-top: 28px; font-size: 25px; }
  .chart-card { min-height: 380px; padding: 15px; }
  .chart-wrap { height: 285px; }
  .range-pills button, .plan-toggle button { min-height: 42px; padding-inline: 13px; }
  .price-grid, .maturity-grid { display: flex; margin-inline: -15px; padding: 14px 15px 18px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; }
  .price-card { flex: 0 0 86vw; scroll-snap-align: center; }
  .maturity-item { flex: 0 0 82vw; scroll-snap-align: start; }
  .price-card.featured { transform: none; }
  .query-panel { grid-template-columns: 1fr; }
  .query-panel button { height: 48px; }
  .query-panel input, .wallet-input, .operation-form input, .operation-form select, .redeem-strip input, .email-form input { font-size: 16px; }
  .admin-code-form { grid-template-columns: 1fr; }
  .admin-code-form input:last-child { grid-column: auto; }
  .admin-code-form input, .admin-code-form select { min-height: 48px; font-size: 16px; }
  .portfolio-grid { grid-template-columns: 1fr 1fr; }
  .asset-grid { display: flex; margin-inline: -15px; padding: 0 15px 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .asset-grid::-webkit-scrollbar { display: none; }
  .asset-card { flex: 0 0 42vw; scroll-snap-align: start; }
  .community-strip { grid-template-columns: 1fr; }
  .community-strip > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .community-strip > div:last-child { border-bottom: 0; }
  .section-mini-head { display: block; }
  .section-mini-head p { margin-top: 9px; }
  .protocol-records { grid-template-columns: 1fr; }
  .portfolio-head { display: grid; }
  .portfolio-actions { justify-content: flex-start; }
  .position-card { grid-template-columns: 40px 1fr auto; gap: 9px; }
  .position-card .position-value:nth-of-type(2), .position-card .position-value:nth-of-type(3) { display: none; }
  .operation-form { grid-template-columns: 1fr 1fr; }
  .operation-form button { min-height: 46px; grid-column: 1 / -1; }
  .redeem-strip { grid-template-columns: 1fr; }
  .modal-layer { align-items: end; padding: 0; }
  .modal-card { width: 100%; max-height: min(86vh, 780px); padding: 24px 20px calc(22px + env(safe-area-inset-bottom)); border-width: 1px 0 0; border-radius: 24px 24px 0 0; box-shadow: 0 -8px 0 var(--signal); }
  .modal-close { width: 44px; height: 44px; top: 12px; right: 12px; }
  .auth-choice { min-height: 72px; }
  .primary-btn, .secondary-btn, .ghost-btn { min-height: 48px; }
  .mobile-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(5,1fr);
    padding: 6px;
    border: 1px solid #31362e;
    border-radius: 18px;
    background: rgba(16,20,15,.94);
    color: var(--paper);
    backdrop-filter: blur(16px);
  }
  .mobile-nav a { min-height: 48px; padding: 7px 3px; border-radius: 12px; text-align: center; font-size: 10px; }
  .mobile-nav a span { display: block; margin-bottom: 4px; color: #91978d; font: 700 8px/1 "DIN Alternate", sans-serif; }
  .mobile-nav a.is-active { background: var(--signal); color: var(--ink); }
  .mobile-nav a.is-active span { color: var(--ink); }
  .directory-toolbar { align-items: stretch; flex-direction: column; }
  .sort-pills { width: 100%; }
  .sort-pills button { flex: 1; padding-inline: 8px; }
  .share-button { min-height: 48px; }
  .project-directory { display: flex; margin-inline: -15px; padding: 0 15px 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .project-directory::-webkit-scrollbar { display: none; }
  .project-card { flex: 0 0 86vw; scroll-snap-align: center; }
  .project-card-main { min-height: 225px; }
  .quick-tools { display: flex; margin-inline: -15px; padding: 0 15px 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .quick-tools::-webkit-scrollbar { display: none; }
  .quick-tool { flex: 0 0 79vw; scroll-snap-align: start; }
  .risk-strip, .term-distribution { display: flex; margin-inline: -15px; padding: 0 15px 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .risk-strip::-webkit-scrollbar, .term-distribution::-webkit-scrollbar { display: none; }
  .risk-metric, .term-distribution article { flex: 0 0 80vw; scroll-snap-align: start; }
  .analysis-tabs { top: 64px; margin-inline: -4px; }
  .chart-studio { min-height: 510px; margin-inline: -7px; }
  .chart-title-row { display: block; padding: 16px 15px 0; }
  .chart-title-row .range-pills { width: max-content; margin-top: 13px; }
  .series-legend { padding-inline: 15px; }
  .chart-wrap-large { height: 320px; margin: 8px 9px 12px; }
  .ledger-shell { margin-inline: -7px; overflow-x: auto; }
  .ledger-head, .ledger-row { min-width: 750px; }
  .tool-tabs { min-width: 0; width: 100%; }
  .tool-workspace { min-height: 0; border-radius: 19px; }
  .tool-controls, .tool-output { padding: 24px 18px; }
  .tool-controls h2 { font-size: 38px; }
  .tool-output { min-height: 440px; }
  .result-grid { grid-template-columns: 1fr; }
  .result-hero strong { font-size: 54px; }
}

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