:root {
  --bg: #07080b;
  --bg-2: #0e1016;
  --card: #12151c;
  --card-2: #181c25;
  --line: rgba(214, 228, 240, 0.08);
  --line-strong: rgba(214, 228, 240, 0.16);
  --ink: #eef3f7;
  --muted: #8b97a6;
  --faint: #5b6572;
  --brass: #e0b25a;
  --brass-dim: rgba(224, 178, 90, 0.14);
  --wire: #7ec8c9;
  --wire-dim: rgba(126, 200, 201, 0.12);
  --up: #5ee0a0;
  --down: #ff7a72;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --sans: "Outfit", system-ui, sans-serif;
  --money: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    radial-gradient(1100px 520px at 12% -10%, rgba(224, 178, 90, 0.13), transparent 58%),
    radial-gradient(900px 620px at 100% 0%, rgba(126, 200, 201, 0.08), transparent 46%),
    linear-gradient(180deg, #0b0d12 0%, var(--bg) 32%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(126, 200, 201, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 200, 201, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 20%, #000 30%, transparent 78%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.04;
  background: repeating-linear-gradient(
    180deg,
    transparent 0 2px,
    rgba(0, 0, 0, 0.45) 2px 3px
  );
}

#app {
  position: relative;
  z-index: 1;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 72px;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.masthead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--brass);
}

.mark {
  width: 26px;
  height: 26px;
  border: 1px solid var(--brass);
  border-radius: 4px;
  display: grid;
  place-items: center;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--brass);
  box-shadow: inset 0 0 12px rgba(224, 178, 90, 0.2);
}

.tagline {
  color: var(--muted);
  font-size: 13px;
  margin-left: 36px;
}

.meta {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.meta-buttons {
  display: flex;
  gap: 6px;
}

.btn-settings {
  padding: 5px 12px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.btn-settings.active {
  border-color: var(--brass);
  color: var(--brass);
  background: var(--brass-dim);
}

.clock {
  font-family: var(--mono);
  font-size: 18px;
  letter-spacing: 0.08em;
}

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

.status-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--faint);
}

.dot.live {
  background: var(--up);
  box-shadow: 0 0 0 0 rgba(94, 224, 160, 0.55);
  animation: pulse 2.2s ease-out infinite;
}

.dot.loading {
  background: var(--brass);
}

.dot.error {
  background: var(--down);
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 8px transparent;
  }
}

.hero {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 22px;
  align-items: stretch;
  margin-bottom: 22px;
}

.hero-main {
  position: relative;
  padding: 22px 24px 20px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(224, 178, 90, 0.05), transparent 42%),
    var(--card);
  overflow: hidden;
}

.hero-main::before,
.hero-main::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid var(--brass);
  pointer-events: none;
  z-index: 2;
}

.hero-main::before {
  top: 8px;
  left: 8px;
  border-right: 0;
  border-bottom: 0;
}

.hero-main::after {
  right: 8px;
  bottom: 8px;
  border-left: 0;
  border-top: 0;
}

.kicker-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.kicker {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.total-usd {
  font-family: var(--money);
  font-size: clamp(3.2rem, 7.4vw, 6.1rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums lining-nums;
}

/* Cents/øre drawn dimmer than the whole-number part, everywhere a currency
   figure appears - not just the hero total. Opacity rather than a fixed
   grey, so it darkens whatever color the figure already has (muted white
   for a plain number, a darker green/red inside a colored P/L figure)
   instead of overriding every case to the same grey. The hero's huge font
   additionally shrinks the fraction; everywhere else is already small
   enough that shrinking further would hurt legibility. */
.frac {
  opacity: 0.4;
}

.total-usd .frac {
  font-size: 0.5em;
}

.total-local {
  margin-top: 12px;
  font-family: var(--money);
  font-size: clamp(1.15rem, 2.2vw, 1.6rem);
  color: var(--brass);
  font-weight: 500;
  font-variant-numeric: tabular-nums lining-nums;
}

.delta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  margin-top: 16px;
  font-family: var(--money);
  font-size: 13px;
  font-variant-numeric: tabular-nums lining-nums;
}

.delta.up {
  color: var(--up);
}
.delta.down {
  color: var(--down);
}
.delta.flat {
  color: var(--muted);
}

.side-stats {
  display: grid;
  gap: 12px;
}

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 16px 18px;
  position: relative;
}

.stat-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.stat-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-value {
  margin-top: 8px;
  font-size: 1.35rem;
  font-weight: 500;
  font-family: var(--money);
  font-variant-numeric: tabular-nums lining-nums;
}

