/* Light: Google-style pale blue. Dark: warm charcoal. Both carry the crillio.com block grid. */
:root {
  color-scheme: light;
  --bg: #f0f4f9;
  --card: #ffffff;
  --fg: #1f1f1f;
  --muted: #5f6368;
  --dim: #b9c1cc;
  --line: #e1e7ef;
  --fill: #f3f6fb;
  --tint: #e3ecf9; /* open days and hovers */
  --ink: #1f1f1f; /* selected things */
  --on-ink: #ffffff;
  --danger: #b3261e;
  --shadow: 0 1px 2px rgba(30, 50, 90, 0.05), 0 12px 40px rgba(30, 50, 90, 0.08);
  --grid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Crect x='2' y='2' width='24' height='24' rx='3' fill='%231e325a'/%3E%3C/svg%3E");
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235f6368' stroke-width='1.5'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #12110f;
    --card: #1b1916;
    --fg: #f3eee7;
    --muted: #a39a8f;
    --dim: #4d4741;
    --line: #2b2824;
    --fill: #221f1c;
    --tint: #2b2723;
    --ink: #f3eee7;
    --on-ink: #12110f;
    --danger: #ff9580;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 40px rgba(0, 0, 0, 0.35);
    --grid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Crect x='2' y='2' width='24' height='24' rx='3' fill='%23fff3e6'/%3E%3C/svg%3E");
    --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23a39a8f' stroke-width='1.5'/%3E%3C/svg%3E");
  }
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }

/* Backdrop: a faint grid of blocks, a little brighter around the pointer */
@property --x {
  syntax: '<length-percentage>';
  inherits: false;
  initial-value: 50%;
}
@property --y {
  syntax: '<length-percentage>';
  inherits: false;
  initial-value: 20%;
}
.backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
}
.grid {
  position: absolute;
  inset: 0;
  background-image: var(--grid);
  background-size: 28px 28px;
  background-position: center top;
  opacity: 0.03;
  -webkit-mask-image: radial-gradient(ellipse 90% 55% at 50% 0%, #000 10%, transparent 100%);
  mask-image: radial-gradient(ellipse 90% 55% at 50% 0%, #000 10%, transparent 100%);
}
.grid.lit {
  opacity: 0.06;
  -webkit-mask-image: radial-gradient(circle 240px at var(--x) var(--y), #000, transparent);
  mask-image: radial-gradient(circle 240px at var(--x) var(--y), #000, transparent);
  transition: --x 0.35s ease-out, --y 0.35s ease-out;
}

.page {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 16px 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  color: inherit;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.brand svg {
  width: 0.78em;
  height: 0.78em;
  fill: currentColor;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
}
h1 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  text-wrap: balance;
}
h2 {
  margin: 0;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}
.lede {
  margin: 8px 0 0;
  color: var(--muted);
}
.muted { color: var(--muted); }

.panel {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 28px;
}
@media (max-width: 560px) {
  .panel { padding: 22px 16px; border-radius: 16px; }
}

button { font: inherit; color: inherit; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-ink);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s, border-color 0.15s;
}
.button:hover { opacity: 0.88; }
.button:disabled { opacity: 0.5; cursor: progress; }
.button.ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--fg);
}
.button.ghost:hover { opacity: 1; border-color: var(--muted); background: var(--fill); }
.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--dim);
  text-underline-offset: 3px;
  cursor: pointer;
}
.link:hover { text-decoration-color: currentColor; }

label {
  display: grid;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
}
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--fill);
  color: var(--fg);
  font: inherit;
  transition: border-color 0.15s, background 0.15s;
}
select {
  appearance: none;
  padding-right: 40px;
  background: var(--fill) var(--chevron) no-repeat right 14px center;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--muted);
  background: var(--card);
}
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
[tabindex="-1"]:focus { outline: none; } /* headings the page moves focus to */
.error {
  margin: 0;
  color: var(--danger);
  font-size: 0.9rem;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  *, .grid.lit { transition: none !important; }
}
