/* Plant-Forward Public Tender Kit — visual identity.
   Palette: forest #1e4d2b, cream #f7f3e8, terracotta #c4552d, amber #b7791f,
   ink #1c2419. Type: Fraunces (display) + Work Sans (body). */

:root {
  --forest: #1e4d2b;
  --forest-deep: #14351e;
  --cream: #f7f3e8;
  --paper: #fffdf7;
  --terracotta: #c4552d;
  --terracotta-deep: #a53f1d;
  --amber: #b7791f;
  --amber-soft: #fdf3dd;
  --ink: #1c2419;
  --ink-soft: #4d5a49;
  --line: #ddd5c2;
  --leaf: #e8a13c;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Work Sans', system-ui, sans-serif;
  font-size: 16.5px;
  line-height: 1.6;
}

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */

.site-header {
  background: var(--forest-deep);
  color: var(--cream);
  border-bottom: 4px solid var(--leaf);
}

.site-header .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cream);
  text-decoration: none;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 1.15rem;
}

.brand-mark {
  width: 30px;
  height: 30px;
  flex: none;
}

.brand-scope {
  margin: 0;
  font-size: 0.85rem;
  color: #cfe0cf;
}

/* Type */

h1,
h2,
h3 {
  font-family: 'Fraunces', Georgia, serif;
  line-height: 1.15;
  color: var(--forest-deep);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  font-weight: 700;
  margin: 8px 0 16px;
}

h2 {
  font-size: 1.7rem;
  margin: 6px 0 10px;
}

h3 {
  font-size: 1.15rem;
  margin: 18px 0 8px;
}

.kicker {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  color: var(--terracotta);
  margin: 0;
}

.lead {
  font-size: 1.2rem;
  max-width: 46rem;
  color: var(--ink-soft);
}

.step-note {
  max-width: 44rem;
  color: var(--ink-soft);
}

/* Steps */

.step {
  padding: 48px 0 64px;
}

.step[hidden] {
  display: none;
}

/* First screen */

.answers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 28px 0;
}

.answer {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px 8px;
}

.answer h2 {
  font-size: 1.02rem;
  margin: 0 0 6px;
  color: var(--forest);
}

.answer p {
  font-size: 0.93rem;
  color: var(--ink-soft);
}

.answer-animals {
  border: 1.5px solid var(--forest);
  background: #eef3e6;
}

.answer-animals h2 {
  color: var(--terracotta-deep);
}

.start-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Buttons */

.btn {
  font: inherit;
  font-weight: 600;
  border-radius: 999px;
  padding: 12px 26px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.06s ease, background 0.12s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--terracotta);
  color: #fff;
}

.btn-primary:hover {
  background: var(--terracotta-deep);
}

.btn-ghost {
  background: transparent;
  color: var(--forest);
  border-color: var(--forest);
}

.btn-ghost:hover {
  background: #eef3e6;
}

.btn-small {
  padding: 7px 16px;
  font-size: 0.9rem;
}

/* Chips */

.fixed-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0 22px;
}

.chip {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 0.88rem;
}

.chip-muted {
  color: var(--ink-soft);
  border-style: dashed;
}

.flag-chip {
  display: inline-block;
  background: var(--amber-soft);
  border: 1px solid var(--amber);
  color: #7a5010;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Fields */

.field {
  margin: 18px 0;
}

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.field input[type='text'],
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}

.field textarea {
  resize: vertical;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.88rem;
  line-height: 1.5;
}

.field input:focus,
.field textarea:focus {
  outline: 3px solid rgba(30, 77, 43, 0.25);
  border-color: var(--forest);
}

.field-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.file-label {
  font-weight: 600;
  color: var(--forest);
  text-decoration: underline;
  cursor: pointer;
}

/* Rules */

.rule-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 5px solid var(--forest);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 14px 0;
}

.rule-card.off {
  border-left-color: var(--line);
  opacity: 0.62;
}

.rule-card.flagged {
  border-left-color: var(--amber);
}

.rule-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.rule-title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 1.08rem;
  margin: 0;
}

.rule-level {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.rule-clause {
  margin: 10px 0;
}

.rule-source {
  font-size: 0.86rem;
  color: var(--ink-soft);
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}

.rule-source a {
  color: var(--forest);
  font-weight: 600;
}

.rule-source blockquote {
  margin: 6px 0 0;
  padding-left: 12px;
  border-left: 3px solid var(--leaf);
  font-style: italic;
}

.rule-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-top: 10px;
}

.rule-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--forest);
}

.group-heading {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.25rem;
  color: var(--forest);
  margin: 30px 0 4px;
}

/* Scoring */

.sum-line {
  font-weight: 600;
  margin-bottom: 12px;
}

.sum-line.ok {
  color: var(--forest);
}

.sum-line.bad {
  color: var(--terracotta-deep);
}

.criterion {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  margin: 12px 0;
}

.criterion-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.criterion-name {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0;
}

.criterion-weight {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.criterion-weight input {
  width: 64px;
  font: inherit;
  padding: 6px 8px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--cream);
  color: var(--ink);
}

.criterion p {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 8px 0 0;
}

/* Validation */

.warning {
  border-radius: 12px;
  padding: 14px 18px;
  margin: 12px 0;
  font-size: 0.95rem;
}

.warning strong {
  display: block;
  margin-bottom: 2px;
}

.warning-red {
  background: #fbe9e2;
  border: 1.5px solid var(--terracotta);
}

.warning-amber {
  background: var(--amber-soft);
  border: 1.5px solid var(--amber);
}

.warning-green {
  background: #eef3e6;
  border: 1.5px solid var(--forest);
}

.warning a {
  color: var(--forest);
  font-weight: 600;
}

/* Downloads and preview */

.downloads {
  margin: 26px 0;
}

.download-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.preview {
  margin-top: 26px;
}

.preview-doc {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px 32px;
  overflow-x: auto;
}

.preview-doc .doc-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.5rem;
  color: var(--forest-deep);
  margin: 0 0 4px;
}

.preview-doc .doc-meta {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 18px;
}

.preview-doc h4 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.1rem;
  color: var(--forest);
  margin: 22px 0 8px;
}

.preview-doc ol {
  padding-left: 22px;
}

.preview-doc li {
  margin: 10px 0;
}

.preview-doc .doc-flag {
  display: block;
  font-size: 0.82rem;
  color: #7a5010;
  background: var(--amber-soft);
  border: 1px solid var(--amber);
  border-radius: 8px;
  padding: 4px 10px;
  margin-top: 6px;
}

.preview-doc .doc-source {
  display: block;
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 4px;
}

.preview-doc table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.88rem;
  margin: 10px 0;
}

.preview-doc th,
.preview-doc td {
  border: 1px solid var(--line);
  text-align: left;
  padding: 7px 10px;
  vertical-align: top;
}

.preview-doc th {
  background: #eef3e6;
}

.preview-doc pre {
  background: var(--cream);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 14px;
  font-size: 0.8rem;
  white-space: pre-wrap;
  font-family: ui-monospace, Menlo, monospace;
}

.preview-doc .doc-sources li {
  font-size: 0.85rem;
}

/* Nav */

.nav-row {
  display: flex;
  gap: 12px;
  margin-top: 30px;
  flex-wrap: wrap;
}

/* Footer */

.site-footer {
  background: var(--forest-deep);
  color: #cfe0cf;
  padding: 26px 0;
  font-size: 0.88rem;
}

.site-footer a {
  color: var(--leaf);
}

.footer-links {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .step {
    padding: 32px 0 48px;
  }

  .preview-doc {
    padding: 18px;
  }
}
