/* Trudi — the flyer's system, as a stylesheet.
   Indigo for the one action on a screen, warm ground for reading, gold only
   where money is, Source Sans 3 with Caveat as the single handwritten accent.
   Mobile-first at 375 px; one breakpoint at 640 px. */

@import url('/fonts/fonts.css');

:root {
  --indigo: #4338ca;
  --indigo-deep: #3730a3;
  --ground: #f8f7f4;
  --surface: #fffcf7;
  --ink: #1a1a2e;
  --muted: #6b7280;
  --line: #e5e7eb;
  --gold: #b45309;        /* money, on light */
  --gold-light: #fde68a;  /* money, on indigo */
  --gold-wash: #fffbeb;
  --font: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  --hand: "Caveat", "Comic Sans MS", cursive;
  --r: 14px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); background: var(--ground); color: var(--ink);
  font-size: 17px; line-height: 1.5; text-rendering: optimizeLegibility;
}
a { color: var(--indigo); }
a:hover { color: var(--indigo-deep); }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.1; }
h1 { font-size: 40px; font-weight: 800; }
h2 { font-size: 24px; font-weight: 800; }
h3 { font-size: 18px; font-weight: 700; }
p { margin: 0 0 12px; }
strong { font-weight: 700; }
img { max-width: 100%; }

/* Layout */
.wrap { max-width: 640px; margin: 0 auto; padding: 24px 20px 64px; }
.band { background: var(--indigo); color: #fff; }
.band a { color: var(--gold-light); }
.band .wrap { padding-top: 28px; padding-bottom: 36px; }
.kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--indigo); margin: 36px 0 10px; }
.band .kicker { color: rgba(255,255,255,0.8); }
.lead { font-size: 18px; color: var(--muted); }
.band .lead { color: rgba(255,255,255,0.92); }
.hand { font-family: var(--hand); font-weight: 700; }
.muted { color: var(--muted); }
.note { font-size: 14px; color: var(--muted); margin-top: 8px; }
.hidden { display: none !important; }
.ok { color: var(--indigo); font-weight: 600; }
.todo { border: 2px dashed var(--gold); background: var(--gold-wash); border-radius: 12px; padding: 10px 14px; font-size: 14px; margin: 12px 0; }
.legal h1 { font-size: 34px; margin-top: 28px; }
.legal h2 { font-size: 20px; margin-top: 28px; }
.legal p, .legal li { font-size: 16px; }
.code-input { font-size: 28px; letter-spacing: 0.3em; text-align: center; font-variant-numeric: tabular-nums; }
.row2 { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
details summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.warn { border-color: var(--gold); }

/* Wordmark: lowercase, gold dot under the i */
.mark { display: inline-flex; align-items: flex-end; text-decoration: none; color: inherit; }
.mark .w { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.mark .i { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; }
.mark .dot { width: 5px; height: 5px; border-radius: 3px; background: var(--gold); }
.band .mark .dot { background: var(--gold-light); }
.mark .tag { margin-left: 10px; margin-bottom: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--indigo); }
.band .mark .tag { color: rgba(255,255,255,0.8); }
header.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
header.top nav { display: flex; gap: 18px; align-items: center; }
header.top nav a { font-size: 14px; font-weight: 700; text-decoration: none; }
.band .btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.45); }
.band .btn.ghost:hover { background: rgba(255,255,255,0.1); }
.cta .row { display: flex; gap: 10px; flex-wrap: wrap; }

/* Cards and controls */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; margin: 12px 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 20px;
  border-radius: 12px; border: 0; font: inherit; font-weight: 800; font-size: 17px; text-decoration: none; cursor: pointer;
  background: var(--indigo); color: #fff; width: 100%; }
