:root {
  color-scheme: dark;
  --bg: #070b12;
  --panel: #0f172a;
  --panel-2: #0b1222;
  --line: #1e293b;
  --line-2: #334155;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --dim: #64748b;
  --lime: #b5f24f;
  --lime-dim: rgba(181, 242, 79, 0.1);
  --amber: #fbbf24;
  --amber-dim: rgba(251, 191, 36, 0.1);
  --red: #f87171;
  --red-dim: rgba(248, 113, 113, 0.1);
  --sky: #7dd3fc;
  --sky-dim: rgba(125, 211, 252, 0.1);
  --ink: #0a0f05;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}
html,
body {
  background: var(--bg);
}
body {
  margin: 0;
  color: var(--text);
  font: 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--lime);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
h1 {
  font-size: 30px;
}
h2 {
  font-size: 20px;
}
h3 {
  font-size: 16px;
}
p {
  margin: 0 0 10px;
}
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(7, 11, 18, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  color: var(--text);
}
.brand:hover {
  text-decoration: none;
}
.brand svg {
  width: 24px;
  height: 24px;
}
nav {
  display: flex;
  gap: 4px;
  flex: 1;
}
nav a {
  color: var(--muted);
  padding: 6px 11px;
  border-radius: 6px;
  font-size: 14px;
  white-space: nowrap;
}
nav a:hover {
  color: var(--text);
  background: var(--panel);
  text-decoration: none;
}
nav a.active {
  color: var(--text);
  background: var(--panel);
  box-shadow: inset 0 -2px 0 var(--lime);
}
.count {
  margin-left: 6px;
  background: var(--lime);
  color: var(--ink);
  font: 700 11px/1 var(--mono);
  padding: 2px 6px;
  border-radius: 99px;
}
.scan {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font: 12px var(--mono);
  color: var(--dim);
  white-space: nowrap;
}
#scan-status {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Type helpers */
.eyebrow,
.label {
  display: block;
  margin: 0 0 6px;
  font: 600 11px/1.4 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--dim);
}
.sub {
  color: var(--muted);
  font-size: 13px;
}
.lede {
  max-width: 760px;
  margin-top: 10px;
  color: var(--muted);
}
.pos {
  color: var(--lime);
}
.neg {
  color: var(--red);
}
.warn-text {
  color: var(--amber);
}
.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.sym {
  font: 700 14px var(--mono);
  color: var(--lime);
  letter-spacing: 0.02em;
}

/* Controls */
button {
  font: 600 13px var(--sans);
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 7px;
  padding: 7px 14px;
  cursor: pointer;
}
button:hover:not(:disabled) {
  border-color: var(--lime);
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button.primary {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
}
button.primary:hover:not(:disabled) {
  filter: brightness(1.08);
}
button.link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--lime);
  font: inherit;
}
button.link:hover {
  text-decoration: underline;
}
button.icon {
  background: none;
  border: 0;
  padding: 2px 8px;
  color: var(--dim);
  font-size: 18px;
  line-height: 1;
}
button.icon:hover {
  color: var(--red);
}
input,
select,
textarea {
  font: 14px var(--sans);
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-radius: 7px;
  padding: 8px 10px;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--lime);
  outline-offset: -1px;
  border-color: transparent;
}
textarea {
  width: 100%;
  resize: vertical;
  line-height: 1.5;
}
.form-status {
  font-size: 13px;
}
.form-status:not(.pos, .neg) {
  color: var(--muted);
}

/* Blocks */
main {
  padding-top: 28px;
  padding-bottom: 40px;
  min-height: 70vh;
}
.page-head {
  margin-bottom: 22px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 18px;
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.key {
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber);
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--amber-dim), transparent 65%), var(--panel);
  padding: 18px 20px;
  margin-bottom: 18px;
}
.key.buy {
  border-left-color: var(--lime);
  background: linear-gradient(90deg, var(--lime-dim), transparent 65%), var(--panel);
}
.key h2 {
  margin-bottom: 8px;
}
.banner {
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 14px;
}
.banner.warn {
  background: var(--amber-dim);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fde68a;
}
.banner.error {
  background: var(--red-dim);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fecaca;
}
.banner.info {
  background: var(--sky-dim);
  border: 1px solid rgba(125, 211, 252, 0.3);
  color: #bae6fd;
}
.card-note {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--dim);
}
code {
  font: 0.9em var(--mono);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
}
.hint {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 16px;
}
.empty {
  text-align: center;
  padding: 40px 20px;
}
.empty h2 {
  margin-bottom: 10px;
}
.empty p {
  max-width: 560px;
  margin: 0 auto 10px;
  color: var(--muted);
}

