@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-latin-opsz-normal.f94a697b1650.woff2") format("woff2-variations");
  font-style: normal; font-weight: 200 800; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-latin-ext-opsz-normal.2e01db0610b1.woff2") format("woff2-variations");
  font-style: normal; font-weight: 200 800; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-latin-opsz-italic.e97067eb043b.woff2") format("woff2-variations");
  font-style: italic; font-weight: 200 800; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-latin-ext-opsz-italic.43736a955d60.woff2") format("woff2-variations");
  font-style: italic; font-weight: 200 800; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/ibm-plex-sans-latin-wght-normal.b2c9031d9fd6.woff2") format("woff2-variations");
  font-style: normal; font-weight: 100 700; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/ibm-plex-sans-latin-ext-wght-normal.f0e2925b3fa6.woff2") format("woff2-variations");
  font-style: normal; font-weight: 100 700; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/ibm-plex-sans-latin-wght-italic.ed273b4064f8.woff2") format("woff2-variations");
  font-style: italic; font-weight: 100 700; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/ibm-plex-sans-latin-ext-wght-italic.f37d83ce57c1.woff2") format("woff2-variations");
  font-style: italic; font-weight: 100 700; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --serif: "Newsreader", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ground: #f4eee2;      /* pampapapier */
  --surface: #fbf8f1;     /* invoervelden, tooltip */
  --wash: #eae1d0;        /* rustige vlakken: chips, hover, meldingen zonder status */
  --ink: #1d2a33;
  --muted: #5e5a50;
  --line: #d5cab6;        /* haarlijnen */
  --rule: #1d2a33;        /* sterke lijn: onder de kop, boven lijsten en tabellen */
  --field: #8e8574;       /* rand van invoervelden, 3:1 op surface */
  --accent: #b7791f;      /* oker, alleen voor lijnen en markeringen, niet voor tekst */
  --accent-ink: #8c5a12;  /* oker als tekst */
  --go: #2f6b47;
  --go-soft: #dde8da;
  --warn: #8c5a12;
  --warn-soft: #f0e2c3;
  --stop: #a63d26;
  --stop-soft: #f3dcd2;
  --focus: #2f6fd6;
  --series-1: #25557f;    /* strategie, aankoop */
  --series-2: #c4622d;    /* vasthouden, verkoop */

  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.563rem;
  --step-3: 1.953rem;
  --step-4: 2.441rem;
  --small: 0.875rem;
  --radius: 3px;
  --measure: 60rem;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #15191c;
    --surface: #1d2327;
    --wash: #262d31;
    --ink: #eee7da;
    --muted: #a8a193;
    --line: #363c3f;
    --rule: #eee7da;
    --field: #80868a;
    --accent: #d9a044;
    --accent-ink: #e3b25e;
    --go: #72c195;
    --go-soft: #1e3528;
    --warn: #e3b25e;
    --warn-soft: #3a2e17;
    --stop: #ee8e75;
    --stop-soft: #3e231c;
    --focus: #7aa7f0;
    --series-1: #a9ccee;
    --series-2: #d06a34;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 0.22em; }
a:hover { color: var(--accent-ink); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

.number, .num, td.num, input.number { font-variant-numeric: tabular-nums; }

/* ---------- Page frame ---------- */

.top {
  border-bottom: 1.5px solid var(--rule);
  background: var(--ground);
}
.top-inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.375rem;
  letter-spacing: 0;
  text-decoration: none;
  margin-right: auto;
}
.wordmark img { width: 30px; height: 30px; }
.top nav { display: flex; gap: 1.1rem; flex-wrap: wrap; align-items: baseline; }
.top nav a { text-decoration: none; color: var(--ink); }
.top nav a[aria-current="page"] { color: var(--ink); font-weight: 600; box-shadow: none; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 0.35em; }
.top nav form { display: inline; }
.link-button {
  font: inherit; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer;
}
.link-button:hover { color: var(--accent-ink); }

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

