/* /join and /partner/login (.au: an ink side with what we offer, or the photo, next to the form), the affiliates'
   dashboard /partner (.pd) and the error page visitors see. On top of site.css; copy buttons are in app.js. */

/* ---------- /join and /partner/login ---------- */
.au {
  position: relative; isolation: isolate; display: grid; min-height: 100vh; min-height: 100dvh; background: var(--surface);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto 1fr;
}
.au-bg { grid-area: 1 / 1 / 3 / 2; position: relative; overflow: hidden; background: var(--ink); box-shadow: inset -1px 0 var(--ink-sep); }
.au-glow { position: absolute; border-radius: 50%; }
.au-glow.one { width: 760px; height: 760px; left: -300px; top: -360px; background: radial-gradient(closest-side, var(--glow-1), transparent); animation: au-drift 16s ease-in-out infinite alternate; }
.au-glow.two { width: 700px; height: 700px; right: -340px; bottom: -300px; background: radial-gradient(closest-side, var(--glow-2), transparent); animation: au-drift 20s ease-in-out infinite alternate-reverse; }
.au-grid { position: absolute; inset: 0; background-image: linear-gradient(var(--ink-grid) 1px, transparent 1px), linear-gradient(90deg, var(--ink-grid) 1px, transparent 1px); background-size: 56px 56px; -webkit-mask-image: radial-gradient(ellipse 70% 55% at 25% 20%, #000 10%, transparent 70%); mask-image: radial-gradient(ellipse 70% 55% at 25% 20%, #000 10%, transparent 70%); }
@keyframes au-drift { to { transform: translate3d(70px, 50px, 0) scale(1.08); } }
.au-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%; }
.au-bg.with-photo::after { content: ""; position: absolute; inset: 0; background: var(--photo-fade); }

.au-intro, .au-more { grid-column: 1; position: relative; z-index: 1; padding-inline: clamp(28px, 5.5vw, 80px); }
.au-intro { grid-row: 1; padding-top: 28px; color: var(--on-ink); }
.au-intro-body { max-width: 540px; padding-top: clamp(48px, 9vh, 96px); }
.au-more { grid-row: 2; display: flex; flex-direction: column; gap: 40px; padding-top: 48px; padding-bottom: 30px; color: var(--on-ink-2); }
.au-more > :last-child { margin-top: auto; }
.au-more-wide { gap: 24px; }
.au-more-wide > :first-child { margin-top: auto; }  /* over the photo: keep clear of the face */
.au-more-wide > :last-child { margin-top: 0; }
.au-top { grid-area: 1 / 2 / 2 / 3; z-index: 3; align-self: start; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px 16px; padding: 26px clamp(24px, 4vw, 56px) 0; font-size: .94rem; color: var(--muted); }
.au-alt { font-weight: 650; color: var(--brand-text); }
.au-alt:hover { color: var(--text); }
.lp .au-top .region-switch, .lp .au-top .region-switch a + a { border-color: var(--field-line); }
.lp .au-top .region-switch a { color: var(--text-2); }
.lp .au-top .region-switch a:hover { background: var(--surface-2); color: var(--text); }
.lp .au-top .region-switch a.on { background: var(--brand-soft); color: var(--brand-text); }
.lp .au-top .lp-theme { border-color: var(--field-line); background: var(--surface); color: var(--text-2); }
.lp .au-top .lp-theme:hover { border-color: var(--field-line-hover); background: var(--surface-2); color: var(--text); }
.au-main { grid-area: 1 / 2 / 3 / 3; display: flex; padding: 96px clamp(24px, 5vw, 72px) 56px; }
.au-form { width: min(100%, 440px); margin: auto; }

.au-pill { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 24px; padding: 5px 13px 5px 11px; border-radius: 999px; font-size: .84rem; font-weight: 600; color: var(--ink-pill); background: rgba(45, 212, 191, .1); border: 1px solid rgba(45, 212, 191, .26); }
.au-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(45, 212, 191, .18); }
.lp .au-display { margin: 0 0 18px; font-size: clamp(2.3rem, 3.7vw, 3.3rem); line-height: 1.05; letter-spacing: -.04em; font-weight: 750; color: var(--on-ink-hi); text-wrap: balance; }
.au-lead { margin: 0; max-width: 33em; font-size: 1.12rem; line-height: 1.65; color: var(--on-ink-2); }

