/* The New Type A · outputs. Theme tokens copied from contracts/options-v1.json. */
:root {
  --canvas: #FAF6F0;
  --surface: #FFFFFF;
  --ink: #2B2622;
  --muted: #7A6F66;
  --line: #E7DED3;
  --accent: #B5411F;
  --accent-ink: #FFFFFF;
  --radius: 16px;
  --font: ui-rounded, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Derived from the tokens above. */
  --accent-soft: rgba(181, 65, 31, 0.10);
  --accent-text: #B5411F; /* accent darkened for small text on light surfaces */
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
}

h1, h2, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

.shell {
  max-width: 440px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

/* ---- top bar ---------------------------------------------------------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }

.brand-mark {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
  font-size: 18px;
  display: grid;
  place-items: center;
}

.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-weight: 700; font-size: 15px; line-height: 1.2; }
.brand-group { color: var(--muted); font-size: 13px; line-height: 1.3; }

.viewer { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }
.viewer-label { color: var(--muted); font-size: 12px; }

.viewer select {
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  min-height: 36px;
}

.sample-note {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  margin-bottom: 16px;
}

.loading { color: var(--muted); text-align: center; padding: 48px 0; }

/* ---- cards ------------------------------------------------------------ */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.card.invitation { padding: 24px 20px 20px; box-shadow: 0 6px 24px rgba(43, 38, 34, 0.06); }
.card.draft { border: 2px dashed var(--accent); box-shadow: none; }
.card.quiet { text-align: center; padding: 36px 24px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 10px;
}

.eyebrow.badge {
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 4px 10px;
}

.title { font-size: 26px; line-height: 1.15; font-weight: 800; letter-spacing: -0.01em; }
.quiet .title { font-size: 22px; }

.when { font-size: 18px; font-weight: 600; margin-top: 12px; }
.zone { color: var(--muted); font-size: 13px; margin-top: 2px; }

.fact {
  color: var(--muted);
  font-size: 14px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.section-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-head .count { font-size: 14px; font-weight: 600; color: var(--ink); }

.why { font-size: 17px; line-height: 1.45; }
.quiet .why { color: var(--muted); margin-top: 10px; font-size: 16px; }
.quiet .fact { border-top: 0; padding-top: 0; }

/* ---- respond ---------------------------------------------------------- */

.respond { margin-top: 18px; }
.respond-prompt { font-weight: 600; margin-bottom: 10px; }
.respond-actions { display: flex; gap: 10px; }

.btn {
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  min-height: 48px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 2px solid var(--accent);
  cursor: pointer;
  flex: 1 1 0;
}

.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.small { flex: none; min-height: 40px; font-size: 14px; padding: 6px 14px; }
.btn:disabled { opacity: 0.55; cursor: default; }

.respond-note { color: var(--muted); font-size: 13px; margin-top: 10px; }
.respond-error { color: var(--accent-text); font-size: 14px; font-weight: 600; margin-top: 10px; }

/* ---- preview label ---------------------------------------------------- */

.preview-banner {
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  background: var(--surface);
  border: 2px dashed var(--muted);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 16px;
}

.card.preview { border-style: dashed; box-shadow: none; }

/* ---- organizer's approval card (draft quote) -------------------------- */

.terms { margin: 0 0 12px; border: 1px solid var(--line); border-radius: 12px; }
.term { display: flex; justify-content: space-between; gap: 16px; padding: 10px 14px; }
.term + .term { border-top: 1px solid var(--line); }
.term dt { color: var(--muted); font-size: 14px; flex: none; }
.term dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.approval-state { font-weight: 700; margin-bottom: 10px; }
.approval-state .simulated { color: var(--muted); font-size: 13px; font-weight: 500; }
.approval-notice {
  color: var(--accent-text);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}

/* ---- restaurant ------------------------------------------------------- */

.card.restaurant.unconfirmed { border-style: dashed; background: transparent; }
.restaurant .heading { font-weight: 700; font-size: 17px; }
.restaurant .message { margin-top: 4px; }
.restaurant .footnote { color: var(--muted); font-size: 13px; margin-top: 8px; }

/* ---- attendance ------------------------------------------------------- */

.status-group + .status-group { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.status-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.status-label { font-weight: 700; }
.status-hint { color: var(--muted); font-size: 13px; }

.mark {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.mark.accepted { background: var(--accent); color: var(--accent-ink); }
.mark.invited { border: 2px solid var(--accent); color: var(--accent-text); }
.mark.proposed { border: 2px dashed var(--muted); color: var(--muted); }
.mark.declined { background: var(--line); color: var(--muted); }

.people { display: flex; flex-wrap: wrap; gap: 8px; padding-left: 32px; }

.person {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px 4px 4px;
  font-weight: 600;
  font-size: 15px;
}

.person.you { border-color: var(--accent); }
.person.declined .person-name { color: var(--muted); text-decoration: line-through; }

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--canvas);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}

.tag { color: var(--muted); font-weight: 500; font-size: 13px; }

/* ---- activity --------------------------------------------------------- */

.activity li {
  position: relative;
  padding: 0 0 14px 24px;
  font-size: 15px;
}

.activity li:last-child { padding-bottom: 0; }

.activity li::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 7px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--muted);
}

.activity li::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 20px;
  bottom: -5px;
  width: 1px;
  background: var(--line);
}

.activity li:last-child::after { display: none; }
.activity li:last-child::before { border-color: var(--accent); background: var(--accent); }
.activity .simulated { color: var(--muted); font-size: 13px; }

.fine { color: var(--muted); font-size: 13px; text-align: center; margin-top: 20px; }
.fine a, .card a { color: var(--accent-text); font-weight: 600; }

/* ---- dev-only switcher (not product UI) ------------------------------- */

.dev {
  max-width: 440px;
  margin: 0 auto 32px;
  padding: 12px 16px;
  border: 1px dashed #9A9A9A;
  border-radius: 6px;
  background: #F1F1F1;
  color: #444444;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.5;
}

.dev-title { font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.dev-links { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }

.dev a {
  color: #333333;
  background: #FFFFFF;
  border: 1px solid #BBBBBB;
  border-radius: 4px;
  padding: 2px 8px;
  text-decoration: none;
}

.dev a[aria-current='true'] { background: #333333; color: #FFFFFF; border-color: #333333; }
.dev :focus-visible { outline-color: #333333; border-radius: 4px; }

/* ---- desktop window (screen recording) -------------------------------- */

@media (min-width: 720px) {
  .shell {
    margin: 32px auto 20px;
    padding: 28px 24px 36px;
    border: 1px solid var(--line);
    border-radius: 36px;
    background: var(--canvas);
    box-shadow: 0 20px 60px rgba(43, 38, 34, 0.08);
  }
}

@media (max-width: 359px) {
  .respond-actions { flex-direction: column; }
  .title { font-size: 23px; }
}

@media (prefers-reduced-motion: no-preference) {
  .btn { transition: transform 0.08s ease; }
  .btn:active:not(:disabled) { transform: scale(0.98); }
}