h1 { font-family: var(--serif); font-size: var(--step-4); line-height: 1.05; letter-spacing: -0.01em; margin: 0 0 0.5rem; font-weight: 500; }
h2 { font-family: var(--serif); font-size: 1.5rem; line-height: 1.3; margin: 2.25rem 0 0.75rem; font-weight: 500; }
p { margin: 0 0 1rem; max-width: 65ch; }
.lede { color: var(--muted); margin-bottom: 2rem; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-head p { margin: 0; color: var(--muted); }

/* ---------- Messages ---------- */

.messages { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.messages li { padding: 0.75rem 1rem; border-radius: var(--radius); background: var(--go-soft); margin-bottom: 0.5rem; }
.messages li.error { background: var(--stop-soft); }
.messages li.warning { background: var(--warn-soft); }

/* ---------- Accounts ---------- */

.accounts { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--rule); }
.account {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}
.account-name { font-family: var(--serif); font-size: 1.75rem; font-weight: 500; letter-spacing: -0.005em; line-height: 1.2; text-decoration: none; }
.account-meta { color: var(--muted); font-size: var(--small); grid-column: 1; }
.account-meta span + span::before { content: ", "; }
.account-side { grid-row: 1 / span 3; grid-column: 2; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 0.6rem; }

.status { font-weight: 600; font-size: 1.125rem; line-height: 1.2; }
.status.ok { color: var(--go); }
.status.problem { color: var(--stop); }
.status.waiting, .status.off { color: var(--muted); }
.status-detail { font-size: var(--small); color: var(--muted); }

/* The week strip: which days the bot trades */
.week { display: flex; gap: 3px; margin: 0; padding: 0; list-style: none; }
.week li {
  width: 1.7rem; height: 1.7rem;
  display: grid; place-items: center;
  font-size: 0.72rem; font-weight: 600;
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line);
}
.week li.on { background: var(--ink); color: var(--ground); box-shadow: none; }
.account.inactive .week li.on { background: var(--muted); }

.figures { display: flex; gap: 1.25rem; font-size: var(--small); color: var(--muted); grid-column: 1; margin-top: 0.25rem; }
.figures b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

.empty { padding: 2.5rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.empty p { color: var(--muted); }

/* ---------- Buttons ---------- */

.button, button.primary, button.quiet {
  display: inline-block;
  font: inherit; font-weight: 500;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--ground);
  text-decoration: none;
  cursor: pointer;
}
.button:hover, button.primary:hover { filter: none; background: var(--accent-ink); border-color: var(--accent-ink); color: var(--ground); }
.button.quiet, button.quiet {
  background: transparent; color: var(--ink); border-color: var(--ink);
}
.button.quiet:hover, button.quiet:hover { background: var(--wash); border-color: var(--ink); color: var(--ink); }
button.danger { font: inherit; background: none; border: 0; color: var(--stop); cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 0.18em; }

/* ---------- Forms ---------- */

form.settings { display: grid; gap: 0; }
fieldset {
  border: 0; margin: 0; padding: 1.5rem 0;
  border-top: 1px solid var(--line);
  display: grid; gap: 1.1rem;
}
fieldset:first-of-type { border-top: 0; padding-top: 0; }
legend { font-family: var(--serif); font-size: 1.35rem; font-weight: 500; padding: 0; margin-bottom: 0.4rem; float: left; width: 100%; }
legend + * { clear: both; }

.field label, .field .label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.field .help { color: var(--muted); font-size: var(--small); margin-top: 0.3rem; max-width: 60ch; }
.field .errors { color: var(--stop); font-size: var(--small); margin: 0.3rem 0 0; padding: 0; list-style: none; font-weight: 600; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--stop); }

input[type="text"], input[type="search"], input[type="password"], input[type="email"], input[type="number"], input[type="date"], select, textarea {
  font: inherit;
  width: 100%;
  max-width: 28rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--field);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}
textarea { max-width: 100%; }
input.number, .field input[type="number"] { max-width: 9rem; text-align: right; }
input[type="date"] { max-width: 12rem; }
.suffix { color: var(--muted); margin-left: 0.3rem; }

.field.checkbox { display: flex; gap: 0.6rem; align-items: flex-start; }
.field.checkbox input { margin-top: 0.3rem; width: 1.1rem; height: 1.1rem; accent-color: var(--ink); }
.field.checkbox label { margin: 0; font-weight: 600; }

/* Trading days as the same week strip, clickable */
.days { display: flex; gap: 3px; margin: 0; padding: 0; list-style: none; flex-wrap: wrap; }
.days label {
  position: relative;
  display: grid; place-items: center;
  min-width: 2.9rem; height: 2.4rem;
  padding: 0 0.4rem;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px var(--line);
  font-weight: 600; font-size: var(--small);
  cursor: pointer;
  margin: 0;
}
.days input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.days label:has(input:checked) { background: var(--ink); color: var(--ground); box-shadow: none; }
.days label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }

.radios { display: grid; gap: 0.35rem; margin: 0; padding: 0; list-style: none; }
.radios label { font-weight: 400; display: flex; gap: 0.5rem; align-items: baseline; }
.radios input { accent-color: var(--ink); }

