/* mrktpro dashboard: mobile first, system fonts, light and dark. */

:root {
  --bg: #f6f7f9;
  --side: #fafbfc;
  --panel: #ffffff;
  --panel-2: #eceef3;
  --line: #e7e9ee;
  --text: #171a20;
  --ink: #171a20;
  --ink-text: #ffffff;
  --muted: #5b6472;
  --faint: #7b8391;
  --accent: #3450d6;
  --accent-bg: #e8ecfc;
  --accent-text: #ffffff;
  --pos: #0c8346;
  --neg: #c7312f;
  --watch: #a85a08;
  --pos-bg: #dff3e8;
  --neg-bg: #fde3e0;
  --watch-bg: #fff8ee;
  --watch-line: #f1dcc0;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
  --radius: 12px;
  --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --tabs-h: 62px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f14;
    --side: #0e131a;
    --panel: #121821;
    --panel-2: #1a2230;
    --line: #243041;
    --text: #e7ecf2;
    --ink: #e7ecf2;
    --ink-text: #0b0f14;
    --muted: #9ba8b8;
    --faint: #7d8a9c;
    --accent: #7b92ff;
    --accent-bg: #1c2447;
    --accent-text: #0b0f14;
    --pos: #3cc983;
    --neg: #ff676c;
    --watch: #f0b54f;
    --pos-bg: #0f2a1d;
    --neg-bg: #311518;
    --watch-bg: #2e2512;
    --watch-line: #4a3a18;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
p { margin: 0 0 8px; }
code, pre { font-family: var(--mono); font-size: 13px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── App shell: top bar, bottom tabs on a phone, sidebar on a desktop ──── */

.app { min-height: 100vh; min-height: 100dvh; }
.side { display: none; }

header.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: env(safe-area-inset-top) 10px 0 14px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.top .brand-sq { width: 22px; height: 22px; border-radius: 6px; background: var(--ink); flex: none; margin-right: 2px; }
.top .back {
  display: none;
  flex: none;
  width: 40px;
  height: 40px;
  margin-left: -8px;
  align-items: center;
  justify-content: center;
  border: 0;
  background: none;
  border-radius: 10px;
  color: var(--text);
}
.top.has-back .back { display: flex; }
.top.has-back .brand-sq { display: none; }
.top .title { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .title .crumb { display: none; }
.top .title a { color: var(--muted); font-weight: 400; }
.top .title .sep { color: var(--faint); margin: 0 8px; font-weight: 400; }
.icon-btn { flex: none; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 0; background: none; border-radius: 10px; color: var(--text); }
.icon-btn svg, .top .back svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.palette-trigger, .spend, .top .new-run { display: none; }

.health-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.health-pill:hover { text-decoration: none; }
.health-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.health-pill.ok .dot { background: var(--pos); }
.health-pill.degraded { background: var(--watch-bg); border-color: var(--watch-line); color: var(--watch); }
.health-pill.degraded .dot { background: var(--watch); }
.health-pill.down { background: var(--neg-bg); border-color: var(--neg); color: var(--neg); }
.health-pill.down .dot { background: var(--neg); }
.health-pill .n:empty { display: none; }
.health-pill.ok .n { display: none; }

nav.tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabs-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--panel);
  border-top: 1px solid var(--line);
}
nav.tabs a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--faint); }
nav.tabs a:hover { text-decoration: none; }
nav.tabs svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
nav.tabs a.active { color: var(--accent); font-weight: 600; }
.badge {
  position: absolute;
  top: 6px;
  left: calc(50% + 4px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
}
.badge:empty { display: none; }
body { padding-bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom)); }

