* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f4f6fb;
  color: #222;
  line-height: 1.6;
}
.container {
  max-width: 900px;
  margin: 20px auto;
  padding: 0;
  background: transparent;
}

/* ---------- Header / Banner ------------------------------------------ */
.promo-banner {
  position: relative;
  overflow: hidden;
  background: #2d6cdf;
  color: #fff;
  text-align: center;
  padding: 38px 24px 30px;
  border-radius: 18px;
  margin-bottom: 24px;
  box-shadow:
    0 10px 30px rgba(45,108,223,.25),
    0 2px 6px rgba(45,108,223,.15);
}
.promo-banner::after {
  /* Subtle inner highlight on the top edge so the banner reads as glossy. */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}
.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255,255,255,.18);
  padding: 4px;
  box-shadow:
    0 4px 12px rgba(0,0,0,.18),
    inset 0 0 0 1px rgba(255,255,255,.25);
}
.promo-banner h1 {
  margin: 0;
  font-size: 2.4em;
  font-weight: 800;
  letter-spacing: -.02em;
  text-shadow: 0 1px 2px rgba(0,0,0,.12);
}
.promo-sub {
  margin: 6px 0 0;
  font-size: 1.15em;
  font-weight: 400;
  opacity: .9;
}
.banner-links {
  margin-top: 14px;
  display: inline-flex;
  gap: 8px;
}
.gh-link {
  display: inline-block;
  padding: 6px 18px;
  min-width: 92px;
  text-align: center;
  font-size: .8em;
  font-weight: 600;
  color: #fff;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  text-decoration: none;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background .15s, transform .15s, box-shadow .15s;
}
.gh-link:hover {
  background: rgba(255,255,255,.28);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,.12);
}

