/* NoxTools · design 03 "Tool Launcher" · assets/auth-preview.css — "Peek Inside" (the owner's choice, design lab
   choices/login/fable-2; built 1 Dec 2026)
   The right-hand panel of the three guest screens Sign in, Forgot password and Reset password (and nothing else: only
   those pages load this file). Load it after base.css and auth.css. The page supplies its own
   <aside class="auth-aside pk-aside"> and shell.js puts it into the split frame instead of the violet brand panel.
   Instead of the brand panel it shows a PREVIEW OF THE MEMBER AREA: a small, faithful dashboard window drawn with the
   theme's own parts (sidebar, header, greeting, subscriptions, launcher with real tool logos), where every personal
   detail is a grey skeleton bar; under it the newest "now available" card and the three facts. Phones and tablets have
   no panel: a slim "Peek inside" strip under the form shows the first logos and the real tool count instead.
   Markup: the real theme prints it on the server (_auth-preview.phtml); the prototype pages build the window, the facts
   and the strip from the demo data (auth-preview.js). The same classes in both.
   Names: pk- ("peek"). The sign-up page ("Picklist", signup/page.css) has pk- classes too (.pk-nav, .pk-search, .pk-bar
   …); the two stylesheets are never loaded on the same page, so keep it that way (or rename) if that ever changes.
   Sections: 1 tokens · 2 pane · 3 mini dashboard · 4 callout, facts, link · 5 phone strip · 6 motion */

/* ---------- 1 · tokens (the pane and its glow; everything else uses base.css tokens) ---------- */
:root {
  --pk-pane-bg: #F4F1FB;
  --pk-glow-1: rgba(139, 92, 246, .22);
  --pk-glow-2: rgba(239, 68, 68, .09);
  --pk-dots: rgba(109, 40, 217, .18);
  --pk-win-bg: var(--bg);
}
html[data-theme="dark"] {
  --pk-pane-bg: #121219;
  --pk-glow-1: rgba(139, 92, 246, .30);
  --pk-glow-2: rgba(239, 68, 68, .10);
  --pk-dots: rgba(167, 139, 250, .20);
}

/* ---------- 2 · the pane (desktop only: auth.css shows .auth-aside from 1024 px, sticky, full height) ---------- */
.pk-pane {
  position: relative; isolation: isolate; height: 100%; overflow: hidden; display: flex; flex-direction: column; justify-content: center;
  gap: 24px; padding: 40px clamp(28px, 3vw, 44px); border-radius: 20px; border: 1px solid var(--border);
  background: var(--pk-pane-bg); container: pane / inline-size;
}
.pk-pane::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(640px 380px at 90% -5%, var(--pk-glow-1), transparent 65%),
    radial-gradient(520px 360px at -10% 105%, var(--pk-glow-2), transparent 65%);
}
.pk-pane::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .55;
  background-image: radial-gradient(var(--pk-dots) 1px, transparent 1px); background-size: 16px 16px;
  -webkit-mask-image: radial-gradient(70% 55% at 75% 15%, #000, transparent); mask-image: radial-gradient(70% 55% at 75% 15%, #000, transparent);
}
.pk-copy { max-width: 480px; }
.pk-pill {
  display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px 0 10px; border-radius: 999px;
  border: 1px solid var(--accent-border); background: var(--surface); color: var(--accent-text);
  font-size: 12.5px; font-weight: 600; white-space: nowrap; box-shadow: var(--shadow-xs);
}
.pk-pill .ic { width: 14px; height: 14px; }
.pk-title { margin-top: 16px; font-size: clamp(26px, 2.3vw, 32px); line-height: 1.15; font-weight: 700; letter-spacing: -.028em; color: var(--text); }
.pk-text { margin-top: 10px; font-size: 14.5px; line-height: 1.6; color: var(--text-2); }   /* text-2, not muted: the pane is tinted (measured 4.4:1 with muted) */

/* ---------- 3 · the mini dashboard (decorative: aria-hidden; a window clipped with a fade at the bottom) ---------- */
.pk-stage { position: relative; padding-bottom: 26px; }    /* room for the callout that hangs below the window */
.pk-stage.no-callout { padding-bottom: 0; }                 /* no visible "now available" page: no card, so no room for it */
/* the window's height follows the screen (everything else in the pane needs ~430 px); what it shows follows its height
   (container queries below: a short window drops the subscriptions card, a very short one the greeting too) */
