/* vastaukset.fi v2 — mobile-first, system fonts, light/dark */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #eef0f3;
  --surface-3: #e4e7ec;
  --text: #191c21;
  --text-2: #3a3f47;
  --muted: #5f6672;
  --line: #e2e5ea;
  --line-2: #d3d7de;
  --brand: #0b7a6a;
  --brand-2: #09685a;
  --brand-ink: #ffffff;
  --brand-soft: #e2f3ef;
  --brand-line: #a9dccf;
  --up: #e8590c;
  --up-soft: #fff0e6;
  --down: #4c5fd5;
  --down-soft: #eceefe;
  --danger: #c4302b;
  --danger-soft: #fdeceb;
  --warn: #9a6400;
  --warn-soft: #fff4d9;
  --ai: #6941c6;
  --ai-soft: #f1ecfc;
  --ai-line: #ddd0f7;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.16);
  --radius: 16px;
  --radius-sm: 12px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

html[data-theme='dark'] {
  --bg: #0e1013;
  --surface: #16191e;
  --surface-2: #1e2228;
  --surface-3: #282d35;
  --text: #e9ebee;
  --text-2: #cdd1d7;
  --muted: #9aa1ab;
  --line: #262a31;
  --line-2: #343a43;
  --brand: #34b8a3;
  --brand-2: #4fcab6;
  --brand-ink: #06231e;
  --brand-soft: #102b27;
  --brand-line: #1f5a50;
  --up: #ff8a3d;
  --up-soft: #3a2314;
  --down: #8c9bff;
  --down-soft: #1f2440;
  --danger: #ff6b63;
  --danger-soft: #3a1817;
  --warn: #f2b84b;
  --warn-soft: #33270f;
  --ai: #b69cff;
  --ai-soft: #221b36;
  --ai-line: #3b2f5e;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme='light']) {
    --bg: #0e1013;
    --surface: #16191e;
    --surface-2: #1e2228;
    --surface-3: #282d35;
    --text: #e9ebee;
    --text-2: #cdd1d7;
    --muted: #9aa1ab;
    --line: #262a31;
    --line-2: #343a43;
    --brand: #34b8a3;
    --brand-2: #4fcab6;
    --brand-ink: #06231e;
    --brand-soft: #102b27;
    --brand-line: #1f5a50;
    --up: #ff8a3d;
    --up-soft: #3a2314;
    --down: #8c9bff;
    --down-soft: #1f2440;
    --danger: #ff6b63;
    --danger-soft: #3a1817;
    --warn: #f2b84b;
    --warn-soft: #33270f;
    --ai: #b69cff;
    --ai-soft: #221b36;
    --ai-line: #3b2f5e;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--brand);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

h1,
h2,
h3 {
  line-height: 1.25;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 {
  font-size: 1.55rem;
  font-weight: 750;
}
h2 {
  font-size: 1.15rem;
  font-weight: 700;
}
p {
  margin: 0 0 0.75em;
}
p:last-child {
  margin-bottom: 0;
}
img,
svg {
  max-width: 100%;
}
.ico {
  flex: none;
  vertical-align: -0.2em;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent);
  outline-offset: 2px;
  border-radius: 6px;
}

.sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--brand);
  color: var(--brand-ink);
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
}
.skip:focus {
  top: 10px;
}

.muted {
  color: var(--muted);
}
.small {
  font-size: 0.85rem;
}
.hint {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 14px;
}

/* ---------------------------------------------------------------- header */

