:root {
  --teal: #053f4b;
  --dark: #07343e;
  --green: #5bbb88;
  --mint: #a6e5be;
  --paper: #fff;
  --wash: #edf6f1;
  --text: #203d42;
  --rule: #c9dcd5;
  --gutter: max(5vw, calc((100% - 76rem) / 2));
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--text); font: 1.06rem/1.6 "Segoe UI", Arial, sans-serif; }
a { color: var(--teal); text-underline-offset: .22em; }
header, main, section, aside, footer { padding-inline: var(--gutter); }
header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .25rem 2rem; padding-block: .65rem; background: white; border-bottom: 1px solid var(--rule); }
.brand { display: block; width: min(22rem, 100%); }
.brand img { display: block; width: 100%; height: auto; }
nav { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem clamp(.9rem, 2.6vw, 2.4rem); }
nav a { padding-block: .55rem; text-decoration: none; font-size: .97rem; font-weight: 650; }
nav a:hover, nav a[aria-current] { text-decoration: underline; text-decoration-color: #28825b; text-decoration-thickness: .15em; }
main {
  display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: 4vw;
  background: linear-gradient(115deg, var(--dark) 8%, var(--teal) 58%, #105950);
  color: white; padding-block: clamp(2.75rem, 5.7vw, 5.5rem); border-bottom: 5px solid var(--green);
}
main::after { content: ""; aspect-ratio: 540 / 320; background: url('tank-study.svg') center / contain no-repeat; }
h1, h2, h3, legend { margin: 0; line-height: 1.1; font-family: "Segoe UI", Arial, sans-serif; }
h1 { font-size: clamp(2.75rem, 4.9vw, 5.15rem); font-weight: 750; letter-spacing: -.052em; max-width: 17ch; text-wrap: balance; }
h2 { font-size: clamp(1.9rem, 3.1vw, 3.15rem); letter-spacing: -.038em; color: var(--teal); }
h3, legend { color: var(--teal); font-size: 1.38rem; font-weight: 700; letter-spacing: -.025em; }
main p { color: #e0eee8; max-width: 56ch; margin: 1.25rem 0 0; }
main a, .action, button {
  display: inline-block; border: 0; border-radius: .35rem; padding: .82rem 1.2rem;
  font-family: inherit; font-size: 1rem; line-height: 1.4; font-weight: 700;
  background: var(--teal); color: white; text-decoration: none; cursor: pointer;
}
main a { margin-top: 1.6rem; background: var(--mint); color: var(--dark); }
main a:hover { background: #c2f2cf; }
.action:hover, button:hover { background: #176052; }
section, aside { padding-block: clamp(2.75rem, 5vw, 5rem); }
section > h2::before, aside > h2::before { content: ""; display: block; width: 3rem; height: .25rem; margin-bottom: 1rem; background: var(--green); }
section p, aside p { max-width: 70ch; }
article { display: grid; grid-template-columns: 1fr 1.65fr; gap: 2rem; border-top: 1px solid var(--rule); padding: 1.5rem 0; }
article:first-of-type { margin-top: 2rem; }
article p { margin: 0; max-width: 65ch; }
aside, #result { background: var(--wash); }
aside a { font-weight: 700; }
footer { background: var(--dark); color: #e2f0e9; padding-block: 2.35rem; border-top: 4px solid var(--green); }
footer strong { color: white; }
footer a { color: var(--mint); overflow-wrap: anywhere; }
fieldset { min-width: 0; padding: 0; border: 0; margin: 2rem 0; }
legend { margin-bottom: 1rem; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) 6.5rem 3.3rem; gap: .75rem; align-items: center; padding: .7rem 1rem; border-top: 1px solid var(--rule); }
.item:nth-of-type(even) { background: var(--wash); }
.item span { font: .95rem/1.4 monospace; }
.fields { display: grid; gap: 1rem; max-width: 52rem; }
.fields label { display: grid; gap: .35rem; }
input, textarea { min-width: 0; width: 100%; font: inherit; padding: .6rem .75rem; border: 1px solid #738d85; background: white; color: var(--text); border-radius: .3rem; }
input[type=radio] { width: auto; margin-inline-end: .4rem; accent-color: var(--teal); }
textarea { resize: vertical; }
#summary { display: block; max-width: 60rem; margin: 1rem 0; }
#result .action, #result button { margin: .25rem .35rem .25rem 0; }
#feedback { color: #923319; font-weight: bold; }
:focus-visible { outline: 3px solid #2d9268; outline-offset: 3px; }
[hidden] { display: none !important; }
@media (max-width: 700px) {
  header { justify-content: center; gap: .15rem; padding-block: .35rem .55rem; }
  .brand { width: min(100%, 25rem); margin-block: .5rem .3rem; }
  nav { width: 100%; justify-content: center; gap: .1rem 1rem; }
  nav a { font-size: .92rem; }
  main { grid-template-columns: 1fr; gap: 1.7rem; }
  main::after { width: min(100%, 25rem); justify-self: center; }
  article { grid-template-columns: 1fr; gap: .55rem; }
  .item { grid-template-columns: minmax(0, 1fr) 4.7rem 2.8rem; gap: .4rem; padding: .65rem .25rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
