/* SellsItself: an order pad on green-bar ledger paper. One family, navy ink, highlighter for the visitor's words. */
:root {
  --ledger: #e3eee5;
  --ledger-band: #edf5ee;
  --paper: #fcfdfb;
  --ink: #15233a;
  --muted: #55647a;
  --rule: #b7cbbd;
  --stamp: #c2372e;
  --marker: #ffe45c;
  --font: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --band: 2.25rem;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--ink);
  background: repeating-linear-gradient(180deg, var(--ledger) 0 var(--band), var(--ledger-band) var(--band) calc(var(--band) * 2));
}
a { color: inherit; text-underline-offset: 0.18em; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.wrap { width: min(72rem, 100% - 2.5rem); margin-inline: auto; }

.top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 1.25rem 0; }
.brand { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; text-decoration: none; }
.top p { margin: 0; color: var(--muted); font-size: 0.9375rem; }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 27rem); gap: clamp(1.5rem, 5vw, 4.5rem); align-items: start; padding: clamp(1rem, 4vw, 3rem) 0 clamp(3rem, 7vw, 5.5rem); }
.hero h1 { margin: 0; font-size: clamp(2.5rem, 6.6vw, 5.1rem); line-height: 0.95; letter-spacing: -0.045em; font-weight: 800; font-stretch: 88%; text-wrap: balance; }
.hero .lede { margin: 1.5rem 0 0; max-width: 34rem; font-size: 1.25rem; line-height: 1.4; color: var(--ink); }
.hero .fine { margin: 1rem 0 0; max-width: 34rem; color: var(--muted); font-size: 0.9375rem; }

