/* Let's Hang — base shell styles, skinned in the Wackydance brand
   (warm paper, ink, Wackydance Red; Space Grotesk display + Inter body;
   movement marks as accents). Later tickets add their own sections. */

/* --- Brand fonts, self-hosted (OFL; the privacy note promises no
       third parties, so nothing is fetched from a font CDN) --- */

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/space-grotesk-v22-latin-500.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/space-grotesk-v22-latin-700.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/inter-v20-latin-regular.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/inter-v20-latin-600.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/inter-v20-latin-700.woff2") format("woff2");
}

:root {
  /* Wackydance palette */
  --red: #e34b3f;        /* Wackydance Red */
  --red-deep: #c93b30;   /* pressed/hover red */
  --purple: #6546a6;     /* Dance Purple */
  --tangerine: #f58232;  /* Tangerine */
  --sage: #788578;       /* Quiet Sage — decorative */
  --paper: #f5f0e7;      /* Warm Paper */
  --card: #fffdf8;       /* lifted surface on paper */
  --ink: #202321;        /* Ink */
  --muted: #5f685f;      /* Quiet Sage, deepened for text contrast */
  --yes-ink: #3d5c46;
  --yes-line: #6e8a74;
  --yes-fill: #edf2ea;
  --maybe-ink: #9c5310;
  --maybe-line: #e0701f;
  --maybe-fill: #fceedd;
  --no-ink: #b03227;
  --no-line: #d94438;
  --no-fill: #fae7e3;
  --error: #b3261e;

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;

  --accent: var(--red);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #202321;      /* Ink turns the lights off */
    --card: #2a2e2c;
    --ink: #f0ede4;
    --muted: #a9b4a7;
    --accent: #ee6a5d;
    --red-deep: #f07f74;
    --purple: #a78bdc;
    --tangerine: #f79a4f;
    --sage: #93a192;
    --yes-ink: #9fc4a9;
    --yes-line: #4e6355;
    --yes-fill: #26332b;
    --maybe-ink: #f5b177;
    --maybe-line: #7a4a16;
    --maybe-fill: #3b2a16;
    --no-ink: #f5a096;
    --no-line: #7a3a31;
    --no-fill: #3f211c;
    --error: #f2b8b5;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
}

/* The movement ribbon: one hairline of the brand's four accents across
   the top of every page — the "room to move" stripe. */
.brand-ribbon {
  height: 4px;
  background: linear-gradient(90deg,
    var(--accent), var(--tangerine), var(--purple), var(--sage));
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}
a:hover { color: var(--accent); text-decoration-color: currentColor; }

::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2.5px solid var(--purple);
  outline-offset: 2px;
}

input[type="radio"], input[type="checkbox"] { accent-color: var(--accent); }

.site-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 25%, transparent);
}

/* The wordmark gets the brand treatment: heavy grotesk, two-tone,
   spark mark riding the cap line. */
.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
  display: inline-flex;
  align-items: baseline;
}
.wordmark:hover { color: var(--ink); }
.wm-red { color: var(--accent); }
.wm-spark {
  width: 1.05em;
  height: 1.05em;
  margin-left: 0.18em;
  align-self: center;
  fill: none;
  stroke-width: 3.4;
  stroke-linecap: round;
}
.spark-a { stroke: var(--purple); }
.spark-b { stroke: var(--tangerine); }
.spark-c { stroke: var(--accent); }

.site-main {
  flex: 1;
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 1.25rem 2rem;
}

.site-footer {
  padding: 1rem 1.25rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid color-mix(in srgb, var(--muted) 25%, transparent);
}

.placeholder {
  color: var(--muted);
  font-style: italic;
}

/* --- Creation form (ticket 02) --- */

.hint {
  color: var(--muted);
  font-size: 0.92rem;
}

.field { display: block; margin: 0.75rem 0; }
.field span { display: block; font-size: 0.9rem; margin-bottom: 0.25rem; }
.field small { color: var(--muted); }

.field-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.field-row .field { flex: 1 1 8rem; margin: 0; }

input[type="text"], input[type="date"], input[type="time"],
input[type="number"], input[type="url"], input[type="datetime-local"],
select, textarea {
  width: 100%;
  padding: 0.5rem 0.6rem;
  font: inherit;
  color: inherit;
  border: 1.5px solid color-mix(in srgb, var(--muted) 45%, transparent);
  border-radius: 8px;
  background: var(--card);
}

