:root {
  color-scheme: light;
  --paper: #f7f3ec;
  --paper-strong: #fffaf2;
  --ink: #181715;
  --ink-soft: #4c4943;
  --muted: #837b70;
  --line: rgba(33, 30, 25, 0.12);
  --line-strong: rgba(33, 30, 25, 0.22);
  --sage: #51695d;
  --sage-dark: #263f36;
  --gold: #b58b4a;
  --blue: #315c73;
  --green: #177257;
  --red: #ad463f;
  --amber: #a86f22;
  --card: rgba(255, 250, 242, 0.74);
  --shadow: 0 24px 60px rgba(52, 45, 36, 0.13);
  --radius: 22px;
  --radius-sm: 12px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: Inter, "SF Pro Display", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-cn: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Inter, ui-sans-serif, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 250, 242, 0.96), rgba(240, 233, 223, 0.98)),
    var(--paper);
  color: var(--ink);
  font-family: var(--font);
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
}

.home-shell {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(
      180deg,
      rgba(255, 250, 242, calc(0.96 - (var(--home-scroll, 0) * 0.08))),
      rgba(239, 232, 221, 0.96)
    );
  transition: background 420ms ease;
}

.home-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% calc(18% + (var(--home-scroll, 0) * 30%)), rgba(181, 139, 74, 0.16), transparent 32%),
    linear-gradient(135deg, rgba(247, 243, 236, 0.86), rgba(223, 231, 224, 0.62));
  transform: translateY(calc(var(--home-scroll, 0) * -18px));
  transition: opacity 420ms ease, filter 420ms ease;
}

.home-shell[data-home-phase="mid"]::before {
  filter: saturate(1.08);
}

.home-shell[data-home-phase="deep"]::before {
  filter: saturate(0.94) contrast(1.02);
}

.home-ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.72;
}

.home-ambient span {
  position: absolute;
  width: 42vw;
  aspect-ratio: 1;
  border: 1px solid rgba(38, 63, 54, 0.08);
  border-radius: 50%;
  transform: translate3d(0, calc(var(--home-scroll, 0) * -28px), 0);
  animation: ambient-float 14s ease-in-out infinite;
}

.home-ambient span:nth-child(1) {
  left: -12vw;
  top: 18vh;
}

.home-ambient span:nth-child(2) {
  right: -16vw;
  top: 4vh;
  width: 50vw;
  border-color: rgba(181, 139, 74, 0.12);
  animation-delay: 1.6s;
}

