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

* {
  box-sizing: border-box;
}

body {
  min-width: 280px;
  margin: 0;
  background:
    radial-gradient(circle at top right, rgba(39, 174, 96, 0.12), transparent 42%),
    #f4f7fb;
}

button {
  font: inherit;
}

.app-shell {
  width: min(100%, 720px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 18px 40px;
}

.app-header {
  margin-bottom: 18px;
}

.eyebrow,
.context-label {
  display: block;
  margin: 0 0 5px;
  color: #607089;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  color: #132033;
  font-size: clamp(1.45rem, 6vw, 2rem);
  line-height: 1.15;
}

h2 {
  margin-bottom: 0;
  font-size: 1.15rem;
}

.subtitle {
  margin-bottom: 0;
  color: #607089;
  line-height: 1.5;
}

.safety-notice {
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid #bfe6cf;
  border-radius: 12px;
  color: #155d35;
  background: #edfbf3;
  font-size: 0.9rem;
  line-height: 1.45;
}

.safety-notice strong {
  display: block;
}

.context-card,
.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.context-card {
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid #dce3ed;
  border-radius: 12px;
  background: #ffffff;
}

.context-card strong {
  font-size: 0.92rem;
}

.secondary-button {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid #b9c5d5;
  border-radius: 9px;
  color: #26364d;
  background: #ffffff;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 750;
}

.secondary-button:hover {
  background: #f4f7fb;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.action-button {
  min-height: 108px;
  padding: 16px;
  border: 1px solid #d7dfeb;
  border-radius: 14px;
  color: #172234;
  background: #ffffff;
  box-shadow: 0 5px 18px rgba(35, 51, 75, 0.06);
  cursor: pointer;
  text-align: left;
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease,
    transform 120ms ease;
}

.action-button:hover:not(:disabled) {
  border-color: #27ae60;
  box-shadow: 0 8px 24px rgba(35, 51, 75, 0.1);
  transform: translateY(-1px);
}

.action-button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.action-title,
.action-description {
  display: block;
}

.action-title {
  margin-bottom: 7px;
  font-weight: 800;
}

.action-description {
  color: #607089;
  font-size: 0.84rem;
  line-height: 1.4;
}

.feedback,
.result-card {
  margin-top: 16px;
  border-radius: 14px;
}

.feedback {
  padding: 12px 14px;
  border: 1px solid #f2c8c8;
  color: #8f2424;
  background: #fff3f3;
  font-size: 0.88rem;
  line-height: 1.45;
}

.feedback.is-loading {
  border-color: #c9dcf7;
  color: #28588e;
  background: #f1f7ff;
}

.feedback.is-success {
  border-color: #bfe6cf;
  color: #155d35;
  background: #edfbf3;
}

.result-card {
  padding: 18px;
  border: 1px solid #d7dfeb;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(35, 51, 75, 0.08);
}

.result-summary {
  margin: 18px 0 12px;
  color: #33445d;
  line-height: 1.55;
}

.result-items {
  margin: 0 0 16px;
  padding-left: 20px;
  color: #33445d;
  line-height: 1.55;
}

.result-items:empty {
  display: none;
}

.suggested-reply {
  padding: 14px;
  border-left: 4px solid #27ae60;
  border-radius: 8px;
  background: #f2faf5;
}

.suggested-reply p {
  margin-bottom: 0;
  white-space: pre-wrap;
  line-height: 1.55;
}

button:focus-visible {
  outline: 3px solid rgba(39, 174, 96, 0.35);
  outline-offset: 2px;
}

@media (max-width: 460px) {
  .app-shell {
    padding: 18px 12px 30px;
  }

  .action-grid {
    grid-template-columns: 1fr;
  }

  .context-card,
  .result-header {
    align-items: flex-start;
  }
}