fieldset.entry-mode {
  border: 1.5px dashed color-mix(in srgb, var(--muted) 45%, transparent);
  border-radius: 10px;
  margin: 0.9rem 0;
}

legend {
  font-family: var(--font-display);
  font-weight: 700;
  padding: 0 0.4rem;
}

.field-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0;
}
.field-inline input[type="number"] { width: 5rem; }

.field-hint {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0.35rem 0 0;
}

.paste-preview { margin-top: 0.75rem; }
.paste-preview table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.92rem;
}
.paste-preview th, .paste-preview td {
  text-align: left;
  padding: 0.25rem 0.5rem;
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 30%, transparent);
}
.paste-count { color: var(--muted); font-size: 0.85rem; }
.paste-errors { color: var(--error); font-size: 0.85rem; padding-left: 1.2rem; }

.radio-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0.5rem 0;
}
.custom-expiry { display: flex; align-items: center; gap: 0.5rem; }
.custom-expiry input { width: auto; }

.fixed-fields { margin-top: 0.5rem; }

.dst-confirm {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border: 2px solid var(--accent);
  border-radius: 12px;
  background: var(--card);
}
.dst-confirm h2 { margin-top: 0; }
.dst-confirm ul { padding-left: 1.2rem; }

.form-errors {
  color: var(--error);
  padding-left: 1.2rem;
}

button, .primary {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0.55rem 1.1rem;
  border-radius: 10px;
  border: 1.5px solid color-mix(in srgb, var(--muted) 50%, transparent);
  background: var(--card);
  color: inherit;
  cursor: pointer;
}
button:hover { border-color: var(--muted); }
button:active { transform: translateY(1px); }

button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}
button.primary:hover {
  background: var(--red-deep);
  border-color: var(--red-deep);
}

/* --- Links card (ticket 02) --- */

.links-card {
  margin: 0 0 1.5rem;
  padding: 1rem 1.25rem;
  border: 2px solid var(--accent);
  border-radius: 14px;
  background: var(--card);
}
.links-card h2 { margin-top: 0; }
.keep-warning { font-size: 0.92rem; }

.link-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.6rem 0;
}
.link-label {
  font-weight: 600;
  font-size: 0.85rem;
  min-width: 6.5rem;
}
.link-value {
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
  word-break: break-all;
  flex: 1 1 12rem;
}
.link-actions { display: flex; gap: 0.4rem; }
.link-actions button { padding: 0.3rem 0.7rem; font-size: 0.85rem; }

/* --- Event page (ticket 02) --- */

.event-title { margin-bottom: 0.25rem; }
.event-description { white-space: pre-line; }
.event-location { font-weight: 600; }
.event-expiry { color: var(--muted); font-size: 0.92rem; }

/* The zone statement doubles as the picker (spec §4: the zone is stated
   once per page): note and select sit side by side, always visible. */
.tz-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0.75rem 0;
  border-top: 1px solid color-mix(in srgb, var(--muted) 30%, transparent);
  padding-top: 0.75rem;
}
.tz-note { margin: 0; }

.tz-switch {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  /* Phone-size pass (ticket 10): zone names are long — let the select and
     the button wrap instead of overflowing a narrow screen. */
  flex-wrap: wrap;
}
.tz-switch select { width: auto; max-width: 100%; }

.week .day { margin: 1.25rem 0; }
.day-heading {
  font-family: var(--font-display);
  font-size: 1.05rem;
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 30%, transparent);
  padding-bottom: 0.25rem;
}

.slots { list-style: none; margin: 0.5rem 0; padding: 0; }
.slot {
  padding: 0.5rem 0.6rem;
  border: 1.5px solid color-mix(in srgb, var(--muted) 25%, transparent);
  border-radius: 10px;
  margin: 0.4rem 0;
  background: var(--card);
}
.slot-date { color: var(--muted); font-size: 0.92rem; }
.slot-time { font-weight: 600; }

/* --- Respondent flow (ticket 03) --- */

.respond-form .name-ask {
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  border: 2px solid var(--accent);
  border-radius: 14px;
  background: var(--card);
}
.name-ask label { display: block; font-weight: 600; }
.name-ask input { max-width: 16rem; margin-top: 0.4rem; }
.name-ask .hint { margin: 0.4rem 0 0; }
.dup-warning { color: var(--error); font-size: 0.92rem; margin: 0.5rem 0 0; }

