/* Partner program pages (/partners, /partners/join/…, /partners/terms,
   /partners/dashboard). Same tokens and look as /plan and styles.css. */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --primary: #155E42;
    --primary-dark: #0E4A33;
    --primary-light: #E0F0E8;
    --peach: #FFD7B5;
    --accent: #E05A3A;
    --text: #1C1C1C;
    --text-secondary: #555;
    --text-muted: #888;
    --background: #F5F5F0;
    --white: #FFFFFF;
    --border: #E0E0E0;
    --warm: #FFF8F0;
}
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    background: var(--background);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { color: var(--primary); }
[hidden] { display: none !important; }

.nav { background: rgba(255,255,255,0.95); border-bottom: 1px solid var(--border); padding: 14px 16px; }
.nav-inner { max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 10px; }
.nav-logo { width: 34px; height: 34px; border-radius: 8px; }
.nav-title { font-weight: 800; font-size: 17px; color: var(--text); text-decoration: none; }
.nav-title span { font-weight: 500; color: var(--text-secondary); }
.nav-right { margin-left: auto; }

main { flex: 1; width: 100%; max-width: 640px; margin: 0 auto; padding: 24px 16px 40px; }

.hero { background: linear-gradient(135deg, #155E42 0%, #0E4A33 50%, #0A3D2A 100%); color: #fff; border-radius: 22px; padding: 30px 22px; text-align: center; }
.hero .badge { display: inline-block; background: rgba(255,255,255,0.15); padding: 5px 14px; border-radius: 20px; font-size: 13px; font-weight: 700; margin-bottom: 12px; }
.hero h1 { font-size: 29px; font-weight: 900; line-height: 1.15; margin-bottom: 10px; }
.hero p { font-size: 16px; color: var(--peach); font-weight: 600; max-width: 460px; margin: 0 auto; }

.card { background: var(--white); border-radius: 20px; padding: 22px 20px; margin-top: 16px; box-shadow: 0 6px 24px rgba(0,0,0,0.06); }
.card h2 { font-size: 20px; font-weight: 800; color: var(--primary); margin-bottom: 4px; line-height: 1.3; }
.card .card-sub { font-size: 14px; color: var(--text-secondary); margin-bottom: 16px; }
.card p + p { margin-top: 10px; }
.card ul.ticks { list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.card ul.ticks li { padding-left: 24px; position: relative; }
.card ul.ticks li::before { content: '✓'; position: absolute; left: 0; color: var(--primary); font-weight: 900; }

.steps-list { list-style: none; display: flex; flex-direction: column; gap: 14px; counter-reset: s; }
.steps-list li { display: flex; gap: 14px; align-items: flex-start; font-size: 15px; color: var(--text-secondary); }
.steps-list li::before { counter-increment: s; content: counter(s); width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; }
.steps-list strong { display: block; color: var(--text); font-size: 16px; }

.note { margin-top: 14px; padding: 12px 14px; background: var(--primary-light); border-radius: 12px; font-size: 14px; color: var(--primary-dark); }
.draft-banner { background: #FFF4E5; border: 2px solid #F5A524; color: #7A4B00; border-radius: 16px; padding: 16px 18px; font-size: 15px; }
.draft-banner strong { display: block; font-size: 17px; margin-bottom: 4px; }

/* Forms */
.form-group { margin-bottom: 14px; }
.form-group > label:not(.check), fieldset legend { display: block; font-size: 13px; font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; }
.form-group .opt { font-weight: 500; color: var(--text-muted); }
fieldset { border: none; margin-bottom: 14px; }
.input, .form-group input[type=text], .form-group input[type=email], .form-group select, .form-group textarea {
    width: 100%; padding: 13px 14px; border: 2px solid var(--border); border-radius: 12px;
    font-size: 16px; font-family: inherit; outline: none; transition: border-color 0.2s; background: var(--white); color: var(--text);
}
.form-group textarea { min-height: 96px; resize: vertical; }
.input:focus, .form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary); }
.links-list { display: flex; flex-direction: column; gap: 8px; }
.link-row { display: flex; gap: 8px; }
.link-row input { flex: 1; min-width: 0; }
.link-remove { flex-shrink: 0; width: 46px; border: 2px solid var(--border); border-radius: 12px; background: var(--white); color: var(--text-secondary); font: inherit; font-size: 20px; cursor: pointer; }
.link-add { margin-top: 8px; background: none; border: none; color: var(--primary); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; padding: 4px 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--text); padding: 10px 12px; border: 2px solid var(--border); border-radius: 12px; cursor: pointer; margin-bottom: 8px; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--primary); flex-shrink: 0; }
.check .sub { display: block; font-size: 13px; color: var(--text-muted); }
.check.plain { border: none; padding: 0; font-size: 14px; color: var(--text-secondary); margin: 6px 0 16px; }

