/* Partner portal (space/partners.html and its pages) in grid v3: the program, the application form, the link, the
   figures and their chart, the tables of codes and sales, the marketing visuals. Plates, hairlines, sentence-case
   captions, figures in Martian Mono, no decorative numbering. Tokens of ../v3.css only. */
.pt-body { display: grid; gap: 22px; }
.pt-strip { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.pt-strip .sp-stat-sub { white-space: normal; }
.pt-facts .sp-stat-value { font-size: 1.2rem; }

/* the partner's own frame: a visitor who is not an approved partner has no entry at all, so no tab bar (it is hidden) */
.sp-tabs[hidden] { display: none; }

/* ---------- application ---------- */
.pt-form h2, .sp-panel h2 { margin: 0; font-size: 1.15rem; font-weight: 640; font-stretch: 110%; }
.pt-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; }
.pt-fields .field { margin-top: 8px; min-width: 0; }
.pt-fields .text-input, .pt-fields select { width: 100%; font-family: var(--f-sans); font-size: 15px; }
.pt-fields textarea.text-input { min-height: 96px; padding-top: 12px; resize: vertical; }
.pt-fields [data-field="message"], .pt-fields [data-field="paid_ads"] { grid-column: 1 / -1; }
.pt-fields .mono { font-family: var(--f-mono); text-transform: uppercase; }
.field[data-invalid="true"] .text-input, .field[data-invalid="true"] select { box-shadow: inset 0 0 0 1px var(--down); }
.pt-ads { border: 0; padding: 0; margin: 8px 0 0; }
.pt-radios { display: flex; gap: 10px; margin-top: 6px; }
.pt-radio {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; cursor: pointer; border: 0; border-radius: 10px;
  background: linear-gradient(180deg, var(--card-top), var(--card-bottom)); box-shadow: inset 0 0 0 1px var(--hair-2), 0 2px 0 var(--ledge-2);
}
.pt-radio:has(input:checked) { background: linear-gradient(180deg, var(--thumb-top), var(--thumb-bottom)); box-shadow: inset 0 0 0 1px var(--ring), 0 2px 0 var(--ledge-2); }
.pt-radio input { accent-color: var(--acc); }
.pt-terms { margin-top: 4px; }

/* ---------- link ---------- */
.pt-link-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pt-link-text { min-width: 0; padding: 12px 14px; font-size: var(--t-sm); overflow-wrap: anywhere; border: 0; border-radius: 10px; background: var(--well-top); box-shadow: inset 0 0 0 1px var(--hair-2); }
.pt-link-row .pt-link-text { flex: 1 1 260px; }
.pt-codes .pt-link-text { display: inline-block; padding: 4px 8px; font-size: var(--t-xs); }
.pt-link-cell { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* ---------- figures ---------- */
.pt-chart { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: end; gap: 3px; height: 120px; padding: 10px 2px 0; border-bottom: 1px solid var(--hair-2); }
.pt-col { display: flex; align-items: flex-end; height: 100%; }
.pt-bar { display: block; width: 100%; height: 100%; border-radius: 3px 3px 0 0; transform-origin: bottom; background: linear-gradient(180deg, var(--blue-hi), color-mix(in srgb, var(--acc) 45%, transparent)); }
.pt-recent { display: grid; margin: 0; padding: 0; list-style: none; }
.pt-recent li { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--hair); font-size: var(--t-sm); }
.pt-recent li:last-child { border-bottom: 0; }
.pt-st { font-size: var(--t-xs); color: var(--ink-2); }
.pt-st[data-status="available"], .pt-st[data-status="paid"] { color: var(--mood-ok); }
.pt-st[data-status="reversed"] { color: var(--mood-watch); }

/* ---------- tables (on a phone each row is a card) ---------- */
@media (min-width: 760px) {
  .pt-codes td, .pt-sales td { white-space: nowrap; }
}
.pt-sales .pt-kind { display: block; color: var(--ink-3); font-size: 11px; }
.pt-requests h3 { margin: 6px 0; font-size: var(--t-sm); color: var(--ink-2); }
.pt-requests ul { margin: 0; padding-inline-start: 18px; font-size: var(--t-sm); }
.pt-req-form { display: grid; gap: 4px; max-width: 460px; }
.pt-req-row { display: flex; align-items: flex-end; gap: 10px; }
.pt-req-row .field { flex: 1 1 auto; min-width: 0; }
.pt-req-form .text-input { width: 100%; font-family: var(--f-mono); text-transform: uppercase; }

