/* AskCatch buyer app — flagship theme, carried over from the
   storefront (site/styles.css) so a buyer crossing from the
   homepage into the app feels no seam. Day: "ink & amber on
   paper" (midnight ink #17263f + warm amber #ffb25e). Night:
   "the river after dark". Same variable names and values as the
   storefront where the concepts match. The day/night law stands:
   toggle on every page, saved choice wins, theme set before
   first paint (see index.html). */
:root, [data-theme="day"] {
  --bg: #f6f1e6; --surface: #fffdf7; --surface2: #efe6d2;
  --ink: #17263f; --muted: #43536b; --line: #ddd2ba;
  --accent: #ffb25e; --on-accent: #17263f; --catch: #8a5a00; --link: #7a4d00;
  --chip-bg: #efe6d2; --quote-bar: #ffb25e;
  --shadow: 0 10px 30px rgba(23,38,63,.10);
}
[data-theme="night"] {
  --bg: #0c1424; --surface: #152238; --surface2: #1b2c47;
  --ink: #f3edda; --muted: #b9c4d6; --line: #2c3d5c;
  --accent: #ffb25e; --on-accent: #17263f; --catch: #ffb25e; --link: #ffc978;
  --chip-bg: #1b2c47; --quote-bar: #ffb25e;
  --shadow: 0 10px 30px rgba(0,0,0,.45);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--link); }
.topbar { display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; }
.brand img { width: 44px; height: 44px; border-radius: 11px; display: block; }
.wordmark { font-size: 24px; letter-spacing: -.5px; line-height: 1; }
.wordmark .w2 { color: var(--catch); font-weight: 700; }
main.view { max-width: 760px; margin: 0 auto; padding: 20px 16px 48px; }
h1 { font-size: 26px; } h2 { font-size: 21px; margin-top: 28px; }
label { display: block; margin: 12px 0; }
input, textarea { width: 100%; padding: 11px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; }
button { padding: 11px 18px; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--accent); color: var(--on-accent); font: inherit; min-height: 47px; }
button.ghost { background: transparent; color: var(--ink);
  border: 1px solid var(--line); min-height: 44px; padding: 7px 13px; }
button.theme-toggle { width: 44px; height: 44px; min-height: 44px; border-radius: 50%;
  padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.theme-toggle svg { width: 21px; height: 21px; stroke: var(--catch); fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .ic-sun { display: none; }
[data-theme="night"] .theme-toggle .ic-sun { display: block; }
[data-theme="night"] .theme-toggle .ic-moon { display: none; }
.note { color: var(--muted); }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.tab { background: var(--chip-bg); color: var(--ink); min-height: 44px; }
.tab.on { background: var(--accent); color: var(--on-accent); }
.row { display: flex; gap: 12px; align-items: end; justify-content: space-between; flex-wrap: wrap; }
.row form { display: flex; gap: 8px; flex: 1; min-width: 240px; }
.card { background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px; margin: 12px 0; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 6px; font-size: 17px; }
.chip { display: inline-block; background: var(--chip-bg); border-radius: 999px;
  padding: 2px 10px; font-size: 13px; margin: 2px 4px 2px 0; }
.day-head { margin: 22px 0 4px; color: var(--muted); font-weight: 600; }
.card.read { opacity: .68; }
.unread-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); margin-right: 7px; vertical-align: middle; }
.readbtn { margin-top: 8px; }
.teach { background: var(--chip-bg); border-radius: 10px; padding: 12px 16px; margin: 12px 0; }
.teach .weak { color: var(--muted); }
.teach .strong { font-weight: 600; }
.pill { font-size: 13px; border-radius: 999px; padding: 2px 10px; border: 1px solid var(--line); }
.pill.off { color: var(--muted); }
.foot { display: flex; justify-content: space-between; align-items: center;
  margin-top: 36px; border-top: 1px solid var(--line); padding-top: 14px; }
