:root {
  --ink: #183b37;
  --ink-soft: #526966;
  --forest: #123f3a;
  --forest-light: #1e5b54;
  --cream: #f6f2e9;
  --paper: #fffdf8;
  --line: #d9ded8;
  --coral: #ec795f;
  --gold: #e5b953;
  --shadow: 0 24px 70px rgba(30, 59, 54, .12);
  --radius: 22px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 95% 5%, rgba(229,185,83,.16), transparent 27rem),
    var(--cream);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
button, textarea { font: inherit; }
button { color: inherit; }
.page-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--forest); text-decoration: none; font-weight: 750; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: var(--paper); background: var(--forest); font-size: 12px; letter-spacing: .08em; }
.privacy-pill { display: flex; align-items: center; gap: 8px; padding: 8px 13px; border: 1px solid rgba(18,63,58,.15); border-radius: 999px; background: rgba(255,253,248,.6); color: var(--ink-soft); font-size: 13px; font-weight: 650; }
.privacy-pill svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.hero { max-width: 760px; padding: 78px 0 54px; }
.eyebrow, .step-label { margin: 0 0 12px; color: var(--coral); font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1 { max-width: 740px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(46px, 6vw, 76px); font-weight: 500; letter-spacing: -.048em; line-height: .98; }
.intro { max-width: 620px; margin: 24px 0 0; color: var(--ink-soft); font-size: clamp(17px, 2vw, 20px); }

.calculator-card { display: grid; grid-template-columns: 1.08fr .92fr; overflow: hidden; border: 1px solid rgba(18,63,58,.12); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.input-panel, .results-panel { min-width: 0; padding: 38px; }
.results-panel { position: relative; display: flex; flex-direction: column; border-left: 1px solid var(--line); background: #edf0ea; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.panel-heading h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 27px; font-weight: 500; line-height: 1.1; }
.step-label { margin-bottom: 7px; font-size: 10px; }
.text-button, .copy-button { border: 0; background: transparent; cursor: pointer; font-size: 13px; font-weight: 700; }
.text-button { padding: 6px 0; color: var(--forest-light); text-decoration: underline; text-underline-offset: 3px; }
button:disabled { opacity: .42; cursor: not-allowed; }
textarea { width: 100%; min-height: 280px; resize: vertical; padding: 20px; border: 1px solid var(--line); border-radius: 14px; outline: 0; color: var(--ink); background: #fff; font-size: 16px; line-height: 1.65; transition: border-color .2s, box-shadow .2s; }
textarea::placeholder { color: #9ba8a5; }
textarea:focus { border-color: var(--forest-light); box-shadow: 0 0 0 4px rgba(30,91,84,.1); }
.input-footer { display: flex; justify-content: space-between; gap: 16px; margin: 12px 2px 22px; color: var(--ink-soft); font-size: 12px; }
.local-note { display: flex; align-items: center; gap: 5px; }
.local-note svg { width: 15px; fill: none; stroke: var(--forest-light); stroke-width: 2.2; }
.primary-button { width: 100%; min-height: 52px; border: 0; border-radius: 12px; color: white; background: var(--forest); cursor: pointer; font-weight: 750; letter-spacing: .01em; transition: transform .16s, background .16s; }
.primary-button:hover { background: var(--forest-light); }
.primary-button:active { transform: translateY(1px); }
.primary-button:focus-visible, .copy-button:focus-visible, .text-button:focus-visible { outline: 3px solid rgba(236,121,95,.5); outline-offset: 3px; }
.copy-button { display: flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid rgba(18,63,58,.18); border-radius: 9px; background: rgba(255,255,255,.46); }
.copy-button svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.empty-state { display: grid; place-items: center; flex: 1; min-height: 350px; padding: 40px 20px; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 78px; height: 78px; margin-bottom: 15px; border-radius: 50%; background: rgba(255,255,255,.58); }
.empty-icon svg { width: 42px; fill: none; stroke: #8ba09c; stroke-width: 1.5; }
.empty-state p { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 21px; }
.empty-state span { margin-top: 6px; color: var(--ink-soft); font-size: 13px; }
.results-content { animation: appear .28s ease-out; }
@keyframes appear { from { opacity: 0; transform: translateY(5px); } }
.complexity-card { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 22px; border-radius: 15px; color: #fff; background: var(--forest); }
.result-label { display: block; margin-bottom: 5px; color: rgba(255,255,255,.7); font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.complexity-row { display: flex; align-items: baseline; gap: 11px; }
.complexity-row strong { font-family: Georgia, "Times New Roman", serif; font-size: 48px; font-weight: 500; line-height: 1; }
.complexity-copy { max-width: 126px; color: rgba(255,255,255,.82); font-size: 12px; line-height: 1.3; }
.scale { display: flex; align-items: center; gap: 4px; }
.scale span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: rgba(255,255,255,.48); font-size: 10px; font-weight: 750; }
.scale span.active { color: var(--forest); background: var(--gold); }
.score-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.score-card { padding: 18px; border: 1px solid rgba(18,63,58,.1); border-radius: 13px; background: rgba(255,255,255,.64); }
.score-card span, .score-card small { display: block; color: var(--ink-soft); font-size: 11px; }
.score-card strong { display: block; margin: 7px 0 2px; font-family: Georgia, "Times New Roman", serif; font-size: 34px; font-weight: 500; line-height: 1; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin: 18px 0 0; padding: 17px 0; border-top: 1px solid rgba(18,63,58,.13); border-bottom: 1px solid rgba(18,63,58,.13); }
.stat-grid div { padding: 0 15px; border-right: 1px solid rgba(18,63,58,.13); text-align: center; }
.stat-grid div:last-child { border: 0; }
.stat-grid dt { color: var(--ink-soft); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.stat-grid dd { margin: 3px 0 0; font-size: 18px; font-weight: 750; }
.result-warning { margin: 14px 0 0; padding: 11px 13px; border-radius: 9px; color: #76511a; background: #fff3d6; font-size: 12px; }
.toast { position: absolute; right: 28px; bottom: 26px; padding: 9px 13px; border-radius: 8px; color: white; background: var(--forest); font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(6px); transition: .2s; }
.toast.show { opacity: 1; transform: translateY(0); }

.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; padding: 72px 0 80px; }
.info-grid article { display: flex; gap: 17px; padding-top: 20px; border-top: 1px solid rgba(18,63,58,.2); }
.info-number { color: var(--coral); font-family: Georgia, "Times New Roman", serif; font-size: 14px; }
.info-grid h2 { margin: 0 0 8px; font-family: Georgia, "Times New Roman", serif; font-size: 20px; font-weight: 500; }
.info-grid p { margin: 0; color: var(--ink-soft); font-size: 13px; }
footer { display: flex; justify-content: space-between; padding: 24px max(20px, calc((100% - 1180px)/2)); color: rgba(255,255,255,.68); background: var(--forest); font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 850px) {
  .hero { padding-top: 52px; }
  .calculator-card { grid-template-columns: 1fr; }
  .results-panel { border-top: 1px solid var(--line); border-left: 0; }
  .info-grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 540px) {
  .page-shell { width: min(100% - 24px, 1180px); }
  .site-header { padding: 18px 0; }
  .privacy-pill { padding: 8px; }
  .privacy-pill svg { width: 17px; }
  .privacy-pill { font-size: 0; }
  .hero { padding: 44px 2px 38px; }
  h1 { font-size: 45px; }
  .input-panel, .results-panel { padding: 25px 20px; }
  .panel-heading { gap: 10px; }
  .copy-button span { display: none; }
  textarea { min-height: 235px; }
  .complexity-card { align-items: flex-start; flex-direction: column; }
  .score-grid { grid-template-columns: 1fr; }
  .empty-state { min-height: 260px; }
  footer { padding-inline: 20px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