.home-ambient span:nth-child(3) {
  left: 28vw;
  bottom: -22vw;
  width: 54vw;
  border-color: rgba(49, 92, 115, 0.08);
  animation-delay: 3.2s;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(16px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
  background: rgba(247, 243, 236, 0.86);
  backdrop-filter: blur(20px);
  transition: padding 260ms ease, background 260ms ease, box-shadow 260ms ease, border-color 260ms ease;
}

.home-shell[data-home-phase="mid"] .topbar,
.home-shell[data-home-phase="deep"] .topbar {
  padding-top: 12px;
  padding-bottom: 12px;
  background: rgba(247, 243, 236, 0.92);
  border-color: rgba(33, 30, 25, 0.16);
  box-shadow: 0 12px 36px rgba(52, 45, 36, 0.06);
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #161513;
  color: #f8f0e3;
  font-weight: 760;
}

.brand-name {
  font-weight: 720;
  line-height: 1;
  white-space: nowrap;
}

.brand-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.page {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 24px clamp(16px, 4vw, 36px) 96px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(320px, 1.04fr);
  gap: 32px;
  align-items: center;
  min-height: calc(100vh - 76px);
}

.home-shell .hero-grid {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 34px;
  min-height: calc(100vh - 76px);
  padding-top: 56px;
  text-align: center;
}

.home-shell .page {
  display: grid;
  justify-items: center;
}

.hero-copy-block {
  min-width: 0;
  overflow: hidden;
  animation: fade-up 720ms ease both;
}

.home-shell .hero-copy-block {
  width: min(820px, calc(100dvw - 28px));
  display: grid;
  justify-items: center;
}

.kicker {
  color: var(--sage);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-title {
  max-width: 680px;
  margin: 18px 0 18px;
  font-family: var(--font-display);
  font-size: 80px;
  line-height: 0.98;
  letter-spacing: 0;
  text-wrap: balance;
}

.animated-slogan {
  position: relative;
  max-width: min(900px, calc(100dvw - 28px));
  margin-bottom: 20px;
}

.animated-slogan::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -14px;
  width: min(360px, 72%);
  height: 1px;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  background: linear-gradient(90deg, transparent, rgba(38, 63, 54, 0.38), transparent);
  animation: line-open 900ms ease 620ms both;
}

.slogan-line {
  display: block;
  opacity: 0;
  transform: translateY(24px);
  animation: slogan-rise 860ms cubic-bezier(0.2, 0.72, 0.2, 1) both;
}

.slogan-line:nth-child(2) {
  animation-delay: 160ms;
}

.hero-copy {
  max-width: 610px;
  margin: 0 0 30px;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.86;
  text-wrap: pretty;
}

.home-lede {
  max-width: 560px;
  font-family: var(--font-cn);
  font-size: 17px;
  line-height: 2;
}

.home-shell .home-lede {
  max-width: min(680px, calc(100dvw - 40px));
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.hero-actions,
.row-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.home-shell .hero-actions {
  justify-content: center;
}

.home-market-tape {
  position: relative;
  width: min(560px, 100%);
  max-width: 100%;
  min-width: 0;
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.68);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.home-market-tape::after {
  content: "";
  position: absolute;
  inset: 1px auto 1px 0;
  width: 38%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 250, 242, 0.84), transparent);
  mix-blend-mode: screen;
  transform: translateX(-120%);
  animation: tape-glint 5.8s ease-in-out 1.2s infinite;
}

.home-shell .home-market-tape {
  width: min(560px, calc(100dvw - 28px));
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 18px 46px rgba(52, 45, 36, 0.08);
}

.ticker-track {
  display: flex;
  width: max-content;
  gap: 8px;
  padding: 7px;
  animation: ticker-slide 22s linear infinite;
}

.ticker-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.78);
  color: var(--ink-soft);
  font-size: 13px;
  white-space: nowrap;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.ticker-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(38, 63, 54, 0.2);
  background: rgba(255, 250, 242, 0.94);
}

.ticker-pill strong {
  color: var(--ink);
}

.ticker-pill em {
  font-style: normal;
  font-weight: 740;
}

.button {
  position: relative;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0 18px;
  background: rgba(255, 250, 242, 0.68);
  color: var(--ink);
  text-decoration: none;
  font-weight: 680;
  overflow: hidden;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 22%, rgba(255, 255, 255, 0.22), transparent 58%);
  transform: translateX(-120%);
  transition: transform 620ms ease;
}

.button:hover {
  transform: translateY(-1px);
  border-color: rgba(38, 63, 54, 0.44);
  background: rgba(255, 250, 242, 0.96);
}

.button:hover::after {
  transform: translateX(120%);
}

.button.primary {
  border-color: #17231f;
  background: #17231f;
  color: #fff8eb;
}

.button.subtle {
  border-color: transparent;
  background: transparent;
  color: var(--ink-soft);
}

.button.danger {
  border-color: rgba(173, 70, 63, 0.3);
  color: var(--red);
}

.button.full {
  width: 100%;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.54;
  transform: none;
}

.mini-button {
  min-height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(255, 250, 242, 0.72);
  color: var(--ink);
  font-size: 12px;
  font-weight: 740;
}