/* ---------- Sections ------------------------------------------------- */
.section-title {
  font-size: .85em;
  font-weight: 700;
  color: #333;
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ---------- How it works (legacy, currently unused) ------------------ */
.how-it-works {
  background: #fff;
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 0;
  padding: 0;
}
.steps li {
  background: #f7f8fc;
  border: 1px solid #e8ecf4;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #2d6cdf;
  color: #fff;
  font-weight: 700;
  font-size: .85em;
}
.step-label { font-weight: 700; color: #1f2a44; font-size: .95em; }
.step-desc { font-size: .85em; color: #5a6a8a; line-height: 1.4; }
@media (max-width: 600px) {
  .steps { grid-template-columns: 1fr; }
}

/* ---------- Form section --------------------------------------------- */
.form-section {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 20px;
  box-shadow:
    0 1px 3px rgba(31,42,68,.04),
    0 10px 30px rgba(31,42,68,.06);
  border: 1px solid #eef1f7;
}
label { display: block; margin: 0 0 18px; font-weight: 600; font-size: .92em; color: #333; }
input, textarea {
  width: 100%;
  margin-top: 6px;
  padding: 11px 13px;
  font: inherit;
  font-size: .95em;
  border: 1px solid #d4d9e4;
  border-radius: 9px;
  background: #fafbfd;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input:focus, textarea:focus {
  outline: none;
  border-color: #2d6cdf;
  box-shadow: 0 0 0 4px rgba(45,108,223,.15);
  background: #fff;
}
textarea { resize: vertical; }

/* File input — render as a soft dropzone */
input[type="file"] {
  padding: 18px 14px;
  border: 1.5px dashed #c4cce0;
  background: #f7f9fd;
  cursor: pointer;
  text-align: center;
  font-size: .9em;
  color: #4b5b7a;
}
input[type="file"]:hover {
  border-color: #2d6cdf;
  background: #eef4ff;
}

button[type="submit"] {
  display: block;
  width: 100%;
  background: #2d6cdf;
  color: #fff;
  border: 0;
  padding: 13px 20px;
  border-radius: 11px;
  font: inherit;
  font-size: 1em;
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(45,108,223,.28);
  transition: transform .12s, box-shadow .15s, opacity .15s, background .15s;
  margin-top: 4px;
}
button[type="submit"]:hover {
  background: #2761c8;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(45,108,223,.34);
}
button[type="submit"]:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(45,108,223,.24);
}
button:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

.submit-hint {
  margin: 12px 0 0;
  text-align: center;
  font-size: .82em;
  font-weight: 400;
  color: #7a8aa5;
}

code {
  background: #f0f0f3;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .9em;
  word-break: break-all;
}

/* ---------- Feature tabs --------------------------------------------- */
.feature-label {
  margin: 0 0 6px;
}
.feature-stage {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
}
.feature-stage:last-of-type {
  margin-bottom: 16px;
}
.feature-stage-tag {
  flex: none;
  min-width: 70px;
  padding: 6px 12px;
  background: #8fc9a3;
  color: #fff;
  font-size: .68em;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: center;
  border-radius: 999px;
  white-space: nowrap;
  user-select: none;
  box-shadow: 0 2px 6px rgba(143,201,163,.22);
}
/* Three stages share a green palette, light → dark, signalling progression
   through the research workflow. Same hue (~145°), increasing depth.
   NOTE on selectors: nth-of-type counts by tag among siblings, and the form
   has a leading <div class="field-label"> before the three .feature-stage
   divs — so the three stages are the 2nd/3rd/4th divs in the form. */
.feature-stage:nth-of-type(3) .feature-stage-tag {
  background: #4a9b6e;
  box-shadow: 0 2px 6px rgba(74,155,110,.22);
}
.feature-stage:nth-of-type(4) .feature-stage-tag {
  background: #1d6b41;
  box-shadow: 0 2px 6px rgba(29,107,65,.25);
}
.feature-stage .feature-tabs {
  flex: 1;
  margin: 0;
}
.feature-tabs {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  margin: 0 0 16px;
  background: #f0f2f7;
  padding: 4px 6px;
  border-radius: 10px;
  border: 1px solid #e3e8f3;
}
.feature-tab {
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 6px;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: .82em;
  color: #5a6a8a;
  margin: 0;
  white-space: nowrap;
  transition: background .15s, color .15s, box-shadow .15s, transform .1s;
}
.feature-tab input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0; height: 0;
}
.feature-tab:hover {
  background: rgba(255,255,255,.85);
  color: #1f2a44;
}
.feature-tab.selected {
  background: #fff;
  color: #1f3d7a;
  box-shadow:
    0 2px 6px rgba(45,108,223,.18),
    inset 0 0 0 1px rgba(45,108,223,.18);
}
.feature-tab.disabled,
.feature-tab.disabled:hover {
  background: transparent;
  color: #a0aac0;
  cursor: not-allowed;
  opacity: .65;
  box-shadow: none;
  transform: none;
}
@media (max-width: 600px) {
  .feature-tabs { flex-wrap: wrap; }
  .feature-tab { flex: none; width: 100%; }
}

/* ---------- Method dropdown ------------------------------------------ */
.field-label { display: block; margin: 0 0 16px; font-weight: 600; font-size: .92em; color: #333; }
.select-input {
  width: 100%;
  margin-top: 6px;
  padding: 10px 36px 10px 12px;
  font: inherit;
  font-size: .95em;
  color: #1f2a44;
  background: #fafbfd
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%234b5b7a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='4 6 8 10 12 6'/></svg>")
    no-repeat right 12px center / 14px;
  border: 1px solid #d4d9e4;
  border-radius: 8px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
.select-input:hover { border-color: #b6c2db; }
.select-input:focus {
  outline: none;
  border-color: #2d6cdf;
  box-shadow: 0 0 0 3px rgba(45,108,223,.12);
  background-color: #fff;
}

/* ---------- Submitted result panel (index page only) ----------------- */
section#result {
  background: #fff;
  border-radius: 16px;
  padding: 26px 28px;
  margin-bottom: 20px;
  box-shadow:
    0 1px 3px rgba(31,42,68,.04),
    0 10px 30px rgba(31,42,68,.06);
  border: 1px solid #eef1f7;
  border-left: 4px solid #2d6cdf;
  animation: slide-up .35s ease;
}
@keyframes slide-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
section#result h2 {
  margin: 0 0 16px;
  font-size: 1.05em;
  color: #1f3d7a;
  display: flex;
  align-items: center;
  gap: 8px;
}
section#result h2::before {
  content: "";
  display: inline-block;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #2d6cdf url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'><path d='M6.5 10.6 3.9 8l-1 1L6.5 12.6 13.1 6 12.1 5z'/></svg>") center/12px no-repeat;
}

.kv {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 16px;
  row-gap: 12px;
  margin: 0;
}
.kv dt {
  font-weight: 600;
  color: #4b5b7a;
  font-size: .85em;
  letter-spacing: .03em;
  text-transform: uppercase;
  align-self: center;
}
.kv dd {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.kv-value {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88em;
  background: #f7f8fc;
  border: 1px solid #e3e8f3;
  border-radius: 6px;
  padding: 7px 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #1f3d7a;
}
#meta-novelty {
  white-space: normal;
  max-height: 4.2em;          /* ~3 lines at line-height ~1.4 */
  overflow-y: auto;
  line-height: 1.6;
}
#meta-problem {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.6;
}
a.kv-value { text-decoration: none; }
a.kv-value:hover { text-decoration: underline; }

.copy-btn {
  flex: none;
  background: #fff;
  color: #2d6cdf;
  border: 1px solid #d4d9e4;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: .82em;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.copy-btn:hover { background: #2d6cdf; color: #fff; border-color: #2d6cdf; }
.copy-btn.copied {
  background: #1f8a4c;
  border-color: #1f8a4c;
  color: #fff;
}

#result .hint {
  margin: 16px 0 0;
  font-size: .82em;
  color: #7a8aa5;
}

@media (max-width: 600px) {
  .container { margin: 16px; }
  .kv { grid-template-columns: 1fr; row-gap: 4px; }
  .kv dt { margin-top: 8px; }
  .brand { gap: 8px; }
  .brand-logo { width: 36px; height: 36px; }
  .promo-banner h1 { font-size: 2em; }
}

/* ---------- Result page: meta + report cards ------------------------- */
.meta-card {
  margin-top: 8px;
  padding: 22px 26px;
  background: #fff;
  border: 1px solid #eef1f7;
  border-radius: 16px;
  box-shadow:
    0 1px 3px rgba(31,42,68,.04),
    0 10px 30px rgba(31,42,68,.06);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: .82em;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  background: #e9edf6;
  color: #4b5b7a;
  border: 1px solid #d6dcea;
}
.status-pill::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(0,0,0,.04);
}
/* Animate the dot while we're waiting on the job. */
.status-pill.status-loading::before,
.status-pill.status-pending::before,
.status-pill.status-running::before {
  animation: pulse-dot 1.4s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: .35; transform: scale(.75); }
}
.status-pill.status-loading,
.status-pill.status-pending  { background: #fff7e6; color: #a0660a; border-color: #f3dba6; }
.status-pill.status-running  { background: #e6f0ff; color: #1f55b8; border-color: #b9d0ef; }
.status-pill.status-done     { background: #e6f7ec; color: #15743a; border-color: #b3e0c5; }
.status-pill.status-error    { background: #fde2e2; color: #8a1f1f; border-color: #f4b4b4; }

.report-card {
  margin-top: 20px;
  background: #fff;
  border: 1px solid #eef1f7;
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 1px 3px rgba(31,42,68,.04),
    0 10px 30px rgba(31,42,68,.06);
}
.report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid #eef0f6;
  background: #f5f8fc;
}
.report-header h2 {
  margin: 0;
  font-size: 1em;
  color: #1f3d7a;
  display: flex;
  align-items: center;
  gap: 8px;
}
.report-header h2::before {
  content: "";
  width: 18px; height: 18px;
  border-radius: 4px;
  background: #2d6cdf url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'><path d='M3 2h7l3 3v9a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zm6 0v3h3'/></svg>") center/12px no-repeat;
}
.report-body {
  background: #fff;
  padding: 24px 28px;
  font-size: .96em;
  line-height: 1.7;
  color: #1f2a44;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  word-wrap: break-word;
}
.report-body > *:first-child { margin-top: 0; }
.report-body > *:last-child  { margin-bottom: 0; }
.report-body p { margin: 0.6em 0; }

/* Headings — a clean hierarchy w/ subtle separators on h1/h2. */
.report-body h1,
.report-body h2,
.report-body h3,
.report-body h4,
.report-body h5,
.report-body h6 {
  margin: 1.4em 0 0.5em;
  line-height: 1.3;
  color: #1f3d7a;
  font-weight: 700;
  letter-spacing: -.005em;
}
.report-body h1 {
  font-size: 1.7em;
  padding-bottom: .3em;
  border-bottom: 1px solid #e3e8f3;
}
.report-body h2 {
  font-size: 1.35em;
  padding-bottom: .25em;
  border-bottom: 1px solid #eef0f6;
}
.report-body h3 { font-size: 1.15em; }
.report-body h4 { font-size: 1.02em; }
.report-body h5 { font-size: .95em; color: #2d4878; }
.report-body h6 { font-size: .9em;  color: #4b5b7a; text-transform: uppercase; letter-spacing: .04em; }

/* Lists */
.report-body ul,
.report-body ol {
  margin: 0.6em 0;
  padding-left: 1.6em;
}
.report-body li { margin: 0.25em 0; }
.report-body li > p { margin: 0.25em 0; }
.report-body li > ul,
.report-body li > ol { margin: 0.25em 0; }

/* GFM task lists */
.report-body li.task-list-item,
.report-body input[type="checkbox"][disabled] + * {
  list-style: none;
}
.report-body li.task-list-item { margin-left: -1.2em; }
.report-body input[type="checkbox"] {
  margin: 0 .4em 0 0;
  vertical-align: middle;
}

/* Inline code (NOT inside pre) */
.report-body :not(pre) > code {
  background: #f3f5fb;
  border: 1px solid #e3e8f3;
  border-radius: 4px;
  padding: 1px 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: .88em;
  color: #b3306a;
  white-space: nowrap;
}

/* Fenced code blocks */
.report-body pre {
  margin: 0.9em 0;
  padding: 14px 16px;
  background: #f7f8fc;
  border: 1px solid #e3e8f3;
  border-radius: 8px;
  overflow-x: auto;
  font-size: .88em;
  line-height: 1.55;
}
.report-body pre code {
  background: transparent;
  border: 0;
  padding: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color: #1f2a44;
  white-space: pre;
}

/* Blockquotes */
.report-body blockquote {
  margin: 0.9em 0;
  padding: 8px 16px;
  border-left: 4px solid #2d6cdf;
  background: #f5f8ff;
  color: #2d4878;
  border-radius: 0 8px 8px 0;
}
.report-body blockquote > *:first-child { margin-top: 0; }
.report-body blockquote > *:last-child  { margin-bottom: 0; }

/* Links */
.report-body a {
  color: #2d6cdf;
  text-decoration: none;
  border-bottom: 1px solid rgba(45,108,223,.25);
  transition: color .15s, border-color .15s;
}
.report-body a:hover {
  color: #1949b3;
  border-bottom-color: #1949b3;
}

/* Tables (GFM) */
.report-body table {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 1em 0;
  border-collapse: collapse;
  overflow-x: auto;
  font-size: .92em;
  border: 1px solid #e3e8f3;
  border-radius: 8px;
}
.report-body table thead {
  background: #f5f8ff;
}
.report-body table th,
.report-body table td {
  border: 1px solid #e8ecf4;
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}
.report-body table th {
  font-weight: 700;
  color: #1f3d7a;
}
.report-body table tr:nth-child(even) td {
  background: #fafbfd;
}

/* Horizontal rule */
.report-body hr {
  border: 0;
  border-top: 1px solid #e3e8f3;
  margin: 1.6em 0;
}

/* Keep linebreaks off by default — markdown handles paragraph spacing. */
.report-body br { display: initial; }

/* Math (KaTeX) — make display equations breathe and scroll if too wide. */
.report-body .katex-display {
  margin: 1em 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px;
}
.report-body .katex { font-size: 1.05em; }
.report-body .katex-display > .katex { display: inline-block; white-space: nowrap; }

/* Figure captions (when an <img> is followed by an em-italic line) */
.report-body figure { margin: 1em auto; text-align: center; }
.report-body figure figcaption {
  font-size: .85em;
  color: #5a6a8a;
  margin-top: .4em;
}

/* Remove the legacy override that forced pre-wrap whitespace on rendered
   markdown — it caused stray newlines from the source to break the layout. */
#result-wrap article {
  background: #fff;
  border: 0;
  border-radius: 0;
  padding: 24px 28px;
  white-space: normal;
}
.error {
  background: #fde2e2;
  color: #8a1f1f;
  border: 1px solid #f4b4b4;
  padding: 12px 16px;
  border-radius: 10px;
  margin-top: 12px;
  font-size: .92em;
}
.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  margin-left: 8px;
  border: 2px solid #ddd;
  border-top-color: #2d6cdf;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  vertical-align: middle;
}
.spinner[hidden] { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Follow-up Q&A panel ------------------------------------- */
.qa-card { margin-top: 20px; }
.qa-body {
  padding: 18px 22px 22px;
  background: #fff;
}
.qa-thread {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}
.qa-thread:empty { display: none; }
.qa-turn {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px dashed #e3e8f3;
}
.qa-turn:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.qa-msg {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.qa-msg-body {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: .94em;
  line-height: 1.6;
  word-wrap: break-word;
  max-width: 85%;
}
.qa-q .qa-msg-body {
  background: #f0f4ff;
  border: 1px solid #d8e2f5;
  color: #1f3d7a;
  align-self: flex-start;
  white-space: pre-wrap;
}
.qa-a .qa-msg-body {
  background: #fafbfd;
  border: 1px solid #eef1f7;
  color: #1f2a44;
  align-self: flex-end;
}
.qa-a .qa-msg-body > *:first-child { margin-top: 0; }
.qa-a .qa-msg-body > *:last-child  { margin-bottom: 0; }

/* Animated "…" placeholder shown while the assistant is composing a reply.
   Three dots that fade in/out in sequence — mirrors common chat affordances. */
.qa-typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 2px;
  min-height: 1em;
}
.qa-typing > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7a8aa5;
  opacity: .35;
  animation: qa-typing-bounce 1.2s ease-in-out infinite;
}
.qa-typing > span:nth-child(2) { animation-delay: .15s; }
.qa-typing > span:nth-child(3) { animation-delay: .30s; }
@keyframes qa-typing-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: .35; }
  40%           { transform: translateY(-3px); opacity: 1; }
}

.qa-form {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 10px;
}
.qa-form textarea {
  flex: 1;
  min-width: 0;
  margin-top: 0;
  padding: 11px 13px;
  font: inherit;
  font-size: .95em;
  border: 1px solid #d4d9e4;
  border-radius: 9px;
  background: #fafbfd;
  transition: border-color .15s, box-shadow .15s, background .15s;
  resize: vertical;
}
.qa-form textarea:focus {
  outline: none;
  border-color: #2d6cdf;
  box-shadow: 0 0 0 4px rgba(45,108,223,.15);
  background: #fff;
}
.qa-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  gap: 8px;
  flex: none;
}
#qa-submit {
  flex: 1;
  min-height: 100%;
  background: #2d6cdf;
  color: #fff;
  border: 0;
  padding: 9px 22px;
  border-radius: 8px;
  font: inherit;
  font-size: .92em;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(45,108,223,.22);
  transition: background .15s, transform .12s, box-shadow .15s, opacity .15s;
  white-space: nowrap;
}
#qa-submit:hover { background: #2761c8; transform: translateY(-1px); }
#qa-submit:active { transform: translateY(0); }
#qa-submit:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
#qa-spinner { align-self: center; margin-left: 0; }
.qa-error {
  color: #8a1f1f;
  font-size: .88em;
}
@media (max-width: 600px) {
  .qa-form { flex-direction: column; }
  .qa-actions { flex-direction: row; align-items: center; }
}
