:root {
  --green: #1f4d2e;
  --green-deep: #143520;
  --fairway: #e6efe4;
  --paper: #fbfbf8;
  --ink: #1c1f1c;
  --muted: #5d665e;
  --line: #c8d0c6;
  --error: #a4262c;
  --pen: #14286e;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 16px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
.wrap { max-width: 720px; margin: 0 auto; padding: 0 20px; }
a { color: var(--green); }

.masthead { background: var(--green); color: #fff; padding: 40px 0 34px; }
.masthead .club { margin: 0 0 14px; font-size: 14px; opacity: .8; }
.masthead h1 { margin: 0 0 14px; font-size: 34px; line-height: 1.1; font-weight: 700; letter-spacing: -.01em; }
.masthead h1 span { display: block; font-size: 19px; font-weight: 400; margin-top: 8px; opacity: .92; }
.masthead .lede { margin: 0; max-width: 56ch; opacity: .9; }

main { padding: 8px 20px 40px; }
section { padding: 28px 0 22px; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: 0; }
h2 { margin: 0 0 16px; font-size: 20px; font-weight: 700; color: var(--green-deep); }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.f { display: flex; flex-direction: column; gap: 5px; }
.f-w { grid-column: 1 / -1; }
.f span { font-size: 14px; color: var(--muted); }
.f span em { font-style: normal; opacity: .7; }
.f input {
  font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px;
  background: #fff; color: var(--ink); min-height: 44px;
}
.f input:focus, .seg input:focus-visible + span, .tariff:focus-within, .check input:focus-visible {
  outline: 3px solid rgba(31,77,46,.35); outline-offset: 1px;
}
.f input.bad { border-color: var(--error); }

.choice { margin: 0 0 16px; }
.choice p { margin: 0 0 6px; font-size: 14px; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: block; padding: 9px 16px; min-height: 44px; line-height: 26px; cursor: pointer; border-right: 1px solid var(--line); }
.seg label:last-child span { border-right: 0; }
.seg input:checked + span { background: var(--green); color: #fff; }
.hint { display: block; margin-top: 6px; color: var(--muted); }
[data-show] { display: none; }
[data-show].on { display: block; }
.grid[data-show].on { display: grid; }
.auto { margin: 0 0 8px; font-size: 14px; color: var(--muted); }

.variant {
  margin: 18px 0 0; padding: 12px 14px; background: var(--fairway);
  border-left: 4px solid var(--green); border-radius: 0 6px 6px 0; font-size: 15px;
}
.variant strong { display: block; color: var(--green-deep); }
.variant span { color: var(--muted); font-size: 14px; }
.h-sub { font-size: 14px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.sub-h { margin: 22px 0 8px; font-size: 14px; font-weight: 600; color: var(--green-deep); }
.check-top { margin-top: 0; }
.partner { padding-top: 18px; }
.partner .grid.addr, .partner .choice.addr { margin-top: 16px; }

.tariffs { display: grid; gap: 8px; }
.tariff {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff;
  border: 1px solid var(--line); border-radius: 6px; cursor: pointer;
}
.tariff input { width: 20px; height: 20px; margin: 0; accent-color: var(--green); flex: none; }
.tariff .t { flex: 1; }
.tariff .t small { display: block; color: var(--muted); font-size: 13px; }
.tariff .p { font-weight: 700; color: var(--green-deep); white-space: nowrap; }
.tariff:has(input:checked) { border-color: var(--green); background: var(--fairway); }
.note { font-size: 14px; color: var(--muted); margin: 14px 0 0; }

.sig { margin: 18px 0 6px; }
.sig-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.sig-head small { margin-left: 6px; color: var(--error); }
.sig canvas {
  display: block; width: 100%; height: 170px; background: #fff; border: 1px solid var(--line);
  border-radius: 6px 6px 0 0; touch-action: none; cursor: crosshair;
}
.sig-line { height: 6px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 6px 6px; background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 10px) center/100% 1px no-repeat #fff; }
.link { background: none; border: 0; color: var(--green); font: inherit; font-size: 14px; cursor: pointer; padding: 0; text-decoration: underline; }

.check { display: flex; gap: 12px; align-items: flex-start; margin: 22px 0 0; font-size: 15px; }
.check input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--green); flex: none; }
.hp { position: absolute; left: -9999px; }

.err { display: none; margin: 8px 0 0; color: var(--error); font-size: 14px; }
.err.on { display: block; }
.err-global { font-weight: 600; }

.primary {
  display: inline-block; margin-top: 22px; padding: 14px 24px; min-height: 52px;
  background: var(--green); color: #fff; border: 0; border-radius: 6px; font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none;
}
.primary:hover { background: var(--green-deep); }
.primary[disabled] { opacity: .6; cursor: wait; }
#done { background: var(--fairway); padding: 28px 24px; border-radius: 8px; margin-top: 24px; }
#done h2 { margin-top: 0; }

.foot { font-size: 13px; color: var(--muted); padding-bottom: 40px; }

@media (max-width: 560px) {
  .masthead { padding: 28px 0 24px; }
  .masthead h1 { font-size: 27px; }
  .grid { grid-template-columns: 1fr; }
  .seg { display: flex; }
  .seg span { flex: 1; text-align: center; }
  .primary { width: 100%; text-align: center; }
}
@media (prefers-reduced-motion: no-preference) {
  .tariff, .seg span { transition: background-color .12s, border-color .12s; }
}
