:root {
  color-scheme: light;
  --ink: #20352f;
  --muted: #52635d;
  --green: #1d5b48;
  --green-dark: #143f34;
  --green-pale: #e8f1ec;
  --paper: #f5f5ef;
  --line: #d7dfd9;
  --white: #fff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding-bottom: 94px;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.55;
}

button,
input,
select,
textarea {
  font: inherit;
}

.page-width {
  width: min(100% - 32px, 760px);
  margin-inline: auto;
}

.site-header {
  padding: 22px 0;
  background: var(--green-dark);
  color: var(--white);
}

.greenmath {
  color: var(--green);
  font-weight: 700;
}

/* The header background is dark green, so the highlight must be light */
.site-header .greenmath {
  color: #9fe3b9;
}

.eyebrow {
  margin: 0 0 5px;
  color: #b7d9c8;
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.1em;
}

.site-header h1 {
  margin: 0;
  font-size: clamp(1.7rem, 5vw, 2.3rem);
  line-height: 1.2;
}

.site-header .page-width > p:last-child {
  margin: 7px 0 0;
  color: #e0eee7;
}

.intro,
.panel,
.observation-guide {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
}

.intro {
  margin-top: 24px;
}

.intro h2,
.panel h2,
.observation-guide h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.intro ol {
  padding-left: 1.3rem;
}

.intro li + li {
  margin-top: 5px;
}

.intro p:last-child,
.observation-guide p {
  margin-bottom: 0;
  color: var(--muted);
}

.panel > .hint {
  margin: 0 0 16px;
}

.hint {
  color: var(--muted);
  font-size: 0.9rem;
}

.field {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  font-weight: 650;
}

.field .hint {
  margin: 0;
  font-weight: 400;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #aebdb4;
  border-radius: 7px;
  background: var(--white);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 400;
}

.field textarea {
  min-height: 90px;
  resize: vertical;
}

:focus-visible {
  outline: 3px solid #d59a2b;
  outline-offset: 2px;
}

.observation-guide {
  border-left: 5px solid var(--green);
  background: var(--green-pale);
}

.observation-guide ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 24px;
  padding-left: 1.2rem;
}

.privacy-note {
  margin: 16px 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.action-bar {
  position: fixed;
  z-index: 1;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 8px 16px 12px;
  border-top: 1px solid var(--line);
  background: rgb(255 255 255 / 96%);
  box-shadow: 0 -3px 12px rgb(22 53 42 / 8%);
}

#save-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

#save-status.error {
  color: #9c2c26;
}

.actions {
  display: flex;
  width: min(100%, 520px);
  gap: 10px;
}

.button {
  min-height: 44px;
  flex: 1;
  padding: 9px 14px;
  border: 1px solid var(--green);
  border-radius: 7px;
  background: var(--green);
  color: var(--white);
  cursor: pointer;
  font-weight: 700;
}

.button:hover {
  background: var(--green-dark);
}

.button-secondary {
  background: var(--white);
  color: var(--green-dark);
}

.button-secondary:hover {
  background: var(--green-pale);
}

@media (max-width: 560px) {
  .page-width {
    width: min(100% - 24px, 760px);
  }

  .intro,
  .panel,
  .observation-guide {
    padding: 16px;
  }

  .observation-guide ul {
    grid-template-columns: 1fr;
  }
}

@media print {
  body {
    padding: 0;
    background: var(--white);
    color: #111;
    font-size: 10pt;
  }

  .site-header {
    padding: 0 0 12px;
    border-bottom: 2px solid #333;
    background: var(--white);
    color: #111;
  }

  .eyebrow,
  .site-header .page-width > p:last-child {
    color: #333;
  }

  .intro,
  .panel,
  .observation-guide {
    break-inside: avoid;
    box-shadow: none;
  }

  .action-bar {
    display: none;
  }
}