/* ---------- marketing kit ---------- */
.pt-visuals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.pt-visual { margin: 0; grid-template-rows: minmax(0, 1fr) auto; }
.pt-visual[data-format="banner"] { grid-column: 1 / -1; }
.pt-canvas-box { display: grid; place-items: center; min-height: 340px; padding: 14px; border-radius: 10px; background: var(--well-top); box-shadow: inset 0 0 0 1px var(--hair-2); }
.pt-visual[data-format="banner"] .pt-canvas-box { min-height: 0; }
.pt-canvas { display: block; width: 100%; height: auto; max-height: 312px; object-fit: contain; }
.pt-visual[data-format="banner"] .pt-canvas { max-height: none; }
.pt-visual figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; font-size: var(--t-sm); color: var(--ink-2); }
.pt-texts { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.pt-texts li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 14px; border-radius: 12px; background: var(--cell); box-shadow: inset 0 0 0 1px var(--hair-2); }
.pt-texts p { margin: 0; font-size: var(--t-sm); line-height: 1.5; }

/* ---------- the program page (visitor): hero, terms, steps, cards, lists, questions ---------- */
.pt-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px 44px; align-items: stretch; padding-block: 6px 4px; }
.pt-hero-copy { display: grid; gap: 0; align-content: center; }
.pt-hero h1 { font-size: clamp(2.2rem, 1.4rem + 2.6vw, 3.6rem); font-weight: 660; font-stretch: 118%; line-height: 0.98; letter-spacing: -0.038em; text-wrap: balance; }
.pt-hero-lead { max-width: 52ch; margin-top: 18px; font-size: var(--t-lg); line-height: 1.55; color: var(--ink-2); }
.pt-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 26px; }
.pt-hero-actions .note { margin: 0; max-width: 34ch; color: var(--ink-3); }
.pt-apply { min-height: 54px; padding: 0 24px; font-size: 1rem; margin: 6px 6px 9px; }
.pt-hero-terms { display: grid; align-content: start; padding: 24px 26px 8px; border: 0; border-radius: 4px; background: var(--plate-bg); box-shadow: var(--plate-shadow); }
.pt-terms-h { margin: 0 0 12px; font-size: var(--t-xs); font-weight: 600; color: var(--ink-3); }
.pt-big { margin: 0; font: 500 clamp(3.4rem, 2.4rem + 3.6vw, 6rem)/0.95 var(--f-mono); font-stretch: 87.5%; letter-spacing: -0.04em; color: var(--white); }
.pt-big-l { margin: 10px 0 20px; font-size: var(--t-sm); color: var(--ink-2); }
.pt-ledger { display: grid; margin: 0; }
.pt-ledger > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--hair); }
.pt-ledger > div:first-child { border-top: 0; }
.pt-hero-terms .pt-ledger > div:first-child { border-top: 1px solid var(--hair); }
.pt-ledger dt { display: grid; gap: 2px; font-size: var(--t-sm); color: var(--ink); }
.pt-ledger dt small { font-size: var(--t-xs); color: var(--ink-3); }
.pt-hero-terms .pt-ledger dt { color: var(--ink-2); }
.pt-ledger dd { margin: 0; font-size: 1rem; font-weight: 500; text-align: end; }
.pt-ledger [data-tone="up"] dd { color: var(--up); }
.pt-disc { margin: 0; padding: 12px 0 16px; border-top: 1px solid var(--hair); font-size: var(--t-xs); color: var(--ink-3); }
.pt-sec { display: grid; gap: 18px; align-content: start; margin-top: 14px; }
.pt-two, .pt-faq { margin-top: 14px; }
.pt-sec .pt-faq { margin-top: 0; }
.pt-h2 { margin: 0; font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); font-weight: 640; font-stretch: 112%; letter-spacing: -0.03em; color: var(--ink); }
.pt-sub { margin: -8px 0 0; max-width: 62ch; font-size: var(--t-sm); line-height: 1.55; color: var(--ink-2); }
.pt-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 28px; margin: 0; padding: 0; list-style: none; }
.pt-steps li { position: relative; display: grid; gap: 8px; align-content: start; padding-top: 20px; border-top: 1px solid var(--hair-2); }
.pt-steps li::before { content: ""; position: absolute; top: -1px; inset-inline-start: 0; width: 36px; height: 2px; background: var(--acc); }
.pt-steps h3 { margin: 0; font-size: 1.05rem; font-weight: 640; font-stretch: 108%; }
.pt-steps p { margin: 0; max-width: 38ch; font-size: var(--t-sm); line-height: 1.55; color: var(--ink-2); }
.pt-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pt-card { display: grid; gap: 10px; align-content: start; padding: 20px; border: 0; border-radius: 12px; background: var(--cell); box-shadow: inset 0 0 0 1px var(--hair-2); }
.pt-card-ic { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 10px; color: var(--link); box-shadow: inset 0 0 0 1px var(--hair-2); }
.pt-card h3 { margin: 6px 0 0; font-size: 1rem; font-weight: 640; font-stretch: 106%; }
.pt-card p { margin: 0; font-size: var(--t-sm); line-height: 1.55; color: var(--ink-2); }
.pt-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 32px; align-items: start; }
.pt-check { display: grid; gap: 14px; padding-top: 18px; border-top: 1px solid var(--hair-2); }
.pt-check ul { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.pt-check li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; font-size: var(--t-sm); line-height: 1.5; }
.pt-check .sp-icon { margin-top: 2px; color: var(--link); }
.pt-faq { border-top: 1px solid var(--hair-2); }
.pt-faq details { border-bottom: 1px solid var(--hair); }
.pt-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 60px; padding: 12px 0; list-style: none; cursor: pointer; font-size: 1rem; font-weight: 600; font-stretch: 104%; }
.pt-faq summary::-webkit-details-marker { display: none; }
.pt-faq summary::after { content: ""; flex: none; width: 14px; height: 14px; background: linear-gradient(var(--ink-3), var(--ink-3)) center / 14px 1.5px no-repeat, linear-gradient(var(--ink-3), var(--ink-3)) center / 1.5px 14px no-repeat; transition: transform 160ms var(--ease-v3); }
.pt-faq details[open] summary::after { transform: rotate(45deg); }
.pt-faq summary:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.pt-faq details p { max-width: 70ch; margin: 0; padding: 0 0 18px; font-size: var(--t-sm); line-height: 1.6; color: var(--ink-2); }
.pt-form-head { display: grid; gap: 6px; }
.pt-form-head h2:focus, #ptTitle:focus { outline: none; }
.pt-form-head .note { margin: 0; max-width: 62ch; }
.pt-form .sp-actions .btn.primary { margin: 6px 6px 9px; }

