:root {
  --paper: #ebe8df;
  --ink: #11110f;
  --muted: #716e66;
  --line: rgba(17, 17, 15, .17);
  --acid: #d8ff38;
  --danger: #ff4c35;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Sans", "Yu Gothic", sans-serif;
  color: var(--ink);
  background: #cbc8bf;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { display: grid; place-items: center; background: #cbc8bf; }
button, textarea, select, input { font: inherit; }
button { color: inherit; }

.app-shell {
  position: relative;
  width: min(100%, 430px);
  min-height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 5%, rgba(255,255,255,.6), transparent 25%),
    var(--paper);
  padding: max(18px, env(safe-area-inset-top)) 22px max(24px, env(safe-area-inset-bottom));
}

.app-shell::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.23'/%3E%3C/svg%3E");
}

.topbar { height: 52px; display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 3; }
.wordmark { border: 0; background: none; padding: 0; font-weight: 900; letter-spacing: -.06em; font-size: 19px; }
.icon-button { width: 40px; height: 40px; border: 1px solid var(--ink); border-radius: 50%; background: transparent; display: grid; place-content: center; gap: 5px; }
.icon-button span { display: block; width: 16px; height: 1px; background: var(--ink); }
.icon-button span:last-child { width: 10px; justify-self: end; }

.screen { min-height: calc(100dvh - 94px); display: none; position: relative; z-index: 1; padding-top: 28px; animation: enter .45s cubic-bezier(.2,.8,.2,1); }
.screen.active { display: flex; flex-direction: column; }
@keyframes enter { from { opacity: 0; transform: translateY(12px); } }

.eyebrow, .step-index, .kicker { text-transform: uppercase; font-size: 12px; letter-spacing: .14em; font-weight: 800; }
.live-dot { display: inline-block; width: 8px; height: 8px; background: var(--danger); border-radius: 50%; margin-right: 8px; box-shadow: 0 0 0 5px rgba(255,76,53,.12); }
.hero-copy { margin: 46px 0 21px; }
.display { font-size: clamp(42px, 12vw, 56px); line-height: .99; letter-spacing: -.075em; margin: 0; font-weight: 900; }
.display-indent { padding-left: 24px; }
.lede { width: 82%; color: var(--muted); line-height: 1.75; font-weight: 600; }

.meter-card { margin-top: auto; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 18px 0 15px; }
.meter-meta { display: flex; justify-content: space-between; font-size: 13px; }
.meter-meta strong { font-size: 16px; }
.meter-track { height: 11px; background: rgba(17,17,15,.1); margin: 16px 0 8px; overflow: hidden; }
.meter-track span { display: block; height: 100%; width: 70%; background: var(--ink); transition: width .5s ease; }
.meter-caption, .range-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }
.home-actions { margin-top: 24px; }

.primary-button { border: 1px solid var(--ink); background: var(--ink); color: var(--paper); min-height: 60px; width: 100%; border-radius: 999px; font-weight: 800; letter-spacing: .01em; padding: 0 24px; box-shadow: 0 5px 0 rgba(17,17,15,.15); transition: transform .15s, box-shadow .15s; }
.primary-button:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(17,17,15,.15); }
.primary-button:disabled { opacity: .28; box-shadow: none; }
.primary-button.bottom { margin-top: auto; }
.text-button { width: 100%; border: 0; background: none; padding: 19px; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }

.question { margin: 45px 0 18px; font-size: 58px; line-height: .98; letter-spacing: -.075em; }
.question.compact { font-size: 42px; margin-top: 32px; }
.prompt { color: var(--muted); font-weight: 600; margin: 0 0 32px; }
.input-wrap { position: relative; display: block; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 12px 0; }
.input-wrap > span { font-size: 11px; font-weight: 800; letter-spacing: .1em; }
textarea { width: 100%; border: 0; resize: none; background: transparent; outline: none; font-size: 21px; line-height: 1.55; padding: 14px 0 5px; color: var(--ink); }
textarea::placeholder { color: #9d9990; }
.input-wrap small { display: block; text-align: right; color: var(--muted); }
.suggestions { display: flex; gap: 7px; margin-top: 12px; flex-wrap: wrap; }
.suggestions button { border: 1px solid var(--line); border-radius: 99px; padding: 9px 12px; background: rgba(255,255,255,.26); font-size: 12px; }

.quote-card { background: var(--ink); color: var(--paper); padding: 24px; margin-top: 26px; transform: rotate(-1.5deg); box-shadow: 8px 9px 0 var(--acid); }
.quote-card span { font-size: 10px; letter-spacing: .12em; color: #a9a69f; }
.quote-card blockquote { margin: 18px 0 4px; font-size: 23px; font-weight: 800; line-height: 1.5; }
.choice-stack { margin-top: auto; display: grid; gap: 9px; }
.choice { background: transparent; border: 1px solid var(--ink); min-height: 68px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; text-align: left; border-radius: 2px; }
.choice span { font-size: 17px; font-weight: 800; }
.choice small { color: var(--muted); }

.sentence-card { border: 1px solid var(--ink); padding: 21px; margin-top: 8px; }
.sentence-row { display: flex; align-items: baseline; justify-content: space-between; }
.sentence-row strong { font-size: 29px; }
input[type="range"] { width: 100%; appearance: none; height: 4px; background: var(--ink); margin: 26px 0 12px; }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 28px; height: 28px; background: var(--acid); border: 2px solid var(--ink); border-radius: 50%; }
.cost-preview { margin-top: 25px; background: var(--ink); color: var(--paper); padding: 17px; display: grid; }
.cost-preview span, .cost-preview small { font-size: 10px; color: #a9a69f; }
.cost-preview strong { font-size: 26px; margin: 4px 0; }
.oath { display: flex; gap: 12px; margin: 18px 2px; font-size: 12px; line-height: 1.55; color: var(--muted); }
.oath input { width: 20px; height: 20px; accent-color: var(--ink); flex: 0 0 auto; }

.receipt { background: #f4f0e5; border: 1px solid var(--ink); padding: 22px 20px 28px; margin: 4px 0 20px; box-shadow: 9px 9px 0 var(--ink); }
.receipt-head { display: flex; justify-content: space-between; font-weight: 900; }
.receipt-label { margin: 25px 0 3px; font-size: 11px; letter-spacing: .08em; }
.receipt-number { font-size: 34px; letter-spacing: -.05em; font-weight: 900; }
.receipt-divider { border-top: 1px dashed var(--ink); margin: 18px 0; }
.receipt dl { margin: 0; display: grid; gap: 10px; }
.receipt dl div { display: grid; grid-template-columns: 105px 1fr; gap: 10px; font-size: 12px; }
.receipt dt { color: var(--muted); }
.receipt dd { margin: 0; font-weight: 800; text-align: right; }
.receipt-message { font-weight: 800; line-height: 1.65; font-size: 15px; }
.barcode { height: 34px; margin: 22px 0 10px; background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 5px, transparent 5px 9px); }
.thanks { display: block; text-align: center; }

.saved-mark { width: 66px; height: 66px; border: 2px solid var(--ink); border-radius: 50%; display: grid; place-items: center; font-size: 30px; margin: 42px 0 26px; }
.saved-stat { margin-top: 50px; border-top: 1px solid var(--ink); padding-top: 18px; display: flex; align-items: baseline; gap: 8px; }
.saved-stat strong { font-size: 80px; letter-spacing: -.08em; }
.saved-stat span { font-weight: 800; }
.settings-list { margin-top: 36px; border-top: 1px solid var(--ink); }
.settings-list label { min-height: 78px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.settings-list label span { display: grid; gap: 5px; }
.settings-list small { color: var(--muted); }
.settings-list select { border: 0; background: transparent; text-align: right; font-weight: 700; }
.settings-list input[type="checkbox"] { width: 43px; height: 25px; accent-color: var(--ink); }
.automation-note { border: 1px solid var(--ink); padding: 18px; margin-top: 28px; }
.automation-note span { font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.automation-note p { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }

@media (min-width: 600px) {
  body { padding: 32px; }
  .app-shell { min-height: min(880px, calc(100dvh - 64px)); height: min(880px, calc(100dvh - 64px)); border-radius: 42px; box-shadow: 0 30px 80px rgba(0,0,0,.22); }
  .screen { min-height: calc(100% - 52px); }
}
