:root {
  --bg: #efeef3;
  --card: #ffffff;
  --text: #000000;
  --body: #262626;
  --muted: #737373;
  --line: #d9d9d9;
  --line-soft: #ebebeb;
  --soft: #f4f4f5;
  --pill: #e2e1e7;
  --radius: 8px;
  --serif: 'Newsreader', Georgia, Cambria, serif;

  /* Accent palette */
  --accent: #5b4cf0;      --accent-soft: #efedff;
  --plum: #741a66;
  --pink: #e0458a;        --pink-soft: #fdebf3;
  --up: #0a8a55;          --up-soft: #e6f6ee;
  --down: #d23b3b;        --down-soft: #fdecec;
  --amber: #e8720c;       --amber-soft: #fff3e0;
  --blue: #2563eb;        --blue-soft: #eaf1ff;
  --teal: #0e8f8a;        --teal-soft: #e2f6f5;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-weight: 500; font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased;
}
button, input { font-weight: 500; }
a { color: inherit; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px 60px; }
h2 { font-family: var(--serif); font-size: 26px; font-weight: 500; line-height: 1.2; margin: 0; letter-spacing: -0.01em;
  display: inline-flex; align-items: center; gap: 10px; }
h2::before { content: ''; flex: none; width: 13px; height: 13px; background: var(--dot, var(--accent)); }
h3 { font-size: 16px; font-weight: 700; margin: 0; }
.muted { color: var(--muted); font-size: 13px; }
.up { color: var(--up); }
.down { color: var(--down); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Navigation */
.nav { position: sticky; top: 0; z-index: 40; background: var(--bg); padding: 12px 0; }
.nav-in { max-width: 1240px; margin: 0 auto; padding: 0 20px; display: flex; align-items: stretch; gap: 10px; }
.logo { flex: none; display: inline-flex; align-items: center; gap: 9px; background: #000; color: #fff; text-decoration: none;
  border-radius: 999px; padding: 0 18px 0 14px; font-weight: 700; font-size: 15px; line-height: 1; letter-spacing: -0.02em; }
.logo svg { flex: none; display: block; }
.logo span { display: block; }
.pills { display: flex; gap: 2px; background: var(--pill); border-radius: 999px; padding: 4px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.pills::-webkit-scrollbar { display: none; }
.pills a { flex: none; text-decoration: none; font-size: 14px; padding: 6px 13px; border-radius: 999px; color: #000; transition: background .15s; }
.pills a:hover { background: rgba(0,0,0,.07); }
.nav .status { margin-left: auto; }
.status { flex: none; display: inline-flex; align-items: center; gap: 8px; background: var(--card); border-radius: 999px;
  padding: 0 14px; min-height: 40px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #b8bcc4; }
.status.live { background: var(--up-soft); color: #075e3a; }
.status.live .dot { background: var(--up); box-shadow: 0 0 0 4px rgba(10,138,85,.15); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(10,138,85,0); } }

/* Hero */
.hero { display: grid; grid-template-columns: 1fr 340px; gap: 48px; align-items: start; padding: 40px 0 44px; }
.hero h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(42px, 6vw, 76px); line-height: 1; letter-spacing: -0.025em; margin: 0 0 18px; }
.hero h1 em { font-style: italic; color: var(--plum); }
.lead { margin: 0; font-size: 18px; color: var(--body); max-width: 40ch; }
.lead strong { font-weight: 700; color: var(--text); }
.latest { list-style: none; margin: 4px 0 0; padding: 0; }
.latest li { border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 14px; }
.latest li:last-child { margin-bottom: 0; }
.latest .kind { display: block; text-transform: uppercase; font-size: 11.5px; letter-spacing: .04em; color: var(--plum); margin-bottom: 3px; }
.latest .kind.buy { color: var(--up); }
.latest .kind.sell { color: var(--down); }
.latest .txt { font-size: 14px; line-height: 1.4; }
.latest .when { font-size: 12px; color: var(--muted); margin-top: 2px; }
.latest button.txt { all: unset; cursor: pointer; font-size: 14px; line-height: 1.4; }
.latest button.txt:hover { text-decoration: underline; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi .label { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.kpi .label::before { content: ''; width: 9px; height: 9px; background: var(--kpi, var(--line)); flex: none; }
.kpi .value { font-family: var(--serif); font-size: 30px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; margin-top: 6px; }
.kpi .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.kpi.main { background: #000; color: #fff; border-color: #000; --kpi: #fff; }
.kpi.main .label, .kpi.main .sub { color: #a3a3a3; }
.kpi.k-up { --kpi: var(--up); }
.kpi.k-down { --kpi: var(--down); }
.kpi.k-blue { --kpi: var(--blue); }
.kpi.k-amber { --kpi: var(--amber); }
.kpi.k-accent { --kpi: var(--accent); }
.kpi.k-teal { --kpi: var(--teal); }

/* Cards */
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; background: var(--card); }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head .muted { display: block; font-size: 12.5px; margin-top: 2px; }
.grid2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
.grid2 .card { margin-bottom: 16px; }
.c-accent { --dot: var(--accent); }
.c-blue { --dot: var(--blue); }
.c-amber { --dot: var(--amber); }
.c-pink { --dot: var(--pink); }
.c-up { --dot: var(--up); }
.c-teal { --dot: var(--teal); }
.c-plum { --dot: var(--plum); }

.seg { display: inline-flex; background: var(--pill); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: transparent; font: inherit; font-size: 13px; color: #000;
  padding: 5px 14px; border-radius: 999px; cursor: pointer; }
.seg button.on { background: #000; color: #fff; }

.chart-box { position: relative; height: 340px; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 14px; font-size: 13px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; display: inline-block; }

/* Tables */
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
table tr:hover td { background: #fafafa; }
th.r, td.r { text-align: right; }
.sym { font-weight: 700; }
.sub-name { color: var(--muted); font-size: 12px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--soft); color: #404040; }
.tag.buy { background: var(--up-soft); color: var(--up); }
.tag.sell { background: var(--down-soft); color: var(--down); }
.tag.stop { background: var(--amber-soft); color: #b35400; }
.tag.blue { background: var(--blue-soft); color: var(--blue); }
.tag.accent { background: var(--accent-soft); color: var(--accent); }
.bar { height: 4px; background: var(--soft); margin-top: 5px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--blue); }
.empty { color: var(--muted); padding: 18px 0; text-align: center; font-size: 14px; }
.cash { margin-top: 12px; font-size: 13px; color: var(--muted); }
.cash strong { color: var(--text); font-weight: 700; }

/* Costs */
.cost-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.cost-row:last-child { border-bottom: 0; }
.cost-row.total { font-weight: 700; border-bottom: 0; border-top: 1px solid #000; margin-top: 2px; padding-top: 10px; }
.cost-sep { display: flex; align-items: center; gap: 7px; font-size: 11.5px; margin: 18px 0 2px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.cost-sep::before { content: ''; width: 8px; height: 8px; background: var(--sep, var(--muted)); }
.cost-sep:first-child { margin-top: 0; }
.cost-sep.s-amber { --sep: var(--amber); }
.cost-sep.s-accent { --sep: var(--accent); }
.cost-sep.s-teal { --sep: var(--teal); }

/* Journal */
.session { border-top: 1px solid var(--line); padding: 18px 0; }
.session:first-child { border-top: 0; padding-top: 0; }
.session:last-of-type { padding-bottom: 0; }
.session-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.session-date { font-family: var(--serif); font-size: 19px; font-weight: 500; margin-right: 4px; }
.session-meta { display: flex; gap: 12px; color: var(--muted); font-size: 12.5px; flex-wrap: wrap; align-items: center; }
.summary { color: var(--body); font-size: 14.5px; max-width: 900px; }
.summary p { margin: 0 0 6px; }
.summary strong { color: var(--text); font-weight: 700; }
.btn { border: 0; background: #000; color: #fff; font: inherit; font-size: 13px; padding: 7px 13px; border-radius: var(--radius); cursor: pointer; }
.btn:hover { background: #333; }
.more { text-align: center; margin-top: 12px; }
.rejected { margin-top: 14px; }
.rejected summary { cursor: pointer; font-size: 13px; color: var(--muted); }

/* Notes */
.notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.note { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; font-size: 13.5px; color: var(--body); }
.note .meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.note .tag { display: inline-flex; align-items: center; gap: 6px; padding: 0; background: none; color: var(--text); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }
.note .tag::before { content: ''; width: 8px; height: 8px; background: var(--note, #a3a3a3); }
.note.n-thesis { --note: var(--accent); }
.note.n-key_date { --note: var(--amber); }
.note.n-lesson { --note: var(--pink); }
.note.n-watch { --note: var(--teal); }
.note.n-auto { --note: var(--down); }

/* Reasoning drawer */
.drawer { position: fixed; inset: 0; z-index: 50; }
.drawer-back { position: absolute; inset: 0; background: rgba(0,0,0,.35); }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(680px, 100%); background: #fff; overflow-y: auto; padding: 22px; border-left: 1px solid var(--line); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; position: sticky; top: -22px; background: #fff; padding: 6px 0; }
.drawer-head h3 { font-family: var(--serif); font-size: 22px; font-weight: 500; }
.x { border: 0; background: var(--soft); width: 34px; height: 34px; border-radius: 50%; font-size: 20px; cursor: pointer; }
.step { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.step .ico { width: 28px; height: 28px; border-radius: 6px; background: var(--ico-bg, var(--soft)); color: var(--ico, var(--muted)); display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.step .k { font-weight: 700; }
.step .c { color: #404040; white-space: pre-wrap; word-break: break-word; }
.step pre { background: var(--soft); border-radius: 6px; padding: 8px 10px; font-size: 12px; font-weight: 500; overflow-x: auto; margin: 6px 0 0; white-space: pre-wrap; word-break: break-all; max-height: 220px; }
.step.think { --ico: var(--accent); --ico-bg: var(--accent-soft); }
.step.xsearch { --ico: #fff; --ico-bg: #000; }
.step.web { --ico: var(--blue); --ico-bg: var(--blue-soft); }
.step.order { --ico: var(--up); --ico-bg: var(--up-soft); }
.step.done { --ico: var(--pink); --ico-bg: var(--pink-soft); }
.step.err { --ico: var(--down); --ico-bg: var(--down-soft); }

/* How it works + FAQ */
.how { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.how-step { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.how-step h3 { font-family: var(--serif); font-size: 20px; font-weight: 500; margin: 10px 0 4px; }
.how-step p { margin: 0; font-size: 13.5px; color: var(--body); }
.how-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #000; color: #fff; font-size: 13px; font-weight: 700; }
.faq { margin-top: 20px; }
.faq details { border-top: 1px solid var(--line); padding: 13px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 18px; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq p { margin: 8px 0 0; color: var(--body); font-size: 14px; max-width: 900px; }

.foot { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.foot p { max-width: 820px; }

@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; gap: 28px; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .grid2 { grid-template-columns: 1fr; }
  .how { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .nav .status #status-text { display: none; }
  .nav .status { padding: 0 16px; }
}
@media (max-width: 600px) {
  .wrap, .nav-in { padding-left: 16px; padding-right: 16px; }
  .logo span { display: none; }
  .logo { padding: 0 12px; }
  .hero { padding: 24px 0 28px; }
  .lead { font-size: 16px; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpi .value { font-size: 24px; }
  .how { grid-template-columns: 1fr; }
  .chart-box { height: 260px; }
  .card { padding: 16px; }
  h2 { font-size: 22px; }
}