/* Tables */
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th,
td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
thead th {
  font: 600 11px var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dim);
  white-space: nowrap;
}
tbody th {
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}
tbody tr:last-child > * {
  border-bottom: 0;
}
th small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--dim);
}
.cell-sub {
  font-size: 12px;
  color: var(--muted);
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Watchlist */
.add {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.add input {
  flex: 0 1 380px;
  min-width: 0;
}
.watchlist-card {
  padding: 6px 8px;
}
.watchlist tbody tr {
  cursor: pointer;
}
.watchlist tbody tr:hover {
  background: var(--panel-2);
}
.watchlist tr.is-buy {
  background: var(--lime-dim);
}
.watchlist .updated {
  white-space: nowrap;
}
.badge {
  display: inline-block;
  font: 700 11px var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  border-radius: 5px;
  background: var(--panel-2);
  color: var(--muted);
  border: 1px solid var(--line-2);
  white-space: nowrap;
}
.badge.buy {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
}
.score {
  display: flex;
  align-items: center;
  gap: 8px;
}
.score-num {
  font: 600 13px var(--mono);
  min-width: 36px;
}
.pips {
  display: flex;
  gap: 3px;
}
.pip {
  width: 14px;
  height: 6px;
  border-radius: 2px;
  background: var(--line-2);
}
.pip.full {
  background: var(--lime);
}
.pip.part {
  background: var(--amber);
}
.pip.none {
  background: var(--red);
}

/* Discover */
.discover-bar,
.sectors-bar {
  align-items: center;
  flex-wrap: wrap;
}
.discover-section > h2,
.sectors-section > h2 {
  margin: 28px 0 6px;
}
/* Long headers wrap so the add button stays in view. */
.discover thead th {
  white-space: normal;
}
.discover .updated,
.discover .add-cell {
  white-space: nowrap;
}
.discover .blocker {
  min-width: 240px;
  font-size: 13px;
  color: var(--muted);
}

/* Sectors: a colour per stage, in the order sectors usually move through them */
.leading {
  --stage: var(--lime);
  --stage-dim: var(--lime-dim);
}
.weakening {
  --stage: var(--amber);
  --stage-dim: var(--amber-dim);
}
.lagging {
  --stage: var(--red);
  --stage-dim: var(--red-dim);
}
.improving {
  --stage: var(--sky);
  --stage-dim: var(--sky-dim);
}
.badge.leading,
.badge.weakening,
.badge.lagging,
.badge.improving {
  color: var(--stage);
  background: var(--stage-dim);
  border-color: transparent;
}
.chart.rotation {
  margin: 0;
}
.rotation .quadrant {
  fill: var(--stage-dim);
}
.rotation text.quadrant-name {
  fill: var(--stage);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.rotation .band {
  fill: rgba(148, 163, 184, 0.14);
  background: rgba(148, 163, 184, 0.14);
}
.rotation .trail {
  fill: none;
  stroke: var(--stage);
  stroke-width: 1.5;
  stroke-opacity: 0.5;
}
.rotation .step {
  fill: var(--stage);
  fill-opacity: 0.6;
}
.rotation .latest {
  fill: var(--stage);
  stroke: var(--panel);
  stroke-width: 1.5;
}
.rotation text.fund {
  fill: var(--text);
  font-weight: 700;
}
.rotation.focusing [data-sector]:not(.focus) {
  opacity: 0.15;
}
.rotation .focus .trail {
  stroke-width: 2.5;
  stroke-opacity: 1;
}
.rotation .focus .step {
  fill-opacity: 1;
}
.rotation text.since {
  fill: var(--muted);
  font-size: 11px;
}
.stage-key li[data-sector] button {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.stage-key li[data-sector]:hover,
.stage-key li[data-sector] button[aria-pressed="true"] {
  color: var(--text);
}
.stage-key li[data-sector] button[aria-pressed="true"] {
  text-decoration: underline;
  text-decoration-color: var(--stage);
  text-underline-offset: 4px;
}
.stage-key > div {
  border-left: 3px solid var(--stage);
  padding: 2px 0 2px 12px;
}
.stage-key > div + div {
  margin-top: 16px;
}
.stage-key .label {
  font: 700 11px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stage);
}
.stage-key p {
  margin: 2px 0 6px;
}
.stage-key ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}
.stage-key .sym {
  margin-right: 6px;
  color: var(--stage);
}
.sector-stocks a + a {
  margin-left: 8px;
}

/* Stock page */
.stock-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.stock-head h1 .sym {
  font-size: 26px;
  margin-right: 8px;
}
.price-box {
  display: grid;
  gap: 2px;
  margin-left: auto;
  justify-items: end;
  text-align: right;
}
.price {
  font: 700 28px var(--mono);
}
.price-box button {
  margin-top: 8px;
}
.blockers {
  margin: 6px 0 0;
  padding-left: 18px;
}
.blockers li {
  margin: 4px 0;
  font-size: 14px;
}
.verdict-stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.verdict-stats strong {
  display: block;
  font: 700 20px var(--mono);
}
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}
.pillars .card {
  margin: 0;
}
.tally {
  font: 700 13px var(--mono);
  color: var(--muted);
}
.checks,
.flags {
  list-style: none;
  margin: 0;
  padding: 0;
}
.check {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}
.check:first-child {
  border-top: 0;
  padding-top: 0;
}
.mark {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 700 12px var(--mono);
}
.check.pass .mark {
  background: var(--lime-dim);
  color: var(--lime);
}
.check.fail .mark {
  background: var(--red-dim);
  color: var(--red);
}
.check.na .mark {
  background: var(--amber-dim);
  color: var(--amber);
}
.check-label {
  font-weight: 600;
  font-size: 14px;
}
.check-value {
  margin-top: 2px;
  font: 13px var(--mono);
  overflow-wrap: anywhere;
}
.check-rule {
  margin-top: 3px;
  font-size: 12px;
  color: var(--dim);
}
.flags {
  display: grid;
  gap: 10px;
}
.flag {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  font-size: 14px;
}
.flag.warn .mark {
  background: var(--amber-dim);
  color: var(--amber);
}
.flag.info .mark {
  background: var(--sky-dim);
  color: var(--sky);
}
.units {
  font: 12px var(--mono);
  color: var(--dim);
  margin-bottom: 8px;
}
.statements tr.ratio-start > * {
  border-top: 1px solid var(--line-2);
}
.chart {
  margin: 20px 0 0;
}
.chart svg {
  display: block;
  width: 100%;
  height: auto;
}
.chart text {
  fill: var(--dim);
  font: 11px var(--mono);
}
.chart .axis {
  stroke: var(--line-2);
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--muted);
}
.legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: -1px;
}
.ni {
  fill: var(--lime);
  background: var(--lime);
}
.cfo {
  fill: var(--sky);
  background: var(--sky);
}
.fcf {
  fill: var(--amber);
  background: var(--amber);
}