.lp .au-label { margin: 0 0 16px; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.au-offers { display: grid; gap: 12px; max-width: 560px; }
.au-offer { display: flex; gap: 18px; align-items: flex-start; padding: 18px; border-radius: 18px; background: var(--ink-panel); border: 1px solid var(--ink-sep); }
.au-offer-img { flex: none; width: 72px; height: 72px; border-radius: 14px; object-fit: cover; }
.au-offer-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; margin-bottom: 4px; }
.au-offer-head b { color: var(--on-ink-hi); font-size: 1.06rem; letter-spacing: -.01em; }
.au-offer-head a { font-size: .86rem; color: var(--on-ink-3); }
.au-offer-head a:hover { color: var(--accent-2); }
.au-offer p { margin: 0; font-size: .93rem; line-height: 1.55; }
.au-offer p b { color: var(--accent-2); }
.au-offer .au-small { margin-top: 4px; font-size: .85rem; color: var(--on-ink-3); }
.au-steps { max-width: 560px; }
.au-steps ol { list-style: none; margin: 0; padding: 0; counter-reset: au; display: grid; gap: 14px; }
.au-steps li { position: relative; display: flex; gap: 14px; align-items: flex-start; counter-increment: au; font-size: .96rem; line-height: 1.5; }
.au-steps li span { padding-top: 3px; }
.au-steps li::before { content: counter(au); flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 700; color: var(--accent-2); background: rgba(45, 212, 191, .1); border: 1px solid rgba(45, 212, 191, .32); }
.au-steps li:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 32px; bottom: -12px; width: 1px; background: rgba(45, 212, 191, .28); }
.au-ticks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: 520px; }
.au-ticks li { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; font-size: .93rem; font-weight: 600; color: var(--on-ink-hi); background: var(--ink-chip); border: 1px solid var(--ink-line); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.au-ticks .i { color: var(--accent); }
.au-foot { margin: 0; font-size: .86rem; color: var(--on-ink-3); }
.au-foot a { color: var(--on-ink-2); text-decoration: underline; text-underline-offset: 3px; }

.lp .au-form h2 { margin: 0 0 24px; font-size: 1.9rem; line-height: 1.15; letter-spacing: -.03em; font-weight: 750; }
.au-sub { margin: -16px 0 28px; color: var(--muted); }
.au-sep { margin: 26px 0 22px; border-top: 1px solid var(--line); }
.au-form .lp-btn.block { height: 52px; margin-top: 8px; font-size: 1rem; }
.au-fine { margin: 18px 0 0; font-size: .9rem; line-height: 1.6; color: var(--muted); }
.au-fine a { color: var(--brand-text); font-weight: 600; }
.au-fine a:hover { text-decoration: underline; text-underline-offset: 3px; }
.au-closed { padding: 30px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface-2); }
.au-closed p { margin: 0; color: var(--text-2); }
.au-closed a { color: var(--brand-text); font-weight: 600; }
.au-fine-tight { margin-top: 6px; }

/* sign-in: "Forgot password?" on the password's label row */
.pf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 7px; }
.lp .pf .pf-head label { margin: 0; }
.pf-forgot { font-size: .88rem; font-weight: 600; color: var(--brand-text); white-space: nowrap; }
.pf-forgot:hover { text-decoration: underline; text-underline-offset: 3px; }

/* /join: that email already has an account */
.au-exists { margin: 0 0 26px; padding: 20px 20px 18px; border-radius: 16px; border: 1px solid var(--ok-line); background: var(--brand-soft); }
.au-exists-head { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-size: 1.06rem; font-weight: 700; color: var(--text); }
.au-exists-head .i { flex: none; color: var(--brand-text); }
.au-exists p:not(.au-exists-head) { margin: 0; font-size: .95rem; line-height: 1.55; color: var(--text-2); overflow-wrap: anywhere; }
.au-exists-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.au-exists-actions .lp-btn { flex: 1 1 150px; }

