:root {
  --ink: #101b2d;
  --ink-soft: #34425a;
  --muted: #627089;
  --line: #dbe2ec;
  --surface: #ffffff;
  --canvas: #f4f7fb;
  --teal: #007f78;
  --teal-dark: #00635e;
  --lime: #c8f36b;
  --gold: #f3b643;
  --red: #b73844;
  --red-soft: #fff0f1;
  --green-soft: #e8f7f0;
  --blue-soft: #e9f1ff;
  --shadow: 0 12px 30px rgba(23, 42, 70, .08);
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; line-height: 1.5; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
a { color: var(--teal-dark); }
.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.site-header { background: var(--ink); color: #fff; border-bottom: 4px solid var(--lime); }
.header-inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wordmark { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--lime); color: var(--ink); font-weight: 900; font-size: 18px; letter-spacing: -2px; }
.wordmark strong { font-size: 18px; letter-spacing: .04em; }
.wordmark span { display: block; color: #b5c0d2; font-size: 11px; text-transform: uppercase; letter-spacing: .13em; }
.header-status { display: flex; align-items: center; gap: 10px; color: #d4dbea; font-size: 14px; text-align: right; }
.status-dot { width: 9px; height: 9px; background: var(--gold); border-radius: 50%; box-shadow: 0 0 0 4px rgba(243, 182, 67, .16); }
.hero { padding: 54px 0 32px; background: var(--surface); border-bottom: 1px solid var(--line); }
.eyebrow { color: var(--teal); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; margin: 0 0 10px; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 750px; margin-bottom: 16px; font-size: clamp(2.3rem, 5vw, 4.3rem); line-height: .98; letter-spacing: -.06em; }
.hero-copy { max-width: 670px; color: var(--ink-soft); font-size: 18px; margin-bottom: 24px; }
.hero-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 24px; color: var(--muted); font-size: 14px; }
.pill, .data-tag { display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; padding: 7px 11px; font-size: 11px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.pill { background: var(--ink); color: var(--lime); }
.data-tag { background: var(--blue-soft); color: #24518e; }
.data-tag.demo { background: #fff4d8; color: #79520a; }
.data-tag.manual { background: #e5f5f1; color: #07675f; }
.data-tag.imported { background: var(--blue-soft); color: #24518e; }
.notice { margin: 24px auto 0; padding: 14px 16px; background: #fff8e7; border: 1px solid #f0d58d; border-left: 4px solid var(--gold); border-radius: 10px; color: #5e4819; font-size: 14px; }
.notice strong { color: #3f3011; }
main { padding: 36px 0 80px; }
.section { margin-top: 42px; }
.section:first-child { margin-top: 0; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.section-heading h2 { margin-bottom: 0; font-size: 25px; letter-spacing: -.035em; }
.section-heading p { margin-bottom: 0; color: var(--muted); font-size: 14px; }
.dataset-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); }
.dataset-left, .dataset-right { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.dataset-left strong { font-size: 15px; }
.dataset-right { color: var(--muted); font-size: 13px; justify-content: flex-end; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.summary-card, .portfolio-card, .tool-panel, .table-wrap, .method-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.summary-card { position: relative; overflow: hidden; padding: 21px; }
.summary-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--accent, var(--teal)); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.investor-name { display: flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 800; }
.avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--ink); color: var(--lime); font-size: 12px; font-weight: 900; }
.rank { color: var(--muted); font-size: 12px; font-weight: 700; }
.big-value { margin: 22px 0 3px; font-size: 31px; line-height: 1; letter-spacing: -.05em; font-weight: 850; }
.change { display: flex; gap: 9px; align-items: baseline; font-weight: 800; font-size: 14px; }
.positive { color: var(--teal-dark); }
.negative { color: var(--red); }
.neutral { color: var(--muted); }
.card-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; padding-top: 15px; border-top: 1px solid var(--line); }
.stat-label { color: var(--muted); display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.stat-value { display: block; margin-top: 2px; font-size: 15px; font-weight: 750; }
.bar-track { height: 7px; margin-top: 19px; border-radius: 99px; background: #edf1f6; overflow: hidden; }
.bar-fill { height: 100%; min-width: 3px; border-radius: inherit; background: var(--accent, var(--teal)); }
.legend { display: flex; gap: 16px; color: var(--muted); font-size: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; background: var(--teal); }
.legend i.loss { background: var(--red); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 15px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; }
thead th { color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; background: #f9fbfd; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcfe; }
tbody th { font-size: 15px; }
.rank-cell { width: 50px; color: var(--muted); font-weight: 800; }
.money-cell { font-variant-numeric: tabular-nums; }
.table-note { color: var(--muted); font-size: 13px; margin: 11px 0 0; }
.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.portfolio-card { overflow: hidden; }
.portfolio-table-wrap { width: 100%; max-width: 100%; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
.portfolio-card-header { padding: 20px 20px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.portfolio-card-header h3 { margin: 0 0 2px; font-size: 19px; }
.portfolio-card-header p { color: var(--muted); margin: 0; font-size: 12px; }
.portfolio-total { text-align: right; }
.portfolio-total strong { display: block; font-size: 21px; letter-spacing: -.04em; }
.portfolio-total span { font-size: 12px; font-weight: 800; }
.portfolio-card table { font-size: 13px; }
.portfolio-card th, .portfolio-card td { padding: 12px 20px; }
.portfolio-card thead th { font-size: 10px; padding-top: 13px; padding-bottom: 7px; }
.position-symbol { font-weight: 850; letter-spacing: .04em; }
.empty-position { color: var(--muted); padding: 18px 20px !important; font-size: 13px; }
.tool-panel { padding: 0; overflow: hidden; }
details > summary { cursor: pointer; list-style: none; padding: 20px 22px; font-weight: 800; font-size: 17px; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "+"; display: inline-grid; place-items: center; width: 23px; height: 23px; margin-right: 10px; border: 1px solid var(--teal); border-radius: 50%; color: var(--teal); font-size: 18px; line-height: 1; }
details[open] > summary::before { content: "−"; }
.tool-content { padding: 0 22px 24px; border-top: 1px solid var(--line); }
.tool-intro { color: var(--muted); font-size: 14px; max-width: 740px; margin: 17px 0; }
.field-label { display: block; color: var(--ink-soft); font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 7px; }
textarea, input[type="number"], input[type="file"] { width: 100%; border: 1px solid #bfcbdc; border-radius: 8px; background: #fff; color: var(--ink); padding: 10px 12px; }
textarea { min-height: 170px; resize: vertical; font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.file-row { display: flex; align-items: end; gap: 12px; margin-top: 13px; }
.file-row > div { flex: 1; }
input[type="file"] { padding: 8px; font-size: 13px; }
.actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
button, .button-link { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; border: 0; border-radius: 8px; padding: 9px 14px; font-size: 13px; font-weight: 800; text-decoration: none; }
.button-primary { background: var(--teal); color: #fff; }
.button-primary:hover { background: var(--teal-dark); }
.button-secondary { background: #e9eef5; color: var(--ink); }
.button-secondary:hover { background: #dbe4ef; }
.button-danger { background: var(--red-soft); color: var(--red); }
.button-danger:hover { background: #ffe1e3; }
.message { min-height: 22px; margin: 12px 0 0; color: var(--teal-dark); font-size: 13px; font-weight: 700; }
.message.error { color: var(--red); }
.divider { height: 1px; background: var(--line); margin: 27px 0; }
.manual-title { margin: 0 0 6px; font-size: 18px; }
.manual-help { color: var(--muted); margin: 0 0 16px; font-size: 13px; }
.manual-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.manual-card { padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe; }
.manual-card h4 { margin: 0 0 14px; font-size: 16px; }
.manual-card textarea { min-height: 105px; margin-top: 5px; font-size: 12px; }
.manual-card input { margin-bottom: 13px; }
.method-card { margin-top: 42px; display: grid; grid-template-columns: 1fr 1fr; gap: 0; overflow: hidden; }
.method-copy, .method-formula { padding: 24px; }
.method-formula { background: var(--ink); color: white; }
.method-card h2 { font-size: 19px; margin-bottom: 9px; }
.method-card p { color: var(--muted); margin-bottom: 0; font-size: 14px; }
.method-formula p { color: #c4cfdf; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; line-height: 2; }
.method-formula strong { color: var(--lime); }
.site-footer { padding: 25px 0 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.footer-inner { display: flex; justify-content: space-between; gap: 15px; }
.footer-inner p { margin: 0; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
@media (max-width: 850px) {
  .summary-grid, .portfolio-grid { grid-template-columns: 1fr; }
  .summary-card { min-height: 0; }
  .manual-grid { grid-template-columns: 1fr; }
  .method-card { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .shell { width: min(100% - 28px, 1180px); }
  .header-inner { min-height: 70px; }
  .header-status { font-size: 12px; }
  .header-status span:last-child { display: none; }
  .hero { padding: 38px 0 25px; }
  h1 { font-size: 2.65rem; }
  .hero-copy { font-size: 16px; }
  main { padding-top: 25px; }
  .section { margin-top: 32px; }
  .section-heading { display: block; }
  .section-heading p { margin-top: 5px; }
  .legend { margin-top: 11px; }
  .dataset-bar { align-items: start; flex-direction: column; }
  .dataset-right { justify-content: start; }
  .file-row { display: block; }
  .file-row button { margin-top: 9px; }
  .footer-inner { display: block; }
  .footer-inner p + p { margin-top: 5px; }
}
