*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:       #1a5c38;
  --green-light: #f0f7f3;
  --green-mid:   #2e7d52;
  --text:        #1a1a1a;
  --muted:       #555;
  --border:      #d0ddd6;
  --bg:          #f8faf9;
  --white:       #ffffff;
  --error:       #c0392b;
  --error-bg:    #fdf0ee;
  --radius:      6px;
  --shadow:      0 1px 4px rgba(0,0,0,0.08);
}

body {
  font-family: Georgia, "Times New Roman", serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--green-mid); }
a:hover { color: var(--green); }

/* ── Header ── */
.site-header {
  background: var(--green);
  padding: 0;
}

.banner-link {
  display: block;
  line-height: 0;
}

.site-banner {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

.disclaimer {
  background: rgba(0,0,0,0.25);
  padding: 0.65rem 1.5rem;
  font-size: 0.85rem;
  text-align: center;
  color: #d4ead9;
}
.disclaimer strong { color: var(--white); }
.disclaimer a { color: #a8d5bc; }

/* ── Main ── */
.main {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ── Form ── */
.ruling-form { display: flex; flex-direction: column; gap: 0.75rem; }

.form-label {
  font-size: 1rem;
  font-weight: bold;
  color: var(--green);
}

.form-textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  resize: vertical;
  background: var(--white);
  transition: border-color 0.15s;
}
.form-textarea:focus {
  outline: none;
  border-color: var(--green-mid);
}
.form-textarea:disabled { background: #f0f0f0; }

.submit-btn {
  align-self: flex-start;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: 0.6rem 1.5rem;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}
.submit-btn:hover:not(:disabled) { background: var(--green-mid); }
.submit-btn:disabled { opacity: 0.5; cursor: default; }

/* ── Examples ── */
.examples { margin-top: 1.75rem; }
.examples-label { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.5rem; }
.example-list { display: flex; flex-direction: column; gap: 0.4rem; }
.example-btn {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.85rem;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--green-mid);
  text-align: left;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.example-btn:hover { background: var(--green-light); border-color: var(--green-mid); }

/* ── Error ── */
.error-box {
  margin-top: 1.5rem;
  background: var(--error-bg);
  border: 1px solid #e8b4b0;
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  color: var(--error);
  font-size: 0.95rem;
}

/* ── Result ── */
.result-box {
  margin-top: 1.75rem;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.ruling-text p { margin-bottom: 0.75rem; font-size: 1rem; }
.ruling-text p:last-child { margin-bottom: 0; }

.sources { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.sources-heading { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 0.5rem; }
.sources-list { list-style: none; display: flex; flex-direction: column; gap: 0.3rem; }
.source-item { font-size: 0.875rem; }
.law-number { font-weight: bold; color: var(--green); }
.law-title { color: var(--text); }
.source-doc { color: var(--muted); font-style: italic; }

.new-question-btn {
  margin-top: 1.25rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.45rem 1rem;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s;
}
.new-question-btn:hover { border-color: var(--green-mid); color: var(--green); }

/* ── Password page ── */
.password-box {
  max-width: 420px;
  margin: 2.5rem auto;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}
.password-box h2 {
  font-size: 1.2rem;
  color: var(--green);
  margin-bottom: 0.75rem;
}
.password-box p {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding: 1.25rem 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .main { padding: 1.25rem 1rem; }
}