/* Mark buttons: three visual states plus the quiet unanswered dot (§4.1).
   Brand-tuned: sage is in, tangerine is maybe, Wackydance Red is out. */
.slot-row { display: flex; align-items: center; gap: 0.6rem; }
.slot-row .slot-time { margin-left: auto; }
.mk {
  flex: none;
  /* Phone-size pass (ticket 10): ~44px square, the usual touch-target
     guideline — these are the flow's most-tapped control. */
  width: 2.75rem;
  height: 2.4rem;
  padding: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1;
  border: 1.5px solid color-mix(in srgb, var(--muted) 50%, transparent);
  border-radius: 9px;
  background: var(--card);
  color: var(--muted);
}
.mk-yes { color: var(--yes-ink); border-color: var(--yes-line); background: var(--yes-fill); }
.mk-maybe { color: var(--maybe-ink); border-color: var(--maybe-line); background: var(--maybe-fill); }
.mk-no { color: var(--no-ink); border-color: var(--no-line); background: var(--no-fill); }

/* No-JS fallback for marking: plain radios. The labels are the touch
   targets at phone width (ticket 10), so they get real row padding. */
.mark-radios { display: flex; flex-wrap: wrap; gap: 0.15rem 0.9rem; margin-top: 0.4rem; font-size: 0.92rem; }
.mark-radios input { width: auto; }
.mark-radios label { padding: 0.25rem 0; }

/* Highlight tiers (§4.3): butter is the all-yes tier, amber the border
   (tangerine, in the brand palette). */
