/* Flip OS
 *
 * Design rules, written down because the first attempt broke all of them:
 *  - One number matters per card: the most you should bid. Everything else is
 *    support, and support is quieter.
 *  - Light background, high-contrast text. Reading figures on near-black with
 *    saturated blue for an hour is punishing.
 *  - Colour means something. Green is profit, amber is caution, red is stop.
 *    Nothing else is coloured.
 *  - No uppercase micro-labels. There were dozens and they were unreadable.
 */

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f2f4f7;
  --line: #e3e7ed;
  --line-strong: #cbd3de;

  --ink: #15181d;
  --ink-2: #4a5260;
  --ink-3: #79838f;

  --accent: #1f6feb;
  --accent-soft: #eaf1fe;
  --good: #11804a;
  --good-soft: #e7f6ee;
  --warn: #8a5800;
  --warn-soft: #fdf3e0;
  --stop: #b3261e;
  --stop-soft: #fdeceb;

  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 25, 35, .06), 0 1px 3px rgba(20, 25, 35, .04);
  --shadow-lift: 0 2px 6px rgba(20, 25, 35, .08), 0 8px 24px rgba(20, 25, 35, .06);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14171c;
    --surface: #1b1f26;
    --surface-2: #232830;
    --line: #2b313a;
    --line-strong: #3a424e;
    --ink: #eef1f5;
    --ink-2: #b4bcc8;
    --ink-3: #8b94a1;
    --accent: #6aa3ff;
    --accent-soft: #1d2a3f;
    --good: #5fd39a;
    --good-soft: #14301f;
    --warn: #e9b45c;
    --warn-soft: #33270f;
    --stop: #ff8a80;
    --stop-soft: #3a1917;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-lift: 0 4px 16px rgba(0, 0, 0, .35);
  }
}

:root[data-theme="dark"] {
    --bg: #14171c;
    --surface: #1b1f26;
    --surface-2: #232830;
    --line: #2b313a;
    --line-strong: #3a424e;
    --ink: #eef1f5;
    --ink-2: #b4bcc8;
    --ink-3: #8b94a1;
    --accent: #6aa3ff;
    --accent-soft: #1d2a3f;
    --good: #5fd39a;
    --good-soft: #14301f;
    --warn: #e9b45c;
    --warn-soft: #33270f;
    --stop: #ff8a80;
    --stop-soft: #3a1917;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-lift: 0 4px 16px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 56px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

main { max-width: 900px; margin: 0 auto; padding: 16px; }
@media (max-width: 600px) { main { padding: 12px; } }

/* ---------------------------------------------------------------- header */

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; font-size: 18px; letter-spacing: -.02em; color: var(--ink); }
.brand span { color: var(--accent); }
.pot { display: flex; gap: 14px; align-items: baseline; font-size: 13px; color: var(--ink-3); }
.pot-item b { font-size: 16px; color: var(--ink); font-variant-numeric: tabular-nums; }
.menu-btn {
  background: none; border: 1px solid var(--line-strong); border-radius: 8px;
  color: var(--ink-2); font-size: 18px; line-height: 1; padding: 6px 10px; cursor: pointer;
}

/* four things you actually do, and a quiet menu for the rest */
.tabs { display: flex; gap: 2px; margin-left: 8px; }
.tabs a { padding: 7px 12px; border-radius: 8px; color: var(--ink-2); font-size: 14.5px; font-weight: 500; }
.tabs a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.tabs a:hover { background: var(--surface-2); text-decoration: none; }
@media (max-width: 560px) { .tabs a { padding: 7px 9px; font-size: 13.5px; } }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { background: none; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--ink-2);
  font-size: 15px; line-height: 1; padding: 7px 10px; cursor: pointer; display: inline-block; }
.icon-btn:hover { background: var(--surface-2); }
.more { position: relative; }
.more > summary { list-style: none; }
.more > summary::-webkit-details-marker { display: none; }
.more-menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lift); padding: 6px;
  min-width: 170px; z-index: 40; }
.more-menu a { display: block; padding: 8px 12px; border-radius: 7px; color: var(--ink-2); font-size: 14px; }
.more-menu a:hover { background: var(--surface-2); text-decoration: none; }
.wrap { max-width: 900px; margin: 12px auto 0; padding: 0 16px; }