.btn:hover { background: var(--indigo-deep); }
.btn:disabled { opacity: 0.5; cursor: default; }
.band .btn { background: #fff; color: var(--indigo); }
.band .btn:hover { background: var(--gold-wash); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); font-weight: 600; }
.btn.ghost:hover { background: var(--surface); }
.btn.small { min-height: 40px; padding: 8px 14px; font-size: 15px; width: auto; }
label.f { display: block; font-size: 14px; font-weight: 600; color: var(--muted); margin-top: 12px; }
input, select, textarea { width: 100%; min-height: 48px; padding: 12px 14px; font: inherit; font-size: 17px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); margin-top: 6px; }
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--indigo); outline-offset: 1px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 15px; }
.check input { width: 22px; height: 22px; min-height: 0; margin: 2px 0 0; flex-shrink: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 9px 14px; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; min-height: 44px; -webkit-appearance: none; appearance: none; }
.chip[aria-pressed="true"] { background: var(--indigo); border-color: var(--indigo); color: #fff; }

/* Share row — biggest number first */
.share { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.share .cell { text-align: center; }
.share .pct { font-size: 26px; font-weight: 800; line-height: 1; }
.share .pct.hi { color: var(--gold-light); }
.share .at { font-size: 12px; opacity: 0.85; margin-top: 6px; }
.rule { border-top: 2px solid rgba(255,255,255,0.35); padding-top: 16px; margin-top: 28px; }

/* Pickup calendar: two weeks, three slots a day, tap or drag to paint */
.week { display: grid; grid-template-columns: 58px repeat(7, minmax(0, 1fr)); gap: 4px; margin-top: 10px; touch-action: none; user-select: none; -webkit-user-select: none; }
.week .h { text-align: center; font-size: 11px; color: var(--muted); line-height: 1.1; padding-bottom: 2px; }
.week .h b { display: block; font-size: 15px; color: var(--ink); }
.week .lab { font-size: 12px; color: var(--muted); align-self: center; line-height: 1.15; }
.week .c { height: 40px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 0; cursor: pointer; -webkit-appearance: none; appearance: none; }
button { color: inherit; }
.week .c.we { background: var(--ground); }
.week .c[aria-pressed="true"] { background: var(--indigo); border-color: var(--indigo); }
.week-title { font-size: 13px; font-weight: 700; color: var(--indigo); margin-top: 14px; }
.item .acts { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.item .acts .btn { min-height: 40px; padding: 6px 14px; font-size: 15px; width: auto; min-width: 0; margin: 0; }

/* Steps */
.steps { display: grid; gap: 12px; margin-top: 10px; }
.step { display: flex; gap: 12px; align-items: flex-start; }
.step .n { flex-shrink: 0; width: 28px; height: 28px; border-radius: 14px; background: var(--indigo); color: #fff; font-weight: 800; font-size: 14px; display: grid; place-items: center; margin-top: 1px; }

/* Tables */
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 16px; }
th { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--indigo); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.total td { border-bottom: 0; font-weight: 700; padding-top: 12px; }
tr.total td.big { font-size: 22px; font-weight: 800; color: var(--gold); }

/* Timeline (dashboard) */
.todos { padding: 6px 18px; }
.todos .td { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.45; }
.todos .td:first-child { border-top: 0; }
.todos .td .b { width: 22px; height: 22px; border-radius: 11px; border: 2px solid var(--gold); background: var(--gold-wash); margin-top: 1px; }
.todos .td.info .b { border-color: var(--line); background: var(--surface); }
.todos .td .t { font-weight: 700; }
.todos .td .s { font-size: 14px; color: var(--muted); }
.todos .td a { font-weight: 700; }
.timeline { display: grid; gap: 0; margin: 8px 0 20px; }
.tl { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; padding: 6px 0; }
.tl .b { width: 22px; height: 22px; border-radius: 11px; border: 2px solid var(--line); background: var(--surface); display: grid; place-items: center; font-size: 12px; }
.tl.done .b { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.tl.now .b { border-color: var(--gold); background: var(--gold-wash); }
.tl .t { font-weight: 700; }
.tl .s { font-size: 14px; color: var(--muted); }

/* Money totals */
.totals { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 16px 0; }
.total { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.total .k { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.total .v { font-size: 22px; font-weight: 800; margin-top: 4px; }
.total.avail { border-color: var(--gold); background: var(--gold-wash); }
.total.avail .v { color: var(--gold); }

/* Item rows */
.item { display: grid; grid-template-columns: 60px 1fr auto; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; margin-bottom: 10px; }
.item .thumb { width: 60px; height: 60px; border-radius: 10px; object-fit: cover; background: var(--ground); border: 1px solid var(--line); }
.item .thumb.empty { display: grid; place-items: center; color: var(--muted); }
.item > div:nth-child(2) { min-width: 0; }
.item .t { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item .s { font-size: 13px; color: var(--muted); margin-top: 3px; display: flex; gap: 6px; flex-wrap: wrap; }
.item .share-v { text-align: right; font-weight: 800; white-space: nowrap; }
.item .share-v small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--ground); border: 1px solid var(--line); color: var(--muted); }
.badge.sold, .badge.paid_out { color: var(--gold); border-color: var(--gold); }
.badge.listed { color: var(--indigo); border-color: var(--indigo); }

footer.site { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 14px 20px; font-size: 14px; }
footer.site a { text-decoration: none; }

@media (min-width: 640px) {
  h1 { font-size: 56px; }
  .wrap { padding: 32px 24px 80px; }
  .totals { grid-template-columns: repeat(4, 1fr); }
  .share .pct { font-size: 34px; }
  .btn { width: auto; min-width: 220px; }
}

/* FAQ on the start page */
.faq details { border-top: 1px solid var(--line); padding: 10px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 700; font-size: 17px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--indigo); font-weight: 800; font-size: 20px; }
.faq details[open] summary::after { content: '\2013'; }
.faq p { margin: 8px 0 0; color: var(--ink); }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 20px; letter-spacing: 0.12em; color: var(--indigo); }