.form-actions {
  position: sticky; bottom: 0;
  display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;
  padding: 1rem 0;
  background: var(--ground);
  border-top: 1.5px solid var(--rule);
}

/* ---------- Tables ---------- */

table { width: 100%; border-collapse: collapse; font-size: var(--small); border-top: 1.5px solid var(--rule); }
th, td { text-align: left; padding: 0.55rem 0.75rem 0.55rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; }
td.num, th.num { text-align: right; padding-right: 1.5rem; white-space: nowrap; }
.table-scroll { overflow-x: auto; max-width: 100%; }
.table-scroll td:first-child { white-space: nowrap; }
td.num:last-child, th.num:last-child { padding-right: 0; }

/* ---------- Strategies ---------- */

.strategy { padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.strategy:first-child { border-top: 1.5px solid var(--rule); }
.strategy h2 { font-family: var(--serif); font-size: 1.5rem; margin: 0 0 0.25rem; }
.strategy .kind { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 1rem; margin-bottom: 0.75rem; }
.strategy dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.3rem 1.5rem; margin: 1rem 0 0; font-size: var(--small); max-width: 34rem; }
.strategy dt { color: var(--muted); }
.strategy dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.tag { font-size: 0.8125rem; font-weight: 600; padding: 0 0.4rem; border-radius: 2px; background: none; border: 1px solid currentColor; color: var(--go); }
.tag.off { background: none; color: var(--muted); }
.tag.status-concept { background: none; color: var(--muted); }
.tag.status-test { background: none; color: var(--warn); }
.strategy .audience { margin-left: 0.25rem; }
.strategy .notice { padding: 0.5rem 0.75rem; border-radius: var(--radius); background: var(--warn-soft); font-size: var(--small); max-width: 34rem; }
.radios.described { gap: 0.6rem; }
.radios.described .help { display: block; margin: 0.1rem 0 0; }

/* ---------- Invitation link ---------- */

.new-link {
  padding: 1.25rem; border-radius: var(--radius);
  background: var(--surface); border: 1.5px solid var(--rule);
  margin-bottom: 2rem;
}
.new-link input { max-width: 100%; font-variant-numeric: tabular-nums; margin: 0.5rem 0; }
.new-link p { margin-bottom: 0.5rem; }

/* ---------- Auth pages ---------- */

.narrow { max-width: 24rem; }
.narrow input[type="text"], .narrow input[type="password"], .narrow input[type="email"] { max-width: 100%; }

.auth { display: grid; grid-template-columns: minmax(0, 24rem) 1fr; gap: 3rem; align-items: start; }
.auth-emblem { justify-self: center; }
.auth-emblem img { display: block; width: min(20rem, 100%); height: auto; }

/* ---------- Backtests ---------- */

.comparison { max-width: 30rem; font-size: var(--step-0); margin-bottom: 1rem; }
.comparison th, .comparison td { padding: 0.6rem 1.25rem 0.6rem 0; }
.comparison thead th { color: var(--muted); font-weight: 600; }
.comparison tbody th { color: var(--muted); font-weight: 400; }
.comparison td { font-weight: 650; font-variant-numeric: tabular-nums; }
.verdict { color: var(--muted); max-width: 62ch; }
.verdict b { color: var(--ink); font-variant-numeric: tabular-nums; }
.negative { color: var(--stop); }

.key { display: inline-block; width: 14px; height: 0; border-top: 2px solid; vertical-align: middle; margin-right: 0.4rem; }
.key-1 { border-color: var(--series-1); }
.key-2 { border-color: var(--series-2); border-top-style: dashed; }

