/* The partner program page (/partners) and the partner's own page (/partner). On top of site.css. */
.lede { color: var(--muted); max-width: 62ch; margin: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.stat .n { font-family: var(--display); font-size: 32px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat .k { color: var(--muted); font-size: 14px; }
form.stack, .stack { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 14px; }
.field .hint, .hint { font-size: 13px; color: var(--faint); }
.field input, .field textarea, .field select { font: inherit; font-size: 16px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 10px; padding: 10px 12px; min-height: 44px; width: 100%; box-sizing: border-box; }
.field textarea { resize: vertical; min-height: 80px; }
.err { font-size: 14px; color: var(--warn-ink); background: var(--warn-bg); border-radius: 10px; padding: 10px 12px; }
.err[hidden], [hidden] { display: none !important; }
.ok-note { font-size: 14px; color: #0E5A44; background: #DDF3E8; border-radius: 10px; padding: 10px 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--muted); }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.code-row { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); overflow: hidden; }
.code-row .code-prefix { display: flex; align-items: center; padding: 0 2px 0 12px; color: var(--faint); font-size: 15px; white-space: nowrap; }
.field .code-row input { border: 0; border-radius: 0; padding-left: 2px; min-width: 0; }
.partner-apply { flex: 1 1 380px; max-width: 520px; margin-top: 28px; }
.partner-apply h2 { font-size: 26px; }
.row { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; border-radius: 999px; padding: 3px 10px; background: var(--surface-2); color: var(--ink); white-space: nowrap; }
.pill.good { background: #DDF3E8; color: #0E5A44; }
.pill.warn { background: var(--warn-bg); color: var(--warn-ink); }
.pill.bad { background: #FBE3DC; color: #8A2E12; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table-wrap th, .table-wrap td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table-wrap th { font-weight: 600; color: var(--muted); font-size: 13px; }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap td.num, .table-wrap th.num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { color: var(--muted); border: 1px dashed var(--line); border-radius: 14px; padding: 22px; }

/* The partner's own page. */
.portal { max-width: 1080px; margin: 0 auto; padding: 32px max(20px, env(safe-area-inset-right)) 72px max(20px, env(safe-area-inset-left)); display: flex; flex-direction: column; gap: 28px; }
.portal h1 { font-size: clamp(28px, 3.4vw, 40px); }
.portal h2 { font-size: 21px; }
.portal .center { max-width: 460px; margin: 40px auto; width: 100%; }
.portal-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.portal-tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.portal-tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.link-box { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.link-box input { flex: 1 1 260px; font: inherit; font-family: var(--mono); font-size: 15px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 10px; padding: 10px 12px; min-height: 44px; }
.setup-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.setup-steps li { display: flex; gap: 14px; align-items: flex-start; border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: var(--paper); }
.setup-steps .mark { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: var(--muted); }
.setup-steps li[data-done="true"] .mark { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.setup-steps .body { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.agreement-text { max-height: 340px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: 4px 18px; background: var(--surface); font-size: 14.5px; }
.agreement-text h2 { font-size: 17px; margin: 18px 0 6px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 999px; font-size: 15px; z-index: 50; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.linkish { border: 0; background: none; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .split { grid-template-columns: 1fr; } }
input[type="file"] { font: inherit; font-size: 15px; }