.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
.top-in {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 60px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  text-decoration: none !important;
  flex: none;
}
.logo-mark {
  color: var(--brand);
  display: inline-flex;
}
.logo-mark svg path:last-child {
  stroke: var(--brand);
}
.logo-tld {
  color: var(--muted);
  font-weight: 600;
}
.top-search {
  display: none;
  position: relative;
  flex: 1;
  max-width: 460px;
  margin-left: 12px;
}
.top-search .ico {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}
.top-search input[type='search'] {
  width: 100%;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0 14px 0 38px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
}
.top-search input[type='search']:focus {
  border-color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent);
}
.top-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}
.icon-btn {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  text-decoration: none !important;
}
.icon-btn:hover {
  background: var(--surface-2);
}
.btn-ask {
  margin-left: 4px;
}
.btn-ask span {
  display: none;
}
@media (max-width: 419px) {
  .btn.btn-ask {
    width: 44px;
    padding: 0;
    border-radius: 999px;
  }
}
@media (min-width: 420px) {
  .btn-ask span {
    display: inline;
  }
}
@media (min-width: 760px) {
  .top-search {
    display: block;
  }
  .only-mobile {
    display: none;
  }
  .wrap {
    padding: 0 20px;
  }
}

/* ---------------------------------------------------------------- layout */

.main {
  flex: 1;
  padding-top: 14px;
  padding-bottom: 48px;
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
.content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
@media (min-width: 980px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
  }
  .side {
    position: sticky;
    top: 76px;
  }
  .main {
    padding-top: 22px;
  }
}
.narrow {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}
.narrow-wide {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
@media (min-width: 600px) {
  .card {
    padding: 20px;
  }
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 650;
  font-size: 0.97rem;
  cursor: pointer;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, transform 0.05s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--brand);
  color: var(--brand-ink);
}
.btn-primary:hover {
  background: var(--brand-2);
}
.btn-soft {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--line);
}
.btn-soft:hover {
  background: var(--surface-3);
}
.btn-ghost {
  background: transparent;
  color: var(--text-2);
}
.btn-ghost:hover {
  background: var(--surface-2);
}
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-sm {
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.92rem;
}
.btn-xs {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.82rem;
  border-radius: 9px;
}
.btn-block {
  width: 100%;
}
.btn[disabled],
.btn.is-busy {
  opacity: 0.6;
  pointer-events: none;
}
.link-btn {
  background: none;
  border: 0;
  padding: 6px;
  margin: -6px 0;
  color: var(--muted);
  cursor: pointer;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
}
.link-btn:hover {
  color: var(--brand);
  background: var(--surface-2);
}

/* ---------------------------------------------------------------- forms */

input[type='text'],
input[type='search'],
input[type='email'],
input:not([type]),
textarea,
select {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea {
  resize: vertical;
  min-height: 96px;
  line-height: 1.5;
}
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent);
}
::placeholder {
  color: color-mix(in srgb, var(--muted) 85%, transparent);
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-2);
}
.field > span {
  padding-left: 2px;
}
.form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.form-msg {
  margin: 8px 0 0;
  font-size: 0.9rem;
  min-height: 0;
}
.form-msg:empty {
  display: none;
}
.form-msg.is-error {
  color: var(--danger);
}
.form-msg.is-ok {
  color: var(--brand);
}
.ts-box {
  margin-top: 10px;
  min-height: 0;
}
.ts-box:empty {
  margin: 0;
}

.as-nick {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
}
.as-nick b {
  color: var(--text-2);
}

/* ---------------------------------------------------------------- avatar & labels */

.avatar {
  --h: 200;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  flex: none;
  display: inline-grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 750;
  color: hsl(var(--h) 65% 30%);
  background: hsl(var(--h) 70% 88%);
}
html[data-theme='dark'] .avatar {
  color: hsl(var(--h) 70% 82%);
  background: hsl(var(--h) 35% 24%);
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme='light']) .avatar {
    color: hsl(var(--h) 70% 82%);
    background: hsl(var(--h) 35% 24%);
  }
}
.avatar-ghost {
  background: var(--surface-2) !important;
  color: var(--muted) !important;
  border: 1px dashed var(--line-2);
}
.avatar-bot {
  background: var(--ai-soft) !important;
  color: var(--ai) !important;
}

