/* Excuse Bureau — a chunky teal vending machine on lemon yellow that prints a thermal receipt. */
:root {
  --lemon: #ffd93d;
  --lemon-deep: #f2c117;
  --teal: #0f7c78;
  --teal-dark: #09524f;
  --teal-light: #1aa39c;
  --pink: #ff5c93;
  --pink-dark: #c9306a;
  --ink: #1c1b1f;
  --ink-soft: #4b4637;
  --screen: #10201f;
  --led: #ffc93c;
  --paper: #ffffff;
  --receipt-ink: #262626;
  --round: 'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Ubuntu Mono', ui-monospace, 'Courier New', monospace;

  --pay-paper: #ffffff;
  --pay-ink: #1c1b1f;
  --pay-muted: #5c574a;
  --pay-line: rgba(28, 27, 31, 0.14);
  --pay-accent: #0f7c78;
  --pay-accent-ink: #ffffff;
  --pay-font: var(--round);
  --pay-display: var(--round);
  --pay-radius: 20px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--lemon);
  background-image: radial-gradient(rgba(28, 27, 31, 0.08) 1.4px, transparent 1.6px);
  background-size: 22px 22px;
  color: var(--ink);
  font-family: var(--round);
  font-size: 17px;
  line-height: 1.5;
}
:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
}

/* ── top ── */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(1120px, 100% - 32px);
  margin: 0 auto;
  padding: 18px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 20px;
}
.brand > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.brand-mark {
  flex: none;
  width: 34px;
  height: 34px;
}
.brand-mark rect:first-child {
  fill: var(--teal);
}
.brand-mark .slot {
  fill: var(--ink);
}
.brand-mark .paper {
  fill: #fff;
  stroke: var(--ink);
  stroke-width: 1.2;
}
.top-tools {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.top-tools select {
  appearance: none;
  min-height: 40px;
  padding: 6px 30px 6px 14px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231c1b1f' stroke-width='2'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  color: var(--ink);
  font: 600 15px/1 var(--round);
  cursor: pointer;
}
.sound {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.sound svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sound svg path:first-child {
  fill: currentColor;
}
.sound .mute {
  display: none;
}
.sound[aria-pressed='false'] .wave {
  display: none;
}
.sound[aria-pressed='false'] .mute {
  display: block;
}

/* ── layout ── */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 500px);
  gap: 48px;
  align-items: start;
  width: min(1120px, 100% - 32px);
  margin: 0 auto;
  padding-top: 12px;
}
.intro {
  position: sticky;
  top: 24px;
  padding-top: 30px;
}
h1 {
  margin: 0 0 16px;
  font-weight: 800;
  font-size: clamp(40px, 5.4vw, 68px);
  line-height: 1;
  letter-spacing: -0.03em;
}
.lead {
  margin: 0;
  max-width: 28em;
  color: var(--ink-soft);
  font-size: 19px;
}

/* ── the machine ── */
.machine-col {
  position: relative;
}
.machine {
  position: relative;
  z-index: 2;
  padding: 20px 20px 0;
  border-radius: 34px 34px 22px 22px;
  background: linear-gradient(180deg, var(--teal-light), var(--teal) 30%);
  box-shadow:
    inset 0 -10px 0 var(--teal-dark),
    inset 0 3px 0 rgba(255, 255, 255, 0.25),
    0 0 0 3px var(--ink),
    0 18px 0 -4px rgba(28, 27, 31, 0.18);
}
.marquee {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 18px;
  background: var(--pink);
  box-shadow: inset 0 -5px 0 var(--pink-dark), 0 0 0 3px var(--ink);
  color: #fff;
  text-align: center;
  font-weight: 800;
  font-size: 24px;
  line-height: 1.1;
  text-shadow: 0 2px 0 var(--pink-dark);
}
.screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: 12px;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 2px, transparent 2px 4px),
    var(--screen);
  box-shadow: inset 0 0 0 3px var(--ink), inset 0 6px 14px rgba(0, 0, 0, 0.5);
  color: var(--led);
  font: 700 20px/1.2 var(--mono);
  letter-spacing: 0.12em;
  text-align: center;
  text-shadow: 0 0 8px rgba(255, 201, 60, 0.75);
}
.screen.blink span {
  animation: blink 0.5s steps(2) infinite;
}
@keyframes blink {
  50% {
    opacity: 0.3;
  }
}
.panel fieldset {
  margin: 0 0 14px;
  padding: 0;
  border: 0;
}
.panel legend,
.to-label {
  display: block;
  margin: 0 0 8px;
  padding: 0;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}