.banner { padding: 12px 14px; margin: 0 0 12px; font-size: 14px; border-radius: var(--radius); }
.banner.warn { background: var(--warn-soft); color: var(--warn); border: 1px solid var(--warn); }
.banner.ok { background: var(--good-soft); color: var(--good); border: 1px solid var(--good); }

/* ---------------------------------------------------------------- panels */

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 0 0 14px; box-shadow: var(--shadow); }
.panel h2 { margin: 0 0 4px; font-size: 19px; letter-spacing: -.02em; }
.panel h3 { margin: 20px 0 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.panel > h3:first-child { margin-top: 0; }
.sub-head { margin: 0 0 16px; font-size: 14px; color: var(--ink-3); }
.lead { margin: 0 0 12px; font-size: 15px; color: var(--ink-2); }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.none { color: var(--ink-3); font-size: 15px; margin: 4px 0; }
.good { color: var(--good); }

/* ------------------------------------------------------------------- pot */

.pot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.pot-grid > div { background: var(--surface); padding: 12px 14px; }
.pot-grid span { display: block; font-size: 12.5px; color: var(--ink-3); margin-bottom: 2px; }
.pot-grid b { font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.pot-grid .hl b { color: var(--accent); }

/* ------------------------------------------------------------- the plan */

.plan { list-style: none; margin: 0; padding: 0; }
.plan li { display: flex; gap: 12px; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--line); }
.plan li:first-child { border-top: 0; }
.plan-n { width: 22px; flex: none; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.plan-main { flex: 1; min-width: 0; }
.plan-main b { font-weight: 600; }
.plan-figs { display: flex; gap: 12px; font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ----------------------------------------------------------------- cards */

.cards { display: grid; grid-template-columns: 1fr; gap: 12px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card:hover { box-shadow: var(--shadow-lift); }

.card-top { display: flex; gap: 14px; padding: 14px; align-items: flex-start; }
.thumb { width: 72px; height: 72px; flex: none; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.card-head { flex: 1; min-width: 0; }
.card-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }

.title { display: block; font-size: 16px; font-weight: 600; color: var(--ink); line-height: 1.3; letter-spacing: -.01em; }
.title:hover { color: var(--accent); text-decoration: none; }
.sub { font-size: 13px; color: var(--ink-3); margin-top: 4px; }

/* the one number that matters */
.verdict { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 12px 14px; background: var(--surface-2); border-top: 1px solid var(--line); }
.verdict-main { font-size: 15px; color: var(--ink-2); }
.verdict-main b { font-size: 24px; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.verdict .profit { margin-left: auto; font-size: 15px; color: var(--good); font-weight: 600; font-variant-numeric: tabular-nums; }
.card.stop .verdict { background: var(--stop-soft); }
.card.stop .verdict-main b { color: var(--stop); }

.facts { display: flex; flex-wrap: wrap; gap: 4px 20px; padding: 12px 14px 0; font-size: 13.5px; color: var(--ink-2); }
.facts span { font-variant-numeric: tabular-nums; }
.facts b { color: var(--ink); font-weight: 600; }

.flags { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 14px 0; }
.flag { font-size: 12px; padding: 3px 9px; border-radius: 20px; background: var(--surface-2); color: var(--ink-3); border: 1px solid var(--line); }
.flag.stop { background: var(--stop-soft); color: var(--stop); border-color: var(--stop); }
.flag.warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.flag.good { background: var(--good-soft); color: var(--good); border-color: var(--good); }

/* same shape as a flag, used in tables and in JS-rendered output */
.tag { display: inline-block; font-size: 12px; padding: 3px 9px; border-radius: 20px;
  background: var(--surface-2); color: var(--ink-3); border: 1px solid var(--line); }
.tag.bad { background: var(--stop-soft); color: var(--stop); border-color: var(--stop); }
.tag.good { background: var(--good-soft); color: var(--good); border-color: var(--good); }

.status-pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 6px; }
.status-buy { background: var(--good-soft); color: var(--good); }
.status-watch { background: var(--warn-soft); color: var(--warn); }
.status-review { background: var(--surface-2); color: var(--ink-3); }
.status-stop { background: var(--stop-soft); color: var(--stop); }
.rank { color: var(--ink-3); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }

.clock { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; margin-left: auto; }
.clock.soon { color: var(--warn); font-weight: 600; }
.clock.urgent { color: var(--stop); font-weight: 700; }

.card-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 14px; margin-top: 12px; border-top: 1px solid var(--line); }
.card-actions form { margin: 0; display: flex; gap: 6px; align-items: center; }
.won-form input { width: 80px; margin: 0; padding: 7px 9px; font-size: 14px; }
.won-label { font-size: 13px; color: var(--ink-3); }

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink);
  border-radius: 8px; padding: 9px 14px; font-size: 14px; font-weight: 500;
  cursor: pointer; font-family: inherit; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); color: #fff; }
.btn.on { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); font-weight: 600; }
.btn.won { background: var(--good-soft); border-color: var(--good); color: var(--good); font-weight: 600; }
.btn.small { padding: 6px 10px; font-size: 13px; }