.slot-butter { border-color: #e6c719; background: #fff3c2; color: #232244; }
.slot-amber { border-color: var(--maybe-line); }
.tier-note { display: block; font-size: 0.85rem; font-weight: 600; margin-top: 0.3rem; }
.tier-butter { color: #8a6d00; }
.tier-amber { color: var(--maybe-ink); }
.hl { background: #ffd84d; color: #232244; border-radius: 3px; padding: 0 0.2rem; }
@media (prefers-color-scheme: dark) {
  .slot-butter { background: #453c0e; color: #f3efdd; border-color: #ffd84d; }
  .tier-butter { color: #ffe066; }
}

/* Day-header tap marks the whole day (§4.1). */
.day-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 700;
  background: color-mix(in srgb, #ffd84d 30%, transparent);
  border-color: color-mix(in srgb, #e6c719 60%, transparent);
  padding: 0.35rem 0.6rem;
}
.day-toggle .day-hint { font-weight: 400; font-size: 0.78rem; color: var(--muted); }

/* Others' answers: per-Slot dots, tap to expand into named marks (§4.4). */
details.answers { margin-top: 0.4rem; }
summary.dots {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.85rem;
  /* Phone-size pass (ticket 10): the summary is the expansion's tap
     target — give it a taller hit area without shifting the layout. */
  padding: 0.3rem 0;
}
summary.dots::-webkit-details-marker { display: none; }
.dot-row { display: flex; align-items: center; gap: 3px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.dot-yes { background: var(--yes-line); }
.dot-maybe { background: var(--maybe-line); }
.dot-no { background: var(--no-line); }
.dot-none { background: color-mix(in srgb, var(--muted) 45%, transparent); }
.named-marks { margin: 0.3rem 0 0; font-size: 0.92rem; }

.responses-line { color: var(--muted); font-size: 0.92rem; margin-top: -0.5rem; }

/* --- Location sheet (ticket 04) --- */

.loc { margin: 1.25rem 0; }
.loc-sheet {
  border: 1.5px solid color-mix(in srgb, var(--muted) 40%, transparent);
  border-top: 4px solid var(--accent);
  border-radius: 14px;
  padding: 0.65rem 1rem 0.9rem;
  background: var(--card);
}
.loc-summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  cursor: pointer;
}
.loc-summary::-webkit-details-marker { display: none; }
.loc-summary::after { content: "tap to change"; color: var(--muted); font-size: 0.82rem; white-space: nowrap; }
.loc-sheet[open] .loc-summary::after { content: "tap to collapse"; }
.loc-total { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
/* Phone-size pass (ticket 10): a long place name shrinks and wraps inside
   the summary line instead of pushing the counter and the tap-to-change
   hint off a narrow screen. */
.loc-where { min-width: 0; overflow-wrap: anywhere; }

.loc-options {
  list-style: none;
  margin: 0.7rem 0 0.4rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.loc-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
  width: 100%;
  margin: 0;
  padding: 0.55rem 0.75rem;
  border: 1.5px solid color-mix(in srgb, var(--muted) 40%, transparent);
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.loc-row input[type="radio"] { width: auto; margin: 0; }
.loc-row .loc-votes { margin-left: auto; color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.loc-option .loc-by { color: var(--muted); font-size: 0.85rem; }
.loc-url { font-size: 0.85rem; }
.loc-option .loc-pick { padding: 0; border: 0; background: none; font-weight: 600; text-align: left; flex: 1 1 auto; }
.loc-mine .loc-row { border-color: var(--accent); }
.loc-clear { margin: 0.4rem 0 0; }
.loc-clear button { padding: 0.3rem 0.7rem; font-size: 0.85rem; color: var(--muted); }

.loc-suggest {
  margin-top: 0.7rem;
  padding-top: 0.7rem;
  border-top: 1px dashed color-mix(in srgb, var(--muted) 40%, transparent);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.loc-suggest label { flex: 1 1 100%; color: var(--muted); font-size: 0.92rem; }
.loc-suggest input[type="text"] { flex: 1 1 12rem; width: auto; }
.loc-suggest .hint { flex: 1 1 100%; margin: 0; }

.loc-empty, .loc-closed { color: var(--muted); font-size: 0.92rem; margin: 0.6rem 0 0; }
.loc-error { color: var(--error); font-size: 0.92rem; margin: 0.6rem 0 0; }

/* --- Death: Expiry, Lock-in freeze, delete (tickets 08, 09) --- */

/* The frozen banner wraps the readable refusal: expired and locked Events
   stay fully readable, and the banner is what states it (spec §7). */
.frozen-banner {
  margin: 1rem 0;
}
.frozen-note {
  margin: 0;
  padding: 0.75rem 1rem;
  border: 1px solid color-mix(in srgb, var(--muted) 45%, transparent);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  color: var(--muted);
  background: var(--card);
}

/* The delete control sits apart from the panel on purpose: it survives
   Expiry and Lock-in (spec §2), and its confirm is the strong kind. */
.delete-section { border-color: var(--no-line); }

.gone { text-align: center; margin-top: 3rem; }

/* --- Privacy note (ticket 10) --- */

.privacy h2 { margin-top: 1.5rem; }
.privacy-cookies dt { font-weight: 600; margin-top: 0.75rem; }
.privacy-cookies dt span { font-weight: 400; color: var(--muted); }
.privacy-cookies dd { margin: 0.25rem 0 0; }

/* --- Organizer management (ticket 05) --- */

.manage {
  margin: 0 0 1.5rem;
  padding: 1rem 1.25rem;
  border: 2px solid var(--accent);
  border-radius: 14px;
  background: var(--card);
}
.manage h2 { margin-top: 0; }

.manage-tool {
  margin: 0.6rem 0;
  padding: 0.5rem 0;
  border-top: 1px dashed color-mix(in srgb, var(--muted) 40%, transparent);
}
.manage-tool summary {
  cursor: pointer;
  font-weight: 600;
}
.manage-tool form { margin: 0.75rem 0 0.25rem; }

.manage-confirm {
  margin: 0.75rem 0;
  padding: 0.75rem 1rem;
  border: 2px solid var(--maybe-line);
  border-radius: 10px;
}
.manage-confirm h3 { margin: 0 0 0.4rem; }
.manage-confirm ul { padding-left: 1.2rem; }

.expiry-now {
  margin-top: 0.9rem;
  padding-top: 0.7rem;
  border-top: 1px dashed color-mix(in srgb, var(--muted) 40%, transparent);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}
.expiry-now .field-hint { flex: 1 1 12rem; margin: 0; }

button.danger {
  color: var(--no-ink);
  border-color: var(--no-line);
  background: var(--no-fill);
}

.slot-manage {
  margin: 0.3rem 0;
  font-size: 0.92rem;
}
.slot-manage summary {
  cursor: pointer;
  color: var(--muted);
}
.slot-manage form { margin: 0.5rem 0; }
.slot-manage .field-row { margin: 0.4rem 0; }
.slot-manage .hint { margin: 0.3rem 0; }

.slot-tool {
  margin: 0.75rem 0;
  padding: 0.6rem 0.75rem;
  border: 1px solid color-mix(in srgb, var(--muted) 35%, transparent);
  border-radius: 10px;
}
.slot-tool-label { margin: 0 0 0.3rem; font-weight: 600; }
.slot-tool .remove-form { margin: 0.4rem 0 0; }

.response-tool {
  margin: 0.75rem 0;
  padding: 0.6rem 0.75rem;
  border: 1px solid color-mix(in srgb, var(--muted) 35%, transparent);
  border-radius: 10px;
}
.response-tool .link-row { margin: 0.4rem 0; }
.response-tool-name { margin: 0 0 0.3rem; font-weight: 600; }
.response-tool-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}
.response-tool .rename-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.4rem;
  margin: 0.4rem 0 0;
}
.response-tool .rename-form input[type="text"] { width: 12rem; }
.response-tool .remove-form { margin: 0.4rem 0 0; }
.response-tool .link-value { overflow-wrap: anywhere; }

/* --- Location admin + respondent-added Slots (ticket 07) --- */
.option-tool {
  margin: 0.75rem 0;
  padding: 0.6rem 0.75rem;
  border: 1px solid color-mix(in srgb, var(--muted) 35%, transparent);
  border-radius: 10px;
}
.option-tool-label { margin: 0 0 0.3rem; font-weight: 600; }
.option-tool .remove-form { margin: 0.4rem 0 0; }

.addslot { margin: 1.25rem 0; }
.addslot-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1.5px dashed color-mix(in srgb, var(--muted) 45%, transparent);
  border-radius: 12px;
}
.addslot-form .field-row { margin: 0; }
.addslot-form .field span { font-size: 0.85rem; color: var(--muted); }
.addslot-form .hint { flex: 1 1 100%; margin: 0; }
.addslot-title { flex: 1 1 100%; margin: 0; font-weight: 600; }
.addslot-confirm { border-style: solid; }
.addslot-confirm h3 { margin: 0 0 0.4rem; }
.addslot-confirm ul { flex: 1 1 100%; margin: 0; padding-left: 1.2rem; }

.slot-added { margin: 0.15rem 0 0; font-size: 0.82rem; color: var(--muted); }

/* --- Lock-in, the "It's on!" card, and .ics (ticket 08) --- */

.itson {
  margin: 1rem 0 1.25rem;
  padding: 1rem 1.25rem;
  border: 2px solid var(--sage);
  border-radius: 14px;
  background: var(--yes-fill);
}
.itson-title { margin: 0 0 0.4rem; color: var(--yes-ink); }
.itson p { margin: 0.25rem 0; }
.itson-when { font-size: 1.05rem; }
.itson-in, .itson-maybes { margin-top: 0.5rem; }
.itson-maybes { color: var(--muted); }
.itson-cal { margin-top: 0.75rem; }
.itson-download {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border: 1.5px solid var(--accent);
  border-radius: 10px;
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
}
.itson-download:hover { background: var(--accent); color: #fff; }

.lock-choice { display: block; padding: 0.25rem 0; }
.lock-choice input[type="radio"] { width: auto; margin: 0 0.4rem 0 0; }
.lock-choice .loc-votes { color: var(--muted); font-size: 0.85rem; }


/* --- Creation screen: calendar picker (ticket 02) ---
   The creation form asks for the title, then dates and times on a month
   calendar; everything else waits under "More options". The picker is
   progressive enhancement: JS hides the plain entry fallback (.time-
   fallback) and widens the page shell for the two-pane layout. Without
   JS the fallback carries the form. */

.tagline {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.1rem;
  text-align: center;
  color: var(--muted);
  margin: 1.25rem 0;
}

html.has-picker .site-main { max-width: 53rem; }
html.has-picker .time-fallback { display: none; }

.create-card {
  padding: 1.5rem 1.4rem;
  border: 1.5px solid color-mix(in srgb, var(--muted) 35%, transparent);
  border-radius: 16px;
  background: var(--card);
  max-width: 46rem;
  margin: 0 auto;
}

.ask-title { margin: 0 0 1rem; }
.ask-title input {
  width: 100%;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 0.4rem 0.2rem;
  border: none;
  border-bottom: 2px solid color-mix(in srgb, var(--muted) 40%, transparent);
  border-radius: 0;
  background: transparent;
}
.ask-title input:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

.when-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0.25rem 0 0.75rem;
}
.when-label { font-family: var(--font-display); font-weight: 700; margin: 0; }
.tz-inline {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.tz-inline select { width: auto; max-width: 14rem; padding: 0.3rem 0.5rem; }

.cal-picker {
  display: grid;
  grid-template-columns: minmax(0, 14.5rem) minmax(0, 1fr);
  gap: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid color-mix(in srgb, var(--muted) 30%, transparent);
}
@media (max-width: 34rem) {
  .cal-picker { grid-template-columns: minmax(0, 1fr); }
}
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.cal-month { font-family: var(--font-display); font-weight: 700; }
.cal-nav {
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  border-radius: 50%;
  font-size: 1.1rem;
  line-height: 1;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
  font-size: 0.85rem;
}
.cal-dow { color: var(--muted); padding: 0.25rem 0; }
.cal-day {
  padding: 0.45rem 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}
.cal-day:hover { border-color: var(--accent); }
.cal-day[data-out] { color: color-mix(in srgb, var(--muted) 55%, transparent); }
.cal-day[data-today] { border-color: color-mix(in srgb, var(--muted) 50%, transparent); }
.cal-day[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}
.cal-today {
  width: 100%;
  margin-top: 0.6rem;
  padding: 0.4rem;
  font-size: 0.88rem;
}

.durations {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}
.chip {
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, var(--muted) 50%, transparent);
  font-size: 0.88rem;
  background: transparent;
}
.chip[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}

.cal-dates { display: flex; flex-direction: column; }
.cal-group {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 25%, transparent);
}
.cal-chip {
  flex: none;
  width: 3rem;
  text-align: center;
  border: 1.5px solid color-mix(in srgb, var(--muted) 40%, transparent);
  border-radius: 9px;
  overflow: hidden;
}
.cal-chip .cal-chip-mon {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  padding: 0.1rem 0;
}
.cal-chip .cal-chip-day { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; padding: 0.1rem 0 0.2rem; }
.cal-body { flex: 1; min-width: 0; }
.cal-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.3rem 0;
  flex-wrap: wrap;
}
.steppers { display: inline-flex; align-items: center; gap: 0.25rem; }
.nudge {
  flex: none;
  width: 1.8rem;
  height: 1.8rem;
  padding: 0;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  color: var(--muted);
}
.nudge:hover { color: var(--accent); border-color: var(--accent); }
.cal-time {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.15;
  min-width: 4.2rem;
}
/* The typed-time field keeps the footprint of the reading it replaced
   (the global input rule loses on specificity, so pin width/padding). */
.cal-time .cal-time-input {
  width: 4.2rem;
  padding: 0.15rem 0.3rem;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
}
.cal-time .cal-time-input[data-invalid] { border-color: var(--error); }
.cal-time .cal-24h { font-size: 0.72rem; color: var(--muted); }
.cal-dash { color: var(--muted); }
.cal-remove {
  width: 1.7rem;
  height: 1.7rem;
  padding: 0;
  border-radius: 50%;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1;
}
.add-time {
  margin-top: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-style: dashed;
  font-size: 0.85rem;
  color: var(--muted);
}
.cal-count { color: var(--muted); font-size: 0.85rem; margin: 0.6rem 0 0; }
.cal-count[data-capped] { color: var(--error); }

.create-cta {
  width: 100%;
  padding: 0.75rem 1.1rem;
  font-size: 1.05rem;
  margin-top: 1.25rem;
}
.assumptions {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0.9rem 0 0;
  text-align: center;
}

.more-options {
  margin: 1.25rem 0;
  padding: 0.75rem 1rem;
  border: 1.5px dashed color-mix(in srgb, var(--muted) 45%, transparent);
  border-radius: 12px;
  max-width: 46rem;
  margin-left: auto;
  margin-right: auto;
}
.more-options > summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.more-options[open] > summary { margin-bottom: 0.75rem; }

.group-h {
  font-size: 0.95rem;
  margin: 1.4rem 0 0.4rem;
}
.choices { display: flex; flex-direction: column; gap: 0.4rem; margin: 0.4rem 0; }
.choice {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  border: 1.5px solid color-mix(in srgb, var(--muted) 40%, transparent);
  border-radius: 10px;
  cursor: pointer;
}
.choice:has(input:checked) { border-color: var(--accent); }
.choice input[type="radio"] { width: auto; margin-top: 0.3rem; }
.choice-body { display: flex; flex-direction: column; }
.choice-body small { color: var(--muted); }
