/* Self Ticker site.
   Terminal restraint, not consumer app: market green for brand and action,
   gold reserved strictly for all-time-high moments, mono for every numeral.
   Palette lifted from the app so the two read as one product. */

:root {
  --bg: #0a0e12;
  --panel: #12181f;
  --panel2: #171f27;
  --ink: #e9f1ec;
  --muted: #94a39b;
  --faint: #5d6b64;
  --accent: #35c77f;
  --accent-soft: rgba(53, 199, 127, 0.13);
  --accent-line: rgba(53, 199, 127, 0.38);
  --hero-grad: #13211a;
  --gold: #d9b26a;
  --up: #4ec58a;
  --down: #e8607a;
  --line: rgba(255, 255, 255, 0.08);
  --chip: rgba(255, 255, 255, 0.06);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f3f6f4;
    --panel: #ffffff;
    --panel2: #eaf1ec;
    --ink: #17211b;
    --muted: #5b6b62;
    --faint: #8a988f;
    --accent: #0f8a4f;
    --accent-soft: rgba(16, 138, 79, 0.10);
    --accent-line: rgba(16, 138, 79, 0.32);
    --hero-grad: #e9f5ec;
    --gold: #9c6f1a;
    --up: #1f9d57;
    --down: #d23b5b;
    --line: rgba(0, 0, 0, 0.10);
    --chip: rgba(0, 0, 0, 0.04);
    --shadow: 0 18px 44px rgba(0, 0, 0, 0.10);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 940px; margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 720px; }

/* Ticker tape, straight off the app's home screen. */
.tape {
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  overflow: hidden;
  white-space: nowrap;
  padding: 7px 0;
}
.tape-inner { display: inline-block; animation: slide 42s linear infinite; }
.tape span {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 1.4px;
  color: var(--faint);
  padding: 0 22px;
}
.tape .up { color: var(--up); }
.tape .dn { color: var(--down); }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