/* ----------------------------------------------------------------- forms */

label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 12px; font-weight: 500; }
input, select, textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink);
  border-radius: 8px; padding: 9px 11px; font-size: 15px; margin-top: 5px; font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
input[type=checkbox] { width: auto; margin: 0; }
.grid2 { display: grid; grid-template-columns: 1fr; gap: 0 16px; }
@media (min-width: 620px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.grid2 .wide { grid-column: 1 / -1; }
.grid2 button { justify-self: start; grid-column: 1 / -1; margin-top: 4px; }
.inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.inline label { margin: 0; flex: 1 1 140px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filters input, .filters select { width: auto; flex: 1 1 130px; margin: 0; }
.stack label { margin-bottom: 14px; }

/* ---------------------------------------------------------------- tables */

table.kv { width: 100%; border-collapse: collapse; font-size: 14px; margin: 6px 0; }
table.kv th { text-align: left; color: var(--ink-3); font-weight: 600; font-size: 12.5px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.kv td { padding: 8px 10px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
table.kv td:first-child { color: var(--ink-2); font-variant-numeric: normal; }
table.kv tr.tot td { font-weight: 700; border-top: 2px solid var(--line-strong); border-bottom: 0; color: var(--ink); }
table.kv tr.excluded { opacity: .45; }
.wide-table { display: block; overflow-x: auto; }

/* --------------------------------------------------------------- bundles */

.bundle { border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 12px; background: var(--surface); }
.bundle-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.bundle-head b { font-size: 16px; }
.bundle-figs { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; color: var(--ink-2); margin: 10px 0; font-variant-numeric: tabular-nums; }
.bundle-lots { list-style: none; margin: 8px 0 0; padding: 0; font-size: 14px; }
.bundle-lots li { padding: 8px 0; border-top: 1px solid var(--line); }
.bundle-lots span { display: block; color: var(--ink-3); font-size: 13px; margin-top: 2px; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ lot detail */

.images { display: flex; gap: 8px; overflow-x: auto; margin: 14px 0; }
.images img { height: 150px; border-radius: 8px; background: var(--surface-2); }
.desc { white-space: pre-wrap; font-size: 14.5px; color: var(--ink-2); }
.calc { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.calc input { width: 130px; margin: 0; }
.calcout { flex: 1 1 100%; font-size: 14px; }

.figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin: 14px 0; }
.figs > div { background: var(--surface); padding: 10px 12px; }
.figs span { display: block; font-size: 12.5px; color: var(--ink-3); }
.figs b { font-size: 17px; font-variant-numeric: tabular-nums; }
.figs .hl { background: var(--accent-soft); }
.figs .hl b { color: var(--accent); }

.alarm { background: var(--stop-soft); border: 1px solid var(--stop); color: var(--stop); padding: 12px 14px; border-radius: 10px; font-weight: 600; margin: 12px 0; }
.risk { font-size: 13.5px; color: var(--ink-3); margin: 10px 0 0; }

/* ----------------------------------------------------------- misc blocks */

.vq { border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 10px; background: var(--surface); }
.vq-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.vq-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 10px; }
.vq-actions .inline { flex: 1 1 260px; }

.alerts { margin: 10px 0 0; }
.alerts > .chk { margin-bottom: 12px; }
.alerts-row { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: flex-end; margin-bottom: 14px; }
.alerts .chk { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); font-weight: 400; cursor: pointer; }
.alerts .mins { margin: 0; flex: 1 1 220px; }
.alerts .btn { flex: none; }

.tier { border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 12px; }
.tier-head { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin-bottom: 8px; }
.tier-name { flex: 1 1 200px; margin: 0; }
.tier-on, .tier-del { margin: 0; text-align: center; }
.tier-on input, .tier-del input { width: auto; }

.purchase { border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 12px; }
.purchase-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.watch-extra { padding: 0 14px 14px; }
details summary { list-style: none; display: inline-block; margin: 10px 0; cursor: pointer; }
details summary::-webkit-details-marker { display: none; }
details > summary { outline: none; }
details > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* A whole panel that folds away. Detail belongs behind one of these, never on
 * the page by default: the answer first, the arithmetic on request. */
details.panel { padding: 0; }
details.panel > summary {
  display: flex; align-items: center; gap: 9px;
  margin: 0; padding: 16px 18px; width: 100%;
  font-size: 17px; font-weight: 600; letter-spacing: -.02em; color: var(--ink);
  border-radius: var(--radius);
}
details.panel > summary::before {
  content: "›"; flex: none; font-size: 19px; line-height: 1; color: var(--ink-3);
  transition: transform .15s ease;
}
details.panel[open] > summary::before { transform: rotate(90deg); }
details.panel[open] > summary { border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
details.panel > summary:hover { background: var(--surface-2); }
details.panel > summary h2 { display: inline; margin: 0; font-size: inherit; font-weight: inherit; }
details.panel > *:not(summary) { margin-left: 18px; margin-right: 18px; }
details.panel > *:last-child { margin-bottom: 18px; }
details.panel > form:not(:last-child) { margin-bottom: 18px; }
details.panel > h3:first-of-type { margin-top: 16px; }
details.panel > details { margin-bottom: 14px; }

.tzfoot { text-align: center; padding: 16px 0 0; font-size: 12.5px; }

/* ----------------------------------------------------------------- login */

.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--bg); }
.login { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px; width: min(380px, 92vw); box-shadow: var(--shadow-lift); }
.login h1 { margin: 0 0 20px; font-size: 26px; letter-spacing: -.02em; }
.login h1 span { color: var(--accent); }
.login .err { background: var(--stop-soft); color: var(--stop); padding: 10px; border-radius: 8px; font-size: 13.5px; }
.login button { width: 100%; margin-top: 8px; justify-content: center; }

/* the page you land on says what to do, so it leads */
.hero { border-color: var(--line-strong); }
.hero h2 { font-size: 22px; }


/* ----------------------------------------------------- the one sentence */

/* Every page leads with a line a person can act on without decoding
 * anything. It is the largest text on the page for that reason. */
.verdict-line {
  margin: 14px 0 6px; font-size: 19px; line-height: 1.45; color: var(--ink);
  letter-spacing: -.01em;
}
.verdict-line b { font-variant-numeric: tabular-nums; }
.verdict-line.stop { color: var(--stop); }

.hero .card-actions { border-top: 1px solid var(--line); margin: 16px -18px -18px; padding: 14px 18px;
  background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.hero h2 { font-size: 22px; line-height: 1.3; margin-bottom: 6px; }
.hero .card-meta { margin-bottom: 10px; }
.hero .clock { margin-left: 0; }

/* facts as a list of short sentences, not a wall of labelled boxes */
dl.plain { margin: 6px 0 0; }
dl.plain > div { display: grid; grid-template-columns: 150px 1fr; gap: 14px;
  padding: 11px 0; border-top: 1px solid var(--line); }
dl.plain > div:first-child { border-top: 0; padding-top: 2px; }
dl.plain dt { color: var(--ink-3); font-size: 13.5px; margin: 0; }
dl.plain dd { margin: 0; font-size: 14.5px; color: var(--ink-2); }
dl.plain dd b { color: var(--ink); }
@media (max-width: 560px) {
  dl.plain > div { grid-template-columns: 1fr; gap: 3px; }
}

/* bundles and price checks read as prose with a list under them */
.bundle .verdict-line, .vq .verdict-line { font-size: 16.5px; margin-top: 0; }
.bundle { padding: 16px; }
.bundle-lots li { display: flex; flex-wrap: wrap; gap: 2px 12px; justify-content: space-between; }
.bundle-lots li a { flex: 1 1 220px; }
.bundle-lots span { display: inline; margin: 0; }
.vq-head { margin-bottom: 6px; }
.vq-head .clock { margin-left: 0; flex: none; }
.vq-actions { border-top: 1px solid var(--line); padding-top: 12px; }
.vq-actions input { width: 90px; margin: 0; }

/* on a phone the buttons are the interface, so give them room */
@media (max-width: 560px) {
  .card-actions, .vq-actions { gap: 8px; }
  .card-actions .btn, .vq-actions .btn { flex: 1 1 auto; justify-content: center; }
  .verdict-line { font-size: 17.5px; }
  .hero h2 { font-size: 20px; }
}

.pot-note { margin-top: 14px; }

/* "I won it" is rare next to "open the listing", so it stays folded until
 * you need it rather than putting a text box on every card. */
.won-fold { margin: 0; }
.won-fold > summary { margin: 0; }
.won-fold[open] > summary { display: none; }
.won-fold .won-form { display: flex; gap: 6px; align-items: center; margin: 0; }
.won-fold .won-form input { width: 86px; margin: 0; padding: 7px 9px; font-size: 14px; }

/* A tick box reads as a sentence you switch on, not as a labelled field. */
.chk-field { margin-bottom: 14px; }
.chk-line { display: flex; align-items: center; gap: 9px; font-size: 14.5px; color: var(--ink); }
.chk-line input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--accent); flex: none; }
.chk-field .muted { display: block; margin-top: 4px; padding-left: 26px; }

/* On a phone the header has to hold four tabs and still fit. The free-cash
 * figure goes, because the page you land on states it in full anyway. */
@media (max-width: 640px) {
  .topbar { padding: 10px 12px; gap: 6px; }
  .brand { font-size: 16px; }
  /* two rows: who you are and the controls, then the tabs across the full
   * width, so no tab ends up half a word wide */
  .topbar { flex-wrap: wrap; }
  .tabs { order: 3; flex: 1 0 100%; margin: 4px 0 0; gap: 4px; }
  .tabs a { flex: 1 1 0; text-align: center; padding: 8px 6px; font-size: 13.5px; }
  .topbar-right { gap: 4px; }
  .topbar-right .pot-item { display: none; }
  .icon-btn { padding: 7px 8px; }
}


/* Best buys: a filter bar you read as a sentence, and a group that has to
 * hold its own in the same ranking as a single lot. */
.filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin: 4px 0 0; }
.filter { margin: 0; flex: 1 1 150px; font-size: 13px; }
.filter input, .filter select { width: 100%; margin-top: 4px; }
.filters .btn { flex: 0 0 auto; }

.group-card { border-color: var(--line-strong); }
.group-card .bundle-lots { padding: 10px 14px 0; margin: 0; }
.group-card .bundle-lots li:first-child { border-top: 0; }


/* The evidence for the resale price, on the card, under the number it
 * justifies. A price with no source behind it is a guess wearing a suit. */
.why { margin: 10px 14px 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-2);
  padding-left: 11px; border-left: 2px solid var(--line-strong); }

.over-limit { margin: 10px 14px 0; font-size: 12.5px; color: var(--warn); }
.result-count { margin: 14px 0 0; }
.wide-filter { flex: 2 1 200px; }


/* The filter bar is the second thing you want on a phone, not the first:
 * six fields filled the whole screen and pushed every deal below the fold.
 * It folds away there and stays open on a wider screen. */
.filter-fold > summary { margin: 4px 0 0; }
@media (min-width: 720px) {
  .filter-fold > summary { display: none; }
  .filter-fold > .filters { display: flex !important; }
}
@media (max-width: 719px) {
  .filter-fold .filter { flex: 1 1 130px; }
  .filter-fold .wide-filter { flex: 1 1 100%; }
  .filter-fold .filters { margin-top: 12px; }
}