.chart-figure { margin: 1.5rem 0 0; padding: 0.75rem 0 0.5rem; background: transparent; border-radius: 0; border: 0; border-top: 1.5px solid var(--rule); }
.chart-figure figcaption { font-family: var(--serif); font-weight: 500; font-size: 1.25rem; margin-bottom: 0.25rem; }
.legend { display: flex; gap: 1.25rem; list-style: none; padding: 0; margin: 0 0 0.5rem; font-size: var(--small); color: var(--muted); }
.chart { position: relative; }
.chart svg { display: block; overflow: visible; }
.chart svg:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.chart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.chart .tick { fill: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.key-1, .chart .end-key.key-1 { stroke: var(--series-1); }
.chart .line.key-2, .chart .end-key.key-2 { stroke: var(--series-2); }
.chart .line.key-2 { stroke-dasharray: 6 4; }
.chart .end-key { stroke-width: 2; }
.chart .end-label { fill: var(--ink); font-size: 12px; font-weight: 600; }
.chart .crosshair { stroke: var(--muted); stroke-width: 1; }
.chart .dot { stroke: var(--surface); stroke-width: 2; }
.chart .dot.key-1 { fill: var(--series-1); }
.chart .dot.key-2 { fill: var(--series-2); }
.tooltip {
  position: absolute; pointer-events: none;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.5rem 0.7rem; font-size: var(--small); min-width: 11rem;
  box-shadow: 0 4px 14px rgb(0 0 0 / 0.10);
}
.tip-date { color: var(--muted); margin-bottom: 0.25rem; }
.tip-row { display: flex; align-items: baseline; gap: 0.4rem; }
.tip-row b { font-variant-numeric: tabular-nums; }
.tip-row span:last-child { color: var(--muted); }
/* Price chart with trades (tradechart.js): buys blue, sells orange, shape as second cue */
.chart .line.price { stroke: var(--muted); stroke-width: 1.5; }
.chart .dot.price { fill: var(--muted); stroke: var(--surface); stroke-width: 2; }
.chart .trade { stroke: var(--surface); stroke-width: 2; stroke-linejoin: round; }
.chart .trade.buy { fill: var(--series-1); }
.chart .trade.sell { fill: var(--series-2); }
.chart .trade.active { stroke: var(--ink); }
.trade-key { display: inline-block; width: 0.75rem; height: 0.65rem; flex: none; }
.trade-key.buy { background: var(--series-1); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.trade-key.sell { background: var(--series-2); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.legend .trade-key { margin-right: 0.35rem; }
.tip-row span.trade-key + span { color: var(--ink); }
.tip-note { color: var(--muted); margin-top: 0.15rem; }
.chart-controls { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: end; margin: 1rem 0 0.5rem; }
.chart-controls label { display: grid; gap: 0.25rem; font-size: var(--small); font-weight: 600; }
.trade-summary { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; font-size: var(--small); color: var(--muted); margin: 0.5rem 0 0; }
.trade-summary b { color: var(--ink); font-variant-numeric: tabular-nums; }
.by-bot { color: var(--muted); }
td.nowrap { white-space: nowrap; }

.table-view, .trades { margin: 0.75rem 0; }
.table-view summary, .trades summary { cursor: pointer; color: var(--muted); font-size: var(--small); }
.table-view table { margin-top: 0.5rem; }
.settings-list { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.3rem 1.5rem; font-size: var(--small); max-width: 34rem; }
.settings-list dt { color: var(--muted); }
.settings-list dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.caveat { margin-top: 2rem; }
.parameter-actions { margin: 0 0 1rem; }
.parameter-actions form { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-top: 0.5rem; }
.parameters { display: grid; gap: 1.1rem; padding-left: 1rem; border-left: 2px solid var(--line); }
[hidden] { display: none !important; }

/* ---------- Holdings & purchases ---------- */

.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.5rem 1rem; }

/* Sub-navigation of an account: like the main menu, a line underneath */
.subnav { display: flex; gap: 1.4rem; flex-wrap: wrap; border-bottom: 1.5px solid var(--rule); margin: 0 0 1.5rem; padding-bottom: 0.5rem; }
.subnav a { text-decoration: none; color: var(--ink); }
.subnav a[aria-current="page"] { font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 0.6em; }
.page-head .account-meta span + span::before { content: " · "; }

/* Overview: strategies per exchange */
table.overview td { vertical-align: top; }
table.overview .row-link { font-family: var(--serif); font-weight: 500; font-size: 1.25rem; }
table.overview tr.inactive td { color: var(--muted); }
table.overview .status { font-size: 1rem; }
.account-figures { font-size: 1rem; margin: 0 0 1rem; flex-wrap: wrap; }

.holdings { margin-bottom: 2.5rem; }
.holdings h2 { margin-top: 0.5rem; }
.holdings h3 { font-size: var(--step-0); margin: 1.75rem 0 0.4rem; }
.settings-title { border-top: 1px solid var(--line); padding-top: 1.5rem; }
.add-coin { display: grid; gap: 1rem; max-width: 28rem; }
.bot-status { font-weight: 600; }
.status-verhandeld, .status-actief { color: var(--go); }
.status-te-klein, .status-niet-te-verhandelen { color: var(--warn); }
.status-uitgesloten { color: var(--muted); }
.messages-inline { padding: 0.75rem 1rem; border-radius: var(--radius); background: var(--go-soft); }
.messages-inline.error { background: var(--stop-soft); }
.messages-inline.warning { background: var(--warn-soft); }
.confirm { margin: 1rem 0 1.5rem; grid-template-columns: max-content 1fr; }
.confirm dd { text-align: left; }

/* ---------- Coin picker ---------- */

.coin-picker-ui { max-width: 28rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; list-style: none; padding: 0; margin: 0 0 0.5rem; }
.chips:empty { display: none; }
.chips li {
  display: inline-flex; align-items: center; gap: 0.2rem;
  padding: 0.15rem 0.2rem 0.15rem 0.6rem; border-radius: 999px;
  background: var(--wash); color: var(--ink); font-weight: 600; font-size: var(--small);
}
.chip-remove {
  font: inherit; line-height: 1; border: 0; background: none; color: var(--muted);
  width: 1.5rem; height: 1.5rem; border-radius: 999px; cursor: pointer; font-size: 1rem;
}
.chip-remove:hover { color: var(--stop); background: var(--surface); }
.coin-search { position: relative; }
.coin-search input { width: 100%; }
.suggestions {
  position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 2px);
  list-style: none; margin: 0; padding: 0.25rem 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 6px 20px rgb(0 0 0 / 0.12);
}
.suggestions li { padding: 0.4rem 0.7rem; cursor: pointer; font-weight: 600; display: flex; justify-content: space-between; gap: 1rem; }
.held-tag { font-weight: 400; color: var(--muted); font-size: var(--small); }
.suggestions li[aria-selected="true"], .suggestions li:hover { background: var(--wash); }
.quick { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; margin-top: 0.5rem; font-size: var(--small); }
.quick-label { color: var(--muted); margin-right: 0.25rem; }
.quick-coin {
  font: inherit; font-weight: 600; padding: 0.15rem 0.55rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
}
.quick-coin:hover { border-color: var(--ink); }
.quick-coin[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.picker-status { color: var(--muted); font-size: var(--small); margin: 0.35rem 0 0; min-height: 1.2em; }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.funds-table input[type="text"] { max-width: 11rem; }
.funds-table input.number { max-width: 8rem; }
.funds-table td { vertical-align: middle; }
.funds-table tr.invalid input { border-color: var(--stop); }
.funds-table .errors { color: var(--stop); font-size: var(--small); font-weight: 600; margin-top: 0.25rem; }
.delete-toggle { display: inline-flex; gap: 0.4rem; align-items: center; font-weight: 400; margin: 0; }
.delete-toggle input { accent-color: var(--stop); }

@media (max-width: 560px) {
  /* Menu stays one line that scrolls sideways; every link stays reachable */
  .top-inner { padding: 0.6rem 1rem 0; gap: 0.1rem; }
  .wordmark { font-size: 1.25rem; }
  .wordmark img { width: 26px; height: 26px; }
  .top nav {
    width: 100%; flex-wrap: nowrap; overflow-x: auto; gap: 1.25rem;
    padding: 0.55rem 0 0.7rem; font-size: var(--small);
    scrollbar-width: none;
  }
  .top nav::-webkit-scrollbar { display: none; }
  .top nav a, .top nav .link-button { white-space: nowrap; }

  main { padding: 1.5rem 1rem 3rem; }
  h1 { font-size: var(--step-3); }
  h2 { font-size: 1.3rem; margin-top: 1.75rem; }
  .account-name { font-size: 1.4rem; }
  .strategy h2 { font-size: 1.3rem; }
  .page-head { flex-direction: column; align-items: stretch; }
  .page-head .button { text-align: center; }

  .account { grid-template-columns: 1fr; }
  .account-side { grid-row: auto; grid-column: 1; align-items: flex-start; text-align: left; flex-direction: column-reverse; }
  .figures { flex-wrap: wrap; gap: 0.25rem 1rem; }
  .subnav { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .subnav a { white-space: nowrap; }

  /* Touch targets of at least 44px */
  .button, button.primary, button.quiet { padding: 0.7rem 1.1rem; }
  .days label { min-width: 2.75rem; height: 2.75rem; }
  .quick-coin { padding: 0.45rem 0.75rem; }
  .chart-controls label, .chart-controls select { width: 100%; }
  .form-actions .button, .form-actions button { flex: 1 1 auto; text-align: center; }

  .auth { grid-template-columns: 1fr; gap: 1.5rem; }
  .auth-emblem { order: -1; }
  .auth-emblem img { width: 8rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
