:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f7f7f7;
  --ink: #303035;
  --muted: #a6a6aa;
  --line: #d8d8d8;
  --accent: #00658b;
  --accent-strong: #42465d;
  --gold: #d6a93c;
  --pink: #c44f6a;
  --sage: #3f7768;
  --shadow: 0 10px 30px rgba(48, 48, 53, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Avenir Next", "Montserrat", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  line-height: 1.45;
}

a {
  color: inherit;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1236px;
  margin: 0 auto;
  padding: 54px 0 56px;
  border-bottom: 0;
  background: #fff;
  backdrop-filter: none;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
}

.brand-mark {
  width: 46px;
  height: 34px;
  flex: 0 0 auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 38px;
  margin-left: auto;
}

.nav a {
  color: var(--accent);
  font-size: 1.05rem;
  font-weight: 800;
  text-decoration: none;
}

.nav .plan-link {
  margin-left: 270px;
  color: #aaa;
  font-size: 0.86rem;
  letter-spacing: 0.5em;
  text-transform: none;
}

.page {
  width: min(1236px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 56px;
}

.hero {
  position: relative;
  display: grid;
  min-height: 557px;
  align-items: center;
  overflow: hidden;
  padding: 72px 16%;
  background: #211e1c;
  color: #cfcfd1;
}

.home-page .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.18)),
    url("davenport-hero.png") center / cover no-repeat;
  filter: blur(1.2px) brightness(0.82);
  transform: scale(1.02);
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: start;
}

.hero h1,
.card-title-row h1,
.panel h1 {
  margin: 0;
  font-family: "Avenir Next", "Montserrat", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  font-size: clamp(2.5rem, 5.1vw, 4.7rem);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero p {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.eyebrow {
  margin: 0 0 10px;
  color: inherit;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.hero-rule {
  width: 124px;
  height: 13px;
  margin: 6px 0 24px;
  background: #fff;
}

.hero-button {
  justify-self: center;
  min-width: 200px;
  border-color: #fff;
  background: #fff;
  color: #aaa;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.hero-arrow {
  justify-self: center;
  width: 30px;
  height: 30px;
  margin-top: 34px;
  border-right: 5px solid #fff;
  border-bottom: 5px solid #fff;
  transform: rotate(45deg);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--accent);
  border-radius: 0;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--accent-strong);
}

.button-secondary {
  background: #fff;
  color: var(--accent-strong);
}

.button-secondary:hover {
  background: var(--surface-soft);
}

.button-secondary.is-selected {
  background: var(--surface-soft);
  border-color: var(--accent-strong);
}

.button-small {
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.92rem;
}

.button-outline {
  border: 6px solid #333;
  background: #fff;
  color: #aaa;
  font-size: 1.05rem;
}

.button-shadow {
  min-width: 410px;
  min-height: 86px;
  border: 4px solid var(--accent-strong);
  background: #fff;
  color: var(--accent-strong);
  box-shadow: 10px 10px 0 var(--accent-strong);
  font-size: 1.2rem;
  letter-spacing: 0.35em;
}

.toolbar,
.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.hero-mark {
  width: 132px;
  height: 96px;
  filter: drop-shadow(0 14px 24px rgba(20, 52, 138, 0.14));
}

.guest-section {
  display: grid;
  grid-template-columns: 34% minmax(0, 1fr);
  gap: 78px;
  min-height: 540px;
  align-items: start;
  padding: 56px 64px 84px;
}

.guest-section h2 {
  margin: 48px 0 0;
  color: var(--accent);
  font-size: clamp(3rem, 4.2vw, 4.1rem);
  line-height: 1.3;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.guest-section h3 {
  margin: 0 0 22px;
  color: var(--accent);
  font-size: 2rem;
  line-height: 1.1;
}

.guest-section p {
  max-width: 650px;
  margin: 0 0 24px;
  color: var(--accent-strong);
  font-size: 1.55rem;
  line-height: 1.55;
}

.nana-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.nana-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(20, 52, 138, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent-strong);
  font-size: 0.88rem;
  font-weight: 650;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

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

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.85fr);
  gap: 20px;
}

.panel {
  background: var(--surface);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: clamp(18px, 3vw, 28px);
}

