:root {
  --bg: #f4f7f6;
  --card: #ffffff;
  --text: #102f3b;
  --muted: #647985;
  --primary: #114c5a;
  --accent: #ff9a32;
  --border: #dce6e3;
  --soft: #eef5f3;
  --warning: #fff4ed;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app-shell {
  width: min(900px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0 60px;
}

.hero {
  background: linear-gradient(135deg, #0f3f4a, #172f3b);
  color: white;
  padding: 30px;
  border-radius: 24px;
  margin-bottom: 16px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #ffd7a8;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 48px);
}

.hero-text {
  margin: 12px 0 0;
  color: #e8f1ef;
  line-height: 1.6;
  font-size: 16px;
}

.notice-card,
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: 0 10px 28px rgba(23,47,59,.06);
}

.notice-card {
  background: var(--warning);
  border-color: #ffd1b8;
  line-height: 1.5;
}

.card h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.muted {
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 20px;
}

/* Top-down flow */
.checkbox-grid,
.form-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.checkbox-grid label {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: start;
  gap: 12px;
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 15px 16px;
  line-height: 1.45;
  font-weight: 700;
}

.checkbox-grid input {
  margin-top: 3px;
  transform: scale(1.15);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

label {
  font-weight: 700;
  font-size: 13px;
  color: #244653;
}

select,
textarea,
input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 13px 14px;
  font-size: 15px;
  color: var(--text);
  background: white;
  outline: none;
}

textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.5;
}

select:focus,
textarea:focus,
input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(17,76,90,.12);
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 22px;
}

button {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 14px 20px;
  background: var(--primary);
  color: white;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(17,76,90,.18);
}

button.secondary {
  background: #dfe8e6;
  color: var(--text);
  box-shadow: none;
}

.small-btn {
  width: auto;
  background: var(--accent);
  color: #2a1b0b;
  padding: 9px 14px;
  font-size: 13px;
}

.hidden { display: none; }

.output-block {
  background: #fbfdfc;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  margin-top: 16px;
}

.output-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.output-block h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 0;
  font-family: Consolas, Monaco, monospace;
  font-size: 14px;
  line-height: 1.55;
}

ul {
  margin: 0;
  padding-left: 20px;
}

li {
  margin-bottom: 7px;
  line-height: 1.45;
}

@media (max-width: 700px) {
  .app-shell {
    width: calc(100% - 22px);
    padding-top: 14px;
  }

  .hero,
  .card,
  .notice-card {
    padding: 20px;
    border-radius: 18px;
  }

  .output-header {
    flex-direction: column;
    align-items: flex-start;
  }
}