.stat-sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-spark {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.1;
  z-index: 0;
  pointer-events: none;
}

.hist-line {
  fill: none;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.hist-area {
  stroke: none;
  fill-opacity: 0.12;
}

/* Kept separate on purpose: a combined ".hist-line.up, .hist-area.up { fill: ... }"
   rule would set fill on the line too, and a two-class selector beats the
   plain ".hist-line { fill: none; }" rule above - so the polyline silently
   gets filled again (SVG fills a polyline's implicit closing edge even
   though its stroke doesn't close), reproducing the exact flat-bottomed
   "mountain" bug this comment is here to prevent regressing. */
.hist-line.up {
  stroke: var(--up);
}
.hist-area.up {
  fill: var(--up);
}
.hist-line.down {
  stroke: var(--down);
}
.hist-area.down {
  fill: var(--down);
}
.hist-line.flat {
  stroke: var(--muted);
}
.hist-area.flat {
  fill: var(--muted);
}

.tape-wrap {
  width: 100vw;
  margin: 0 0 22px calc(50% - 50vw);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(14, 16, 22, 0.88);
  display: grid;
  grid-template-columns: 88px 1fr;
  align-items: center;
  min-height: 42px;
}

.tape-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #061014;
  background: var(--wire);
  height: 100%;
  display: grid;
  place-items: center;
  font-weight: 600;
}

.tape-viewport {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.tape-track {
  display: flex;
  width: max-content;
  gap: 0;
  animation: ticker 48s linear infinite;
}

.tape-track:hover {
  animation-play-state: paused;
}

.tape-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 28px;
  white-space: nowrap;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
}

.tape-item:hover {
  color: var(--wire);
}

.tape-item b {
  font-family: var(--mono);
  font-weight: 500;
  color: var(--brass);
  font-size: 11px;
  letter-spacing: 0.08em;
}