.visual-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 250, 242, 0.72);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.institution-panel {
  position: relative;
  min-width: 0;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px;
  background:
    radial-gradient(circle at 55% 20%, rgba(181, 139, 74, 0.18), transparent 34%),
    linear-gradient(145deg, rgba(255, 250, 242, 0.9), rgba(236, 227, 214, 0.78));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.institution-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(255, 250, 242, 0.34), transparent);
  opacity: 0;
  transform: translateX(-55%);
  animation: panel-glow-pass 6.8s ease-in-out 1.8s infinite;
}

.home-shell .institution-panel {
  width: min(820px, calc(100dvw - 28px));
  min-height: 390px;
  align-items: center;
  justify-content: center;
  margin: 6px auto 28px;
  text-align: center;
  transform: translateY(calc(var(--home-scroll, 0) * -18px));
}

.institution-panel h2 {
  max-width: 420px;
  margin: 0;
  font-family: var(--font-cn);
  font-size: 52px;
  line-height: 1.08;
  text-wrap: balance;
}

.home-shell .institution-panel h2,
.home-shell .institution-panel p {
  margin-left: auto;
  margin-right: auto;
}

.institution-panel p {
  max-width: 440px;
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.95;
  overflow-wrap: break-word;
}

.institution-copy {
  font-family: var(--font-cn);
  font-size: 15px;
}

.institution-orbit {
  position: absolute;
  inset: 26px;
  opacity: 0.68;
  pointer-events: none;
}

.institution-orbit span {
  position: absolute;
  inset: 8%;
  border: 1px solid rgba(38, 63, 54, 0.16);
  border-radius: 50%;
  animation: orbit-breathe 6s ease-in-out infinite;
}

.institution-orbit span:nth-child(2) {
  inset: 20%;
  animation-delay: 800ms;
}

.institution-orbit span:nth-child(3) {
  inset: 33%;
  border-color: rgba(181, 139, 74, 0.22);
  animation-delay: 1.6s;
}

.institution-points {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.home-shell .institution-points {
  width: min(560px, 100%);
}

.institution-points div {
  position: relative;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 250, 242, 0.58);
  animation: point-rise 700ms ease both;
}

.institution-points div:nth-child(1) {
  animation-delay: 420ms;
}

.institution-points div:nth-child(2) {
  animation-delay: 520ms;
}

.institution-points div:nth-child(3) {
  animation-delay: 620ms;
}

.institution-points div:nth-child(4) {
  animation-delay: 720ms;
}

.institution-points strong,
.institution-points span {
  display: block;
}

.institution-points strong {
  font-size: 14px;
}

.institution-points span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.brand-rail {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.animated-panel {
  transform-origin: center;
  animation: panel-enter 820ms ease 130ms both, panel-drift 7s ease-in-out 1.1s infinite;
}

.visual-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px;
  border-bottom: 1px solid var(--line);
}

.process-rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border-bottom: 1px solid var(--line);
  background: var(--line);
}

.process-rail span {
  position: relative;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(255, 250, 242, 0.72);
  color: var(--muted);
  font-size: 11px;
  font-weight: 740;
  text-transform: uppercase;
}

.process-rail span::after {
  content: "";
  position: absolute;
  inset: 0;
  translate: -120% 0;
  background: linear-gradient(90deg, transparent, rgba(181, 139, 74, 0.18), transparent);
  animation: rail-sheen 3.6s ease-in-out infinite;
}

.process-rail span:nth-child(2)::after {
  animation-delay: 600ms;
}

.process-rail span:nth-child(3)::after {
  animation-delay: 1.2s;
}

.visual-title {
  margin: 0;
  font-size: 15px;
  font-weight: 740;
}

.visual-date {
  color: var(--muted);
  font-size: 13px;
}

.live-total {
  padding: 28px 22px 10px;
}

.label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.giant-number {
  margin-top: 8px;
  font-size: 58px;
  font-weight: 780;
  line-height: 1;
}

.delta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-weight: 720;
}

.positive {
  color: var(--green);
}

