:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #53616d;
  --line: #d6dde3;
  --panel: #ffffff;
  --page: #eef3f6;
  --accent: #116466;
  --gain: #c82333;
  --loss: #0b7a3b;
  --warn: #9a5b00;
  --error: #a32020;
  --accent-strong: #0c6d70;
  --total-bg: #fff3cd;
  --total-border: #ead38a;
  --chart-panel-bg: #fbfcfd;
  --chart-card-bg: #ffffff;
  --chart-border: #d7e0e3;
  --surface-soft: #f8fbfc;
  --danger: #a32020;
  --danger-strong: #821818;
  --danger-soft: #fff7f7;
}

:root[data-theme="ocean"] { --accent: #1d628e; --accent-strong: #155174; --page: #edf5fa; --gain: #c82333; --loss: #087a62; --total-bg: #e5f2fb; --total-border: #b9d8ec; --chart-panel-bg: #f2f8fc; --chart-card-bg: #ffffff; --chart-border: #c7dfed; --surface-soft: #f1f7fb; --danger: #345a78; --danger-strong: #24445d; --danger-soft: #edf4f9; }
:root[data-theme="warm"] { --accent: #a5521b; --accent-strong: #7f3c12; --page: #fff7ed; --gain: #c83324; --loss: #2f7a45; --total-bg: #ffe7c2; --total-border: #edbb82; --chart-panel-bg: #fff9f1; --chart-card-bg: #fffdf9; --chart-border: #efd0aa; --surface-soft: #fff3e4; --danger: #9a4f1b; --danger-strong: #71370f; --danger-soft: #fff0df; }
:root[data-theme="forest"] { --accent: #147a66; --accent-strong: #0d5d4f; --page: #eef6f2; --gain: #c82333; --loss: #087a3f; --total-bg: #e2f3eb; --total-border: #b8ddce; --chart-panel-bg: #f2faf6; --chart-card-bg: #ffffff; --chart-border: #c9e3d8; --surface-soft: #f0f8f4; --danger: #246b58; --danger-strong: #174b3d; --danger-soft: #eaf5f0; }
:root[data-theme="slate"] { --accent: #3b4658; --accent-strong: #2f3746; --page: #eef1f5; --gain: #c82333; --loss: #087a62; --total-bg: #e7ebf0; --total-border: #c7d0da; --chart-panel-bg: #f5f6f8; --chart-card-bg: #ffffff; --chart-border: #d2d7df; --surface-soft: #f2f4f7; --danger: #596574; --danger-strong: #3f4a58; --danger-soft: #eef1f4; }
:root[data-theme="market-red"] { --accent: #a83232; --accent-strong: #852525; --page: #faf1f0; --gain: #c82333; --loss: #087a62; --total-bg: #fde5e5; --total-border: #efbcbc; --chart-panel-bg: #fff6f5; --chart-card-bg: #ffffff; --chart-border: #efcccc; --surface-soft: #fff3f2; --danger: #973838; --danger-strong: #732525; --danger-soft: #fff0f0; }
:root[data-theme="gold"] { --accent: #a87416; --accent-strong: #80550d; --page: #fbf6e9; --gain: #c82333; --loss: #087a62; --total-bg: #fff3cd; --total-border: #ead38a; --chart-panel-bg: #fffaf0; --chart-card-bg: #ffffff; --chart-border: #eedcaf; --surface-soft: #fff9ed; --danger: #8d681d; --danger-strong: #674a13; --danger-soft: #fff7df; }

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  overflow-x: hidden;
}

.shell {
  width: min(1040px, calc(100% - 32px));
  margin: 48px auto;
  display: grid;
  gap: 18px;
}

.lookup,
.quote,
.history,
.messages {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 24px;
}

.lookup {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(360px, 540px);
  align-items: end;
  gap: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  margin-bottom: 0;
}

label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
}

.query-row {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) 120px 132px;
  gap: 10px;
}

input,
button {
  min-height: 48px;
  border-radius: 6px;
  font: inherit;
}

input {
  border: 1px solid var(--line);
  padding: 0 14px;
  text-transform: uppercase;
}

select {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
}

button {
  border: 0;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

button:hover,
button:focus-visible {
  background: var(--accent-strong);
}

input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.delete-button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
}

.delete-button:hover,
.delete-button:focus-visible {
  border-color: var(--danger-strong);
  background: var(--danger-strong);
  color: #ffffff;
}

.quote {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 18px;
}

.market-value {
  display: grid;
  gap: 4px;
  min-width: 180px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.market-value strong {
  font-size: 24px;
}

.quote strong {
  font-size: 32px;
}

.quote span {
  color: var(--gain);
}

.quote small {
  color: var(--muted);
}

.messages p {
  margin-bottom: 0;
}

.warning {
  color: var(--warn);
}

.error {
  color: var(--error);
}

.history {
  display: grid;
  gap: 18px;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

th,
td {
  border-top: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 720px) {
  .shell {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 8px;
    gap: 12px;
    overflow-x: hidden;
  }

  .lookup,
  .quote,
  .history,
  .messages {
    padding: 16px;
    border-radius: 8px;
  }

  h1 {
    font-size: 1.85rem;
  }

  h2 {
    font-size: 1.55rem;
  }

  .lookup,
  .quote {
    grid-template-columns: 1fr;
  }

  .query-row {
    grid-template-columns: 1fr;
  }
}

/* Compact holdings editor: keep the daily portfolio visible on one desktop page. */
.holdings-section .table-wrap {
  overflow-x: auto;
  max-height: min(72vh, 720px);
  overflow-y: auto;
  position: relative;
  width: 100%;
  max-width: 100%;
  overscroll-behavior-x: contain;
}

.holdings-section table {
  min-width: 1080px;
  table-layout: fixed;
}

.holdings-section th,
.holdings-section td {
  padding: 0.55rem 0.45rem;
  white-space: nowrap;
  vertical-align: middle;
  background: var(--panel);
}

.holdings-section thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--surface-soft);
  box-shadow: 0 1px 0 var(--line);
}

.holdings-section th:first-child,
.holdings-section td:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  background: var(--panel);
  box-shadow: 1px 0 0 var(--line);
}

.holdings-section thead th:first-child {
  z-index: 5;
  background: var(--surface-soft);
}

.holdings-section th:nth-child(1),
.holdings-section td:nth-child(1) { width: 6.5%; }
.holdings-section th:nth-child(2),
.holdings-section td:nth-child(2) { width: 10%; }
.holdings-section th:nth-child(3),
.holdings-section td:nth-child(3) { width: 6.5%; }
.holdings-section th:nth-child(4),
.holdings-section td:nth-child(4) { width: 7%; }
.holdings-section th:nth-child(5),
.holdings-section td:nth-child(5) { width: 8.5%; }
.holdings-section th:nth-child(6),
.holdings-section td:nth-child(6) { width: 7%; }
.holdings-section th:nth-child(7),
.holdings-section td:nth-child(7) { width: 7%; }
.holdings-section th:nth-child(8),
.holdings-section td:nth-child(8) { width: 8%; }
.holdings-section th:nth-child(9),
.holdings-section td:nth-child(9) { width: 8%; }
.holdings-section th:nth-child(10),
.holdings-section td:nth-child(10) { width: 9%; }
.holdings-section th:nth-child(11),
.holdings-section td:nth-child(11) { width: 11%; }

.holdings-section input {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  padding: 0.45rem 0.4rem;
}

.holdings-section button {
  padding: 0.42rem 0.55rem;
}

.holding-actions {
  display: flex;
  gap: 0.3rem;
  align-items: center;
}

.holding-actions form {
  margin: 0;
}

.holding-total-row th,
.holding-total-row td {
  background: var(--surface-soft);
  font-weight: 800;
}

.holding-total-row th:first-child {
  background: var(--surface-soft);
  white-space: normal;
  line-height: 1.2;
}

.holdings-section table {
  min-width: 1000px;
}

.holdings-section th:nth-child(1),
.holdings-section td:nth-child(1) { width: 10%; }
.holdings-section th:nth-child(2),
.holdings-section td:nth-child(2) { width: 9%; }
.holdings-section th:nth-child(3),
.holdings-section td:nth-child(3) { width: 9%; }
.holdings-section th:nth-child(4),
.holdings-section td:nth-child(4) { width: 8%; }
.holdings-section th:nth-child(5),
.holdings-section td:nth-child(5) { width: 7%; }
.holdings-section th:nth-child(6),
.holdings-section td:nth-child(6) { width: 7%; }
.holdings-section th:nth-child(7),
.holdings-section td:nth-child(7) { width: 8%; }
.holdings-section th:nth-child(8),
.holdings-section td:nth-child(8) { width: 9%; }
.holdings-section th:nth-child(9),
.holdings-section td:nth-child(9) { width: 14%; }

.holding-name {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.78rem;
}

@media (max-width: 720px) {
  .holdings-section {
    padding: 16px;
  }

  .holdings-section .table-wrap {
    max-height: 68vh;
    border: 1px solid var(--line);
    border-radius: 6px;
  }

  .holdings-section table {
    width: 980px;
    min-width: 980px;
  }

  .holdings-section th,
  .holdings-section td {
    padding: 0.5rem 0.45rem;
    font-size: 1rem;
  }

  .holdings-section th {
    font-size: 0.92rem;
  }

  .holdings-section input {
    min-height: 44px;
    padding: 0 0.45rem;
    font-size: 1rem;
  }

  .holdings-section button {
    min-height: 44px;
    padding: 0 0.65rem;
  }

  .holding-actions {
    gap: 0.25rem;
  }

  .holding-name {
    font-size: 0.82rem;
  }
}

.extra-assets-grid {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(180px, 240px) auto;
  gap: 0.75rem;
  align-items: end;
}

.extra-assets-grid label {
  display: grid;
  gap: 0.3rem;
}

.extra-assets-grid input {
  width: 100%;
  box-sizing: border-box;
}

.loan-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 0.75rem;
}

.loan-summary-grid div {
  display: grid;
  gap: 0.25rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.loan-summary-grid span {
  color: var(--muted);
  font-size: 0.85rem;
}

.loan-summary-grid strong {
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
}

.loan-table-wrap {
  border: 1px solid var(--line);
  border-radius: 6px;
}

.loan-table {
  min-width: 980px;
  table-layout: fixed;
}

.loan-table th,
.loan-table td {
  padding: 0.55rem 0.45rem;
  vertical-align: middle;
}

.loan-table th:nth-child(1),
.loan-table td:nth-child(1) { width: 9%; }
.loan-table th:nth-child(2),
.loan-table td:nth-child(2) { width: 13%; }
.loan-table th:nth-child(3),
.loan-table td:nth-child(3) { width: 11%; }
.loan-table th:nth-child(4),
.loan-table td:nth-child(4) { width: 9%; }
.loan-table th:nth-child(5),
.loan-table td:nth-child(5) { width: 9%; }
.loan-table th:nth-child(6),
.loan-table td:nth-child(6) { width: 9%; text-align: center; }
.loan-table th:nth-child(7),
.loan-table td:nth-child(7) { width: 10%; }
.loan-table th:nth-child(8),
.loan-table td:nth-child(8) { width: 10%; }
.loan-table th:nth-child(9),
.loan-table td:nth-child(9) { width: 20%; }

.loan-table input,
.loan-table select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
}

.loan-check-cell input {
  width: auto;
  min-height: 20px;
}

.loan-total-row th,
.loan-total-row td {
  background: var(--surface-soft);
  font-weight: 800;
}

.loan-total-row th:nth-child(3),
.loan-total-row th:nth-child(7),
.loan-total-row th:nth-child(8) {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 760px) {
  .extra-assets-grid {
    grid-template-columns: 1fr;
  }

  .loan-summary-grid {
    grid-template-columns: 1fr;
  }

  .loan-table {
    min-width: 940px;
  }
}

.asset-summary-list {
  display: grid;
  width: min(100%, 560px);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.asset-summary-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  min-height: 44px;
  padding: 0.65rem 0.85rem;
  background: #ffffff;
  border-top: 1px solid var(--line);
}

.asset-summary-row:first-child {
  border-top: 0;
}

.asset-summary-row span {
  color: var(--muted);
}

.asset-summary-row strong {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.summary-total-row {
  background: var(--total-bg);
  border-color: var(--total-border);
}

.summary-record-form {
  margin-top: 0.75rem;
}

/* Emphasize the totals marked in the mobile layout without changing the grid. */
.holding-total-row th,
.holding-total-row td {
  font-size: 1.08rem;
  font-weight: 900;
}

.asset-summary-row:first-child,
.asset-summary-row:first-child strong,
.summary-total-row,
.summary-total-row strong {
  font-weight: 900;
}

.asset-summary-row:first-child strong,
.summary-total-row strong {
  font-size: 1.15rem;
}

.summary-record-form button {
  min-height: 54px;
  padding-inline: 1.1rem;
  font-size: 1.08rem;
  font-weight: 900;
}

/* Use the asset-summary treatment for every section total. */
.holding-total-row th,
.holding-total-row td,
.loan-total-row th,
.loan-total-row td {
  background: var(--total-bg);
  border-color: var(--total-border);
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 900;
}

.holding-total-row th:first-child,
.loan-total-row th:first-child {
  background: var(--total-bg);
}

.holding-total-row th:nth-child(2),
.holding-total-row th:nth-child(3),
.loan-total-row th:nth-child(3),
.loan-total-row th:nth-child(7),
.loan-total-row th:nth-child(8) {
  font-size: 1.15rem;
}

.daily-close-table-wrap {
  border: 1px solid var(--line);
  border-radius: 6px;
}

.daily-close-table {
  min-width: 560px;
}

.daily-close-table td,
.daily-close-table th {
  font-variant-numeric: tabular-nums;
}

.daily-record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.daily-record-actions button {
  min-height: 40px;
  padding: 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
}

.daily-record-actions button:hover {
  border-color: var(--accent);
  background: var(--accent-strong);
  color: #ffffff;
}

.daily-record-actions button:focus-visible {
  border-color: var(--accent);
  background: var(--accent-strong);
  color: #ffffff;
}

.daily-line-panel {
  min-width: 0;
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--chart-border);
  border-radius: 8px;
  background: var(--chart-panel-bg);
}

.daily-line-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
}