/* Price chart */
.card-head:has(.timeframes) {
  flex-wrap: wrap;
}
.timeframes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.timeframes button {
  padding: 4px 9px;
  font: 600 12px var(--mono);
  color: var(--muted);
}
.timeframes button[aria-pressed="true"] {
  border-color: var(--lime);
  color: var(--lime);
}
.chart.candles {
  margin: 0;
  min-height: 368px;
  cursor: grab;
  touch-action: pan-y pinch-zoom;
  user-select: none;
}
.chart.candles.dragging {
  cursor: grabbing;
}
.candles > p {
  margin: 0;
  padding-top: 160px;
  text-align: center;
}
.candles path,
.candles line {
  shape-rendering: crispEdges;
}
.candles path.rise {
  fill: var(--lime);
}
.candles path.fall {
  fill: var(--red);
}
.candles line.last {
  stroke-dasharray: 2 3;
}
.candles line.rise {
  stroke: var(--lime);
}
.candles line.fall {
  stroke: var(--red);
}
.zone-band {
  fill: var(--amber-dim);
  background: var(--amber-dim);
}
.zone-band.checks-pass {
  fill: var(--lime-dim);
  background: var(--lime-dim);
}
.legend i.zone-band {
  box-shadow: inset 0 0 0 1px var(--amber);
}
.legend i.zone-band.checks-pass {
  box-shadow: inset 0 0 0 1px var(--lime);
}
.candles .zone-line {
  stroke: var(--amber);
  stroke-dasharray: 6 4;
}
.candles .zone-line.checks-pass {
  stroke: var(--lime);
}
.chart text.zone-text {
  fill: var(--amber);
  paint-order: stroke;
  stroke: var(--panel);
  stroke-width: 3px;
  stroke-linejoin: round;
}
.chart text.zone-text.checks-pass {
  fill: var(--lime);
}
.tag.rise rect {
  fill: var(--lime);
}
.tag.fall rect {
  fill: var(--red);
}
.tag.zone rect {
  fill: var(--amber);
}
.tag.zone.checks-pass rect {
  fill: var(--lime);
}
.chart .tag text {
  fill: var(--ink);
  font-weight: 700;
}

