:root {
  --ink: #0b1512;
  --paper: #f3f0e8;
  --card: #fffdf7;
  --green: #147452;
  --mint: #bde7d2;
  --amber: #d39427;
  --red: #b43c35;
  --muted: #6c756f;
  --line: #d9ded8;
  --shadow: 0 20px 60px rgba(9, 35, 26, .10);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background:
  radial-gradient(circle at 86% -10%, rgba(189,231,210,.6), transparent 34rem),
  var(--paper); }
button, input { font: inherit; }
button { cursor: pointer; }
.shell { max-width: 1240px; margin: 0 auto; padding: 0 28px 64px; }
.topbar { height: 88px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(11,21,18,.12); }
.brand-wrap, .top-actions, .status-line, .section-heading, .card-top, .price-row, .stage-row { display: flex; align-items: center; }
.brand-wrap { gap: 12px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: var(--ink); color: white; font-weight: 850; letter-spacing: -.04em; }
.brand { font-family: Georgia, serif; font-size: 21px; font-weight: 700; line-height: 1; }
.eyebrow { font-size: 10px; letter-spacing: .18em; font-weight: 800; color: var(--muted); margin-bottom: 5px; }
.top-actions { gap: 10px; }
.icon-button, .avatar-button, .close-button { border: 0; }
.icon-button, .avatar-button { width: 42px; height: 42px; border-radius: 50%; }
.icon-button { background: rgba(255,255,255,.65); font-size: 25px; }
.avatar-button { background: var(--green); color: white; font-weight: 800; }
.hero { padding: 58px 0 38px; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 40px; }
.status-line { gap: 8px; color: var(--green); text-transform: uppercase; letter-spacing: .12em; font-weight: 800; font-size: 11px; }
.live-dot { width: 8px; height: 8px; background: #2bc47f; border-radius: 50%; box-shadow: 0 0 0 5px rgba(43,196,127,.14); }
.hero h1 { margin: 19px 0 14px; font-family: Georgia, serif; font-size: clamp(46px, 7vw, 82px); letter-spacing: -.055em; line-height: .91; font-weight: 600; }
.hero h1 em { color: var(--green); font-weight: 400; }
.hero p { margin: 0; max-width: 630px; color: var(--muted); font-size: 17px; line-height: 1.55; }
.market-clock { min-width: 180px; padding: 19px; border: 1px solid rgba(11,21,18,.13); border-radius: 18px; background: rgba(255,255,255,.5); }
.market-clock span, .market-clock strong { display: block; }
.market-clock span { color: var(--muted); font-size: 12px; }
.market-clock strong { font-size: 30px; letter-spacing: -.04em; margin: 5px 0 12px; }
.market-clock button { border: 0; background: none; color: var(--green); padding: 0; font-weight: 800; }
.metrics { display: grid; grid-template-columns: repeat(3,1fr); border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.55); overflow: hidden; }
.metrics article { padding: 23px 26px; border-right: 1px solid var(--line); }
.metrics article:last-child { border-right: 0; }
.metrics span, .metrics small { display: block; color: var(--muted); }
.metrics span { font-size: 12px; font-weight: 700; }
.metrics strong { display: block; font-family: Georgia, serif; font-size: 34px; margin: 3px 0 2px; }
.metrics strong.connected { color: var(--green); font-size: 30px; }
.metrics strong.attention { color: var(--amber); }
.metrics small { font-size: 11px; }
.watch-section { padding-top: 56px; }
.section-heading { justify-content: space-between; margin-bottom: 20px; }
.section-heading h2 { margin: 0; font-family: Georgia, serif; font-size: 30px; letter-spacing: -.025em; }
.legend { color: var(--muted); font-size: 11px; display: flex; align-items: center; gap: 7px; }
.legend span { width: 24px; height: 5px; border-radius: 5px; background: linear-gradient(90deg,var(--green),var(--amber)); }
.watch-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.stock-card { border: 1px solid var(--line); border-radius: 19px; background: var(--card); padding: 20px; box-shadow: 0 3px 0 rgba(11,21,18,.02); transition: transform .2s,box-shadow .2s; }
.stock-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card-top { justify-content: space-between; }
.symbol { font-size: 18px; font-weight: 850; letter-spacing: -.02em; }
.rank { color: var(--muted); font-size: 11px; }
.price-row { justify-content: space-between; margin: 18px 0 12px; align-items: end; }
.live-price { font-family: Georgia, serif; font-size: 31px; letter-spacing: -.035em; }
.ten-day { padding: 5px 8px; border-radius: 9px; font-weight: 800; font-size: 12px; background: #e5f3eb; color: var(--green); }
.ten-day.negative { color: var(--red); background: #f7e8e6; }
.progress-track { height: 7px; border-radius: 10px; background: #e6e8e3; overflow: hidden; }
.progress-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--green),#43b483); }
.trigger-copy { margin-top: 7px; display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }
.stage-row { justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 15px; border-top: 1px solid #e8e9e4; }
.stage-pill { font-size: 10px; font-weight: 800; color: #44504a; }
.trade-button { border: 0; border-radius: 10px; background: var(--ink); color: white; padding: 9px 14px; font-size: 11px; font-weight: 800; }
.trade-button:disabled, button:disabled { opacity: .52; cursor: wait; }
.stock-card.triggered { border-color: #e2bd72; background: #fffaf0; }
.stock-card.triggered .progress-fill { background: var(--amber); }
.guardrail { margin-top: 24px; border-radius: 18px; background: #e8ebe5; padding: 20px; display: flex; gap: 14px; color: #48514d; }
.guardrail p { margin: 3px 0 0; font-size: 13px; line-height: 1.5; }
.kite-login { display: inline-block; margin-top: 9px; color: var(--green); font-size: 12px; font-weight: 850; }
.guard-icon { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: white; font-weight: 900; }
dialog { width: min(520px,calc(100% - 24px)); padding: 0; border: 0; border-radius: 24px; background: var(--card); box-shadow: 0 30px 90px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(5,14,11,.58); backdrop-filter: blur(4px); }
.trade-sheet { padding: 25px; }
.sheet-handle { display: none; }
.sheet-head { display: flex; align-items: start; justify-content: space-between; }
.sheet-head h2 { margin: 0; font-family: Georgia,serif; font-size: 36px; }
.close-button { background: #eaebe6; width: 36px; height: 36px; border-radius: 50%; font-size: 22px; }
.ticket-quote { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 22px 0; }
.ticket-quote div { background: #ebece7; border-radius: 14px; padding: 13px; }
.ticket-quote span, .ticket-quote strong { display: block; }
.ticket-quote span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.ticket-quote strong { margin-top: 3px; font-size: 20px; }
.side-switch { background: #e7e8e3; padding: 4px; border-radius: 12px; display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 15px; }
.side-switch button { border: 0; background: transparent; padding: 10px; border-radius: 9px; font-weight: 800; color: var(--muted); }
.side-switch button.selected { background: white; color: var(--green); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.trade-sheet label { display: block; color: var(--muted); font-size: 11px; font-weight: 800; margin-top: 12px; }
.trade-sheet input { display: block; width: 100%; margin-top: 5px; border: 1px solid var(--line); border-radius: 11px; background: white; padding: 12px; color: var(--ink); font-size: 16px; line-height: 1.25; font-weight: 750; }
.risk-note { color: var(--muted); font-size: 11px; line-height: 1.45; margin: 13px 0 17px; }
.preview-order { width: 100%; border: 0; background: var(--green); color: white; border-radius: 13px; padding: 14px; font-weight: 850; }
.order-confirm { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.confirm-summary { background: #eef0ea; border-radius: 11px; padding: 12px; font-size: 12px; font-weight: 750; }
.order-confirm code { display: block; margin-top: 7px; padding: 10px; border-radius: 9px; background: var(--ink); color: white; font-size: 11px; overflow-wrap: anywhere; user-select: all; }
.execute-order { width: 100%; border: 0; margin-top: 13px; background: var(--red); color: white; border-radius: 13px; padding: 14px; font-weight: 850; }
.order-confirm small { display: block; color: var(--muted); margin-top: 8px; line-height: 1.4; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%,30px); opacity: 0; pointer-events: none; background: var(--ink); color: white; padding: 12px 18px; border-radius: 12px; font-size: 13px; transition: .2s; }
.toast.show { transform: translate(-50%,0); opacity: 1; }
.toast.error { background: var(--red); }
.auth-body { display: grid; place-items: center; min-height: 100dvh; padding: max(24px,env(safe-area-inset-top)) max(24px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(24px,env(safe-area-inset-left)); }
.auth-card { width: min(430px,100%); background: var(--card); border: 1px solid var(--line); border-radius: 25px; box-shadow: var(--shadow); padding: 34px; }
.auth-card .brand-mark { margin-bottom: 25px; }
.auth-card h1 { margin: 7px 0 8px; font: 600 42px/.98 Georgia,serif; letter-spacing: -.04em; }
.auth-card > p { color: var(--muted); line-height: 1.5; }
.auth-card label { display: block; margin-top: 14px; font-size: 11px; font-weight: 800; color: var(--muted); }
.auth-card input { display: block; width: 100%; margin-top: 6px; border: 1px solid var(--line); border-radius: 11px; padding: 13px; color: var(--ink); background: white; font-size: 16px; line-height: 1.25; scroll-margin-block: 24px 160px; }
.auth-card form button { width: 100%; margin: 20px 0 14px; border: 0; border-radius: 12px; background: var(--green); color: white; padding: 14px; font-weight: 850; }
.auth-card small { color: var(--muted); }
.form-error { min-height: 18px; color: var(--red); font-size: 12px; font-weight: 750; }
.form-error:empty { display: none; }
@media (max-width: 720px) {
  .shell { padding: 0 16px 38px; }
  .topbar { height: 74px; }
  .hero { padding: 38px 0 28px; grid-template-columns: 1fr; gap: 22px; }
  .hero h1 { font-size: 51px; }
  .hero p { font-size: 14px; }
  .market-clock { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; }
  .market-clock strong { font-size: 21px; margin: 0; }
  .market-clock span { display: none; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metrics article { padding: 18px; }
  .metrics article:nth-child(2) { border-right: 0; }
  .metrics article:last-child { grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .watch-section { padding-top: 40px; }
  .section-heading { align-items: end; }
  .section-heading h2 { font-size: 25px; }
  .legend { display: none; }
  .watch-grid { grid-template-columns: 1fr; }
  .stock-card { padding: 18px; }
  dialog { margin: auto 8px 8px; width: calc(100% - 16px); border-radius: 24px 24px 16px 16px; }
  .sheet-handle { display: block; width: 42px; height: 4px; border-radius: 4px; background: #ccd0ca; margin: -8px auto 16px; }
  .auth-body { place-items: start center; padding: max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left)); }
  .auth-card { margin: auto 0; padding: 28px 22px; border-radius: 21px; }
  .auth-card h1 { font-size: 38px; }
}
@media (max-height: 620px) {
  .auth-body { place-items: start center; }
  .auth-card { margin: 0; }
  .auth-card .brand-mark { margin-bottom: 14px; }
  .auth-card h1 { font-size: 34px; }
  .auth-card > p { margin-bottom: 8px; }
  .auth-card label { margin-top: 10px; }
  .auth-card form button { margin-top: 14px; }
}
@media (max-width: 720px) and (max-height: 500px) {
  .auth-card { padding: 16px 18px; }
  .auth-card .brand-mark, .auth-card .eyebrow, .auth-card > p, .auth-card > small { display: none; }
  .auth-card h1 { margin: 0 0 8px; font-size: 28px; }
  .auth-card label { margin-top: 7px; }
  .auth-card input { margin-top: 4px; padding: 10px 12px; }
  .auth-card form button { margin: 10px 0 0; padding: 12px; }
}
