.stripe-portal { min-height: 100vh; background: var(--cp-bg); color: var(--agent-text); font-family: 'Plus Jakarta Sans', sans-serif; }
.sp-header { min-height: 76px; padding: 12px clamp(20px, 6vw, 92px); border-bottom: 1px solid var(--agent-line); display: flex; justify-content: space-between; align-items: center; gap: 12px 22px; flex-wrap: wrap; }
.sp-header a:not(.agent-brand), .sp-link { color: var(--agent-brand); font: inherit; font-size: .875rem; font-weight: 700; text-decoration: underline; text-underline-offset: .2em; }
.sp-link { margin-top: 12px; min-height: 44px; background: transparent; border: 0; cursor: pointer; }
.sp-main { width: min(100% - 40px, 33rem); margin: clamp(2.5rem, 8vh, 6rem) auto; overflow-wrap: anywhere; }
.sp-main--wide { width: min(100% - 40px, 65rem); }
.sp-main h1, .sp-main h2 { margin: 0; color: var(--agent-ink); line-height: 1.14; letter-spacing: -.025em; }
.sp-main h1 { font-size: clamp(2rem, 4vw, 2.95rem); }
.sp-main h2 { font-size: clamp(1.3rem, 2vw, 1.6rem); }
.sp-intro, .sp-summary p { font-size: 1rem; margin: .8rem 0 0; line-height: 1.65; }
.sp-message { color: var(--agent-brand); line-height: 1.6; margin: 1.4rem 0; }
.sp-message:empty { display: none; }
.sp-message.is-error { color: #942529; }
.sp-main .agent-form { gap: 18px; margin-top: 1.75rem; }
.sp-main .agent-form input { width: 100%; min-width: 0; font-size: 1rem; }
.sp-main .agent-btn { min-height: 44px; }
.sp-help { color: var(--agent-text); font-size: .85rem; margin: -.75rem 0 0; }
.sp-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sp-summary, .sp-total { padding: 1.4rem 0; margin: 1.5rem 0; border-block: 1px solid var(--agent-line); }
.sp-summary > span, .sp-total > span { color: var(--agent-text); font-size: .875rem; font-weight: 600; }
.sp-summary h2 { margin-top: .45rem; }
.sp-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.sp-total strong { color: var(--agent-ink); font-size: clamp(1.55rem, 3vw, 2.1rem); font-variant-numeric: tabular-nums; }
.sp-invite { padding: 1.25rem 0 2rem; border-block: 1px solid var(--agent-line); grid-template-columns: minmax(0, 26rem) max-content; align-items: end; }
.sp-list-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2rem 0 1.1rem; }
.sp-table { width: 100%; font-size: .95rem; border-collapse: collapse; }
.sp-table th, .sp-table td { text-align: left; padding: .9rem .65rem; border-bottom: 1px solid var(--agent-line); vertical-align: top; }
.sp-table th { color: var(--agent-text); font-size: .82rem; }
.sp-table td:first-child { font-weight: 600; color: var(--agent-ink); }
.sp-table td:last-child { font-variant-numeric: tabular-nums; }
.sp-empty { color: var(--agent-text); padding: .8rem .65rem; }
.sp-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sp-header a:focus-visible, .sp-link:focus-visible { outline: 3px solid var(--agent-brand); outline-offset: 4px; }
@media (max-width: 600px) {
  .sp-header .agent-brand img { width: 134px; height: 36px; }
  .sp-invite { grid-template-columns: 1fr; }
}
.sp-id { margin-top: .3rem; color: var(--agent-text); font-size: .8rem; font-weight: 500; }
.sp-id summary { cursor: pointer; color: var(--agent-brand); }
.sp-id code { display: block; margin-top: .3rem; overflow-wrap: anywhere; }
.sp-list-head .sp-link { display: inline-flex; align-items: center; margin: 0; }
@media (max-width: 600px) {
  .sp-list-head { align-items: start; flex-direction: column; }
  .sp-list-head .sp-actions { justify-content: space-between; width: 100%; }
}
.sp-heading, .sp-terms, .sp-money, .sp-filter { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.sp-mode { color: var(--agent-brand); background: var(--agent-inset); border-radius: .35rem; padding: .32rem .65rem; font-size: .82rem; font-weight: 700; }
.sp-mode[data-mode=live] { background: #fff1de; color: #743d00; }
.sp-pilot { border-bottom: 1px solid var(--agent-line); padding-bottom: 1.6rem; }
.sp-pilot .sp-message { margin: .85rem 0; }
.sp-terms { align-items: start; gap: 1rem clamp(1rem, 4vw, 3.2rem); margin: 1rem 0; }
.sp-terms dt { color: var(--agent-text); font-size: .82rem; }
.sp-terms dd { margin: .25rem 0 0; color: var(--agent-ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.sp-pilot .sp-config { max-width: 39rem; margin-top: 1rem; }
.sp-money { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sp-config label.sp-check { display: flex; align-items: center; gap: .65rem; cursor: pointer; }
.sp-main .sp-check input { appearance: auto; width: 1.1rem; min-height: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--agent-brand); }
.sp-actions .sp-link { margin-top: 0; }
.sp-pilot h3 { color: var(--agent-ink); font-size: 1.16rem; margin: 1.25rem 0 .4rem; }
#pilot-review-detail { margin: .65rem 0 1rem; line-height: 1.65; }
.sp-share-field { display: grid; gap: .3rem; font-size: .875rem; }
.sp-share-field input { font: inherit; width: 100%; }
.sp-main .sp-filter { display: flex; align-items: end; gap: 1rem; margin: 0 0 .85rem; }
.sp-filter p { color: var(--agent-text); margin: 0 0 .55rem; font-size: .875rem; }
.sp-id .sp-link { display: block; margin: 0; padding: 0; min-height: 34px; }
@media (max-width: 420px) {
  .sp-money { grid-template-columns: minmax(0, 1fr); }
  .sp-pilot .sp-list-head .sp-actions { justify-content: start; }
}
.sp-resend { margin: 0; padding: 0; display: block; font-size: .8rem; }

.sp-cell-label { display: none; }
.sp-filter .sp-link { margin: 0; }
@media (max-width: 600px) {
  .sp-main .sp-filter { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .7rem 1rem; }
  .sp-filter label { grid-column: 1 / -1; }
  .sp-filter select { width: 100%; min-width: 0; }
  .sp-filter #application-count { grid-column: 1; grid-row: 3; align-self: center; margin: 0; }
  .sp-filter .sp-link { grid-column: 2; grid-row: 3; justify-self: end; }
  .sp-table, .sp-table tbody { display: block; }
  .sp-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .sp-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .55rem 1rem;
    padding: 1rem 0;
    border-top: 1px solid var(--agent-line);
  }
  .sp-table tbody tr:last-child { border-bottom: 1px solid var(--agent-line); }
  .sp-table td { display: block; min-width: 0; padding: 0; border: 0; font-size: .875rem; line-height: 1.45; }
  .sp-table td:first-child { grid-column: 1 / -1; font-size: 1rem; }
  .sp-cell-label { display: block; color: var(--agent-text); font-size: .75rem; font-weight: 600; margin-bottom: .15rem; }
  .sp-id summary { min-height: 24px; }
}

.sp-tools { margin: 1.5rem 0; padding: 1rem 0; border-block: 1px solid var(--agent-line); }
.sp-tools .agent-btn[aria-pressed="true"] { background: var(--agent-brand); color: white; }
.sp-tools .agent-btn:focus-visible { outline: 3px solid var(--agent-brand); outline-offset: 4px; }
#component { margin: 1.5rem 0 2rem; min-width: 0; }
#notices { margin-top: 1rem; }
@media (max-width: 540px) {
  .sp-tools { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
  .sp-tools .agent-btn { min-width: 0; white-space: normal; padding: .65rem; text-align: center; }
}
#prepare-pilot, #review-reference { line-height: 1.6; margin-bottom: 1.5rem; }
#prepare-pilot button { max-width: 100%; white-space: normal; text-align: center; }
.sp-consent { display: flex; align-items: flex-start; gap: .7rem; margin: 1.25rem 0; cursor: pointer; font-weight: 600; }
.sp-consent input { flex: none; width: 1.2rem; height: 1.2rem; margin-top: .2rem; accent-color: var(--agent-brand); }
#review-id { display: block; margin-top: .5rem; user-select: all; }
