:root {
  --cream: #F6EFE0;
  --mustard: #E3A72F;
  --teal: #1F7A78;
  --teal-dark: #155957;
  --ink: #1E1B18;
  --terracotta: #C8553D;
  --muted: #8A8378;
  --sand: #EFE4C8;
  --line: #D9CFB8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Work Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
}

a {
  color: var(--teal);
}

a:hover {
  color: var(--teal-dark);
}

p {
  margin: 0;
}

.slab {
  font-family: 'Alfa Slab One', 'Rockwell', Georgia, serif;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.script {
  font-family: 'Yellowtail', 'Brush Script MT', cursive;
  font-weight: 400;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
}

.muted {
  color: var(--muted);
}

/* ---------- invite ---------- */

.page {
  max-width: 430px;
  margin: 0 auto;
  background: var(--cream);
  overflow: hidden;
}

.hero {
  position: relative;
  background: var(--mustard);
  padding: 56px 28px 44px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}

.hero-small {
  padding: 44px 28px 36px;
}

.starburst {
  position: absolute;
  top: -70px;
  right: -70px;
  opacity: 0.9;
}

.hero-names {
  margin: 0;
  font-size: 64px;
  line-height: 1;
  font-weight: 400;
}

.hero-date {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.hero-day,
.hero-year {
  font-size: 44px;
  line-height: 1;
}

.hero-year {
  color: var(--cream);
}

.hero-venue {
  font-size: 16px;
  font-weight: 500;
}

.stripe {
  display: flex;
  height: 10px;
}

.stripe span {
  flex-grow: 1;
}

.stripe span:nth-child(1) { background: var(--ink); }
.stripe span:nth-child(2) { background: var(--teal); }
.stripe span:nth-child(3) { background: var(--mustard); }
.stripe span:nth-child(4) { background: var(--terracotta); }

.section {
  padding: 28px 28px 8px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.welcome {
  padding-top: 36px;
  gap: 12px;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-head h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.1;
}

.facts {
  display: flex;
  flex-direction: column;
  gap: 4px;
  line-height: 1.5;
}

.facts div:first-child {
  font-weight: 600;
}

.map-link {
  font-weight: 600;
  margin-top: 6px;
  text-decoration: none;
}

.program-row {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 2px solid var(--ink);
}

.program-row:last-child {
  border-bottom: 0;
}

.program-time {
  width: 64px;
  flex-shrink: 0;
  font-size: 18px;
}

.knytkalas {
  margin: 28px 20px 8px;
  padding: 28px 24px;
  background: var(--teal);
  color: var(--cream);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transform: rotate(-1deg);
}

.knytkalas-eyebrow {
  color: var(--mustard);
}

.knytkalas-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.05;
}

.knytkalas p {
  line-height: 1.5;
}

.knytkalas-note {
  font-size: 15px;
  opacity: 0.85;
}

/* ---------- rsvp ---------- */

.rsvp {
  margin-top: 32px;
  background: var(--ink);
  color: var(--cream);
  padding: 36px 28px 44px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rsvp-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rsvp-eyebrow {
  color: var(--mustard);
}

.rsvp-title {
  margin: 0;
  font-size: 34px;
  line-height: 1.05;
}

.rsvp-note {
  font-size: 15px;
  opacity: 0.8;
}

.rsvp-nolink {
  font-size: 17px;
  opacity: 0.85;
}

.notice {
  padding: 12px 14px;
  border: 2px solid var(--cream);
  font-size: 15px;
  font-weight: 500;
}

.notice-ok {
  background: var(--mustard);
  border-color: var(--mustard);
  color: var(--ink);
}

.notice-error {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: var(--cream);
}

.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.person {
  margin: 0;
  border: 0;
  padding: 16px;
  background: var(--cream);
  color: var(--ink);
}

/* Float lifts the legend out of the fieldset's border slot, where it would
   straddle the top edge of the card. */
.person-name {
  float: left;
  width: 100%;
  padding: 0;
  margin-bottom: 12px;
  font-size: 20px;
}

.choice {
  display: flex;
  gap: 8px;
  clear: both;
  margin-bottom: 12px;
}

.choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.choice label {
  flex-grow: 1;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink);
  background: transparent;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}

.choice input:checked + label {
  background: var(--mustard);
}

.choice input:focus-visible + label {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

.diet,
.message textarea {
  font-family: inherit;
  font-size: 15px;
  border: 2px solid var(--ink);
  border-radius: 0;
}

.diet {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 12px;
  background: #FFFFFF;
  color: var(--ink);
}

.dessert {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
}

.dessert input {
  appearance: none;
  width: 28px;
  height: 28px;
  margin: 0;
  flex-shrink: 0;
  border: 2px solid var(--cream);
  background: transparent;
  cursor: pointer;
}

.dessert input:checked {
  background: var(--mustard);
}

.dessert input:checked::after {
  content: "";
  display: block;
  width: 14px;
  height: 7px;
  margin: 5px auto 0;
  border-left: 2.5px solid var(--ink);
  border-bottom: 2.5px solid var(--ink);
  transform: rotate(-45deg);
}

.dessert input:focus-visible {
  outline: 3px solid var(--mustard);
  outline-offset: 2px;
}

.message {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.message label {
  font-size: 14px;
  font-weight: 600;
  opacity: 0.85;
}

.message textarea {
  min-height: 88px;
  padding: 12px;
  border-color: var(--cream);
  background: transparent;
  color: var(--cream);
}

.message textarea::placeholder {
  color: var(--cream);
  opacity: 0.6;
}

.submit {
  height: 56px;
  border: 0;
  border-radius: 0;
  background: var(--mustard);
  color: var(--ink);
  font-family: inherit;
  font-weight: 600;
  font-size: 18px;
  margin-top: 4px;
  cursor: pointer;
}

.submit:hover {
  background: #D0942A;
}

.footer {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  text-align: center;
}

.footer-script {
  font-size: 34px;
  color: var(--teal);
}

.footer p:last-child {
  font-size: 15px;
}

/* ---------- admin ---------- */

.admin-head {
  background: var(--mustard);
  padding: 28px 48px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-head h1 {
  margin: 4px 0 0;
  font-size: 34px;
  line-height: 1;
}

.admin-updated {
  font-size: 14px;
  font-weight: 500;
}

.admin .stripe {
  height: 8px;
}

.admin-body {
  padding: 32px 48px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.tile {
  border: 2px solid var(--ink);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tile-mustard {
  background: var(--mustard);
}

.tile-teal {
  background: var(--teal);
  color: var(--cream);
}

.tile-value {
  font-size: 36px;
  line-height: 1;
}

.table-frame {
  border: 2px solid var(--ink);
  overflow-x: auto;
}

.admin table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
}

.admin th {
  text-align: left;
  padding: 12px 14px;
  background: var(--ink);
  color: var(--cream);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.col-name { width: 22%; }
.col-attending { width: 12%; }
.col-diet { width: 24%; }
.col-dessert { width: 10%; }
.col-message { width: 22%; }
.col-updated { width: 10%; }

.household td {
  background: var(--sand);
  font-weight: 600;
}

.household .code {
  font-weight: 400;
  color: var(--muted);
}

.household .message-cell,
.household .updated-cell {
  font-weight: 400;
}

.admin .person-cell {
  padding-left: 32px;
}

.pill {
  display: inline-block;
  padding: 3px 10px;
  border: 2px solid var(--ink);
  font-weight: 600;
  font-size: 13px;
}

.pill-yes {
  background: var(--mustard);
}

.pill-no {
  background: transparent;
}

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

@media (max-width: 600px) {
  .admin-head,
  .admin-body {
    padding-left: 20px;
    padding-right: 20px;
  }
}