@media (min-width: 900px) {
  body { padding-bottom: 0; }
  nav.tabs { display: none; }
  .app { display: grid; grid-template-columns: 264px minmax(0, 1fr); }
  .side {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 18px 14px 16px;
    background: var(--side);
    border-right: 1px solid var(--line);
    overflow-y: auto;
  }
  .side-brand { display: flex; align-items: center; gap: 10px; padding: 0 6px 18px; color: var(--text); }
  .side-brand:hover { text-decoration: none; }
  .side-brand .brand-sq { width: 28px; height: 28px; border-radius: 8px; background: var(--ink); }
  .side-brand b { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
  .side-brand small { margin-left: auto; font: 12px var(--mono); color: var(--faint); }
  .side-nav { display: grid; gap: 2px; }
  .side-nav a { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: 10px; color: var(--text); font-size: 15px; }
  .side-nav a:hover { text-decoration: none; background: var(--panel-2); }
  .side-nav a::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--line); flex: none; }
  .side-nav a.active { background: var(--panel-2); font-weight: 500; }
  .side-nav a.active::before { background: var(--accent); }
  .side-nav .count { margin-left: auto; font-size: 13px; color: var(--muted); }
  .side-label { margin: 22px 12px 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
  .side-wl { display: grid; gap: 2px; }
  .side-wl a { display: flex; align-items: center; height: 36px; padding: 0 12px; border-radius: 10px; color: var(--text); font-size: 14px; }
  .side-wl a:hover { text-decoration: none; background: var(--panel-2); }
  .side-wl a.active { background: var(--panel-2); font-weight: 500; }
  .side-wl .count { margin-left: auto; color: var(--muted); }
  .side-status { margin-top: auto; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); font-size: 13px; color: var(--muted); }
  .side-status:hover { text-decoration: none; }
  .side-status b { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); margin-bottom: 4px; }
  .side-status b::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
  .side-status.ok b::before { background: var(--pos); }
  .side-status.degraded { background: var(--watch-bg); border-color: var(--watch-line); color: var(--watch); }
  .side-status.degraded b { color: var(--watch); }
  .side-status.degraded b::before { background: var(--watch); }
  .side-status.down { background: var(--neg-bg); border-color: var(--neg); color: var(--neg); }
  .side-status.down b { color: var(--neg); }
  .side-status.down b::before { background: var(--neg); }

  header.top { min-height: 66px; padding: 0 28px 0 40px; gap: 14px; }
  .top .brand-sq, .top .back, .top.has-back .back, .top .icon-btn.search, .top .health-pill { display: none; }
  .top .title { font-size: 16px; }
  .top .title .crumb { display: inline; }
  .palette-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 380px;
    max-width: 32vw;
    height: 46px;
    padding: 0 10px 0 16px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--panel);
    color: var(--faint);
    font-size: 15px;
    text-align: left;
  }
  .palette-trigger span { flex: 1; }
  .palette-trigger kbd { padding: 3px 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); font: 11px var(--mono); color: var(--muted); }
  .spend { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); font-size: 14px; color: var(--muted); white-space: nowrap; }
  .spend b { color: var(--text); font-weight: 600; }
  .spend i { display: block; width: 66px; height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; }
  .spend i span { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
  .top .new-run { display: inline-flex; height: 46px; padding: 0 20px; font-size: 15px; }
}

/* ── Layout ────────────────────────────────────────────────────────────── */

main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 16px 28px;
  display: grid;
  gap: 14px;
  align-content: start;
  outline: none;
}
main > * { min-width: 0; }

.cols { display: grid; gap: 12px; }
.cols > * { min-width: 0; }
@media (min-width: 900px) {
  main { padding: 28px 40px 56px; gap: 16px; }
  .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  min-width: 0;
}
.card.error { border-color: var(--neg); background: var(--neg-bg); }
.card.note { background: var(--panel-2); }