.negative {
  color: var(--red);
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border-top: 1px solid var(--line);
  background: var(--line);
}

.metric {
  padding: 18px;
  background: rgba(255, 250, 242, 0.76);
}

.home-section {
  width: min(1180px, calc(100dvw - 28px));
  margin: 0 auto;
  padding: 42px clamp(16px, 4vw, 36px) 104px;
  text-align: center;
}

.section-heading {
  max-width: 690px;
  margin: 0 auto;
}

.section-heading h2 {
  margin: 10px 0 12px;
  font-family: var(--font-cn);
  font-size: 42px;
  line-height: 1.14;
  text-wrap: balance;
}

.section-heading p {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--font-cn);
  font-size: 16px;
  line-height: 1.95;
  text-wrap: pretty;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.home-shell .feature-grid {
  width: min(1180px, calc(100dvw - 28px));
  margin-left: auto;
  margin-right: auto;
  justify-items: stretch;
}

.feature-grid article {
  min-height: 172px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 250, 242, 0.66);
  box-shadow: 0 14px 34px rgba(52, 45, 36, 0.07);
}

.home-shell .feature-grid article {
  position: relative;
  overflow: hidden;
  align-items: center;
  text-align: center;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

.home-shell .feature-grid article::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(181, 139, 74, 0.16), transparent 36%, rgba(81, 105, 93, 0.1));
  opacity: 0;
  transition: opacity 260ms ease;
}

.home-shell .feature-grid article:hover {
  transform: translateY(-6px);
  border-color: rgba(38, 63, 54, 0.24);
  background: rgba(255, 250, 242, 0.84);
  box-shadow: 0 22px 54px rgba(52, 45, 36, 0.11);
}

.home-shell .feature-grid article:hover::before {
  opacity: 1;
}

.scroll-reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  filter: blur(8px);
  transition: opacity 760ms ease var(--reveal-delay, 0ms), transform 760ms ease var(--reveal-delay, 0ms), filter 760ms ease var(--reveal-delay, 0ms);
}

.scroll-reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.feature-grid em {
  color: var(--gold);
  font-size: 12px;
  font-style: normal;
  font-weight: 780;
}

.feature-grid strong {
  display: block;
  margin-top: auto;
  font-family: var(--font-cn);
  font-size: 16px;
}

.feature-grid span {
  color: var(--muted);
  font-family: var(--font-cn);
  font-size: 13px;
  line-height: 1.78;
  text-wrap: pretty;
}

.metric-value {
  margin-top: 8px;
  font-size: 20px;
  font-weight: 740;
}

.chart-wrap {
  padding: 10px 18px 20px;
}

canvas {
  display: block;
  width: 100%;
}

.chart-box {
  width: 100%;
  height: 236px;
  overflow: hidden;
}

.chart-canvas {
  width: 100%;
  height: 100%;
}

.login-layout {
  width: min(980px, 100%);
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 28px;
  align-items: center;
  margin: 0 auto;
  padding: 24px clamp(16px, 4vw, 36px) 88px;
}

.login-note,
.login-card {
  min-width: 0;
}

.login-note .hero-title {
  max-width: 520px;
  font-size: 58px;
  line-height: 1.05;
}

.login-note .hero-copy {
  max-width: 500px;
  font-family: var(--font-cn);
}

.daily-kicker {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.daily-kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(181, 139, 74, 0.32);
  animation: note-pulse 2.8s ease-in-out infinite;
}

.daily-note-title {
  position: relative;
  overflow: visible;
}

.daily-note-title span {
  display: inline-block;
  opacity: 0;
  transform: translateY(-18px);
  filter: blur(7px);
  animation: note-letter-drop 760ms cubic-bezier(0.18, 0.82, 0.22, 1) forwards;
  animation-delay: calc(120ms + (var(--char-index) * 34ms));
}