.label-ai,
.label-op,
.label-best {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.label-ai {
  background: var(--ai-soft);
  color: var(--ai);
  border: 1px solid var(--ai-line);
}
.label-op {
  background: var(--down-soft);
  color: var(--down);
}
.label-best {
  background: var(--brand-soft);
  color: var(--brand);
}

/* ---------------------------------------------------------------- chips & tabs */

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 -14px;
  padding: 2px 14px 4px;
  scroll-snap-type: x proximity;
}
.chips::-webkit-scrollbar {
  display: none;
}
@media (min-width: 760px) {
  .chips {
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    overflow: visible;
  }
}
.chip {
  --h: 200;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-2);
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  scroll-snap-align: start;
  text-decoration: none !important;
}
.chip:hover {
  border-color: hsl(var(--h) 55% 60%);
}
.chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: hsl(var(--h) 70% 50%);
}
.chip.is-active {
  background: hsl(var(--h) 70% 50% / 0.14);
  border-color: hsl(var(--h) 60% 50% / 0.55);
  color: var(--text);
}
.chip-sm {
  height: 26px;
  padding: 0 9px;
  font-size: 0.78rem;
  gap: 5px;
}
.chip-sm .dot {
  width: 6px;
  height: 6px;
}
.chip-more {
  color: var(--muted);
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface-2);
  border-radius: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  font-weight: 650;
  font-size: 0.92rem;
  color: var(--muted);
  white-space: nowrap;
  text-decoration: none !important;
}
.tab:hover {
  color: var(--text);
}
.tab.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}
.tab.is-active .ico {
  color: var(--brand);
}

.seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--surface-2);
  border-radius: 11px;
}
.seg a {
  padding: 6px 12px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--muted);
  text-decoration: none !important;
}
.seg a.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

/* ---------------------------------------------------------------- feed */

.feed-head h1 {
  margin: 4px 0 2px;
}
.feed-head p {
  margin: 0;
}
.feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.qcard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  transition: border-color 0.15s;
}
.qcard:hover {
  border-color: var(--line-2);
}
.qcard-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.qcard-title {
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 6px;
}
.qcard-title a {
  color: var(--text);
}
.qcard-title a::after {
  content: '';
}
.qcard-answer,
.qcard-body {
  margin: 0 0 10px;
  color: var(--text-2);
  font-size: 0.94rem;
  line-height: 1.5;
}
.qcard-answer {
  border-left: 3px solid var(--brand-line);
  padding-left: 10px;
}
.qcard-answer.is-ai {
  border-left-color: var(--ai-line);
}
.qcard-answer .label-ai {
  margin-right: 6px;
  vertical-align: 1px;
}
.qcard-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.84rem;
  color: var(--muted);
}
.stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-weight: 600;
}
a.stat:hover {
  color: var(--brand);
  text-decoration: none;
}
.stat-open {
  color: var(--up);
}
.stat-dim {
  font-weight: 500;
}

.load-more {
  margin-top: 4px;
}
.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.pager-now {
  color: var(--muted);
  font-size: 0.9rem;
}

