:root {
  --paper: #fbfaf6;
  --ink: #14213d;
  --muted: #657084;
  --line: #dfe3e8;
  --orange: #ff7a59;
  --orange-dark: #e85d3d;
  --sun: #ffcf5c;
  --mint: #a8e6cf;
  --blue: #dbeafe;
  --danger: #c0392b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }

body { margin: 0; min-width: 320px; min-height: 100vh; }

button, input, textarea { font: inherit; }
button { cursor: pointer; }

.grain {
  background-image: radial-gradient(rgba(20, 33, 61, .055) .65px, transparent .65px);
  background-size: 7px 7px;
  inset: 0;
  opacity: .45;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

.site-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1180px;
  padding: 24px 28px;
}

.brand { align-items: center; color: var(--ink); display: inline-flex; font-size: 1.05rem; font-weight: 800; gap: 9px; letter-spacing: -.035em; text-decoration: none; }
.brand-mark { align-items: center; background: var(--ink); border-radius: 50%; color: white; display: inline-flex; font-family: Georgia, serif; font-size: 1.18rem; font-style: italic; height: 29px; justify-content: center; width: 29px; }
.quiet-link { color: var(--ink); font-size: .92rem; font-weight: 650; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.app-shell { margin: 0 auto; max-width: 1120px; padding: 32px 28px 60px; }
footer { align-items: center; color: var(--muted); display: flex; font-size: .82rem; justify-content: space-between; margin: 0 auto; max-width: 1180px; padding: 0 28px 32px; }
footer a { color: var(--muted); font-weight: 700; text-underline-offset: 4px; }

.hero { display: grid; gap: 30px; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); padding: 48px 0 42px; }
.eyebrow { color: var(--orange-dark); font-size: .74rem; font-weight: 800; letter-spacing: .12em; margin: 0 0 14px; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(3rem, 7vw, 5.7rem); font-weight: 500; letter-spacing: -.075em; line-height: .91; margin-bottom: 23px; max-width: 690px; }
h1 em { color: var(--orange-dark); font-style: italic; }
.hero-copy { color: #4d596e; font-size: 1.08rem; line-height: 1.6; max-width: 520px; }
.hero-card { align-self: center; background: var(--ink); border-radius: 20px; color: white; overflow: hidden; padding: 24px; transform: rotate(2deg); }
.hero-card::before { background: var(--sun); border-radius: 40px; content: ""; display: block; height: 9px; margin-bottom: 30px; width: 44px; }
.hero-card p { color: #cbd5e1; font-size: .9rem; line-height: 1.5; }
.mini-votes { display: grid; gap: 8px; grid-template-columns: 1fr 1fr 1fr; margin-top: 24px; }
.mini-votes span { border-radius: 10px; font-size: 1.1rem; padding: 12px; text-align: center; }
.mini-votes span:nth-child(1) { background: var(--mint); color: #105b47; }
.mini-votes span:nth-child(2) { background: var(--sun); color: #755800; }
.mini-votes span:nth-child(3) { background: #f7a6a0; color: #7f271d; }

.section-heading { align-items: baseline; display: flex; gap: 13px; margin: 20px 0; }
.section-heading h2 { font-size: 1.32rem; letter-spacing: -.04em; margin: 0; }
.section-heading span { color: var(--muted); font-size: .9rem; }
.panel { background: rgba(255,255,255,.82); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 40px rgba(20,33,61,.05); padding: clamp(21px, 4vw, 34px); }
.field-grid { display: grid; gap: 17px; grid-template-columns: 1fr 1fr; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
label, .field-label { color: #38455a; font-size: .86rem; font-weight: 720; }
input, textarea { background: #fff; border: 1px solid #cdd4dd; border-radius: 10px; color: var(--ink); outline: none; padding: 12px 13px; transition: border-color .15s, box-shadow .15s; width: 100%; }
input:focus, textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255,122,89,.15); }
textarea { min-height: 94px; resize: vertical; }
.help { color: var(--muted); font-size: .79rem; line-height: 1.45; margin: 2px 0 0; }

.slot-list { display: grid; gap: 12px; margin: 20px 0 13px; }
.slot { background: #f5f7fa; border: 1px solid #e3e7ed; border-radius: 13px; display: grid; gap: 12px; grid-template-columns: 1.1fr 1fr 1fr auto; padding: 13px; }
.slot .field { gap: 5px; }
.slot label { font-size: .72rem; }
.slot input { padding: 9px; }
.icon-button { align-self: end; background: transparent; border: 0; border-radius: 8px; color: #738095; font-size: 1.25rem; height: 38px; line-height: 1; width: 38px; }
.icon-button:hover { background: #e8ebf0; color: var(--danger); }

.button-row { align-items: center; display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.button { background: var(--ink); border: 1px solid var(--ink); border-radius: 10px; color: white; font-weight: 760; padding: 12px 17px; transition: transform .15s, background .15s; }
.button:hover { background: #25395e; transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .65; transform: none; }
.button.accent { background: var(--orange); border-color: var(--orange); color: #39150d; }
.button.accent:hover { background: #ff8b6d; }
.button.secondary { background: transparent; border-color: #b8c1cd; color: var(--ink); }
.button.danger { background: #fff; border-color: #e09b94; color: #9a2519; }
.button.small { font-size: .84rem; padding: 9px 12px; }
.notice { border-radius: 10px; font-size: .9rem; margin-top: 17px; padding: 12px 14px; }
.notice.success { background: #ddf7eb; color: #12513e; }
.notice.error { background: #fde6e3; color: #8d2117; }
.notice.info { background: var(--blue); color: #26466e; }

.poll-layout { display: grid; gap: 26px; grid-template-columns: minmax(0, 1fr) 290px; }
.poll-heading { border-bottom: 1px solid var(--line); margin-bottom: 26px; padding-bottom: 24px; }
.poll-heading h1 { font-size: clamp(2.45rem, 5vw, 4.5rem); margin-bottom: 15px; }
.poll-meta { align-items: center; color: var(--muted); display: flex; flex-wrap: wrap; font-size: .86rem; gap: 8px; }
.dot { background: #a4adba; border-radius: 99px; height: 4px; width: 4px; }
.status { border-radius: 99px; display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .04em; padding: 5px 9px; text-transform: uppercase; }
.status.open { background: #dcf7e9; color: #146b4f; }
.status.closed { background: #edf0f3; color: #586375; }
.option-list { display: grid; gap: 13px; }
.option-card { border: 1px solid #dbe1e8; border-radius: 14px; padding: 16px; }
.option-card header { align-items: start; display: flex; gap: 15px; justify-content: space-between; }
.option-date { color: var(--orange-dark); font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.option-time { font-size: 1.08rem; font-weight: 760; letter-spacing: -.025em; margin: 5px 0 0; }
.option-label { color: var(--muted); font-size: .86rem; margin: 5px 0 0; }
.result-bars { display: grid; gap: 8px; margin-top: 17px; }
.result-row { align-items: center; display: grid; font-size: .78rem; gap: 8px; grid-template-columns: 55px 1fr 22px; }
.bar { background: #edf0f3; border-radius: 99px; height: 7px; overflow: hidden; }
.bar i { border-radius: inherit; display: block; height: 100%; }
.bar.yes i { background: #56bd9c; }.bar.maybe i { background: #f2bd33; }.bar.no i { background: #dc8177; }
.choice-group { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.choice { cursor: pointer; }
.choice input { inline-size: 1px; opacity: 0; position: absolute; }
.choice span { border: 1px solid #cbd3de; border-radius: 8px; display: block; font-size: .8rem; font-weight: 700; padding: 8px 11px; }
.choice input:checked + span { background: var(--ink); border-color: var(--ink); color: white; }
.choice input:focus-visible + span { box-shadow: 0 0 0 3px rgba(255,122,89,.35); }
.choice.closed { cursor: default; pointer-events: none; }
.choice.closed span { color: var(--muted); }

.side-stack { align-self: start; display: grid; gap: 14px; position: sticky; top: 16px; }
.side-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.side-card h3 { font-size: .95rem; letter-spacing: -.02em; margin-bottom: 8px; }.side-card p { color: var(--muted); font-size: .83rem; line-height: 1.5; margin-bottom: 12px; }
.share-link { background: #f4f6f8; border: 1px solid #e3e7eb; border-radius: 8px; color: #4a5870; display: block; font-family: ui-monospace, monospace; font-size: .7rem; overflow: hidden; padding: 9px; text-overflow: ellipsis; white-space: nowrap; }
.admin-card { background: #fff8e9; border-color: #f2dca1; }.admin-card h3 { color: #785300; }.admin-card p { color: #715f31; }
.stack { display: grid; gap: 11px; }
.loading { color: var(--muted); padding: 80px 0; text-align: center; }
.empty { color: var(--muted); font-size: .9rem; text-align: center; padding: 20px; }
.admin-responses { margin-top: 24px; }
.admin-responses h2 { font-family: Georgia, "Times New Roman", serif; font-size: 1.75rem; font-weight: 500; letter-spacing: -.04em; margin: 0; }
.admin-responses-heading { align-items: start; display: flex; gap: 18px; justify-content: space-between; margin-bottom: 20px; }
.response-total { background: #fff1ca; border-radius: 999px; color: #785300; font-size: .78rem; font-weight: 800; padding: 6px 10px; white-space: nowrap; }
.response-matrix-wrap { border: 1px solid #e0e5eb; border-radius: 12px; overflow-x: auto; }
.response-matrix { border-collapse: collapse; font-size: .83rem; min-width: 620px; width: 100%; }
.response-matrix th, .response-matrix td { border-bottom: 1px solid #e5e9ee; padding: 11px 13px; text-align: center; }
.response-matrix thead th { background: #f6f8fa; color: #526176; font-size: .72rem; font-weight: 800; vertical-align: top; }
.response-matrix thead th:first-child { min-width: 170px; text-align: left; }
.response-matrix thead th span, .response-matrix thead th small { display: block; }
.response-matrix thead th span { color: var(--orange-dark); font-size: .86rem; margin-bottom: 3px; }
.response-matrix thead th small { font-weight: 650; line-height: 1.35; }
.response-matrix tbody tr:last-child th, .response-matrix tbody tr:last-child td { border-bottom: 0; }
.response-matrix tbody th { background: #fff; font-weight: 500; min-width: 170px; text-align: left; }
.response-matrix tbody th strong, .response-matrix tbody th small { display: block; }
.response-matrix tbody th small { color: var(--muted); font-size: .74rem; font-weight: 400; line-height: 1.35; margin-top: 3px; }
.availability-mark { align-items: center; border-radius: 999px; display: inline-flex; font-size: .78rem; font-weight: 900; height: 25px; justify-content: center; width: 25px; }
.availability-mark.yes { background: #ddf7eb; color: #126047; }.availability-mark.maybe { background: #fff1c4; color: #755800; }.availability-mark.no { background: #fde1de; color: #982a20; }.availability-mark.empty { color: #a1aab8; }
.matrix-key { align-items: center; color: var(--muted); display: flex; flex-wrap: wrap; font-size: .76rem; gap: 6px; margin: 14px 0 0; }
.matrix-key .availability-mark { margin-left: 8px; }.matrix-key .availability-mark:first-child { margin-left: 0; }
.sr-only { height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.admin-auth-panel { margin: 52px auto; max-width: 560px; }.admin-auth-panel h1, .admin-dashboard h1 { font-size: clamp(2.55rem, 6vw, 4.25rem); }
.admin-dashboard { padding: 27px 0; }.admin-dashboard-heading { align-items: start; display: flex; gap: 22px; justify-content: space-between; margin-bottom: 30px; }.admin-dashboard-heading .button-row { justify-content: flex-end; margin-top: 0; }
.admin-poll-list { display: grid; gap: 12px; }.admin-poll-card { align-items: center; border: 1px solid #e1e6ec; border-radius: 13px; display: flex; gap: 18px; justify-content: space-between; padding: 16px; }.admin-poll-card h3 { font-size: 1rem; margin: 0 0 5px; }.admin-poll-card p { color: var(--muted); font-size: .82rem; margin: 0 0 5px; }.admin-poll-card small { color: #7b8797; font-size: .72rem; }.admin-poll-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

@media (max-width: 780px) {
  .site-header { padding: 19px 20px; }.app-shell { padding: 12px 20px 46px; }.hero { grid-template-columns: 1fr; padding-top: 29px; }.hero-card { transform: rotate(0); }.poll-layout { grid-template-columns: 1fr; }.side-stack { position: static; }.slot { grid-template-columns: 1fr 1fr auto; }.slot .slot-label { grid-column: 1 / -1; }.field-grid { grid-template-columns: 1fr; }.admin-responses-heading, .admin-dashboard-heading, .admin-poll-card { align-items: stretch; flex-direction: column; }.admin-dashboard-heading .button-row, .admin-poll-actions { justify-content: flex-start; }
}

@media (max-width: 460px) { .quiet-link { display: none; }.slot { grid-template-columns: 1fr 1fr auto; }.slot input[type="datetime-local"] { font-size: .83rem; padding-inline: 5px; }.option-card { padding: 13px; } }