.daily-line-heading h3 {
  margin: 0;
}

.chart-unit {
  color: var(--muted);
  font-size: 0.9rem;
}

.month-select-label {
  display: grid;
  gap: 0.3rem;
  min-width: 220px;
  margin: 0;
}

.month-select-label span {
  color: var(--muted);
  font-size: 0.9rem;
}

.month-select-label select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  padding: 0 0.75rem;
  font: inherit;
}

.daily-line-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(96px, 1fr));
  gap: 0.55rem;
}

.daily-line-summary span {
  display: grid;
  gap: 0.2rem;
  min-height: 3.3rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--chart-border);
  border-radius: 6px;
  background: var(--chart-card-bg);
}

.daily-line-summary small {
  color: var(--muted);
  font-size: 0.78rem;
}

.daily-line-summary strong {
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.historical-extremes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.historical-extreme {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
  min-height: 4.5rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--total-border);
  border-radius: 6px;
}

.historical-extreme span {
  font-size: 0.82rem;
  font-weight: 700;
}

.historical-extreme strong {
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.historical-extreme small {
  font-size: 0.78rem;
}

.historical-high {
  border-color: var(--accent-strong);
  background: var(--accent);
  color: #ffffff;
}

.historical-high small,
.historical-high span {
  color: rgba(255, 255, 255, 0.86);
}

.historical-low {
  background: var(--total-bg);
  color: var(--ink);
}

.historical-low small,
.historical-low span {
  color: var(--muted);
}

#daily-line-chart {
  width: 100%;
  min-width: 720px;
  height: auto;
  overflow: visible;
}

