/* StockSense | one stylesheet for every page (D26). Dark by default, light on request:
   the theme is the data-theme attribute of <html>, set by app.js from the visitor's choice. */
:root {
  --bg: #0f1720; --panel: #17212d; --line: #263445; --text: #e6edf3; --muted: #93a1b0;
  --accent: #3fb6a8; --accent-ink: #06231f; --up: #3fbf7f; --down: #ef6b6b; --warn: #f0b354;
  --radius: 10px; --max: 1080px;
}
html[data-theme="light"] {
  --bg: #f6f8fa; --panel: #ffffff; --line: #d8dee6; --text: #17212d; --muted: #5b6876;
  --accent: #14796d; --accent-ink: #ffffff; --up: #17794a; --down: #c0392b; --warn: #9a6400;
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 1rem/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  display: flex; flex-direction: column; min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.9rem; line-height: 1.2; margin: 0 0 .6rem; }
h2 { font-size: 1.15rem; margin: 0 0 .7rem; }
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: .7rem 1rem; border-bottom: 1px solid var(--line); background: var(--panel);
}
.brand { display: flex; align-items: center; gap: .5rem; color: var(--text); font-weight: 700; font-size: 1.1rem; }
.brand:hover { text-decoration: none; }
nav { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
main { flex: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: 1.5rem 1rem 2.5rem; }
section { margin-bottom: 2rem; }
.narrow { max-width: 30rem; margin-left: auto; margin-right: auto; }
.hero { padding: 1.5rem 0 .5rem; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 44rem; }
.muted { color: var(--muted); font-size: .92rem; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .8rem; }
.tile, .card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.tile { display: flex; flex-direction: column; gap: .15rem; }
.tile .k { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.tile .v { font-size: 1.45rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.up { color: var(--up); } .down { color: var(--down); }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1rem; }
.card ul { margin: 0; padding-left: 1.1rem; } .card li { margin: .3rem 0; }
.card.accent { border-color: var(--accent); }
.tag { font-size: .72rem; font-weight: 600; color: var(--accent-ink); background: var(--accent); border-radius: 99px; padding: .12rem .55rem; vertical-align: middle; }
form { display: flex; flex-direction: column; gap: .45rem; }
form.inline { display: inline-flex; flex-direction: row; align-items: center; gap: .35rem; margin: 0; }
label { font-size: .9rem; margin-top: .45rem; }
input, select {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line);
  border-radius: 8px; padding: .55rem .7rem; min-width: 0;
}
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn {
  display: inline-block; font: inherit; font-weight: 600; cursor: pointer; text-align: center;
  color: var(--accent-ink); background: var(--accent); border: 1px solid var(--accent);
  border-radius: 8px; padding: .6rem 1.1rem; margin-top: .7rem;
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.small { padding: .3rem .7rem; margin-top: 0; font-size: .88rem; }
button.link { font: inherit; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; }
button.link:hover { text-decoration: underline; }
.error, .note { border-radius: 8px; padding: .6rem .8rem; border: 1px solid var(--down); color: var(--down); }
.note { border-color: var(--accent); color: var(--text); }
.facts { display: grid; grid-template-columns: 7rem 1fr; gap: .35rem .8rem; margin: 1rem 0 1.4rem; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; }
tr.off td { color: var(--muted); }
.actions { display: flex; gap: .5rem; align-items: center; }
.actions input, .actions select { padding: .25rem .4rem; font-size: .88rem; }
.actions input { width: 4.2rem; }
/* A page with a wide table may use the whole window instead of the reading width. */
@media (min-width: 70rem) { .wide { width: calc(100vw - 3rem); max-width: 96rem; margin-left: 50%; transform: translateX(-50%); } }
footer { border-top: 1px solid var(--line); padding: 1rem; color: var(--muted); font-size: .85rem; text-align: center; }
footer p { max-width: var(--max); margin: .25rem auto; }
.stamp strong { color: var(--text); font-weight: 600; }
@media (max-width: 34rem) { h1 { font-size: 1.5rem; } .top { padding: .6rem .8rem; } nav { gap: .7rem; } }