.suggestion-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px 18px;
  padding: 16px;
  border: 1px solid rgba(20, 52, 138, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(20, 52, 138, 0.08), rgba(214, 169, 60, 0.1)),
    #fff;
}

.suggestion-panel h2,
.suggestion-panel p {
  margin: 0;
}

.suggestion-panel h2 {
  font-size: 1.25rem;
}

.suggestion-panel .eyebrow {
  margin-bottom: 4px;
}

.suggestion-panel p {
  color: var(--muted);
}

.suggestion-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.suggestion-output {
  grid-column: 1 / -1;
  min-height: 28px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent-strong);
  font-weight: 650;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(20, 52, 138, 0.2);
  border-radius: 8px;
  background: #fff;
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--accent);
  background: var(--surface-soft);
}

.panel.narrow {
  max-width: 680px;
  margin: 28px auto;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-heading h2,
.section-heading h1 {
  margin: 0;
  color: #aaa;
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--accent-strong);
  font-size: 0.88rem;
  font-weight: 700;
}

.card-list,
.activity-list {
  display: grid;
  gap: 10px;
}

.card-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
}

.giving-section {
  margin-top: 48px;
}

.giving-section img {
  display: block;
  width: 100%;
  max-height: 680px;
  object-fit: cover;
}

.giving-copy {
  display: grid;
  justify-items: center;
  gap: 20px;
  padding: 84px 8% 110px;
  text-align: center;
}

.giving-icon {
  color: var(--accent-strong);
  font-size: 4rem;
  line-height: 1;
}

.giving-copy blockquote {
  max-width: 960px;
  margin: 0;
  color: #2f2f33;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  font-weight: 800;
  line-height: 1.45;
}

.giving-copy p {
  margin: 0 0 54px;
  font-size: 1.1rem;
}

.card-row:hover {
  border-color: var(--accent);
}

.card-row strong,
.card-row small {
  display: block;
}

.card-row small {
  margin-top: 4px;
  color: var(--muted);
}

.card-meta {
  display: grid;
  gap: 4px;
  min-width: 150px;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: right;
}

.activity-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.activity-item:last-child {
  border-bottom: 0;
}

.activity-item p {
  margin: 0 0 4px;
}

.activity-item time {
  color: var(--muted);
  font-size: 0.86rem;
}

.empty {
  margin: 0;
  color: var(--muted);
}

.stack-form {
  display: grid;
  gap: 18px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

label span {
  display: block;
  margin-bottom: 7px;
  font-weight: 650;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

input {
  height: 44px;
  padding: 0 12px;
}

textarea {
  resize: vertical;
  min-height: 86px;
  padding: 10px 12px;
}

input:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(22, 115, 95, 0.24);
  outline-offset: 2px;
}

.square-field-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.square-field {
  min-width: 0;
}

.square-field span {
  font-size: 0.82rem;
}

.square-field-free input {
  background: var(--surface-soft);
  font-weight: 700;
  text-align: center;
}

.square-image-input {
  height: auto;
  margin-top: 8px;
  padding: 8px;
  font-size: 0.82rem;
}

.square-image-preview {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

.notice {
  margin: 0 0 16px;
  padding: 13px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.notice ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.notice-error {
  border-color: #d9435f;
  background: #fff4f6;
}

.notice-success {
  border-color: #9dd3c7;
  background: #effaf7;
}

.card-shell {
  display: grid;
  gap: 20px;
}

.card-actions {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.bingo-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
}

.bingo-square {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
  padding: clamp(8px, 1.7vw, 16px);
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: clamp(0.76rem, 1.7vw, 1.05rem);
  font-weight: 650;
  line-height: 1.12;
  text-align: center;
  overflow-wrap: anywhere;
}

.bingo-square-image {
  width: 100%;
  max-height: 58%;
  object-fit: cover;
  border-radius: 6px;
}

.bingo-square span {
  display: block;
}

button.bingo-square {
  cursor: pointer;
}

button.bingo-square:hover {
  border-color: var(--accent);
}

.bingo-square.is-free {
  background: #fff8de;
  border-color: var(--gold);
}

.bingo-square.is-marked {
  background: var(--accent);
  border-color: var(--accent-strong);
  color: #fff;
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.2);
}

.bingo-square.is-marked.is-free {
  background: var(--sage);
  border-color: #2a5a4d;
}

.bingo-celebration {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 23, 39, 0.32);
  backdrop-filter: blur(10px);
}

.bingo-celebration-panel {
  width: min(100%, 420px);
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  text-align: center;
}

.bingo-celebration-panel h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1;
}