.pk-win {
  position: relative; height: clamp(300px, 100vh - 430px, 520px); display: grid; grid-template-columns: 148px minmax(0, 1fr);
  overflow: hidden; border-radius: 16px; border: 1px solid var(--border); background: var(--pk-win-bg); box-shadow: var(--shadow-lg);
  container: win / size;
}
.pk-win::after { content: ""; position: absolute; inset: auto 0 0 0; height: 80px; z-index: 2; pointer-events: none; background: linear-gradient(transparent, var(--pk-win-bg)); }
.pk-win .ic { flex: none; }
@container win (min-width: 620px) { .pk-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container win (max-height: 440px) { .pk-sub + .pk-sub { display: none; } }
@container win (max-height: 400px) { .pk-card { display: none; } }
@container win (max-height: 340px) { .pk-greet { display: none; } .pk-win::after { height: 48px; } }
/* a narrow pane wraps the text and the facts onto more lines, so the window gives up a little height */
@container pane (max-width: 500px) { .pk-win { height: clamp(300px, 100vh - 470px, 520px); } }

/* sidebar */
.pk-rail { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 12px 8px; border-right: 1px solid var(--border); background: var(--sidebar-bg); }
.pk-brand { display: flex; align-items: center; gap: 7px; height: 24px; padding: 0 6px; font: 700 12.5px/1 var(--font); letter-spacing: -.01em; color: var(--text); white-space: nowrap; }
.pk-brand img { width: 18px; height: 18px; flex: none; }
.pk-nav { display: flex; flex-direction: column; gap: 2px; }
.pk-nav li { display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 8px; border-radius: 7px; font: 500 11px/1 var(--font); color: var(--text-2); white-space: nowrap; }
.pk-nav li .ic { width: 13px; height: 13px; color: var(--muted); }
.pk-nav li > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pk-nav li.is-active { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.pk-nav li.is-active .ic { color: inherit; }
.pk-nav li.is-promo { color: var(--accent-text); }
.pk-nav li.is-promo .ic { color: inherit; }
.pk-tag { flex: none; margin-left: auto; height: 15px; padding: 0 4px; border-radius: 4px; background: var(--accent); color: var(--on-accent); font: 700 8.5px/15px var(--font); letter-spacing: .05em; }

/* header + content */
.pk-body { min-width: 0; display: flex; flex-direction: column; }
.pk-top { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 44px; padding: 0 14px; border-bottom: 1px solid var(--border); background: var(--surface); }
.pk-st { display: inline-flex; align-items: center; gap: 7px; height: 28px; min-width: 0; padding: 0 8px 0 9px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.pk-st .ic { width: 13px; height: 13px; }
.pk-st > span:not(.pk-keys) { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pk-keys { display: inline-flex; align-items: center; gap: 3px; margin-left: 4px; font-size: 10.5px; color: var(--muted); }
.pk-keys kbd { height: 17px; min-width: 17px; padding: 0 4px; border-radius: 5px; font-size: 9.5px; }
.pk-top-right { flex: none; display: flex; align-items: center; gap: 10px; color: var(--muted); }
.pk-top-right .ic { width: 15px; height: 15px; }
/* the light / dark button shows the icon of the other mode, like the real header (both are in the markup) */
html[data-theme="dark"] .pk-top-right .pk-moon, html:not([data-theme="dark"]) .pk-top-right .pk-sun { display: none; }
.pk-avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft-2); box-shadow: inset 0 0 0 1px var(--accent-border); }
.pk-main { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px 0; }

/* greeting row: "Welcome back" + a skeleton bar where the name goes, the page's two real buttons */
.pk-greet { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pk-h1 { display: flex; align-items: center; gap: 8px; font: 600 15px/20px var(--font); letter-spacing: -.015em; color: var(--text); white-space: nowrap; }
.pk-bar { display: inline-block; height: 8px; border-radius: 999px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--border); }
.pk-bar.thin { display: block; height: 6px; margin-top: 7px; }
.pk-bar.w-40 { width: 40px; } .pk-bar.w-90 { width: 90px; } .pk-bar.w-120 { width: 120px; } .pk-bar.w-180 { width: 180px; max-width: 100%; }
.pk-actions { flex: none; display: flex; gap: 6px; }
.pk-btn { display: inline-flex; align-items: center; height: 26px; padding: 0 9px; border-radius: 7px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: 600 10.5px/1 var(--font); white-space: nowrap; }
.pk-btn.primary { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.pk-btn.xs { height: 22px; padding: 0 7px; font-size: 10px; }

/* "Active subscriptions" card: dots + skeleton bars (no plan names, dates or prices: those are personal) */
.pk-card { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-xs); overflow: hidden; }
.pk-card-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--border); font: 600 11.5px/16px var(--font); color: var(--text); }
.pk-sub { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 12px; }
.pk-sub + .pk-sub { border-top: 1px solid var(--border); }
.pk-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.pk-dot.amber { background: var(--amber); }
.pk-pill-sk { flex: none; width: 56px; height: 16px; border-radius: 999px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--border); }
.pk-sub .pk-btn { margin-left: auto; }

