:root {
  color-scheme: light;
  --app-ink: #182721;
  --app-muted: #587068;
  --app-green: #23684b;
  --app-green-dark: #173b2c;
  --app-line: #dce3da;
  --app-cream: #f7f5ee;
  --app-mint: #eaf5e9;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--app-cream); }

body {
  min-height: 100vh;
  margin: 0;
  padding: 1px 0;
  color: var(--app-ink);
  background:
    radial-gradient(ellipse at 12% 4%, rgba(201, 240, 216, .52), transparent 36rem),
    var(--app-cream);
  font: 1rem/1.6 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

main {
  width: min(46rem, calc(100% - 2rem));
  margin: clamp(1.5rem, 6vh, 4.5rem) auto;
  padding: clamp(1.5rem, 5vw, 3rem);
  border: 1px solid var(--app-line);
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 20px 55px rgba(24, 39, 33, .08);
}

h1, h2, h3 { color: var(--app-ink); line-height: 1.15; letter-spacing: -.035em; }
h1 { margin: .35rem 0 1rem; font-size: clamp(2rem, 6vw, 2.8rem); }
h2 { margin: 1.8rem 0 .75rem; font-size: clamp(1.35rem, 4vw, 1.75rem); }
h3 { margin: 1.2rem 0 .5rem; font-size: 1.15rem; }
p { margin: .75rem 0; }
strong { color: #173b2c; }

a { color: var(--app-green); text-underline-offset: .2em; }
a:hover, a:focus-visible { color: #174a33; }
main > p:first-child { color: var(--app-muted); font-size: .9rem; }
.home-link { display: inline-flex; align-items: center; gap: .6rem; min-height: 2.8rem; margin-bottom: 1.1rem; padding: .35rem .9rem .35rem .4rem; border: 1px solid #a9cdb4; border-radius: .8rem; background: #fff; box-shadow: 0 3px 10px #173b2c12; color: var(--app-green-dark); font-size: .95rem; font-weight: 700; text-decoration: none; transition: background-color .15s ease, transform .15s ease; }
.home-link:hover { background: #edf7ed; color: var(--app-green-dark); transform: translateX(-2px); }
.home-link-arrow { display: grid; width: 1.9rem; height: 1.9rem; place-items: center; border-radius: .55rem; background: var(--app-green); color: #fff; font-size: 1.1rem; line-height: 1; }

section, fieldset, form {
  margin: 1rem 0;
}

section, fieldset {
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--app-line);
  border-radius: 1rem;
  background: #fcfdf9;
}

fieldset { min-width: 0; }
legend { padding: 0 .4rem; color: var(--app-green-dark); font-weight: 750; }
label { color: #2f473c; font-weight: 600; }
input:not([type="checkbox"]):not([type="radio"]), textarea, select {
  width: min(100%, 34rem);
  min-height: 2.9rem;
  margin-top: .35rem;
  padding: .65rem .8rem;
  border: 1px solid #c5d3c8;
  border-radius: .7rem;
  background: #fff;
  color: var(--app-ink);
  font: inherit;
}
textarea { min-height: 8rem; resize: vertical; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--app-green); }
input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid rgba(35, 104, 75, .28);
  outline-offset: 2px;
}

button {
  min-height: 2.8rem;
  padding: .65rem 1.1rem;
  border: 1px solid var(--app-green-dark);
  border-radius: .75rem;
  background: var(--app-green-dark);
  color: #fff;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  transition: background-color .15s ease, transform .15s ease;
}
button:hover:not(:disabled) { background: var(--app-green); transform: translateY(-1px); }
button:disabled { cursor: not-allowed; opacity: .58; }

.primary-action { margin: 1.25rem 0; }
.primary-action button, .primary-button { width: 100%; min-height: 3.5rem; font-size: 1.08rem; }
.primary-button { display: block; padding: .8rem 1rem; border: 1px solid var(--app-green-dark); border-radius: .75rem; background: var(--app-green-dark); color: #fff; font-weight: 750; text-align: center; text-decoration: none; }
.primary-button:hover { background: var(--app-green); color: #fff; }
.secondary-action button { min-height: 2.5rem; padding: .4rem .8rem; border-color: var(--app-line); background: #fff; color: var(--app-green-dark); }
.secondary-action button:hover:not(:disabled) { background: var(--app-cream); }

ul, ol { padding-left: 1.35rem; }
li { padding-block: .12rem; }
small, .muted { color: var(--app-muted); }
[role="alert"] { padding: .8rem 1rem; border: 1px solid #e7b9aa; border-radius: .75rem; background: #fff2ed; color: #853e2d; }
[role="status"] { color: var(--app-green); }
hr { border: 0; border-top: 1px solid var(--app-line); margin: 1.5rem 0; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .65rem; border-bottom: 1px solid var(--app-line); text-align: left; }
pre, code { border-radius: .4rem; background: #f0f5ef; }
code { padding: .12rem .3rem; }
pre { overflow: auto; padding: 1rem; }

@media (max-width: 600px) {
  main { width: min(100% - 1rem, 46rem); margin: .5rem auto; padding: 1.35rem 1rem 1.75rem; border-radius: 1.1rem; }
  section, fieldset { padding: 1rem; }
  button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
