:root {
  --bg: #0b1622;
  --panel: #122334;
  --panel2: #16283d;
  --line: #22364a;
  --text: #e8eef5;
  --muted: #9db4c8;
  --gain: #3fb96f;
  --loss: #e5534b;
  --pill: #22364a;
  --pill-active: #2e6b4f;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  overflow-x: hidden;
}

/* header chrome comes from the shared .aco-shell-header block below */
.account-line { color: var(--muted); font-size: 14px; margin-top: 10px; }

main {
  max-width: 880px;
  margin: 0 auto;
  padding: 14px 12px 8px;
}

.summary-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 26px;
}
.stat-label { color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; }
.stat-value { font-size: 21px; font-weight: 700; color: #fff; margin-top: 2px; }
.stat-value .gain { color: var(--gain); }
.as-of { width: 100%; color: var(--muted); font-size: 13px; }

.pill-nav { display: flex; gap: 8px; margin: 16px 0 4px; flex-wrap: wrap; }
.pill {
  display: inline-block;
  background: var(--pill);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.pill.active { background: var(--pill-active); border-color: var(--pill-active); color: #fff; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 14px;
}
.panel h2 { margin: 0 0 10px; font-size: 18px; color: #fff; }
.panel p { margin: 6px 0; }

.gain { color: var(--gain); }
.loss { color: var(--loss); }

/* Holdings table */
.holdings-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.holdings-table th {
  text-align: right; color: var(--muted); font-weight: 600;
  padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.holdings-table th:first-child { text-align: left; }
.holdings-table td {
  text-align: right; padding: 7px 8px; border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.holdings-table td:first-child { text-align: left; font-weight: 700; color: #fff; }
.holdings-table tr:last-child td { border-bottom: none; }
.price-note { color: var(--muted); font-size: 12px; font-weight: 400; }
.row-note { color: var(--muted); font-size: 12.5px; font-weight: 400; white-space: normal; margin-top: 3px; max-width: 340px; }
.rule { color: var(--muted); font-style: italic; border-left: 3px solid var(--pill-active); padding-left: 10px; }
.fineprint { color: var(--muted); font-size: 13px; margin-top: 10px; }

/* Options */
.status-line { font-weight: 600; margin-bottom: 10px; }
.option-card {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 10px;
}
.option-head { font-size: 16.5px; font-weight: 700; color: #fff; }
.option-status { font-weight: 700; margin-top: 2px; }
.option-rows { margin-top: 6px; }
.option-rows div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.option-rows .k { color: var(--muted); }
.option-rows .v { text-align: right; font-variant-numeric: tabular-nums; }

/* Activity */
.activity-list { list-style: none; margin: 0; padding: 0; }
.activity-list li {
  padding: 9px 0; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.activity-list li:last-child { border-bottom: none; }
.activity-date { color: var(--muted); white-space: nowrap; }
.activity-what { flex: 1; min-width: 180px; }

.note-panel p { color: var(--muted); }

#site-footer {
  max-width: 880px;
  margin: 10px auto 0;
  padding: 16px 12px 26px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}
#site-footer a { color: var(--muted); text-decoration: none; }

/* Phone: holdings table becomes cards, nothing scrolls sideways */
@media (max-width: 640px) {
  .holdings-table thead { display: none; }
  .holdings-table, .holdings-table tbody, .holdings-table tr, .holdings-table td { display: block; width: 100%; }
  .holdings-table tr {
    background: var(--panel2);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px 12px;
    margin-bottom: 10px;
  }
  .holdings-table td {
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 3px 0;
    white-space: normal;
    text-align: right;
  }
  .holdings-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 13px;
    text-align: left;
  }
  .holdings-table td:first-child { font-size: 17px; }
  .holdings-table td:first-child::before { content: ""; }
  .stat-value { font-size: 19px; }
}

/* ---------- shared aCo shell: header + footer (identical on every aCo site) ---------- */
.aco-shell-header {
  font-family: Arial, sans-serif;
  background: #04131d;
  border-bottom: 1px solid #22364a;
  padding: 12px 16px 10px;
}
.shell-top { display: flex; align-items: center; gap: 10px; }
.shell-brand {
  display: inline-flex; align-items: center; gap: 7px;
  color: #fff; text-decoration: none;
  font-weight: bold; font-size: 15px;
}
.shell-brand:hover { text-decoration: none; }
.shell-mark { display: block; border-radius: 4px; }
.shell-title { margin: 0; font-size: 22px; font-weight: bold; color: #fff; }
.shell-nav {
  display: flex; gap: 6px; margin-top: 10px;
  flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; max-width: 100%; padding-bottom: 2px;
}
.shell-nav::-webkit-scrollbar { display: none; }
.shell-nav > * { flex: 0 0 auto; }
.shell-pill {
  display: inline-block; background: #22364a; color: #e8eef5;
  border: 1px solid #3a5878; border-radius: 999px; padding: 6px 14px;
  font-size: 13.5px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.shell-pill:hover { background: #2b4761; text-decoration: none; }
.shell-pill.is-active { background: #3a2d5f; border-color: #9a7bd0; color: #fff; }
.aco-shell-footer {
  font-family: Arial, sans-serif;
  border-top: 1px solid #22364a;
  padding: 14px 16px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-align: center; font-size: 13px; color: #9db4c8;
}
.aco-shell-footer .foot-credit { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.aco-shell-footer a { color: #cfe0ee; text-decoration: none; }
.aco-shell-footer a:hover { text-decoration: none; }
.aco-shell-footer img { display: block; }
.foot-sites { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; max-width: 100%; }
.foot-copy { color: #7e97ad; }
