:root {
  --cream: #FFFBF7;
  --charcoal: #3E3A36;
  --espresso: #171412;
  --stone: #767068;            /* AA-corrected text grey, was #9C9590 at 2.87:1 */
  --sand: #E0DBD5;
  --terracotta: #C05621;       /* logo, borders, fills only */
  --terracotta-text: #B85018;  /* AA-safe terracotta for text */
  --forest: #2A6352;
  --amber: #D97706;
  --btn-text: #FFFFFF;          /* sanctioned sixth text colour, button text only: white on --terracotta measures 4.57:1, AA for normal text — none of the five approved text colours clears AA on that background */
  --font-sans: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Consolas, monospace;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
}

ul, ol {
  padding: 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* CLS prevention for image slots landing in a later task: img{max-width;
   height:auto} above stops overflow, and any <img> written later must carry
   explicit width/height attributes so the browser reserves the box before
   the file loads — that reservation is native HTML behaviour, not CSS. */

/* Base typography */
html {
  font-size: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--charcoal);
  background-color: var(--cream);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  color: var(--espresso);
  line-height: 1.2;
  font-weight: 700;
}

a {
  color: var(--terracotta-text);
}

code, pre, kbd {
  font-family: var(--font-mono);
}

/* Layout */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container--prose {
  max-width: 68ch;
}

.section {
  padding: 3rem 0;
}

.section + .section {
  border-top: 1px solid var(--sand);
}

/* Hero */
.hero {
  padding: 4rem 0;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1rem;
}

.hero p {
  color: var(--stone);
  font-size: 1.125rem;
  max-width: 60ch;
  margin: 0 auto 1.5rem;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 1.5rem;
  background-color: var(--terracotta);
  color: var(--btn-text);
  border: none;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: var(--terracotta-text);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--espresso);
  outline-offset: 2px;
}

/* Full width on small screens: inline-flex sizes to content by default,
   which leaves a thumb-width tap target on a phone. */
@media (max-width: 600px) {
  .btn-primary {
    display: flex;
    width: 100%;
  }
}

/* Forms */
.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.form-row label {
  font-weight: 600;
  color: var(--espresso);
}

input,
textarea,
select,
button {
  font-family: var(--font-sans);
  font-size: 1rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="search"],
textarea,
select {
  min-height: 44px;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--sand);
  border-radius: 6px;
  background-color: var(--cream);
  color: var(--charcoal);
  width: 100%;
}

textarea {
  min-height: 88px;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--terracotta-text);
  outline-offset: 1px;
}

button {
  min-height: 44px;
}

/* Aside */
.aside {
  background-color: var(--sand);
  border-radius: 8px;
  padding: 1.5rem;
  color: var(--charcoal);
}

/* FAQ, built from native <details>/<summary>, no JS */
.faq-item {
  border-bottom: 1px solid var(--sand);
  padding: 1rem 0;
}

.faq-item summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  color: var(--espresso);
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::before {
  content: '+';
  display: inline-block;
  width: 1.25rem;
  color: var(--terracotta-text);
  font-weight: 700;
}

.faq-item[open] summary::before {
  content: '\2212';
}

.faq-item p {
  color: var(--stone);
  padding-top: 0.75rem;
  margin-left: 1.25rem;
}

/* Hero copy */
.hero-promise {
  font-size: 1.25rem;
  color: var(--charcoal);
}

.hero-sig {
  font-size: 1rem;
}

/* Quick answer block */
.quick-answer {
  text-align: left;
  margin: 2rem 0;
}

.quick-answer h2 {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}

.quick-answer p + p {
  margin-top: 0.75rem;
}

/* Signup form */
.signup {
  text-align: left;
  max-width: 28rem;
  margin: 2rem auto 0;
}

.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  margin-bottom: 1rem;
}

/* The checkbox is a 44px tap target without a 44px painted box: the label
   sits inside the same row, so the whole row is comfortably thumb-sized. */
.form-consent input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  min-height: 0;
  margin: 0.75rem 0 0;
  flex: 0 0 auto;
  accent-color: var(--terracotta);
}

.form-consent label {
  font-weight: 400;
  color: var(--charcoal);
  padding: 0.625rem 0;
  cursor: pointer;
}

.form-legal {
  font-size: 0.875rem;
  color: var(--stone);
  margin-top: 0.75rem;
}

/* Body copy rhythm */
.section p {
  margin-bottom: 1rem;
}

.section h2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  margin-bottom: 1rem;
}

.section h3 {
  font-size: 1.125rem;
  margin: 2rem 0 0.5rem;
}

/* The reset zeroes ul padding, which clips the marker. Put it back here
   rather than in the reset, so pages that want a bare list still get one. */
.section ul {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.section li {
  margin-bottom: 0.5rem;
}

/* Diagram */
.diagram {
  margin: 2rem auto;
  max-width: 420px;
}

.diagram svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Portrait */
.portrait {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  margin-bottom: 1.5rem;
}

@media (max-width: 600px) {
  .portrait {
    width: 200px;
    height: 200px;
  }
}

/* Reviews */
blockquote {
  border-left: 3px solid var(--sand);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
}

blockquote p {
  color: var(--charcoal);
}

blockquote cite {
  display: block;
  font-style: normal;
  font-size: 0.875rem;
  color: var(--stone);
}

/* Footer */
.footer {
  padding: 2.5rem 0;
  color: var(--stone);
  font-size: 0.875rem;
  border-top: 1px solid var(--sand);
}

.footer a {
  color: var(--stone);
}

.footer a:hover,
.footer a:focus-visible {
  color: var(--terracotta-text);
}
