:root {
  color-scheme: light;
  --accent: #173f35;
  --accent-text: var(--accent);
  --accent-soft: #e7f0ec;
  --canvas: #f7f8f6;
  --ink: #171a18;
  --text: #303633;
  --muted: #5e6662;
  --line: #d9dfdb;
  --surface: #ffffff;
  --danger: #b42318;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--canvas);
  color: var(--text);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--canvas);
}

button, textarea, a { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.site-header,
main,
footer {
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 760;
  letter-spacing: -.025em;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--surface);
}

.brand-mark span {
  position: absolute;
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
}

.brand-mark span:nth-child(1) { transform: translateY(-5px); }
.brand-mark span:nth-child(3) { transform: translateY(5px); }

.header-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
  font-size: 14px;
  font-weight: 680;
  text-decoration: none;
}

.hero {
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(480px, 1.18fr);
  align-items: center;
  gap: clamp(44px, 7vw, 100px);
  padding: 70px 0 96px;
}

.hero-copy { min-width: 0; }

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

h1, h2, p { overflow-wrap: anywhere; }

h1 {
  max-width: 720px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(52px, 6.5vw, 86px);
  font-weight: 790;
  line-height: .94;
  letter-spacing: -.065em;
}

h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(34px, 4.5vw, 58px);
  line-height: 1;
  letter-spacing: -.05em;
}

.hero-description {
  max-width: 620px;
  margin: 28px 0 20px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.62;
}

.utility-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.utility-note strong { color: var(--ink); }

.tool-shell,
.result-section {
  position: relative;
  border: 1px solid var(--line);
  background: var(--surface);
}

.tool-shell {
  min-width: 0;
  padding: 26px;
  border-radius: 24px;
  box-shadow: 0 18px 55px rgba(22, 31, 27, .09);
}

.tool-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.field-heading,
.input-footer,
.result-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.field-heading { margin-bottom: 10px; }
.field-heading label { color: var(--ink); font-size: 14px; font-weight: 740; }

#word-count {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

#word-count.over-limit,
.field-status.error { color: var(--danger); }

textarea {
  width: 100%;
  min-height: 250px;
  display: block;
  resize: vertical;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: #fcfdfc;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
  transition: border-color .18s, box-shadow .18s, background .18s;
}

textarea:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}

textarea:focus-visible {
  outline: 3px solid var(--accent-text);
  outline-offset: 3px;
}

.input-footer { min-height: 48px; }

.field-status {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.text-button,
.secondary-button {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 760;
}

.text-button { padding: 0; }

.primary-button {
  width: 100%;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 20px;
  border: 1px solid var(--accent);
  border-radius: 12px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-weight: 760;
  text-decoration: none;
  transition: transform .18s, box-shadow .18s, opacity .18s;
}

.primary-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 color-mix(in srgb, var(--accent) 24%, transparent);
}

.primary-button:disabled { cursor: not-allowed; opacity: .38; }

.primary-button.compact {
  width: auto;
  min-width: 210px;
  flex: 0 0 auto;
}

.limit-upsell {
  margin-top: 16px;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--accent);
  border-radius: 12px;
  background: var(--accent-soft);
}

.limit-upsell[hidden] { display: none; }
.limit-upsell strong { display: block; color: var(--ink); }
.limit-upsell p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }

.result-section {
  scroll-margin-top: 24px;
  margin: 0 auto 96px;
  padding: clamp(24px, 4vw, 44px);
  border-radius: 20px;
}

.result-heading { margin-bottom: 22px; }
.result-heading h2 { font-size: 34px; }

.secondary-button {
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.information {
  display: grid;
  grid-template-columns: minmax(260px, .72fr) minmax(0, 1.28fr);
  gap: clamp(48px, 8vw, 120px);
  padding: 104px 0 120px;
  border-top: 1px solid var(--line);
}

.information-heading { align-self: start; position: sticky; top: 32px; }

.information-copy,
.article-reference {
  color: var(--text);
  font-size: 16px;
  line-height: 1.75;
}

.information-copy { margin: 0 0 14px; }
.article-reference { margin: 0 0 34px; }
.article-reference a { color: var(--accent); font-weight: 760; }

.faq-list { border-top: 1px solid var(--line); }
.information details { border-bottom: 1px solid var(--line); }

.information summary {
  cursor: pointer;
  padding: 22px 0;
  color: var(--ink);
  font-weight: 740;
  list-style-position: inside;
}

.information details p {
  max-width: 720px;
  margin: -4px 0 24px;
  color: var(--muted);
  line-height: 1.7;
}

.disclosure {
  margin: 30px 0 0;
  padding: 16px 18px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

footer {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

footer p { margin: 0; }
footer strong { color: var(--ink); }

@media (max-width: 980px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 50px;
    padding: 58px 0 90px;
  }

  .hero-copy { max-width: 760px; }
  .tool-shell { width: min(760px, 100%); }
}

@media (max-width: 720px) {
  .site-header,
  main,
  footer { width: min(100% - 28px, 1240px); }

  .site-header { min-height: 70px; }
  .brand { max-width: calc(100% - 108px); font-size: 14px; }
  .brand > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .brand-mark { width: 32px; height: 32px; }
  .header-link { font-size: 12px; }
  .hero { gap: 36px; padding: 40px 0 72px; }
  h1 { font-size: clamp(44px, 13vw, 66px); }
  .hero-description { margin-top: 22px; font-size: 16px; }
  .tool-shell { padding: 18px; border-radius: 16px; }
  .tool-meta { padding-bottom: 14px; }
  textarea { min-height: 230px; resize: none; padding: 14px; }
  .information { grid-template-columns: 1fr; gap: 34px; padding: 76px 0 88px; }
  .information-heading { position: static; }
  .information-heading h2 { max-width: 600px; }
  .result-section { padding: 20px; border-radius: 14px; }
  footer { min-height: 110px; align-items: flex-start; justify-content: center; flex-direction: column; }
}

@media (max-width: 520px) {
  .eyebrow { margin-bottom: 14px; font-size: 10px; }
  .hero { padding-top: 28px; }
  h1 { font-size: clamp(42px, 14.5vw, 58px); }
  .tool-meta { font-size: 9px; }
  .field-heading { align-items: flex-start; }
  .input-footer { min-height: 74px; align-items: flex-start; flex-direction: column; gap: 0; padding: 7px 0 12px; }
  .field-status { max-width: none; text-align: left; }
  .text-button,
  .secondary-button,
  .primary-button { min-height: 48px; }
  .limit-upsell { grid-template-columns: 1fr; padding: 16px; }
  .primary-button.compact { width: 100%; min-width: 0; }
  .result-heading { align-items: stretch; flex-direction: column; }
  .secondary-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
