:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #18201d;
  --muted: #52605b;
  --line: #d8ded9;
  --accent: #096b5d;
  --accent-strong: #064d43;
  --focus: #c94818;
  --soft: #e8f2ef;
  --font-size: 18px;
  --measure: 70ch;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: var(--font-size);
  line-height: 1.65;
}

body.simple-font {
  font-family: Verdana, Arial, Helvetica, sans-serif;
}

body.large-text {
  --font-size: 20px;
}

body.xlarge-text {
  --font-size: 22px;
}

body.narrow-reading {
  --measure: 58ch;
}

body.dark-mode {
  --bg: #111817;
  --surface: #1a2422;
  --text: #f4f7f5;
  --muted: #c5d0cc;
  --line: #3b4945;
  --accent: #77d9c5;
  --accent-strong: #a8eadc;
  --focus: #ffb86b;
  --soft: #17211f;
}

body.high-contrast {
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #000000;
  --muted: #222222;
  --line: #000000;
  --accent: #004b8d;
  --accent-strong: #00315c;
  --focus: #b00020;
  --soft: #f1f1f1;
}

body.reduce-motion *,
body.reduce-motion *::before,
body.reduce-motion *::after {
  scroll-behavior: auto !important;
  transition: none !important;
}

a {
  color: var(--accent-strong);
  text-underline-offset: 0.18em;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 4px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 10;
  transform: translateY(-180%);
  background: var(--text);
  color: var(--surface);
  padding: 0.6rem 0.9rem;
}

.skip-link:focus {
  transform: translateY(0);
}

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}

.header-inner,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--accent);
  color: white;
  border-radius: 6px;
  font-weight: 700;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.main-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--text);
  text-decoration: none;
}

.main-nav a:hover {
  text-decoration: underline;
}

.header-actions,
.hero-actions,
.form-row {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  flex-wrap: wrap;
}

button,
.primary-button,
.secondary-button,
.text-button,
.icon-button {
  border-radius: 6px;
  border: 2px solid var(--accent);
  min-height: 44px;
  padding: 0.62rem 0.9rem;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}

.primary-button {
  background: var(--accent);
  color: #ffffff;
}

.secondary-button,
.text-button,
.icon-button {
  background: var(--surface);
  color: var(--accent-strong);
}

.icon-button {
  min-width: 48px;
  font-weight: 700;
}

.access-panel {
  background: var(--soft);
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
}

.access-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(5, minmax(140px, 1fr));
  gap: 1rem;
  align-items: end;
}

.access-grid h2,
.access-grid p {
  margin: 0;
}

label span {
  display: block;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

select,
input {
  width: 100%;
  min-height: 44px;
  border: 2px solid var(--line);
  border-radius: 6px;
  padding: 0.55rem;
  font: inherit;
  background: var(--surface);
  color: var(--text);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.check-row input {
  width: 24px;
  min-height: 24px;
}

.check-row span {
  margin: 0;
}

.hero {
  padding: 4rem 0 3rem;
}

.hero-grid,
.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 2.5rem;
  align-items: center;
}

.eyebrow {
  color: var(--accent-strong);
  font-weight: 700;
  margin: 0 0 0.4rem;
}

h1,
h2,
h3 {
  line-height: 1.18;
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(2.2rem, 7vw, 4.8rem);
  max-width: 12ch;
}

h2 {
  font-size: clamp(1.45rem, 3vw, 2rem);
}

h3 {
  font-size: 1.2rem;
}

p,
li {
  max-width: var(--measure);
}

.hero-copy {
  font-size: 1.15rem;
}

.hero-illustration {
  align-self: stretch;
  display: flex;
  align-items: center;
}

.mock-window {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 18px 45px rgba(24, 32, 29, 0.08);
}

.mock-bar {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.mock-bar span {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--line);
}

.input-card {
  border: 2px solid var(--accent);
  border-radius: 8px;
  padding: 0.9rem;
  background: var(--soft);
}

.input-card p {
  margin: 0.25rem 0 0;
  max-width: none;
  font-weight: 700;
}

.mini-label,
.output-grid span {
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.flow-line {
  width: 2px;
  height: 2rem;
  margin: 0.25rem auto;
  background: var(--accent);
}

.output-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.output-grid div {
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.8rem;
  background: var(--surface);
}

.output-grid p {
  margin: 0.3rem 0 0;
  max-width: none;
}

.hero-panel,
.plain-box,
.feature-grid article,
.article-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.25rem;
}

.hero-panel ol {
  padding-left: 1.5rem;
}

.band {
  background: var(--soft);
  border-block: 1px solid var(--line);
  padding: 3rem 0;
}

.section {
  padding: 3rem 0;
}

.section-head {
  margin-bottom: 1.4rem;
}

.article-grid,
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.article-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.linked-card {
  color: var(--text);
  text-decoration: none;
}

.linked-card:hover h3 {
  text-decoration: underline;
}

.article-card p,
.article-card h3 {
  margin: 0;
}

.tag-list {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.subscribe-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1.1fr);
  gap: 2rem;
  align-items: start;
}

