/* GradeUp Market Brief: one plain stylesheet, mobile first (spec §3.1, §7). */
:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1b2430;
  --muted: #5b6676;
  --border: #dde2e8;
  --accent: #1f4e79;
  --accent-ink: #ffffff;
  --up: #137333;
  --down: #b3261e;
  --notice-bg: #fdecea;
  --ok-bg: #e6f4ea;
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161c;
    --surface: #1a2029;
    --text: #e6eaf0;
    --muted: #9aa6b5;
    --border: #2b3440;
    --accent: #6ea8dc;
    --accent-ink: #0d1117;
    --up: #5fd38a;
    --down: #ff8a80;
    --notice-bg: #3a1f1d;
    --ok-bg: #16301f;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--font);
}
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.25; }
h1 { font-size: 1.75rem; margin: 0 0 .75rem; }
h2 { font-size: 1.25rem; margin: 2rem 0 .5rem; }
h3 { font-size: 1.05rem; margin: 0 0 .35rem; }

.wrap { max-width: 920px; margin: 0 auto; padding: 0 16px; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand { font-weight: 700; color: var(--text); text-decoration: none; }
.brand span { color: var(--accent); }
nav { display: flex; align-items: center; gap: 14px; }
form.inline { display: inline; margin: 0; }

.button, .link-button { font: inherit; cursor: pointer; }
.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  padding: .7rem 1.2rem;
  border-radius: var(--radius);
  border: 0;
  text-decoration: none;
  font-weight: 600;
}
.button:focus-visible, .link-button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.button-small { padding: .4rem .8rem; font-size: .9rem; }
.link-button { background: none; border: 0; color: var(--accent); padding: 0; text-decoration: underline; }

main { padding: 24px 16px 48px; }
.hero { padding: 24px 0 8px; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 640px; }
.pricing { color: var(--muted); font-size: .95rem; margin-top: .75rem; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

.sample { background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); padding: 16px; margin-top: 24px; }
.sample h2 { margin-top: 0; }

.step-list { padding-left: 1.25rem; }
.step-list li { margin: .35rem 0; }

.cards { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.card p { margin: 0; color: var(--muted); }

.narrow { max-width: 520px; }
.notice { padding: 12px 14px; border-radius: var(--radius); }
.notice-error { background: var(--notice-bg); color: var(--down); }
.notice-ok { background: var(--ok-bg); color: var(--up); }
.notice-info { background: var(--surface); border: 1px solid var(--border); }

.stack fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.stack fieldset:disabled { opacity: .6; }
.stack label { font-weight: 600; }
.stack input[type="text"] {
  font: inherit; width: 100%; padding: .65rem .8rem; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text); text-transform: uppercase; letter-spacing: .04em;
}
.stack input[type="text"]:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.stack .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.stack .check input { margin-top: .3rem; width: 18px; height: 18px; flex: none; }
.stack .button { justify-self: start; }
.stack legend { font-weight: 700; padding: 0; margin-bottom: 4px; }
.stack fieldset + fieldset { margin-top: 14px; }
select {
  font: inherit; padding: .5rem .7rem; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text); max-width: 100%;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* picker (§7.6) */
.tabs { display: flex; gap: 6px; margin: 16px 0 10px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.tab { padding: 8px 12px; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; }
.tab-on { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.search-row { display: flex; gap: 8px; align-items: center; max-width: 560px; }
.search-row input[type="search"] {
  flex: 1; min-width: 0; font: inherit; padding: .6rem .8rem; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface); color: var(--text);
}
.search-row input[type="search"]:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.pick-list { list-style: none; padding: 0; margin: 12px 0; max-width: 720px; }
.pick-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 6px;
}
.pick-name { min-width: 0; overflow-wrap: anywhere; }
.pick-name .small { display: block; }
.badge { display: inline-block; font-size: .75rem; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--border); color: var(--muted); margin-right: 6px; }
.button:disabled { opacity: .5; cursor: not-allowed; }
.dev-detail { white-space: pre-wrap; background: var(--surface); border: 1px solid var(--border); padding: 12px; border-radius: var(--radius); overflow-x: auto; }

.prose { max-width: 720px; }
.prose ul { padding-left: 1.25rem; }

.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 20px 0; font-size: .9rem; color: var(--muted); }
.site-footer .disclaimer { margin: 0 0 .5rem; }
.footer-links { margin: 0; }

/* dashboard watchlist figures */
.figures-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 2rem; }
.figures-head h2 { margin: 0; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: 8px; }
table.figures { border-collapse: collapse; width: 100%; font-size: .92rem; }
table.figures th, table.figures td { padding: 8px 7px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
table.figures thead th { font-size: .8rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
table.figures tbody th { font-weight: 600; min-width: 110px; }
table.figures tbody th .small { display: block; font-weight: 400; }
table.figures .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.figures .up { color: var(--up); }
table.figures .down { color: var(--down); }
table.figures .sub { display: block; font-size: .8rem; color: var(--muted); }
table.figures .sub.old { color: var(--down); }
table.figures tr.why td { font-size: .85rem; color: var(--muted); padding-top: 0; }
table.figures tbody tr:last-child th, table.figures tbody tr:last-child td { border-bottom: 0; }
.nowrap { white-space: nowrap; }
