:root {
  --ink: #201b18;
  --muted: #665c55;
  --cream: #fff8ec;
  --paper: #fffcf7;
  --orange: #f26d3d;
  --orange-dark: #c94720;
  --peach: #ffd8c4;
  --green: #256d4a;
  --line: #e6d6c5;
  --shadow: 0 18px 48px rgba(65, 38, 22, .11);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 12%, rgba(242,109,61,.12), transparent 24rem),
    linear-gradient(180deg, var(--cream), #fff 52%, #f7efe5);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

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

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  padding: .7rem 1rem;
  background: var(--ink);
  color: #fff;
  border-radius: .5rem;
}
.skip-link:focus { top: 1rem; }

.site-header {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.2rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 2.6rem;
  aspect-ratio: 1;
  border-radius: 36% 64% 58% 42%;
  background: var(--orange);
  color: #fff;
  font-weight: 900;
  transform: rotate(-5deg);
}
.brand strong, .brand small { display: block; }
.brand strong { letter-spacing: -.03em; font-size: 1.05rem; }
.brand small { color: var(--muted); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; }
.site-header nav { display: flex; gap: 1.3rem; }
.site-header nav a { color: var(--muted); text-decoration: none; font-weight: 700; font-size: .92rem; }
.site-header nav a:hover, .site-header nav a:focus-visible { color: var(--orange-dark); }

main { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; }
.hero {
  padding: clamp(3.5rem, 9vw, 7rem) 0 4rem;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(16rem, .7fr);
  gap: clamp(2rem, 7vw, 6rem);
  align-items: end;
}
.eyebrow {
  color: var(--orange-dark);
  font-weight: 850;
  letter-spacing: .11em;
  text-transform: uppercase;
  font-size: .76rem;
  margin: 0 0 .8rem;
}
h1, h2, h3, p { margin-top: 0; }
h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.8rem, 7vw, 5.9rem); line-height: .96; letter-spacing: -.055em; margin-bottom: 1.5rem; max-width: 13ch; }
h2 { font-family: Georgia, "Times New Roman", serif; line-height: 1.05; letter-spacing: -.035em; }
.lede { font-size: clamp(1.08rem, 2vw, 1.28rem); color: var(--muted); max-width: 62ch; }
.trust-list { display: flex; flex-wrap: wrap; gap: .65rem; padding: 0; margin: 1.6rem 0 0; list-style: none; }
.trust-list li { padding: .55rem .8rem; background: rgba(255,255,255,.72); border: 1px solid var(--line); border-radius: 999px; font-weight: 750; font-size: .86rem; }
.hero-note { background: var(--ink); color: #fff; padding: 1.5rem; border-radius: 1.4rem 1.4rem 1.4rem .25rem; box-shadow: var(--shadow); transform: rotate(1.5deg); }
.hero-note span { display: block; color: #ffc5a7; font-size: 1.5rem; margin-bottom: .6rem; }
.hero-note p { margin: 0; color: #f7ede5; }

.studio {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 1.6rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.input-panel, .output-panel { padding: clamp(1.4rem, 4vw, 2.6rem); }
.output-panel { background: var(--ink); color: #fff; }
.step-heading { display: flex; gap: .9rem; align-items: flex-start; margin-bottom: 1.6rem; }
.step-heading > span { display: grid; place-items: center; width: 2rem; aspect-ratio: 1; border-radius: 50%; background: var(--orange); color: #fff; font-weight: 900; }
.step-heading p { margin: 0; color: var(--orange-dark); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; }
.output-panel .step-heading p { color: #ffb58e; }
.step-heading h2 { margin: .15rem 0 0; font-size: clamp(1.4rem, 3vw, 2rem); }
.situation-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-bottom: 1.6rem; }
.situation { min-height: 3.2rem; border: 1px solid var(--line); border-radius: .8rem; background: #fff; color: var(--ink); cursor: pointer; font-weight: 750; text-align: left; padding: .8rem 1rem; }
.situation:hover, .situation:focus-visible { border-color: var(--orange); }
.situation.active { color: #fff; background: var(--orange-dark); border-color: var(--orange-dark); }
label { display: block; margin: 1rem 0 .45rem; font-weight: 800; }
label span { color: var(--muted); font-weight: 500; }
input, textarea { width: 100%; border: 1px solid var(--line); border-radius: .8rem; padding: .85rem 1rem; background: #fff; color: var(--ink); resize: vertical; }
input:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid rgba(242,109,61,.35); outline-offset: 2px; }
#reply-output { min-height: 14rem; background: #302925; color: #fff; border-color: #554b45; line-height: 1.65; }
.field-meta { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; color: var(--muted); font-size: .78rem; margin: .5rem 0 1.2rem; }
.field-meta p { max-width: 62ch; }
.field-meta p, .field-meta span { margin: 0; }
.field-meta span { white-space: nowrap; }
.primary-button, .secondary-button, .text-button { border: 0; border-radius: .8rem; cursor: pointer; font-weight: 850; }
.primary-button { width: 100%; padding: .9rem 1rem; background: var(--orange); color: #1e120d; }
.primary-button:hover { background: #ff8659; }
.secondary-button { padding: .75rem 1rem; background: #fff; color: var(--ink); }
.text-button { padding: .75rem 1rem; background: transparent; color: #d7cac2; }
.output-actions { display: flex; justify-content: space-between; gap: .8rem; margin-top: 1rem; }
.copy-status { min-height: 1.5rem; color: #ffbd9b; font-size: .88rem; margin: .5rem 0 0; }
.final-check { border-top: 1px solid #514740; margin-top: 1.2rem; padding-top: 1.2rem; }
.final-check h3 { font-size: 1rem; }
.final-check ul { padding-left: 1.2rem; color: #ddd0c8; font-size: .9rem; }

.explain, .service-cta { margin: 4rem 0; padding: clamp(1.5rem, 4vw, 3rem); border: 1px solid var(--line); border-radius: 1.3rem; background: rgba(255,255,255,.76); }
.explain { display: grid; grid-template-columns: .8fr 1.2fr; gap: 3rem; }
.explain h2, .service-cta h2 { font-size: clamp(1.8rem, 4vw, 3rem); margin-bottom: .7rem; }
.explain ol { margin: 0; padding-left: 1.3rem; display: grid; gap: 1rem; }
.safety { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 4rem 0; }
.safety article { padding: 2rem; border-radius: 1.2rem; background: var(--paper); border: 1px solid var(--line); }
.tag { display: inline-block; padding: .3rem .65rem; border-radius: 999px; font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.good { background: #dcefe5; color: var(--green); }
.caution { background: #ffe0d3; color: #9a3416; }
.service-cta { display: flex; align-items: end; justify-content: space-between; gap: 2rem; background: var(--peach); }
.service-cta > div { max-width: 48rem; }
.link-button { display: inline-block; width: auto; white-space: nowrap; text-decoration: none; text-align: center; }

.legal-main { max-width: 780px; padding: 4rem 0 6rem; }
.legal-main h1 { font-size: clamp(2.7rem, 7vw, 4.8rem); }
.legal-card { background: #fff; border: 1px solid var(--line); border-radius: 1.2rem; padding: clamp(1.4rem, 4vw, 2.5rem); box-shadow: var(--shadow); }
.legal-card h2 { margin-top: 2rem; }
.legal-card h2:first-child { margin-top: 0; }

footer { padding: 3rem max(1rem, calc((100% - 1180px) / 2)); background: var(--ink); color: #e9ddd5; display: grid; grid-template-columns: 1fr auto 1.25fr; gap: 2rem; align-items: start; }
footer p { margin-bottom: .35rem; }
.footer-brand { color: #fff; font-weight: 900; font-size: 1.08rem; }
.footer-links { display: flex; flex-direction: column; gap: .45rem; }
.footer-links a, .coffee-box a { color: #ffb58e; }
.coffee-box { border-left: 1px solid #544a44; padding-left: 1.5rem; }
.coffee-box a { font-weight: 850; }
.coffee-box p { margin-top: .6rem; color: #bfb1a9; font-size: .8rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 820px) {
  .site-header nav a:not(:last-child) { display: none; }
  .hero, .studio, .explain, .safety { grid-template-columns: 1fr; }
  .hero { padding-top: 3rem; }
  .hero-note { transform: none; }
  .service-cta { display: block; }
  .service-cta .link-button { margin-top: 1rem; width: 100%; }
  footer { grid-template-columns: 1fr; }
  .coffee-box { border-left: 0; border-top: 1px solid #544a44; padding: 1.5rem 0 0; }
}

@media (max-width: 520px) {
  .situation-grid { grid-template-columns: 1fr; }
  .field-meta, .output-actions { display: block; }
  .field-meta span { display: block; margin-top: .35rem; }
  .text-button { margin-top: .4rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
