/* Partner Hub on the HQ theme (public/static/hq/hq-theme.css, HQ theme v1). Only app-specific pieces live here.
 * Unlayered, so it wins over the theme's @layer: keep selectors scoped (no bare `a`, `input`, … rules). */

/* The one accent: NMI purple (#7a3ff1, from templates/_brand/nmi.json). */
:root { --hq-accent-hsl: 260 86% 60%; --ph-nmi-dark: #32165d; }

body { margin: 0; }
[hidden] { display: none !important; }
.hq-page a:not(.hq-btn):not(.hq-tile) { color: var(--hq-accent); font-weight: 600; text-decoration: none; }
.hq-page a:not(.hq-btn):not(.hq-tile):hover { text-decoration: underline; }
.hq-page code { background: var(--hq-subtle); padding: 1px 6px; border-radius: 6px; font-size: 13px; }
.hq-btn:disabled { opacity: .6; cursor: progress; }
.ph-btn-sm { height: 40px; padding: 0 16px; font-size: 14px; }

/* Logo mark: NMI's white wordmark on NMI dark purple. */
.ph-mark { background: var(--ph-nmi-dark); }
.ph-mark img { width: 28px; height: auto; display: block; }
.ph-mark--lg { width: 64px; height: 64px; border-radius: 18px; }
.ph-mark--lg img { width: 48px; }

/* Sidebar sign-out, styled like a nav item. */
.ph-signout { margin: 0; }
.ph-navbtn { display: flex; align-items: center; gap: var(--hq-gap-sm); width: 100%; padding: 10px 12px; border: 0; border-radius: var(--hq-radius-sm); background: none; color: var(--hq-muted); font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; }
.ph-navbtn:hover { background: var(--hq-subtle); color: var(--hq-text); }
.hq-sidebar .ph-signout { margin-top: auto; }
.hq-sidebar .hq-sidebar__foot { margin-top: 0; }
.hq-app[data-sidebar="closed"] .ph-navbtn { justify-content: center; padding: 10px; }
.hq-sidebar .ph-startover { margin-top: 2px; }

/* "Start over?" confirm. */
.ph-dialog { box-sizing: border-box; border: 0; border-radius: var(--hq-radius); padding: var(--hq-gap-lg); width: min(360px, calc(100vw - 32px)); background: var(--hq-surface); color: var(--hq-text); font-family: var(--hq-font); font-size: 15px; box-shadow: 0 20px 50px hsl(var(--hq-text-hsl) / .18); }
.ph-dialog::backdrop { background: hsl(var(--hq-text-hsl) / .35); }
.ph-dialog__q { margin: 0 0 var(--hq-gap); font-size: 17px; font-weight: 600; }
.ph-dialog .hq-actions { justify-content: flex-end; }

/* "From alpha.com · Use a different website" next to a scanned site. */
.ph-scanned { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0; font-size: 14px; color: var(--hq-muted); }
.ph-scanned strong { color: var(--hq-text); }
.ph-linkbtn { padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--hq-accent); cursor: pointer; }
.ph-linkbtn:hover { text-decoration: underline; }

/* Status lines */
.status { font-size: 14px; min-height: 1.2em; }
.status:empty { display: none; }
.status.ok { color: var(--hq-up); }
.status.err { color: var(--hq-down); }

