/* Accrue for Programs: /programs/. Uses the site's own variables from site.css. */

:root {
  --fp-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E");
}

.fp-intro { padding-top: clamp(36px, 6vw, 88px); }
.fp-intro-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; gap: clamp(32px, 5vw, 72px); }
.fp-intro-copy { display: grid; gap: clamp(18px, 2vw, 26px); }
.fp-intro h1 { max-width: 13ch; }
.fp-note { font-size: 14px; line-height: 1.5; color: var(--ink-3); }
.fp-note a { color: var(--dusk); text-decoration: underline; text-underline-offset: 3px; }

.fp-icon { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; border-radius: var(--r-input); background: var(--dusk-wash); color: var(--dusk); }
.fp-icon svg { width: 22px; height: 22px; }

.fp-flow { list-style: none; margin: 0; padding: clamp(22px, 3vw, 32px); display: grid; gap: 4px; border-radius: var(--r-card); background: var(--sheet); box-shadow: var(--card-shadow); }
.fp-flow li { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px; align-items: center; padding: 10px 0; }
.fp-flow li + li::before { content: ""; position: absolute; left: 19px; top: -12px; height: 20px; width: 2px; border-radius: 1px; background: var(--hairline); }
.fp-flow svg { width: 40px; height: 40px; padding: 9px; border-radius: var(--r-input); background: var(--dusk-wash); color: var(--dusk); }
.fp-flow li:last-child svg { background: var(--dusk); color: var(--dusk-ink); }
.fp-flow li > span { display: grid; gap: 2px; }
.fp-flow strong { color: var(--ink); font-weight: 600; font-size: 16.5px; line-height: 1.35; }
.fp-flow strong + span { color: var(--ink-3); font-size: 15px; line-height: 1.45; }

.fp-features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(36px, 4vw, 52px) clamp(28px, 4vw, 56px); }
.fp-features li { display: grid; align-content: start; justify-items: start; gap: 8px; padding-top: 26px; border-top: 1px solid var(--hairline); }
.fp-features .fp-icon { margin-bottom: 12px; }
.fp-features h3, .fp-steps h3 { font-family: var(--f-sans); font-size: 17px; font-weight: 600; line-height: 1.35; letter-spacing: 0.002em; font-variation-settings: normal; }
.fp-features p, .fp-steps p { color: var(--ink-2); font-size: 16px; line-height: 1.55; max-width: 34em; }

.fp-split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.fp-split .section-head { margin-bottom: 0; }

.fp-steps { list-style: none; margin: 0; padding: 0; display: grid; }
.fp-steps li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 18px; align-items: start; padding: 24px 0; border-top: 1px solid var(--hairline); }
.fp-steps li:last-child { border-bottom: 1px solid var(--hairline); }
.fp-steps h3 { margin: 8px 0 4px; }

.fp-status-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 22px); }
.fp-status-grid article { display: flex; flex-direction: column; gap: 12px; padding: clamp(22px, 2.4vw, 30px); border-radius: var(--r-card); background: var(--sheet); box-shadow: var(--card-shadow); }
.fp-status-grid article:first-child { box-shadow: inset 0 0 0 2px var(--dusk), var(--card-shadow); }
.fp-status-grid p { color: var(--ink-2); line-height: 1.55; }
.fp-card-head { display: grid; justify-items: start; gap: 10px; }
.fp-card-head h3 { font-size: 24px; }
.fp-chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--r-chip); background: var(--dusk-wash); color: var(--dusk); font-size: 13px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.fp-card-action { display: flex; align-items: center; min-height: 52px; margin-top: auto; padding-top: 4px; }
.fp-link { color: var(--dusk); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.fp-faq { display: grid; }
.fp-faq a { color: var(--dusk); text-decoration: underline; text-underline-offset: 3px; }
.fp-faq details { border-bottom: 1px solid var(--hairline); }
.fp-faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; font-size: 18px; font-weight: 600; }
.fp-faq summary::-webkit-details-marker { display: none; }
.fp-faq summary::after {
  content: ""; flex: none; width: 18px; height: 18px; background: var(--ink-3);
  -webkit-mask: var(--fp-chevron) center / contain no-repeat; mask: var(--fp-chevron) center / contain no-repeat;
  transition: transform 0.3s var(--ease), background-color 0.2s ease;
}
.fp-faq summary:hover::after { background: var(--ink-2); }
.fp-faq details[open] summary::after { transform: rotate(180deg); }
.fp-faq details p { padding: 0 0 22px; color: var(--ink-2); line-height: 1.6; max-width: 40em; }