.daily-chart-scroll {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--chart-border);
  border-radius: 6px;
  background: var(--chart-card-bg);
}

.chart-grid,
.chart-stem {
  stroke: var(--chart-border);
  stroke-width: 1;
}

.chart-axis {
  stroke: var(--muted);
  stroke-width: 1.25;
}

.daily-area {
  fill: url("#asset-area-gradient");
  stroke: none;
}

.daily-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.daily-point {
  fill: var(--chart-card-bg);
  stroke: var(--accent);
  stroke-width: 3;
}

.chart-label,
.chart-y-label {
  fill: var(--muted);
  font-size: 14px;
}

.chart-value {
  fill: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

@media (max-width: 760px) {
  .asset-summary-list {
    width: 100%;
  }

  .asset-summary-row {
    min-height: 42px;
    padding: 0.6rem 0.7rem;
  }

  .summary-record-form button {
    width: 100%;
  }

  .daily-close-table {
    min-width: 520px;
  }

  .daily-record-actions {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    -webkit-overflow-scrolling: touch;
  }

  .daily-record-actions button {
    flex: 0 0 auto;
  }

  .daily-line-heading {
    display: grid;
  }

  .month-select-label {
    min-width: 0;
  }

  .daily-line-summary {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .historical-extremes {
    grid-template-columns: 1fr;
  }
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.header-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.header-actions form { margin: 0; }

.theme-picker {
  display: grid;
  gap: 0.2rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.theme-picker select {
  min-height: 36px;
  padding: 0 0.55rem;
  background: var(--panel);
  color: var(--ink);
  font-size: 0.9rem;
}

.backup-button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 0.9rem;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}

.backup-button:hover,
.backup-button:focus { background: var(--accent-strong); }

button.backup-button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

button.backup-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.drive-backup-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  align-items: center;
  margin: -0.35rem 0 1rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--muted);
  font-size: 0.85rem;
}

#google-drive-status-message {
  color: var(--ink);
}