/* ---- Path tiles (landing, existing, step 4): big, tappable links ---- */
a.hq-tile { text-decoration: none; cursor: pointer; }
a.hq-tile:hover { box-shadow: var(--hq-shadow-lift); transform: translateY(-1px); }
a.hq-tile .hq-tile__label::after { transform: rotate(-45deg); }
.ph-paths { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.ph-path { min-height: 220px; justify-content: flex-end; gap: 8px; padding: 28px; }
.ph-path__icon { width: 40px; height: 40px; margin-bottom: auto; padding: 9px; border-radius: 12px; background: var(--hq-accent-soft); color: var(--hq-accent); }
.ph-path .hq-tile__value { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Education: playlist tiles (titles wrap) and the embedded YouTube playlist player ---- */
.ph-edu-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.ph-edu { justify-content: flex-start; }
.ph-edu .ph-path__icon { margin-bottom: 16px; }
.ph-edu .hq-tile__value { font-size: 22px; white-space: normal; }
.ph-edu .hq-tile__note { white-space: normal; }
.ph-watch { display: flex; flex-direction: column; gap: var(--hq-gap); }
.ph-player { position: relative; aspect-ratio: 16 / 9; border-radius: var(--hq-radius); overflow: hidden; background: #000; box-shadow: var(--hq-shadow); }
.ph-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ph-empty { padding: 48px 24px; text-align: center; color: var(--hq-muted); background: var(--hq-subtle); border: 1px dashed var(--hq-border); border-radius: var(--hq-radius); }

/* ---- Progress stepper (new-partner setup and brand tool) ---- */
.ph-progress { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.ph-progress li { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding-top: 10px; border-top: 4px solid var(--hq-border); font-size: 13px; font-weight: 600; color: var(--hq-muted); }
.ph-progress li > a { color: inherit !important; font-weight: inherit !important; text-decoration: none !important; display: flex; align-items: center; gap: 8px; min-width: 0; }
.ph-progress li span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-progress li.done { border-top-color: var(--hq-accent-ring); color: var(--hq-text); }
.ph-progress li.current { border-top-color: var(--hq-accent); color: var(--hq-accent); }
.ph-progress__dot { flex: none; width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--hq-subtle); color: var(--hq-muted); font-size: 12px; }
.ph-progress li.done .ph-progress__dot { background: var(--hq-accent-soft); color: var(--hq-accent); }
.ph-progress li.current .ph-progress__dot { background: var(--hq-accent); color: var(--hq-on-accent); }

.ph-step { display: flex; flex-direction: column; gap: var(--hq-gap-xl); }
.ph-step .hq-title:focus { outline: none; }
.ph-stepnav { justify-content: space-between; }
.ph-stepnav:has(> :only-child) { justify-content: flex-end; }
.ph-step[data-step="2"] .ph-stepnav, .ph-step[data-step="3"] .ph-stepnav { justify-content: space-between; }

/* ---- Step 1: funnel of the steps ahead ---- */
.ph-funnel { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ph-funnel li { width: var(--w); display: flex; align-items: center; gap: var(--hq-gap); padding: 18px 24px; border-radius: var(--hq-radius); background: var(--c); color: var(--hq-on-accent); box-shadow: var(--hq-shadow); }
.ph-funnel li:nth-child(n+3) { color: var(--hq-text); }
.ph-funnel li strong { display: block; font-size: 17px; }
.ph-funnel li small { font-size: 13px; opacity: .85; }
.ph-funnel__n { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: hsl(0 0% 100% / .25); font-weight: 700; }
.ph-funnel li:nth-child(n+3) .ph-funnel__n { background: var(--hq-surface); color: var(--hq-accent); }

/* ---- Forms ---- */
.ph-wide { max-width: 860px; }
.ph-wide .hq-choices { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.ph-wide #volChoices { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.ph-inline { display: flex; gap: var(--hq-gap-sm); }
.ph-inline .hq-input { flex: 1; min-width: 0; }
.ph-file { padding-top: 12px; height: auto; min-height: 48px; }
.ph-sub { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--hq-muted); }
.ph-check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.ph-more > summary { cursor: pointer; font-weight: 600; color: var(--hq-accent); }
.ph-more[open] > summary { margin-bottom: var(--hq-gap); }
.hq-section > summary .hq-hint { font-weight: 400; margin-left: auto; margin-right: 12px; }
.ph-unit { position: relative; display: flex; align-items: center; }
.ph-unit > span { position: absolute; color: var(--hq-muted); pointer-events: none; }
.ph-unit > span:first-child { left: 16px; }
.ph-unit > span:last-child:not(:first-child) { right: 16px; }
.ph-unit > span:first-child + .hq-input { padding-left: 32px; }
.ph-rate { display: flex; align-items: center; gap: var(--hq-gap-sm); }
.ph-rate .ph-unit { width: 130px; }
.ph-rate .hq-input { padding-right: 36px; }
.ph-sample { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--hq-muted); background: var(--hq-subtle); border: 1px solid var(--hq-border); border-radius: 999px; padding: 1px 7px; vertical-align: middle; white-space: nowrap; }
.ph-badge { display: inline-block; margin-left: 8px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--hq-muted); background: var(--hq-subtle); border-radius: 999px; padding: 2px 8px; vertical-align: middle; }

/* ---- Docs groups and sandbox ---- */
.ph-docgroups { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: var(--hq-gap-lg); }
.ph-docgroup { display: flex; flex-direction: column; gap: 4px; }
.ph-sandbox { list-style: none; counter-reset: sb; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--hq-gap); }
.ph-sandbox li { counter-increment: sb; position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding-left: 52px; }
.ph-sandbox li::before { content: counter(sb); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--hq-accent-soft); color: var(--hq-accent); font-weight: 700; }

