:root {
  --ivory: #f3efe5;
  --paper: #faf7ef;
  --ink: #17372d;
  --moss: #335f4b;
  --sage: #9eae96;
  --blush: #d9b8ab;
  --line: rgba(23, 55, 45, 0.22);
  --muted: rgba(23, 55, 45, 0.64);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--ivory);
  font-family: "Manrope", sans-serif;
  font-weight: 400;
}

button,
input,
textarea {
  font: inherit;
}

.button-arrow {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

button,
a,
label {
  -webkit-tap-highlight-color: transparent;
}

.paper-noise {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0.17;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.response-nav {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  padding: 18px max(5vw, 28px);
  border-bottom: 1px solid var(--line);
  background: rgba(250, 247, 239, 0.68);
}

.response-mark {
  color: var(--ink);
  font-family: "Italiana", serif;
  font-size: 24px;
  text-decoration: none;
}

.response-mark span {
  color: var(--blush);
}

.back-link {
  display: inline-flex;
  gap: 12px;
  padding-bottom: 5px;
  border-bottom: 1px solid currentColor;
  color: var(--ink);
  text-decoration: none;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.response-layout {
  display: grid;
  grid-template-columns: minmax(330px, 0.82fr) minmax(520px, 1.18fr);
  background: var(--moss);
}

.response-intro {
  position: sticky;
  top: 0;
  min-height: calc(100vh - 86px);
  align-self: start;
  padding: clamp(90px, 10vw, 150px) max(5vw, 36px);
  color: var(--paper);
  background: var(--moss);
}

.response-intro h1,
.login-panel h1,
.dashboard h1,
.success-panel h2 {
  margin: 0;
  font-family: "Italiana", serif;
  font-weight: 400;
  letter-spacing: 0;
}

.response-intro h1 {
  font-size: clamp(58px, 6.2vw, 96px);
  line-height: 0.92;
}

.intro-copy {
  max-width: 390px;
  margin: 48px 0 0;
  color: rgba(250, 247, 239, 0.72);
  font-size: 14px;
  line-height: 1.9;
}

.intro-copy strong {
  color: var(--paper);
  font-weight: 500;
}

.invitation-note {
  display: grid;
  max-width: 430px;
  margin-top: 58px;
  padding-top: 28px;
  border-top: 1px solid rgba(250, 247, 239, 0.28);
  grid-template-columns: 28px 1fr;
  gap: 16px;
}

.invitation-note span {
  color: var(--blush);
  font-size: 18px;
}

.invitation-note p {
  margin: 0;
  font-size: 12px;
  line-height: 1.8;
}

.response-form {
  padding: clamp(70px, 8vw, 120px) max(6vw, 40px);
  background: var(--paper);
}

.form-section {
  padding: 0 0 clamp(80px, 9vw, 120px);
}

.form-section + .form-section {
  padding-top: clamp(70px, 8vw, 110px);
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  margin-bottom: 56px;
  grid-template-columns: 64px 1fr;
  gap: 18px;
}

.section-heading > span {
  color: var(--sage);
  font-family: "Italiana", serif;
  font-size: 36px;
}

.section-heading h2 {
  margin: 0;
  font-family: "Italiana", serif;
  font-size: clamp(38px, 4vw, 58px);
  font-weight: 400;
  line-height: 1;
}

.guest-row {
  position: relative;
  display: grid;
  margin: 0;
  padding: 0 48px 34px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.guest-row + .guest-row {
  padding-top: 34px;
}

.guest-row legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.guest-row label,
.comment-field,
.login-panel label {
  display: grid;
  gap: 11px;
}

.guest-row label > span,
.comment-field > span,
.login-panel label > span,
.choice-group legend {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  width: 100%;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-family: "Italiana", serif;
  font-size: 25px;
}

input:focus,
textarea:focus {
  border-color: var(--blush);
}

.remove-guest {
  position: absolute;
  right: 0;
  bottom: 38px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 0;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: transparent;
  font-size: 20px;
}

.add-guest {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding: 0 0 6px;
  cursor: pointer;
  border: 0;
  border-bottom: 1px solid currentColor;
  color: var(--ink);
  background: transparent;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.add-guest span {
  font-size: 18px;
  font-weight: 300;
}

.add-guest:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.choice-group {
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-group + .choice-group {
  margin-top: 42px;
}

.choice-group legend {
  margin-bottom: 18px;
}

.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
}

.segmented-control label {
  position: relative;
  cursor: pointer;
}

.segmented-control label + label {
  border-left: 1px solid var(--line);
}

.segmented-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-control span {
  display: grid;
  min-height: 64px;
  place-items: center;
  padding: 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  transition: color 0.2s ease, background 0.2s ease;
}

.segmented-control input:checked + span {
  color: var(--paper);
  background: var(--ink);
}

.segmented-control input:focus-visible + span {
  outline: 2px solid var(--blush);
  outline-offset: -4px;
}

.event-choices {
  margin-top: 42px;
  transition: opacity 0.2s ease;
}

.event-choices.is-disabled {
  opacity: 0.38;
}

.dietary-field {
  margin-bottom: 42px;
}

.photo-field {
  display: flex;
  min-height: 110px;
  align-items: center;
  gap: 22px;
  padding: 22px;
  cursor: pointer;
  border: 1px dashed rgba(23, 55, 45, 0.42);
}

.photo-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.photo-icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 21px;
}

.photo-field strong,
.photo-field small {
  display: block;
}

.photo-field strong {
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 600;
}

.photo-field small,
.comment-field small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 400;
}

.file-name {
  min-height: 20px;
  margin: 9px 0 34px;
  color: var(--muted);
  font-size: 10px;
}

textarea {
  min-height: 150px;
  resize: vertical;
  font-family: "Manrope", sans-serif;
  font-size: 14px;
  line-height: 1.8;
}

textarea::placeholder {
  color: rgba(23, 55, 45, 0.38);
}

.form-footer {
  padding-top: 42px;
  border-top: 1px solid var(--line);
}

.submit-button {
  display: flex;
  width: 100%;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 24px;
  cursor: pointer;
  border: 1px solid var(--ink);
  color: var(--paper);
  background: var(--ink);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 0.2s ease, background 0.2s ease;
}

.submit-button:hover:not(:disabled) {
  color: var(--ink);
  background: transparent;
}

.submit-button:disabled {
  opacity: 0.58;
  cursor: wait;
}

.form-footer > p:last-child {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.form-error {
  min-height: 20px;
  margin: 0 0 14px;
  color: #8a3f42;
  font-size: 11px;
  line-height: 1.6;
}

.honeypot {
  position: absolute;
  left: -9999px;
}

.success-panel {
  width: min(680px, calc(100% - 48px));
  margin: 15vh auto;
  padding: clamp(54px, 8vw, 90px);
  border: 1px solid var(--line);
  background: var(--paper);
  text-align: center;
}

.success-panel > span {
  display: block;
  margin-bottom: 28px;
  color: var(--blush);
  font-size: 24px;
}

.success-panel h2 {
  font-size: clamp(48px, 7vw, 82px);
}

.success-panel > p:not(.eyebrow) {
  margin: 26px auto 36px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.success-panel a,
.photo-link {
  display: inline-flex;
  padding-bottom: 6px;
  border: 0;
  border-bottom: 1px solid currentColor;
  color: var(--ink);
  background: transparent;
  text-decoration: none;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.admin-body {
  min-height: 100vh;
  background: var(--paper);
}

.admin-shell {
  min-height: 100vh;
}

.login-panel {
  width: min(540px, calc(100% - 40px));
  margin: 0 auto;
  padding: 10vh 0;
}

.login-panel .response-mark {
  display: inline-block;
  margin-bottom: 13vh;
}

.login-panel h1,
.dashboard h1 {
  font-size: clamp(58px, 7vw, 96px);
  line-height: 0.92;
}

.login-panel form {
  display: grid;
  gap: 32px;
  margin-top: 60px;
}

.login-panel .submit-button {
  margin-top: 18px;
}

.dashboard {
  padding: clamp(50px, 7vw, 100px) max(5vw, 28px);
}

.dashboard-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line);
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dashboard-actions button {
  padding: 12px 14px;
  cursor: pointer;
  border: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-bottom: 1px solid var(--line);
}

.stats > div {
  display: grid;
  min-height: 150px;
  align-content: center;
  padding: 24px;
  border-right: 1px solid var(--line);
}

.stats > div:last-child {
  border-right: 0;
}

.stats strong {
  font-family: "Italiana", serif;
  font-size: 48px;
  font-weight: 400;
}

.stats span {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.responses-list article {
  padding: 48px 0;
  border-bottom: 1px solid var(--line);
}

.responses-list article > header {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 24px;
}

.responses-list article > header > span {
  color: var(--sage);
  font-family: "Italiana", serif;
  font-size: 32px;
}

.responses-list h2 {
  margin: 0;
  font-family: "Italiana", serif;
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 400;
}

.responses-list header p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.response-answers {
  display: grid;
  margin: 34px 0 0 82px;
  grid-template-columns: repeat(4, minmax(120px, 190px));
  gap: 14px;
}

.response-answers > div {
  display: grid;
  gap: 7px;
  padding: 16px;
  border: 1px solid var(--line);
}

.response-answers span {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.response-answers strong {
  font-size: 12px;
  font-weight: 600;
}

.answer-no {
  color: #8a3f42;
}

.response-comment {
  max-width: 720px;
  margin: 30px 0 24px 82px;
  color: var(--muted);
  font-family: "Italiana", serif;
  font-size: 22px;
  line-height: 1.5;
}

.photo-link {
  margin-left: 82px;
  cursor: pointer;
}

.empty-state {
  padding: 80px 0;
  color: var(--muted);
  font-family: "Italiana", serif;
  font-size: 30px;
  text-align: center;
}

[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .response-layout {
    grid-template-columns: 1fr;
  }

  .response-intro {
    position: static;
    min-height: auto;
    padding-block: 90px;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .stats > div:nth-child(even) {
    border-right: 0;
  }

  .stats > div:nth-child(-n + 4) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 560px) {
  .response-nav {
    min-height: 72px;
    padding-inline: 20px;
  }

  .back-link {
    font-size: 8px;
  }

  .response-intro {
    padding: 82px 24px;
  }

  .response-intro h1 {
    font-size: clamp(52px, 15vw, 66px);
  }

  .intro-copy {
    margin-top: 34px;
  }

  .invitation-note {
    margin-top: 42px;
  }

  .response-form {
    padding: 74px 24px 90px;
  }

  .form-section {
    padding-bottom: 76px;
  }

  .form-section + .form-section {
    padding-top: 72px;
  }

  .section-heading {
    margin-bottom: 44px;
    grid-template-columns: 46px 1fr;
    gap: 10px;
  }

  .section-heading > span {
    font-size: 28px;
  }

  .section-heading h2 {
    font-size: 38px;
  }

  .guest-row {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .segmented-control span {
    min-height: 70px;
    padding-inline: 10px;
    font-size: 9px;
  }

  .photo-field {
    align-items: flex-start;
    padding: 20px 16px;
  }

  .dashboard {
    padding-inline: 20px;
  }

  .dashboard-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-actions {
    width: 100%;
  }

  .dashboard-actions button {
    flex: 1 1 120px;
  }

  .stats > div {
    min-height: 120px;
    padding: 16px;
  }

  .response-answers {
    margin-left: 0;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .response-answers > div {
    padding: 11px 8px;
  }

  .response-comment,
  .photo-link {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}