/* The order pad: the one loud object on the page. */
.pad { background: var(--paper); border: 2px solid var(--ink); border-radius: 4px 4px 14px 14px; box-shadow: 7px 7px 0 var(--ink); display: flex; flex-direction: column; min-height: 30rem; max-height: min(42rem, 82vh); }
.pad-head { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 0.7rem 1rem; border-bottom: 2px solid var(--ink); background: radial-gradient(circle at 0.55rem 50%, var(--ledger) 0.26rem, transparent 0.3rem) 0 -0.95rem / 1.3rem 1.3rem repeat-x var(--paper); padding-top: 1.15rem; }
.pad-head strong { font-weight: 700; letter-spacing: -0.01em; }
.pad-head span { color: var(--muted); font-size: 0.875rem; }
.log { flex: 1; overflow-y: auto; padding: 1rem 1rem 0.5rem; display: flex; flex-direction: column; gap: 0.85rem; background: repeating-linear-gradient(180deg, transparent 0 1.55rem, #e6efe8 1.55rem calc(1.55rem + 1px)); overscroll-behavior: contain; }
.msg { margin: 0; max-width: 92%; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.user { align-self: flex-end; background: var(--marker); padding: 0.1rem 0.5rem; border-radius: 2px; box-decoration-break: clone; }
.msg.note { color: var(--stamp); font-size: 0.9375rem; }
.msg.wait::after { content: ""; display: inline-block; width: 0.55em; height: 1em; margin-left: 0.15em; background: var(--ink); vertical-align: -0.12em; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0.5rem 1rem 0; }
.chips button { font: inherit; font-size: 0.875rem; color: var(--ink); background: transparent; border: 1.5px dashed var(--ink); border-radius: 999px; padding: 0.2rem 0.7rem; cursor: pointer; }
.chips button:hover { background: var(--marker); border-style: solid; }
.ask { display: flex; gap: 0.5rem; padding: 0.75rem 1rem 1rem; }
.ask input, .lead input { flex: 1; min-width: 0; font: inherit; color: var(--ink); background: transparent; border: 0; border-bottom: 2px solid var(--ink); border-radius: 0; padding: 0.45rem 0.1rem; }
.ask input::placeholder, .lead input::placeholder { color: var(--muted); opacity: 1; }
.btn { font: inherit; font-weight: 700; color: var(--paper); background: var(--ink); border: 2px solid var(--ink); border-radius: 6px; padding: 0.5rem 1rem; cursor: pointer; text-decoration: none; display: inline-block; line-height: 1.3; }
.btn:hover { background: var(--paper); color: var(--ink); }
.btn[disabled] { opacity: 0.5; cursor: default; }
.btn.go { background: var(--stamp); border-color: var(--stamp); }
.btn.go:hover { background: var(--paper); color: var(--stamp); }
.action { display: block; margin-top: 0.5rem; }

.lead { display: grid; gap: 0.6rem; margin-top: 0.5rem; padding: 0.85rem; border: 1.5px dashed var(--ink); border-radius: 6px; background: var(--paper); white-space: normal; }
.lead label { display: grid; gap: 0.1rem; font-size: 0.875rem; color: var(--muted); }
.lead .status { margin: 0; font-size: 0.9375rem; }
.lead .status.bad { color: var(--stamp); }

section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
h2 { margin: 0 0 1.5rem; font-size: clamp(1.75rem, 3.6vw, 2.75rem); line-height: 1.05; letter-spacing: -0.035em; font-weight: 800; font-stretch: 90%; max-width: 22ch; text-wrap: balance; }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 0.9rem; }
.steps li::before { content: counter(step); display: block; font-size: 2.5rem; font-weight: 800; line-height: 1; letter-spacing: -0.04em; margin-bottom: 0.6rem; }
.steps h3 { margin: 0 0 0.35rem; font-size: 1.1875rem; letter-spacing: -0.015em; }
.steps p { margin: 0; color: var(--muted); max-width: 34ch; }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.85em; background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; padding: 0.1em 0.35em; overflow-wrap: anywhere; }

.slip { position: relative; background: var(--paper); border: 2px solid var(--ink); border-radius: 4px; padding: clamp(1.25rem, 3vw, 2.25rem); max-width: 40rem; box-shadow: 7px 7px 0 var(--ink); }
.slip dl { margin: 0 0 1.5rem; }
.slip .row { display: flex; align-items: baseline; gap: 0.5rem; padding: 0.45rem 0; }
.slip .row::before { content: ""; order: 2; flex: 1; border-bottom: 2px dotted var(--rule); transform: translateY(-0.25em); }
.slip dt { order: 1; }
.slip dd { order: 3; margin: 0; font-weight: 700; white-space: nowrap; }
.slip .total { border-top: 2px solid var(--ink); margin-top: 0.5rem; padding-top: 0.8rem; font-size: 1.375rem; font-weight: 800; letter-spacing: -0.02em; }
.stamp { position: absolute; top: -1.1rem; right: 1rem; transform: rotate(6deg); border: 3px solid var(--stamp); color: var(--stamp); background: var(--paper); border-radius: 6px; padding: 0.15rem 0.7rem; font-weight: 800; font-size: 1.0625rem; letter-spacing: 0.01em; }

.faq { max-width: 44rem; }
.faq details { border-top: 2px solid var(--ink); padding: 0.9rem 0; }
.faq details:last-child { border-bottom: 2px solid var(--ink); }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.125rem; letter-spacing: -0.01em; }
.faq p { margin: 0.6rem 0 0; color: var(--muted); max-width: 62ch; }

footer { padding: 2rem 0 3rem; color: var(--muted); font-size: 0.9375rem; }

/* Demo page */
.demo-head { padding: clamp(1rem, 3vw, 2rem) 0 1.5rem; }
.demo-head h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1; letter-spacing: -0.04em; font-weight: 800; font-stretch: 88%; text-wrap: balance; overflow-wrap: anywhere; }
.demo-head p { margin: 0.9rem 0 0; max-width: 44rem; color: var(--muted); }
.demo-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 22rem); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; padding-bottom: 4rem; }
.read { margin: 0; padding: 0; list-style: none; }
.read li { padding: 0.35rem 0; border-bottom: 1px solid var(--rule); }
.side h2 { font-size: 1.5rem; margin-bottom: 0.75rem; }
.side p { color: var(--muted); margin: 0 0 1rem; }
[hidden] { display: none !important; }

@media (max-width: 56rem) {
  .hero, .demo-grid { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .pad { box-shadow: 5px 5px 0 var(--ink); min-height: 26rem; }
  .top p { display: none; }
}
@media (prefers-reduced-motion: reduce) { .msg.wait::after { animation: none; } }

#read-title { margin-top: 2rem; }