.subscribe-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.25rem;
}

.form-note {
  margin-bottom: 0;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.article-layout {
  padding: 3rem 0 4rem;
}

.article-body {
  max-width: 840px;
}

.blog-layout {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.blog-sidebar {
  position: sticky;
  top: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 1rem;
}

.blog-sidebar h2 {
  font-size: 1rem;
  margin-bottom: 0.65rem;
}

.blog-sidebar nav {
  display: grid;
  gap: 0.35rem;
}

.blog-sidebar a,
.back-link {
  color: var(--accent-strong);
  text-decoration: none;
}

.blog-sidebar a:hover,
.back-link:hover {
  text-decoration: underline;
}

.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  font-weight: 700;
}

.article-body h1 {
  font-size: clamp(2rem, 3vw, 2.7rem);
  max-width: 28ch;
  margin-bottom: 1rem;
}

.article-body h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.65rem);
  margin-bottom: 0.65rem;
}

.article-body section {
  border-top: 1px solid var(--line);
  padding-top: 1.6rem;
  margin-top: 1.8rem;
}

.lead {
  font-size: 1.22rem;
  color: var(--muted);
}

.prompt-box {
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 8px;
  padding: 1rem 1.15rem;
  position: relative;
}

.prompt-box p {
  margin: 0;
}

.article-figure {
  margin: 1.25rem 0;
}

.article-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.article-figure figcaption {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.prompt-box.has-copy {
  padding-top: 1rem;
  padding-right: 5.8rem;
}

.copy-prompt-button {
  position: absolute;
  right: 0.6rem;
  top: 0.6rem;
  z-index: 1;
  min-height: 30px;
  padding: 0.2rem 0.5rem;
  font-size: 0.78rem;
  line-height: 1.2;
}

@media (max-width: 880px) {
  .header-inner,
  .hero-grid,
  .two-column,
  .subscribe-section {
    grid-template-columns: 1fr;
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .access-grid,
  .article-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .blog-layout {
    grid-template-columns: 1fr;
  }

  .blog-sidebar {
    position: static;
  }

  h1 {
    max-width: 100%;
  }
}

@media (max-width: 560px) {
  .wrap {
    width: min(100% - 24px, 1120px);
  }

  body {
    line-height: 1.58;
  }

  .site-header {
    position: static;
  }

  html {
    scroll-padding-top: 0;
  }

  .main-nav {
    gap: 0.75rem;
  }

  .main-nav a,
  .text-button,
  .secondary-button,
  .primary-button {
    font-size: 0.95rem;
  }

  .hero {
    padding: 2.5rem 0 2rem;
  }

  h1 {
    font-size: clamp(2rem, 11vw, 3.2rem);
  }

  .article-layout {
    padding: 2rem 0 3rem;
  }

  .article-body h1 {
    font-size: clamp(1.9rem, 8vw, 2.35rem);
  }

  h2,
  .article-body h2 {
    font-size: clamp(1.3rem, 5.5vw, 1.65rem);
  }

  .lead {
    font-size: 1.08rem;
  }

  .article-body section {
    padding-top: 1.25rem;
    margin-top: 1.45rem;
  }

  .prompt-box.has-copy {
    padding-right: 5.4rem;
  }
}
