*{box-sizing:border-box}
:root{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#172033;background:#f5f7fa}
body{margin:0;line-height:1.55}
a{color:#165fa7}
.site-header{background:#fff;border-bottom:1px solid #e1e5eb}
.header-inner,.main,.footer-inner{width:min(100% - 32px,980px);margin:auto}
.header-inner{padding:22px 0}
.brand{font-size:1.28rem;font-weight:750;color:#172033;text-decoration:none}
.main{padding:34px 0 48px}
.hero{text-align:center;margin-bottom:24px}
.hero h1{font-size:clamp(1.8rem,4vw,2.6rem);line-height:1.12;margin:.2rem 0 .7rem}
.hero p{max-width:720px;margin:0 auto;color:#566174}
.card{background:#fff;border:1px solid #e0e5eb;border-radius:14px;padding:24px;box-shadow:0 8px 26px rgba(26,42,67,.06);margin:20px 0}
.ad-wrap{min-height:90px;display:flex;align-items:center;justify-content:center;overflow:hidden}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.field{display:flex;flex-direction:column;gap:7px}
.field.full{grid-column:1/-1}
label,legend{font-weight:650}
input,select,button{font:inherit}
input[type=text],select{width:100%;padding:11px 12px;border:1px solid #b9c2cd;border-radius:8px;background:#fff;color:#172033}
input[type=text]:focus,select:focus{outline:3px solid rgba(24,103,178,.15);border-color:#1867b2}
fieldset{border:0;padding:0;margin:0}
.radio-row{display:flex;gap:22px;align-items:center;min-height:44px}
.actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:22px}
button{border:0;border-radius:8px;padding:11px 18px;cursor:pointer;font-weight:700}
button.primary{background:#1767ae;color:#fff}
button.secondary{background:#e8edf3;color:#172033}
button:disabled{opacity:.5;cursor:not-allowed}
.status{min-height:1.5em;margin-top:12px;font-size:.95rem}
.status.ok{color:#237046}.status.error{color:#a32727}
.result{border-left:5px solid #1767ae}
.result h2{margin-top:0}
.result-code{font:700 clamp(1.45rem,5vw,2.1rem)/1.2 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.06em;word-break:break-all;margin:.4rem 0}
.muted{color:#667286;font-size:.92rem}
.info h2{font-size:1.25rem}
.info ul{padding-left:1.25rem}
.site-footer{background:#fff;border-top:1px solid #e1e5eb;color:#667286}
.footer-inner{padding:24px 0;font-size:.9rem}
.print-sheet{display:none}
@media(max-width:680px){.form-grid{grid-template-columns:1fr}.field.full{grid-column:auto}.card{padding:18px}.main{padding-top:24px}}

.ad-local-note{color:#7a8492;font-size:.9rem}

.result-top{
  padding:0;
  overflow:hidden;
  border:1px solid #b9c2cd;
  border-radius:14px;
}
.result-top h2{
  margin:0;
  padding:10px 18px;
  text-align:center;
  background:#27ad2d;
  color:#fff;
  font:500 clamp(1.35rem,3vw,2rem)/1.2 Georgia,serif;
}
.result-top .result-code{
  min-height:86px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  text-align:center;
}
.result-top .result-code-empty{
  font:500 clamp(1.15rem,2.5vw,1.55rem)/1.3 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  letter-spacing:0;
  color:#178c20;
}
.result-top #result-text{
  margin:-8px 18px 14px;
  text-align:center;
  color:#667286;
}
.result-actions{
  text-align:center;
  padding:0 18px 18px;
}
.result-actions button{
  min-width:180px;
}
#ad-top{
  margin-top:12px;
  margin-bottom:12px;
  min-height:100px;
  border-radius:0;
}
.calculator-card{
  margin-top:12px;
}

.home-nav{display:flex;gap:16px;flex-wrap:wrap;margin-top:10px}
.home-nav a{color:#165fa7;text-decoration:none;font-weight:700}
.home-nav a:hover{text-decoration:underline}
