:root {
  color-scheme: light;
  --ink: #28342c;
  --ink-soft: #514f43;
  --muted: #7b7466;
  --green: #31543d;
  --green-dark: #243f2e;
  --cranberry: #9b403d;
  --cranberry-dark: #79312f;
  --lime: #d9dfc5;
  --paper: #f4eddd;
  --card: #fffaf0;
  --line: #e3d9c6;
  --gold: #a97b3e;
  --danger: #923b36;
  --shadow: 0 9px 24px rgba(65, 49, 29, .075);
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: 'Avenir Next', Avenir, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  background:
    radial-gradient(ellipse at 50% -18%, rgba(255, 252, 244, .95), transparent 42rem),
    var(--paper);
}

body::before {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--green) 0 48%, var(--gold) 48% 52%, var(--cranberry) 52% 100%);
  content: "";
  pointer-events: none;
}

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

.site-header {
  width: min(1160px, calc(100% - 56px));
  height: 86px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px dashed rgba(95, 78, 52, .25);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.04em;
}

.brand-mark {
  position: relative;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 2px solid #e6d7b9;
  border-radius: 50%;
  background: var(--cranberry);
  color: white;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 19px;
  font-weight: 600;
  box-shadow: inset 0 0 0 2px var(--cranberry), 0 2px 4px rgba(65, 49, 29, .14);
}

.brand-mark::after {
  position: absolute;
  top: -7px;
  left: calc(50% - 1px);
  width: 2px;
  height: 6px;
  background: var(--gold);
  content: "";
}

.header-note { color: var(--muted); font-size: 12px; letter-spacing: .015em; }