.bingo-celebration-panel p:not(.eyebrow) {
  margin: 12px 0 18px;
  color: var(--muted);
}

body.is-blessed .brand-mark,
body.is-blessed .hero-mark {
  animation: blessing-pulse 1.2s ease;
}

@keyframes blessing-pulse {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

.controls-panel details {
  margin-top: 12px;
}

.controls-panel summary {
  cursor: pointer;
  font-weight: 700;
}

.unlock-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  max-width: 560px;
}

.setup-list {
  padding-left: 20px;
}

.site-footer {
  margin: 28px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

code {
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--surface-soft);
}

@media (max-width: 820px) {
  .site-header {
    position: static;
    width: min(100% - 28px, 1236px);
    padding: 28px 0 26px;
  }

  .brand {
    font-size: 0.72rem;
  }

  .nav {
    flex-wrap: wrap;
    gap: 16px 22px;
    margin-left: 0;
  }

  .nav .plan-link {
    margin-left: 0;
    letter-spacing: 0.28em;
  }

  .home-page .hero {
    min-height: 540px;
    padding: 48px 28px;
    background-position: center;
  }

  .hero h1,
  .card-title-row h1,
  .panel h1 {
    font-size: clamp(2.2rem, 10vw, 3.9rem);
    letter-spacing: 0.08em;
  }

  .hero-button {
    justify-self: start;
  }

  .hero-arrow {
    justify-self: start;
    margin-left: 78px;
  }

  .guest-section {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 26px;
    padding: 46px 28px 58px;
  }

  .guest-section h2 {
    margin: 0;
    font-size: 3rem;
  }

  .guest-section p {
    font-size: 1.16rem;
  }

  .giving-copy {
    padding: 58px 24px 76px;
  }

  .giving-copy blockquote {
    font-size: clamp(2rem, 10vw, 3.4rem);
  }

  .button-shadow {
    min-width: min(100%, 330px);
  }

  .hero,
  .split-layout,
  .field-grid,
  .unlock-form,
  .suggestion-panel {
    grid-template-columns: 1fr;
  }

  .toolbar,
  .card-title-row,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .card-actions {
    justify-items: start;
  }

  .hero-actions,
  .suggestion-actions {
    justify-items: start;
    justify-content: flex-start;
  }

  .card-row {
    flex-direction: column;
  }

  .card-meta {
    min-width: 0;
    text-align: left;
  }

  .square-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav a {
    font-size: 0.95rem;
  }

  .nav .plan-link {
    width: 100%;
    color: var(--muted);
    font-size: 0.78rem;
  }

  .page {
    width: min(100% - 22px, 1236px);
    padding-top: 0;
  }

  .hero h1,
  .card-title-row h1,
  .panel h1 {
    font-size: 2.35rem;
  }

  .home-page .hero {
    min-height: 500px;
    padding: 38px 22px;
  }

  .hero-rule {
    width: 92px;
    height: 10px;
  }

  .section-heading h2,
  .section-heading h1 {
    font-size: 1.08rem;
  }

  .guest-section {
    padding: 38px 18px 50px;
  }

  .guest-section h3 {
    font-size: 1.55rem;
  }

  .guest-section p {
    font-size: 1rem;
  }

  .giving-section img {
    min-height: 260px;
  }

  .bingo-board {
    gap: 5px;
  }

  .bingo-square {
    border-width: 1px;
    padding: 5px;
    font-size: 0.68rem;
  }

  .panel {
    padding: 16px;
  }
}

@media print {
  body {
    background: #fff;
  }

  .site-header,
  .controls-panel,
  .card-actions,
  .site-footer {
    display: none !important;
  }

  .page {
    width: 100%;
    padding: 0;
  }

  .card-title-row {
    display: block;
    margin-bottom: 14px;
  }

  .bingo-board {
    max-width: 7.5in;
    gap: 6px;
  }

  .bingo-square {
    color: #111;
    border-color: #222;
    box-shadow: none !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