.keys {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.key {
  min-height: 52px;
  padding: 8px 12px;
  border: 0;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  box-shadow: inset 0 -5px 0 #c9d6d5, 0 0 0 2.5px var(--ink);
  font: 600 15px/1.2 var(--round);
  text-align: left;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.key:hover {
  background: #f4fbfa;
}
.key[aria-pressed='true'] {
  background: var(--lemon);
  box-shadow: inset 0 -2px 0 var(--lemon-deep), 0 0 0 2.5px var(--ink);
  transform: translateY(3px);
}
.switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 4px;
  border-radius: 16px;
  background: var(--teal-dark);
  box-shadow: 0 0 0 2.5px var(--ink);
}
.switch button {
  min-height: 44px;
  padding: 6px 8px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #d9f1ef;
  font: 700 15px/1.1 var(--round);
  cursor: pointer;
}
.switch button[aria-pressed='true'] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 0 0 2px var(--ink);
}
.panel input {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 10px 14px;
  border: 0;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 0 0 2.5px var(--ink);
  font: 400 18px/1.3 var(--mono);
}
.panel input:focus {
  outline: none;
  box-shadow: 0 0 0 2.5px var(--ink), 0 0 0 6px var(--lemon);
}
.guard {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 0 0 2px var(--ink);
}
.guard p {
  margin: 0;
}
.guard a {
  color: var(--teal-dark);
  font-weight: 700;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px 12px;
  width: 100%;
  min-height: 64px;
  margin: 16px 0 0;
  padding: 12px 20px;
  border: 0;
  border-radius: 18px;
  background: var(--pink);
  color: #fff;
  box-shadow: inset 0 -6px 0 var(--pink-dark), 0 0 0 3px var(--ink);
  font: 800 20px/1.15 var(--round);
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.cta:active {
  transform: translateY(4px);
  box-shadow: inset 0 -2px 0 var(--pink-dark), 0 0 0 3px var(--ink);
}
.cta[disabled] {
  filter: saturate(0.5);
  cursor: progress;
}
.cta-price {
  font: 700 15px/1.2 var(--mono);
  opacity: 0.9;
}
.slot {
  display: grid;
  place-items: center;
  height: 44px;
  margin: 18px -20px 0;
  border-radius: 0 0 22px 22px;
  background: var(--teal-dark);
}
.slot span {
  display: block;
  width: 72%;
  height: 12px;
  border-radius: 6px;
  background: var(--ink);
  box-shadow: inset 0 3px 4px rgba(0, 0, 0, 0.6);
}

/* ── receipt ── */
.tray {
  position: relative;
  z-index: 1;
  margin: -30px auto 0;
  width: 78%;
  overflow: hidden;
  padding: 0 6px 18px;
}
.receipt {
  position: relative;
  padding: 50px 22px 30px;
  background: var(--paper);
  color: var(--receipt-ink);
  font: 400 16px/1.45 var(--mono);
  box-shadow: 0 10px 18px rgba(28, 27, 31, 0.18);
  -webkit-mask: radial-gradient(circle 7px at 50% 100%, transparent 6.5px, #000 7px) 50% 100% / 18px 14px repeat-x, linear-gradient(#000, #000) 0 0 / 100% calc(100% - 13px) no-repeat;
  mask: radial-gradient(circle 7px at 50% 100%, transparent 6.5px, #000 7px) 50% 100% / 18px 14px repeat-x, linear-gradient(#000, #000) 0 0 / 100% calc(100% - 13px) no-repeat;
}
.r-brand {
  margin: 0;
  text-align: center;
  font-weight: 700;
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.r-center {
  margin: 0;
  text-align: center;
  font-size: 14px;
}
.r-sep {
  margin: 12px 0;
  border-top: 2px dashed #9a9a9a;
}
.r-meta {
  margin: 0;
  display: grid;
  gap: 2px;
  font-size: 15px;
}
.r-meta > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.r-meta dt {
  color: #6b6b6b;
}
.r-meta dd {
  margin: 0;
  text-align: right;
  font-weight: 700;
}
.r-text {
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
}
.r-small {
  margin: 0;
  font-size: 13px;
  color: #5a5a5a;
  text-align: center;
}
.r-barcode {
  height: 46px;
  margin: 14px 8px 0;
}
.r-barcode svg {
  display: block;
  width: 100%;
  height: 100%;
}

.after {
  margin-top: 8px;
}
.shared-banner {
  margin: 0 0 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 0 0 2.5px var(--ink);
}
.shared-banner p {
  margin: 0 0 10px;
  font-weight: 600;
}
.shared-invalid {
  margin-top: 20px;
  font-weight: 700;
  text-align: center;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 18px;
  border: 0;
  border-radius: 14px;
  font: 700 15px/1.1 var(--round);
  text-decoration: none;
  cursor: pointer;
}
.btn-ink {
  background: var(--ink);
  color: #fff;
}
.btn-pink {
  background: var(--pink);
  color: #fff;
  box-shadow: 0 0 0 2px var(--ink);
}
.btn-line {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 0 0 2px var(--ink);
}

/* ── footer ── */
.foot {
  width: min(1120px, 100% - 32px);
  margin: 72px auto 0;
  padding: 20px 0 40px;
  border-top: 2px solid var(--ink);
  font-size: 14px;
}
.foot p {
  margin: 0 0 8px;
}
.more {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}
.more a {
  color: var(--ink);
  font-weight: 700;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .intro {
    position: static;
    padding-top: 6px;
  }
  h1 {
    font-size: 40px;
  }
  .lead {
    font-size: 17px;
  }
}
@media (max-width: 480px) {
  .machine {
    padding: 16px 14px 0;
    border-radius: 28px 28px 20px 20px;
  }
  .slot {
    margin: 16px -14px 0;
  }
  .marquee {
    font-size: 20px;
  }
  .screen {
    font-size: 16px;
  }
  .key {
    font-size: 14px;
  }
  .tray {
    width: 88%;
  }
  .actions .btn {
    flex: 1 1 40%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .screen.blink span {
    animation: none;
  }
  .key,
  .cta {
    transition: none;
  }
}