.language-nav { display: flex; align-items: center; gap: 4px; }
.language-nav a {
  padding: 6px 7px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
}
.language-nav a:hover, .language-nav a[aria-current="true"] { background: #e8dfcc; color: var(--cranberry-dark); }

main { width: min(1160px, calc(100% - 56px)); margin: 0 auto; padding: 62px 0 88px; }

.hero { display: grid; grid-template-columns: 1.08fr .82fr; align-items: center; gap: clamp(46px, 8vw, 116px); }

.hero-copy { padding: 4px 0 12px; }

.hero-copy::after {
  position: absolute;
  top: -18px;
  right: 12%;
  color: rgba(169, 123, 62, .32);
  content: "✦";
  font-family: Georgia, serif;
  font-size: 48px;
  transform: rotate(12deg);
  pointer-events: none;
}

.hero-copy { position: relative; }

.eyebrow {
  margin: 0 0 13px;
  color: var(--cranberry);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .11em;
  line-height: 1.4;
  text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }

h1 {
  margin-bottom: 20px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(42px, 6vw, 67px);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: 1.06;
}

h1 em { color: var(--green); font-weight: 500; }

h2 { margin-bottom: 8px; font-family: Georgia, 'Times New Roman', serif; font-size: 24px; font-weight: 600; letter-spacing: -.025em; line-height: 1.25; }

.lede { max-width: 570px; margin-bottom: 0; color: var(--ink-soft); font-size: 17px; line-height: 1.65; }

.steps { display: flex; gap: 28px; margin-top: 48px; }
.steps > div { display: flex; gap: 10px; align-items: flex-start; }
.steps span { color: var(--cranberry); font-family: Georgia, 'Times New Roman', serif; font-size: 14px; }
.steps p { max-width: 110px; margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.45; }

.card {
  border: 1px solid var(--line);
  border-radius: 9px 15px 8px 13px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.create-card { position: relative; padding: 34px; border-top: 4px solid var(--green); }
.create-card > .muted { margin-bottom: 25px; }
.muted { color: var(--muted); font-size: 13px; }

form { display: flex; flex-direction: column; }

label { margin: 0 0 7px; color: var(--ink); font-size: 12px; font-weight: 700; }
label:not(:first-child) { margin-top: 18px; }

input, textarea {
  width: 100%;
  min-height: 47px;
  border: 1px solid #d9cfbc;
  border-radius: 5px;
  outline: none;
  background: #fffdf7;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

input { padding: 0 13px; }
textarea { min-height: 88px; padding: 11px 13px; resize: vertical; }
input[type="checkbox"] { width: 16px; min-height: 16px; height: 16px; flex: 0 0 16px; margin: 0 4px 0 0; padding: 0; accent-color: var(--green); }
input:focus, textarea:focus { border-color: #71886f; box-shadow: 0 0 0 3px rgba(81, 109, 75, .13); }
input::placeholder, textarea::placeholder { color: #a49b89; }
.datetime-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.datetime-fields > div { min-width: 0; }
.datetime-fields label { display: block; }
.datetime-fields input { width: 100%; min-width: 0; min-height: 54px; padding: 0 10px; font-size: 16px; font-variant-numeric: tabular-nums; }

.field-hint { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.optional { margin-left: 4px; color: var(--muted); font-size: 11px; font-weight: 400; }

.button {
  min-height: 49px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 25px;
  padding: 0 18px;
  border: 0;
  border: 1px solid rgba(24, 35, 25, .16);
  border-radius: 5px;
  background: var(--green);
  color: white;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 2px 0 var(--green-dark);
  transition: background .15s ease, transform .15s ease;
}

.button:hover { background: var(--green-dark); transform: translateY(-1px); }
.button:active { transform: translateY(1px); box-shadow: none; }
.button:focus-visible, a:focus-visible { outline: 3px solid #a7c69b; outline-offset: 3px; }
.button-small { min-height: 43px; flex: 0 0 auto; margin: 0; padding: 0 16px; font-size: 12px; }
.button-muted { border-color: #d6ceb9; background: #eee7d7; color: var(--green); box-shadow: 0 2px 0 #cfc5ac; }
.button-muted:hover { background: #e4dac4; }

.note-row { display: flex; align-items: center; gap: 15px; max-width: 690px; margin: 40px auto 0; padding: 18px 23px; border: 1px solid var(--line); border-left: 4px solid var(--cranberry); border-radius: 3px 10px 10px 3px; background: rgba(255, 250, 240, .68); }
.note-row p { margin: 0; color: var(--ink-soft); font-size: 12px; }
.note-icon { color: var(--gold); font-size: 19px; }
.saved-groups { margin-top: 40px; padding: 26px 28px; }
.saved-groups .section-heading { margin-bottom: 15px; }
.saved-groups .section-heading h2 { margin: 0; }
.saved-group-list { display: grid; gap: 10px; }
.saved-group-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 5px 10px 6px 9px; background: #fffdf7; }
.saved-group-card strong { min-width: 0; overflow-wrap: anywhere; }
.saved-group-card .button { text-decoration: none; }

.narrow { width: min(670px, 100%); margin: 0 auto; }
.narrow > .eyebrow { margin-top: 7px; }
.narrow h1 { font-size: clamp(39px, 6vw, 57px); }
.narrow .lede { margin-bottom: 27px; }
.link-card { margin-top: 18px; padding: 22px; }
.secondary-card { box-shadow: none; background: #f8f2e5; }
.link-card label { display: block; }
.copy-row { display: flex; gap: 9px; align-items: stretch; }
.copy-row input { min-width: 0; color: var(--ink-soft); background: #fbfcf9; font-size: 12px; }
.link-card .field-hint { margin-top: 9px; }
.back-link { margin-top: 25px; font-size: 13px; }
.back-link a, .text-link { font-weight: 700; text-decoration: none; }
.back-link a:hover, .text-link:hover { text-decoration: underline; }

.form-card { padding: 30px 34px 34px; }
.form-card .button { width: 100%; }
.form-error { margin: 0 0 16px; padding: 11px 13px; border: 1px solid #e7c8bd; border-radius: 4px; background: #f8e9e2; color: var(--danger); font-size: 12px; }
.state-card { margin-top: 38px; padding: 38px; border-top: 3px solid var(--cranberry); }
.state-card .lede { margin-bottom: 21px; }
.state-card .text-link { display: inline-block; margin-top: 6px; }

.dashboard-head { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin: 4px 0 26px; }
.dashboard-head h1 { margin-bottom: 13px; font-size: clamp(39px, 5vw, 56px); }
.dashboard-head .muted { margin: 8px 0 0; }
.status-pill { display: inline-flex; align-items: center; min-height: 26px; padding: 3px 10px; border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.status-open { background: #e4ead8; color: #31543d; }
.status-warn { background: #f2e3c9; color: #805b2c; }
.status-done { background: #dfe9df; color: #31543d; }
.participant-count { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100px; height: 100px; flex: 0 0 auto; border: 1px solid #d7c8a9; border-radius: 50%; background: #f8f0dd; box-shadow: inset 0 0 0 5px rgba(255, 250, 240, .6); }
.participant-count strong { color: var(--cranberry); font-family: Georgia, 'Times New Roman', serif; font-size: 31px; font-weight: 500; line-height: 1.1; }
.participant-count span { color: var(--muted); font-size: 9px; }
.dashboard-card { margin-top: 16px; padding: 27px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 17px; }
.section-heading .eyebrow { margin-bottom: 7px; }
.section-heading h2 { margin: 0; }
.section-heading > .muted { margin: 0 0 2px; text-align: right; }
.dashboard-card .field-hint { margin-top: 9px; }
.notice { margin: 0 0 18px; padding: 13px 15px; border: 1px solid #e5dfca; border-radius: 9px; background: #faf7ed; color: #665c41; font-size: 12px; }
.delivery-error { margin: 6px 0 0; color: var(--danger); overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 11px 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
td { max-width: 250px; padding: 13px 12px; border-bottom: 1px solid #eff0eb; color: var(--ink-soft); font-size: 12px; vertical-align: top; overflow-wrap: anywhere; }
tr:last-child td { border-bottom: 0; }
td strong { display: block; color: var(--ink); font-size: 13px; }
.table-sub { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.empty-state { padding: 30px 15px; text-align: center; }
.empty-state > span { color: var(--gold); font-size: 22px; }
.empty-state p { margin: 5px 0 0; font-size: 13px; }
.empty-state .muted { font-size: 12px; }

.budget-banner { margin: 16px 0 22px; padding: 13px 16px; border: 1px solid #d3ddc7; border-left: 4px solid var(--green); border-radius: 3px 8px 8px 3px; background: #edf0e3; color: var(--ink-soft); font-size: 13px; }
.budget-banner strong { color: var(--green); }
.check-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcf9; }
.check-option { display: flex; align-items: center; gap: 5px; min-height: 30px; margin: 0 !important; color: var(--ink-soft); font-size: 12px; font-weight: 500; }
.participant-list { display: grid; gap: 12px; }
.participant-card { padding: 19px; border: 1px solid var(--line); border-radius: 5px 11px 6px 10px; background: #fffaf0; }
.participant-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.participant-card-head strong { display: block; font-size: 14px; }
.participant-view-status { flex: 0 0 auto; text-align: right; }
.participant-card .personal-copy { margin-bottom: 14px; }
.confirmation-resend { margin: 0 0 14px; }
.participant-details { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; padding: 12px 0; border-top: 1px solid #eff0eb; }
.participant-details strong, .preference strong { color: var(--muted); font-size: 10px; letter-spacing: .07em; text-transform: uppercase; }
.participant-details p, .preference p { margin: 4px 0 0; color: var(--ink-soft); font-size: 12px; overflow-wrap: anywhere; }
.participant-edit { padding-top: 7px; border-top: 1px solid #eff0eb; }
.participant-edit summary { padding: 7px 0; color: var(--green); cursor: pointer; font-size: 12px; font-weight: 700; }
.participant-edit form { padding: 8px 0; }
.participant-edit .button { align-self: flex-start; }
.text-button { padding: 8px 0; border: 0; background: transparent; color: var(--green); cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; }
.danger-text { color: var(--danger); }
.settings-form { max-width: 540px; }
.settings-form .button { align-self: flex-start; }
.action-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.action-row form { display: inline-flex; }
.action-row .button { margin-top: 0; }
.lifecycle-card { display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.lifecycle-card .muted { max-width: 570px; margin-bottom: 0; }
.lifecycle-card .action-row { justify-content: flex-end; }
.result-card h1 { margin-bottom: 13px; }
.preference-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin: 20px 0; }
.preference { padding: 14px; border: 1px solid var(--line); border-radius: 4px 8px 5px 7px; background: #f8f3e8; }
.wish-update { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.wish-update .button { margin-top: 12px; }

.legal-page { max-width: 760px; }
.legal-page h1 { font-size: clamp(39px, 6vw, 57px); }
.legal-content { margin-top: 30px; }
.legal-content h2 { margin: 28px 0 9px; font-size: 21px; }
.legal-content p, .legal-content li { color: var(--ink-soft); font-size: 14px; }
.legal-content p { margin-bottom: 13px; }
.legal-content a { overflow-wrap: anywhere; }

.flash { width: min(1160px, calc(100% - 56px)); margin: 16px auto 0; padding: 12px 15px; border: 1px solid #d2dcc5; border-radius: 4px; background: #e8ecdc; color: #31543d; font-size: 13px; }
footer { width: min(1160px, calc(100% - 56px)); margin: 0 auto; padding: 22px 0 28px; border-top: 1px dashed rgba(95, 78, 52, .25); color: var(--muted); font-size: 11px; display: flex; align-items: center; justify-content: space-between; gap: 14px 24px; flex-wrap: wrap; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-links a { color: var(--green); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-credit { margin-left: auto; }
.footer-credit span { margin-left: 14px; }

@media (max-width: 780px) {
  .site-header, main, footer { width: min(100% - 36px, 560px); }
  .site-header { height: 72px; }
  main { padding: 42px 0 60px; }
  .hero { grid-template-columns: 1fr; gap: 30px; }
  .hero-copy { padding: 0; }
  .steps { margin-top: 28px; gap: 17px; }
  .create-card { padding: 27px; }
  .note-row { margin-top: 24px; }
  .saved-groups { margin-top: 24px; padding: 21px; }
  .flash { width: min(100% - 36px, 560px); }
  .dashboard-card { padding: 20px; }
  .dashboard-head { align-items: flex-start; }
  .participant-count { width: 78px; height: 78px; margin-top: 22px; }
  .participant-count strong { font-size: 27px; }
}

@media (max-width: 480px) {
  .header-note { display: none; }
  .language-nav { gap: 1px; }
  .language-nav a { padding: 6px 5px; font-size: 9px; }
  h1 { font-size: 43px; }
  .steps { flex-direction: column; gap: 11px; }
  .steps p { max-width: none; }
  .copy-row { flex-direction: column; }
  .copy-row .button { width: 100%; }
  .saved-group-card { align-items: stretch; flex-direction: column; }
  .saved-group-card .button { width: 100%; }
  .form-card, .state-card { padding: 24px; }
  .dashboard-head { gap: 12px; }
  .participant-count { width: 66px; height: 66px; }
  .participant-count span { font-size: 8px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .section-heading > .muted { text-align: left; }
  .participant-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lifecycle-card { align-items: stretch; flex-direction: column; }
  .preference-grid { grid-template-columns: 1fr; }
  .datetime-fields { grid-template-columns: 1fr; gap: 10px; }
  .datetime-fields input { min-height: 56px; }
  footer { align-items: flex-start; flex-direction: column; }
  .footer-credit { margin-left: 0; }
  .footer-credit span { display: block; margin: 2px 0 0; }
}
