:root {
  --paper: #f4efe4;
  --ink: #161513;
  --muted: #6b655c;
  --line: #ddd4c4;
  --panel: #fffdf8;
  --accent: #d63a24;
  --accent-ink: #fff8f4;
  --ok: #1f6b3a;
  --warn: #8a5a12;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at top right, #ffe7c8 0, transparent 28rem),
    var(--paper);
  color: var(--ink);
  font-family: Outfit, system-ui, sans-serif;
  line-height: 1.5;
}

h1,
h2,
.brand-name,
.eyebrow {
  font-family: Fraunces, Georgia, serif;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.05;
  margin: 0 0 0.6rem;
  font-weight: 700;
}

h2 {
  font-size: 1.25rem;
  margin: 0 0 0.8rem;
}

p {
  margin: 0 0 1rem;
}

a {
  color: inherit;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
  background: #efe7d6;
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.shell {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 3rem;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-weight: 700;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  border-radius: 8px;
  font-family: Fraunces, serif;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.nav a,
.nav button {
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}

.nav a.is-on {
  box-shadow: inset 0 -2px 0 var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.7rem;
  padding: 0 1.1rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.btn-small {
  min-height: 2.1rem;
  padding: 0 0.85rem;
}

.eyebrow {
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.lede,
.muted {
  color: var(--muted);
}

.hero {
  max-width: 42rem;
  padding: 2rem 0 3rem;
}

.hero-actions,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.steps article,
.panel,
.stats article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.steps article {
  padding: 1.2rem;
}

.steps span {
  color: var(--accent);
  font-family: Fraunces, serif;
}

.panel {
  padding: 1.3rem;
  margin-bottom: 1rem;
}

.auth {
  max-width: 28rem;
}

.stack {
  display: grid;
  gap: 0.85rem;
}

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
}

input {
  width: 100%;
  min-height: 2.7rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 0.8rem;
  font: inherit;
  background: #fff;
}

.page-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.4rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.stats article {
  padding: 1rem;
}

.stats strong {
  display: block;
  font-size: 1.8rem;
  font-family: Fraunces, serif;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 0.7rem 0.4rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.pill {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.8rem;
  background: #efe7d6;
}

.pill-active {
  background: #d8f0df;
  color: var(--ok);
}

.pill-blank {
  background: #f3e3c2;
  color: var(--warn);
}

.pill-disabled {
  background: #eadfdf;
}

.split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
}

.qr {
  width: min(220px, 100%);
  border-radius: 12px;
  background: #fff;
}

.copy-line {
  display: grid;
  gap: 0.2rem;
}

.copy-line span {
  color: var(--muted);
  font-size: 0.85rem;
}

.taps {
  list-style: none;
  padding: 0;
  margin: 0;
}

.taps li {
  display: grid;
  gap: 0.15rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.taps span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.flash {
  padding: 0.8rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.flash-success {
  background: #d8f0df;
}

.flash-error {
  background: #f6d6d0;
}

.place-results {
  display: grid;
  gap: 0.4rem;
}

.place-results button {
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  font: inherit;
  cursor: pointer;
}

.place-results small {
  display: block;
  color: var(--muted);
}

.print-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.print-card {
  background: #fff;
  border: 1px solid var(--ink);
  border-radius: 16px;
  padding: 1rem;
  break-inside: avoid;
}

.print-card header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
}

.print-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}

.print-url {
  font-size: 0.72rem;
  overflow-wrap: anywhere;
}

.print-card dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin: 0;
}

.print-card dt {
  color: var(--muted);
  font-size: 0.75rem;
}

.print-card dd {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.foot {
  margin-top: 3rem;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 800px) {
  .steps,
  .stats,
  .split {
    grid-template-columns: 1fr;
  }

  .page-head,
  .top {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media print {
  body {
    background: #fff;
  }

  .top,
  .foot,
  .flash,
  .print-hide {
    display: none !important;
  }

  .shell {
    width: 100%;
    padding: 0;
  }

  .print-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