.qotd {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none !important;
  color: var(--text);
  background: linear-gradient(135deg, var(--brand-soft), var(--surface) 70%);
  border-color: var(--brand-line);
}
.qotd-label {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.qotd-title {
  font-size: 1.15rem;
  font-weight: 750;
  line-height: 1.3;
}
.qotd-meta {
  font-size: 0.86rem;
  color: var(--brand);
  font-weight: 650;
}

/* ---------------------------------------------------------------- ask */

.ask {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ask-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ask-row .avatar {
  width: 36px;
  height: 36px;
}
.ask-title {
  font-size: 1.05rem !important;
  font-weight: 600;
  border-radius: 999px !important;
  padding: 12px 18px !important;
  background: var(--surface-2) !important;
  border-color: transparent !important;
}
.ask-title:focus {
  background: var(--surface) !important;
  border-color: var(--brand) !important;
}
.ask-more {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.js .ask-compact:not(.is-open) .ask-more {
  display: none;
}
.ask-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  align-items: end;
}
@media (min-width: 600px) {
  .ask-grid {
    grid-template-columns: 1fr 1fr;
  }
  .ask-grid .as-nick {
    padding-bottom: 12px;
  }
}
.ask .form-foot {
  margin-top: 0;
}
.similar {
  border: 1px solid var(--warn-soft);
  background: color-mix(in srgb, var(--warn-soft) 60%, var(--surface));
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}
.similar-h {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--warn);
  margin: 0 0 4px;
}
.similar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.similar li {
  padding: 5px 0;
  font-size: 0.93rem;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.similar li span {
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
}
.tips ul {
  margin: 0;
  padding-left: 20px;
  color: var(--text-2);
}
.tips li {
  margin: 4px 0;
}
.ask-cta h2 {
  margin: 12px 0 10px;
}

/* ---------------------------------------------------------------- question */

.crumbs {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.84rem;
  color: var(--muted);
}
.crumbs a {
  color: var(--muted);
}
.q-title {
  font-size: 1.45rem;
  line-height: 1.25;
  margin: 0 0 10px;
  word-wrap: break-word;
}
@media (min-width: 600px) {
  .q-title {
    font-size: 1.8rem;
  }
}
.q-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0 0 12px;
}
.q-meta a {
  color: var(--text-2);
  font-weight: 600;
}
.q-meta .avatar {
  width: 24px;
  height: 24px;
  font-size: 0.7rem;
}
.sep {
  color: var(--line-2);
}
.q-body {
  font-size: 1.02rem;
  color: var(--text-2);
  margin-bottom: 12px;
  overflow-wrap: anywhere;
}
.q-actions,
.ans-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin-top: 8px;
}
.act {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650;
  background: none;
  border: 0;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none !important;
}
.act:hover {
  background: var(--surface-2);
  color: var(--text);
}
.act-static:hover {
  background: none;
  color: var(--muted);
  cursor: default;
}
.act-dim {
  color: color-mix(in srgb, var(--muted) 80%, transparent);
}

.vote {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 2px;
  margin: 0;
}
.vote-btn {
  width: 36px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.vote-btn:hover {
  background: var(--surface-2);
}
.vote-up:hover,
.vote-up[aria-pressed='true'] {
  color: var(--up);
}
.vote-up[aria-pressed='true'] {
  background: var(--up-soft);
}
.vote-down:hover,
.vote-down[aria-pressed='true'] {
  color: var(--down);
}
.vote-down[aria-pressed='true'] {
  background: var(--down-soft);
}
.vote-score {
  min-width: 22px;
  text-align: center;
  font-weight: 750;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}
.vote.is-up .vote-score {
  color: var(--up);
}
.vote.is-down .vote-score {
  color: var(--down);
}
@keyframes pop {
  50% {
    transform: scale(1.25);
  }
}
.vote .pop {
  animation: pop 0.25s ease;
}

.short-answer {
  background: var(--brand-soft);
  border-color: var(--brand-line);
  box-shadow: none;
}
.short-h {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--brand);
  margin: 0 0 4px;
}
.short-a {
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.45;
  margin: 0 0 6px;
  color: var(--text);
}
.short-link {
  font-size: 0.88rem;
  font-weight: 650;
}

.answer-form .answer-label {
  display: block;
  font-weight: 750;
  font-size: 1.02rem;
  margin-bottom: 8px;
}
.locked-note {
  color: var(--muted);
}

