/* AskMe — vanilla stylesheet (no framework). */
:root {
  --bg: #f4f4f5;
  --card: #fff;
  --line: #e4e4e7;
  --ink: #18181b;
  --muted: #71717a;
  --faint: #a1a1aa;
  --up: #ea580c;
  --down: #2563eb;
  --ok: #15803d;
  --err: #dc2626;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar { background: var(--card); border-bottom: 1px solid var(--line); }
.topbar-inner {
  max-width: 42rem; margin: 0 auto; padding: 0.75rem 1rem;
  display: flex; align-items: baseline; gap: 0.75rem;
}
.brand { font-weight: 800; font-size: 1.125rem; letter-spacing: -0.02em; color: inherit; text-decoration: none; }
.tagline { font-size: 0.75rem; color: var(--muted); }
.container { width: 100%; max-width: 42rem; margin: 0 auto; padding: 1rem; flex: 1; display: grid; gap: 1rem; align-content: start; }
.footer { text-align: center; font-size: 0.75rem; color: var(--faint); padding-bottom: 1.5rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 0.75rem; padding: 1rem; }
.card.row { display: flex; gap: 0.75rem; padding: 0.75rem; }
.card.row:hover { border-color: var(--faint); }
.grow { min-width: 0; flex: 1; }
.title { font-weight: 600; color: inherit; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
a.title:hover { text-decoration: underline; }
h1.qtitle { font-size: 1.25rem; margin: 0 0 0.25rem; }
.meta { font-size: 0.75rem; color: var(--muted); margin: 0.15rem 0 0; }
.body { font-size: 0.875rem; color: #3f3f46; margin: 0.25rem 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.body.full { display: block; white-space: pre-wrap; }
.thumb { height: 3.5rem; width: 3.5rem; object-fit: cover; border-radius: 0.375rem; border: 1px solid var(--line); flex-shrink: 0; }
.qimg { margin-top: 0.75rem; max-height: 24rem; border-radius: 0.375rem; border: 1px solid var(--line); max-width: 100%; }
.side { display: flex; flex-direction: column; align-items: flex-end; gap: 0.25rem; }
.votes { display: flex; align-items: center; gap: 0.25rem; font-size: 0.875rem; user-select: none; }
.votes button { border: 0; background: none; color: var(--muted); padding: 0.25rem 0.5rem; border-radius: 0.375rem; cursor: pointer; font-size: 0.8rem; }
.votes button:hover { background: var(--bg); }
.votes button.active-up { color: var(--up); font-weight: 800; }
.votes button.active-down { color: var(--down); font-weight: 800; }
.votes .score { min-width: 1.5rem; text-align: center; font-family: ui-monospace, monospace; }
.report { border: 0; background: none; color: var(--faint); font-size: 0.75rem; cursor: pointer; }
.report:hover { color: var(--muted); }
.input, .textarea, .select {
  width: 100%; border: 1px solid var(--line); border-radius: 0.375rem;
  padding: 0.5rem 0.75rem; font-size: 0.875rem; font-family: inherit; background: #fff; color: inherit;
}
.textarea { resize: vertical; }
.composer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 0.5rem; }
.composer-row .select { width: auto; }
.spacer { margin-left: auto; }
.btn {
  border: 0; border-radius: 999px; background: var(--ink); color: #fff;
  font-size: 0.875rem; padding: 0.375rem 1rem; cursor: pointer;
}
.btn:disabled { opacity: 0.5; cursor: default; }
.pick { font-size: 0.875rem; padding: 0.375rem 0.75rem; border: 1px solid var(--line); border-radius: 0.375rem; cursor: pointer; background: #fff; }
.pick:hover { background: var(--bg); }
.preview { height: 3rem; width: 3rem; object-fit: cover; border-radius: 0.375rem; border: 1px solid var(--line); }
.hint { font-size: 0.75rem; margin: 0.25rem 0 0; }
.hint.err { color: var(--err); }
.hint.ok { color: var(--ok); }
.controls { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.search { flex: 1; min-width: 10rem; border: 1px solid var(--line); border-radius: 999px; padding: 0.375rem 1rem; font-size: 0.875rem; background: #fff; }
.tagfilter { width: 7rem; border: 1px solid var(--line); border-radius: 999px; padding: 0.375rem 0.75rem; font-size: 0.875rem; background: #fff; }
.sortbtn { font-size: 0.875rem; padding: 0.375rem 0.75rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.sortbtn.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.feed { display: grid; gap: 0.5rem; }
.muted { font-size: 0.875rem; color: var(--muted); }
.back { font-size: 0.875rem; color: var(--muted); text-decoration: none; }
.back:hover { text-decoration: underline; }
.qactions { margin-top: 0.5rem; display: flex; align-items: center; gap: 0.75rem; }
.answer { background: var(--card); border: 1px solid var(--line); border-radius: 0.75rem; padding: 0.75rem; }
.answer .text { font-size: 0.875rem; white-space: pre-wrap; margin: 0; }
.answer .aimg { margin-top: 0.5rem; height: 5rem; border-radius: 0.375rem; border: 1px solid var(--line); }
.answer .arow { margin-top: 0.25rem; display: flex; align-items: center; gap: 0.75rem; }
.answer .who { font-size: 0.75rem; color: var(--faint); }
.replylink { border: 0; background: none; font-size: 0.75rem; text-decoration: underline; cursor: pointer; color: inherit; padding: 0; }
.child { margin: 0.5rem 0 0 1.5rem; border-left: 2px solid var(--line); padding-left: 0.75rem; }
.child .aimg { height: 4rem; }
h2.sub { font-size: 0.875rem; margin: 0 0 0.5rem; }
.linklike { border: 0; background: none; font-size: 0.75rem; text-decoration: underline; cursor: pointer; color: inherit; padding: 0; }