/* Alert lines */
.timeframes .draw-line {
  margin-left: 8px;
}
.timeframes .draw-line[aria-pressed="true"] {
  border-color: var(--sky);
  color: var(--sky);
}
.chart.candles.drawing {
  cursor: crosshair;
}
.chart.candles.moving-line,
.candles .alert-line .hit {
  cursor: ns-resize;
}
.candles .alert-line line,
.candles .alert-preview {
  stroke: var(--sky);
}
.candles .alert-preview {
  stroke-dasharray: 4 3;
  pointer-events: none;
}
.candles .alert-line.reached line {
  stroke: var(--muted);
  stroke-dasharray: 4 3;
}
.candles .alert-line line.hit {
  stroke: transparent;
  stroke-width: 11px;
  stroke-dasharray: none;
  pointer-events: stroke;
}
.chart .alert-line text {
  fill: var(--sky);
  font-weight: 600;
  paint-order: stroke;
  stroke: var(--panel);
  stroke-width: 3px;
  stroke-linejoin: round;
  pointer-events: none;
}
.chart .alert-line.reached text {
  fill: var(--muted);
}
.tag.alert rect {
  fill: var(--sky);
}
.tag.alert.reached rect {
  fill: var(--muted);
}
.alert-lines {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.alert-lines li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
}
.alert-lines .level {
  font: 600 13px var(--mono);
  color: var(--sky);
}
.alert-lines li.reached .level {
  color: var(--muted);
}
.alert-lines button {
  margin-left: auto;
}

/* Price projection */
.chart .grid {
  stroke: var(--line);
}
.chart .today {
  stroke: var(--line-2);
  stroke-dasharray: 3 3;
}
.chart .dot {
  fill: var(--text);
}
.chart text.end {
  fill: var(--muted);
}
.chart text.end.base {
  fill: var(--sky);
}
.price-line {
  fill: none;
  stroke: var(--text);
  stroke-width: 1.5;
  background: var(--text);
}
.case-line {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.25;
  stroke-dasharray: 5 4;
  background: repeating-linear-gradient(90deg, var(--muted) 0 4px, transparent 4px 7px);
}
.case-line.base {
  stroke: var(--sky);
  stroke-width: 2;
  stroke-dasharray: none;
  background: var(--sky);
}
.band-80 {
  fill: var(--sky-dim);
  background: var(--sky-dim);
}
.band-50 {
  fill: rgba(125, 211, 252, 0.22);
  background: rgba(125, 211, 252, 0.22);
}
.targets {
  fill: var(--amber);
  stroke: var(--amber);
  stroke-width: 1.5;
  background: var(--amber);
}
.legend i.line {
  width: 16px;
  height: 2px;
  border-radius: 0;
  vertical-align: 3px;
}

/* DCF */
.dcf-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  padding: 14px;
  margin-bottom: 18px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.dcf-form label {
  display: grid;
  gap: 4px;
}
.dcf-form input {
  width: 120px;
}
.dcf-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 28px;
}
.scenarios tr.base > *,
.peers tr.current > * {
  background: var(--panel-2);
  font-weight: 700;
}
.breakdown {
  margin: 18px 0 0;
}
.breakdown div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}
.breakdown dt {
  color: var(--muted);
}
.breakdown dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.breakdown .total {
  border-bottom: 1px solid var(--line-2);
  font-weight: 700;
}
.breakdown .total dt {
  color: var(--text);
}
.signals {
  list-style: none;
  margin: 8px 0 14px;
  padding: 0;
}
.signals li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}
.signals strong {
  font-family: var(--mono);
}
details {
  margin-top: 16px;
}
summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
}
details table {
  margin-top: 10px;
}