.answers {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}
.answers-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.answers-head h2 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ans-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ans {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px 8px;
  box-shadow: var(--shadow);
  scroll-margin-top: 80px;
}
.ans:target {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}
.replies .ans {
  border: 0;
  box-shadow: none;
  background: transparent;
  padding: 10px 0 2px 14px;
  border-left: 2px solid var(--line);
  border-radius: 0;
}
.replies {
  margin: 4px 0 6px 12px;
}
.replies .replies {
  margin-left: 4px;
}
.ans-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.86rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.nick {
  font-weight: 700;
  color: var(--text-2);
}
.ans-body {
  overflow-wrap: anywhere;
  color: var(--text);
}
.ans-body .lead {
  font-weight: 600;
}
.ans-best {
  border-color: var(--brand-line);
  box-shadow: 0 0 0 1px var(--brand-line), var(--shadow);
}
.ans-ai {
  background: color-mix(in srgb, var(--ai-soft) 45%, var(--surface));
  border-color: var(--ai-line);
}
.ans-pending {
  opacity: 0.85;
  border-style: dashed;
}
.ans.is-sending {
  opacity: 0.55;
}
.pending-note {
  font-size: 0.85rem;
  color: var(--warn);
  background: var(--warn-soft);
  padding: 6px 10px;
  border-radius: 10px;
  margin: 4px 0 8px;
}
.ai-section {
  margin-top: 18px;
}
.ai-section h2 {
  color: var(--ai);
}
.ai-note {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
}
.reply-form {
  margin: 6px 0 10px;
  padding: 12px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.reply-form textarea {
  min-height: 80px;
}
.reply-form .form-foot {
  margin-top: 0;
}

.dict {
  display: flex;
  gap: 14px;
  align-items: center;
}
.dict-ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  flex: none;
}
.dict-h {
  margin: 0 0 2px;
  font-weight: 600;
}
.dict-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0;
  font-size: 0.92rem;
  font-weight: 650;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  font-size: 0.84rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
}

/* ---------------------------------------------------------------- sidebar */