.daily-note-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -16px;
  width: min(260px, 72%);
  height: 1px;
  background: linear-gradient(90deg, rgba(181, 139, 74, 0.55), transparent);
  transform: scaleX(0);
  transform-origin: left;
  animation: note-line-open 860ms ease 760ms both;
}

.daily-note-copy {
  opacity: 0;
  transform: translateY(12px);
  animation: note-copy-rise 900ms ease 980ms both;
}

.login-card,
.panel,
.stat-card,
.pool-card,
.table-card,
.form-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 18px 42px rgba(52, 45, 36, 0.09);
}

.login-card {
  padding: 26px;
}

.login-card h1,
.section-title {
  margin: 0;
  font-size: 26px;
  line-height: 1.14;
}

.login-card p,
.section-note {
  color: var(--muted);
  line-height: 1.7;
}

.field {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.field label {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.input,
.select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  padding: 0 13px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  outline: none;
}

.input:focus,
.select:focus {
  border-color: rgba(38, 63, 54, 0.58);
  box-shadow: 0 0 0 4px rgba(81, 105, 93, 0.12);
}

.demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.message {
  min-height: 22px;
  margin-top: 12px;
  color: var(--red);
  font-size: 13px;
}

.dashboard {
  width: min(1080px, 100%);
}

.mobile-frame {
  width: min(440px, 100%);
  margin: 0 auto;
}

.account-hero {
  margin-top: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 250, 242, 0.94), rgba(235, 226, 213, 0.9));
  box-shadow: var(--shadow);
}

.account-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.account-name {
  margin-top: 18px;
  color: var(--ink-soft);
  font-weight: 700;
}

.account-value {
  margin-top: 10px;
  font-size: 58px;
  font-weight: 780;
  line-height: 1;
}

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

.quick-card {
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 250, 242, 0.72);
}

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

.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.6);
}

.segmented button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 720;
}

.segmented button.active {
  background: #1a1a17;
  color: #fff8eb;
}

.panel {
  margin-top: 14px;
  padding: 18px;
}

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

.panel-title {
  margin: 0;
  font-size: 17px;
}

.position-list,
.record-list {
  display: grid;
  gap: 10px;
}

.market-list {
  display: grid;
  gap: 10px;
}

.market-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 250, 242, 0.52);
}

.market-price {
  text-align: right;
}

.account-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.summary-cell {
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 250, 242, 0.52);
}

.position-row,
.record-row {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 250, 242, 0.52);
}

.record-row {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.row-main {
  font-weight: 740;
}

.row-sub {
  color: var(--muted);
  font-size: 13px;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 14px;
  z-index: 30;
  width: min(440px, calc(100vw - 28px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.88);
  box-shadow: 0 16px 40px rgba(52, 45, 36, 0.16);
  backdrop-filter: blur(20px);
}

.bottom-nav button {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 740;
}

.bottom-nav button.active {
  background: #181715;
  color: #fff8eb;
}

.admin-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 18px;
  width: min(1220px, 100%);
}

.side-nav {
  position: sticky;
  top: 88px;
  align-self: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 242, 0.62);
}

.side-nav button {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  border: 0;
  border-radius: 14px;
  padding: 0 14px;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 730;
  text-align: left;
}

.side-nav button.active {
  background: #181715;
  color: #fff8eb;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.stat-card {
  padding: 18px;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
}

.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 14px;
  margin-top: 14px;
}

.form-card,
.table-card {
  padding: 18px;
}

.preview-box {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(181, 139, 74, 0.3);
  border-radius: 18px;
  background: rgba(181, 139, 74, 0.08);
}

.notice-box {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(81, 105, 93, 0.2);
  border-radius: 14px;
  background: rgba(81, 105, 93, 0.08);
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.impact-grid div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 250, 242, 0.5);
}

.impact-grid strong,
.impact-grid span {
  display: block;
}