/* Notebook */
.q {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 8px 12px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.q-num {
  grid-row: span 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  display: grid;
  place-items: center;
  font: 700 13px var(--mono);
  color: var(--lime);
}
.q-text {
  font-weight: 600;
}
.q-text small {
  display: block;
  margin-top: 2px;
  font-weight: 400;
  font-size: 13px;
  color: var(--dim);
}
.q details {
  margin: 6px 0 0;
}
.q details p {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}
.q > :not(.q-num) {
  grid-column: 2;
}
.draft-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-bottom: 14px;
}
textarea[readonly] {
  opacity: 0.6;
}

/* Alerts */
.delivery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.alerts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.alert {
  display: grid;
  gap: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
}
.alert.unread {
  border-left: 4px solid var(--lime);
}
.alert time {
  font: 12px var(--mono);
  color: var(--dim);
}
.alert p {
  margin: 0;
}

/* Settings */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.setting {
  display: grid;
  gap: 6px;
  align-content: start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.setting .field {
  display: flex;
  align-items: center;
  gap: 8px;
}
.setting input {
  width: 120px;
}
.setting .unit {
  font: 13px var(--mono);
  color: var(--muted);
}
.setting .help {
  font-size: 13px;
  color: var(--muted);
}
.setting .default {
  font: 12px var(--mono);
  color: var(--dim);
}

/* Method */
.prose {
  max-width: 780px;
}
.prose h2 {
  margin: 34px 0 10px;
}
.prose ul,
.prose ol {
  padding-left: 20px;
}
.prose li {
  margin: 6px 0;
}
.prose table {
  margin: 10px 0 16px;
}

footer {
  padding-top: 24px;
  padding-bottom: 40px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 12px;
}

@media (max-width: 980px) {
  .top-inner {
    flex-wrap: wrap;
    gap: 10px 16px;
  }
  nav {
    order: 3;
    flex-basis: 100%;
  }
  .scan {
    margin-left: auto;
  }
  .dcf-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  body {
    font-size: 14px;
  }
  .wrap {
    padding-left: 16px;
    padding-right: 16px;
  }
  .top-inner {
    padding: 10px 16px;
  }
  nav {
    overflow-x: auto;
  }
  #scan-status {
    display: none;
  }
  h1 {
    font-size: 24px;
  }
  .price-box {
    justify-items: start;
    text-align: left;
    margin-left: 0;
  }
}

/* Accounts */
.who {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
body.signed-out nav,
body.signed-out .scan,
body.signed-out .who {
  display: none;
}
.auth {
  display: flex;
  justify-content: center;
  padding: 48px 0;
}
.auth form {
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth h1 {
  margin: 0;
}
.auth .form-status:empty {
  display: none;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stack .help {
  font-size: 12px;
  color: var(--dim);
}
.role {
  margin-left: 6px;
  vertical-align: middle;
  font: 700 11px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: var(--lime);
  padding: 3px 7px;
  border-radius: 99px;
}
.account-head {
  margin-top: 40px;
}
.card.account {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}
.card.account select {
  max-width: 100%;
}
table.people td.actions {
  text-align: right;
  white-space: nowrap;
}
table.people td.actions button + button {
  margin-left: 14px;
}
button.link.danger {
  color: var(--red);
}
.invites {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.invites li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

/* Glossary: terms explained in a tooltip after resting the pointer on them (glossary.js) */
.term {
  text-decoration: underline dotted var(--dim);
  text-underline-offset: 3px;
  cursor: help;
}
.term-tip {
  position: fixed;
  z-index: 100;
  max-width: 320px;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.45);
  color: var(--text);
  font: 13px/1.45 var(--sans);
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  white-space: normal;
  pointer-events: none;
}
.term-tip strong {
  display: block;
  margin-bottom: 3px;
  color: var(--lime);
}
