:root {
  --ink: #14213d;
  --ink-soft: #46516b;
  --paper: #faf7f1;
  --card: #ffffff;
  --line: #e4ddd0;
  --accent: #c8553d;
  --accent-dark: #a5412d;
  --good: #2f6f4f;
  --warn: #9a6a00;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; margin: 0 0 0.5em; font-weight: 600; }
h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--accent-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 560px; }
[hidden] { display: none !important; }

/* header */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { font-family: var(--serif); font-size: 1.6rem; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.brand span { color: var(--accent); }
.nav { display: flex; gap: 22px; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; font-size: 0.95rem; }
.nav a:hover { text-decoration: underline; }

/* buttons */
.btn {
  display: inline-block; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--accent); color: #fff; font: inherit; font-weight: 600;
  padding: 12px 22px; text-decoration: none; text-align: center;
}
.btn:hover { background: var(--accent-dark); }
.btn[disabled] { opacity: 0.6; cursor: wait; }
.btn.secondary { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn.secondary:hover { background: var(--ink); color: #fff; }
.btn.small { padding: 6px 12px; font-size: 0.88rem; }
.btn.quiet { background: transparent; color: var(--accent-dark); padding: 6px 0; font-weight: 500; text-decoration: underline; }
.nav .btn { color: #fff; }
.nav .btn:hover { text-decoration: none; }

/* hero */
.hero { padding: 84px 0 72px; }
.hero p.lead { font-size: 1.25rem; color: var(--ink-soft); max-width: 640px; }
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem; font-weight: 700; color: var(--accent-dark); margin-bottom: 14px; }

section.band { padding: 64px 0; border-top: 1px solid var(--line); }
section.band.dark { background: var(--ink); color: #f3efe6; border-top: 0; }
section.band.dark h2 { color: #fff; }
section.band.dark .muted { color: #b9c0d0; }
.muted { color: var(--ink-soft); }
.intro { max-width: 640px; margin-bottom: 36px; }

/* steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); counter-reset: step; }
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 22px 20px; counter-increment: step; }
.steps li::before { content: counter(step); display: block; font-family: var(--serif); font-size: 2rem; color: var(--accent); line-height: 1; margin-bottom: 10px; }
.steps li p { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }

.grid-2 { display: grid; gap: 40px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
.rules { list-style: none; padding: 0; margin: 0; }
.rules li { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.14); }
.rules li:last-child { border-bottom: 0; }
.rules.light li { border-bottom-color: var(--line); }
.balance-demo { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.16); border-radius: 12px; padding: 26px; }
.balance-demo .big { font-family: var(--serif); font-size: 3.4rem; line-height: 1; color: #fff; }
.scale { display: flex; gap: 4px; margin-top: 18px; }
.scale span { flex: 1; height: 10px; border-radius: 3px; background: rgba(255,255,255,0.18); }
.scale span.on { background: #e9a48f; }
.scale-labels { display: flex; justify-content: space-between; font-size: 0.8rem; color: #b9c0d0; margin-top: 6px; }

.cta { text-align: center; padding: 72px 0; }
.cta p { max-width: 560px; margin-left: auto; margin-right: auto; }

.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 0.9rem; color: var(--ink-soft); }
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* forms and cards */
.page { padding: 48px 0 72px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 28px; margin-bottom: 22px; }
.card h2 { font-size: 1.35rem; }
label { display: block; font-weight: 600; font-size: 0.92rem; margin: 16px 0 6px; }
input[type=text], input[type=email], input[type=password], select {
  width: 100%; font: inherit; padding: 11px 12px; border: 1.5px solid #cfc7b8; border-radius: 8px; background: #fff; color: var(--ink);
}
.hint { font-size: 0.86rem; color: var(--ink-soft); margin: 6px 0 0; }
.form-actions { margin-top: 22px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; margin-bottom: 22px; border-bottom: 1.5px solid var(--line); }
.tabs button { font: inherit; font-weight: 600; background: none; border: 0; padding: 10px 14px; cursor: pointer; color: var(--ink-soft); border-bottom: 3px solid transparent; margin-bottom: -1.5px; }
.tabs button[aria-selected=true] { color: var(--ink); border-bottom-color: var(--accent); }
.notice { border-radius: 8px; padding: 12px 14px; margin: 16px 0 0; font-size: 0.95rem; }
.notice.error { background: #fbe9e5; color: #7c2415; }
.notice.ok { background: #e6f1ea; color: #1f4f37; }
.notice.info { background: #fdf3d8; color: #5e4300; }

/* dashboard */
.dash-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.badge { display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 9px; border-radius: 99px; vertical-align: middle; }
.badge.temporary { background: #fdf3d8; color: var(--warn); }
.badge.confirmed { background: #e6f1ea; color: var(--good); }
.badge.removed { background: #fbe9e5; color: #7c2415; }
.stat { font-family: var(--serif); font-size: 3rem; line-height: 1; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.list li:last-child { border-bottom: 0; }
.list .who { min-width: 0; }
.list .who small { display: block; color: var(--ink-soft); }
.list .row-actions { display: flex; gap: 8px; }

.prose h2 { margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.draft-flag { background: #fdf3d8; color: #5e4300; padding: 10px 14px; border-radius: 8px; font-weight: 600; margin-bottom: 24px; }

@media (max-width: 560px) {
  .nav a.hide-small { display: none; }
  .hero { padding: 52px 0 48px; }
}

/* signed-in menu */
.app-nav a { padding: 6px 2px; border-bottom: 2px solid transparent; }
.app-nav a[aria-current=page] { border-bottom-color: var(--accent); font-weight: 600; }
.app-nav a:hover { text-decoration: none; border-bottom-color: var(--line); }

/* tick-box groups */
fieldset { border: 0; padding: 0; margin: 18px 0 0; }
legend { font-weight: 600; font-size: 0.92rem; padding: 0; margin-bottom: 8px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px 16px; }
.checks label { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; margin: 0; font-size: 0.95rem; }
.checks input { margin-top: 5px; }
.checks.wide { grid-template-columns: 1fr; }
.checks small { display: block; color: var(--ink-soft); }
textarea { width: 100%; font: inherit; padding: 11px 12px; border: 1.5px solid #cfc7b8; border-radius: 8px; min-height: 80px; color: var(--ink); }
input[type=date], input[type=time] { font: inherit; padding: 10px 12px; border: 1.5px solid #cfc7b8; border-radius: 8px; background: #fff; color: var(--ink); }
.inline-fields { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.inline-fields > div { min-width: 150px; }
.badge.open { background: #e6f1ea; color: var(--good); }
.badge.booked { background: #e3e9f6; color: #2b4a8b; }
.badge.completed { background: #ece8df; color: var(--ink-soft); }
.badge.cancelled { background: #fbe9e5; color: #7c2415; }
.sublist { list-style: none; margin: 10px 0 0; padding: 12px 14px; background: var(--paper); border-radius: 8px; width: 100%; font-size: 0.93rem; }
.sublist li { padding: 6px 0; border-bottom: 1px solid var(--line); display: block; }
.sublist li:last-child { border-bottom: 0; }
.code-input { letter-spacing: 0.3em; font-size: 1.3rem; text-align: center; }
.site-header .wrap { flex-wrap: wrap; height: auto; min-height: 68px; gap: 6px 22px; padding-top: 8px; padding-bottom: 8px; }
.details { margin: 6px 0 0; padding: 0; list-style: none; font-size: 0.93rem; color: var(--ink-soft); }
.details li { display: block; padding: 2px 0; border: 0; }
.details strong { color: var(--ink); font-weight: 600; }
.book-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.book-row input { flex: 1 1 240px; padding: 7px 10px; font-size: 0.9rem; }
.list li.stack { display: block; }
.list li.stack .row-actions { margin-top: 10px; flex-wrap: wrap; }
.nav .btn.secondary { color: var(--ink); }
.nav .btn.secondary:hover { color: #fff; }
.site-footer .btn.quiet { padding: 0; font-size: inherit; }
dialog.dialog { border: 1px solid var(--line); border-radius: 12px; padding: 26px; width: min(520px, 92vw); color: var(--ink); }
dialog.dialog::backdrop { background: rgba(20, 33, 61, 0.45); }
dialog.dialog h2 { font-size: 1.3rem; }
.badge.overdue, .badge.no_show { background: #fbe9e5; color: #7c2415; }
.badge.due { background: #fdf3d8; color: var(--warn); }
.feedback-box { background: var(--paper); border-left: 3px solid var(--accent); padding: 10px 14px; margin-top: 10px; border-radius: 0 8px 8px 0; white-space: pre-wrap; font-size: 0.95rem; }
.state-line { font-size: 0.9rem; color: var(--ink-soft); margin: 8px 0 0; }
.amount { font-family: var(--serif); font-size: 1.2rem; min-width: 3ch; text-align: right; }
.pick-form { background: var(--paper); border-radius: 8px; padding: 4px 16px 16px; margin-top: 12px; width: 100%; }
.pick-form input[type=text], .pick-form input[type=url] { padding: 9px 10px; font-size: 0.95rem; }
.inline-fields select { min-width: 190px; }
input[type=url] { font: inherit; padding: 9px 10px; border: 1.5px solid #cfc7b8; border-radius: 8px; background: #fff; color: var(--ink); }
.pick-form input[type=url] { width: 100%; }