.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.between > h2 { margin: 0; }
.stack-v { display: grid; gap: 8px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.num, td.num, th.num { font-variant-numeric: tabular-nums; text-align: right; }
.tabular { font-variant-numeric: tabular-nums; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.watch { color: var(--watch); }
.nowrap { white-space: nowrap; }
.spacer { height: 4px; }

/* ── Details sections ──────────────────────────────────────────────────── */

details.card > summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  margin: -14px -16px;
  padding: 14px 16px;
  border-radius: var(--radius);
}
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary .sum {
  flex: 1;
  min-width: 0;
  text-align: right;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
details.card > summary::after {
  content: "›";
  flex: none;
  color: var(--faint);
  transition: transform 0.15s;
}
details.card[open] > summary::after { transform: rotate(90deg); }
details.card[open] > summary { margin-bottom: 0; }
details.card > .body { padding-top: 12px; display: grid; gap: 12px; }
details.card > .body > * { min-width: 0; }

/* ── Research header ──────────────────────────────────────────────────── */

.head h1 { font-size: 20px; font-weight: 700; }
.head .sym { font-weight: 500; color: var(--muted); font-size: 15px; }
.head .sym.pos { color: var(--pos); }
.head .sym.neg { color: var(--neg); }
.head > .kv, .head > ul.plain { margin-top: 12px; }
.head .quote { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.head .px { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.head .chg { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.head .alt { margin-top: 6px; }

.range { margin-top: 12px; }
.range .track { position: relative; height: 6px; border-radius: 3px; background: var(--panel-2); margin: 6px 0 4px; }
.range .fill { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 3px; background: color-mix(in srgb, var(--accent) 35%, transparent); }
.range .dot {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--panel);
  transform: translate(-50%, -50%);
}
.range .tick { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); opacity: 0.55; transform: translateX(-50%); }
.range .ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.gauge .track { background: linear-gradient(90deg, var(--neg), var(--panel-2) 50%, var(--pos)); height: 8px; border-radius: 4px; }

/* ── Key-value grid ───────────────────────────────────────────────────── */

.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.kv .k { font-size: 12px; color: var(--muted); }
.kv .v { font-weight: 600; font-variant-numeric: tabular-nums; }
.kv .v .sub { font-weight: 400; color: var(--muted); font-size: 13px; }
@media (min-width: 600px) { .kv { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .kv.wide { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ── Signals ──────────────────────────────────────────────────────────── */

ul.signals { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
ul.signals li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 8px; align-items: baseline; }
.mark { font-size: 12px; text-align: center; }
.mark.positive { color: var(--pos); }
.mark.negative { color: var(--neg); }
.mark.watch { color: var(--watch); }
.mark.neutral { color: var(--faint); }
.area { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }

/* ── Tables ───────────────────────────────────────────────────────────── */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* Wide tables scroll sideways under a pinned first column. */
.table-wrap th:first-child, .table-wrap td:first-child { position: sticky; left: 0; z-index: 1; background: var(--panel); }
table { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; text-align: left; vertical-align: baseline; }
th { font-size: 12px; font-weight: 500; color: var(--muted); }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
tr:last-child td { border-bottom: 0; }
td.wrap { white-space: normal; min-width: 180px; }
/* A row-label column (comparisons): wraps so the values fit beside it on a phone. */
th.label, td.label { white-space: normal; min-width: 100px; max-width: 170px; }
table.compact { font-size: 13px; }
table.compact td.text { white-space: normal; }
table.compact th, table.compact td { padding: 6px 5px; }
table.compact th:first-child, table.compact td:first-child { padding-left: 0; }
tr.self td { font-weight: 600; }
td.best { color: var(--pos); font-weight: 600; }

/* ── Lists ────────────────────────────────────────────────────────────── */

ul.plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
ul.plain li { min-width: 0; }
.item-title { font-weight: 500; }
.meta { font-size: 12px; color: var(--muted); }

.day { font-size: 13px; font-weight: 600; color: var(--muted); margin: 6px 0 2px; }
.event { display: grid; grid-template-columns: 48px 12px minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line); }
.event:last-child { border-bottom: 0; }
.event .time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }
.imp { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); display: inline-block; }
.imp.high { background: var(--neg); }
.imp.medium { background: var(--watch); }

/* ── Chips, buttons, forms ────────────────────────────────────────────── */

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
a.chip { color: var(--text); font-size: 14px; padding: 6px 12px; }
a.chip:hover { text-decoration: none; background: var(--line); }
.chip.succeeded, .chip.ok, .chip.verified, .chip.positive, .chip.long { background: var(--pos-bg); color: var(--pos); }
.chip.failed, .chip.down, .chip.unverified, .chip.negative, .chip.short { background: var(--neg-bg); color: var(--neg); }
.chip.running, .chip.queued, .chip.degraded, .chip.warnings, .chip.watch, .chip.stale { background: var(--watch-bg); color: var(--watch); }

.form { display: grid; gap: 10px; }
.form .fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 600px) { .form .fields { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
label.field { display: grid; gap: 4px; font-size: 12px; color: var(--muted); min-width: 0; }
label.check { display: flex; align-items: center; gap: 6px; font-size: 14px; }
input.in, select.in, textarea.in {
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  font-size: 16px;
}
textarea.in { resize: vertical; min-height: 72px; }

/* ── Charts ───────────────────────────────────────────────────────────── */

.chart { position: relative; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linejoin: round; }
.chart .area { fill: var(--accent); opacity: 0.08; stroke: none; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .zero { stroke: var(--faint); stroke-width: 1; stroke-dasharray: 2 3; }
.chart .lvl { stroke-width: 1; stroke-dasharray: 3 4; }
.chart .lvl.sup { stroke: var(--pos); }
.chart .lvl.res { stroke: var(--neg); }
.chart text { fill: var(--faint); font-size: 11px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.chart text.lbl-sup { fill: var(--pos); }
.chart text.lbl-res { fill: var(--neg); }
.chart text.strong { fill: var(--text); font-weight: 600; }
.chart .dot { fill: var(--accent); stroke: var(--panel); stroke-width: 2; }
.chart .cross { stroke: var(--faint); stroke-width: 1; }
.chart .bar.pos { fill: var(--pos); }
.chart .bar.neg { fill: var(--neg); }
.chart .bar.now { opacity: 1; }
.chart .bar { opacity: 0.55; }
.chart .tip {
  position: absolute;
  top: 0;
  left: 0;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--text);
  color: var(--bg);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  white-space: nowrap;
  transform: translateX(-50%);
}
.chart .tip[hidden] { display: none; }

.bars { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--panel-2); }
.bars span { display: block; height: 100%; }
.bars .b-pos { background: var(--pos); }
.bars .b-mid { background: var(--faint); }
.bars .b-neg { background: var(--neg); }
.bars .b-acc { background: var(--accent); }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 6px; }

.pctbar { position: relative; height: 6px; border-radius: 3px; background: var(--panel-2); min-width: 60px; }
.pctbar span { position: absolute; top: -2px; width: 3px; height: 10px; border-radius: 1px; background: var(--accent); transform: translateX(-50%); }

/* ── Position cards ───────────────────────────────────────────────────── */

.positions { display: grid; gap: 12px; }
@media (min-width: 900px) { .positions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pos-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.pos-head .name { font-weight: 700; font-size: 16px; }

/* ── Report markdown ──────────────────────────────────────────────────── */

.md { display: grid; gap: 10px; }
.md h2 { font-size: 18px; margin-top: 8px; }
.md h3 { font-size: 16px; margin-top: 6px; }
.md h4, .md h5, .md h6 { font-size: 15px; }
.md ul, .md ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.md p { margin: 0; }
.md pre { margin: 0; padding: 10px 12px; background: var(--panel-2); border-radius: 8px; overflow-x: auto; }
.md code { background: var(--panel-2); padding: 1px 4px; border-radius: 4px; }
.md pre code { background: none; padding: 0; }
.md blockquote { margin: 0; padding-left: 12px; border-left: 3px solid var(--line); color: var(--muted); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }

/* ── States ───────────────────────────────────────────────────────────── */

.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px 0; color: var(--muted); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2.4s; }
  details.card > summary::after { transition: none; }
}

.clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow: hidden; }
.clamp.open { display: block; }
.linkish { appearance: none; background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-size: 13px; }

.hero h1 { font-size: 22px; margin-bottom: 6px; }

/* ── Design v0.5: page heads, tabs, board, dialogs, runs, setup ────────── */

.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.tk { font-family: var(--mono); font-weight: 700; letter-spacing: -0.01em; }
a.tk { color: var(--text); }
.kbd-hint { font: 11px var(--mono); color: var(--faint); }

.page-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.page-head .grow { flex: 1 1 260px; min-width: 0; }
.page-head h1 { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; }
.page-head .sub { margin: 4px 0 0; font-size: 12px; color: var(--muted); line-height: 1.4; }
.page-head .actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (min-width: 900px) {
  .page-head h1 { font-size: 26px; }
  .page-head .sub { font-size: 14px; }
}

/* Buttons and segmented controls */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  font-weight: 500;
  white-space: nowrap;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn { min-height: 40px; padding: 8px 14px; border-radius: 9px; background: var(--panel); font-size: 13px; }
.btn:hover { border-color: var(--faint); }
.btn.primary:hover { border-color: var(--accent); filter: brightness(1.08); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: var(--ink-text); font-weight: 500; }
.btn.dark:hover { filter: brightness(1.2); border-color: var(--ink); }
.btn.sm { min-height: 32px; padding: 4px 12px; border-radius: 999px; font-size: 13px; }
@media (min-width: 900px) { .btn { font-size: 14px; } }
.seg { display: inline-flex; gap: 2px; padding: 3px; border: 0; border-radius: 9px; background: var(--panel-2); overflow: visible; }
.seg button { padding: 0 13px; min-height: 32px; border: 0; border-radius: 7px; background: transparent; font-size: 13px; color: var(--muted); }
.seg button + button { border-left: 0; }
.seg button.on { background: var(--panel); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }
.seg.fill { display: flex; width: 100%; }
.seg.fill button { flex: 1; min-height: 34px; }

/* Underlined tabs */
.tabs-line { display: flex; gap: 24px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs-line::-webkit-scrollbar { display: none; }
.tabs-line button { flex: none; padding: 12px 0; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; font-size: 15px; color: var(--muted); }
.tabs-line button.on { color: var(--text); font-weight: 600; border-bottom-color: var(--text); }

/* Cards: sentence-case titles, eyebrow labels where a card wants one */
.card { border-radius: 12px; padding: 14px 16px; }
.card > h2, .card .card-title { font-size: 15px; font-weight: 600; letter-spacing: -0.005em; text-transform: none; color: var(--text); margin: 0 0 12px; }
.card > h2 .hint, .card .card-title .hint { margin-left: 8px; font-size: 12px; font-weight: 400; color: var(--muted); }
details.card > summary h2 { font-size: 15px; font-weight: 600; letter-spacing: -0.005em; text-transform: none; color: var(--text); }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.card-head .meta { white-space: nowrap; }
.card-head .spacer-x { margin-left: auto; }
.card a.more { font-size: 12px; color: var(--accent); }
.range .ends { font-size: 12px; }
.gauge .track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--neg-bg), var(--panel-2) 50%, var(--pos-bg)); }
.gauge .dot { width: 3px; height: 14px; border: 0; border-radius: 2px; background: var(--ink); }