@keyframes ticker {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-control {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.sort-control select {
  background: var(--card-2);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 13px;
  text-transform: none;
  letter-spacing: normal;
}

.btn {
  border: 1px solid var(--line-strong);
  background: var(--card-2);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* .btn:disabled's opacity dims brass to a washed-out gold, not obviously
   "off" - swap to a plain grey instead of just fading the brand color. */
.btn-primary:disabled {
  background: var(--card-2);
  border-color: var(--line-strong);
  color: rgba(91, 101, 114, 0.55);
  opacity: 1;
}

.btn:hover {
  border-color: var(--brass);
}

.btn-primary {
  background: var(--brass);
  color: #1a160f;
  border-color: var(--brass);
  font-weight: 600;
}

/* .btn:hover only changes border-color, which is already brass here - needs
   its own visible hover state instead of silently inheriting a no-op one.
   A plain color shift (no filter/box-shadow) - filter forced a different
   text-compositing path that made the label look smeared, and an outer
   box-shadow ring read as the button growing even though it didn't. */
.btn-primary:hover {
  background: #ecc077;
  border-color: #ecc077;
}

.btn-ghost {
  background: transparent;
}

.btn-danger {
  color: var(--down);
  border-color: rgba(255, 122, 114, 0.35);
}

.tag-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 18px 0;
}

.tag-filter-chip {
  /* color/border-color/background come from tagColor() inline, same
     deterministic per-tag palette used for the on-card tag badge. */
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid;
  border-radius: 999px;
  padding: 6px 6px 6px 12px;
  font-size: 12px;
}

.tag-filter-name {
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tag-filter-value {
  font-family: var(--money);
  font-variant-numeric: tabular-nums lining-nums;
  border-radius: 999px;
  padding: 3px 9px;
}

.alloc-row {
  padding: 12px 18px 10px;
}

.allocation {
  height: 5px;
  overflow: hidden;
  display: flex;
  background: var(--bg-2);
}

.allocation span {
  display: block;
  height: 100%;
}

.holdings {
  display: flex;
  flex-direction: column;
}

.holding {
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(300px, 1.08fr);
  border-top: 1px solid var(--line);
  min-height: 132px;
}

.holding:first-child {
  border-top: 0;
}

/* With the wire off, .holding-news never renders - the second grid track
   above would otherwise sit there reserved and empty. auto-fit naturally
   collapses to one column on a narrow viewport (same as the mobile media
   query already does) and opens up to two once there's room, without
   needing its own breakpoint. Border-top stacking doesn't divide side-by-
   side cards, so each card gets a full border instead - kept flush (no
   grid gap) so adjacent cards' borders sit directly against each other as
   one thin seam, the same weight as the original single-column stack,
   rather than adding a second, wasteful gap on top of it. */
.wire-off .holding {
  grid-template-columns: 1fr;
}

.wire-off .holdings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 0;
}

.wire-off .holding,
.wire-off .holding:first-child {
  border: 1px solid var(--line);
}

.holding-main {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 10px;
  padding: 18px 18px 16px;
  background: transparent;
  border: 0;
  color: inherit;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.holding-main::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--faint);
  z-index: 2;
}

.holding-spark {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.07;
  z-index: 0;
  pointer-events: none;
}

.holding-ident,
.holding-metrics {
  position: relative;
  z-index: 1;
}

.holding[data-dir="up"] .holding-main::before {
  background: var(--up);
  box-shadow: 0 0 16px rgba(94, 224, 160, 0.45);
}

.holding[data-dir="down"] .holding-main::before {
  background: var(--down);
  box-shadow: 0 0 16px rgba(255, 122, 114, 0.35);
}

.holding-main:hover {
  background: rgba(238, 243, 247, 0.025);
}

.holding-ident {
  display: flex;
  align-items: center;
  gap: 12px;
}

.holding-ident-info {
  flex: 1;
  min-width: 0;
}

.sym-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.swatch {
  width: 9px;
  height: 34px;
  border-radius: 99px;
}

.sym {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.06em;
}

.tag-chip {
  /* color/border-color/background come from tagColor() inline - deterministic
     per tag text, so the same tag looks the same everywhere it appears. */
  display: inline-flex;
  align-items: center;
  border: 1px solid;
  border-radius: 999px;
  padding: 1px 8px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
}

.tag-chip-btn {
  cursor: pointer;
  padding: 4px 10px;
}

/* An inset ring in the chip's own already-set color, not a filter/box-shadow
   glow - those forced a different text-compositing path elsewhere and made
   label text look smeared. This only adds a crisp border, nothing blurred. */
.tag-chip-btn:hover {
  box-shadow: inset 0 0 0 1px currentColor;
}

.name {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.stale-flag {
  color: var(--brass);
}

.holding-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.metric-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 4px;
}

.num {
  font-family: var(--money);
  font-size: 13px;
  font-variant-numeric: tabular-nums lining-nums;
}

.num.up,
.name.up {
  color: var(--up);
}
.num.down,
.name.down {
  color: var(--down);
}
.num.flat,
.name.flat {
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-family: var(--money);
  font-size: 12px;
  font-variant-numeric: tabular-nums lining-nums;
}

.pill.up {
  color: var(--up);
  background: rgba(94, 224, 160, 0.12);
}
.pill.down {
  color: var(--down);
  background: rgba(255, 122, 114, 0.12);
}
.pill.flat {
  color: var(--muted);
  background: rgba(139, 151, 166, 0.12);
}

.holding-news {
  border-left: 1px dashed rgba(126, 200, 201, 0.22);
  /* Left padding is 6px less than the ticker side's 18px on purpose - the
     thumbnail's own internal padding (see .news-item img) makes up the
     difference, so the icon graphic lines up with the same visual inset as
     the +/- badge on the other side of the divider. Top/bottom padding is
     tight because with 3 headlines now, the news column would otherwise be
     the tallest thing in the card and stretch the metrics side to match. */
  padding: 8px 16px 8px 12px;
  display: flex;
  flex-direction: column;
  /* Center rather than flex-start: when this column's natural content is
     shorter than the metrics side (which varies row to row - cost basis,
     currency conversion lines, etc.), any leftover space splits evenly
     top/bottom instead of all collecting below the last headline. */
  justify-content: center;
  gap: 2px;
  background: linear-gradient(90deg, rgba(126, 200, 201, 0.035), transparent 48%);
}

.news-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.news-item.compact {
  grid-template-columns: 1fr;
}

/* Compact rows drop the image column by default (denser layout), but if a
   thumbnail is actually available, show it anyway - same size as the lead
   item's, so thumbnails don't come in two visibly different sizes. */
.news-item.compact.has-thumb {
  grid-template-columns: 36px 1fr;
  gap: 10px;
}

.news-item img {
  /* Thumbnail is a publisher favicon, not a photo - square slot, minimal
     padding, so a small icon doesn't shrink further into empty space. No
     background box - just the icon itself. Sized (with the padding above)
     so 3 stacked headlines match the metrics column's natural height
     exactly - measured via devtools, not guessed. */
  width: 36px;
  height: 36px;
  object-fit: contain;
  padding: 4px;
  margin-top: -2px;
  filter: grayscale(0.45) contrast(1.05);
}

.news-item:hover img {
  filter: none;
}

.news-item:hover .news-title {
  color: var(--wire);
}

.news-meta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}