.dashboard-header h1 {
  margin: 0;
}

.sheet-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.sheet-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  background: var(--surface-soft);
}

.sheet-tabs a:hover,
.sheet-tabs a:focus {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.quote-refresh-status {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  font-size: 0.9rem;
}

.quote-refresh-status strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.market-up {
  color: var(--gain);
  font-weight: 700;
}

.market-down {
  color: var(--loss);
  font-weight: 700;
}

.market-flat {
  color: var(--ink);
}

.holdings-section tr.limit-up td {
  background: #fff0f1;
  box-shadow: inset 4px 0 0 var(--gain);
}

.holdings-section tr.limit-down td {
  background: #eefaf3;
  box-shadow: inset 4px 0 0 var(--loss);
}

.holdings-section tr.limit-up td:first-child {
  background: #fff0f1;
  box-shadow: inset 4px 0 0 var(--gain), 1px 0 0 var(--line);
}

.holdings-section tr.limit-down td:first-child {
  background: #eefaf3;
  box-shadow: inset 4px 0 0 var(--loss), 1px 0 0 var(--line);
}

.holdings-section tr.limit-up td[data-field="price"],
.holdings-section tr.limit-down td[data-field="price"] {
  font-weight: 800;
}

@media (max-width: 720px) {
  .quote-refresh-status {
    display: grid;
  }

  .dashboard-header { align-items: flex-start; }
  .header-actions { width: 100%; justify-content: flex-start; }
  .theme-picker { flex: 1 1 100%; }
  .theme-picker select { width: 100%; }
}

#tw-holdings,
#us-holdings,
#extra-assets,
#loan-records,
#asset-summary,
#daily-close {
  scroll-margin-top: 5rem;
}

.remember-row {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.remember-row input {
  width: auto;
}