/* ---- Library ---- */
.ph-library { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--hq-gap); }
.ph-doc { display: flex; flex-direction: column; border: 1px solid var(--hq-border); border-radius: var(--hq-radius); overflow: hidden; background: var(--hq-surface); }
.ph-thumb { height: 300px; overflow: hidden; background: var(--hq-subtle); position: relative; }
.ph-thumb iframe { width: 816px; height: 1056px; border: 0; transform: scale(.3); transform-origin: 0 0; position: absolute; left: 50%; margin-left: -122.4px; top: 14px; pointer-events: none; background: #fff; box-shadow: var(--hq-shadow); }
.ph-doc__body { display: flex; flex-direction: column; gap: var(--hq-gap-sm); padding: 16px 18px 18px; }

/* ---- Brand tool ---- */
.ph-block { display: flex; flex-direction: column; gap: var(--hq-gap-lg); }
.ph-bigchoices .hq-choice > span { padding: 22px 20px; font-size: 16px; }
.ph-fromnew { display: flex; align-items: center; justify-content: space-between; gap: var(--hq-gap); padding: 14px 20px; font-weight: 600; flex-wrap: wrap; }
.ph-review { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; gap: var(--hq-gap-lg); align-items: start; }
.ph-kit { display: flex; flex-direction: column; gap: var(--hq-gap); }
.ph-kit .hq-section { box-shadow: none; }
.ph-kit .hq-section > summary { padding: 14px 18px; }
.ph-kit .hq-section__body { padding: 0 18px 18px; }
.ph-kit__swatches { display: flex; gap: 8px; }
.ph-notes:empty { display: none; }
.ph-note { margin: 0 0 6px; font-size: 13px; color: var(--hq-muted); background: var(--hq-subtle); border-radius: var(--hq-radius-sm); padding: 8px 12px; }
.ph-logo-box { min-height: 96px; border: 1px dashed var(--hq-border); border-radius: var(--hq-radius-sm); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 14px; background: var(--hq-surface); }
.ph-logo-box img { max-width: 100%; max-height: 70px; object-fit: contain; }
.ph-logo-box.dark .ph-src { color: #e6e6e6; }
.ph-colors { display: flex; flex-direction: column; gap: 8px; }
.ph-color { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.ph-color > span { width: 150px; display: flex; flex-direction: column; line-height: 1.25; }
.ph-color > span .hq-hint { font-size: 12px; }
.ph-derived { font-size: 12px; font-weight: 600; color: var(--hq-accent); }
.ph-color input[type=color] { width: 48px; height: 40px; border: 1px solid var(--hq-border); border-radius: 10px; padding: 3px; background: var(--hq-surface); }
.ph-color .hq-input { width: 110px; height: 40px; font-family: ui-monospace, monospace; font-size: 14px; }
.ph-swatches { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ph-swatch { width: 28px; height: 28px; border-radius: 8px; border: 1px solid hsl(0 0% 0% / .12); padding: 0; cursor: pointer; }
.ph-kit__swatches .ph-swatch { cursor: default; }
.ph-products { display: flex; flex-direction: column; gap: var(--hq-gap-sm); }
.ph-preview { position: sticky; top: var(--hq-gap); display: flex; flex-direction: column; gap: var(--hq-gap-sm); }
.ph-preview__bar { display: flex; align-items: center; gap: var(--hq-gap-sm); }
.ph-preview__bar .hq-input { max-width: 320px; }
.ph-frame { border: 1px solid var(--hq-border); border-radius: var(--hq-radius); overflow: hidden; background: var(--hq-subtle); width: 100%; max-width: 560px; aspect-ratio: 8.5 / 11; position: relative; box-shadow: var(--hq-shadow); }
.ph-frame iframe { width: 816px; height: 1056px; border: 0; transform-origin: 0 0; background: #fff; position: absolute; top: 0; left: 0; }
.ph-filebtn { position: relative; }

/* ---- Pricing ---- */
.ph-earn { display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: var(--hq-gap-lg); align-items: start; }
.ph-earn .hq-choices { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.ph-earn__result { display: flex; flex-direction: column; gap: var(--hq-gap); padding: var(--hq-gap-lg); border-radius: var(--hq-radius); background: var(--hq-subtle); }
.ph-earn__big { display: flex; flex-direction: column; gap: 6px; }
.ph-earn__big small { font-size: 16px; font-weight: 600; color: var(--hq-muted); }
.ph-breakdown > li { font-size: 14px; padding: 10px 0; }
.ph-breakdown > li:last-child { font-weight: 700; }
.ph-below { display: flex; flex-direction: column; gap: 4px; color: var(--hq-down); }
.ph-industry-info { display: flex; flex-direction: column; gap: 2px; }
.ph-next { display: flex; flex-direction: column; gap: var(--hq-gap-sm); border-color: var(--hq-accent-ring); }
.ph-next__title { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.ph-next p.hq-hint { margin: 0; }

/* ---- Sign-in ---- */
.ph-login { min-height: 100vh; display: grid; place-items: center; background: var(--hq-bg); font-family: var(--hq-font); color: var(--hq-text); }
.ph-login__card { width: min(400px, 92vw); display: flex; flex-direction: column; align-items: flex-start; gap: var(--hq-gap-lg); }
.ph-login .err { color: var(--hq-down); margin: 0; }
.ph-login .hq-btn { width: 100%; }

@media (max-width: 900px) {
  .ph-review, .ph-earn { grid-template-columns: 1fr; }
  .ph-preview { position: static; }
}
@media (max-width: 767px) {
  .ph-funnel li { width: 100%; }
  .ph-progress li > a > span:last-child, .ph-progress li > span:last-child { display: none; }
  .ph-progress li.current > a > span:last-child, .ph-progress li.current > span:last-child { display: inline; }
  .ph-progress li.current { flex: 3; }
  .ph-path { min-height: 160px; }
  .ph-wide .hq-choices { grid-template-columns: 1fr 1fr; }
  .ph-thumb iframe { margin-left: -122.4px; }
}