/* ---------- application under review, refusal ---------- */
.pt-state { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 999px; font-size: var(--t-xs); font-weight: 560; color: var(--pale); background: var(--tint); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--link) 60%, transparent); }
.pt-next ol { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
.pt-next li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; align-items: start; }
.pt-next-n { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 50%; font-size: var(--t-xs); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--hair-3); }
.pt-next [data-done="true"] .pt-next-n { color: var(--white); background: var(--acc); box-shadow: 0 0 0 3px var(--tint); }
.pt-next h3 { margin: 4px 0 0; font-size: 1rem; font-weight: 640; }
.pt-next p { margin: 4px 0 0; font-size: var(--t-sm); line-height: 1.55; color: var(--ink-2); }
.pt-reason { margin: 0; padding-inline-start: 14px; border-inline-start: 2px solid var(--hair-3); font-size: var(--t-sm); line-height: 1.55; }

/* ---------- partner overview: balances and latest sales; an empty list ---------- */
.pt-split { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 22px; align-items: start; }
.pt-empty { justify-items: start; }
.pt-empty h2 { margin: 4px 0 0; font-size: 1.1rem; }
.pt-empty .note { margin: 0; max-width: 56ch; font-size: var(--t-sm); line-height: 1.55; }

@media (hover: hover) {
  .pt-radio:not(:has(input:checked)):hover { box-shadow: inset 0 0 0 1px var(--hair-3), 0 2px 0 var(--ledge-2); }
  .pt-faq summary:hover { color: var(--white); }
}
@media (max-width: 1100px) {
  .pt-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pt-visuals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .pt-hero, .pt-split { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .pt-faq summary::after { transition: none; }
}
@media (max-width: 760px) {
  .pt-fields, .pt-steps, .pt-cards, .pt-two, .pt-visuals { grid-template-columns: minmax(0, 1fr); }
  .pt-canvas-box { min-height: 0; }
  .pt-hero-actions .btn { flex: 1 1 100%; }
  .pt-req-row { flex-wrap: wrap; }
  .pt-req-row .btn { flex: 1 1 100%; }
  .pt-recent li { grid-template-columns: minmax(0, 1fr) auto; }
  .pt-recent li span:first-child { grid-column: 1 / -1; color: var(--ink-3); font-size: var(--t-xs); }
  .pt-texts li { grid-template-columns: minmax(0, 1fr); }
}