.impact-grid span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th,
.data-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.data-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.data-table td:last-child,
.data-table th:last-child {
  text-align: right;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(81, 105, 93, 0.12);
  color: var(--sage-dark);
  font-size: 12px;
  font-weight: 760;
}

.empty {
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.hide {
  display: none !important;
}

@media (max-width: 860px) {
  .hero-grid,
  .login-layout,
  .admin-layout,
  .work-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-grid {
    min-height: auto;
    padding-top: 24px;
  }

  .home-shell .hero-grid {
    min-height: auto;
    text-align: center;
  }

  .hero-title {
    font-size: 64px;
  }

  .login-note .hero-title {
    font-size: 48px;
  }

  .visual-panel {
    margin-bottom: 22px;
  }

  .institution-panel {
    min-height: 440px;
  }

  .home-shell .institution-panel {
    width: min(720px, 100%);
  }

  .institution-panel h2 {
    font-size: 42px;
  }

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

  .side-nav {
    position: static;
    display: grid;
    grid-auto-flow: column;
    overflow-x: auto;
  }

  .side-nav button {
    white-space: nowrap;
  }

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

  .data-table {
    min-width: 680px;
  }

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

@media (prefers-reduced-motion: reduce) {
  .animated-panel,
  .ticker-track,
  .institution-orbit span,
  .home-ambient span,
  .slogan-line,
  .daily-note-title span,
  .daily-kicker::before,
  .daily-note-copy,
  .daily-note-title::after,
  .home-market-tape::after,
  .institution-panel::after,
  .institution-points div,
  .animated-slogan::after,
  .process-rail span::after {
    animation: none !important;
  }

  .scroll-reveal,
  .slogan-line,
  .daily-note-title span,
  .daily-note-copy {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }

  .daily-note-title::after {
    transform: scaleX(1);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slogan-rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes line-open {
  from {
    transform: translateX(-50%) scaleX(0);
  }

  to {
    transform: translateX(-50%) scaleX(1);
  }
}

@keyframes ambient-float {
  0%,
  100% {
    translate: 0 0;
  }

  50% {
    translate: 0 -18px;
  }
}

@keyframes panel-enter {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes panel-drift {
  0%,
  100% {
    translate: 0 0;
  }

  50% {
    translate: 0 -8px;
  }
}

@keyframes ticker-slide {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@keyframes rail-sheen {
  0%,
  38% {
    translate: -120% 0;
  }

  68%,
  100% {
    translate: 120% 0;
  }
}

@keyframes tape-glint {
  0%,
  54% {
    transform: translateX(-120%);
    opacity: 0;
  }

  62% {
    opacity: 0.78;
  }

  78%,
  100% {
    transform: translateX(260%);
    opacity: 0;
  }
}

@keyframes panel-glow-pass {
  0%,
  62% {
    opacity: 0;
    transform: translateX(-55%);
  }

  72% {
    opacity: 0.72;
  }

  88%,
  100% {
    opacity: 0;
    transform: translateX(55%);
  }
}

@keyframes point-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes note-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(181, 139, 74, 0.32);
    opacity: 0.78;
  }

  50% {
    box-shadow: 0 0 0 8px rgba(181, 139, 74, 0);
    opacity: 1;
  }
}

@keyframes note-letter-drop {
  0% {
    opacity: 0;
    transform: translateY(-18px);
    filter: blur(7px);
  }

  62% {
    opacity: 1;
    transform: translateY(3px);
    filter: blur(0);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes note-line-open {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

@keyframes note-copy-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes orbit-breathe {
  0%,
  100% {
    transform: scale(0.95);
    opacity: 0.34;
  }

  50% {
    transform: scale(1.04);
    opacity: 0.8;
  }
}

@media (max-width: 560px) {
  html,
  body,
  #app,
  .app-shell,
  .home-shell {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .home-shell {
    background:
      linear-gradient(180deg, rgba(255, 250, 242, 0.98), rgba(239, 232, 221, 0.96)),
      var(--paper);
    transition: none;
  }

  .home-shell::before {
    position: absolute;
    min-height: 100dvh;
    background:
      radial-gradient(circle at 50% 18%, rgba(181, 139, 74, 0.12), transparent 34%),
      linear-gradient(135deg, rgba(247, 243, 236, 0.9), rgba(223, 231, 224, 0.58));
    transform: none;
    transition: none;
    will-change: auto;
  }

  .home-shell[data-home-phase="mid"]::before,
  .home-shell[data-home-phase="deep"]::before {
    filter: none;
  }

  .home-ambient {
    position: absolute;
    opacity: 0.46;
  }

  .home-ambient span {
    transform: none;
    animation-duration: 18s;
    will-change: transform;
  }

  .scroll-reveal {
    transform: translateY(18px);
    filter: none;
    transition: opacity 540ms ease var(--reveal-delay, 0ms), transform 540ms ease var(--reveal-delay, 0ms);
  }

  .scroll-reveal.is-visible {
    transform: translateY(0);
  }

  .topbar {
    padding: 12px 14px;
  }

  .brand-subtitle {
    max-width: 170px;
  }

  .page {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero-title {
    font-size: 46px;
    line-height: 1.04;
  }

  .home-shell .hero-grid {
    width: min(100%, calc(100dvw - 28px));
    padding-top: 30px;
    gap: 26px;
    justify-items: center;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
  }

  .home-shell .hero-copy-block {
    width: min(100%, 362px, calc(100dvw - 28px));
    margin-left: auto;
    margin-right: auto;
    justify-items: center;
  }

  .hero-copy {
    font-size: 16px;
    line-height: 1.86;
  }

  .home-shell .hero-title {
    width: min(100%, 330px, calc(100dvw - 28px));
    max-width: min(100%, 330px, calc(100dvw - 28px));
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }

  .home-lede {
    font-size: 15px;
    max-width: 330px;
  }

  .home-shell .home-lede {
    width: min(100%, 330px, calc(100dvw - 28px));
    max-width: min(100%, 330px, calc(100dvw - 28px));
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }

  .animated-slogan::after {
    width: 230px;
  }

  .home-market-tape {
    width: min(100%, 330px, calc(100dvw - 28px));
    margin-left: auto;
    margin-right: auto;
  }

  .metric-strip,
  .preview-grid,
  .impact-grid,
  .institution-points,
  .feature-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .institution-panel {
    width: min(100%, 362px, calc(100dvw - 28px));
    min-height: 440px;
    padding: 22px;
  }

  .home-shell .institution-panel {
    width: min(100%, 362px, calc(100dvw - 28px));
    margin-left: auto;
    margin-right: auto;
    transform: none;
  }

  .brand-rail {
    width: 100%;
  }

  .institution-panel h2 {
    max-width: 310px;
    font-size: 34px;
  }

  .home-shell .institution-panel h2 {
    max-width: 310px;
  }

  .institution-panel p,
  .section-heading p,
  .feature-grid span {
    max-width: 330px;
  }

  .home-shell .institution-panel p {
    max-width: 310px;
  }

  .section-heading h2 {
    max-width: 330px;
    font-size: 32px;
  }

  .home-section {
    display: grid;
    justify-items: center;
    padding-left: 14px;
    padding-right: 14px;
  }

  .home-shell .feature-grid {
    width: min(100%, 362px, calc(100dvw - 28px));
    margin-left: auto;
    margin-right: auto;
  }

  .login-note .hero-title {
    font-size: 38px;
  }

  .login-note .hero-copy {
    max-width: 330px;
  }

  .login-card {
    width: min(362px, calc(100vw - 28px));
    padding: 22px;
  }

  .account-value {
    font-size: 48px;
  }

  .nav-actions .button.subtle {
    display: none;
  }

  .login-layout {
    padding-left: 14px;
    padding-right: 14px;
  }
}
