.plan-page {
  min-height: 100dvh;
  background:
    radial-gradient(ellipse 60% 40% at 12% -8%, rgba(232, 93, 4, 0.14), transparent 55%),
    radial-gradient(ellipse 50% 35% at 88% 0%, rgba(232, 93, 4, 0.06), transparent 50%),
    var(--bg);
}

.plan-layout {
  width: min(100% - 40px, 1120px);
  margin: 0 auto;
  padding: 132px 0 80px;
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.plan-form .wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.04em;
}

.plan-form h1 {
  margin-top: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 2.7rem);
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.plan-form .lede {
  margin-top: 10px;
  color: var(--mute);
  font-size: 1.02rem;
  max-width: 28ch;
}

.plan-fields {
  margin-top: 28px;
  display: grid;
  gap: 16px;
}

.plan-fields label,
.plan-field {
  display: grid;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
}

.plan-fields input[type="text"],
.plan-fields input[type="number"] {
  width: 100%;
  padding: 12px 0 10px;
  border: 0;
  border-bottom: 1px solid rgba(14, 14, 14, 0.18);
  background: transparent;
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 550;
  color: var(--ink);
  border-radius: 0;
}

.plan-fields input:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

.plan-split {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.plan-split button {
  padding: 10px 6px;
  border-radius: 12px;
  border: 1px solid rgba(14, 14, 14, 0.08);
  background: rgba(255, 255, 255, 0.55);
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--mute);
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.plan-split button.is-on {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.plan-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.plan-hint {
  font-size: 0.82rem;
  color: var(--faint);
  max-width: 32ch;
}

.plan-preview {
  position: sticky;
  top: 96px;
}

.sheet {
  --sheet-serif: "Libre Baskerville", "Iowan Old Style", Georgia, serif;
  background: #fffdf8;
  color: #1a1714;
  padding: 42px 48px 36px;
  min-height: 980px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 24px 60px rgba(14, 14, 14, 0.1);
  border: 1px solid rgba(14, 14, 14, 0.06);
  text-align: center;
}

.sheet-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.sheet-brand img {
  border-radius: 10px;
}

.sheet-brand p {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}

.sheet-meta {
  margin: 18px auto 8px;
  padding-bottom: 6px;
  width: fit-content;
  max-width: 100%;
  font-family: var(--sheet-serif);
  font-size: 0.95rem;
  border-bottom: 1px solid #1a1714;
}

.sheet-meal {
  margin-top: 28px;
}

.sheet-meal h2 {
  font-family: var(--sheet-serif);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.sheet-meal h2 span {
  display: inline;
  padding: 0 7px 2px;
  background: linear-gradient(transparent 58%, rgba(232, 93, 4, 0.38) 58%);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

.sheet-meal p {
  font-family: var(--sheet-serif);
  font-size: 0.92rem;
  line-height: 1.55;
  color: #2a2622;
}

.sheet-notes {
  margin-top: 36px;
  display: grid;
  gap: 10px;
}

.sheet-notes p {
  font-family: var(--sheet-serif);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  padding-bottom: 3px;
  border-bottom: 1px solid #1a1714;
}

.sheet-fine {
  margin-top: 22px;
  font-size: 0.72rem;
  color: #8a847c;
  font-family: var(--sans);
}

@media (max-width: 860px) {
  .plan-layout {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 120px;
  }

  .plan-preview {
    position: static;
  }

  .sheet {
    padding: 32px 22px 28px;
    min-height: 0;
  }

  .island.is-open .island-links a:nth-child(5) {
    animation-delay: 0.25s;
  }
}

@page {
  size: A4;
  margin: 14mm 16mm;
}

@media print {
  .nav-float,
  .plan-form,
  .grain {
    display: none !important;
  }

  html,
  body.plan-page {
    background: #fff !important;
    overflow: visible;
  }

  .plan-layout {
    display: block;
    width: auto;
    margin: 0;
    padding: 0;
  }

  .plan-preview {
    position: static;
  }

  .sheet {
    box-shadow: none;
    border: 0;
    padding: 0;
    min-height: 0;
    background: #fff;
  }

  .sheet-meal {
    break-inside: avoid;
    margin-top: 20px;
  }

  .sheet-notes {
    margin-top: 24px;
  }
}