/* launcher: title, search box, category chips, tool tiles with the real logos */
.pk-launch { display: flex; flex-direction: column; gap: 8px; }
.pk-h2 { font: 600 13px/18px var(--font); color: var(--text); }
.pk-search { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px 0 11px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--muted); font-size: 12px; box-shadow: var(--shadow-xs); }
.pk-search .ic { width: 14px; height: 14px; }
.pk-search > span:not(.pk-keys) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-search .pk-keys { margin-left: 0; gap: 5px; }
.pk-chips { display: flex; gap: 6px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, #000 70%, transparent 97%); mask-image: linear-gradient(90deg, #000 70%, transparent 97%); }
.pk-chip { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font: 500 11px/1 var(--font); white-space: nowrap; }
.pk-chip .ic { width: 12px; height: 12px; color: var(--muted); }
.pk-chip.on { background: var(--text); border-color: var(--text); color: var(--surface); }
.pk-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 2px; }   /* 3 per row only in a wide window (above) */
.pk-tile { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-xs); overflow: hidden; }
.pk-tile.is-hit { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring), var(--shadow-md); }   /* the first tile shows the "lit" look of the launcher */
.pk-plate { height: 56px; margin: 4px 4px 0; padding: 0 12px; border-radius: 6px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--plate); filter: var(--plate-filter); }
.pk-plate img { width: 100%; height: 26px; object-fit: scale-down; filter: url(#logoClean); }
.pk-plate .logo-fallback, .pk-strip-logos .logo-fallback { font-size: 12px; white-space: nowrap; }   /* a tool without a logo (or a logo that failed): its name */
.pk-tile-foot { display: flex; align-items: center; gap: 6px; margin-top: 4px; padding: 7px 8px 8px 10px; border-top: 1px solid var(--border); }
.pk-tile-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pk-tile-line { display: flex; align-items: center; gap: 4px; min-width: 0; }
.pk-tile-name { min-width: 0; font: 600 11.5px/15px var(--font); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-new { flex: none; display: inline-flex; align-items: center; height: 14px; padding: 0 4px; border-radius: 4px; border: 1px solid var(--b-violet-bd); background: var(--b-violet-bg); color: var(--b-violet-fg); font: 700 8.5px/1 var(--font); letter-spacing: .03em; }
.pk-tile-cat { font: 400 11px/14px var(--font); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-go { flex: none; display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 6px 0 7px; border-radius: 6px; background: var(--surface-3); color: var(--text-2); font: 600 10px/1 var(--font); }
.pk-go .ic { width: 11px; height: 11px; }
.pk-tile.is-hit .pk-go { background: var(--accent); color: var(--on-accent); }

/* narrower panes (1024–1280 px screens): icon-only sidebar like the real collapsed rail, then 2 tiles per row */
@container pane (max-width: 560px) {
  .pk-actions .pk-btn:not(.primary) { display: none; }
}
@container pane (max-width: 500px) {
  .pk-win { grid-template-columns: 48px minmax(0, 1fr); }
  .pk-rail { padding: 12px 6px; }
  .pk-brand { justify-content: center; padding: 0; }
  .pk-brand > span, .pk-nav li > span, .pk-tag { display: none; }
  .pk-nav li { justify-content: center; padding: 0; }
  .pk-new { display: none; }
}
@container pane (max-width: 430px) {
  .pk-st > span:not(.pk-keys) { display: none; }
  .pk-main { padding: 12px 12px 0; }
}

/* ---------- 4 · the "new tools" card over the window's edge, the facts, the link ---------- */
.pk-callout {
  position: absolute; left: 18px; bottom: 0; z-index: 3; display: flex; align-items: center; gap: 10px; max-width: min(340px, calc(100% - 36px));
  padding: 10px 14px 10px 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-lg);
}
.pk-callout:empty { display: none; }
.pk-co-ic { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--accent-border); background: var(--accent-soft); color: var(--accent-text); }
.pk-co-ic .ic { width: 15px; height: 15px; }
.pk-co-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; font-size: 12.5px; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }
.pk-co-text strong { font-size: 12.5px; font-weight: 600; color: var(--text); }

/* three equal columns, but never narrower than a fact's big no-wrap line (4 Dec 2026: "Since 2020" is 103 px wide and
   the middle column at a 1024 px screen had 97 px; it takes a few px from the other two there, wider screens unchanged) */
.pk-facts { display: grid; grid-template-columns: repeat(3, minmax(min-content, 1fr)); padding-top: 20px; border-top: 1px solid var(--border); }
.pk-facts:empty { display: none; }
.pk-facts li { min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 0 14px; }
.pk-facts li:first-child { padding-left: 0; }
.pk-facts li + li { border-left: 1px solid var(--border); }
.pk-facts strong { font-size: 19px; line-height: 26px; font-weight: 700; letter-spacing: -.015em; color: var(--text); white-space: nowrap; }
.pk-facts span { font-size: 12.5px; line-height: 1.4; color: var(--text-2); }
.pk-more { margin-top: -6px; font-size: 13.5px; }
.pk-more a { display: inline-flex; align-items: center; gap: 5px; padding: 4px 6px; margin: -4px -6px; border-radius: 6px; color: var(--accent-text); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.pk-more a:hover { text-decoration-thickness: 2px; }
.pk-more .ic { width: 15px; height: 15px; }
/* touch screens (tablets in landscape show the panel): the panel's link gets a 44 px tap frame that changes nothing visible */
@media (pointer: coarse) {
  .pk-more a { position: relative; }
  .pk-more a::before { content: ""; position: absolute; inset: -10px -4px; }
}

/* short laptop screens: the pane keeps the window and the facts, drops the text */
@media (min-width: 1024px) and (max-height: 760px) {
  .pk-pane { gap: 18px; padding-top: 28px; padding-bottom: 28px; }
  .pk-text, .pk-more { display: none; }
  .pk-title { margin-top: 12px; font-size: 24px; }
  .pk-win { height: clamp(300px, 100vh - 330px, 400px); }
  .pk-facts { padding-top: 14px; }
}

/* ---------- 5 · phones and tablets: a slim "Peek inside" strip under the form (no pane there) ---------- */
.pk-strip { display: none; }
@media (max-width: 1023.98px) {
  .pk-strip { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; padding: 14px 16px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-xs); }
  /* the column's width without the frame too (JavaScript off: no .auth--split rule), so the row of logos never widens
     the page (it measured 698 px on a 390 px phone); with the frame this is the same width the frame gives */
  .pk-strip { width: 100%; max-width: 400px; }
  .pk-strip:empty { display: none; }
}
.pk-strip-head { display: flex; align-items: center; gap: 6px; font: 600 11px/14px var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pk-strip-head .ic { width: 14px; height: 14px; }
.pk-strip-logos { display: flex; gap: 8px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, #000 78%, transparent); mask-image: linear-gradient(90deg, #000 78%, transparent); }
.pk-strip-logos li { flex: none; width: 104px; height: 40px; display: flex; align-items: center; justify-content: center; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--plate); filter: var(--plate-filter); overflow: hidden; }
.pk-strip-logos img { width: 100%; height: 20px; object-fit: scale-down; filter: url(#logoClean); }
.pk-strip-text { font-size: 13px; line-height: 1.5; color: var(--muted); }
.pk-strip-text strong { color: var(--text); font-weight: 600; }

/* ---------- 6 · motion: the window and its card rise in once (auth-preview.js adds html.pk-enter while the shell still
   holds transitions off for its first two frames and removes it a moment later; never with prefers-reduced-motion, and
   not when those frames are already over, so a panel already on screen never fades out) ---------- */
.pk-stage { transition: opacity .55s ease-out, transform .55s ease-out; }
.pk-callout { transition: opacity .5s ease-out .18s, transform .5s ease-out .18s; }
html.pk-enter .pk-stage { opacity: 0; transform: translateY(12px); }
html.pk-enter .pk-callout { opacity: 0; transform: translateY(8px); }