.news-title {
  font-size: 13px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Two compact headlines now show instead of one - clamp each to a single
   line so three items don't grow the card as much as three 2-line ones. */
.news-item.compact .news-title {
  -webkit-line-clamp: 1;
  line-clamp: 1;
}

.news-empty {
  color: var(--faint);
  font-size: 13px;
  font-style: italic;
}

.empty {
  padding: 52px 24px 44px;
  text-align: center;
}

.empty h3 {
  font-family: var(--sans);
  font-size: 2.1rem;
  font-weight: 500;
  margin: 0 0 8px;
}

.empty p {
  color: var(--muted);
  margin: 0 0 24px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.chip {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  padding: 8px 12px;
  font-size: 13px;
}

.chip:hover,
.chip:focus-visible {
  border-color: var(--brass);
  color: var(--brass);
}

.tag-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.type-toggle {
  display: flex;
  gap: 6px;
}

.type-btn {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}

.type-btn.active {
  border-color: var(--brass);
  color: var(--brass);
  background: var(--brass-dim);
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 6, 9, 0.78);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 20;
  backdrop-filter: blur(8px);
}

.dialog {
  width: min(460px, 100%);
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  padding: 22px;
  box-shadow: var(--shadow);
}

.dialog h3 {
  margin: 0 0 4px;
  font-size: 1.25rem;
}

.dialog p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.field label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field select {
  background: var(--bg);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
  border-radius: 0;
}

.field input:focus,
.field select:focus {
  border-color: var(--brass);
}

.field-combo {
  position: relative;
}

.search-list {
  /* Floats over the fields below instead of pushing them down - previously
     an in-flow block, which made the dialog jump to a much taller height
     the moment results appeared. */
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 5;
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  box-shadow: var(--shadow);
  /* Fixed (not max) height: local results render first and live results
     merge in a moment later with a different count - a fixed box means
     that never resizes the dropdown, only scrolls internally. */
  height: 220px;
  overflow-y: auto;
}

.search-list li button {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: inherit;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.search-list li button:hover,
.search-list li button.active {
  background: var(--brass-dim);
}

.search-meta {
  color: var(--muted);
  font-size: 12px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.field-hint {
  margin: 0 0 8px;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.4;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.checkbox-field input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--brass);
  cursor: pointer;
}

.backup-actions {
  display: flex;
  gap: 8px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* Privacy mode: blur anything that reveals position size or net worth
   (quantities, USD/local values, P&L) while leaving composition visible -
   symbols, tags, allocation %, day-change % all stay readable, since the
   point is showing what you hold and how it's divided, not hiding that. */
.privacy .sensitive {
  filter: blur(6px);
  user-select: none;
}

.privacy .total-usd.sensitive,
.privacy .total-local.sensitive {
  filter: blur(1.2rem);
}

.privacy .sensitive:hover {
  filter: none;
}

.privacy.capturing .sensitive,
.privacy.capturing .sensitive:hover {
  filter: none !important;
  color: transparent !important;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 3px;
}

.error-banner {
  margin-bottom: 16px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 122, 114, 0.35);
  color: var(--down);
  font-size: 13px;
}

@media (max-width: 900px) {
  .hero,
  .holding,
  .tape-wrap {
    grid-template-columns: 1fr;
  }

  .holding-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .holding-news {
    border-left: 0;
    border-top: 1px dashed rgba(126, 200, 201, 0.22);
  }

  /* An empty "Listening for headlines…"/"No wire for…" placeholder costs a
     whole extra stacked section on a narrow screen for zero information -
     worth cutting there even though it's harmless as a side column on
     desktop. A holding that actually has headlines still shows them. */
  .holding-news.no-wire {
    display: none;
  }

  .masthead {
    flex-direction: column;
  }

  .meta {
    text-align: left;
    align-items: flex-start;
  }

  .tagline {
    margin-left: 0;
  }

  .tape-wrap {
    margin-left: 0;
    width: 100%;
  }

  /* Actions (Sort/Refresh/Add holding) shares .panel-head's row with the
     "Holdings" title and has no wrap of its own - too narrow to fit both,
     .panel's overflow:hidden was clipping "Add holding" off the edge
     entirely rather than just squeezing it. */
  .panel-head {
    flex-wrap: wrap;
    row-gap: 10px;
  }

  .actions {
    flex-wrap: wrap;
    width: 100%;
  }
}