/* Chips: state pills with a dot, plus quiet tags */
.chip { padding: 3px 10px; font-size: 12px; background: var(--panel-2); color: var(--muted); }
.chip.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.uptrend { background: var(--pos-bg); color: var(--pos); }
.chip.downtrend { background: var(--neg-bg); color: var(--neg); }
.chip.mixed { background: var(--panel-2); color: var(--muted); }
.chip.running { background: var(--accent-bg); color: var(--accent); }
.chip.queued { background: var(--panel-2); color: var(--muted); }
.chip.cancelled { background: var(--panel-2); color: var(--muted); }
.chip.big { background: var(--accent-bg); color: var(--accent); }
.chip.tag { background: var(--panel-2); color: var(--muted); font-weight: 400; }
.chip.kind { font-weight: 400; }

/* Board */
.board-top { display: grid; gap: 12px; }
.regime-card { display: grid; gap: 10px; text-align: left; width: 100%; cursor: pointer; color: inherit; }
.regime-card:hover { text-decoration: none; border-color: var(--faint); }
.regime-card .row-top { display: flex; align-items: baseline; gap: 10px; }
.regime-card .label { font-size: 17px; font-weight: 600; }
.regime-card .score { font-size: 14px; font-weight: 600; }
.regime-card .open { margin-left: auto; font-size: 12px; color: var(--accent); }
.changes { display: grid; gap: 10px; margin: 8px 0 0; padding: 0; list-style: none; }
.changes li { display: grid; grid-template-columns: 52px 10px minmax(0, 1fr); gap: 8px; align-items: baseline; }
.changes .tone { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); align-self: center; }
.changes .tone.positive { background: var(--pos); }
.changes .tone.negative { background: var(--neg); }
.changes .tone.watch { background: var(--watch); }
.changes-foot { margin-top: 10px; font-size: 12px; color: var(--muted); }
@media (min-width: 900px) {
  .board-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
  .changes li { grid-template-columns: 64px 12px minmax(0, 1fr); }
}
.movers { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-left: 16px; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; }
.movers::-webkit-scrollbar { display: none; }
.mover { flex: 0 0 158px; scroll-snap-align: start; display: grid; gap: 4px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); }
.mover:hover { text-decoration: none; border-color: var(--faint); }
.mover .px { display: flex; align-items: baseline; gap: 8px; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.mover .px .chg { font-size: 13px; }
.mover .why { font-size: 12px; color: var(--muted); }
.mover .nm { font-size: 12px; color: var(--muted); font-weight: 400; }
@media (min-width: 900px) {
  .movers { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
  .mover { flex: 0 0 calc(25% - 8px); max-width: 320px; padding: 16px 18px; }
  .mover .px { font-size: 24px; }
}
table.board th { padding: 12px 10px; font-size: 13px; font-weight: 400; color: var(--muted); background: var(--panel); }
table.board td { padding: 10px; }
table.board tr.group td { padding: 10px 10px 8px; background: var(--panel); font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--line); text-transform: capitalize; }
table.board tr.group td small { margin-left: 6px; font-weight: 400; color: var(--faint); }
table.board tr.brow { cursor: pointer; }
table.board tr.brow:hover td { background: color-mix(in srgb, var(--panel-2) 50%, var(--panel)); }
table.board td.sym { min-width: 88px; }
table.board td.sym .nm { display: block; font-size: 12px; color: var(--muted); font-weight: 400; font-family: var(--font); margin-top: 1px; }
table.board td.sym .chip { margin-top: 6px; }
table.board td.last { font-weight: 500; }
table.board td.flags { white-space: normal; }
table.board td.flags .chip + .chip { margin-left: 4px; }
.board-wrap.flush th:first-child, .board-wrap.flush td:first-child { padding-left: 14px; position: static; }
.board-wrap .table-wrap { overflow-x: visible; }
.hide-sm { display: none; }
@media (min-width: 900px) {
  .hide-sm { display: table-cell; }
  table.board td { padding: 15px 10px; }
  table.board td.sym { display: table-cell; }
  table.board td.sym .nm.sm-only, table.board td.sym .chip.sm-only { display: none; }
  table.board td.name { display: table-cell; }
}
table.board td.name, table.board th.name { display: none; }
table.board td.name { color: var(--text); }
@media (min-width: 900px) { table.board th.name, table.board td.name { display: table-cell; } }

/* Symbol page */
.sym-head { display: grid; gap: 10px; }
.sym-head .idline { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sym-head .idline .tk { font-size: 26px; }
.sym-head .idline .nm { font-size: 16px; color: var(--muted); }
.sym-head .quote { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.sym-head .px { font-size: 34px; font-weight: 600; letter-spacing: -0.02em; }
.sym-head .chg { font-size: 17px; font-weight: 600; }
.sym-head .asof { font-size: 13px; color: var(--muted); }
.sym-actions { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px; scrollbar-width: none; }
.sym-actions::-webkit-scrollbar { display: none; }
.sym-actions .btn { flex: none; white-space: nowrap; }
.sym-top { display: grid; gap: 12px; }
@media (min-width: 900px) {
  .sym-top { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
  .sym-actions { margin: 0; padding: 0; overflow: visible; }
  .sym-head .px { font-size: 40px; }
}
.pane { display: grid; gap: 12px; }
.pane > * { min-width: 0; }
.pane-enter { animation: pane-in 0.12s ease-out; }
@keyframes pane-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pane-enter { animation: none; } }
.legend-inline { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend-inline i { display: inline-block; width: 16px; height: 0; border-top: 2px solid currentColor; vertical-align: middle; margin-right: 5px; }
.legend-inline i.dash { border-top-style: dashed; }
.legend-inline .c-close { color: var(--accent); }
.legend-inline .c-sma { color: #d9922b; }
.legend-inline .c-sup { color: var(--pos); }
.legend-inline .c-res { color: var(--neg); }
.chart .sma { fill: none; stroke: #d9922b; stroke-width: 1.5; stroke-linejoin: round; }
.chart .tag-rect { fill: var(--panel); stroke-width: 1; }
.chart .tag-rect.sup { stroke: var(--pos); }
.chart .tag-rect.res { stroke: var(--neg); }
.chart .tag-text.sup { fill: var(--pos); }
.chart .tag-text.res { fill: var(--neg); }
.snap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 12px; }
.snap .k { font-size: 13px; color: var(--muted); }
.snap .v { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; margin-top: 2px; }
.snap .s { font-size: 13px; color: var(--muted); }
.snap-range { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.snap-range .top-line { display: flex; justify-content: space-between; font-size: 13px; }
.levels td:first-child { white-space: nowrap; }
.levels .lv { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.levels .lv::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.levels .lv.res::before { background: var(--neg); }
.levels .lv.sup::before { background: var(--pos); }
.quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.quick .lbl { font-size: 13px; color: var(--muted); }
.quick .btn.sm { background: var(--panel); }
.size-out { display: grid; gap: 14px; padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--line); }
.size-out .big-line { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.size-out .big-line .qty { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; }
.size-out .stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
@media (min-width: 900px) { .size-out .stats { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.size-out .stats .k { font-size: 13px; color: var(--muted); }
.size-out .stats .v { font-size: 17px; font-weight: 600; }
.size-out .stats .s { font-size: 12px; color: var(--muted); }

/* Dialogs: the palette and the new-run sheet */
dialog { padding: 0; border: 0; border-radius: 16px; background: var(--panel); color: var(--text); box-shadow: 0 24px 70px rgba(16, 24, 40, 0.3); width: min(640px, calc(100% - 32px)); max-height: calc(100dvh - 40px); overflow: auto; }
dialog::backdrop { background: rgba(16, 24, 40, 0.45); }
dialog .dlg-head { padding: 22px 28px 0; }
dialog .dlg-head h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
dialog .dlg-head p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
dialog .dlg-body { display: grid; gap: 16px; padding: 18px 28px 22px; }
dialog .dlg-foot { display: flex; align-items: center; gap: 10px; padding: 16px 28px; border-top: 1px solid var(--line); background: var(--bg); position: sticky; bottom: 0; }
dialog .dlg-foot .cost { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); }
.task-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 620px) { .task-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.task-card { display: grid; align-content: start; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); text-align: left; }
.task-card b { font-size: 15px; }
.task-card span { font-size: 13px; color: var(--muted); line-height: 1.4; }
.task-card[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); background: var(--bg); }
.dlg-field { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.dlg-field .in { font-size: 16px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills button { min-height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); font-size: 14px; }
.pills button[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
@media (max-width: 899px) {
  dialog.sheet { margin: auto 0 0; width: 100%; max-width: none; max-height: 92dvh; border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  dialog.sheet .dlg-head, dialog.sheet .dlg-body, dialog.sheet .dlg-foot { padding-left: 18px; padding-right: 18px; }
  dialog.full { margin: 0; width: 100%; max-width: none; height: 100%; max-height: none; border-radius: 0; }
}
dialog.palette { top: 12vh; margin-top: 0; padding: 0; border-radius: 14px; }
dialog.palette .p-input { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); }
dialog.palette .p-input svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--faint); stroke-width: 1.9; stroke-linecap: round; }
dialog.palette input { flex: 1; min-width: 0; height: 54px; border: 0; outline: 0; background: none; font-size: 17px; }
dialog.palette .p-close { flex: none; height: 32px; padding: 0 10px; border: 0; background: none; color: var(--accent); font-size: 14px; }
dialog.palette .p-list { padding: 8px; display: grid; gap: 2px; max-height: 60vh; overflow-y: auto; }
dialog.palette .p-group { padding: 10px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
dialog.palette .p-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 6px 12px; border: 0; border-radius: 9px; background: none; color: var(--text); text-align: left; font-size: 15px; }
dialog.palette .p-item .nm { color: var(--muted); font-size: 13px; }
dialog.palette .p-item .kind { margin-left: auto; font-size: 12px; color: var(--faint); }
dialog.palette .p-item:hover, dialog.palette .p-item.sel { background: var(--panel-2); }
dialog.palette .p-empty { padding: 18px; color: var(--muted); font-size: 14px; }
@media (max-width: 899px) { dialog.palette { top: 0; } dialog.palette .p-list { max-height: none; } }

/* Runs */
.runs-layout { display: grid; gap: 12px; }
.runs-layout > * { min-width: 0; }
.run-list { display: grid; }
.run-item { display: grid; gap: 4px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--text); border-left: 3px solid transparent; }
.run-item:last-child { border-bottom: 0; }
.run-item:hover { text-decoration: none; background: color-mix(in srgb, var(--panel-2) 40%, var(--panel)); }
.run-item.sel { background: var(--accent-bg); border-left-color: var(--accent); }
.run-item .t { display: flex; align-items: center; gap: 8px; }
.run-item .t b { font-weight: 600; text-transform: capitalize; }
.run-item .t .what { color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.run-item .m { display: flex; gap: 12px; font-size: 13px; color: var(--faint); }
.run-detail .meta-line { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; color: var(--muted); }
.run-detail .meta-line b { font-family: var(--mono); font-weight: 500; color: var(--text); }
.progress { height: 5px; border-radius: 3px; background: var(--panel-2); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.activity { display: grid; gap: 0; margin: 0; padding: 4px 0; list-style: none; }
.activity li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 9px 0; }
.activity .sq { width: 10px; height: 10px; border-radius: 3px; background: var(--faint); align-self: center; }
.activity .sq.ok { background: var(--pos); border-radius: 50%; }
.activity .sq.tool { background: var(--accent); }
.activity .sq.turn { background: var(--ink); }
.activity .sq.bad { background: var(--neg); }
.activity .sq.think { background: color-mix(in srgb, var(--accent) 35%, var(--panel)); border-radius: 50%; }
.activity .what b { font-weight: 600; margin-right: 6px; }
.activity .what code { color: var(--muted); font-size: 13px; }
.activity .what .note { display: block; margin-top: 2px; color: var(--muted); }
.activity .ms { font-size: 13px; color: var(--faint); white-space: nowrap; }
.run-tabs { padding: 0 16px; }
.run-pad { padding: 16px; display: grid; gap: 12px; }
.only-detail .run-list-pane { display: none; }
.only-list .run-detail-pane { display: none; }
@media (min-width: 900px) {
  .runs-layout { grid-template-columns: 390px minmax(0, 1fr); align-items: start; }
  .only-detail .run-list-pane, .only-list .run-detail-pane { display: block; }
  .run-empty { padding: 40px 16px; text-align: center; color: var(--muted); }
}
.run-empty { display: none; }
@media (min-width: 900px) { .only-list .run-empty { display: block; } }

/* Setup and health lists */
.setup-grid { display: grid; gap: 12px; align-items: start; }
@media (min-width: 900px) { .setup-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.setup-card h2 { display: flex; align-items: center; gap: 10px; }
.setup-card h2 .chip { margin-left: auto; font-weight: 500; }
.setup-card h2::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--faint); flex: none; }
.setup-card.ok h2::before { background: var(--pos); }
.setup-card.warn h2::before { background: var(--watch); }
.setup-card.bad h2::before { background: var(--neg); }
dl.rows { display: grid; margin: 0; }
dl.rows > div { display: grid; grid-template-columns: minmax(100px, 160px) minmax(0, 1fr); gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
dl.rows dt { color: var(--muted); }
dl.rows dd { margin: 0; }
.setup-note { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.terminal { padding: 18px 22px; border-radius: 14px; background: #171a20; color: #e7ecf2; }
.terminal .th { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 13px; }
.terminal .th b { font-size: 15px; color: #fff; }
.terminal .th span { flex: 1; color: #9ba8b8; }
.terminal .btn { min-height: 30px; padding: 2px 12px; background: transparent; border-color: #3a4456; color: #e7ecf2; font-size: 13px; }
.terminal pre { margin: 0; font: 14px/1.9 var(--mono); white-space: pre-wrap; }
.terminal pre i { font-style: normal; color: #7d8a9c; margin-right: 10px; }

/* Market */
.comp-grid { display: grid; }
.comp-grid .comp { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 11px 0; border-top: 1px solid var(--line); }
@media (min-width: 900px) { .comp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; } }
.mk-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.mk-head .label { font-size: 26px; font-weight: 600; letter-spacing: -0.01em; }
.mk-head .score { font-size: 18px; font-weight: 600; }
.gauge-wide { margin: 14px 0 6px; }

/* Health chip row */
.health-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.health-list li { display: grid; gap: 2px; padding: 11px 0; border-top: 1px solid var(--line); }
.health-list li:first-child { border-top: 0; padding-top: 0; }

/* Utilities */
.stack { display: grid; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.right { margin-left: auto; }
.only-desktop { display: none; }
@media (min-width: 900px) { .only-desktop { display: initial; } .only-mobile { display: none; } }
.spend[hidden] { display: none !important; }
.app > .page { min-width: 0; }
.slot { display: contents; }
.top .brand-sq { display: none; }
.top.has-brand .brand-sq { display: block; }
.regime-card .ends { display: none; }
.sym-head .idline .tk { display: none; }
.mover .nm { display: none; }
@media (min-width: 900px) {
  .sym-head .idline .tk { display: inline; }
  .mover .nm { display: inline; }
  .top.has-brand .brand-sq { display: none; }
}
@media (max-width: 899px) {
  .wl-seg { display: flex; width: 100%; }
  .wl-seg button { flex: 1; min-height: 34px; }
}

@media (min-width: 900px) { .wl-seg { justify-self: start; } }
@media (max-width: 899px) {
  table.board th, table.board td { padding: 10px 8px; }
  table.board td.sym { white-space: normal; width: 52%; }
  table.board td.sym .nm { white-space: normal; }
  table.board td.last { white-space: nowrap; }
  table.board th:first-child, table.board td:first-child { padding-left: 14px; }
  table.board th:last-child, table.board td:last-child { padding-right: 14px; }
}
dialog.palette .p-item > span:first-child { flex: none; white-space: nowrap; }
dialog.palette .p-item .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