/* /partner/forgot after sending */
.au-sent-icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 20px; border-radius: 16px; color: var(--brand-text); background: var(--brand-soft); border: 1px solid var(--ok-line); }
.au-sent p { margin: 0 0 10px; color: var(--text-2); line-height: 1.6; overflow-wrap: anywhere; }
.au-sent .au-small { margin-bottom: 22px; font-size: .9rem; color: var(--muted); }
.lp .au-sent h2 { margin-bottom: 12px; }
.au-sent .au-fine { margin: 18px 0 0; }

/* Chinese reads better without the tight Latin tracking */
.lp:lang(zh-Hant-HK) .au-form h2, .lp:lang(zh-Hant-HK) .au-error-card h1 { letter-spacing: 0; }
.lp:lang(zh-Hant-HK) :is(.au-label, .pd-kicker) { letter-spacing: .08em; }

@keyframes au-rise { from { opacity: 0; transform: translateY(14px); } }
.au-intro-body > *, .au-form, .au-more > * { animation: au-rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.au-intro-body > :nth-child(2) { animation-delay: .07s; }
.au-intro-body > :nth-child(3), .au-form { animation-delay: .14s; }
.au-more > :nth-child(1) { animation-delay: .22s; }
.au-more > :nth-child(2) { animation-delay: .3s; }
.au-more > :nth-child(3) { animation-delay: .38s; }

/* the error page (templates/error.html) for visitors */
.au-error { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; gap: 48px; padding: 28px clamp(20px, 5vw, 64px) 48px; color: var(--on-ink); background: radial-gradient(50% 60% at 15% 0%, var(--glow-1), transparent 70%), radial-gradient(40% 60% at 100% 100%, var(--glow-2), transparent 70%), var(--ink); }
.au-error-card { width: min(100%, 520px); margin: auto; padding: 40px; border-radius: 24px; color: var(--text); background: var(--surface); box-shadow: var(--pop-shadow); }
.lp .au-error-card h1 { margin: 0 0 10px; font-size: 1.9rem; line-height: 1.15; letter-spacing: -.03em; font-weight: 750; }
.au-error-card p { margin: 0 0 28px; color: var(--text-2); }
.au-error-card div { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- the dashboard ---------- */
.pd { min-height: 100vh; background: var(--surface-2); }
.pd .lp-btn:hover .i { transform: none; }
.pd-nav { position: sticky; top: 0; z-index: 40; color: var(--on-ink-hi); background: var(--ink-glass); -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px); box-shadow: 0 1px 0 var(--ink-sep); }
.pd-nav-in { height: 64px; display: flex; align-items: center; gap: 20px; }
.pd-menu { display: flex; gap: 2px; margin-left: 14px; }
.pd-menu a { padding: 7px 12px; border-radius: 8px; font-size: .93rem; font-weight: 500; color: var(--on-ink-2); transition: color .2s, background-color .2s; }
.pd-menu a:hover { color: var(--on-ink-hi); background: var(--ink-hover); }
.pd-menu a.on { color: var(--on-ink-hi); background: var(--ink-on); font-weight: 600; }
.pd-nav-end { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.pd-who + .region-switch { margin-left: 6px; }
.pd-nav-end form { margin: 0; }
.pd-who { min-width: 0; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; color: var(--on-ink-3); }

.pd-hero { position: relative; isolation: isolate; overflow: hidden; padding: 56px 0 136px; color: var(--on-ink); background: var(--ink); }
.pd-hero-bg { position: absolute; inset: 0; z-index: -1; background: radial-gradient(42% 130% at 92% 0%, var(--glow-1), transparent 70%), radial-gradient(34% 110% at 0% 100%, var(--glow-2), transparent 70%); }
.pd-hero-bg::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--ink-grid) 1px, transparent 1px), linear-gradient(90deg, var(--ink-grid) 1px, transparent 1px); background-size: 48px 48px; -webkit-mask-image: radial-gradient(ellipse 50% 90% at 85% 0%, #000, transparent 75%); mask-image: radial-gradient(ellipse 50% 90% at 85% 0%, #000, transparent 75%); }
.pd-hero-in { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 24px 32px; }
.pd-kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.pd-kicker::before { content: ""; width: 20px; height: 2px; border-radius: 2px; background: currentColor; }
.lp .pd-hero h1 { margin: 0; font-size: clamp(2.1rem, 4.2vw, 3rem); line-height: 1.08; letter-spacing: -.04em; font-weight: 750; color: var(--on-ink-hi); overflow-wrap: anywhere; }
.pd-sub { margin: 10px 0 0; font-size: 1.08rem; color: var(--on-ink-2); }
.pd-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* the publisher picker in the header: all publishers, or one */
.pd-pub { display: flex; align-items: center; gap: 10px; margin: 0; }
.lp .pd-pub label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: .88rem; font-weight: 600; color: var(--on-ink-2); white-space: nowrap; }
.lp .pd-pub select { height: 46px; min-width: 200px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--ink-line); background-color: var(--ink-fill); color: var(--on-ink-hi); font: inherit; font-weight: 600; cursor: pointer; }
.lp .pd-pub select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(20, 184, 166, .25); }

