:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-soft: #eef3f5;
  --ink: #162025;
  --muted: #637178;
  --line: #dce5e8;
  --accent: #1c6d78;
  --accent-dark: #11464f;
  --good: #22755d;
  --warn: #9b6a1f;
  --bad: #a33d3d;
  --shadow: 0 18px 46px rgba(25, 44, 52, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

.site-header,
.site-footer,
.hero,
.tool-shell,
.content-band {
  max-width: 1180px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 22px;
  padding-bottom: 22px;
}

.brand {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.nav,
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.nav a,
.site-footer a {
  text-decoration: none;
}

.nav a:hover,
.site-footer a:hover {
  color: var(--accent-dark);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 46px;
  align-items: center;
  padding-top: 62px;
  padding-bottom: 56px;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.02;
}

h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.08;
}

h3 {
  margin: 0;
  font-size: 17px;
}

.hero-text {
  max-width: 620px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  margin-top: 28px;
  background: var(--ink);
  color: #fff;
}

.button.primary:hover {
  background: var(--accent-dark);
}

.button.secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.signal-panel,
.input-panel,
.results-panel,
.method-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.signal-panel {
  padding: 24px;
}

.panel-label,
.result-hero span,
.metrics span,
.scope-callout span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.signal-panel strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.signal-panel p {
  margin: 16px 0 0;
  color: var(--muted);
}

.meter {
  height: 10px;
  margin-top: 20px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--warn));
}

.tool-shell {
  padding-top: 26px;
  padding-bottom: 54px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 26px;
}

.tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.82fr);
  gap: 22px;
  align-items: start;
}

.input-panel,
.results-panel {
  padding: 22px;
}

fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 20px;
  padding: 0;
  border: 0;
}

legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  font-weight: 850;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

input,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  color: var(--ink);
  outline: none;
}

input {
  height: 42px;
  padding: 0 12px;
}

textarea {
  resize: vertical;
  padding: 11px 12px;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(28, 109, 120, 0.14);
}

.suffix-field {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.suffix-field input {
  border: 0;
  box-shadow: none;
}

.suffix-field span {
  padding: 0 12px;
  color: var(--muted);
  font-weight: 800;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.form-actions .button.primary {
  margin-top: 0;
}

.status {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--accent-dark);
  font-size: 13px;
}

.result-hero {
  padding: 20px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.result-hero.good {
  background: #e6f4ef;
}

.result-hero.warn {
  background: #f7efe1;
}

.result-hero.bad {
  background: #f7e8e8;
}

.result-hero strong {
  display: block;
  margin-top: 4px;
  font-size: 34px;
}

.result-hero small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.metrics div,
.scope-callout,
.email-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.metrics div {
  padding: 14px;
}

.metrics strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
}

.scope-callout,
.email-box {
  margin-top: 14px;
  padding: 16px;
}

.scope-callout strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
}

.scope-callout p {
  margin: 8px 0 0;
  color: var(--muted);
}

.email-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.email-heading span {
  color: var(--accent-dark);
  font-weight: 850;
}

#emailOutput {
  min-height: 290px;
  background: var(--surface);
  color: var(--ink);
}

.content-band {
  padding-top: 18px;
  padding-bottom: 66px;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.method-grid article {
  padding: 20px;
  box-shadow: none;
}

.method-grid span {
  color: var(--accent);
  font-weight: 900;
}

.method-grid h3 {
  margin-top: 12px;
}

.method-grid p {
  margin: 10px 0 0;
  color: var(--muted);
}

.faq-band {
  padding-top: 0;
}

.faq-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.faq-list article {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.faq-list p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  padding-bottom: 32px;
  color: var(--muted);
}

@media (max-width: 860px) {
  .hero,
  .tool-grid,
  .method-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 38px;
  }

  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .site-header,
  .site-footer,
  .hero,
  .tool-shell,
  .content-band {
    padding-left: 16px;
    padding-right: 16px;
  }

  fieldset,
  .metrics {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 36px;
  }
}
