:root {
  --bg: #f4f2ee;
  --bg-2: #ece9e3;
  --panel: #ffffff;
  --line: #e6e2db;
  --text: #17150f;
  --muted: #6f6a62;
  --gold: #c2461c;
  --green: #17150f;
  --olive: #3f6b3a;
  --accent-soft: #fbe9e1;
  --olive-soft: #e6efe1;
  --shadow: 0 1px 2px rgba(23, 21, 15, 0.04), 0 8px 24px rgba(23, 21, 15, 0.05);
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --serif: "Bricolage Grotesque", "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --tap: 3rem;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
}

button,
a {
  font: inherit;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
}

.brand-mark {
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
  border-radius: 0.28rem;
  background: var(--text);
  box-shadow: inset 0 0 0 3px var(--bg), 0 0 0 1.5px var(--text);
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  color: var(--muted);
  font-size: 0.8rem;
}

/* ---------- Buttons ---------- */

.btn-primary,
.btn-outline,
.btn-ghost,
.choice {
  min-height: var(--tap);
  border-radius: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.1rem;
  border-radius: 999px;
  text-align: center;
}

.btn-primary {
  background: var(--text);
  color: var(--panel);
  border: 0;
}

.btn-outline {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-ghost {
  width: 100%;
  padding: 0.8rem 1rem;
  background: transparent;
  border: 1px dashed var(--line);
  color: var(--muted);
  font-weight: 500;
  line-height: 1.4;
}

.btn-block {
  width: 100%;
}

/* ---------- Invite ---------- */

.invite {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 1.1rem 1rem calc(1.25rem + env(safe-area-inset-bottom));
  position: relative;
  overflow: hidden;
}

.invite-bg {
  position: absolute;
  inset: -20%;
  background: none;
  pointer-events: none;
}

.invite-nav,
.legal {
  position: relative;
}

.invite-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.invite-card {
  position: relative;
  max-width: 30rem;
  width: 100%;
  margin: 1.25rem auto;
  padding: 1.5rem 1.2rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
  align-self: center;
}

.eyebrow {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.68rem;
  font-weight: 600;
  margin: 0 0 0.6rem;
}

.invite-card h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 8.5vw, 2.6rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 0.8rem;
}

.lede {
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 1.4rem;
}

.lede em {
  color: var(--text);
  font-style: normal;
  font-weight: 600;
}

.meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 1rem;
  margin: 0 0 1.4rem;
}

.meta div {
  margin: 0;
}

.meta dt {
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
}

.meta dd {
  margin: 0;
  font-weight: 500;
}

.fine-print,
.legal {
  color: var(--muted);
  font-size: 0.8rem;
}

.fine-print {
  text-align: center;
  margin: 0.85rem 0 0;
}

.legal {
  text-align: center;
  margin: 0;
}

/* ---------- Pad shell ---------- */

.pad {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.pad-top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.pad-id {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.pad-main {
  flex: 1;
  width: 100%;
  max-width: 30rem;
  margin: 0 auto;
  padding: 1rem;
  display: grid;
  gap: 0.85rem;
  align-content: start;
}

/* ---------- Cards ---------- */

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  padding: 1.25rem 1.1rem;
  box-shadow: var(--shadow);
}

.card h2 {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.9rem;
}

.card-alt {
  background: transparent;
  border-style: dashed;
  box-shadow: none;
  padding: 0.6rem;
}

.alt-body {
  padding: 0.75rem 0.5rem 0.25rem;
}

.alt-body h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 0.8rem;
}

.alt-body .schedule {
  margin-bottom: 1rem;
}

/* ---------- Schedule ---------- */

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

.step {
  display: grid;
  grid-template-columns: 4.4rem 1fr;
  gap: 0.7rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
}

.step:first-child {
  border-top: 0;
  padding-top: 0;
}

.step:last-child {
  padding-bottom: 0;
}

.step-time {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--gold);
  padding-top: 0.2rem;
}

