/* Epirts' pages: its own look, nobody else's. Every page carries the badge that says no money
   moves. No file from anywhere else: the Content-Security-Policy allows none. */
:root {
	--paper: #f3efe6;
	--sheet: #fffdf8;
	--ink: #1d1b18;
	--soft: #5c574e;
	--line: #d8d1c2;
	--go: #0b6b4c;
	--go-ink: #ffffff;
	--warn: #ffd45c;
	--alert: #a3261c;
	--alert-paper: #fdecea;
	--steel: #c5ccd3;
	--steel-dark: #27323d;
	--focus: #1b4fd8;
}
* { box-sizing: border-box; }
/* `hidden` means hidden, whatever a rule below says of the element's display. */
[hidden] { display: none !important; }
html { font: 100%/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--paper); }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 .5rem; overflow-wrap: anywhere; }
h2 { font-size: 1.1rem; margin: 0 0 .25rem; }
p { margin: 0 0 .75rem; }

.top { background: var(--ink); color: var(--paper); display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .6rem 1rem; }
.wordmark { font-weight: 800; letter-spacing: .12em; text-transform: lowercase; }
.badge { margin: 0; background: var(--warn); color: var(--ink); font-weight: 700; padding: .2rem .7rem; border-radius: 999px; }

.sheet { flex: 1; width: 100%; max-width: 62rem; margin: 0 auto; padding: 1.25rem 1rem 2rem; display: grid; gap: 1.25rem; align-content: start; }
.sheet--narrow { max-width: 34rem; }
.summary, .payment { background: var(--sheet); border: 1px solid var(--line); border-radius: 12px; padding: 1.25rem; }
.payment { position: relative; }
.merchant { color: var(--soft); font-weight: 600; margin-bottom: .25rem; }
.price { font-size: 1.15rem; }
.price strong { font-size: 2rem; }
.price span { color: var(--soft); }
.note { color: var(--soft); }
.note--product { color: var(--ink); border-left: 3px solid var(--line); padding-left: .75rem; }
.hint { color: var(--soft); font-size: .9rem; margin: .25rem 0 0; grid-column: 1 / -1; }

.alert { background: var(--alert-paper); color: var(--alert); border: 1px solid var(--alert); border-radius: 8px; padding: .75rem; font-weight: 600; }
.robot { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: .75rem; font-weight: 600; }

fieldset { border: 0; margin: 0 0 1rem; padding: 0; min-width: 0; }
legend { font-weight: 700; padding: 0; margin-bottom: .5rem; }
.card { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.field { display: grid; gap: .25rem; font-size: .9rem; color: var(--soft); }
.field--wide { grid-column: 1 / -1; }
input[type="text"] { font: inherit; font-size: 1.1rem; font-variant-numeric: tabular-nums; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: .65rem .75rem; width: 100%; min-height: 48px; }
input.is-typing { border-color: var(--go); box-shadow: 0 0 0 2px var(--go); }

button, a.pay, a.quiet { font: inherit; cursor: pointer; border-radius: 8px; min-height: 48px; padding: .65rem 1rem; text-align: center; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.pay { width: 100%; background: var(--go); color: var(--go-ink); border: 2px solid var(--go); font-weight: 700; font-size: 1.1rem; }
.pay.is-pressed { transform: translateY(2px); filter: brightness(.85); }
.quiet { background: var(--sheet); color: var(--ink); border: 2px solid var(--ink); font-weight: 600; }
.stop { width: 100%; margin-bottom: 1rem; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
#outcomes:focus { outline: none; }

.outcomes { margin: 1.5rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line); display: grid; gap: .5rem; }
.outcomes .hint { margin-bottom: .5rem; }
.choices, .actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0 0; }
.subscription { border-top: 1px solid var(--line); padding: 1rem 0; }
.subscription p { margin: 0 0 .25rem; }

/* While the robot hand works, the other outcomes wait out of sight: the first click or key
   brings them. Without the script there is no robot and they are simply there. */
.robot-running .outcomes { display: none; }
.hand { display: none; position: absolute; left: 0; top: 0; z-index: 5; pointer-events: none; filter: drop-shadow(0 4px 6px rgb(0 0 0 / .3)); transition: transform .42s cubic-bezier(.3, .7, .3, 1), opacity .3s; }
.robot-running .hand, .robot-stopped .hand { display: block; }
.hand__steel { fill: var(--steel); stroke: var(--steel-dark); stroke-width: 2; }
.hand__joint { fill: var(--steel-dark); }
.hand__bolt { fill: var(--steel-dark); }
.hand__line { stroke: var(--steel-dark); stroke-width: 2; }
.hand__light { fill: #2fd08a; stroke: var(--steel-dark); stroke-width: 2; }
.hand.is-tapping .hand__arm { animation: tap .09s ease-in-out; }
.robot-stopped .hand { opacity: .7; filter: grayscale(1); transform-origin: 0 0; }
.robot-stopped .robot { padding-right: 4rem; min-height: 5.75rem; }
.robot-stopped .hand__light { fill: #d43a2f; }
@keyframes tap { 50% { transform: translateY(-5px); } }

footer { padding: 1rem; }
.foot { max-width: 60rem; margin: 0 auto; color: var(--soft); font-size: .9rem; }

@media (min-width: 60rem) {
	.sheet:not(.sheet--narrow) { grid-template-columns: 1fr 1fr; gap: 2rem; padding-top: 3rem; }
	.summary, .payment { padding: 2rem; }
	h1 { font-size: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
	.hand { transition: none; }
	.hand.is-tapping .hand__arm { animation: none; }
	.pay.is-pressed { transform: none; }
}
