:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  color: #23251f;
  background: #f6f3ec;
  --paper: #f6f3ec;
  --white: #fffdf7;
  --ink: #23251f;
  --muted: #56594c;
  --line: #d9d4c7;
  --red: #a92f24;
  --teal: #214540;
  --mono: ui-monospace, "Cascadia Mono", "Courier New", monospace;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
[hidden] { display: none !important; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .48; }
a { color: var(--red); text-underline-offset: .18em; }
:focus-visible { outline: 3px solid #196c86; outline-offset: 4px; }
.frame { width: min(1180px, calc(100% - 96px)); margin-inline: auto; }
.skip-link { position: absolute; top: -5rem; left: 1rem; z-index: 5; background: var(--white); padding: .75rem; }
.skip-link:focus { top: 1rem; }
.masthead { border-bottom: 1px solid var(--line); }
.masthead-inner { height: 73px; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.wordmark { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 560; letter-spacing: -.025em; }
.wordmark strong { font-weight: 790; }
.brand-mark { display: grid; gap: 3px; width: 31px; padding: 7px 5px; rotate: -9deg; background: var(--red); }
.brand-mark i { width: 100%; height: 2px; background: #fff6db; }
.brand-mark i:last-child { width: 65%; }
.text-button { border: 0; background: transparent; color: inherit; padding: .45rem 0; font-size: .88rem; font-weight: 750; }
.text-button:hover { color: var(--red); }
.text-button span { padding-inline-start: .25em; }
.hero { display: grid; grid-template-columns: 1.06fr .94fr; gap: clamp(2.5rem, 5vw, 5rem); align-items: center; padding-block: clamp(3rem, 6vw, 5rem) 2.5rem; }
.kicker { display: flex; gap: .65rem; align-items: center; margin: 0 0 1.22rem; color: var(--red); letter-spacing: .1em; font-family: var(--mono); font-size: .77rem; font-weight: 800; text-transform: uppercase; }
.kicker > span { height: 8px; width: 8px; border-radius: 1px; rotate: 45deg; background: currentColor; }
h1, h2, p { margin-top: 0; }
.hero h1 { font-size: clamp(3.5rem, 6.2vw, 6.15rem); line-height: .94; letter-spacing: -.088em; font-weight: 840; margin: 0 0 1.35rem; }
.hero h1 em { font-family: Georgia, serif; font-weight: 400; color: var(--red); letter-spacing: -.088em; }
.hero-intro { max-width: 28rem; color: var(--muted); margin: 0 0 1.65rem; font-size: clamp(.99rem, 1.4vw, 1.14rem); line-height: 1.55; }
.import-box { display: flex; align-items: center; gap: 14px; padding: 15px; border: 1px dashed #a59c88; background: #fbf9f2; border-radius: 9px; transition: background .15s, border-color .15s; }
.import-box.is-dragging { background: #f3e0ce; border-color: var(--red); }
.import-box > div:nth-child(2) { flex: 1; }
.import-box h2 { font-size: .95rem; margin: 0 0 .25rem; }
.import-box p { font-size: .78rem; margin: 0; color: var(--muted); }
.import-icon { display: grid; place-items: center; flex: 0 0 33px; height: 33px; background: #ebe4d5; color: var(--red); border-radius: 50%; font-weight: 800; font-size: 1.2rem; }
.button { border: 1px solid transparent; border-radius: 6px; padding: .67rem 1rem; font-size: .86rem; font-weight: 760; white-space: nowrap; min-height: 42px; }
.button-primary { background: var(--red); color: #fffdf5; }
.button-primary:hover:not(:disabled) { background: #86251e; }
.button-secondary { background: transparent; color: var(--ink); border-color: #bfb8aa; }
.button-secondary:hover:not(:disabled) { background: #ebe6da; }
.landing-actions { display: flex; flex-wrap: wrap; gap: .25rem .85rem; align-items: center; margin-top: .58rem; }
.demo-button { color: var(--red); }
.privacy-label { margin-inline-start: auto; color: var(--muted); font-size: .78rem; display: inline-flex; align-items: center; gap: .36rem; }
.privacy-label span { background: #2e755a; width: 7px; height: 7px; border-radius: 50%; }
.status { margin: .6rem 0 0; color: var(--muted); font-size: .9rem; line-height: 1.4; }
.status:empty { display: none; }
.hero-art { min-height: clamp(350px, 36vw, 486px); position: relative; isolation: isolate; background: #e7a65a; border: 1px solid #b67544; border-radius: 12px; display: grid; place-items: center; overflow: hidden; }
.art-grid { position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(#643d2724 1px, transparent 1px), linear-gradient(90deg, #643d2724 1px, transparent 1px); background-size: 27px 27px; mask-image: linear-gradient(105deg, #000 25%, #0004); }
.till-tape { width: 66%; max-width: 320px; padding: 1.4rem 1.3rem 1.3rem; background: #fffaf0; color: #23251f; font-family: var(--mono); rotate: -9deg; translate: -6% -2%; filter: drop-shadow(7px 13px 0 #5f42293c); clip-path: polygon(0 0, 100% 0, 100% 98%, 97% 100%, 94% 98%, 91% 100%, 88% 98%, 85% 100%, 82% 98%, 79% 100%, 76% 98%, 73% 100%, 70% 98%, 67% 100%, 64% 98%, 61% 100%, 58% 98%, 55% 100%, 52% 98%, 49% 100%, 46% 98%, 43% 100%, 40% 98%, 37% 100%, 34% 98%, 31% 100%, 28% 98%, 25% 100%, 22% 98%, 19% 100%, 16% 98%, 13% 100%, 10% 98%, 7% 100%, 4% 98%, 1% 100%, 0 98%); }
.tape-heading { display: flex; align-items: end; justify-content: space-between; gap: .6rem; border-bottom: 1px dashed #7a7b69; padding-bottom: .8rem; margin-bottom: .5rem; }
.tape-heading b { font-size: clamp(1.03rem, 2.06vw, 1.86rem); line-height: .98; letter-spacing: -.08em; }
.tape-heading > span, .tape-lines, .tape-subtotal, .tape-bottom { font-size: clamp(.49rem, .84vw, .78rem); }
.tape-heading > span { text-align: right; }
.tape-lines, .tape-subtotal { display: flex; justify-content: space-between; gap: .5rem; align-items: center; min-height: 24px; }
.tape-lines b { color: var(--red); font-size: 1rem; }
.tape-subtotal { border-top: 1px dashed #7a7b69; margin-block: .5rem; font-weight: 800; }
.barcode { width: 76%; height: 25px; margin: .75rem auto .45rem; background: repeating-linear-gradient(90deg, #222 0 2px, transparent 2px 4px, #222 4px 5px, transparent 5px 7px, #222 7px 11px, transparent 11px 13px, #222 13px 14px, transparent 14px 16px, #222 16px 19px, transparent 19px 21px); }
.tape-bottom { text-align: center; }
.art-stamp { border: 1px solid #f7e9c7; box-shadow: 0 0 0 4px var(--red); background: var(--red); color: #f8eac6; border-radius: 50%; display: grid; place-content: center; gap: 3px; width: clamp(75px, 9vw, 126px); aspect-ratio: 1; position: absolute; bottom: 10%; right: 9%; rotate: 15deg; font: 800 clamp(.7rem, 1.35vw, 1.12rem)/1 var(--mono); text-align: center; }
.art-stamp span:last-child { font-size: 1.5em; }
.help-panel { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 0 1.65rem; }
.help-panel summary { cursor: pointer; padding: 1rem 0; width: fit-content; font-size: .9rem; font-weight: 750; }
.help-content { max-width: 49rem; color: var(--muted); padding-bottom: .8rem; font-size: .92rem; line-height: 1.6; }
.help-content ol { padding-left: 1.5rem; }
.help-content li { margin-bottom: .64rem; }
.help-content code { color: var(--ink); font: .92em var(--mono); }
.site-footer { margin-top: 2.35rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: .4rem 1.3rem; padding-block: 1rem 1.6rem; font-size: .77rem; color: var(--muted); }

.report-head { padding-top: 2.75rem; display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; }
.report-head .kicker { margin-bottom: .7rem; }
.report-head h1 { font-size: clamp(2.16rem, 5vw, 4.1rem); line-height: 1.02; letter-spacing: -.075em; margin-bottom: .55rem; }
.report-head p:last-child { margin: 0; color: var(--muted); }
.report-controls { display: flex; flex-wrap: wrap; align-items: end; gap: .55rem; }
.report-controls label { display: grid; gap: .27rem; font-size: .8rem; font-weight: 730; }
.report-controls select { min-height: 42px; background: var(--white); border: 1px solid #bfb8aa; border-radius: 6px; color: var(--ink); padding: .38rem .58rem; }
.view-tabs { display: flex; align-items: center; gap: 1.2rem; margin: 1.6rem 0 1rem; border-bottom: 1px solid var(--line); }
.tab { color: var(--muted); background: transparent; border: 0; border-bottom: 3px solid transparent; padding: .65rem .13rem; font-weight: 760; }
.tab[aria-pressed="true"] { border-color: var(--red); color: var(--red); }
.share-link { margin-left: auto; }
.story { color: #fff8e8; min-height: clamp(350px, 44vw, 518px); border-radius: 12px; padding: clamp(1.5rem, 4vw, 3.5rem); display: flex; flex-direction: column; justify-content: center; align-items: start; position: relative; isolation: isolate; overflow: hidden; }
.story::before { content: ""; position: absolute; width: min(76%, 570px); aspect-ratio: 1; right: -9%; bottom: -40%; z-index: -1; border-radius: 50%; border: clamp(30px, 6vw, 92px) double #fff6d544; }
.story[data-tone="red"] { background: #9c2d23; }
.story[data-tone="teal"] { background: #214540; }
.story[data-tone="peach"] { background: #efb477; color: #3d281c; }
.story[data-tone="blue"] { background: #253b65; }
.story[data-tone="plum"] { background: #503248; }
.story-count { font: 700 .8rem var(--mono); letter-spacing: .09em; margin-bottom: 1rem; }
.story h2 { font-size: clamp(1.15rem, 2.15vw, 1.75rem); margin-bottom: .4rem; }
.story-value { font-size: clamp(3.15rem, 11vw, 7.75rem); line-height: .96; font-weight: 850; letter-spacing: -.08em; margin: 0 0 1rem; max-width: 100%; overflow-wrap: anywhere; }
.story-value.text-value { font-size: clamp(2.5rem, 7vw, 6rem); }
.story-note { max-width: 35rem; line-height: 1.5; margin: 0; font-size: clamp(.91rem, 1.4vw, 1.08rem); }
.story-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .6rem; padding-top: .85rem; }
.story-nav > button:first-child { justify-self: start; }
.story-nav > button:last-child { justify-self: end; }
.story-progress { display: flex; gap: .35rem; }
.story-progress button { min-height: 30px; width: clamp(14px, 4.25vw, 48px); background: transparent; border: 0; padding: 0; }
.story-progress button::after { display: block; content: ""; background: #bdb3a2; height: 5px; border-radius: 10px; }
.story-progress button[aria-current="step"]::after { background: var(--red); }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: .85rem; margin-bottom: .85rem; }
.metric, .dashboard-panel { border: 1px solid var(--line); border-radius: 8px; background: var(--white); padding: clamp(1rem, 2vw, 1.45rem); }
.metric p { margin: 0; color: var(--muted); font-size: .83rem; }
.metric strong { display: block; margin-top: .18rem; font-size: clamp(1.4rem, 3.8vw, 2.3rem); letter-spacing: -.06em; overflow-wrap: anywhere; }
.dashboard-panel h2 { margin: 0 0 .25rem; letter-spacing: -.04em; font-size: 1.35rem; }
.muted { color: var(--muted); font-size: .89rem; line-height: 1.5; margin-bottom: .8rem; }
.chart { margin: .75rem 0 0; padding: 0; list-style: none; display: grid; gap: .4rem; }
.chart li { display: grid; grid-template-columns: 2.25rem minmax(3rem, 1fr) minmax(5rem, max-content); align-items: center; gap: .55rem; font-size: .83rem; min-height: 22px; }
.chart li > span:last-child { font-variant-numeric: tabular-nums; text-align: right; }
.bar-track { display: flex; align-items: stretch; background: #ede9df; height: .63rem; border-radius: 8px; position: relative; overflow: hidden; }
.bar-track.diverging::after { content: ""; width: 1px; background: #9a9689; position: absolute; inset: 0 auto 0 50%; }
.bar-fill { background: #2c7163; position: absolute; top: 0; bottom: 0; left: var(--start, 0%); width: var(--size, 0%); }
.bar-fill.negative { background: var(--red); }
.rankings { margin-top: .85rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.rank-list { font-size: .94rem; margin: 0; padding-left: 1.5rem; }
.rank-list li { padding: .5rem 0; border-bottom: 1px solid #e8e3d7; }
.rank-list li:last-child { border: 0; }
.rank-list p { margin: 0; display: flex; justify-content: space-between; gap: .5rem; overflow-wrap: anywhere; }
.rank-list strong { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.report-footnote { margin: 1rem 0 0; color: var(--muted); font-size: .84rem; line-height: 1.5; }
dialog { width: min(460px, calc(100% - 25px)); max-height: calc(100% - 25px); border: 1px solid #a59c88; background: var(--paper); color: var(--ink); border-radius: 12px; padding: 1rem; }
dialog::backdrop { background: #1d261f9c; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: .65rem; }
.dialog-head h2 { margin: 0; }
#paste-form { display: grid; gap: .65rem; margin-top: .6rem; }
#paste-form label { color: var(--muted); font-size: .88rem; }
#paste-form textarea { width: 100%; resize: vertical; font: .8rem var(--mono); padding: .55rem; border: 1px solid #bfb8aa; border-radius: 6px; background: var(--white); color: var(--ink); }
#paste-form .button { justify-self: start; }
dialog .muted { margin: .4rem 0 .65rem; }
dialog canvas { display: block; width: min(100%, 52vh); height: auto; aspect-ratio: 1; margin-inline: auto; border-radius: 4px; }
.share-actions { display: flex; align-items: center; justify-content: space-between; gap: .7rem; margin-top: .8rem; flex-wrap: wrap; font-size: .88rem; }
.share-actions label { display: flex; align-items: center; gap: .4rem; min-height: 36px; }
.share-actions input { accent-color: var(--red); }
@media (max-width: 935px) {
  .frame { width: calc(100% - 56px); }
  .hero { gap: 1.6rem; }
  .hero h1 { font-size: clamp(3rem, 7vw, 4.2rem); }
  .import-box { flex-wrap: wrap; }
  .import-box > button { margin-left: auto; }
}
@media (max-width: 680px) {
  .frame { width: calc(100% - 32px); }
  .masthead-inner { height: 61px; }
  .wordmark { gap: .5rem; font-size: .94rem; }
  .text-button { font-size: .81rem; }
  .hero { grid-template-columns: 1fr; padding: 2rem 0 1.35rem; }
  .hero h1 { font-size: clamp(2.95rem, 10.5vw, 4.8rem); }
  .hero-art { min-height: 290px; }
  .till-tape { width: 62%; padding: 1rem; }
  .tape-heading b { font-size: clamp(1.15rem, 4.25vw, 1.8rem); }
  .tape-heading > span, .tape-lines, .tape-subtotal, .tape-bottom { font-size: .63rem; }
  .art-stamp { bottom: 12%; right: 14%; }
  .report-head { flex-direction: column; align-items: start; padding-top: 1.75rem; }
  .rankings { grid-template-columns: 1fr; }
  .report-head .kicker { font-size: .68rem; }
}
@media (max-width: 370px) {
  .import-box > button { width: 100%; }
  .import-icon { display: none; }
  .landing-actions { align-items: start; flex-direction: column; gap: 0; }
  .privacy-label { margin-inline-start: 0; }
  .story-nav .button { padding-inline: .55rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