header.site {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  z-index: 10;
}
header.site .wrap { display: flex; align-items: center; gap: 26px; padding-top: 15px; padding-bottom: 15px; }
.brand {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 2.4px;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
header.site nav { margin-left: auto; display: flex; gap: 20px; flex-wrap: wrap; }
header.site nav a { color: var(--muted); text-decoration: none; font-size: 14.5px; }
header.site nav a:hover { color: var(--accent); }

/* Hero */
.hero { padding: 62px 0 22px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2.2px;
  color: var(--accent);
  margin: 0 0 16px;
  font-weight: 700;
}
h1 {
  font-size: clamp(34px, 5.2vw, 52px);
  line-height: 1.08;
  letter-spacing: -1.4px;
  margin: 0 0 18px;
  font-weight: 800;
}
.lede { color: var(--muted); font-size: 19px; margin: 0 0 14px; }
.sub { color: var(--faint); font-size: 15.5px; margin: 0; }

/* The mock hero card, mirroring the app's own share price panel. */
.quote {
  background: linear-gradient(135deg, var(--panel), var(--hero-grad));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.quote .label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 1.8px;
  color: var(--faint);
  margin: 0 0 6px;
}
.price { font-family: var(--mono); font-size: 40px; font-weight: 700; letter-spacing: -1px; line-height: 1; margin: 0; }
.delta { font-family: var(--mono); font-size: 14px; color: var(--up); margin: 8px 0 0; }
.chart { display: block; width: 100%; height: auto; margin-top: 14px; }
.spark { stroke: var(--accent); stroke-width: 2.4; fill: none; stroke-linejoin: round; stroke-linecap: round;
  stroke-dasharray: 720; stroke-dashoffset: 720; animation: draw 1500ms cubic-bezier(.22,.75,.3,1) 250ms forwards; }
.sparkfill { fill: url(#g); opacity: 0; animation: fade 900ms ease 900ms forwards; }
.athdot { fill: var(--gold); opacity: 0; animation: fade 500ms ease 1500ms forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }
.quote-foot { display: flex; gap: 18px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.qf { flex: 1; }
.qf b { display: block; font-family: var(--mono); font-size: 15px; font-weight: 700; }
.qf span { font-size: 11px; color: var(--faint); letter-spacing: 0.4px; }
.gold { color: var(--gold); }

/* Sections */
section { padding: 58px 0; }
section + section { border-top: 1px solid var(--line); }
h2 { font-size: clamp(24px, 3.4vw, 32px); letter-spacing: -0.7px; margin: 0 0 10px; font-weight: 800; }
.section-sub { color: var(--muted); margin: 0 0 30px; font-size: 17px; max-width: 620px; }

/* The parse demo: text in, priced entries out. */
.flow { display: grid; grid-template-columns: 1fr auto 1fr; gap: 22px; align-items: center; }
.typed {
  background: var(--panel);
  border: 1px solid var(--accent-line);
  border-radius: 14px;
  padding: 18px 20px;
  font-family: var(--mono);
  font-size: 15px;
  color: var(--ink);
}
.typed .caret { color: var(--accent); animation: blink 1.15s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.arrow { color: var(--faint); font-size: 22px; text-align: center; }
.entries { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 8px 4px; }
.entry { display: flex; align-items: center; gap: 10px; padding: 9px 14px; }
.entry + .entry { border-top: 1px solid var(--line); }
.tag {
  font-size: 10.5px;
  letter-spacing: 0.6px;
  color: var(--muted);
  background: var(--chip);
  border-radius: 6px;
  padding: 3px 8px;
  white-space: nowrap;
}
.entry .name { flex: 1; font-size: 14.5px; }
.entry .val { font-family: var(--mono); font-size: 14px; font-weight: 700; }
.val.p { color: var(--up); }
.val.n { color: var(--down); }
.daytotal {
  display: flex; justify-content: space-between; align-items: baseline;
  border-top: 1px solid var(--accent-line); margin-top: 4px; padding: 12px 14px 8px;
}
.daytotal span { font-family: var(--mono); font-size: 10.5px; letter-spacing: 1.6px; color: var(--faint); }
.daytotal b { font-family: var(--mono); font-size: 21px; color: var(--up); }

/* Feature cards */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 24px;
}
.card h3 { margin: 0 0 8px; font-size: 17.5px; letter-spacing: -0.2px; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.6; }
.card .num { font-family: var(--mono); color: var(--accent); font-size: 11px; letter-spacing: 1.8px; display: block; margin-bottom: 10px; }

/* Otto, with the app's own speech bubble treatment. */
.otto-row { display: grid; grid-template-columns: 200px 1fr; gap: 30px; align-items: center; }
.otto-row img { width: 100%; max-width: 200px; height: auto; display: block; }
.bubble {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 24px;
}
.bubble:before {
  content: "";
  position: absolute; left: -9px; top: 46px;
  width: 16px; height: 16px;
  background: var(--panel);
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transform: rotate(45deg);
}
.bubble p { margin: 0; color: var(--muted); font-size: 16px; }
.bubble p + p { margin-top: 12px; }
.bubble strong { color: var(--ink); }

.promise { border-left: 3px solid var(--accent); border-radius: 0 16px 16px 0; }

/* Legal document pages */
.doc { padding: 46px 0 30px; }
.doc h1 { font-size: clamp(30px, 4.4vw, 40px); margin-bottom: 8px; }
.dates { color: var(--faint); font-size: 13.5px; font-family: var(--mono); margin: 0 0 6px; letter-spacing: 0.4px; }
.doc-body h2 { font-size: 21px; margin: 40px 0 10px; }
.doc-body h3 { font-size: 16.5px; margin: 30px 0 8px; color: var(--muted); }
.doc-body p, .doc-body li { font-size: 16.5px; }
.doc-body ul { padding-left: 22px; }
.doc-body li { margin-bottom: 8px; }
.doc-body a { color: var(--accent); }
.callout { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 0 14px 14px 0; padding: 18px 22px; margin: 24px 0; }
.callout p:first-child { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }
code { font-family: var(--mono); font-size: 0.9em; color: var(--muted); }
strong { color: var(--ink); }

footer.site { border-top: 1px solid var(--line); padding: 34px 0 56px; margin-top: 40px; color: var(--faint); font-size: 14.5px; }
footer.site a { color: var(--muted); text-decoration: none; }
footer.site a:hover { color: var(--accent); }
footer.site .links { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
footer.site .disclaim { max-width: 640px; line-height: 1.55; }

@media (max-width: 780px) {
  .hero-grid, .flow, .cards, .otto-row { grid-template-columns: 1fr; }
  .hero { padding-top: 40px; }
  .arrow { transform: rotate(90deg); }
  .otto-row img { max-width: 150px; margin: 0 auto; }
  .bubble:before { left: 40px; top: -9px; transform: rotate(135deg); }
  header.site nav { gap: 16px; }
  header.site nav a { font-size: 13.5px; }
  /* The in-page anchors wrap to a second line on a phone and make the sticky
     header eat the screen. Scrolling gets you there anyway. */
  .anchor-link { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .spark { stroke-dashoffset: 0; }
  .sparkfill, .athdot { opacity: 1; }
  html { scroll-behavior: auto; }
}
