/* Avery partner program — program page and partner dashboard.
   Built on the site's own tokens (see _next/static/css) so it reads as one site. */

.af {
  --af-ink: var(--color-primary-ink, #126767);
  --af-teal: var(--color-primary, #44c0c0);
  --af-teal-soft: #e8f8f7;
  --af-line: var(--color-border, #1a1a1a1a);
  --af-text: var(--color-text-primary, #1a1a1a);
  --af-muted: var(--color-text-secondary, #1a1a1ab3);
  --af-faint: var(--color-text-muted, #1a1a1a80);
  --af-good: #13795b;
  --af-warn: #9a6200;
  --af-bad: var(--color-error, #9b2c2c);
  color: var(--af-text);
  font-family: var(--font-primary);
}
.af *, .af *::before, .af *::after { box-sizing: border-box; }
.af-wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .af-wrap { padding: 0 24px; } }
@media (min-width: 1328px) { .af-wrap { padding: 0; } }
.af-narrow { max-width: 1080px; }
.af-section { padding: 56px 0; }
@media (min-width: 768px) { .af-section { padding: 88px 0; } }

.af-tabular { font-variant-numeric: tabular-nums; }
.af-center { text-align: center; }
.af-muted { color: var(--af-muted); }
.af-faint { color: var(--af-faint); }

/* ---------- type ---------- */
.af-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px;
  border: 1px solid var(--color-border-light, #1a1a1a0d); border-radius: 100px; background: #fff;
  color: var(--af-teal); font-size: clamp(14px, .19vw + 13.3px, 16px); letter-spacing: -.64px;
}
.af-eyebrow svg { width: 12px; height: 12px; }
.af-h2 { margin: 16px 0 0; font-weight: 500; letter-spacing: -1.6px; font-size: clamp(30px, 1.6vw + 24px, 46px); line-height: 1.12; text-wrap: balance; }
.af-h3 { margin: 0; font-weight: 500; letter-spacing: -.6px; font-size: 20px; line-height: 1.3; }
.af-lede { margin: 16px 0 0; color: var(--af-muted); font-size: clamp(15px, .28vw + 14px, 18px); line-height: 1.6; letter-spacing: -.3px; max-width: 640px; text-wrap: pretty; }
.af-center .af-lede { margin-left: auto; margin-right: auto; }
.af-tilt {
  display: inline-block; transform: rotate(3deg); border-radius: .22em; background: var(--af-teal); color: #fff;
  padding: .02em .24em .06em; box-shadow: 0 14px 32px -8px rgba(68, 192, 192, .5);
}

/* ---------- buttons ---------- */
.af-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 28px;
  border-radius: 100px; border: 1px solid transparent; font-family: var(--font-button); font-size: 16px; font-weight: 500;
  text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .15s;
}
.af-btn:focus-visible { outline: 2px solid var(--af-teal); outline-offset: 2px; }
.af-btn-primary { background: var(--af-teal); color: #fff; }
.af-btn-primary:hover { background: var(--color-primary-hover, #3daeae); }
.af-btn-ghost { background: #fff; color: var(--af-text); border-color: var(--af-line); }
.af-btn-ghost:hover { border-color: var(--color-border-heavy, #1a1a1a33); }
.af-btn-sm { min-height: 36px; padding: 0 16px; font-size: 14px; }
.af-btn[disabled] { opacity: .55; cursor: default; }

/* ---------- hero ---------- */
.af-hero {
  position: relative; overflow: hidden; padding: 112px 0 56px;
  background:
    radial-gradient(circle at 12% 18%, rgba(68, 192, 192, .22), transparent 42%),
    radial-gradient(circle at 88% 12%, rgba(68, 192, 192, .16), transparent 46%),
    radial-gradient(circle at 70% 95%, rgba(68, 192, 192, .18), transparent 50%),
    linear-gradient(180deg, #e8fbf7 0%, #f5fffd 60%, #fff 100%);
}
@media (min-width: 768px) { .af-hero { padding: 168px 0 88px; } }
.af-hero-inner { position: relative; max-width: 820px; margin: 0 auto; text-align: center; }
.af-hero h1 { margin: 22px 0 0; font-weight: 500; letter-spacing: clamp(-3.6px, -.16vw - 1.33px, -1.92px); font-size: clamp(36px, 2.63vw + 24px, 64px); line-height: 1.06; text-wrap: balance; }
.af-hero .af-lede { font-size: clamp(16px, .3vw + 15px, 19px); }
.af-hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 32px; }
.af-proof { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin: 28px 0 0; padding: 0; list-style: none; color: var(--af-muted); font-size: 14px; }
.af-proof li { display: inline-flex; align-items: center; gap: 8px; }
.af-proof svg { width: 16px; height: 16px; color: var(--af-ink); flex: none; }

/* ---------- terms tiles ---------- */
.af-terms { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 48px; }
@media (min-width: 900px) { .af-terms { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }
.af-term { padding: 22px 20px; border: 1px solid var(--af-line); border-radius: 22px; background: rgba(255, 255, 255, .82); backdrop-filter: blur(6px); text-align: left; box-shadow: 0 4px 4px #0000000d; }
.af-term b { display: block; font-weight: 500; font-size: clamp(28px, 1.2vw + 22px, 40px); letter-spacing: -1.4px; line-height: 1; color: var(--af-ink); font-variant-numeric: tabular-nums; }
.af-term > span { display: block; margin-top: 10px; font-size: 15px; font-weight: 500; letter-spacing: -.3px; }
.af-term small { display: block; margin-top: 4px; font-size: 13px; line-height: 1.45; color: var(--af-muted); }

/* ---------- cards ---------- */
.af-card { border: 1px solid var(--af-line); border-radius: 24px; background: #fff; box-shadow: 0 4px 4px #0000000d; }
.af-card-pad { padding: 24px; }
@media (min-width: 768px) { .af-card-pad { padding: 36px; } }
.af-mesh {
  background:
    radial-gradient(circle at 92% 92%, rgba(68, 192, 192, .32), transparent 48%),
    radial-gradient(circle at 85% 8%, rgba(68, 192, 192, .16), transparent 55%),
    linear-gradient(180deg, #e8fbf7 0%, #f5fffd 55%, #eaf6fb 100%);
}

/* ---------- calculator ---------- */
.af-calc { display: grid; gap: 24px; margin-top: 40px; padding: 12px; }
@media (min-width: 960px) { .af-calc { grid-template-columns: 1fr 1.05fr; gap: 12px; } }
.af-calc-inputs { padding: 16px 12px; }
@media (min-width: 768px) { .af-calc-inputs { padding: 28px; } }
.af-field { display: block; margin-bottom: 26px; }
.af-field:last-child { margin-bottom: 0; }
.af-field-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.af-label { font-size: 15px; font-weight: 500; letter-spacing: -.3px; }
.af-value { font-size: 15px; font-weight: 600; color: var(--af-ink); font-variant-numeric: tabular-nums; }
.af-help { display: block; margin-top: 8px; font-size: 13px; line-height: 1.45; color: var(--af-faint); }
.af-range {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px; margin: 11px 0; border-radius: 6px; cursor: pointer;
  background: linear-gradient(to right, var(--af-teal) var(--fill, 50%), #d9e6e6 var(--fill, 50%));
}
.af-range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 2px solid var(--af-teal); box-shadow: 0 2px 8px rgba(18, 103, 103, .25); }
.af-range::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid var(--af-teal); box-shadow: 0 2px 8px rgba(18, 103, 103, .25); }
.af-range:focus-visible { outline: 2px solid var(--af-teal); outline-offset: 6px; }
.af-select, .af-input, .af-textarea {
  width: 100%; min-height: 48px; padding: 0 16px; border: 1px solid var(--color-border-medium, #1a1a1a1f); border-radius: 14px;
  background: #fff; color: var(--af-text); font: inherit; font-size: 15px;
}
.af-textarea { min-height: 110px; padding: 12px 16px; resize: vertical; line-height: 1.5; }
.af-select:focus, .af-input:focus, .af-textarea:focus { outline: 2px solid var(--af-teal); outline-offset: 0; border-color: transparent; }
.af-check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: var(--af-muted); cursor: pointer; }
.af-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--af-teal); flex: none; }

.af-calc-out { padding: 24px; border-radius: 18px; background: #fff; border: 1px solid var(--af-line); display: flex; flex-direction: column; }
@media (min-width: 768px) { .af-calc-out { padding: 32px; } }
.af-big { margin: 6px 0 0; font-weight: 500; font-size: clamp(44px, 3vw + 30px, 72px); letter-spacing: -3px; line-height: 1; font-variant-numeric: tabular-nums; }
.af-big small { font-size: .32em; letter-spacing: -.5px; color: var(--af-muted); font-weight: 400; }
.af-out-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.af-out-grid div { padding: 14px 16px; border-radius: 14px; background: var(--color-surface-muted, #f6f6f6); }
.af-out-grid b { display: block; font-size: 20px; font-weight: 600; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.af-out-grid span { font-size: 13px; color: var(--af-muted); }
.af-chart { margin-top: 22px; }
.af-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.af-chart-axis { font-size: 11px; fill: var(--af-faint); font-family: var(--font-secondary, system-ui); }
.af-foot { margin-top: 16px; font-size: 12.5px; line-height: 1.55; color: var(--af-faint); }

/* ---------- receipt (how commission is worked out) ---------- */
.af-split { display: grid; gap: 32px; align-items: center; }
@media (min-width: 960px) { .af-split { grid-template-columns: 1fr 1fr; gap: 64px; } }
.af-receipt { padding: 28px; }
.af-receipt-row { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px dashed var(--af-line); font-size: 15px; font-variant-numeric: tabular-nums; }
.af-receipt-row:last-child { border-bottom: 0; }
.af-receipt-row.total { padding-top: 18px; font-size: 18px; font-weight: 600; color: var(--af-ink); border-bottom: 0; border-top: 1px solid var(--af-text); }
.af-receipt-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; color: var(--af-muted); }
.af-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 100px; font-size: 12px; font-weight: 500; background: var(--af-teal-soft); color: var(--af-ink); white-space: nowrap; }
.af-pill.warn { background: #fdf3e1; color: var(--af-warn); }
.af-pill.bad { background: #fbeaea; color: var(--af-bad); }
.af-pill.dim { background: var(--color-surface-muted, #f6f6f6); color: var(--af-muted); }
.af-list { margin: 24px 0 0; padding: 0; list-style: none; }
.af-list li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--af-line); font-size: 15px; line-height: 1.55; color: var(--af-muted); }
.af-list li:last-child { border-bottom: 0; }
.af-list b { color: var(--af-text); font-weight: 500; }
.af-list svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--af-ink); }

/* ---------- feature grid ---------- */
.af-grid { display: grid; gap: 16px; margin-top: 40px; }
@media (min-width: 700px) { .af-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .af-grid.three { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.af-feature { padding: 26px; }
.af-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 14px; background: var(--af-teal-soft); color: var(--af-ink); }
.af-icon svg { width: 22px; height: 22px; }
.af-feature h3 { margin-top: 18px; }
.af-feature p { margin: 8px 0 0; font-size: 15px; line-height: 1.6; color: var(--af-muted); }

/* ---------- steps ---------- */
.af-steps { display: grid; gap: 16px; margin: 40px 0 0; padding: 0; list-style: none; counter-reset: step; }
@media (min-width: 900px) { .af-steps { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.af-step { position: relative; padding: 28px 26px; }
.af-step::before { counter-increment: step; content: "0" counter(step); display: block; font-size: 14px; font-weight: 600; color: var(--af-teal); letter-spacing: .5px; }
.af-step h3 { margin-top: 14px; }
.af-step p { margin: 8px 0 0; font-size: 15px; line-height: 1.6; color: var(--af-muted); }
.af-step em { display: inline-block; margin-top: 16px; font-style: normal; font-size: 13px; color: var(--af-ink); font-weight: 500; }

/* ---------- audience chips ---------- */
.af-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 32px; }
.af-chip { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 100px; border: 1px solid var(--af-line); background: #fff; font-size: 15px; }
.af-chip svg { width: 18px; height: 18px; color: var(--af-ink); }

/* ---------- dashboard preview / dashboard ---------- */
.af-preview { position: relative; margin-top: 40px; padding: 10px; border-radius: 28px; background: rgba(255, 255, 255, .35); box-shadow: 0 18px 55px rgba(40, 170, 174, .12); border: 1px solid rgba(255, 255, 255, .8); }
.af-preview-tag { position: absolute; top: -12px; right: 24px; z-index: 2; }
.af-dash { border-radius: 20px; background: #fff; border: 1px solid var(--af-line); padding: 20px; }
@media (min-width: 768px) { .af-dash { padding: 28px; } }
.af-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 900px) { .af-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.af-kpi { padding: 16px 18px; border-radius: 16px; background: var(--color-surface-muted, #f6f6f6); min-width: 0; }
.af-kpi.lead { background: var(--af-teal-soft); }
.af-kpi span { display: block; font-size: 13px; color: var(--af-muted); }
.af-kpi b { display: block; margin-top: 6px; font-size: clamp(20px, 1vw + 16px, 28px); font-weight: 600; letter-spacing: -.8px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.af-kpi small { display: block; margin-top: 4px; font-size: 12px; color: var(--af-faint); }
.af-dash-row { display: grid; gap: 16px; margin-top: 16px; }
@media (min-width: 900px) { .af-dash-row { grid-template-columns: 1.6fr 1fr; } }
.af-panel { border: 1px solid var(--af-line); border-radius: 16px; padding: 18px; min-width: 0; }
.af-panel h3 { font-size: 15px; font-weight: 500; letter-spacing: -.2px; margin: 0 0 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.af-funnel { margin: 0; padding: 0; list-style: none; }
.af-funnel li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 9px 0; font-size: 14px; }
.af-funnel li > b { font-variant-numeric: tabular-nums; font-weight: 600; }
.af-bar { grid-column: 1 / -1; height: 6px; border-radius: 6px; background: var(--color-surface-muted, #f6f6f6); overflow: hidden; }
.af-bar i { display: block; height: 100%; border-radius: 6px; background: var(--af-teal); }

.af-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -18px; padding: 0 18px; }
.af-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.af-table th { text-align: left; font-weight: 500; font-size: 12px; color: var(--af-faint); text-transform: uppercase; letter-spacing: .4px; padding: 0 12px 10px 0; white-space: nowrap; border-bottom: 1px solid var(--af-line); }
.af-table td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--af-line); white-space: nowrap; vertical-align: middle; }
.af-table tr:last-child td { border-bottom: 0; }
.af-table .num { text-align: right; }
.af-table td.wrap { white-space: normal; min-width: 150px; max-width: 220px; overflow-wrap: anywhere; }
.af-table .neg { color: var(--af-bad); }
.af-empty { padding: 28px 8px; text-align: center; color: var(--af-faint); font-size: 14px; }
.af-more { display: flex; justify-content: center; padding-top: 14px; }

/* ---------- terms + faq ---------- */
.af-terms-list { display: grid; gap: 0 48px; margin-top: 32px; }
@media (min-width: 900px) { .af-terms-list { grid-template-columns: 1fr 1fr; } }
.af-terms-list div { padding: 18px 0; border-bottom: 1px solid var(--af-line); }
.af-terms-list dt { font-weight: 500; font-size: 15px; }
.af-terms-list dd { margin: 6px 0 0; font-size: 14.5px; line-height: 1.6; color: var(--af-muted); }
.af-faq { margin-top: 32px; }
.af-faq details { border-bottom: 1px solid var(--af-line); padding: 6px 0; }
.af-faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 52px; cursor: pointer; list-style: none; font-size: clamp(15px, .3vw + 14px, 18px); font-weight: 500; letter-spacing: -.3px; }
.af-faq summary::-webkit-details-marker { display: none; }
.af-faq summary::after { content: "+"; font-size: 24px; font-weight: 300; color: var(--af-ink); transition: transform .2s; }
.af-faq details[open] summary::after { transform: rotate(45deg); }
.af-faq p { margin: 0 0 16px; font-size: 15px; line-height: 1.65; color: var(--af-muted); max-width: 820px; }

/* ---------- apply form ---------- */
.af-apply { display: grid; gap: 32px; padding: 12px; }
@media (min-width: 960px) { .af-apply { grid-template-columns: .9fr 1.1fr; gap: 12px; } }
.af-apply-copy { padding: 20px 16px; }
@media (min-width: 768px) { .af-apply-copy { padding: 36px; } }
.af-form { padding: 24px; border-radius: 18px; background: #fff; border: 1px solid var(--af-line); }
@media (min-width: 768px) { .af-form { padding: 32px; } }
.af-form-grid { display: grid; gap: 16px; }
@media (min-width: 600px) { .af-form-grid { grid-template-columns: 1fr 1fr; } .af-form-grid .full { grid-column: 1 / -1; } }
.af-form label > span:not(.af-prefix) { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; }
.af-form .af-check > span { margin: 0; font-weight: 400; }
.af-form label > span i { font-style: normal; font-weight: 400; color: var(--af-faint); }
.af-prefix { display: flex; align-items: stretch; }
.af-prefix b { display: inline-flex; align-items: center; padding: 0 12px; border: 1px solid var(--color-border-medium, #1a1a1a1f); border-right: 0; border-radius: 14px 0 0 14px; background: var(--color-surface-muted, #f6f6f6); color: var(--af-muted); font-size: 13px; font-weight: 400; white-space: nowrap; }
.af-prefix .af-input { border-radius: 0 14px 14px 0; text-transform: uppercase; }
.af-msg { margin-top: 14px; font-size: 14px; line-height: 1.5; }
.af-msg.err { color: var(--af-bad); }
.af-done { text-align: center; padding: 24px 8px; }
.af-done .af-icon { width: 56px; height: 56px; border-radius: 18px; }
.af-done .af-icon svg { width: 28px; height: 28px; }

/* ---------- dashboard page ---------- */
.af-app { padding: 104px 0 48px; min-height: 70vh; }
@media (min-width: 768px) { .af-app { padding: 136px 0 72px; } }
.af-signin { max-width: 460px; margin: 0 auto; }
.af-code { letter-spacing: 10px; font-size: 24px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.af-dash-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 24px; margin-bottom: 24px; }
.af-dash-head h1 { margin: 10px 0 0; font-weight: 500; letter-spacing: -1.4px; font-size: clamp(28px, 1.4vw + 22px, 40px); line-height: 1.1; }
.af-linkbox { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 16px; border: 1px solid var(--af-line); border-radius: 100px; background: #fff; min-width: 0; max-width: 100%; }
.af-linkbox code { font-family: var(--font-mono); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.af-share { display: grid; gap: 12px; margin-bottom: 16px; }
@media (min-width: 900px) { .af-share { grid-template-columns: 1fr 1fr; } }
.af-share .af-panel { display: flex; flex-direction: column; gap: 10px; }
.af-share-label { font-size: 13px; color: var(--af-muted); }
.af-rate-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--af-muted); }
.af-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 100px; background: var(--color-surface-muted, #f6f6f6); width: max-content; max-width: 100%; overflow-x: auto; }
.af-tab { border: 0; background: transparent; padding: 8px 16px; border-radius: 100px; font: inherit; font-size: 14px; color: var(--af-muted); cursor: pointer; white-space: nowrap; }
.af-tab[aria-selected="true"] { background: #fff; color: var(--af-text); box-shadow: 0 1px 3px #0000001a; }
.af-section-gap { margin-top: 16px; }
.af-payout-form { display: grid; gap: 12px; }
@media (min-width: 600px) { .af-payout-form { grid-template-columns: 180px 1fr auto; align-items: end; } }
.af-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; padding: 12px 20px; border-radius: 100px; background: var(--af-text); color: #fff; font-size: 14px; box-shadow: 0 10px 30px #0003; opacity: 0; pointer-events: none; transition: opacity .2s; }
.af-toast.show { opacity: 1; }
.af-hidden { display: none !important; }
.af-skel { height: 220px; border-radius: 20px; background: linear-gradient(90deg, #f3f3f3, #fafafa, #f3f3f3); background-size: 200% 100%; animation: af-shimmer 1.2s infinite; }
@keyframes af-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .af-skel { animation: none; } .af-btn, .af-faq summary::after { transition: none; } }