.btn { display: block; width: 100%; padding: 15px 16px; border: none; border-radius: 14px; background: var(--primary); color: #fff; font: inherit; font-size: 17px; font-weight: 800; cursor: pointer; text-align: center; text-decoration: none; }
.btn:disabled { opacity: 0.7; cursor: default; }
.btn-small { display: inline-block; width: auto; padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.btn-ghost { background: var(--white); color: var(--primary); border: 2px solid var(--primary-light); }
.form-error { display: none; background: #FDECEA; color: #B3261E; border-radius: 10px; padding: 10px 14px; font-size: 14px; margin-bottom: 14px; }
.form-error.visible { display: block; }
.form-ok { background: var(--primary-light); color: var(--primary-dark); border-radius: 10px; padding: 10px 14px; font-size: 14px; margin-bottom: 14px; }
.form-note { font-size: 12px; color: var(--text-muted); text-align: center; margin-top: 12px; }
.center { text-align: center; }
.big { font-size: 40px; line-height: 1.2; }

/* Terms */
.terms-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.terms-table th, .terms-table td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.terms-table th { font-weight: 700; padding-right: 12px; width: 45%; }
.terms-table td { color: var(--text-secondary); }

/* Dashboard */
.dash-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dash-head h1 { font-size: 24px; font-weight: 900; line-height: 1.2; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.status-pill { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 13px; font-weight: 800; background: var(--primary-light); color: var(--primary-dark); }
.status-pill.wait { background: #FFF4E5; color: #7A4B00; }
.status-pill.off { background: #EEE; color: #555; }
.checklist { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.checklist li { display: flex; gap: 10px; align-items: center; font-size: 15px; }
.checklist .mark { width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 900; border: 2px solid var(--border); color: transparent; }
.checklist .done .mark { background: var(--primary); border-color: var(--primary); color: #fff; }
.checklist .soon { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--text-muted); background: #F0F0F0; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.copy-row { display: flex; gap: 8px; align-items: stretch; margin-bottom: 10px; }
.copy-row .val { flex: 1; min-width: 0; padding: 11px 12px; border: 2px solid var(--border); border-radius: 12px; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; background: var(--background); }
.copy-row .val.code { font-size: 20px; letter-spacing: 2px; font-weight: 900; color: var(--primary); }
.copy-btn { flex-shrink: 0; min-width: 76px; border: none; border-radius: 12px; background: var(--primary); color: #fff; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; padding: 0 12px; }
.field-label { font-size: 13px; font-weight: 700; color: var(--text-secondary); margin: 4px 0 6px; display: block; }
.qr-wrap { text-align: center; margin: 8px 0 4px; }
.qr-wrap img { width: 200px; height: 200px; border-radius: 12px; border: 1px solid var(--border); background: #fff; }
.qr-wrap a { display: block; font-size: 14px; font-weight: 700; margin-top: 6px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stats div { background: var(--background); border-radius: 14px; padding: 12px 8px; text-align: center; }
.stats strong { display: block; font-size: 22px; font-weight: 900; color: var(--primary); line-height: 1.2; font-variant-numeric: tabular-nums; }
.stats span { font-size: 12px; color: var(--text-secondary); line-height: 1.3; display: block; }
.rows { list-style: none; font-size: 15px; }
.rows li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.rows li:last-child { border-bottom: none; }
.rows .muted { color: var(--text-muted); font-size: 13px; }
.rows .amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.empty { font-size: 14px; color: var(--text-muted); }
.sub-h { font-size: 15px; font-weight: 800; margin: 16px 0 4px; }
.spinner { width: 32px; height: 32px; border: 4px solid var(--primary-light); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

.footer { text-align: center; padding: 24px 16px 32px; font-size: 13px; color: var(--text-muted); }
.footer a { text-decoration: none; font-weight: 600; }

@media (min-width: 700px) {
    .hero h1 { font-size: 36px; }
}

/* Hidden until the program check answers (assets/partners.js whenOpen). */
.pf-gating main { visibility: hidden; }

/* Per-field validation messages in the apply form. */
.field-error { display: none; color: #B3261E; font-size: 13px; font-weight: 600; margin-top: 6px; }
.field-error.visible { display: block; }
.form-group [aria-invalid="true"] { border-color: #B3261E; }

/* Persona recruitment pages (/partners/creators, teachers, realtors, relocation). */
.hero .btn-hero { display: inline-block; width: auto; margin-top: 18px; padding: 13px 24px; background: #fff; color: var(--primary); }
.points { list-style: none; display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.points li { padding-left: 24px; position: relative; font-size: 15px; color: var(--text-secondary); }
.points li::before { content: '✓'; position: absolute; left: 0; color: var(--primary); font-weight: 900; }
.points strong { display: block; color: var(--text); font-size: 16px; }
.faq { margin-top: 8px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq details:last-child { border-bottom: none; }
.faq summary { cursor: pointer; list-style: none; padding: 14px 28px 14px 0; font-weight: 700; font-size: 15px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 2px; top: 11px; font-size: 20px; color: var(--primary); font-weight: 800; }
.faq details[open] summary::after { content: '\2212'; }
.faq details p { font-size: 15px; color: var(--text-secondary); padding: 0 0 14px; }
.persona-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.persona-links a { display: block; padding: 12px 40px 12px 14px; border: 2px solid var(--border); border-radius: 12px; text-decoration: none; position: relative; }
.persona-links a::after { content: '\2192'; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--primary); font-weight: 800; }
.persona-links a:hover { border-color: var(--primary); }
.persona-links strong { display: block; color: var(--text); font-size: 15px; }
.persona-links span { display: block; font-size: 13px; color: var(--text-muted); }