.pd-main { position: relative; z-index: 2; display: grid; gap: 24px; margin-top: -88px; padding-bottom: 64px; }
.pd-main > .flash { margin: 0; box-shadow: var(--card-shadow); }
@keyframes pd-rise { from { opacity: 0; transform: translateY(16px); } }
.pd-hero-in > *, .pd-main > * { animation: pd-rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.pd-hero-in > :nth-child(2), .pd-main > :nth-child(2) { animation-delay: .06s; }
.pd-main > :nth-child(3) { animation-delay: .12s; }
.pd-main > :nth-child(4) { animation-delay: .18s; }
.pd-main > :nth-child(5) { animation-delay: .24s; }

.pd-card { min-width: 0; padding: 28px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--card-shadow); }
.pd-card.flush { padding: 0; overflow: hidden; }
.pd-card-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 14px 20px; margin-bottom: 22px; }
.pd-card.flush .pd-card-head { padding: 26px 28px 0; }
.lp .pd-card h2 { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 1.22rem; line-height: 1.3; letter-spacing: -.02em; font-weight: 700; }
.lp .pd-card > h2 { margin-bottom: 24px; }
.pd-card-head p { margin: 6px 0 0; font-size: .94rem; color: var(--muted); }
.pd-ico { flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: var(--brand-text); background: var(--brand-soft); }
.pd-empty { display: flex; align-items: center; gap: 14px; padding: 22px; border-radius: 16px; border: 1px dashed var(--field-line); color: var(--muted); }
.pd-empty p { margin: 0; }

/* notices */
.pd-notice { display: flex; align-items: flex-start; gap: 18px; padding: 26px 28px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--card-shadow); }
.pd-notice-ico { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; }
.pd-notice.amber .pd-notice-ico { color: var(--amber); background: rgba(245, 158, 11, .14); }
.pd-notice.red .pd-notice-ico { color: var(--red); background: rgba(239, 68, 68, .12); }
.pd-notice.blue .pd-notice-ico { color: var(--blue); background: rgba(99, 102, 241, .12); }
.lp .pd-notice h2 { margin: 4px 0 6px; font-size: 1.18rem; letter-spacing: -.015em; font-weight: 700; }
.pd-notice p { margin: 0; color: var(--text-2); }
.pd-notice p a { color: var(--brand-text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.pd-resend { margin-top: 16px; }
.pd-progress { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pd-progress li { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px 6px 10px; border-radius: 999px; font-size: .86rem; font-weight: 600; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); }
.pd-progress li.done { color: var(--brand-text); background: var(--brand-soft); border-color: transparent; }
.pd-progress li.now { color: var(--amber); background: rgba(245, 158, 11, .13); border-color: transparent; }

/* numbers */
.pd-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pd-stat { min-width: 0; padding: 22px 24px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--card-shadow); }
.pd-stat.money { grid-column: span 2; }
.pd-stat-label { display: flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 600; color: var(--muted); }
.pd-stat-label .i { color: var(--brand-text); }
.pd-stat-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; }

