.p-text-button {
  min-height: 44px; padding: 0 2px; background: none; border: 0;
  color: var(--chalk-dim); text-decoration: underline; text-underline-offset: 3px;
}
.p-text-button:hover { color: var(--chalk); }

.p-field {
  width: 100%; min-height: 46px; padding: 0 12px;
  background: var(--board); color: var(--chalk); border: 1px solid var(--line); border-radius: var(--radius); font: inherit;
}
.p-field:focus { outline: 0; border-color: var(--chalk-dim); }

.p-primary, .p-secondary { width: 100%; min-height: 50px; padding: 0 20px; border-radius: var(--radius); font-weight: 650; letter-spacing: -.005em; }
.p-primary { background: var(--yellow); color: #17171a; border: 0; font-size: 1.0625rem; }
.p-primary:hover:not(:disabled) { background: #f9e28e; }
.p-primary:disabled, .p-secondary:disabled { opacity: .6; cursor: default; }
.p-secondary { background: none; color: var(--chalk); border: 1px solid var(--line); }
.p-secondary:hover:not(:disabled) { border-color: var(--chalk-dim); background: rgb(255 255 255 / .04); }

.p-note { margin: 0; color: var(--chalk-dim); }
.p-form-error { margin: 0; color: var(--danger); }

.p-sheet {
  position: fixed; inset: auto 0 0; width: 100%; height: fit-content; max-width: none; max-height: 92dvh; margin: 0; overflow-y: auto;
  padding: 24px var(--gutter) calc(16px + env(safe-area-inset-bottom));
  background: var(--board-raised); color: var(--chalk);
  border: 0; border-top: 1px solid var(--hairline); border-radius: 16px 16px 0 0;
  box-shadow: 0 -12px 40px rgb(0 0 0 / .5);
  animation: rise .28s ease-out .15s both;
}
.p-sheet:focus { outline: 0; }
.p-sheet::backdrop { background: rgb(4 4 5 / .72); }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
.p-sheet h2 { margin: 0 44px 10px 0; font: 700 1.75rem/1.15 var(--font-display); letter-spacing: -.01em; text-wrap: balance; }
.p-sheet form { display: grid; gap: 10px; margin-top: 14px; }
.p-sheet .p-note { margin-bottom: 6px; }
.p-sheet .p-primary { margin-top: 4px; }
.p-sheet-close {
  position: absolute; top: 8px; right: 8px; width: 44px; height: 44px;
  background: none; border: 0; color: var(--chalk-dim); font-size: 1.6rem; line-height: 1;
}
.p-eyebrow { margin: 0 44px 6px 0; color: var(--chalk-dim); font-size: .875rem; font-weight: 600; }
.p-price { margin: 0 0 14px; color: var(--chalk-dim); text-wrap: pretty; }
.p-weak { margin: 0 0 8px; }
.p-weak strong { color: var(--peach); font-weight: 650; }
.p-saved-question { margin: 0 0 14px; padding-left: 12px; border-left: 2px solid var(--line); color: var(--chalk-dim); overflow-wrap: anywhere; }
.p-saved-question q { color: var(--chalk); }
.p-perks { margin: 0 0 16px; padding: 0; list-style: none; }
.p-perks li { position: relative; padding: 3px 0 3px 24px; line-height: 1.4; }
.p-perks li::before { content: ""; position: absolute; left: 3px; top: 10px; width: 11px; height: 6px; border: solid var(--chalk-dim); border-width: 0 0 1.5px 1.5px; transform: rotate(-45deg); }
.p-fine { margin: 8px 0 0; color: var(--chalk-dim); font-size: .8125rem; text-align: center; }
.p-sheet-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 4px; }
.p-divider { margin: 12px 0 0; color: var(--chalk-dim); text-align: center; }
.p-code-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; margin: 8px 0 12px; }
.p-restore-code { color: var(--yellow); font: 600 1.25rem var(--font-mono); letter-spacing: .03em; user-select: all; overflow-wrap: anywhere; }

.p-return-page { display: grid; place-items: center; min-height: 100dvh; padding: var(--gutter); }
.p-return-panel { display: grid; gap: 10px; width: min(100%, 460px); }
.p-return-panel h1 { margin: 0; font: 700 2.25rem/1.12 var(--font-display); letter-spacing: -.01em; text-wrap: balance; }
.p-return-panel .p-eyebrow { margin: 0; color: var(--peach); }
.p-chalk-dots { width: 44px; height: 8px; background: radial-gradient(circle 3px, var(--yellow) 96%, transparent) 0 0 / 14px 8px; animation: dots 1s steps(3) infinite; }
@keyframes dots { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }

@media (min-width: 720px) {
  .p-sheet { inset: 0; width: min(100% - 32px, 460px); height: fit-content; margin: auto; padding: 28px; border: 1px solid var(--hairline); border-radius: 16px; }
  .p-primary { width: fit-content; min-width: 200px; }
  .p-sheet .p-primary, .p-return-panel .p-primary { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .p-sheet, .p-chalk-dots { animation: none; }
}

/* Venmo and Zelle: numbered steps the student follows in their own app. */
.p-pay-steps { display: grid; gap: 12px; margin: 4px 0 14px; padding-left: 22px; }
.p-pay-steps li { line-height: 1.4; }
.p-pay-steps .p-code-row { margin-top: 6px; }
.p-pay-way { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 8px; text-align: center; text-decoration: none; }
.p-zelle { justify-content: space-between; padding: 10px 12px; background: var(--board-raised); border-radius: var(--radius); text-align: left; overflow-wrap: anywhere; }
.p-pay-form { display: grid; gap: 10px; }
.p-pay-check { display: flex; align-items: flex-start; gap: 10px; padding: 4px 0; line-height: 1.4; cursor: pointer; }
.p-pay-check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--yellow); }
.p-zelle .p-text-button { flex: none; white-space: nowrap; }