.fp-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding: clamp(22px, 3vw, 36px); border-radius: var(--r-card); background: var(--sheet); box-shadow: var(--card-shadow); }
.fp-wide { grid-column: 1 / -1; }
.fp-field { display: grid; gap: 8px; align-content: start; }
.fp-field label { font-size: 15px; font-weight: 600; color: var(--ink); }
.fp-field label span { font-weight: 400; color: var(--ink-3); }
.fp-field :is(input, select, textarea) {
  width: 100%; padding: 13px 16px; border: 0; border-radius: var(--r-input);
  background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--hairline);
  font: inherit; font-size: 16px; line-height: 1.4;
}
.fp-field textarea { min-height: 120px; resize: vertical; }
.fp-field :is(input, select, textarea):hover { box-shadow: inset 0 0 0 1px var(--ink-3); }
.fp-field :is(input, select, textarea):focus-visible { outline: 2px solid var(--dusk); outline-offset: 2px; }
.fp-select { position: relative; display: block; }
.fp-field .fp-select select { -webkit-appearance: none; appearance: none; padding-right: 44px; text-overflow: ellipsis; cursor: pointer; }
.fp-select::after {
  content: ""; position: absolute; top: 50%; right: 16px; width: 16px; height: 16px; margin-top: -8px;
  background: var(--ink-3); pointer-events: none;
  -webkit-mask: var(--fp-chevron) center / contain no-repeat; mask: var(--fp-chevron) center / contain no-repeat;
  transition: background-color 0.2s ease;
}
.fp-select:hover::after, .fp-select:focus-within::after { background: var(--ink-2); }
.fp-check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.fp-check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--dusk); flex: none; }
.fp-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.fp-actions .btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }
.fp-form-status { min-height: 1.5em; font-size: 16px; color: var(--ink-2); }
.fp-form-status[data-state="error"] { color: var(--ink); font-weight: 600; }
.fp-done { display: grid; gap: 12px; padding: clamp(22px, 3vw, 36px); border-radius: var(--r-card); background: var(--sheet); box-shadow: var(--card-shadow); }
.fp-done h3 { font-size: 26px; }
.fp-done p { color: var(--ink-2); line-height: 1.55; }

/* The demo request: a modal over a dimmed page that scrolls inside itself on short or narrow screens. */
html:has(.fp-dialog[open]) { overflow: hidden; scrollbar-gutter: stable; }
.fp-dialog {
  width: min(680px, calc(100vw - 32px)); max-width: none;
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
  margin: auto; padding: 0; border: 0; border-radius: var(--r-card);
  background: var(--sheet); color: var(--ink); box-shadow: var(--frame-shadow);
  overflow: auto; overscroll-behavior: contain;
}
.fp-dialog::backdrop { background: rgba(14, 20, 32, 0.58); }
.fp-dialog-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: clamp(18px, 3vw, 28px) clamp(18px, 3vw, 32px) 12px; background: var(--sheet); }
.fp-dialog-head h2 { font-size: clamp(26px, 3.2vw, 34px); line-height: 1.1; }
.fp-dialog-close { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -8px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); cursor: pointer; }
.fp-dialog-close:hover { background: var(--dusk-wash); color: var(--ink); }
.fp-dialog-close:focus-visible { outline: 2px solid var(--dusk); outline-offset: 2px; }
.fp-dialog-close svg { width: 22px; height: 22px; }
.fp-dialog-body { padding: 0 clamp(18px, 3vw, 32px) clamp(20px, 3vw, 32px); }
.fp-dialog-lede { margin-bottom: 20px; color: var(--ink-2); font-size: 17px; line-height: 1.5; }
.fp-dialog .fp-form { padding: 0; background: none; box-shadow: none; border-radius: 0; gap: 16px 20px; }
.fp-dialog-done { display: grid; gap: 12px; padding-top: 4px; }
.fp-dialog-done[hidden], [data-demo-ask][hidden] { display: none; }
.fp-dialog-done h3 { font-size: 26px; outline: none; }
.fp-dialog-done p { color: var(--ink-2); line-height: 1.55; }
.fp-dialog-done strong { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .fp-dialog::backdrop { background: rgba(0, 0, 0, 0.66); }
}
:root[data-theme="dark"] .fp-dialog::backdrop { background: rgba(0, 0, 0, 0.66); }

@media (max-width: 1080px) {
  .fp-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .fp-intro-grid, .fp-split { grid-template-columns: minmax(0, 1fr); }
  .fp-status-grid { grid-template-columns: minmax(0, 1fr); }
  .fp-card-action { min-height: 0; }
}
@media (max-width: 640px) {
  .fp-form, .fp-features { grid-template-columns: minmax(0, 1fr); }
  .fp-features { gap: 0; }
  .fp-features li { grid-template-columns: 40px minmax(0, 1fr); column-gap: 16px; row-gap: 4px; padding: 22px 0; }
  .fp-features .fp-icon { grid-row: span 2; margin-bottom: 0; }
  .fp-features h3 { align-self: center; min-height: 40px; display: flex; align-items: center; }
}
