:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #f4f7fb;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #eef3f9 0%, #f7f9fc 48%, #ffffff 100%);
}
button, input, textarea { font: inherit; }
button { min-height: 48px; cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid #172033;
  outline-offset: 3px;
}

.shell {
  width: min(1040px, calc(100% - 40px));
  margin: 24px auto 56px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  padding: 0 2px;
}

.app-title { min-width: 0; }
.app-header h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.eyebrow {
  margin: 0 0 4px;
  font-size: 0.7rem;
  font-weight: 760;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #738096;
}
.version {
  flex: 0 0 auto;
  border: 1px solid #d9e1ec;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255,255,255,.78);
  font-size: .78rem;
  color: #68758a;
}

.context-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 2px 12px;
  color: #68758a;
  font-size: .85rem;
  line-height: 1.4;
}
.context-item { font-weight: 560; }
.context-item[aria-current="page"] {
  color: #223149;
  font-weight: 720;
}
.context-separator {
  color: #a4afbf;
  font-size: 1rem;
  line-height: 1;
}

.card {
  background: rgba(255,255,255,.97);
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: clamp(24px, 3.4vw, 38px);
  box-shadow: 0 14px 38px rgba(23, 32, 51, 0.07);
}

.card-heading { max-width: 850px; }
.kind-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 7px;
  background: #eff3f8;
  color: #617087;
  font-size: .7rem;
  font-weight: 780;
  text-transform: uppercase;
  letter-spacing: .09em;
}
.card h2 {
  margin: 12px 0 0;
  max-width: 900px;
  font-size: clamp(1.45rem, 2.8vw, 1.9rem);
  line-height: 1.18;
  letter-spacing: -0.018em;
}

.body-panel {
  margin-top: 18px;
  max-width: 920px;
  padding: 16px 18px;
  border: 1px solid #e4eaf2;
  border-left: 4px solid #8ba9d8;
  border-radius: 12px;
  background: #f7f9fc;
}
.body-copy {
  white-space: pre-line;
  color: #536176;
  line-height: 1.62;
  margin: 0;
}

.field-group {
  display: grid;
  gap: 8px;
  margin-top: 22px;
  max-width: 920px;
}
.field-label { font-weight: 720; color: #25344a; }
.field-input {
  width: 100%;
  min-height: 126px;
  resize: vertical;
  border: 1px solid #d5deea;
  border-radius: 12px;
  padding: 14px 16px;
  background: #fff;
  color: #172033;
  line-height: 1.5;
}
.field-input::placeholder { color: #8a95a6; }
.field-error { min-height: 20px; margin: 0; color: #9b2c2c; font-size: .9rem; }

.answers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
  margin-top: 22px;
}
.answer, .primary, .secondary, .back {
  border-radius: 12px;
  font-weight: 700;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, background .12s ease;
}
.answer:hover, .primary:hover, .secondary:hover { transform: translateY(-1px); }
.answer {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  text-align: left;
  border: 1px solid #d8e0eb;
  padding: 14px 16px;
  background: #fff;
  color: #1d2a3c;
}
.answer-label { min-width: 0; }
.answer-arrow {
  flex: 0 0 auto;
  color: #8a97aa;
  font-size: 1.25rem;
  font-weight: 500;
}
.answer:hover {
  border-color: #aebbd0;
  background: #fbfcfe;
  box-shadow: 0 6px 16px rgba(23,32,51,.06);
}
.answer:disabled {
  cursor: not-allowed;
  opacity: .55;
  transform: none;
  box-shadow: none;
}

.primary, .secondary {
  min-height: 50px;
  padding: 12px 16px;
}
.primary { border: 1px solid #172033; background: #172033; color: #fff; }
.secondary { border: 1px solid #cfd8e5; background: #fff; color: #25344a; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

.card-footer {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid #edf1f6;
}
.back {
  min-height: auto;
  border: 0;
  background: transparent;
  color: #66758a;
  padding: 7px 2px;
}
.back:hover { color: #25344a; }

.summary {
  width: 100%;
  min-height: 240px;
  margin-top: 20px;
  resize: vertical;
  border: 1px solid #d7dfeb;
  border-radius: 12px;
  padding: 16px;
  background: #f8fafc;
  color: #172033;
  line-height: 1.5;
}
.copy-status { min-height: 24px; margin: 8px 0 0; color: #536176; font-size: .9rem; }
.error-card { border-color: #e8c9c9; }
.error-card ul { color: #6b3a3a; line-height: 1.5; }

@media (max-width: 700px) {
  .shell { width: min(100% - 20px, 1040px); margin: 16px auto 36px; }
  .app-header { align-items: flex-start; margin-bottom: 12px; }
  .eyebrow { display: none; }
  .version { display: none; }
  .context-breadcrumb { margin-bottom: 10px; font-size: .8rem; gap: 5px; }
  .card { border-radius: 16px; padding: 20px; }
  .card h2 { font-size: clamp(1.35rem, 7vw, 1.65rem); }
  .body-panel { margin-top: 16px; padding: 14px 15px; }
  .answers { grid-template-columns: 1fr; margin-top: 18px; }
  .answer { min-height: 54px; }
  .actions { flex-direction: column; }
  .actions button { width: 100%; }
}