.side-h {
  font-size: 0.98rem;
  font-weight: 750;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.side-card p {
  font-size: 0.92rem;
  color: var(--text-2);
}
.side-small {
  font-size: 0.85rem !important;
  color: var(--muted) !important;
  margin-top: 8px !important;
}
.rel-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.rel-list li {
  padding: 9px 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.rel-list li:first-child {
  border-top: 0;
  padding-top: 0;
}
.rel-list a {
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}
.rel-list a:hover {
  color: var(--brand);
}
.rel-n {
  font-size: 0.8rem;
  color: var(--muted);
}
.howto {
  margin: 0;
  padding-left: 20px;
  font-size: 0.92rem;
  color: var(--text-2);
}
.howto li {
  margin: 3px 0;
}
.best-week .best-q {
  font-weight: 700;
  color: var(--text);
  display: block;
  margin-bottom: 6px;
}
.best-a {
  font-style: italic;
}
.best-by {
  font-size: 0.82rem !important;
  color: var(--muted) !important;
}
.side-areas {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.side-areas a {
  --h: 200;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 10px;
  color: var(--text-2);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none !important;
}
.side-areas a:hover {
  background: var(--surface-2);
}
.side-areas .dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: hsl(var(--h) 70% 50%);
}
.side-cta {
  background: linear-gradient(160deg, var(--brand-soft), var(--surface) 75%);
}

/* ---------------------------------------------------------------- areas */

.area-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 12px;
}
.area-card {
  --h: 200;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none !important;
  color: var(--text);
  position: relative;
  border-top: 4px solid hsl(var(--h) 70% 50%);
}
.area-card:hover {
  border-color: hsl(var(--h) 60% 55%);
}
.area-dot {
  display: none;
}
.area-name {
  font-weight: 750;
  font-size: 1.05rem;
}
.area-desc {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}
.area-n {
  margin-top: 4px;
  font-size: 0.82rem;
  font-weight: 650;
  color: hsl(var(--h) 55% 40%);
}
html[data-theme='dark'] .area-n {
  color: hsl(var(--h) 60% 70%);
}

/* ---------------------------------------------------------------- empty, search, misc */

.empty {
  text-align: center;
  padding: 36px 16px;
  color: var(--text-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.empty h2,
.empty h1 {
  margin: 8px 0 4px;
}
.empty p {
  color: var(--muted);
  max-width: 460px;
}
.answers .empty {
  padding: 18px 16px;
  background: var(--surface);
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
}
.empty-ico {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--muted);
}
.search-big {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 560px;
  margin: 8px auto;
}
.card.search-big {
  max-width: none;
  margin: 0;
}
.search-big input {
  flex: 1;
}

.prose {
  line-height: 1.65;
}
.prose h2 {
  margin-top: 1.4em;
}
.prose ul,
.prose ol {
  padding-left: 22px;
}
.prose li {
  margin: 6px 0;
}

.login h1 {
  font-size: 1.35rem;
}
.login-form,
.nick-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 14px 0;
}

.profile {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
}
.profile > .avatar {
  width: 64px;
  height: 64px;
  font-size: 1.6rem;
}
.profile h1 {
  margin: 0;
  font-size: 1.35rem;
}
.profile p {
  margin: 2px 0 0;
}
.stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 4px 0 0;
}
.stats div {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 10px;
  text-align: center;
}
.stats dt {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 650;
}
.stats dd {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 800;
}
.badges {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--up-soft);
  color: var(--up);
  font-weight: 700;
  font-size: 0.85rem;
}
.profile-answers {
  list-style: none;
  margin: 0;
  padding: 0;
}
.profile-answers li {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.profile-answers li:first-child {
  border-top: 0;
}
.profile-answers a {
  font-weight: 650;
}
.profile-answers p {
  margin: 2px 0;
  color: var(--text-2);
  font-size: 0.93rem;
}

.ad-slot {
  min-height: 120px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---------------------------------------------------------------- dialog & toast */

.dialog {
  border: 0;
  padding: 0;
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  width: min(440px, calc(100vw - 24px));
  box-shadow: var(--shadow-lg);
}
.dialog::backdrop {
  background: rgba(10, 12, 16, 0.55);
  backdrop-filter: blur(2px);
}
.dialog-form {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dialog-form h2 {
  margin: 0;
}
.dialog-form .muted {
  font-size: 0.9rem;
  margin: 0;
}
.reasons {
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.reasons label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.95rem;
}
.reasons label:hover {
  background: var(--surface-2);
}
.reasons input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 11px 18px;
  border-radius: 12px;
  font-size: 0.93rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  max-width: calc(100vw - 32px);
}
.toast.is-error {
  background: var(--danger);
  color: #fff;
}

/* ---------------------------------------------------------------- footer */

.foot {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 28px 0 calc(28px + env(safe-area-inset-bottom));
  font-size: 0.9rem;
  color: var(--muted);
}
.foot-in {
  display: grid;
  gap: 16px;
}
.foot-brand strong {
  color: var(--text);
  font-size: 1rem;
}
.foot-brand p {
  margin: 4px 0 0;
  max-width: 420px;
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
.foot-links a {
  color: var(--text-2);
  font-weight: 600;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}
.foot-small {
  font-size: 0.8rem;
  margin: 0;
}
@media (min-width: 760px) {
  .foot-in {
    grid-template-columns: 1fr 1.4fr;
  }
  .foot-small {
    grid-column: 1 / -1;
  }
}

/* ---------------------------------------------------------------- admin */

.admin {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.adm-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin: 0;
}
.adm-stats .card {
  padding: 12px 14px;
}
.adm-stats dt {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 650;
}
.adm-stats dd {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
}
.adm-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.adm-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
}
.adm-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.adm-top {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.adm-q {
  margin: 6px 0 0;
  font-weight: 650;
  font-size: 0.92rem;
}
.adm-text {
  margin: 6px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.adm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.adm-item.is-done {
  opacity: 0.45;
}
form.inline {
  display: inline;
  margin: 0;
}
.pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
}
.pill-pending,
.pill-warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.pill-hidden,
.pill-blocked,
.pill-danger {
  background: var(--danger-soft);
  color: var(--danger);
}
.pill-visible {
  background: var(--brand-soft);
  color: var(--brand);
}
.bl-form {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
  margin: 10px 0 16px;
}
@media (min-width: 760px) {
  .bl-form {
    grid-template-columns: 130px 1fr 1fr auto auto;
    align-items: center;
  }
}
code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
