:root {
  --background: #11110f;
  --background-deep: #10100e;
  --surface: #1c1b17;
  --surface-raised: #302d25;
  --text: #f3f0e8;
  --text-strong: #f5f1e7;
  --text-muted: #c9c4b8;
  --text-subtle: #aaa497;
  --text-faint: #777165;
  --brand: #e6b85c;
  --brand-hover: #f2ca78;
  --brand-soft: #d9c18d;
  --border: #494335;
  --border-strong: #62583f;
  --success: #9fc28e;

  color: var(--text);
  background: var(--background);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  line-height: 1.55;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(circle at 18% 0, #463923 0, transparent 30rem),
    linear-gradient(150deg, #121210, #191712 60%, var(--background-deep));
}

main {
  width: min(780px, calc(100% - 32px));
  margin: auto;
  padding: 28px 0 72px;
}

.language-switch {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
  margin-bottom: 16px;
  color: var(--text-faint);
  font-size: .78rem;
}

.language-switch button {
  padding: 5px 7px;
  border-radius: 6px;
  background: transparent;
  color: var(--text-subtle);
  font-size: .78rem;
  letter-spacing: .08em;
}

.language-switch button:hover,
.language-switch button[aria-pressed="true"] {
  background: var(--surface-raised);
  color: var(--text);
}

.language-switch button[aria-pressed="true"] {
  box-shadow: inset 0 0 0 1px #5a5345;
}

header { margin-bottom: 24px; }

h1 {
  max-width: 720px;
  margin: .12em 0 .35em;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 6.2vw, 4.35rem);
  font-weight: 500;
  line-height: .98;
  letter-spacing: -.045em;
}

.intro {
  max-width: 660px;
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 1.08rem;
}

.eyebrow {
  margin: 0;
  color: var(--brand);
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .18em;
}

.card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 87%, transparent);
  box-shadow: 0 20px 60px #0007;
}

.ask-card { padding: 28px; }
.ask-card h2 { margin: 18px 0 14px; font-size: 1.35rem; }

.ruleset {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: .9rem;
}

.ruleset-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 7px;
  border: 1px solid color-mix(in srgb, var(--brand) 48%, transparent);
  border-radius: 999px;
  color: var(--brand);
  font-size: .64rem;
  font-weight: 850;
  letter-spacing: .1em;
  line-height: 1;
}

.ruleset-status::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  content: "";
}

.human-check {
  min-height: 28px;
  margin: 12px 0 0;
  color: var(--text-subtle);
  font-size: .85rem;
}

.human-check > span { display: block; margin-bottom: 8px; }
.human-check.verified {
  min-height: 0;
  margin-top: 9px;
  color: var(--success);
  font-size: .78rem;
}

.human-check.verified > span { margin: 0; }
.human-check.verified #turnstileWidget { display: none; }
label { display: block; margin-bottom: 4px; font-weight: 750; }

.language-note {
  margin: 0 0 10px;
  color: var(--brand-soft);
  font-size: .86rem;
}

textarea {
  display: block;
  width: 100%;
  padding: 15px;
  resize: vertical;
  border: 1px solid #595244;
  border-radius: 12px;
  outline: none;
  background: var(--background);
  color: var(--text-strong);
  font: inherit;
}

textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px #e6b85c22;
}

.form-footer,
.feedback-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
}

.muted,
.sources,
.boundary { color: var(--text-subtle); }

.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 20px;
  color: var(--text-muted);
  font-size: .8rem;
}

.trust-list span:last-child { color: var(--text-subtle); }

button {
  padding: 12px 18px;
  border: 0;
  border-radius: 10px;
  background: var(--brand);
  color: #1a160e;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
}

button:hover { background: var(--brand-hover); }
button:disabled { cursor: wait; opacity: .65; }
.secondary { border: 1px solid #5a5345; background: var(--surface-raised); color: var(--text); }
.secondary:hover { background: #3b372d; }
.text-button { background: transparent; color: var(--text-muted); text-decoration: underline; }

.result {
  margin-top: 20px;
  padding: 28px;
  border-color: var(--border-strong);
}

.result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.status { color: var(--brand); font-size: .82rem; }
.answer { margin-top: 18px; white-space: pre-wrap; font-size: 1.06rem; }
.sources { margin-top: 18px; font-size: .84rem; }
.feedback { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.feedback p { margin: .4em 0; }
.consent { margin-top: 18px; padding: 16px; border: 1px solid var(--border-strong); border-radius: 12px; background: #14130f; }
.loading { animation: pulse 1.4s ease-in-out infinite; }
.boundary { margin-top: 24px; padding: 0 4px; font-size: .76rem; line-height: 1.48; }
.boundary p { margin: 8px 0; }
.boundary a,
.legal-copy a { color: var(--brand-soft); }
.legal-copy h1 { margin-top: .3em; font-size: clamp(2.2rem, 6vw, 4rem); }
.legal-copy h2 { margin: 1.8em 0 .55em; font-size: 1.35rem; }
.legal-copy h3 { margin: 1.35em 0 .45em; font-size: 1.05rem; color: var(--brand-soft); }
.legal-copy p { max-width: 66ch; }
.legal-copy li { max-width: 64ch; margin: .65em 0; }
.legal-copy address { margin: 1.4rem 0; font-style: normal; }
.legal-copy .updated { color: var(--muted); font-size: .82rem; }
.legal-copy .provider-links { line-height: 1.8; }

@keyframes pulse { 50% { border-color: #b58b45; } }

@media (max-width: 560px) {
  main { padding-top: 24px; }
  .ask-card,
  .result { padding: 20px; }
  .form-footer,
  .feedback-actions { align-items: stretch; flex-direction: column-reverse; }
  .form-footer button,
  .feedback-actions button { width: 100%; }
  .result-head { align-items: flex-start; flex-direction: column; gap: 4px; }
}
