:root {
  --bg: #f6f9ee;
  --panel: #ffffff;
  --ink: #15331f;
  --muted: #64766a;
  --green: #1f5c38;
  --green-2: #2c7a4b;
  --orange: #f2740d;
  --line: rgba(23, 71, 43, .14);
  --shadow: 0 18px 42px rgba(23, 71, 43, .12);
  --radius: 18px;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(700px 360px at 12% -10%, rgba(242,116,13,.13), transparent 62%),
    radial-gradient(640px 380px at 100% 4%, rgba(44,122,75,.13), transparent 60%),
    var(--bg);
  min-height: 100vh;
}
body.market-body {
  background:
    radial-gradient(720px 400px at 0% -10%, rgba(31,92,56,.18), transparent 64%),
    radial-gradient(660px 360px at 100% 0%, rgba(242,116,13,.12), transparent 62%),
    #f3f7ec;
}
body.insight-body {
  background:
    radial-gradient(720px 400px at 0% -10%, rgba(31,92,56,.15), transparent 64%),
    radial-gradient(660px 360px at 100% 0%, rgba(52,122,116,.13), transparent 62%),
    #f7f9f1;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
.shell { width: min(1120px, 100%); margin: 0 auto; padding: 18px; }
.auth-shell { width: min(1180px, 100%); }
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0 20px;
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 800; }
.brand > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mark {
  width: 34px; height: 34px; border-radius: 11px;
  display: grid; place-items: center;
  color: #fff; background: linear-gradient(135deg, var(--green), var(--orange));
}
.nav-actions { display: flex; flex: 0 0 auto; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 750;
  cursor: pointer;
  min-height: 44px;
  white-space: nowrap;
}
.btn:disabled { opacity: .65; cursor: wait; }
.btn.primary { color: #fff; background: var(--orange); box-shadow: 0 12px 26px rgba(242,116,13,.24); }
.btn.ghost { color: var(--green); background: #fff; border: 1px solid var(--line); }
.btn.dark { color: #fff; background: var(--green); }
.btn.guest { color: #fff; background: var(--green); }
.product-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.session-chip { color: var(--green); background: #fff; border: 1px solid var(--line); }
.section-heading { max-width: 680px; margin: 44px 0 18px; }
.section-heading h2 { margin: 0 0 8px; font-size: clamp(1.7rem, 5vw, 2.6rem); }
.section-heading p { margin: 0; color: var(--muted); line-height: 1.7; }
.app-workspace { scroll-margin-top: 80px; }
.app-workspace[hidden] { display: none; }
.preview-note { padding: 12px 14px; border-left: 3px solid var(--orange); background: #fff8f0; color: var(--muted); }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  padding: 22px 0 16px;
}
.hero > * { min-width: 0; }
.hero h1 { margin: 0; font-size: clamp(2.2rem, 12vw, 4.6rem); line-height: .98; letter-spacing: -.05em; }
.hero p { margin: 12px 0 0; color: var(--muted); font-size: 1rem; max-width: 680px; }
.auth-hero, .market-hero, .insight-hero { align-items: stretch; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-weight: 800; color: var(--orange); }
.auth-stats { margin-top: 18px; }
.grid { display: grid; gap: 14px; }
.grid.two, .grid.three { grid-template-columns: 1fr; }
.panel, .card {
  background: rgba(255,255,255,.88);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel { padding: 18px; }
.card { padding: 16px; }
.card h2, .card h3, .panel h2, .panel h3 { margin: 0 0 8px; line-height: 1.1; }
.card p, .panel p { color: var(--muted); margin: 0 0 14px; }
.field { display: grid; gap: 7px; margin-bottom: 12px; color: var(--muted); font-size: .9rem; font-weight: 650; }
.field input, .field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
  padding: 13px 14px;
  outline: 0;
}
.field input:focus, .field select:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(242,116,13,.12); }
.tiny { color: var(--muted); font-size: .82rem; }
.stat-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat {
  border-radius: 15px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
}
.stat b { display: block; font-size: 1.45rem; color: var(--green); }
.stat span { color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.phone-shot {
  width: min(260px, 100%);
  margin: 0 auto;
  border: 4px solid var(--green);
  border-radius: 30px;
  background: #fff;
  padding: 12px 7px 8px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.phone-shot::before {
  content: "";
  position: absolute;
  top: 8px; left: 50%; transform: translateX(-50%);
  width: 34%; height: 10px; border-radius: 8px; background: var(--green); z-index: 2;
}
.phone-shot img { width: 100%; display: block; border-radius: 19px; }
.list { list-style: none; display: grid; gap: 9px; padding: 0; margin: 0; }
.list li { padding-left: 24px; position: relative; color: var(--muted); }
.list li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--orange); position: absolute; left: 3px; top: .6em; }
.hidden { display: none !important; }
.status-line.error { color: #b42318; }
.tabbar { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.tabbar button { flex: 0 0 auto; }
.expense-list { display: grid; gap: 8px; }
.expense-item { display: flex; justify-content: space-between; gap: 12px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.expense-item small { display: block; color: var(--muted); margin-top: 2px; }
.quiz-option {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 13px 14px;
  cursor: pointer;
  margin-top: 9px;
}
.quiz-option.selected { border-color: var(--orange); background: rgba(242,116,13,.08); }
.meter { height: 10px; border-radius: 999px; overflow: hidden; background: rgba(31,92,56,.12); }
.meter span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--green), var(--orange)); transition: width .35s ease; }
.auth-panel { align-self: start; }
.auth-switch, .order-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(31,92,56,.08);
  margin-bottom: 16px;
}
.auth-switch button, .order-side button {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}
.auth-switch button.active, .order-side button.active {
  background: #fff;
  color: var(--green);
  box-shadow: 0 8px 18px rgba(23,71,43,.1);
}
.service-list { margin-top: 10px; }
.public-card { background: rgba(255,255,255,.7); }
.trade-ticket { min-height: 100%; }
.quote-card {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  margin-bottom: 12px;
}
.quote-card span { color: var(--muted); font-size: .9rem; }
.quote-card strong { color: var(--green); font-size: 1.7rem; }
.quote-card small.up, .market-row small.up { color: #07845c; }
.quote-card small.down, .market-row small.down { color: #c0362c; }
.market-list { display: grid; gap: 8px; }
.market-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
}
.market-row.active { border-color: var(--orange); background: rgba(242,116,13,.08); }
.market-row small { display: block; margin-top: 2px; color: var(--muted); }
.insight-card { background: linear-gradient(180deg, #fff, rgba(255,255,255,.78)); }
.signal-strip {
  display: grid;
  gap: 6px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.signal-strip span { color: var(--muted); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.signal-strip strong { font-size: 1rem; line-height: 1.35; }
.timeline { display: grid; gap: 12px; }
.timeline div { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; }
.timeline span {
  width: 30px; height: 30px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--green); color: #fff; font-weight: 900;
}
.timeline p { margin: 3px 0 0; }
.footer-note { padding: 40px 0 20px; color: var(--muted); font-size: .88rem; text-align: center; }
.access-gate {
  width: min(92vw, 470px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 28px 70px rgba(15, 42, 25, .25);
}
.access-gate::backdrop { background: rgba(12, 32, 20, .62); backdrop-filter: blur(4px); }
.gate-content { padding: 24px; }
.gate-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.gate-head h2 { margin: 0; font-size: 1.55rem; }
.gate-head .icon-btn {
  width: 40px; height: 40px; flex: 0 0 40px; padding: 0;
  border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); cursor: pointer;
}
.gate-copy { margin: 10px 0 20px; color: var(--muted); line-height: 1.6; }
.gate-actions { display: grid; gap: 10px; }
.gate-actions .btn { width: 100%; border-radius: 8px; }
.gate-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gate-status { margin: 14px 0 0; color: var(--muted); font-size: .82rem; }
.gate-status.error { color: #b42318; }
.feature-band { margin-top: 14px; }
.feature-band .card { border-radius: 8px; box-shadow: none; }
@media (min-width: 760px) {
  .shell { padding: 24px; }
  .hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; padding: 42px 0 28px; }
  .grid.two { grid-template-columns: repeat(2, 1fr); }
  .grid.three { grid-template-columns: repeat(3, 1fr); }
  .panel { padding: 24px; }
  .stat-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .topbar { align-items: flex-start; }
  .nav-actions .btn { padding: 10px 12px; min-height: 40px; }
  .hero h1 { font-size: clamp(2rem, 13vw, 3.2rem); }
  .expense-item { align-items: flex-start; }
}