.step-title {
  font-weight: 600;
  line-height: 1.3;
}

.step-detail {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.step-key .step-title {
  color: var(--text);
}

/* ---------- Question ---------- */

.choices {
  display: grid;
  gap: 0.55rem;
}

.choice {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.8rem 0.95rem;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 500;
  line-height: 1.4;
}

.choice[aria-pressed="true"] {
  border-color: var(--text);
  background: var(--bg-2);
}

.answer-note {
  margin: 0.9rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

/* ---------- Sticky actions ---------- */

.action-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom));
}

.action-bar-inner {
  max-width: 30rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

@media (max-width: 360px) {
  .step {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .action-bar-inner {
    grid-template-columns: 1fr;
  }
}

/* ---------- Scorecard / action items ---------- */

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

.score {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.3rem 0.75rem;
  align-items: start;
  padding: 0.8rem 0;
  border-top: 1px solid var(--line);
}

.score:first-child {
  border-top: 0;
  padding-top: 0;
}

.score:last-child {
  padding-bottom: 0;
}

.score-label {
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
}

.score-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.status {
  justify-self: end;
  padding: 0.25rem 0.6rem;
  border: 0;
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-good {
  color: var(--olive);
  background: var(--olive-soft);
}

.status-warn {
  color: var(--gold);
  background: var(--accent-soft);
}

/* ---------- Supporting notes ---------- */

.note-block {
  margin: 0.9rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

#question-card .answer-note + .note-block {
  border-top: 0;
  padding-top: 0.6rem;
}

/* ---------- Archive link ---------- */

.pad-main .legal {
  margin: 0.25rem 0 0.5rem;
}

.archive {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 0.1rem;
}

.archive:hover {
  color: var(--text);
}

/* ---------- Host contact ---------- */

.host-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.host-note em {
  color: var(--text);
  font-style: normal;
  font-weight: 600;
}

.step-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin: 0.45rem 0 0;
  font-size: 0.8rem;
}

.step-links a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 0.05rem;
}

/* ---------- Availability slider ---------- */

.slider {
  display: grid;
  gap: 0.6rem;
}

.slider-value {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
}

.slider-input {
  width: 100%;
  height: var(--tap);
  margin: 0;
  background: transparent;
  accent-color: var(--text);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.slider-input::-webkit-slider-runnable-track {
  height: 0.25rem;
  border-radius: 999px;
  background: var(--line);
}

.slider-input::-moz-range-track {
  height: 0.25rem;
  border-radius: 999px;
  background: var(--line);
}

.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 1.6rem;
  height: 1.6rem;
  margin-top: -0.675rem;
  border-radius: 50%;
  background: var(--text);
  border: 3px solid var(--panel);
  box-shadow: 0 0 0 1.5px var(--text);
}

.slider-input::-moz-range-thumb {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--text);
  border: 3px solid var(--panel);
  box-shadow: 0 0 0 1.5px var(--text);
}

.slider-input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 0.5rem;
}

.slider-scale {
  position: relative;
  height: 1rem;
  margin: 0 0.8rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
}

/* ---------- The runaway "No" ---------- */

.no-slot {
  display: flex;
  justify-content: center;
  min-height: 2.75rem;
  margin-top: 0.6rem;
}

.btn-no {
  min-height: 2.75rem;
  padding: 0.6rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-no.is-loose {
  position: fixed;
  z-index: 50;
  margin: 0;
  box-shadow: var(--shadow);
  transition:
    left 0.22s ease-out,
    top 0.22s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .btn-no.is-loose {
    transition: none;
  }
}

.slider-scale span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
}

.slider-scale span:first-child {
  transform: translateX(-0.8rem);
}

.slider-scale span:last-child {
  transform: translateX(calc(-100% + 0.8rem));
}

.okay-card {
  text-align: center;
}

.okay-card h1 {
  margin-bottom: 1.4rem;
}
