:root {
  color-scheme: light;
  --bg: #eef3ec;
  --card: #fffef9;
  --ink: #203328;
  --muted: #4c6052;
  --border: #b8c7b9;
  --accent: #315c45;
  font: 16px/1.52 "Instrument Sans", Inter, system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--bg); }
a { color: var(--accent); text-underline-offset: .2em; }
.wrap { width: min(1110px, calc(100% - 3rem)); margin-inline: auto; }
.mast { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 62px; border-bottom: 1px solid var(--border); }
.brand { font-weight: 840; color: var(--ink); text-decoration: none; }
.hero { padding: 2.85rem 0 1.65rem; }
h1, h2 { line-height: 1.03; letter-spacing: -.05em; }
h1 { font-size: clamp(2.65rem, 7vw, 5.15rem); margin: 0; }
.hero p { color: var(--muted); font-size: 1.11rem; margin: .7rem 0 0; max-width: 44rem; }
h2 { margin: 0 0 .45rem; font-size: clamp(1.4rem, 4vw, 1.95rem); }
.panel { padding: clamp(1rem, 2.7vw, 1.6rem); border: 1px solid var(--border); border-radius: 10px; background: var(--card); }
.input-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; }
.input-grid > div { display: flex; flex-direction: column; }
.input-grid textarea { margin-top: auto; }
label { display: block; font-weight: 750; }
small, .muted { font-weight: 420; color: var(--muted); }
.muted { margin: .3rem 0 .55rem; font-size: .87rem; }
input, textarea { width: 100%; color: var(--ink); background: #fff; border: 1px solid #7b9384; border-radius: 6px; padding: .54rem .62rem; font: inherit; }
textarea { resize: vertical; min-height: 6rem; }
.settings { display: grid; grid-template-columns: minmax(0, 12rem) minmax(0, 8rem); gap: .85rem; margin-top: .85rem; }
.settings label { margin-bottom: .2rem; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
button { min-height: 42px; border: 1px solid var(--accent); border-radius: 6px; background: var(--accent); color: white; padding: .42rem .72rem; font: inherit; font-weight: 750; cursor: pointer; }
button:hover { filter: brightness(.9); }
.secondary { background: transparent; color: var(--accent); }
:focus-visible { outline: 3px solid #3e8059; outline-offset: 3px; }
.result { margin-top: 1rem; }
.result-heading { display: flex; justify-content: space-between; align-items: start; gap: .75rem; flex-wrap: wrap; }
.result-heading .actions { margin-top: 0; }
.scroll { overflow-x: auto; margin-top: .55rem; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
caption { text-align: left; padding: .38rem 0; font-weight: 780; }
th, td { padding: .45rem .52rem; text-align: left; border: 1px solid var(--border); overflow-wrap: anywhere; min-width: 4.8rem; }
th { background: #e6f0e5; }
.guide { max-width: 50rem; padding: 2.5rem 0 1.4rem; }
.guide p { color: var(--muted); }
footer { border-top: 1px solid var(--border); padding: 1rem 0; font-weight: 750; }
@media (max-width: 700px) {
  .wrap { width: calc(100% - 1.5rem); }
  .hero { padding-top: 2rem; }
  .input-grid { grid-template-columns: 1fr; }
}
@media print {
  .mast, .hero, #plan, .guide, footer, button { display: none; }
  body, .panel { background: white; }
  .wrap { width: 100%; }
  .result { margin: 0; padding: 0; border: 0; }
  .scroll { overflow: visible; }
  table { font-size: .64rem; }
  th, td { min-width: 0; padding: .15rem; }
}