/* GBP / HKD / USD: the currency the earnings are added up in */
.pd-cur { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.pd-cur a { padding: 3px 10px; border-radius: 7px; font-size: .78rem; font-weight: 700; letter-spacing: .02em; color: var(--muted); transition: color .2s, background-color .2s; }
.pd-cur a:hover { color: var(--text); }
.pd-cur a.on { color: var(--brand-text); background: var(--surface); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.pd-stat small.pd-fx { margin-top: 12px; font-size: .8rem; line-height: 1.5; }
.pd-num { display: block; margin-top: 10px; font-size: 2.15rem; line-height: 1.1; font-weight: 750; letter-spacing: -.035em; font-variant-numeric: tabular-nums; color: var(--text); overflow-wrap: anywhere; }
.pd-stat small { display: block; margin-top: 6px; font-size: .86rem; color: var(--muted); }
.pd-split { display: flex; gap: 2px; height: 8px; margin: 16px 0 12px; border-radius: 999px; overflow: hidden; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.pd-split i { display: block; height: 100%; }
.pd-key { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: .86rem; color: var(--muted); }
.pd-key li { display: flex; align-items: center; gap: 7px; }
.pd-key i { width: 9px; height: 9px; border-radius: 3px; }
.pd-key b { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }
.pd-stat i.hold { background: #f59e0b; }
.pd-stat i.owed { background: #14b8a6; }
.pd-stat i.paid { background: #6366f1; }

/* chart */
.pd-legend { display: flex; gap: 18px; padding-top: 8px; font-size: .86rem; color: var(--muted); }
.pd-legend i { display: inline-block; width: 10px; height: 10px; margin-right: 7px; border-radius: 3px; vertical-align: -1px; }
.pd-legend .c, .pd-day .c { background: rgba(20, 184, 166, .26); }
.pd-legend .s, .pd-day .s { background: linear-gradient(180deg, #2dd4bf, #0f766e); }
.pd-chart { position: relative; }
.pd-bars { display: flex; align-items: flex-end; gap: 5px; height: 160px; border-bottom: 1px solid var(--line); }
.pd-day { position: relative; flex: 1; min-width: 0; height: 100%; display: flex; align-items: flex-end; }
.pd-day i { display: block; transform-origin: bottom; animation: pd-grow .9s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--n, 0) * 16ms + .2s); }
.pd-day .c { width: 100%; height: var(--h); min-height: 3px; border-radius: 6px 6px 2px 2px; transition: background-color .2s; }
.pd-day .s { position: absolute; bottom: 0; left: 22%; right: 22%; height: var(--h); border-radius: 4px 4px 1px 1px; }
.pd-day:hover .c { background: rgba(20, 184, 166, .45); }
@keyframes pd-grow { from { transform: scaleY(0); } }
.pd-chart-empty { position: absolute; inset: 0 0 1px; display: grid; place-items: center; margin: 0; font-size: .95rem; color: var(--muted); }
.pd-axis { display: flex; justify-content: space-between; margin-top: 10px; font-size: .8rem; color: var(--muted); }

/* links and codes */
.pd-links, .pd-codes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.pd-link { padding: 18px 20px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); }
.pd-link.off { opacity: .6; }
.pd-link-top { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 12px; }
.pd-chip { padding: 1px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; color: var(--text-2); background: var(--surface); border: 1px solid var(--line); }
.pd-clicks { margin-left: auto; font-size: .88rem; color: var(--muted); }
.pd-clicks b { color: var(--text); font-variant-numeric: tabular-nums; }
.pd-copy { display: flex; align-items: center; gap: 8px; }
.pd-url { flex: 1; min-width: 0; height: 42px; display: flex; align-items: center; padding: 0 14px; border-radius: 11px; border: 1px solid var(--field-line); background: var(--field); font-family: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace; font-size: .9rem; white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.pd-copy .lp-btn { height: 42px; }
.pd-version { display: block; margin-bottom: 6px; font-size: .8rem; font-weight: 650; color: var(--muted); }
.pd-copy + .pd-version { margin-top: 12px; }
.pd-link-sub { margin: 10px 0 0; font-size: .86rem; color: var(--muted); overflow-wrap: anywhere; }
.pd-code { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; padding: 14px 16px 14px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); }
.pd-code.off { opacity: .65; }
.lp .pd-code code { padding: 8px 14px; border-radius: 10px; font-family: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace; font-size: 1.05rem; font-weight: 700; letter-spacing: .06em; color: var(--brand-text); background: var(--brand-soft); border: 1px dashed rgba(20, 184, 166, .5); }
.pd-code-info { flex: 1; min-width: 180px; display: flex; flex-direction: column; font-size: .9rem; line-height: 1.45; color: var(--muted); }
.pd-code-info b { font-size: .97rem; color: var(--text); }

/* "make a link / code": folded under its list */
.pd-make { margin-top: 16px; border-radius: 16px; border: 1px dashed var(--field-line); transition: border-color .2s, background-color .2s; }
.pd-make[open] { border-style: solid; border-color: var(--line); background: var(--surface-2); }
.pd-make > summary { display: flex; align-items: center; gap: 10px; padding: 16px 18px; cursor: pointer; list-style: none; font-weight: 650; color: var(--brand-text); }
.pd-make > summary::-webkit-details-marker { display: none; }
.pd-make > summary::after { content: ""; width: 8px; height: 8px; margin: -4px 4px 0 auto; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .25s ease; }
.pd-make[open] > summary::after { margin-top: 4px; transform: rotate(-135deg); }
.pd-make > form { padding: 4px 18px 20px; }
.pd-hint { margin: -6px 0 18px; font-size: .84rem; line-height: 1.5; color: var(--muted); }
.pd-more { margin: 0 0 20px; }
.pd-more > summary { display: inline-block; cursor: pointer; font-size: .92rem; font-weight: 600; color: var(--brand-text); }
.pd-more > summary:hover { text-decoration: underline; text-underline-offset: 3px; }
.pd-more[open] > summary { margin-bottom: 16px; }

/* posts and banners */
/* the overview's publishers */
.pd-pubs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.pd-pubcard { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); }
.pd-pubcard.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.pd-pubcard-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pd-pubcard-head b { font-size: 1.05rem; }
.pd-pubcard-site { display: inline-flex; align-items: center; gap: 5px; width: fit-content; font-size: .85rem; color: var(--brand-text); }
.pd-pubcard p { margin: 4px 0 0; font-size: .9rem; line-height: 1.55; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pd-pubcard-foot { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .86rem; color: var(--muted); }
.pd-more-link { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; font-weight: 650; color: var(--brand-text); }
.pd-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 28px 22px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }

.pd-kit + .pd-kit { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); }
.lp .pd-kit-name { margin: 0 0 16px; font-size: 1.1rem; font-weight: 700; }
.pd-kit-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-bottom: 22px; padding: 14px 16px; border-radius: 14px; background: var(--brand-soft); font-size: .92rem; }
.lp .pd-kit-bar label { margin: 0; font-weight: 600; color: var(--text); }
.lp .pd-kit-bar select { width: auto; min-width: 200px; height: 40px; padding: 0 12px; border: 1px solid var(--field-line); border-radius: 10px; background: var(--field); color: var(--text); font: inherit; }
.pd-kit-tip { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); }
.pd-kit-tip .i { color: var(--brand-text); }
.pd-kit-tip a { color: var(--brand-text); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }
.pd-lang + .pd-lang { margin-top: 28px; }
.lp .pd-lang-name { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.lp .pd-lang-name::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.pd-pics { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pd-pic { display: flex; flex-direction: column; min-width: 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.pd-pic-img { display: flex; align-items: center; justify-content: center; height: 240px; padding: 16px; }
.pd-pic-img img { display: block; max-width: 100%; max-height: 208px; border-radius: 8px; box-shadow: 0 10px 24px -12px rgba(11, 19, 36, .45); transition: transform .3s ease; }
.pd-pic-img:hover img { transform: scale(1.03); }
.pd-pic-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--surface); font-size: .84rem; font-weight: 600; color: var(--text-2); }
.pd-posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pd-post { display: flex; flex-direction: column; min-width: 0; padding: 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.pd-post-text { flex: 1; margin: 0 0 16px; white-space: pre-line; overflow-wrap: anywhere; font-size: .92rem; line-height: 1.6; color: var(--text-2); }
.pd-post-text [data-kit-link] { color: var(--brand-text); font-weight: 600; }
.pd-post-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-mini { padding: 1px 8px; border-radius: 6px; border: 1px solid var(--field-line); background: var(--surface); color: var(--text-2); font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; }
.pd-mini:hover { border-color: var(--field-line-hover); color: var(--text); }
.lp .pd-card-head code { padding: 1px 6px; border-radius: 6px; font-size: .85em; color: var(--brand-text); background: var(--brand-soft); }

/* how you earn */
.pd-how { list-style: none; margin: 0; padding: 0; counter-reset: pd; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pd-how li { position: relative; counter-increment: pd; padding: 20px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); font-size: .92rem; line-height: 1.55; color: var(--text-2); }
.pd-how li::before { content: counter(pd); display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 14px; border-radius: 50%; font-size: .85rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, #2dd4bf, #0f766e); }
.pd-how b { display: block; margin-bottom: 4px; font-size: 1rem; color: var(--text); }
.pd-how a { color: var(--brand-text); font-weight: 600; }
.lp .pd-how code { padding: 1px 6px; border-radius: 6px; font-size: .85em; color: var(--brand-text); background: var(--brand-soft); }
.pd-dest { overflow-wrap: anywhere; color: var(--text-2); }

/* tables */
.pd-table-wrap { overflow-x: auto; }
.lp .pd-table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.lp .pd-table th { padding: 12px 16px; text-align: left; white-space: nowrap; font-size: .75rem; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); border-block: 1px solid var(--line); }
.lp .pd-table td { padding: 15px 16px; vertical-align: middle; border-bottom: 1px solid var(--line); }
.lp .pd-table tr:last-child td { border-bottom: 0; }
.lp .pd-table :is(th, td):first-child { padding-left: 28px; }
.lp .pd-table :is(th, td):last-child { padding-right: 28px; }
.lp .pd-table tr:hover td { background: var(--surface-2); }
.lp .pd-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lp .pd-table .strong { font-weight: 650; }
.lp .pd-table .sub { display: block; font-size: .84rem; color: var(--muted); }
.lp .pd-table .empty { padding: 40px 28px; text-align: center; color: var(--muted); }
.pd-card.flush .pd-table { margin-top: 0; }
.pd-card.flush .pd-card-head + .pd-table-wrap { margin-top: 22px; }
.pd-card.flush .pd-card-head { margin-bottom: 0; }

.pd-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.pd-foot { padding: 28px 0 44px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.pd-foot-in { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px 24px; }
.pd-foot a { color: var(--brand-text); font-weight: 600; }

/* ---------- smaller screens ---------- */
@media (max-width: 1000px) {
  .pd-who { display: none; }
  /* the menu becomes a row of tabs under the top bar, scrolling sideways if it must */
  .pd-nav-in { height: auto; flex-wrap: wrap; row-gap: 0; padding-top: 10px; }
  .pd-menu { order: 3; width: 100%; margin: 6px 0 0; padding-bottom: 8px; overflow-x: auto; scrollbar-width: none; }
  .pd-menu::-webkit-scrollbar { display: none; }
  .pd-menu a { flex: none; white-space: nowrap; }
  .pd-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pd-grid2 { grid-template-columns: minmax(0, 1fr); }
  .pd-how { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pd-posts { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .au { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; }
  .au-bg { grid-area: 1 / 1 / 2 / 2; }
  .au-photo, .au-bg.with-photo::after { display: none; }
  .au-intro { padding: 18px 20px 56px; }
  .au-intro-body { padding-top: 40px; }
  .lp .au-display { font-size: clamp(2rem, 8.4vw, 2.6rem); }
  .au-lead { font-size: 1.02rem; }
  .au-top { grid-area: 1 / 1 / 2 / 2; padding: 18px 20px 0; gap: 14px; }
  .au-q, .au-alt-wide { display: none; }
  .au-alt { color: var(--on-ink-hi); }
  .lp .au-top .region-switch, .lp .au-top .region-switch a + a { border-color: var(--ink-line); }
  .lp .au-top .region-switch a { color: var(--on-ink-2); }
  .lp .au-top .region-switch a:hover { background: var(--ink-hover); color: var(--on-ink-hi); }
  .lp .au-top .region-switch a.on { background: var(--ink-on); color: var(--on-ink-hi); }
  .lp .au-top .lp-theme { border-color: var(--ink-line); background: var(--ink-fill); color: var(--on-ink-2); }
  .au-main { grid-area: 2 / 1 / 3 / 2; position: relative; z-index: 2; margin-top: -24px; padding: 32px 20px 48px; border-radius: 24px 24px 0 0; background: var(--surface); }
  .au-form { margin: 0 auto; }
  .au-more { grid-area: 3 / 1 / 4 / 2; padding: 48px 20px 30px; background: var(--ink); }
  .au-more-wide { display: none; }
}
@media (max-width: 640px) {
  .lp .pf-row { grid-template-columns: minmax(0, 1fr); }
  .lp .au-form h2 { font-size: 1.6rem; }
  .au-error-card { padding: 28px 22px; }
  .pd-nav-in { column-gap: 12px; }
  .pd-out { display: none; }  /* "Sign out" is the icon alone */
  .pd-nav-end .lp-btn { padding: 0 11px; }
  .pd-hero { padding: 36px 0 108px; }
  .pd-sub { font-size: 1rem; }
  .pd-hero-actions { width: 100%; }
  .pd-hero-actions .lp-btn { flex: 1; }
  .pd-pub { flex: 1 1 100%; }
  .lp .pd-pub select { flex: 1; min-width: 0; }
  .pd-main { gap: 16px; margin-top: -76px; padding-bottom: 48px; }
  .pd-card { padding: 22px 18px; border-radius: 18px; }
  .pd-card.flush .pd-card-head { padding: 22px 18px 0; }
  .lp .pd-table :is(th, td):first-child { padding-left: 18px; }
  .lp .pd-table :is(th, td):last-child { padding-right: 18px; }
  .pd-notice { padding: 22px 18px; gap: 14px; border-radius: 18px; }
  .pd-notice-ico { width: 40px; height: 40px; border-radius: 12px; }
  .pd-stats { gap: 12px; }
  .pd-stat { padding: 18px; border-radius: 18px; }
  .pd-stat.money { grid-column: 1 / -1; }
  .pd-num { font-size: 1.75rem; }
  .pd-bars { height: 120px; gap: 2px; }
  .pd-link { padding: 16px; }
  .pd-copy { flex-wrap: wrap; }
  .pd-url { flex-basis: 100%; }
  .pd-copy .lp-btn { flex: 1; }
  .pd-make > form { padding: 4px 16px 18px; }
  .pd-how { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .pd-pics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pd-pic-img { height: 170px; padding: 10px; }
  .pd-pic-img img { max-height: 150px; }
  .pd-pic-foot { flex-direction: column; align-items: stretch; text-align: center; }
  .pd-kit-bar select { flex: 1; min-width: 0; }
  .pd-how li { padding: 16px; }
  .pd-sales thead { display: none; }
  .pd-sales tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "w e" "w st" "d s"; gap: 2px 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
  .pd-sales tr:last-child { border-bottom: 0; }
  .lp .pd-sales td, .lp .pd-sales td:is(:first-child, :last-child) { padding: 0; border: 0; background: none; }
  .lp .pd-sales tr:hover td { background: none; }
  .pd-sales .w { grid-area: w; font-weight: 600; }
  .pd-sales .w .sub { font-weight: 400; }
  .pd-sales .e { grid-area: e; }
  .pd-sales .st { grid-area: st; justify-self: end; }
  .pd-sales .d, .pd-sales .s { margin-top: 6px; font-size: .85rem; color: var(--muted); }
  .pd-sales .d { grid-area: d; }
  .pd-sales .s { grid-area: s; font-weight: 400; }
  .pd-sales .s::before { content: attr(data-label) " "; }
  .lp .pd-sales .empty { grid-column: 1 / -1; padding: 24px 0; }
}
@media (max-width: 380px) {
  .pd-stats { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .au-glow, .au-intro-body > *, .au-form, .au-more > *, .pd-hero-in > *, .pd-main > *, .pd-day i { animation: none; }
}
