:root {
  --paper: #f3ead2;
  --card: #fbf8ef;
  --ink: #141414;
  --soft: #3a352b;
  --muted: #6b6250;
  --rule: #b9ad8f;
  --blue: #2f45e0;
  --navy: #0d1440;
  --red: #b0241c;
  --green: #136a2b;
  --marker: #f5c518;
  --wob: 14px 5px 12px 4px / 4px 12px 5px 14px;
  --heavy: "Arial Black", "Arial Bold", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.45 "Helvetica Neue", Arial, sans-serif; overflow-x: hidden; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
a:hover, a:focus-visible { background: var(--marker); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px dashed var(--blue); outline-offset: 3px; }
h1, h2 { font-family: var(--heavy); font-weight: 900; letter-spacing: -0.02em; margin: 0; }
code { font-family: var(--mono); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header: CA + X live here so they're above the fold everywhere */
.top { max-width: 1180px; margin: 0 auto; padding: 14px 16px 6px; display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--heavy); font-size: 24px; letter-spacing: -0.02em; padding: 2px 4px; }
.logo:hover { background: none; }
.token { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ca, .btn-x, .btn-buy { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; border: 3px solid var(--ink); border-radius: var(--wob); padding: 6px 12px; font-weight: 700; white-space: nowrap; }
.ca { background: var(--card); cursor: pointer; font-family: var(--mono); font-size: 14px; }
.ca:hover { background: var(--marker); }
.ca-k { background: var(--ink); color: var(--card); padding: 1px 6px; border-radius: 3px; font-family: var(--heavy); font-size: 12px; }
.ca-short { display: none; }
.ca-copy { color: var(--blue); font-family: var(--heavy); font-size: 12px; min-width: 52px; text-align: right; }
.ca-off { cursor: default; }
.ca-off:hover { background: var(--card); }
.ca-wait { color: var(--soft); font-family: "Helvetica Neue", Arial, sans-serif; font-weight: 700; }
.btn-x { background: var(--ink); color: var(--card); }
.btn-x:hover { background: var(--blue); }
.btn-off { opacity: .5; }
.btn-off:hover { background: var(--ink); }
.btn-buy { background: var(--blue); color: #fff; font-family: var(--heavy); }
.btn-buy:hover { background: var(--ink); }

/* hero */
.hero { max-width: 1180px; margin: 0 auto; padding: 12px 16px 12px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 48px; align-items: center; }
.ask { min-width: 0; }
h1 { font-size: clamp(42px, 7vw, 96px); line-height: .92; text-transform: lowercase; }
.sub { font-size: 18px; color: var(--soft); max-width: 36ch; margin: 12px 0 0; }
.modes { display: inline-flex; border: 3px solid var(--ink); border-radius: var(--wob); overflow: hidden; margin: 20px 0 10px; }
.modes button { border: 0; background: transparent; padding: 9px 14px; font-weight: 700; cursor: pointer; min-height: 40px; }
.modes button + button { border-left: 3px solid var(--ink); }
.modes button[aria-selected="true"] { background: var(--ink); color: var(--card); }
.ask-form { display: flex; border: 3px solid var(--ink); border-radius: var(--wob); background: var(--card); overflow: hidden; }
.ask-form input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 14px; font: 18px/1.2 "Helvetica Neue", Arial, sans-serif; color: var(--ink); }
.ask-form input:focus { outline: none; }
.ask-form:focus-within { outline: 3px dashed var(--blue); outline-offset: 3px; }
.shake-btn { border: 0; background: var(--ink); color: var(--card); font-family: var(--heavy); font-size: 18px; padding: 0 24px; cursor: pointer; }
.shake-btn:hover { background: var(--blue); }
.shake-btn:disabled { opacity: .7; cursor: progress; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 6px; min-height: 84px; align-content: flex-start; }
.chips button { border: 2px solid var(--ink); background: transparent; border-radius: 999px; padding: 6px 12px; font-size: 14px; cursor: pointer; }
.chips button:hover { background: var(--marker); }
.chips-note { margin: 4px 0 0; color: var(--soft); font-size: 15px; max-width: 44ch; }
.lately { display: flex; align-items: baseline; gap: 8px; margin: 2px 0 4px; min-height: 24px; font-size: 14px; color: var(--soft); white-space: nowrap; overflow: hidden; transition: opacity .25s ease; }
.lately.swap { opacity: 0; }
.lately-k { font-family: var(--heavy); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--card); background: var(--ink); padding: 1px 6px; border-radius: 3px; flex: none; }
.lately-q { overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.lately-a { font-family: var(--heavy); text-transform: uppercase; flex: 0 1 auto; max-width: 46%; overflow: hidden; text-overflow: ellipsis; }
.lately-t { font: 12px var(--mono); color: var(--muted); flex: none; }
.result { min-height: 214px; }
.result-idle { color: var(--muted); margin: 8px 0 0; }
.result-q { margin: 6px 0 4px; color: var(--soft); font-size: 17px; overflow-wrap: anywhere; }
.result-a { font-family: var(--heavy); font-size: clamp(28px, 3.6vw, 46px); line-height: 1; margin: 0 0 12px; text-transform: uppercase; overflow-wrap: anywhere; }
.result-err { margin: 0; color: var(--soft); }
.result-more { margin: -2px 0 12px; font-size: 16px; min-height: 24px; }
.more-k { font-family: var(--heavy); font-size: 12px; color: var(--muted); text-transform: uppercase; margin-right: 6px; }
.mood-yes, .res-YES { color: var(--green); }
.mood-no, .res-NO { color: var(--red); }
.mood-hazy, .mood-maybe, .res-MAYBE { color: var(--blue); }
.mood-pick { color: var(--ink); }
.result-line { margin: -4px 0 12px; font-size: 19px; line-height: 1.35; max-width: 34ch; overflow-wrap: anywhere; }
.result-line.spoke { background: linear-gradient(transparent 62%, var(--marker) 62%); }
.receipts { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 4px; font: 14px/1.4 var(--mono); }
.rc { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; }
.rc-m { font-weight: 900; font-family: var(--heavy); }
.rc-ok .rc-m { color: var(--green); }
.rc-bad { color: var(--red); }
.rc-t { overflow-wrap: anywhere; }
.rc-src { color: var(--blue); font-weight: 700; padding: 0 6px; min-width: 24px; text-align: center; }
.nfa { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.chips { transition: opacity .2s ease; }
.chips.swap { opacity: 0; }
.lately-coins { gap: 10px; }
.lc { flex: none; font: 700 13px/1.6 var(--mono); border: 2px solid var(--ink); border-radius: 999px; padding: 0 8px; background: var(--card); }
.lc b { font-family: var(--heavy); }
.feed-l { font-family: "Helvetica Neue", Arial, sans-serif; font-weight: 400; text-transform: none; color: var(--soft); }
.qotd { max-width: 1148px; margin: 4px auto 22px; padding: 10px 14px; border: 3px dashed var(--ink); border-radius: var(--wob); display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; background: var(--card); }
@media (max-width: 1180px) { .qotd { margin: 4px 16px 22px; } }
.qotd-k { font-family: var(--heavy); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--card); background: var(--ink); padding: 1px 6px; border-radius: 3px; }
.qotd-q { font-weight: 700; }
.qotd-a { font-family: var(--heavy); font-size: 20px; }
.qotd-l { color: var(--soft); }
.qotd-x { margin-left: auto; font-weight: 700; border: 2px solid var(--ink); border-radius: var(--wob); padding: 2px 10px; min-height: 32px; display: inline-flex; align-items: center; }
.reasons { list-style: none; padding: 0; margin: 0 0 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 2px 18px; font: 14px/1.5 var(--mono); }
.tone-good span { color: var(--green); font-weight: 700; }
.tone-bad { color: var(--red); }
.tone-meh span { color: var(--muted); }
.share { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-post, .btn-ghost { min-height: 44px; display: inline-flex; align-items: center; border: 3px solid var(--ink); border-radius: var(--wob); padding: 8px 14px; font-weight: 700; cursor: pointer; }
.btn-post { background: var(--ink); color: var(--card); }
.btn-post:hover { background: var(--blue); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--marker); }

/* the ball */
.ball-wrap { display: grid; place-items: center; min-width: 0; }
.ball { --ball: min(460px, 40vw); position: relative; width: var(--ball); aspect-ratio: 1; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%; -webkit-tap-highlight-color: transparent; }
.ball svg { display: block; width: 100%; height: 100%; }
.ball-body { fill: var(--ink); }
.ball-shine { fill: var(--card); }
.die { fill: var(--blue); }
.face { transition: opacity .22s ease; }
.face-win { opacity: 0; }
.ball.revealed .face-8 { opacity: 0; }
.ball.revealed .face-win { opacity: 1; }
.window-text { position: absolute; left: 50%; top: 41.5%; width: calc(var(--ball) * .31); transform: translateX(-49%); color: #fff; font-family: var(--heavy); text-transform: uppercase; text-align: center; line-height: 1.02; font-size: calc(var(--ball) * .05); opacity: 0; transition: opacity .3s ease .12s; pointer-events: none; overflow-wrap: anywhere; }
.ball.revealed .window-text { opacity: 1; animation: pop .22s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes pop { from { transform: translateX(-49%) scale(.6); } to { transform: translateX(-49%) scale(1); } }
.ball.w-xl .window-text { font-size: calc(var(--ball) * .075); top: 43%; }
.ball.w-l .window-text { font-size: calc(var(--ball) * .05); }
.ball.w-m .window-text { font-size: calc(var(--ball) * .04); }
.ball.w-s .window-text { font-size: calc(var(--ball) * .031); }
.ball.shaking { animation: shake .7s cubic-bezier(.36, .07, .19, .97) both; }
@keyframes shake {
  0% { transform: translate(0, 0) rotate(0); }
  10% { transform: translate(-14px, 6px) rotate(-9deg); }
  25% { transform: translate(16px, -8px) rotate(8deg); }
  40% { transform: translate(-12px, -4px) rotate(-6deg); }
  55% { transform: translate(10px, 8px) rotate(5deg); }
  70% { transform: translate(-6px, -2px) rotate(-3deg); }
  85% { transform: translate(3px, 2px) rotate(1deg); }
  100% { transform: translate(0, 0) rotate(0); }
}
@media (prefers-reduced-motion: reduce) { .ball.shaking, .ball.revealed .window-text { animation: none; } .face, .window-text, .lately, .chips { transition: none; } }

/* coin read */
.coin { max-width: 1148px; margin: 0 auto 28px; padding: 18px; border: 3px solid var(--ink); border-radius: var(--wob); background: var(--card); }
@media (max-width: 1180px) { .coin { margin: 0 16px 28px; } }
.coin-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 12px; }
.coin-head h2 { font-size: 30px; }
.coin-head h2 span { font-family: "Helvetica Neue", Arial, sans-serif; font-size: 16px; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.coin-ca { font-size: 13px; color: var(--soft); overflow-wrap: anywhere; }
.coin-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 20px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-content: start; }
.stat { padding: 8px 6px 8px 0; border-bottom: 2px dotted var(--rule); min-width: 0; }
.stat-k { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.stat-v { display: block; font: 700 16px/1.3 var(--mono); overflow-wrap: anywhere; }
.chart { margin: 0; }
.chart canvas { display: block; width: 100%; height: 220px; border: 2px solid var(--ink); border-radius: 4px; }
.chart figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.chart-empty { display: grid; place-items: center; height: 220px; border: 2px dashed var(--rule); border-radius: 4px; color: var(--soft); margin: 0; padding: 12px; text-align: center; }

/* live strip */
.pulse { max-width: 1180px; margin: 0 auto; padding: 14px 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); }
.pulse div { min-width: 0; }
.pulse-k { display: block; font-size: 13px; color: var(--muted); }
.pulse b { font-family: var(--heavy); font-size: 30px; font-variant-numeric: tabular-nums; }

/* the ball decides */
.decides, .feed-wrap, .faq { max-width: 1180px; margin: 44px auto 0; padding: 0 16px; }
.decides h2, .feed-wrap h2, .faq h2 { font-size: clamp(30px, 4.6vw, 56px); text-transform: lowercase; line-height: 1; }
.decides-head p { font-size: 18px; max-width: 62ch; color: var(--soft); margin: 12px 0 0; }
.decides-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.tile { border: 3px solid var(--ink); border-radius: var(--wob); background: var(--card); padding: 14px 16px; min-height: 108px; min-width: 0; }
.tile-k { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.tile-v { font-family: var(--heavy); font-size: 24px; line-height: 1.15; }
.tile-v.big { font-size: 44px; font-variant-numeric: tabular-nums; }
.last-r { display: block; }
.last-meta { display: block; font: 13px/1.4 var(--mono); color: var(--muted); margin-top: 4px; }
.burned span { color: var(--muted); }
.shakes { list-style: none; padding: 0; margin: 18px 0 0; border-top: 3px solid var(--ink); }
.shake-row { display: grid; grid-template-columns: 1.3fr .5fr 1fr 1fr; gap: 10px; align-items: center; min-height: 44px; padding: 8px 0; border-bottom: 1px dashed var(--rule); font: 14px/1.3 var(--mono); }
.shake-gap { display: block; color: var(--muted); font-family: "Helvetica Neue", Arial, sans-serif; font-size: 14px; }
.last-late { color: var(--red); }
.shake-first { display: block; color: var(--soft); font-family: "Helvetica Neue", Arial, sans-serif; }
.shake-r { font-family: var(--heavy); }
.shake-b { color: var(--blue); }
.shake-burn { color: var(--soft); }
.shake-burn a { color: var(--green); font-weight: 700; }

/* feed */
.feed { list-style: none; padding: 0; margin: 16px 0 0; border-top: 3px solid var(--ink); }
.feed-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: center; min-height: 46px; padding: 8px 0; border-bottom: 1px dashed var(--rule); }
.feed-q { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--soft); }
.feed-a { font-family: var(--heavy); font-size: 14px; text-transform: uppercase; text-align: right; }
.feed-t { font: 12px var(--mono); color: var(--muted); min-width: 62px; text-align: right; }
.feed-first .feed-q { white-space: normal; }

/* faq */
.faq details { border-top: 2px solid var(--ink); }
.faq details:last-of-type { border-bottom: 2px solid var(--ink); }
.faq h2 { margin-bottom: 16px; }
.faq summary { cursor: pointer; list-style: none; font-family: var(--heavy); font-size: 19px; padding: 14px 32px 14px 0; position: relative; text-transform: lowercase; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-size: 26px; }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 0 0 16px; max-width: 70ch; color: var(--soft); }
.faq code { font-size: 14px; background: var(--card); padding: 1px 4px; border-radius: 3px; overflow-wrap: anywhere; }

.foot { max-width: 1180px; margin: 48px auto 0; padding: 18px 16px 36px; border-top: 3px solid var(--ink); display: flex; justify-content: space-between; gap: 12px; font-weight: 700; }
.foot a { color: var(--blue); }

/* tablets + phones: ball between the headline and the input */
@media (max-width: 899px) {
  .hero { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding-top: 4px; }
  .ask { display: contents; }
  h1 { order: 1; font-size: clamp(38px, 11vw, 64px); }
  .sub { order: 2; font-size: 16px; margin-top: 8px; }
  .ball-wrap { order: 3; margin: 10px 0 2px; }
  .modes { order: 4; align-self: flex-start; margin-top: 8px; }
  .ask-form { order: 5; }
  .chips { order: 6; min-height: 0; }
  .lately { order: 7; }
  .result { order: 8; min-height: 250px; }
  .ball { --ball: min(240px, 60vw); }
  .coin-grid { grid-template-columns: minmax(0, 1fr); }
  .decides-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .decides-grid .tile:first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .top { padding-top: 10px; }
  .token { display: contents; }
  .logo { order: 1; }
  .btn-x { order: 2; margin-left: auto; }
  .ca { order: 3; flex: 1 1 auto; justify-content: space-between; }
  .btn-buy { order: 4; }
  .ca-copy { min-width: 0; }
  .ca, .btn-x, .btn-buy { padding: 6px 10px; }
  .tile-v { font-size: 20px; }
  .ca-full { display: none; }
  .ca-short { display: inline; }
  .pulse b { font-size: 22px; }
  .pulse-k { font-size: 12px; }
  .tile-v.big { font-size: 34px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shake-row { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; }
  .shake-b, .shake-burn { font-size: 13px; }
  .shake-burn { text-align: right; }
  .feed-row { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; }
  .feed-a { grid-column: 1; text-align: left; }
  .feed-t { grid-row: 1 / span 2; grid-column: 2; }
  .modes button { padding: 8px 10px; font-size: 14px; }
  .lately-t { display: none; }
  .lately-a { max-width: 42%; }
  .qotd-x { margin-left: 0; }
  .result-line { font-size: 17px; }
  .shake-btn { padding: 0 16px; }
}
@media (max-width: 420px) { .buy-t { display: none; } }
@media (max-width: 360px) {
  .logo { font-size: 20px; }
  .ca, .btn-x, .btn-buy { padding: 6px 9px; }
  .ca-copy { min-width: 0; }
  .ask-form input { font-size: 16px; padding: 12px 10px; }
}
