:root {
  --bg: #f6f7f9; --surface: #ffffff; --text: #111827; --muted: #6b7280; --border: #e5e7eb;
  --accent: #0f766e; --accent-ink: #ffffff; --danger: #b91c1c; --danger-bg: #fef2f2; --warn: #b45309; --warn-bg: #fffbeb;
  --ok: #15803d; --ok-bg: #f0fdf4; --chip: #f3f4f6; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 1px 8px rgba(0,0,0,.04);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f14; --surface: #131a22; --text: #e5e7eb; --muted: #9ca3af; --border: #243041;
    --accent: #2dd4bf; --accent-ink: #062a26; --danger: #f87171; --danger-bg: #2a1215; --warn: #fbbf24; --warn-bg: #2a2110;
    --ok: #4ade80; --ok-bg: #0f2418; --chip: #1c2530; --shadow: none; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
.hidden { display: none !important; }
.muted { color: var(--muted); } .small { font-size: 13px; }

.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.tabs { display: flex; gap: 4px; padding: 8px 16px 0; max-width: 1100px; margin: 0 auto; }
.tab { border: 0; background: none; color: var(--muted); padding: 8px 12px; border-bottom: 2px solid transparent; font: inherit; cursor: pointer; }
.tab.active { color: var(--text); border-color: var(--accent); font-weight: 600; }
.pill { background: var(--danger); color: #fff; border-radius: 999px; padding: 0 7px; font-size: 12px; margin-left: 4px; }

main { max-width: 1100px; margin: 0 auto; padding: 12px 16px 48px; }

.btn { border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 8px 14px; border-radius: 8px; font: inherit; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn.ghost { background: transparent; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: .5; cursor: default; }

.summary { display: flex; gap: 8px; margin: 4px 0 12px; }
.summary .stat { flex: none; }
/* "Prices checked" sits on the same line, taking the space left and wrapping its own text if needed. */
.summary .stat.wide { flex: 1 1 0; min-width: 0; }
.summary .stat.wide b { font-size: 14px; line-height: 1.3; margin-top: 3px; }
.summary .stat { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; }
.summary .stat b { display: block; font-size: 18px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.card.triggered { border-color: var(--danger); background: var(--danger-bg); }
.card.near { border-color: var(--warn); }
.card.dim { opacity: .65; }
.card-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.sym { font-weight: 700; font-size: 17px; }
.name { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.chip { background: var(--chip); border-radius: 999px; padding: 2px 8px; font-size: 12px; }
.chip.active { background: var(--ok-bg); color: var(--ok); }
.chip.triggered { background: var(--danger); color: #fff; }
.chip.paused, .chip.sold { color: var(--muted); }
.card.rebuy { border-style: dashed; }
.chip.rebuy { background: var(--chip); color: var(--text); }
.card.rebuy-hit { border-style: solid; border-color: #2563eb; background: rgba(37, 99, 235, .08); }
.card.rebuy-hit .chip.rebuy { background: #2563eb; color: #fff; }
.card.rebuy .bar i { background: #2563eb; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.grid div span { display: block; color: var(--muted); font-size: 12px; }
.grid div b { font-variant-numeric: tabular-nums; }
.stop b { color: var(--accent); font-size: 17px; }
.bar { height: 6px; background: var(--chip); border-radius: 999px; position: relative; overflow: hidden; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 999px; }
.card.near .bar i { background: var(--warn); }
.card.triggered .bar i { background: var(--danger); }
.meta { color: var(--muted); font-size: 12px; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.err { color: var(--danger); font-size: 12px; }
dialog.small-dialog { width: min(420px, calc(100vw - 24px)); font-size: 14px; }
dialog.small-dialog ol { padding-left: 20px; line-height: 1.6; }
.card-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.empty { text-align: center; padding: 48px 16px; background: var(--surface); border: 1px dashed var(--border); border-radius: 12px; }
.empty p { color: var(--muted); max-width: 460px; margin: 0 auto 16px; }

.alerts { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.alerts li { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.alerts li.triggered { border-left-color: var(--danger); }
.alerts li.warning { border-left-color: var(--warn); }
.alerts li.raise, .alerts li.activated { border-left-color: var(--accent); }
.alerts li time { color: var(--muted); font-size: 12px; float: right; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; max-width: 640px; }
.panel h3 { margin: 18px 0 8px; font-size: 15px; } .panel h3:first-child { margin-top: 0; }
label { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; font-size: 14px; flex: 1; }
label.check { flex-direction: row; align-items: center; gap: 8px; }
input, select { font: inherit; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); min-width: 0; }
input:not([type=checkbox]), select { height: 38px; box-sizing: border-box; padding-top: 0; padding-bottom: 0; }
input[type=checkbox] { width: 18px; height: 18px; flex: none; }
.suffix { display: flex; align-items: center; gap: 6px; }
.suffix input { width: 100%; max-width: 260px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.pair input[type=number] { max-width: 160px; }
.line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0; font-size: 14px; }
.line > .line { margin: 0; }
.line > label.check { flex: 0 0 auto; margin: 0 0 0 12px; }
.w-sm { width: auto; max-width: 180px; }
.w-time { width: 110px; }
.w-num { width: 46px; height: 30px; padding: 0 4px; font-size: 14px; text-align: center; }
.hint { color: var(--muted); font-size: 12px; margin: 2px 0 6px; }
.notify-block { border: 1px solid var(--border); border-radius: 10px; padding: 0 12px; margin: 4px 0; }
.notify-block > label.check { margin: 0; min-height: 36px; } /* 36 + border = 38px, same as the plan rows and inputs */
.notify-block > :empty { display: none; }
.notify-block .hint { margin: 4px 0 2px; }
.actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.disclaimer { color: var(--muted); font-size: 12px; max-width: 640px; }

dialog { border: 1px solid var(--border); border-radius: 14px; padding: 18px; width: min(620px, calc(100vw - 24px)); background: var(--surface); color: var(--text); }
dialog::backdrop { background: rgba(0,0,0,.45); }
dialog h2 { margin: 0 0 8px; font-size: 18px; }
.search-wrap { position: relative; flex: 1; min-width: 0; }
.ticker-row { display: flex; gap: 12px; align-items: start; }
.ticker-row label.account { flex: 0 0 140px; }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.trio.quad { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; align-items: end; }
.trio.quad label { font-size: 12px; line-height: 1.25; }
.trio.quad input { padding-left: 6px; padding-right: 4px; min-width: 0; }
.results { position: absolute; z-index: 3; left: 0; right: 0; top: 100%; margin: -4px 0 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; max-height: 260px; overflow: auto; box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.results li { padding: 8px; border-radius: 6px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; }
.results li:hover, .results li.sel { background: var(--chip); }
.results small { color: var(--muted); }
.quote { background: var(--chip); border-radius: 8px; padding: 8px 10px; font-size: 14px; }
.preview { background: var(--ok-bg); border-radius: 8px; padding: 10px 12px; margin-top: 8px; font-size: 14px; }
.preview:empty { display: none; }
.install-bar { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--ok-bg); font-size: 14px; }
.install-bar span { flex: 1; }
.install-bar.hidden { display: none; }
.code-box { flex: 1; min-width: 0; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.plan-box > .btn { margin-top: 8px; }
.trail-help { border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; margin: 4px 0 8px; font-size: 13px; }
.trail-help p { margin: 0 0 6px; }
.trail-options { display: flex; flex-wrap: wrap; gap: 6px; }
.trail-options button { font: inherit; font-size: 13px; border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 8px; padding: 4px 8px; cursor: pointer; text-align: center; line-height: 1.3; }
.trail-options button b { display: block; }
.trail-options button.sel { border-color: var(--ok); background: var(--ok-bg); }
.plan-box p { margin: 0 0 8px; font-size: 14px; }
.plan-options { display: flex; flex-direction: column; gap: 4px; }
.plan-option { border: 1px solid var(--border); border-radius: 10px; padding: 0 12px; min-height: 38px; box-sizing: border-box; margin: 0; display: flex; flex-direction: row; align-items: center; text-align: left; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; cursor: pointer; }
.plan-option input { margin: 0; }
#settingsForm .line { margin: 4px 0; }
/* Alert rules: on a phone the words wrap inside their own space; checkbox, box and units stay on the same line. */
.line .grow { flex: 0 1 auto; min-width: 0; }
.line .keep { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex: none; }
@media (max-width: 600px) {
  #settingsForm .line:has(.keep) { flex-wrap: nowrap; }
  #settingsForm .line:has(.keep) .grow { flex: 1 1 auto; }
  #settingsForm .line select { flex: 1; min-width: 0; }
}
.plan-option.current { border-color: var(--ok); background: var(--ok-bg); }
.plan-box > .btn.hidden { display: none; }
.welcome { text-align: center; max-width: 360px; }
.welcome ol { text-align: left; padding-left: 20px; }
.welcome .btn { display: block; width: 100%; margin-top: 8px; }
.welcome img { border-radius: 14px; }
.dialog-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.dialog-head a, .empty .btn.ghost { font-size: 14px; }
.empty .btn + .btn { margin-left: 8px; }
.table-wrap { max-height: 300px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; margin-top: 8px; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table-wrap th, .table-wrap td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table-wrap th { position: sticky; top: 0; background: var(--surface); }
.table-wrap td.ok { color: var(--ok); }
.table-wrap td.bad { color: var(--danger); white-space: normal; }
#importFile { height: auto; padding: 8px; width: 100%; }
.error { color: var(--danger); }

.toast { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 8px; z-index: 20; max-width: calc(100vw - 32px); }

@media (max-width: 520px) {
  .cards { grid-template-columns: 1fr; }
  #sched { display: none; }

}

/* Portfolios: one button per portfolio above the holdings. */
.portfolio-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 10px; }
.pchip { border: 1px solid var(--border); background: var(--surface); color: inherit; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 14px; cursor: pointer; }
.pchip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.portfolio-pick { display: block; margin: 8px 0; }
.portfolio-pick input { display: block; width: 100%; margin-top: 4px; }
/* Stocks read from a picture: editable before adding. */
#importTable input:not([type=checkbox]) { width: 100%; min-width: 4em; box-sizing: border-box; padding: 4px 6px; font: inherit; }
#importTable .imp-qty { max-width: 7em; }

/* "Your plan" heading with the stock count on the right. */
.plan-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 0 8px; }
.plan-head h3 { margin: 0; }
#planUsage { font-size: 13px; color: var(--muted); }
/* One line per plan; the tick and green colour show the current one. */
.plan-option { flex-wrap: nowrap; gap: 8px; }
.plan-option span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 600px) { .plan-option { padding: 0 8px; font-size: 12px; } }
#settingsForm .line select { min-width: 0; max-width: 100%; flex: 1 1 auto; }
#importTable .imp-qty.check { background: var(--warn-bg); border-color: var(--warn); }
.check-note { color: var(--warn); }
/* Stocks read from a picture: tick | stock (result shows underneath) | shares, fitting a phone screen. */
#importTable.picture-rows { table-layout: fixed; width: 100%; }
#importTable.picture-rows th:first-child { width: 28px; }
#importTable.picture-rows th:last-child { width: 92px; }
#importTable.picture-rows .imp-qty { max-width: none; }
#importTable.picture-rows .res:empty { display: none; }
#importTable.picture-rows .res { font-size: 12px; }
.onoff { display: inline-block; min-width: 3.2em; }
.onoff.on { color: var(--ok); font-weight: 600; }
.rename-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; width: 100%; }
.rename-form input { flex: 1 1 140px; min-width: 0; height: 32px; }
.grid b.up { color: var(--ok); }
.grid b.down { color: var(--danger); }
.summary .stat.wide > span:last-child:not(:first-child) { display: block; margin-top: 2px; }
/* Holding figures: all six on one line, smaller text so they fit a phone. */
.grid.six { grid-template-columns: repeat(6, auto); justify-content: space-between; gap: 6px; }
.grid.six div span { font-size: 10px; white-space: nowrap; }
.grid.six div b { font-size: 12px; white-space: nowrap; }
@media (max-width: 380px) { .grid.six { gap: 4px; } .grid.six div b { font-size: 11px; } }
/* Trailing price vs current price, beside the ticker. */
.to-trail { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 4px; }
.to-trail.close { color: var(--warn); }
.to-trail.hit { color: var(--danger); }
.chip.raise { background: var(--warn-bg); color: var(--warn); font-weight: 600; }
.raise-note { background: var(--warn-bg); color: var(--text); border-radius: 8px; padding: 6px 10px; font-size: 13px; }
/* Stop loss under the status chip: green normally, amber when within the warning %, red when hit. */
.head-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.sl { font-size: 13px; font-weight: 600; color: var(--ok); white-space: nowrap; font-variant-numeric: tabular-nums; }
.sl.close, .sl.raise { color: var(--warn); }
.sl.hit { color: var(--danger); }
/* Buy back % and Recovery alert side by side on one line. */
.line.after-sale { justify-content: space-between; gap: 12px; }
.line.after-sale label.inline { display: flex; flex-direction: row; align-items: center; gap: 6px; margin: 0; white-space: nowrap; }
.line.after-sale input[type=checkbox] { width: 20px; height: 20px; margin: 0; }
.line.after-sale { flex-wrap: nowrap; gap: 8px; font-size: 13px; }
.line.after-sale label.inline { flex: none; font-size: 13px; gap: 5px; }
.line.after-sale .w-num { width: 40px; }

/* Editor header: title, portfolio dropdown, load icon on one line */
.dialog-head { align-items: center; flex-wrap: nowrap; }
.dialog-head h2 { margin: 0; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-pick { flex: 1 1 auto; min-width: 0; display: flex; justify-content: flex-end; }
.account-pick select, .account-pick input { width: auto; max-width: 96px; min-width: 0; padding: 4px 6px; font-size: 13px; }
.dialog-head a.icon-link { flex: none; display: inline-flex; align-items: center; color: var(--accent, #0f766e); padding: 4px; }
.search-wrap .quote { margin-top: 6px; }
.account-pick input { max-width: 140px; }
.dialog-head h2 { font-size: 18px; } .account-pick { flex: 0 0 auto; margin-left: auto; }
#editor .dialog-head h2 { font-size: 17px; }
#editor .dialog-head { gap: 6px; } #editor .account-pick select { max-width: 84px; }
/* Portfolio dropdown next to the editor title, and on the Holdings tab */
#editor .account-pick { margin-left: 4px; margin-right: auto; }
#editor .account-pick select { max-width: 120px; }
.portfolio-sel { width: auto; max-width: 70%; padding: 6px 8px; font-size: 14px; font-weight: 600; }
/* Portfolio dropdown chip on each stock card */
select.chip-sel { width: auto; max-width: 120px; padding: 1px 18px 1px 8px; font-size: 12px; border: 1px solid var(--line, #d1d5db); cursor: pointer; }
input.chip-new { width: 110px; padding: 1px 8px; font-size: 12px; }
select.chip-sel { height: 22px; min-height: 0; line-height: 1; border: none; background-color: var(--chip); border-radius: 999px; max-width: 110px; }
input.chip-new { height: 22px; min-height: 0; border-radius: 999px; }
/* Both alert options side by side */
/* Settings: tighter alert lines and smaller number boxes */
#settingsForm .rules { margin-top: 10px; }
#settingsForm .rules .line { margin: 2px 0; gap: 6px; font-size: 13px; }
#settingsForm .rules .w-num { width: 38px; height: 26px; font-size: 13px; padding: 0 2px; }
#settingsForm .rules .keep { gap: 4px; }
#settingsForm .plan-options { gap: 3px; }
#settingsForm .plan-option { min-height: 32px; }
#settingsForm h3 { margin: 12px 0 6px; }
/* Alert lines: text on the left, the number boxes in one column with the same left edge and width */
#settingsForm .rules .line { display: grid; grid-template-columns: 1fr 104px; align-items: center; column-gap: 8px; }
#settingsForm .rules .keep { justify-content: flex-start; }
#settingsForm .rules .w-num { width: 38px; flex: none; }
/* Settings section headings with controls on the right */
#settingsForm .section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 12px 0 4px; }
#settingsForm .section-head h3 { margin: 0; white-space: nowrap; }
#settingsForm .head-actions { display: flex; gap: 6px; flex-wrap: nowrap; }
#settingsForm .head-actions .btn { padding: 4px 8px; font-size: 12px; white-space: nowrap; }
#settingsForm fieldset.rules { border: 0; padding: 0; margin: 0; min-width: 0; }
#settingsForm fieldset.rules:disabled { opacity: 0.45; }
#settingsForm .actions { margin-top: 12px; }
/* On/off switch */
.switch { position: relative; display: inline-block; width: 40px; height: 22px; flex: none; margin: 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; background: var(--border); border-radius: 999px; transition: background .15s; pointer-events: none; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
#settingsForm .section-head.inline-head { justify-content: flex-start; gap: 10px; }
/* Send Alerts lines read as sentences with the box inline */
#settingsForm .rules .line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
#settingsForm .rules .w-sel { flex: none; width: auto; height: 26px; padding: 0 4px; font-size: 13px; }
#settingsForm .rules .line select.w-sel { flex: none; width: auto; max-width: none; }
#settingsForm .rules .nw { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
/* Each alert option: indented, with its own small switch */
#settingsForm .rules .line.opt { flex-wrap: nowrap; align-items: flex-start; gap: 8px; padding-left: 10px; margin: 5px 0; }
#settingsForm .rules .opt-body { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; }
#settingsForm .rules .opt.off .opt-body { opacity: 0.45; }
.switch.small { width: 32px; height: 18px; margin-top: 4px; }
.switch.small span::after { top: 2px; left: 2px; width: 14px; height: 14px; }
.switch.small input:checked + span::after { transform: translateX(14px); }
/* % lines: lead text in a fixed column so both % boxes start at the same point */
#settingsForm .rules .opt-body.pct { display: grid; grid-template-columns: 7.2em auto 1fr; column-gap: 4px; align-items: center; }
/* Holdings bar: portfolio dropdown, alerts switch, Rename and Trail % on one line */
.portfolio-bar { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.portfolio-bar .portfolio-sel { min-width: 0; flex: 0 1 auto; }
.portfolio-bar .btn { white-space: nowrap; flex: none; }
.portfolio-bar .rename-form .w-num { width: 46px; height: 30px; }
.portfolio-bar .rename-form input.w-num { flex: none; }
/* Alerts tab: delete one alert or all, with an in-place confirm */
.alerts-bar { display: flex; justify-content: flex-end; margin: 0 0 8px; }
.alerts li { position: relative; }
.alerts li time { margin-right: 22px; }
.alert-del { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 13px; cursor: pointer; }
.alert-del:hover { background: var(--chip); color: var(--danger); }
.confirm { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.alerts li .confirm { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.alerts-bar .confirm { width: 100%; justify-content: flex-end; }
.confirm span { margin-right: auto; }
.btn.danger-fill { background: var(--danger); color: #fff; border-color: var(--danger); }
.danger-text { color: var(--danger); }
/* "Trail hit" as a tappable stat */
button.stat.stat-link { font: inherit; color: inherit; text-align: left; cursor: pointer; }
button.stat.stat-link:hover { border-color: var(--danger); }
.card.flash { animation: card-flash 1.6s ease-out; }
@keyframes card-flash { 0%, 30% { box-shadow: 0 0 0 3px var(--danger); } 100% { box-shadow: 0 0 0 0 transparent; } }
/* Tap an alert to open its stock; the prices box opens Settings */
.alerts li.link { cursor: pointer; }
.alerts li.link:hover { box-shadow: 0 0 0 1px var(--accent); }
button.stat.stat-link#goSettings:hover { border-color: var(--accent); }
#alertsOffConfirm { margin: 0 0 8px 10px; }
/* Tiny calendar beside the price of funds that are priced once a day */
i.daily { display: inline-flex; vertical-align: -1px; margin-left: 3px; color: var(--muted, #6b7280); cursor: help; font-style: normal; }
/* Trail hit, then the price recovered above the trailing price */
.chip.back { background: var(--ok-bg); color: var(--ok); font-weight: 600; }
.alerts li.recovered { border-left-color: var(--ok); }
