/* tokens.css: the design tokens of the lavender redesign (Figma file J0PZnBiEFbukaUGPCysNv5, page Foundations) as CSS variables.
   It holds: colour, type, space, radius, shadow, motion and layout tokens and the self-hosted font. It must not hold: rules for components (components.css) or pages.
   Colour rule from the design: this palette only. No green, amber or red: a status is told by its label and its shape, never by colour alone. */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/PlusJakartaSans-Latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* colour */
  --scroll-thumb: #CFC6FF; --scroll-thumb-hover: #7160F2; --scroll-track-thumb: #C8C0F2; --scroll-on-dark: #5B4BFF; /* scrollbar */
  --ink: #0D0B2D;
  --accent: #5B4BFF;
  --secondary: #A78BFA;
  --surface: #E6E0FF;
  --bg: #F7F8FF;
  --violet: #7160F2;
  --surface-strong: #CFC6FF;
  --border-strong: #C8C0F2;
  --white: #FFFFFF;
  --text: var(--ink);
  --text-muted: #5A5780;
  --border: #E2DDFA;
  --primary: var(--violet);
  --primary-text: var(--white);
  --focus: var(--accent);
  --overlay: rgba(13, 11, 45, 0.45);

  /* type */
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 2rem;
  --lh-tight: 1.25;
  --lh-body: 1.55;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* space (4 px steps), radius, shadow, motion */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(13, 11, 45, 0.06), 0 1px 3px rgba(91, 75, 255, 0.08);
  --shadow-2: 0 8px 24px rgba(13, 11, 45, 0.12), 0 2px 6px rgba(91, 75, 255, 0.1);
  --t-fast: 120ms;
  --t-base: 200ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);

  /* layout */
  --sidebar-w: 248px;
  --topbar-h: 56px;
  --content-max: 1120px;
  --z-nav: 20;
  --z-modal: 50;
  --z-toast: 60;
}

/* base.css: the reset, page typography, the app shell (sidebar, top bar, main) and the three screen sizes (desktop 1440, tablet 820, mobile 390).
   It holds: element rules and the shell layout. It must not hold: component looks (components.css). */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-sm); /* the design's body text is 14px */
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: 24px; line-height: 32px; font-weight: var(--fw-bold); } /* the design's Heading 1 */
h2 { font-size: 18px; line-height: 26px; font-weight: var(--fw-semibold); } /* Heading 2 */
h3 { font-size: 15px; line-height: 22px; font-weight: var(--fw-semibold); } /* Heading 3 */
a { color: var(--accent); text-underline-offset: 3px; }
img, svg { max-width: 100%; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r-sm); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: var(--s-3); top: -4rem; background: var(--ink); color: var(--white); padding: var(--s-2) var(--s-4); border-radius: var(--r-sm); z-index: var(--z-toast); }
.skip-link:focus { top: var(--s-3); }

/* the shell (Figma): desktop = a 248 px sidebar; tablet = a 64 px icon rail; phone = a top bar, the page and a bottom tab bar with a big "+" */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--bg-soft, var(--surface)); border-right: 1px solid var(--border); padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 6px 14px; font-weight: var(--fw-semibold); font-size: 18px; line-height: 26px; color: var(--ink); text-decoration: none; }
.nav { display: flex; flex-direction: column; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-group { padding: 8px 0 2px 14px; font-size: 11px; line-height: 16px; font-weight: var(--fw-semibold); color: var(--text-muted); letter-spacing: 0.02em; }
.nav a { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 14px; border-radius: 12px; color: var(--text-muted); text-decoration: none; font-size: 14px; font-weight: var(--fw-medium); transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.nav a:hover { background: var(--surface); color: var(--ink); transform: translateX(2px); }
.nav a[aria-current="page"] { background: var(--surface); color: var(--ink); }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sidebar > nav { flex: 1 0 auto; } .sidebar > .admin-view, .sidebar > .sidebar-user, .sidebar > .brand { flex: none; } /* a short screen scrolls the menu; it never squeezes a button smaller than its words */
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 10px; background: var(--white); border: 1px solid var(--border); border-radius: 12px; }
.sidebar-user strong { display: block; font-size: 12px; line-height: 18px; font-weight: var(--fw-medium); } .sidebar-user .linklike { font-size: 11px; font-weight: var(--fw-semibold); color: var(--text-muted); text-decoration: none; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-strong); color: var(--ink); font-weight: var(--fw-bold); font-size: 13px; flex: none; }
.topbar, .tabbar { display: none; }
.main { padding: 28px 28px var(--s-7); }
.main-inner { max-width: var(--content-max); margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.main:focus { outline: none; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }

@media (max-width: 1023px) {  /* tablet: the sidebar shrinks to a narrow rail: each icon keeps its word under it, so nobody has to guess what to press */
  .shell { grid-template-columns: 100px minmax(0, 1fr); }
  .sidebar { padding: 12px 6px; align-items: stretch; } .brand { padding: 4px 0 12px; justify-content: center; } .brand span, .nav-group { display: none; }
  .nav a { flex-direction: column; justify-content: center; gap: 4px; height: auto; min-height: 56px; padding: 8px 2px; text-align: center; font-size: 11px; line-height: 13px; border-radius: 12px; }
  .nav a span { display: block; overflow-wrap: normal; word-break: normal; } .nav a:hover { transform: none; } .nav-group + .nav { margin-bottom: 6px; }
  .sidebar-user { flex-direction: column; gap: 2px; padding: 6px 2px; border: 0; background: none; text-align: center; } .sidebar-user strong { display: none; } .sidebar-user .linklike { white-space: nowrap; }
  .admin-view { height: auto; min-height: 44px; padding: 10px 6px; font-size: 12px; line-height: 15px; white-space: normal; text-align: center; }
  .main { padding: 24px 24px var(--s-6); }
}
@media (max-width: 639px) {  /* phone: top bar, page, bottom tab bar */
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); padding-bottom: 76px; } /* a short page must not stretch the top bar row */
  .sidebar { display: none; }
  .topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: var(--z-nav); height: 56px; padding: 0 16px; background: var(--bg); }
  .topbar-mark { display: flex; } .topbar-title { flex: 1; font-size: 20px; line-height: 28px; font-weight: var(--fw-bold); } .topbar .avatar { width: 32px; height: 32px; }
  .tabbar { display: flex; align-items: flex-end; justify-content: space-around; position: fixed; inset: auto 0 0 0; z-index: var(--z-nav); height: 68px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: var(--white); border-top: 1px solid var(--border); box-shadow: 0 -6px 18px rgba(13, 11, 45, 0.06); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 56px; height: 52px; padding: 0 10px; border-radius: 14px; color: var(--text-muted); text-decoration: none; font-size: 11px; font-weight: var(--fw-semibold); transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
  .tabbar a .ico { width: 22px; height: 22px; } .tabbar a[aria-current="page"] { background: var(--surface); color: var(--ink); } .tabbar a:active { transform: scale(0.94); }
  .tabbar .tab-plus { width: 52px; height: 52px; min-width: 0; padding: 0; margin-top: -14px; border-radius: 50%; background: var(--accent); color: var(--white); box-shadow: 0 8px 18px rgba(91, 75, 255, 0.4); } .tabbar .tab-plus .ico { width: 26px; height: 26px; }
  .main { padding: 8px 16px var(--s-6); }
  .page-title, .page-head:has(> .page-title:only-child) { display: none; } /* the top bar already says which page this is */
}
.more { display: flex; flex-direction: column; gap: 14px; } .more-title { display: none; }
.more-list { list-style: none; margin: 0; padding: 4px 0; display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--border); border-radius: 16px; }
.more-list a { display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-decoration: none; color: var(--ink); font-weight: var(--fw-semibold); } .more-list li + li { border-top: 1px solid var(--border); }
.more-list i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--surface); color: var(--accent); } .more-list span { flex: 1; } .more-list .chev { color: var(--text-muted); width: 16px; }
.more-out { display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 16px; background: var(--white); border: 1px solid var(--border); border-radius: 16px; font: inherit; font-weight: var(--fw-semibold); color: var(--ink); cursor: pointer; }
@media (min-width: 640px) { .more-title { display: block; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
[hidden] { display: none !important; }

/* one themed scrollbar for the whole product: a thin lavender pill, a darker one inside dark areas */
html { color-scheme: light; scrollbar-width: thin; scrollbar-color: var(--scroll-track-thumb) var(--surface); scrollbar-gutter: stable; } /* a light lavender track and thumb, even when the browser or system is dark */
::-webkit-scrollbar { width: 12px; height: 12px; } ::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 999px; border: 3px solid transparent; background-clip: content-box; transition: background-color 160ms; }
::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover); background-clip: content-box; } ::-webkit-scrollbar-corner { background: transparent; }
.site-foot, .modal-root { scrollbar-color: var(--scroll-on-dark) transparent; }
.mode-switch { display: flex; gap: var(--s-1); margin: 0 var(--s-4) var(--s-3); padding: var(--s-1); background: var(--white); border: 1px solid var(--border); border-radius: var(--r-md); }
.mode-switch button { flex: 1; min-height: 32px; border: 0; border-radius: var(--r-sm); background: transparent; font: inherit; font-size: 12px; white-space: nowrap; color: var(--text); cursor: pointer; }
.mode-switch button[aria-pressed="true"] { background: var(--primary); color: var(--primary-text); font-weight: var(--fw-semibold); }
@media (min-width: 820px) and (max-width: 1099px) { .mode-switch { display: none; } }
.cp-sprite { position: absolute; }

/* ---- More list: profile card, help rows (buttons look like the link rows) and the small print ---- */
.more-me { display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-decoration: none; color: var(--ink); background: var(--white); border: 1px solid var(--border); border-radius: 16px; }
.more-me .avatar { width: 44px; height: 44px; font-size: 18px; } .more-me span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.more-me strong, .more-me small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .more-me small { color: var(--text-muted); } .more-me .chev { color: var(--text-muted); width: 16px; }
.more-list button { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border: 0; background: none; font: inherit; color: var(--ink); font-weight: var(--fw-semibold); text-align: left; cursor: pointer; }
.more-list .pip-face { width: 28px; height: 28px; } .more-legal { margin: 0; text-align: center; font-size: 13px; color: var(--text-muted); } .more-legal a { color: inherit; }
.tabbar a { position: relative; } .tab-badge { position: absolute; top: 2px; left: 50%; margin-left: 8px; min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--violet); color: var(--white); font-size: 11px; line-height: 18px; text-align: center; }
@media (min-width: 640px) and (max-width: 1023px) { .sidebar-user .linklike { min-height: 36px; padding: 8px 6px; } }
.user-links { display: flex; align-items: center; gap: 10px; } .user-links form { display: contents; } .user-links a.linklike { font-size: 11px; font-weight: var(--fw-medium); text-decoration: none; }

/* The user card in the menu: who you are on top, then Change password and Sign out as two full-width buttons (an icon and a word). On a tablet the rail shows the avatar and the buttons as icon over word, like the menu items. */
.sidebar-user { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px; }
.su-who { display: flex; align-items: center; gap: 10px; min-width: 0; } .su-name { min-width: 0; flex: 1; } .su-name strong, .su-name small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.su-name small { margin-top: 1px; font-size: 11px; line-height: 15px; color: var(--text-muted); }
.user-links { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; } .user-links form { display: block; } .user-links + .user-links { margin-top: -4px; } .sidebar-user > .su-who, .sidebar-user > .user-links { align-self: stretch; } /* pages.css centres the card's rows: both button rows take the whole width */ /* two small buttons a row: password and sign out, then report and review */
.user-act[disabled] { opacity: .7; }
.sidebar-user .user-act { width: 100%; min-width: 0; justify-content: center; gap: 6px; min-height: 34px; padding: 0 6px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .sidebar-user .user-act .ico { width: 16px; height: 16px; flex: none; } .sidebar-user .user-act .ua-long { display: none; }
@media (min-width: 640px) and (max-width: 1023px) { .sidebar-user { align-items: center; gap: 4px; padding: 6px 2px; } .su-name { display: none; } .user-links { grid-template-columns: 1fr; gap: 4px; width: 100%; } .sidebar-user .user-act { flex-direction: column; gap: 2px; min-height: 52px; padding: 6px 2px; font-size: 11px; line-height: 13px; } .sidebar-user .user-act .ua-long { display: none; } .sidebar-user .user-act .ua-short { display: inline; } }

/* components.css: the reusable parts every screen is built from: button, field, chip, card, skeleton, empty state, error state, modal (Pip), toast.
   It holds: one look per component, using only tokens. It must not hold: page layouts (base.css) or colours written as hex. */

/* button: primary is violet with white text, secondary is a lavender fill, ghost has no fill. "danger" is the same shape with an ink outline and its label says what it does. */
.btn:active { transform: translateY(1px); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: 44px; padding: 0 var(--s-5);
  border: 1px solid transparent; border-radius: var(--r-md); font: inherit; font-size: 15px; font-weight: var(--fw-semibold); cursor: pointer; text-decoration: none;
  transition: background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.btn-primary { background: var(--primary); color: var(--primary-text); }
.btn-primary:hover { background: var(--accent); }
.btn-secondary { background: var(--surface); color: var(--text); }
.btn-secondary:hover { background: var(--surface-strong); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface); }
.btn-danger { background: var(--white); color: var(--ink); border: 2px solid var(--ink); }
.btn[disabled], .btn[aria-busy="true"] { opacity: 0.6; cursor: not-allowed; }
.btn[aria-busy="true"]::before { content: ""; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* field: label above, hint and error text below; the error has an icon-free text prefix so colour is never the only signal */
.field { display: flex; flex-direction: column; gap: var(--s-1); }
.field label { font-weight: var(--fw-semibold); font-size: var(--fs-sm); }
.field .hint { color: var(--text-muted); font-size: var(--fs-sm); }
.field .error { color: var(--ink); font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.field .error::before { content: "Fix this: "; }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: var(--s-2) var(--s-3); background: var(--white); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--r-md); font: inherit;
}
.textarea { min-height: 120px; resize: vertical; }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.field[data-invalid="true"] .input, .field[data-invalid="true"] .select, .field[data-invalid="true"] .textarea { border: 2px solid var(--ink); }

/* chip: the status is the word plus a shape (dot = active, ring = waiting, square = finished, bar = locked), never a colour alone */
.chip { display: inline-flex; align-items: center; gap: var(--s-2); padding: 2px var(--s-3); border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: var(--fw-semibold); background: var(--surface); color: var(--ink); }
.chip::before { content: ""; width: 8px; height: 8px; background: var(--accent); border-radius: 50%; }
.chip[data-shape="ring"]::before { background: transparent; border: 2px solid var(--accent); }
.chip[data-shape="square"]::before { border-radius: 2px; background: var(--ink); }
.chip[data-shape="bar"]::before { width: 10px; height: 3px; border-radius: 2px; background: var(--text-muted); }
.chip-plan { background: var(--ink); color: var(--white); }
.chip-plan::before { display: none; }

.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s-5); box-shadow: var(--shadow-1); }
.stack { display: flex; flex-direction: column; gap: var(--s-4); }
.row { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }

/* skeleton: one shimmer block; a screen lays blocks out in the shape of what will load, so nothing jumps */
.sk { display: block; min-height: 1em; border-radius: var(--r-sm); background: linear-gradient(90deg, var(--surface) 25%, var(--bg) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.sk-line { height: 14px; margin: var(--s-2) 0; }
.sk-title { height: 24px; width: 40%; }
.sk-block { height: 96px; }
@keyframes shimmer { to { background-position: -200% 0; } }
[aria-busy="true"] > .sk-hide { visibility: hidden; }

/* empty and error states: a plain sentence, what to do next, and one button */
.state { display: flex; flex-direction: column; align-items: center; gap: var(--s-3); text-align: center; padding: var(--s-7) var(--s-4); }
.state h3 { color: var(--ink); }
.state p { color: var(--text-muted); max-width: 46ch; }

/* modal (Pip): replaces the browser's alert, confirm and prompt */
.modal-root { position: fixed; inset: 0; z-index: var(--z-modal); display: flex; align-items: center; justify-content: center; padding: var(--s-4); background: var(--overlay); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity var(--t-base) var(--ease), visibility 0s linear var(--t-base); }
.modal-root[data-open="true"] { opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 0s; }
.modal { width: min(440px, 100%); max-height: 90vh; overflow-y: auto; background: var(--white); border-radius: var(--r-lg); box-shadow: var(--shadow-2); padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-4); transform: translateY(10px) scale(0.97); transition: transform var(--t-base) var(--ease); will-change: transform, opacity; }
.modal-root[data-open="true"] .modal { transform: none; }
.pip svg { animation: pip-bob 3.2s ease-in-out infinite; transform-origin: 50% 80%; }
@keyframes pip-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px) rotate(-2deg); } }
.progress { height: 4px; border-radius: var(--r-pill); background: var(--surface); overflow: hidden; position: relative; }
.progress::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 40%; background: var(--primary); border-radius: var(--r-pill); animation: progress-slide 1.1s var(--ease) infinite; }
@keyframes progress-slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.modal-wrap { position: relative; width: min(500px, 100%); margin-top: 64px; }
.modal-wrap > .modal { width: 100%; max-height: calc(90vh - 64px); padding: 32px; gap: 16px; border-radius: 28px; box-shadow: 0 24px 60px rgba(13, 10, 46, 0.25); }
.modal h3 { font-size: 24px; font-weight: 800; }
.pip-perch { position: absolute; top: -54px; left: -26px; width: 74px; height: 68px; z-index: 1; filter: drop-shadow(0 6px 10px rgba(13, 11, 45, 0.25)); animation: pip-float 3.2s ease-in-out infinite; }
.pip-perch .pip-full { width: 74px; height: 68px; overflow: visible; }
.pip-joke { position: absolute; top: -50px; left: 44px; max-width: min(328px, calc(100% - 52px)); margin: 0; padding: 9px 14px; background: var(--white); border-radius: 14px; box-shadow: 0 8px 20px rgba(13, 10, 46, 0.25); color: var(--ink); font-size: 13px; font-weight: 600; line-height: 1.3; z-index: 1; }
.pip-joke::before { content: ""; position: absolute; left: -4px; top: 10px; width: 12px; height: 12px; background: var(--white); border-radius: 3px; transform: rotate(45deg); }
@media (max-width: 559px) { .pip-perch { left: -8px; } .pip-joke { left: 62px; max-width: calc(100% - 70px); } }
/* how Pip moves in a dialog (the scene's "move"); transform only, so it costs no layout */
.pip-perch[data-move="hop"] { animation: pip-hop 1.6s ease-in-out infinite; }
.pip-perch[data-move="shake"] { animation: pip-shake 2.4s ease-in-out infinite; }
.pip-perch[data-move="sway"] { animation: pip-sway 3.6s ease-in-out infinite; transform-origin: 50% 100%; }
.pip-perch[data-move="tilt"] { animation: pip-tilt 3s ease-in-out infinite; transform-origin: 50% 100%; }
.pip-perch[data-move="wave"] { animation: pip-wave 2.2s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes pip-hop { 0%, 100% { transform: translateY(0); } 30% { transform: translateY(-9px); } 55% { transform: translateY(0); } 75% { transform: translateY(-3px); } }
@keyframes pip-shake { 0%, 60%, 100% { transform: translateX(0); } 10% { transform: translateX(-4px) rotate(-3deg); } 20% { transform: translateX(4px) rotate(3deg); } 30% { transform: translateX(-3px) rotate(-2deg); } 40% { transform: translateX(3px) rotate(2deg); } }
@keyframes pip-sway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
@keyframes pip-tilt { 0%, 100% { transform: rotate(0); } 40%, 70% { transform: rotate(-7deg) translateY(-2px); } }
@keyframes pip-wave { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-9deg); } 40% { transform: rotate(8deg); } 60% { transform: rotate(-6deg); } 80% { transform: rotate(0); } }
@media (prefers-reduced-motion: reduce) { .pip-perch, .pip-perch[data-move] { animation: none; } }
.modal-head { display: flex; align-items: center; gap: var(--s-3); }
.pip { width: 56px; height: 56px; flex: none; display: grid; place-items: center; }
.pip .pip-face { width: 56px; height: 56px; }
.modal-actions { display: flex; justify-content: flex-end; gap: var(--s-3); flex-wrap: wrap; }
.modal-actions .btn { flex: 0 1 auto; }
@media (max-width: 639px) { .modal-actions { flex-direction: column-reverse; } .modal-actions .btn { width: 100%; } }

/* toast: short message, bottom centre, announced politely to screen readers */
.toasts { position: fixed; left: 50%; bottom: var(--s-5); transform: translateX(-50%); z-index: var(--z-toast); display: flex; flex-direction: column; gap: var(--s-2); width: min(420px, calc(100vw - 2rem)); }
.toast { animation: toast-in var(--t-base) var(--ease) both; }
.toast[data-leaving="true"] { animation: toast-out var(--t-base) var(--ease) both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }
.toast { background: var(--ink); color: var(--white); padding: var(--s-3) var(--s-4); border-radius: var(--r-md); box-shadow: var(--shadow-2); font-size: var(--fs-sm); }

.modal-wrap.wide { width: min(1040px, 100%); }
.modal-wrap.wide > .modal { padding: var(--s-5); }
.modal .page-head { display: none; } .modal [data-page="customize"] { gap: var(--s-4); } .modal .cz-bar { bottom: 0; }

/* a page part that loads by itself: its skeleton until the HTML arrives, then it steps aside so the real card sits in the page's own layout */
.defer { display: flex; flex-direction: column; gap: var(--s-2); } .defer[data-loaded] { display: contents; }
.defer[aria-busy="true"]:not(.defer-grid):not([data-shape="chips"]):not([data-shape="bare"]) { padding: var(--s-4); background: var(--white); border: 1px solid var(--border); border-radius: var(--r-md); }
.defer.defer-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); } .defer.defer-grid[data-loaded] { display: contents; }

.defer[data-reloading] { opacity: 0.45; pointer-events: none; transition: opacity var(--t-fast, 120ms); }
.defer[data-reloading][data-loaded] { display: block; } /* a part that is reloading keeps a box, so it can be dimmed */

.defer[data-failed] { display: block; } .part-failed { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); } .defer-grid .part-failed { grid-column: 1 / -1; }

.defer[data-slots]:not([data-failed]) { display: none !important; } /* its slots are moved into the cards; only a failure shows */

/* a page change that has to ask the server: the page stays and a thin line moves along the top */
html[data-navigating]::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100; background: linear-gradient(90deg, var(--secondary), var(--accent)); transform-origin: left; animation: nav-progress 1.4s ease-out forwards; }
@keyframes nav-progress { from { transform: scaleX(0.04); } to { transform: scaleX(0.85); } }
@media (prefers-reduced-motion: reduce) { html[data-navigating]::before { animation: none; transform: scaleX(0.5); } }

/* the choice cards of a dialog (Add a profile): a radio and a label in a rounded box, the chosen one lavender */
.choice-group { display: grid; gap: 10px; margin: 14px 0 6px; }
.choice-legend { font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--text-muted); }
.choice { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--white); cursor: pointer; font-weight: var(--fw-medium); }
.choice:has(input:checked) { background: var(--surface); border: 1.5px solid var(--violet); }
.choice input { accent-color: var(--violet); width: 18px; height: 18px; margin: 0; }
.modal-actions.start { justify-content: flex-start; }

/* the five stars of the review box: real radio buttons (the keyboard works); the stars up to the chosen one are filled */
.stars { display: flex; justify-content: center; gap: 6px; border: 0; margin: 4px 0; padding: 0; min-width: 0; }
.stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars label { font-size: 36px; line-height: 1; cursor: pointer; color: var(--text-muted); transition: transform .12s; padding: 4px 5px; }
.stars label.on { color: var(--primary); }
.stars label:hover { transform: scale(1.12); }
.stars input:focus-visible + label { outline: 2px solid var(--primary); border-radius: 8px; }
@media (prefers-reduced-motion: reduce) { .stars label { transition: none; } .stars label:hover { transform: none; } }

/* pages.css: layouts used by the first screens (sign-in family, dashboard, applications, new application). They only combine the tokens and
   components; a rule here is for placing things, not for a new look. It holds: auth frame, stats, pipeline, lists, tabs, drop zone, banners. */

/* sidebar user card */
.sidebar-user { margin-top: auto; display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg); }
.avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--surface-strong); display: grid; place-items: center; font-weight: var(--fw-bold); }
.sidebar-user form { margin: 0; }
.linklike { background: none; border: 0; padding: 0; color: var(--text-muted); font: inherit; font-size: var(--fs-xs); text-decoration: underline; cursor: pointer; }
.brand-mark { display: grid; place-items: center; color: var(--white); }

/* auth frame (Figma Login): desktop = a 640 px lavender story panel (brand, line, 3 steps) beside a 420 px card; tablet = the card centred under the brand;
   mobile = lavender page, brand and line on top, the card, then the 3 steps. One markup, three grids. */
.auth { display: grid; grid-template-columns: 640px minmax(0, 1fr); grid-template-rows: 1fr auto auto 1fr; min-height: 100vh; background: var(--bg); }
.auth::before { content: ""; grid-column: 1; grid-row: 1 / -1; background: var(--surface); }
.auth-head, .auth-steps { grid-column: 1; padding-inline: 72px; z-index: 1; display: flex; flex-direction: column; gap: 28px; }
.auth-head { grid-row: 2; padding-bottom: 28px; } .auth-steps { grid-row: 3; } .auth-steps h2 { display: none; }
.auth-head .brand { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: var(--fw-bold); line-height: 32px; text-decoration: none; color: var(--text); padding: 0; }
.auth-head h1 { font-size: 30px; line-height: 38px; font-weight: var(--fw-bold); max-width: 500px; margin: 0; }
.auth-lead { font-size: 14px; line-height: 22px; color: var(--text-muted); margin: 0; }
.auth-main { grid-column: 2; grid-row: 1 / -1; display: grid; place-items: center; padding: var(--s-6) var(--s-4); }
.auth-card { width: min(420px, 100%); padding: 32px; border-radius: 16px; gap: 16px; box-shadow: 0 2px 6px rgba(13, 11, 45, 0.06); }
.auth-card h2 { font-size: 24px; line-height: 32px; font-weight: var(--fw-bold); } .auth-card .field label { font-size: 12px; line-height: 18px; font-weight: var(--fw-medium, 500); color: var(--text-muted); }
.auth-card .input, .auth-card .select { min-height: 0; padding: 11px 14px; border-radius: 12px; font-size: 14px; line-height: 22px; border-color: #8F8BB5; }
.auth-card .input::placeholder { color: var(--text-muted); } .auth-card .btn { padding: 11px 18px; border-radius: 12px; font-size: 15px; line-height: 22px; font-weight: var(--fw-semibold); }
.auth-card p, .auth-card .muted { font-size: 14px; line-height: 22px; } .auth-card a { font-size: 12px; font-weight: 500; text-decoration: none; } .auth-card a:hover { text-decoration: underline; }
.auth-card .legal { font-size: 12px; text-align: center; margin: 0; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 28px; }
.steps li { display: grid; grid-template-columns: 30px 1fr; gap: 14px; align-items: start; } .steps strong { font-size: 15px; line-height: 22px; font-weight: var(--fw-semibold); display: block; }
.steps .num { width: 30px; height: 30px; font-size: 12px; border-radius: 50%; background: var(--primary); color: var(--white); display: grid; place-items: center; font-size: var(--fs-sm); font-weight: var(--fw-bold); }
.steps small { display: block; font-size: 14px; line-height: 22px; color: var(--text-muted); }
.form-error { margin: 0; padding: var(--s-3) var(--s-4); border: 2px solid var(--ink); border-radius: var(--r-md); font-weight: var(--fw-semibold); }
.form-error::before { content: "Please note: "; }
.notice { margin: 0; padding: var(--s-3) var(--s-4); background: var(--surface); border-radius: var(--r-md); font-size: var(--fs-sm); }
.auth-card form { display: flex; flex-direction: column; gap: var(--s-4); }
.auth-card .btn { width: 100%; }
.checkbox { display: flex; gap: var(--s-2); align-items: flex-start; font-size: var(--fs-sm); }
.checkbox input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--primary); }
@media (max-width: 1099px) {
  .auth { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; min-height: 100vh; } .auth::before { display: none; }
  .auth-head { grid-column: 1; grid-row: 1; align-items: center; text-align: center; padding: 56px 20px 0; gap: 4px; } .auth-steps { display: none; }
  .auth-head .brand { font-size: 20px; } .auth-head h1 { font-size: 14px; line-height: 22px; font-weight: 400; color: var(--text-muted); } .auth-lead { display: none; }
  .auth-main { grid-column: 1; grid-row: 2; align-items: start; padding-top: 28px; }
}
@media (max-width: 599px) {
  .auth { background: var(--surface); grid-template-rows: auto auto auto; }
  .auth-head { align-items: flex-start; text-align: left; padding: 40px 20px 0; gap: 16px; } .auth-head .brand { font-size: 22px; } .auth-head h1 { font-size: 34px; line-height: 40px; font-weight: var(--fw-bold); color: var(--text); }
  .auth-main { grid-row: 2; padding: 20px 20px 0; } .auth-card { padding: 24px; }
  .auth-steps { display: flex; grid-column: 1; grid-row: 3; padding: 24px 20px 40px; gap: 12px; } .auth-steps h2 { display: block; font-size: 17px; font-weight: var(--fw-semibold); }
  .auth-steps small { display: none; } .auth-steps .steps { gap: 12px; }
}

/* dashboard */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); }
.stat { padding: var(--s-4); }
.stat .label { color: var(--text-muted); font-size: var(--fs-sm); }
.stat .value { font-size: var(--fs-2xl); font-weight: var(--fw-bold); line-height: var(--lh-tight); }
.meter { height: 6px; border-radius: var(--r-pill); background: var(--surface); overflow: hidden; margin-top: var(--s-2); }
.meter > span { display: block; height: 100%; background: var(--primary); border-radius: var(--r-pill); }
.pipeline { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; padding: var(--s-3) var(--s-4); }
.pipeline a { display: inline-flex; align-items: center; gap: var(--s-2); text-decoration: none; color: var(--text); }
.pipeline strong { font-size: var(--fs-lg); }
.cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--s-4); align-items: start; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; } .panel-head > .row { margin-left: auto; justify-content: flex-end; gap: var(--s-2); }
.todo { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s-4); align-items: center; padding: var(--s-3) 0; border-top: 1px solid var(--border); }
.todo p { color: var(--text-muted); font-size: var(--fs-sm); }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-3); }
.checklist li { display: flex; gap: var(--s-3); align-items: center; }
.checklist [data-done="true"] { text-decoration: line-through; color: var(--text-muted); }
@media (max-width: 1023px) { .cols { grid-template-columns: minmax(0, 1fr); } .stat { padding: var(--s-3); } .stat .value { font-size: 28px; } }
@media (max-width: 639px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .page-head > .row { width: 100%; } .page-head .row .btn-primary { flex: 1; } .todo { grid-template-columns: minmax(0, 1fr); } .todo .btn { width: 100%; } }

/* applications list */
.filters { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.filters a { display: inline-flex; gap: var(--s-2); align-items: center; padding: var(--s-1) var(--s-3); border: 1px solid var(--border-strong); border-radius: var(--r-pill); background: var(--white); color: var(--text); text-decoration: none; font-size: var(--fs-sm); font-weight: var(--fw-medium); }
.filters a[aria-current="true"] { background: var(--surface-strong); border-color: var(--accent); font-weight: var(--fw-semibold); }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; color: var(--text-muted); font-size: var(--fs-xs); font-weight: var(--fw-semibold); padding: var(--s-3) var(--s-4); }
.table td { padding: var(--s-3) var(--s-4); border-top: 1px solid var(--border); vertical-align: middle; }
.table .sub { color: var(--text-muted); font-size: var(--fs-sm); }
.table a.title { color: var(--text); font-weight: var(--fw-semibold); text-decoration: none; }
.table .actions { white-space: nowrap; text-align: right; }
.table-wrap { padding: 0; overflow-x: auto; }
.btn-sm { min-height: 36px; padding: 0 var(--s-4); font-size: var(--fs-sm); }
@media (max-width: 759px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: var(--s-3) var(--s-4); border-top: 1px solid var(--border); }
  .table td { border: 0; padding: var(--s-1) 0; }
  .table .actions { text-align: left; padding-top: var(--s-2); }
}

/* tabs (segmented) and the new application page */
.seg { display: inline-flex; gap: var(--s-1); padding: var(--s-1); background: var(--surface); border-radius: var(--r-md); }
.seg button { min-height: 36px; padding: 0 var(--s-4); border: 0; border-radius: var(--r-sm); background: transparent; font: inherit; font-weight: var(--fw-medium); color: var(--text); cursor: pointer; }
.seg button[aria-selected="true"] { background: var(--white); font-weight: var(--fw-semibold); box-shadow: var(--shadow-1); }
.layout-form { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--s-4); align-items: start; }
@media (max-width: 1023px) { .layout-form { grid-template-columns: minmax(0, 1fr); } }
.dropzone { border: 2px dashed var(--border-strong); border-radius: var(--r-md); padding: var(--s-6) var(--s-4); text-align: center; background: var(--bg); cursor: pointer; }
.dropzone[data-drag="true"] { border-color: var(--accent); background: var(--surface); }
.dropzone:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.preview { display: flex; gap: var(--s-4); align-items: center; text-align: left; }
.preview img { width: 120px; height: 120px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--border-strong); }
.banner { padding: var(--s-4); border: 2px solid var(--ink); border-radius: var(--r-md); }
.banner ul { margin: var(--s-2) 0; padding-left: var(--s-5); }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.legal { margin: 0; color: var(--text-muted); font-size: var(--fs-xs); text-align: center; }

/* plan and usage, templates */
.meter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s-4); }
.meter-card { padding: var(--s-4); background: var(--bg); border-radius: var(--r-md); display: flex; flex-direction: column; gap: var(--s-1); }
.meter-card .label { color: var(--text-muted); font-size: var(--fs-sm); }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s-4); }
.plan-card { padding: var(--s-5); background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-md); }
.plan-card .price { color: var(--accent); font-weight: var(--fw-semibold); }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-2); font-size: var(--fs-sm); }
.ticks li::before { content: "✓"; color: var(--accent); font-weight: var(--fw-bold); margin-right: var(--s-2); }
.btn[aria-disabled="true"] { opacity: 0.7; cursor: default; pointer-events: none; }
.tpl-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); } /* four to a row; fewer on small screens */
@media (max-width: 1100px) { .tpl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } } @media (max-width: 760px) { .tpl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } } @media (max-width: 480px) { .tpl-grid { grid-template-columns: 1fr; } }
.tpl-thumb { --s: 0.3; position: relative; aspect-ratio: 210 / 250; overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--white); }
.tpl-thumb iframe { position: absolute; left: 0; top: 0; width: 794px; height: 1123px; border: 0; transform: scale(var(--s)); transform-origin: 0 0; pointer-events: none; background: var(--white); }
.tpl-open { position: absolute; inset: 0; z-index: 1; }
.tpl-open:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.tpl[data-selected="true"] { border: 2px solid var(--accent); }
.tpl-preview { height: 120px; border-radius: var(--r-sm); background: var(--surface); padding: var(--s-3); display: flex; flex-direction: column; gap: 6px; }
.tpl-preview b { height: 8px; width: 40%; background: var(--tpl); border-radius: 2px; }
.tpl-preview i { height: 5px; background: var(--surface-strong); border-radius: 2px; }
.tpl-preview i:nth-child(odd) { width: 85%; }

/* smooth page changes: the main area fades quickly, the menu stays still; off for people who asked for less motion */
#cp-main { view-transition-name: cp-main; }
@keyframes cp-fade-out { to { opacity: 0; } }
@keyframes cp-fade-in { from { opacity: 0; transform: translateY(4px); } }
::view-transition-old(cp-main) { animation: cp-fade-out 90ms var(--ease) both; }
::view-transition-new(cp-main) { animation: cp-fade-in 160ms var(--ease) both; }
::view-transition-group(root) { animation-duration: 0s; }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(cp-main), ::view-transition-new(cp-main) { animation: none; } }
.tpl .hint { font-size: var(--fs-xs); }

/* scroll reveal (website pages): each kind has its own movement; everything stays visible without scripts or with reduced motion */
.js [data-reveal] { opacity: 0; transition: opacity 600ms var(--ease), transform 600ms var(--ease); will-change: opacity, transform; }
.js [data-reveal="up"] { transform: translateY(24px); }
.js [data-reveal="left"] { transform: translateX(-28px); }
.js [data-reveal="right"] { transform: translateX(28px); }
.js [data-reveal="zoom"] { transform: scale(0.94); }
.js [data-reveal][data-in] { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js [data-reveal] { opacity: 1; transform: none; transition: none; } }

/* find jobs */
.bulk-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: var(--s-3) var(--s-4); position: sticky; top: var(--s-3); z-index: 5; }
.table td.actions form { display: inline-block; margin: 0 0 0 var(--s-1); }

/* knowledge base */
.kb-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--s-4); align-items: start; }
.kb-nav { display: flex; flex-direction: column; gap: var(--s-1); padding: var(--s-2); position: sticky; top: var(--s-3); }
.kb-nav button { min-height: 40px; text-align: left; padding: 0 var(--s-3); border: 0; border-radius: var(--r-sm); background: transparent; font: inherit; color: var(--text); cursor: pointer; transition: background var(--t-fast) var(--ease); }
.kb-nav button:hover { background: var(--bg); }
.kb-nav button[aria-selected="true"] { background: var(--surface); font-weight: var(--fw-semibold); }
.entry { padding: var(--s-4); background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-md); }
.entry-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s-3); }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s-3); }
.cat { background: var(--surface); }
.save-bar { grid-column: 1 / -1; position: sticky; bottom: var(--s-3); display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; padding: var(--s-3) var(--s-4); z-index: 5; }
@media (max-width: 1023px) { .kb-layout { grid-template-columns: minmax(0, 1fr); } .kb-nav { flex-direction: row; overflow-x: auto; position: static; } .kb-nav button { white-space: nowrap; } }
.missing { margin: 0; padding-left: var(--s-5); display: flex; flex-direction: column; gap: var(--s-1); font-size: var(--fs-sm); }

/* application page */
.stepper { display: flex; gap: var(--s-5); list-style: none; margin: 0; padding: var(--s-3) var(--s-4); background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); flex-wrap: wrap; }
.stepper li { display: flex; align-items: center; gap: var(--s-2); color: var(--text-muted); font-weight: var(--fw-medium); }
.stepper .dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border-strong); display: grid; place-items: center; font-size: var(--fs-xs); }
.stepper [data-done="true"] { color: var(--text); }
.stepper [data-done="true"] .dot { background: var(--primary); border-color: var(--primary); color: var(--white); }
.stepper [aria-current="step"] { color: var(--text); font-weight: var(--fw-semibold); }
.stepper [aria-current="step"] .dot { border-color: var(--primary); color: var(--primary); }
.app-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-4); align-items: start; }
.app-layout > .save-bar { grid-column: 1 / -1; }
.preview-frame { width: 100%; height: 640px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--white); }
.jd { white-space: pre-wrap; color: var(--text-muted); font-size: var(--fs-sm); }
@media (max-width: 1023px) { .app-layout { grid-template-columns: minmax(0, 1fr); } .preview-frame { height: 480px; } }

/* first-run setup: the progress list and the step cards */
.setup-steps { display: flex; flex-wrap: wrap; gap: var(--s-2); list-style: none; margin: 0; padding: 0; }
.setup-steps li { padding: 4px 12px; border-radius: var(--r-pill); background: var(--surface); font-size: var(--fs-xs); color: var(--text-muted); transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease); }
.setup-steps li[data-done] { background: var(--surface-strong); color: var(--text); }
.setup-steps li[aria-current] { background: var(--primary); color: var(--white); font-weight: var(--fw-semibold); }
.setup > * { animation: rise-in 320ms var(--ease) both; }
@keyframes rise-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .setup > * { animation: none; } }

/* small helpers shared by the website, setup and other pages */
.muted { color: var(--text-muted); }
.ticks { list-style: none; padding: 0; margin: 0 0 var(--s-4); display: grid; gap: var(--s-2); }
.ticks li { padding-left: 28px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 0.45em; width: 12px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }
.ticks.missing li::before { width: 10px; height: 10px; border: 2px solid var(--border-strong); border-radius: 50%; transform: none; top: 0.5em; } /* an open circle: not done yet */

/* set a new password: lock badge, eye on each field, live rules (the auth card is wider here, as in the design) */
.auth-card:has(.pw) { width: min(500px, 100%); }
.pw-form { display: flex; flex-direction: column; gap: 12px; } .pw-form h2 { margin: 0; } .pw-form form { gap: 12px; }
.pw-lock { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--surface-strong, #e6e0ff); color: var(--accent); }
.pw-box { position: relative; display: block; } .pw-box .input { width: 100%; padding-right: 44px; }
.pw-eye { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border: 0; background: transparent; cursor: pointer; border-radius: 8px; color: var(--text-muted);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b6892' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; background-size: 18px; }
.pw-eye[aria-pressed="true"] { background-color: var(--surface); } .pw-eye:focus-visible { outline: 3px solid var(--accent); }
.pw-rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-muted); }
.pw-rules li { display: flex; align-items: center; gap: 8px; } .pw-rules li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--border-strong, #c8c0f2); box-sizing: border-box; flex: none; transition: background 160ms var(--ease), border-color 160ms var(--ease); }
.pw-rules li[data-ok] { color: var(--text); font-weight: var(--fw-semibold); } .pw-rules li[data-ok]::before { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 6.2l2.4 2.3 4.6-5'/%3E%3C/svg%3E") center / 10px no-repeat; border-color: var(--accent); }

/* auth card details (Figma sign up, check your email, password changed): two-field rows, six code boxes, the round icon, small notes */
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .row2 > .field { min-width: 0; }
.auth-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--surface); color: var(--accent); }
.auth-center { text-align: center; align-items: center; } .auth-center .stack, .auth-center form { width: 100%; } .auth-center h2 { text-align: center; }
.auth-note, .auth-resend { font-size: 12px; line-height: 18px; color: var(--text-muted); text-align: left; margin: 0; } .auth-center .auth-note, .auth-center .auth-resend { text-align: center; }
.auth-resend .linklike { font-size: 12px; color: var(--accent); font-weight: 500; text-decoration: none; } .auth-resend .linklike:disabled { color: var(--text-muted); cursor: default; }
.otp { display: flex; justify-content: center; gap: 8px; } .otp-source { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.otp input { width: 40px; height: 48px; padding: 0; text-align: center; font: 700 20px/1 var(--font); color: var(--text); background: var(--white); border: 1px solid #8F8BB5; border-radius: 10px; transition: border-color 140ms var(--ease), box-shadow 140ms var(--ease), transform 140ms var(--ease); }
.otp input:focus { outline: none; border: 2px solid var(--accent); box-shadow: 0 0 0 3px rgba(91, 75, 255, 0.18); transform: translateY(-2px); }
.auth-card .form-error, .auth-card .notice { padding: 10px 12px; border: 0; border-radius: 10px; background: var(--surface-strong); font-size: 12px; line-height: 18px; font-weight: 500; } .auth-card .form-error::before { content: none; }
.auth-card .state { display: flex; flex-direction: column; gap: 12px; } .auth-card .linklike { font-size: 12px; }
.auth-card .checkbox { font-size: 12px; line-height: 18px; color: var(--text-muted); } .auth-card .checkbox input { width: 16px; height: 16px; margin-top: 1px; }
@media (max-width: 599px) { .row2 { grid-template-columns: 1fr; } }
.row2 .input::placeholder { font-size: 13px; } .auth-center .field { align-items: stretch; text-align: left; }

/* dashboard (Figma): stat cards with a thin bar, the attention list in three columns, the follow-ups card with switches and steppers */
.db-badge { padding: 4px 10px; border-radius: 999px; background: var(--surface); font: 600 11px/16px var(--font); color: var(--text-muted); white-space: nowrap; }
.stat { border-radius: 16px; padding: 16px; gap: 4px; box-shadow: 0 2px 6px rgba(13, 11, 45, 0.06); } .stat .label { font-size: 12px; line-height: 18px; font-weight: var(--fw-medium); } .stat .value { font-size: 30px; line-height: 38px; }
.stat .meter { height: 5px; border-radius: 3px; background: var(--surface); } .stat .meter span { background: #A78BFA; border-radius: 3px; transition: width 700ms var(--ease); }
.todo { grid-template-columns: 118px minmax(0, 1fr) auto; gap: 14px; padding: 10px; } .todo strong { font-size: 15px; line-height: 22px; } .todo p { font-size: 12px; line-height: 18px; color: var(--text-muted); }
.db-fu { gap: 10px; } .db-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; font-weight: var(--fw-medium); }
.sw { position: relative; width: 44px; height: 24px; flex: none; border: 0; border-radius: 12px; background: var(--surface-strong); cursor: pointer; transition: background 200ms var(--ease); }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 3px rgba(13, 11, 45, 0.3); transition: transform 220ms var(--ease-spring, cubic-bezier(0.34, 1.56, 0.64, 1)); }
.sw[aria-checked="true"] { background: var(--accent); } .sw[aria-checked="true"]::after { transform: translateX(20px); } .sw:disabled { opacity: 0.5; cursor: not-allowed; } .sw:focus-visible, .step button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.step { display: inline-flex; align-items: center; border: 1px solid #8F8BB5; border-radius: 10px; overflow: hidden; background: var(--white); } .step b { padding: 0 8px; min-width: 52px; text-align: center; font-weight: var(--fw-medium); font-size: 14px; }
.step button { width: 30px; height: 32px; border: 0; background: transparent; cursor: pointer; font-size: 16px; color: var(--ink); transition: background 140ms var(--ease); } .step button:hover:not(:disabled):not([data-limit="1"]) { background: var(--surface); } .step button:disabled, .step button[data-limit="1"] { opacity: 0.35; cursor: not-allowed; }
.db-note { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 10px; background: var(--bg-soft, var(--surface)); font-size: 12px; line-height: 18px; color: var(--text-muted); margin: 0; } .db-hint { font-size: 12px; color: var(--text-muted); margin: 0; }
.cols { grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; } @media (max-width: 1023px) { .cols { grid-template-columns: minmax(0, 1fr); } .todo { grid-template-columns: 96px minmax(0, 1fr) auto; } }
@media (max-width: 639px) { .todo { grid-template-columns: minmax(0, 1fr) auto; } .todo > .chip { grid-column: 1 / -1; justify-self: start; } }
.page-head h1 { font-size: 24px; line-height: 32px; } .card h2, .panel-head h2 { font-size: 18px; line-height: 26px; font-weight: var(--fw-semibold); } .page-head p { font-size: 14px; line-height: 22px; }
.db-tpl { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: var(--fw-medium); } .db-tpl small { display: block; font-size: 11px; line-height: 16px; font-weight: var(--fw-semibold); color: var(--text-muted); }
.db-tpl i { width: 34px; height: 44px; border-radius: 6px; border: 1px solid var(--border); background: linear-gradient(var(--surface-strong), var(--surface-strong)) 6px 8px / 20px 3px no-repeat, linear-gradient(var(--surface-strong), var(--surface-strong)) 6px 14px / 14px 3px no-repeat, linear-gradient(var(--surface-strong), var(--surface-strong)) 6px 20px / 18px 3px no-repeat, var(--bg); }

/* applications (Figma): a two-tab switch, round status filters, a calm table */
.seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface); border-radius: 14px; align-self: flex-start; }
.seg a { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 10px; color: var(--text-muted); text-decoration: none; font-size: 14px; font-weight: var(--fw-medium); transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.seg a strong { padding: 2px 8px; border-radius: 999px; background: var(--white); font-size: 11px; line-height: 16px; } .seg a[aria-current="true"] { background: var(--white); color: var(--ink); font-weight: var(--fw-semibold); box-shadow: 0 1px 4px rgba(13, 11, 45, 0.12); } .seg a:hover { color: var(--ink); }
.filters a { padding: 6px 15px; font-size: 13px; line-height: 18px; transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); } .filters a:hover { transform: translateY(-1px); } .filters a strong { color: var(--text-muted); font-weight: var(--fw-medium); }
.table th { font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; } .table tbody tr { transition: background var(--t-fast) var(--ease); } .table tbody tr:hover { background: var(--bg-soft, var(--surface)); } .table .title { font-size: 15px; line-height: 22px; font-weight: var(--fw-semibold); color: var(--ink); text-decoration: none; } .table .sub { font-size: 12px; line-height: 18px; color: var(--text-muted); }
@media (max-width: 639px) { .seg { align-self: stretch; } .seg a { flex: 1; justify-content: center; padding: 10px 8px; } }

/* application page (Figma): a stepper with lines, a soft follow-up note, a sticky next-step bar */
.stepper { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--white); border: 1px solid var(--border); border-radius: 14px; } .stepper li { display: flex; align-items: center; gap: 8px; flex: 1; font-size: 14px; font-weight: var(--fw-medium); } .stepper li:not(:last-child)::after { content: ""; flex: 1; height: 2px; margin-left: 8px; background: var(--surface-strong); border-radius: 2px; }
.stepper li[data-done="true"]::after, .stepper li[aria-current="step"]::after { background: var(--accent); } .stepper li:last-child { flex: none; }
.fu-note { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px; border-radius: 10px; background: var(--bg-soft, var(--surface)); font-size: 12px; line-height: 18px; color: var(--text-muted); margin: 0; } .fu-note a { font-weight: var(--fw-semibold); text-decoration: none; }
.save-bar { position: sticky; bottom: 12px; z-index: 5; box-shadow: 0 8px 24px rgba(13, 11, 45, 0.12); }
.fu-cols { grid-template-columns: 360px minmax(0, 1fr); } @media (max-width: 1023px) { .fu-cols { grid-template-columns: minmax(0, 1fr); } }
.plan-ended { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-radius: 14px; background: var(--surface-strong); } .plan-ended p { margin: 2px 0 0; font-size: 13px; color: var(--text-muted); } @media (max-width: 639px) { .plan-ended { flex-direction: column; align-items: stretch; } }

/* admin console: the small menu above each admin screen */
.adm-tabs { flex-wrap: wrap; }
.adm-tabs a { min-height: 36px; padding: 0 var(--s-4); border-radius: var(--r-sm); background: transparent; color: var(--text); text-decoration: none; display: inline-flex; align-items: center; }
.adm-tabs a[aria-current="page"] { background: var(--white); font-weight: var(--fw-semibold); box-shadow: var(--shadow-1); }
.adm-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm, 14px); }
.adm-table th { text-align: left; font-weight: var(--fw-semibold); color: var(--text-muted); white-space: nowrap; }
.adm-table th, .adm-table td { padding: var(--s-3); border-bottom: 1px solid var(--surface-strong); max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-actions { display: flex; gap: var(--s-2); }

/* Pip helper (Figma "Pip" frames): the round face button in the corner; the panel has a lavender head, a chat and a question box; on a phone it is a sheet above the tab bar */
.pip-face { width: 44px; height: 44px; flex: none; display: block; }
.pip-bubble { position: fixed; right: var(--s-5); bottom: var(--s-5); z-index: var(--z-nav); width: 64px; height: 64px; padding: 0; border: 0; border-radius: 50%; background: var(--white); box-shadow: 0 10px 26px rgba(13, 11, 45, 0.24); cursor: pointer; display: grid; place-items: center; transition: transform 200ms var(--ease), box-shadow 200ms var(--ease); }
.pip-bubble .pip-face { width: 100%; height: 100%; }
.pip-bubble:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 12px 28px rgba(113, 96, 242, 0.36); }
.pip-bubble[aria-expanded="true"] { visibility: hidden; }
.pip-panel { position: fixed; right: var(--s-5); bottom: var(--s-5); z-index: var(--z-modal); width: min(388px, calc(100vw - 2 * var(--s-5))); height: min(540px, calc(100vh - 2 * var(--s-5))); display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow-2); overflow: hidden; font-size: 14px; animation: pip-in 220ms var(--ease); }
.pip-panel[hidden] { display: none; }
.pip-panel header { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); background: color-mix(in srgb, var(--surface) 55%, var(--white)); }
.pip-panel header .pip-face { width: 40px; height: 40px; }
.pip-panel header div { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.pip-panel header strong { font-size: 16px; }
.pip-panel header span { font-size: 13px; color: var(--text-muted); }
.pip-icon { width: 36px; height: 36px; flex: none; border: 0; border-radius: 50%; background: var(--white); color: var(--primary); display: grid; place-items: center; cursor: pointer; }
.pip-icon .ico { stroke-width: 2.4; }
.pip-icon:hover { background: var(--surface-strong); }
.pip-log { flex: 1; overflow-y: auto; padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-3); }
.pip-row { display: flex; gap: var(--s-2); align-items: flex-start; }
.pip-row .pip-face { width: 30px; height: 30px; margin-top: 2px; }
.pip-msg { margin: 0; padding: var(--s-3) var(--s-4); border-radius: 20px; max-width: 88%; overflow-wrap: anywhere; line-height: 1.45; }
.pip-bot { background: var(--surface); color: var(--text); display: flex; flex-direction: column; gap: var(--s-3); align-items: flex-start; }
.pip-bot p { margin: 0; }
.pip-me { background: var(--primary); color: var(--primary-text); align-self: flex-start; max-width: 86%; padding-block: var(--s-3); border-radius: 18px; }
.pip-bot .btn { min-height: 34px; padding: 0 var(--s-4); font-size: 14px; }
.pip-bot .btn:not(.btn-primary) { background: var(--white); border: 1px solid var(--border-strong); }
.pip-form { padding: var(--s-3) var(--s-4) var(--s-3); border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: var(--s-2); }
.pip-form small { font-size: 12px; color: var(--text-muted); }
.pip-ask { display: flex; gap: var(--s-2); align-items: center; }
.pip-ask .input { flex: 1; min-width: 0; border-color: var(--primary); background: var(--bg, var(--white)); border-radius: 14px; }
.pip-send { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: var(--primary); color: var(--primary-text); display: grid; place-items: center; cursor: pointer; transition: transform 160ms var(--ease); }
.pip-send:hover { transform: scale(1.06); }
.pip-send[aria-busy="true"] { opacity: 0.6; }
.pip-typing { display: inline-flex; gap: 5px; padding: 6px 2px; }
.pip-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); animation: pip-dot 1s infinite ease-in-out; }
.pip-typing i:nth-child(2) { animation-delay: 0.15s; } .pip-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes pip-in { from { opacity: 0; transform: translateY(12px) scale(0.97); } }
@keyframes pip-dot { 0%, 80%, 100% { opacity: 0.3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
@media (max-width: 819px) { .pip-bubble { width: 52px; height: 52px; bottom: calc(var(--s-3) + 76px); right: var(--s-3); } body:has(.save-bar) .pip-bubble { bottom: 156px; } .pip-panel { right: var(--s-3); left: var(--s-3); width: auto; bottom: var(--s-3); height: min(560px, calc(100vh - 96px)); border-radius: 24px 24px 20px 20px; } }
@media (prefers-reduced-motion: reduce) { .pip-panel, .pip-bubble, .pip-typing i { animation: none; transition: none; } }

/* Pip's menu (opens from the face), dragging, the flight back to the corner and the locked panel */
.pip-menu { position: fixed; z-index: var(--z-nav); display: flex; flex-direction: column; align-items: flex-end; gap: var(--s-2); animation: pip-in 160ms var(--ease); }
.pip-menu[hidden] { display: none; }
.pip-menu .btn { box-shadow: var(--shadow-1); border-radius: 999px; min-height: 40px; padding: 0 var(--s-4); display: inline-flex; align-items: center; gap: var(--s-2); }
.pip-menu .btn:not(.btn-primary) { background: var(--white); border: 1px solid var(--border-strong); }
.pip-menu .chip { margin-left: var(--s-1); }
.pip-menu .chip::before { display: none; }
.pip-suggest .btn:not(.btn-primary) { background: var(--white); border: 1px solid var(--border-strong); }
.pip-bubble { touch-action: none; }
.pip-bubble.pip-flying { transition: left 420ms var(--ease), top 420ms var(--ease), right 420ms var(--ease), bottom 420ms var(--ease); }
.pip-panel[data-locked="1"] .pip-form { display: none; }
.pip-suggest { border: 1px solid var(--border-strong); border-radius: 18px; padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-2); background: var(--white); }
.pip-suggest p { margin: 0; color: var(--text-muted); }
.pip-suggest-row { display: flex; gap: var(--s-2); margin-top: var(--s-2); }
.pip-suggest .btn { min-height: 36px; font-size: 14px; }

/* guide overlay: the page is dimmed (by the light box's huge shadow when one element is lit), Pip's box sits at the bottom */
.guide { position: fixed; inset: 0; z-index: var(--z-toast); }
.guide[data-dim="full"] { background: var(--overlay); }
.guide-spot { position: fixed; border-radius: var(--r-md); box-shadow: 0 0 0 9999px var(--overlay); pointer-events: none; transition: all 220ms var(--ease); }
.guide-box { position: fixed; transition: left 220ms var(--ease), top 220ms var(--ease); width: min(420px, calc(100vw - 2 * var(--s-4))); background: var(--white); border-radius: var(--r-lg); box-shadow: var(--shadow-2); padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-2); }
.guide-box h3, .guide-box p { margin: 0; }
.guide-pip { position: absolute; top: -58px; left: var(--s-5); width: 76px; height: 70px; z-index: 1; filter: drop-shadow(0 6px 10px rgba(13, 11, 45, 0.25)); }
.guide-pip { animation: pip-float 3.2s ease-in-out infinite; }
.guide-flip { transform: scaleX(-1); }
.guide-arrow { position: absolute; top: -22px; width: 24px; height: 24px; z-index: 2; pointer-events: none; filter: drop-shadow(0 3px 6px rgba(91, 75, 255, 0.45)); animation: pip-point 1.1s ease-in-out infinite; }
@keyframes pip-point { 50% { translate: 4px 0; } }
.guide-box::before { content: ""; position: absolute; top: -9px; right: 22%; width: 18px; height: 18px; background: var(--white); border-radius: 4px; transform: rotate(45deg); }
@keyframes pip-float { 50% { translate: 0 -5px; } }
@media (prefers-reduced-motion: reduce) { .guide-pip, .guide-arrow { animation: none; } }
.guide-top { display: flex; justify-content: space-between; align-items: center; }
.guide-top .chip::before { display: none; }
.guide-top .linklike { font-size: 13px; color: var(--text-muted); }
.guide-back { background: var(--white); border: 1px solid var(--border-strong); }
.guide-actions .linklike { display: none; }
.guide-actions { display: flex; justify-content: flex-end; align-items: center; gap: var(--s-3); margin-top: var(--s-3); }
@media (prefers-reduced-motion: reduce) { .guide-spot { transition: none; } }
.pip-panel header strong { margin-right: auto; }

/* setup: Pip's guide box */
.setup-box { max-width: 560px; margin-inline: auto; }
.setup-head { display: flex; align-items: center; gap: var(--s-3); }
.setup-head h2 { margin: 0; } .setup-head small { color: var(--text-muted); display: block; }
.setup-steps3, .setup-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-3); }
.setup-steps3 li, .setup-list li { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--white); }
.setup-steps3 { counter-reset: s; } .setup-steps3 li { counter-increment: s; flex-direction: column; gap: 2px; padding-left: calc(var(--s-3) + 36px); position: relative; }
.setup-steps3 li::before { content: counter(s); position: absolute; left: var(--s-3); top: var(--s-3); width: 24px; height: 24px; border-radius: 50%; background: var(--surface); color: var(--primary); display: grid; place-items: center; font-weight: var(--fw-semibold); font-size: 13px; }
.setup-box small, .setup-note { color: var(--text-muted); font-size: 13px; margin: 0; } .setup-steps3 small { display: block; }
.setup-list div { display: flex; flex-direction: column; } .setup-count { font-weight: var(--fw-semibold); margin: 0; }
.setup-tick { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid var(--border-strong); margin-top: 2px; }
.setup-list li[data-done] .setup-tick { background: var(--primary) center / 12px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.5l2.5 2.5L10 3.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); border-color: var(--primary); }
.setup-back { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-2); }
.sec-order { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.sec-order li { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-3); border: 1px solid var(--border); border-radius: var(--r-md); }
.sec-order li span { flex: 1; font-weight: var(--fw-medium); }

/* resume customizer (customize.html) */
.cz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s-3); }
.cz-item { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-4); background: var(--white); border: 1px solid var(--border); border-radius: var(--r-md); }
.cz-check { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.cz-pills { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
.cz-pill, .cz-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: var(--fs-sm); font-weight: var(--fw-semibold); border: 1px solid var(--border-strong); }
.cz-pill { background: var(--surface); } .cz-pill button { background: none; border: 0; cursor: pointer; padding: 0; color: var(--ink); }
.cz-chip { background: var(--white); border-style: dashed; cursor: pointer; }
.cz-bar { position: sticky; bottom: var(--s-3); justify-content: flex-end; gap: var(--s-3); }
.cz-bar .hint { margin-right: auto; }
.seg button { white-space: nowrap; }

.fresh-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; padding-top: var(--s-3); }

/* Preview PDF */
.seg form { display: contents; } .seg [aria-pressed="true"] { background: var(--white); font-weight: var(--fw-semibold); box-shadow: var(--shadow-1); }
.pdf-stage { background: var(--bg); padding: var(--s-5); display: flex; justify-content: center; }
.pdf-frame { width: min(720px, 100%); height: min(1000px, 78vh); border: 0; border-radius: var(--r-sm); background: var(--white); box-shadow: var(--shadow-2); }

.tpl-links { display: flex; gap: var(--s-2); } .tpl-links .btn { flex: 1 1 auto; justify-content: center; text-align: center; white-space: nowrap; padding-inline: var(--s-2); font-size: var(--fs-sm); }
.tpl form[data-optimistic] .btn, .tpl > a.btn, .tpl > .btn { width: 100%; justify-content: center; text-align: center; } /* Use as default, Selected and See plans: the whole width of the card */
.cat .textarea { field-sizing: content; min-height: 4.5em; resize: none; }
.ticks li.off { color: var(--text-muted); }
.ticks li.off::before { content: "–"; border: 0; width: auto; height: auto; transform: none; top: 0; left: 6px; color: var(--text-muted); }

/* Knowledge Base profile switcher (Figma "Knowledge Base · Profiles (Pro)": label, one pill per profile, the Add profile pill, the count at the right) */
.profile-switch { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.ps-label { font-size: 13px; font-weight: var(--fw-semibold); color: var(--text-muted); }
.ps-item { display: inline-flex; align-items: center; gap: 2px; }
.ps-chip, .ps-add { display: inline-flex; align-items: center; gap: 8px; border-radius: var(--r-pill); font: inherit; font-size: 14px; cursor: pointer; }
.ps-chip { padding: 9px 16px; border: 1px solid var(--border-strong); background: var(--white); color: var(--ink); font-weight: var(--fw-semibold); }
.ps-chip[aria-pressed="true"] { background: var(--violet); border-color: var(--violet); color: var(--white); }
.ps-chip[data-locked] { opacity: .5; }
.ps-chip .ico, .ps-add .ico { width: 14px; height: 14px; stroke-width: 2; }
.ps-add { padding: 9px 14px; border: 1.5px solid var(--violet); background: transparent; color: #4A3CE6; font-weight: var(--fw-bold); }
.ps-add .ico { stroke-width: 2.6; }
.ps-x { border: 0; background: transparent; color: var(--text-muted); font-size: 16px; line-height: 1; cursor: pointer; padding: 4px 6px; border-radius: var(--r-pill); }
.ps-x:hover { background: var(--surface); }
.ps-count { margin-left: auto; font-size: 13px; font-weight: var(--fw-medium); color: var(--text-muted); }
@media (max-width: 559px) { .ps-count { margin-left: 0; width: 100%; } }

/* Follow-ups: the example box with Edit wording, the locked page of a plan without follow-ups (Figma "Follow-ups · Free plan"), the Insert chips of the wording dialog */
.fu-example { background: var(--white); }
.fu-sample { margin: 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--r-md); font-size: var(--fs-xs); color: var(--ink); line-height: 1.5; white-space: pre-line; }
.fu-locked { align-items: center; text-align: center; gap: var(--s-4); padding: 48px var(--s-5); border-radius: 28px; box-shadow: var(--shadow-1); }
.fu-locked h2 { font-size: 28px; margin: 0; }
.fu-locked p { max-width: 620px; margin: 0 auto; color: var(--text-muted); font-size: var(--fs-md); }
.lock-disc { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--surface); color: var(--accent); }
.check-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.check-chips li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--r-pill); background: var(--surface); color: #4A3CE6; font-size: 13px; font-weight: var(--fw-semibold); }
.check-chips li::before { content: ""; width: 10px; height: 6px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg) translateY(-1px); }
.insert-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.token-chip { border: 0; padding: 5px 12px; border-radius: var(--r-pill); background: var(--surface); color: #4A3CE6; font: inherit; font-size: 13px; font-weight: var(--fw-semibold); cursor: pointer; }
@media (max-width: 559px) { .fu-locked { padding: 32px var(--s-4); border-radius: 20px; } .fu-locked h2 { font-size: 22px; } }

/* Phone layouts as in the design (390 wide): short stat cards, no pipeline or template card on the Dashboard, applications as small cards with one full-width action */
.m-only { display: none; }
@media (max-width: 639px) {
  .m-only { display: inline; } .m-hide { display: none; }
  .stat { padding: 14px 16px; gap: 4px; } .stat .meter { display: none; } .stat .value { font-size: 28px; line-height: 36px; }
  .card.pipeline, [aria-labelledby="tpl-h"] { display: none; }
  .page-head:has(a[href="/new"]):not(:has(.welcome)) { display: none; } /* the + in the tab bar does this */
  nav[aria-label="Filter by status"], nav[aria-label="Filter"] { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } nav[aria-label="Filter by status"] > *, nav[aria-label="Filter"] > * { flex: none; }
  .table-wrap { background: transparent; border: 0; box-shadow: none; overflow: visible; }
  .table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 8px; align-items: start; margin-bottom: 12px; padding: 16px; background: var(--white); border: 1px solid var(--border); border-radius: 16px; }
  .table td { padding: 0; width: auto; }
  .table td:nth-child(1) { grid-column: 1; grid-row: 1; } .table td:nth-child(3) { grid-column: 2; grid-row: 1; }
  .table td:nth-child(4) { grid-column: 1 / -1; grid-row: 2; } .table td:nth-child(4) .btn { width: 100%; min-height: 44px; }
  .table td:nth-child(2), .table td:nth-child(5), .table td:nth-child(6) { display: none; }
}

/* Knowledge Base on tablet and phone as in the design: the sections are a row of small pills, the save bar floats above the tab bar */
@media (max-width: 1023px) {
  .kb-nav { background: transparent; border: 0; box-shadow: none; padding: 0; gap: 8px; scrollbar-width: none; }
  .kb-nav button { min-height: 0; padding: 8px 16px; border: 1px solid var(--border-strong); border-radius: var(--r-pill); background: var(--white); font-size: 13px; font-weight: var(--fw-medium); }
  .kb-nav button[aria-selected="true"] { background: var(--surface-strong); border-color: var(--surface-strong); }
}
@media (max-width: 639px) { .save-bar { bottom: 84px; } }
@media (max-width: 639px) { .save-bar { flex-wrap: nowrap; gap: 8px; padding: 10px 12px; } .save-bar #saveHint { display: none; } .save-bar > span:last-child { margin-left: auto; } .save-bar .btn { min-height: 44px; padding: 0 16px; } }

/* Admin console (the design's Admin screens): head, stat cards, settings cards with real controls (switch, chips, rows), the save bar. */
.adm { gap: 16px; }
.adm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.adm-head h1 { margin: 0; } .adm-head p { margin: 2px 0 0; color: var(--text-muted); }
.adm-head > div:last-child:not(:first-child), .adm-head > .btn { flex: none; }
.adm-muted { color: var(--text-muted); }
.adm-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.adm-stats .card { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border-radius: 20px; }
.adm-stats span { font-size: 13px; font-weight: var(--fw-semibold); } .adm-stats b { font-size: 32px; line-height: 40px; font-weight: var(--fw-bold); } .adm-stats small { color: var(--text-muted); font-size: 13px; }
.adm-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; background: var(--bg); border-radius: 12px; font-size: 14px; }
.adm-line .btn { min-height: 36px; background: var(--white); }
.adm .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.adm .card { border-radius: 20px; padding: 22px; }
.adm .card h2 { margin: 0; font-size: 18px; }
.sf-grid { columns: 2 480px; column-gap: 16px; }
.sf-card { display: flex; flex-direction: column; gap: 14px; break-inside: avoid; margin-bottom: 16px; }
.sf-field { display: flex; flex-direction: column; gap: 6px; }
.sf-head { display: flex; align-items: center; gap: 10px; }
.sf-label { flex: 1; font-size: 13px; font-weight: var(--fw-medium); } .sf-inline .sf-label { font-size: 14px; }
.sf-unit { font-style: normal; color: var(--text-muted); font-weight: var(--fw-regular); }
.sf-note { color: var(--text-muted); font-size: 12px; line-height: 16px; }
.sf-state { font-size: 12px; font-weight: var(--fw-semibold); min-height: 16px; }
.sf-state.is-dirty { color: #b45309; } .sf-state.is-dirty::before { content: "● "; }
.sf-state.is-saved { color: #047857; animation: sf-pop var(--t-base) var(--ease); }
@keyframes sf-pop { from { transform: scale(.85); opacity: 0; } }
.adm .input, .adm .select, .adm .textarea { width: 100%; min-height: 38px; border: 1px solid var(--violet); border-radius: 12px; background: var(--white); padding: 0 14px; font-size: 14px; }
.adm textarea.input { padding: 10px 14px; line-height: 1.45; resize: vertical; }
.tgl { position: relative; display: inline-flex; flex: none; width: 40px; height: 24px; cursor: pointer; }
.tgl input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.tgl-track { width: 100%; height: 100%; border-radius: 999px; background: var(--surface-strong); transition: background var(--t-base) var(--ease); }
.tgl-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--white); box-shadow: var(--shadow-1); transition: transform var(--t-base) var(--ease); }
.tgl input:checked + .tgl-track { background: var(--violet); } .tgl input:checked + .tgl-track::after { transform: translateX(16px); }
.tgl input:focus-visible + .tgl-track { outline: 2px solid var(--focus); outline-offset: 2px; }
.sf-group { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; } .sf-solo { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); flex: 1; }
.sf-chips { display: flex; flex-direction: column; gap: 8px; } .sf-chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.sf-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border-radius: 999px; background: var(--surface); font-size: 13px; }
.sf-x { border: 0; background: transparent; cursor: pointer; font-size: 16px; line-height: 1; color: var(--text-muted); padding: 0 4px; }
.sf-add { display: flex; gap: 8px; } .sf-add .btn { min-height: 38px; }
.sf-rows, .sf-row-list { display: flex; flex-direction: column; gap: 10px; } .sf-rows > .btn { align-self: flex-start; }
.sf-row { display: flex; align-items: flex-end; gap: 10px; padding: 12px; border-radius: 14px; background: var(--bg); } .sf-del { min-height: 38px; }
.adm-bar { position: sticky; bottom: 12px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px !important; box-shadow: var(--shadow-2); }
.adm-bar p { margin: 0; color: var(--text-muted); font-size: 14px; } .adm-bar.is-dirty p { color: #b45309; font-weight: var(--fw-semibold); }
.adm-bar > div { display: flex; gap: 10px; } .adm-bar .btn { min-height: 44px; }
.nav-back { margin-top: auto; }
@media (max-width: 1100px) { .adm-stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px) { .adm .cols { grid-template-columns: 1fr; } .sf-grid { columns: 1; } }
@media (max-width: 560px) { .adm-stats { grid-template-columns: 1fr 1fr; } .adm-bar > div, .adm-bar .btn { width: 100%; } .sf-row { flex-direction: column; align-items: stretch; } }
.sidebar > nav { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.sf-row { flex-direction: column; align-items: stretch; } .sf-row .sf-del { align-self: flex-end; } .sf-row .sf-group { grid-template-columns: 1fr; }
.sf-row .sf-field > .sf-head .sf-label { font-size: 12px; }
@media (min-width: 821px) { .adm-bar > div { margin-right: 76px; } }
.adm-search { display: flex; gap: 8px; } .adm-search .input { flex: 1; } .adm-search .btn { min-height: 38px; }
.adm-actions { flex-wrap: wrap; }
@media (max-width: 820px) {
  .adm-tabs { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; } .adm-tabs a { white-space: nowrap; flex: none; }
  .adm-bar { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); } .adm-bar > div { width: 100%; } .adm-bar .btn { flex: 1; }
}
.nav-badge { margin-left: auto; min-width: 20px; padding: 0 7px; border-radius: 999px; background: var(--violet); color: var(--white); font-size: 11px; line-height: 20px; text-align: center; }
.adm-tabs button[aria-pressed="true"] { background: var(--white); font-weight: var(--fw-semibold); box-shadow: var(--shadow-1); }
.adm-table a { color: var(--accent); font-weight: var(--fw-semibold); text-decoration: none; } .adm-table a:hover { text-decoration: underline; }
.adm-table input.input { min-width: 90px; max-width: 120px; }
.admin-view { margin: 8px 0; width: 100%; }
.lim-grid thead th { background: var(--ink); color: var(--white); padding: 12px 16px; } .lim-grid thead th:first-child { border-radius: 12px 0 0 0; } .lim-grid thead th:last-child { border-radius: 0 12px 0 0; }
.lim-grid tbody th { text-align: left; font-weight: var(--fw-medium); color: var(--ink); } .plan-sec td { background: var(--bg); font-size: 11px; font-weight: var(--fw-semibold); letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.plan-cell { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .plan-cell .input { width: 76px; text-align: center; }
.lim-grid { table-layout: fixed; min-width: 620px; } .lim-grid th, .lim-grid td { max-width: none; white-space: normal; overflow: visible; } .lim-grid th:first-child, .lim-grid td:first-child { width: 34%; } .lim-grid .plan-sec td { width: auto; }
.af-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; } .af-grid .field:has(textarea), .af-grid .field:has(.sf-add) { grid-column: 1 / -1; }
.af-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 14px; } .af-info { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
@media (max-width: 560px) { .af-grid { grid-template-columns: 1fr; } }
.chip-off { background: var(--white); border: 1px solid var(--ink); color: var(--ink); } .adm-crumb { margin: 0; font-size: 12px; color: var(--text-muted); } .adm-crumb a { color: var(--text-muted); text-decoration: none; }
.news-preview { background: var(--surface); } .news-preview[data-style="warning"] { background: #FFF4DC; } .news-preview[data-style="good_news"] { background: #DDF7EA; }
.announce { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding: 12px 16px; border-radius: 16px; background: var(--surface); font-size: 14px; }
.announce[data-style="warning"] { background: #FFF4DC; } .announce[data-style="good_news"] { background: #DDF7EA; } .announce .btn { min-height: 36px; background: var(--white); flex: none; }
.adm-stats.sm b { font-size: 22px; line-height: 30px; } .adm-table input.input { min-width: 120px; }
.adm-actions, .adm-table td { white-space: nowrap; } .adm-actions { flex-wrap: nowrap; } .adm-actions .btn, .adm-table .btn { min-height: 36px; padding: 0 14px; }
.req-month { width: auto; min-width: 170px; } .req-stats { grid-template-columns: repeat(4, 1fr); }
.req-card { text-align: left; font: inherit; cursor: default; } button.req-card { cursor: pointer; } .req-card.is-on { background: var(--surface); border-color: var(--violet); box-shadow: 0 0 0 1px var(--violet); }
.req-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; } .req-bar .input { max-width: 340px; }
.req-chips { display: flex; gap: 8px; flex-wrap: wrap; } .req-chip { min-height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--white); font: inherit; font-size: 13px; cursor: pointer; } .req-chip[aria-pressed="true"] { background: var(--violet); color: var(--white); border-color: var(--violet); }
.chip-wait { background: var(--surface); } .req-shot { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding: 14px; border-radius: 14px; background: var(--surface); margin: 12px 0; } .req-checks { margin: 6px 0 12px; padding-left: 18px; font-size: 14px; }
@media (max-width: 820px) { .req-stats { grid-template-columns: 1fr 1fr; } }
.adm .req-month { width: auto; }
.sf-sec { border: 1px solid var(--border); border-radius: 14px; padding: 4px 14px 12px; background: var(--white); } .sf-sec > summary { cursor: pointer; padding: 10px 0; font-weight: var(--fw-semibold); font-size: 14px; list-style: none; } .sf-sec > summary::before { content: "▸ "; } .sf-sec[open] > summary::before { content: "▾ "; }
.sf-sec .sf-sec { background: var(--bg); } .sf-card .btn { align-self: flex-start; }
.sf-grid { columns: 1; } @media (min-width: 1100px) { .sf-grid { columns: 2 480px; } }
.sf-label:empty { display: none; } .sf-group:has(> .sf-sec) { grid-template-columns: 1fr; }
.setup-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; } .setup-choice { display: flex !important; flex-direction: column; align-items: flex-start; gap: 4px; height: auto; padding: 16px; text-align: left; white-space: normal; } .setup-choice small { color: var(--text-muted); font-weight: var(--fw-regular); }
.setup-dock { position: fixed; right: 24px; bottom: 24px; z-index: 40; width: 340px; max-width: calc(100vw - 32px); display: flex; flex-direction: column; gap: 10px; padding: 18px; background: var(--white); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-2); }
.setup-bar { height: 6px; border-radius: 999px; background: var(--surface); overflow: hidden; } .setup-bar span { display: block; height: 100%; background: var(--violet); transition: width var(--t-base) var(--ease); }
@media (max-width: 820px) { .setup-choices { grid-template-columns: 1fr; } .setup-dock { right: 16px; left: 16px; bottom: 88px; width: auto; } }
.setup-panel { margin-bottom: 16px; } .setup-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; } .setup-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px; border-radius: 16px; background: var(--bg); } .setup-card h3 { margin: 0; font-size: 16px; } .setup-card p { margin: 0; color: var(--text-muted); font-size: 13px; flex: 1; } .setup-card[data-done="1"] { background: var(--surface); }
@media (max-width: 820px) { .setup-cards { grid-template-columns: 1fr; } }
.setup-lit { box-shadow: 0 0 0 3px var(--violet), 0 0 0 8px rgba(113, 96, 242, 0.25); border-radius: 16px; }

/* ---- install sheet (phone: "put Career Pulse on your home screen") and the phone PDF pages ---- */
.install-sheet { position: fixed; inset: 0; z-index: var(--z-toast); display: flex; align-items: flex-end; justify-content: center; background: var(--overlay); animation: install-fade var(--t-base) var(--ease); }
.install-card { position: relative; width: min(440px, 100%); padding: 56px var(--s-5) max(var(--s-5), env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: var(--s-3); text-align: center; background: var(--white); border-radius: 28px 28px 0 0; box-shadow: var(--shadow-2); animation: install-rise 320ms var(--ease); }
.install-card h2 { margin: 0; font-size: 22px; line-height: 28px; font-weight: var(--fw-bold); }
.install-card p { margin: 0; color: var(--text-muted); font-size: 15px; line-height: 22px; }
.install-pip { position: absolute; top: -36px; left: 50%; width: 72px; height: 72px; margin-left: -36px; padding: 6px; border-radius: 50%; background: var(--white); box-shadow: var(--shadow-2); }
.install-card .btn { width: 100%; min-height: 48px; }
.install-steps { margin: 0; padding: var(--s-3) var(--s-4) var(--s-3) 36px; text-align: left; font-size: 15px; line-height: 22px; background: var(--surface); border-radius: var(--r-md); } .install-steps li + li { margin-top: 6px; }
@keyframes install-fade { from { opacity: 0; } } @keyframes install-rise { from { transform: translateY(40px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .install-sheet, .install-card { animation: none; } }
.install-open .pip-bubble { visibility: hidden; }
.more-install { display: none; } .can-install .more-install { display: flex; }
.pdf-pages { width: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-2); background: var(--surface); border-radius: var(--r-md); min-height: 240px; }
.pdf-pages[aria-busy="true"]::before { content: ""; height: 360px; border-radius: var(--r-sm); background: linear-gradient(90deg, var(--white), var(--bg), var(--white)); background-size: 200% 100%; animation: pdf-shimmer 1.2s linear infinite; }
.pdf-page { width: 100%; height: auto; display: block; border-radius: var(--r-sm); background: var(--white); box-shadow: var(--shadow-1); }
@keyframes pdf-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .pdf-pages[aria-busy="true"]::before { animation: none; } }
@media (max-width: 819px), (pointer: coarse) { /* fingers need 40 px or more to hit: small controls get a bigger touch area without a bigger look */
  .step button { min-width: 44px; min-height: 44px; }
  .sw::before { content: ""; position: absolute; inset: -10px -4px; }
  a.title, .hint a { display: inline-block; padding: 12px 8px; margin: -12px -8px; }
  .btn-sm { min-height: 40px; }
}
@media (max-width: 700px) { /* an admin table becomes a list of cards: each cell shows its column name before its value */
  .adm-table:not(.lim-grid), .adm-table:not(.lim-grid) tbody, .adm-table:not(.lim-grid) tr { display: block; width: 100%; }
  .adm-table:not(.lim-grid) thead { display: none; }
  .adm-table:not(.lim-grid) tr { padding: var(--s-2) 0; border-bottom: 1px solid var(--surface-strong); }
  .adm-table:not(.lim-grid) td { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); padding: 6px 4px; border: 0; max-width: none; overflow: visible; white-space: normal; text-align: right; overflow-wrap: anywhere; }
  .adm-table:not(.lim-grid) td::before { content: attr(data-label); flex: none; text-align: left; color: var(--text-muted); font-weight: var(--fw-semibold); }
  .adm-table:not(.lim-grid) td:not([data-label])::before, .adm-table:not(.lim-grid) td:empty { display: none; }
  .adm-table:not(.lim-grid) td:first-child { justify-content: flex-start; font-size: 15px; font-weight: var(--fw-semibold); } .adm-table:not(.lim-grid) td:first-child::before { display: none; }
  .adm-table:not(.lim-grid) td:last-child:not([data-label]) { justify-content: flex-start; }
  .adm-table:not(.lim-grid) .btn, .adm-table:not(.lim-grid) button { white-space: nowrap; }
}
.pw-eye::before { content: ""; position: absolute; inset: -8px; } .sf-x { min-width: 36px; min-height: 36px; }
.auth-card .legal a, .auth-card p a { display: inline-block; padding: 12px 6px; margin: -12px -6px; }
.legal-brand { display: inline-flex; align-items: center; min-height: 44px; } .more-legal a { display: inline-block; padding: 12px 6px; margin: -12px -6px; }
.adm .btn, .adm-table a.btn { white-space: nowrap; }
.seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; } .seg::-webkit-scrollbar { display: none; } .seg > * { flex: none; white-space: nowrap; }
@media (max-width: 639px) { /* phone: the four steps share one line (dot above its word); the header buttons sit on one line */
  .stepper { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 10px 6px; } .stepper li { flex-direction: column; gap: 4px; font-size: 12px; text-align: center; } .stepper li::after { display: none; }
  .page-head > .row { gap: 8px; } .page-head > .row .btn { padding-inline: 12px; }
}
@media (max-width: 700px) { .adm-table:not(.lim-grid) td:first-child { flex-direction: column; align-items: flex-start; gap: 2px; } .adm-table:not(.lim-grid) td:not([data-label]) > .btn, .adm-table:not(.lim-grid) td:not([data-label]) > a { width: 100%; justify-content: center; text-align: center; } }
@media (max-width: 639px) { /* phone: the greeting stays on the Dashboard (the top bar says the page name); sign-in pages are compact */
  .page-head:has(.welcome) > .row { display: none; } /* the greeting stays; the buttons are the bottom bar's */
  .page-head > .page-title.welcome { display: block; } .page-title.welcome h1 { font-size: 24px; line-height: 30px; } .page-title.welcome p { margin: 2px 0 0; }
  .auth-head h1 { font-size: 30px; line-height: 36px; } .auth-steps { margin-top: var(--s-4); }
}

/* ---- a row that scrolls sideways says so: a box, faded edges where there is more, a bar with a moving thumb (scrollhint.js) ---- */
.hs-on { box-shadow: inset 0 0 0 1px var(--border-strong); border-radius: var(--r-md); scrollbar-width: none; }
nav.hs-on, .kb-nav.hs-on, .adm-tabs.hs-on { background: var(--white); padding: 6px 8px; }
.hs-on[data-more="right"] { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }
.hs-on[data-more="left"] { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent); }
.hs-on[data-more="both"] { -webkit-mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
.hs-bar { display: flex; align-items: center; gap: var(--s-3); margin-top: -4px; font-size: 12px; font-weight: var(--fw-semibold); color: var(--text-muted); } .hs-bar[hidden] { display: none; }
.hs-track { flex: 1; height: 6px; border-radius: var(--r-pill); background: var(--surface-strong); overflow: hidden; } .hs-track i { display: block; height: 100%; border-radius: var(--r-pill); background: var(--violet); }
.hs-hint::before { content: "\2194\00a0"; }

/* ---- the frame stays put while a page cross-fades: the bars, Pip and the toasts each get their own transition layer, so the fading page is never painted over them ---- */
.tabbar { view-transition-name: cp-tabbar; } .topbar { view-transition-name: cp-topbar; } .sidebar { view-transition-name: cp-sidebar; } .pip-bubble { view-transition-name: cp-pip; } .toasts { view-transition-name: cp-toasts; }
::view-transition-group(cp-tabbar), ::view-transition-group(cp-topbar), ::view-transition-group(cp-sidebar), ::view-transition-group(cp-pip), ::view-transition-group(cp-toasts) { animation: none; }
::view-transition-old(cp-tabbar), ::view-transition-old(cp-topbar), ::view-transition-old(cp-sidebar), ::view-transition-old(cp-pip), ::view-transition-old(cp-toasts) { display: none; }
::view-transition-new(cp-tabbar), ::view-transition-new(cp-topbar), ::view-transition-new(cp-sidebar), ::view-transition-new(cp-pip), ::view-transition-new(cp-toasts) { animation: none; }
.guide-wait { align-items: center; text-align: center; } .guide-wait p { font-weight: var(--fw-semibold); }
.table-wrap:has(> .lim-grid) { overflow-x: auto; } /* a wide table scrolls inside its box on a phone too: the page itself never scrolls sideways */
.hs-hint { cursor: pointer; } .hs-track { position: relative; cursor: pointer; touch-action: none; } .hs-track::before { content: ""; position: absolute; inset: -10px 0; } /* a finger needs a taller place to press than the thin bar */
.hs-hint { padding: 6px 0; }

/* dashboard right column: the plan card (a lock on what the plan does not have) */
.use-row { display: grid; gap: 6px; } .use-row .db-line small { font-weight: var(--fw-medium); color: var(--text-muted); } .use-row .meter { height: 6px; border-radius: 3px; background: var(--surface); } .use-row .meter span { display: block; height: 100%; border-radius: 3px; background: #A78BFA; transition: width 700ms var(--ease); }
.lock-tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--surface); color: var(--accent); font: 600 12px/18px var(--font); text-decoration: none; white-space: nowrap; } .lock-tag .ico { width: 14px; height: 14px; }

/* Long text with no spaces (a job title, a company, an address, a link) wraps inside its box instead of pushing the page sideways, on every screen size. */
main p, main h1, main h2, main h3, main strong, main small, main b, main li, main label, main .title, main .sub, main .hint, main dd, main dt { overflow-wrap: anywhere; } /* not td, th or chips: with anywhere a table column may shrink so far that Ready becomes Read-y */
main td, main th, main .chip { overflow-wrap: break-word; }
main .todo > div, main .panel-head > *, main .page-title, main .layout-form > *, main .cols > *, main td > a, main .db-line > * { min-width: 0; }
main .table { table-layout: auto; max-width: 100%; }

/* Follow-ups: the On/Off word beside the main switch, controls dimmed while follow-ups are off, the "write it for me" box in the wording dialog. */
.fu-onoff { display: inline-flex; align-items: center; gap: 8px; } .fu-onoff b { font-size: var(--fs-xs); color: var(--text-muted); }
.db-fu[data-off="1"] .db-line, .db-fu[data-off="1"] .db-hint { opacity: .5; }
.fu-ask { margin-top: 12px; } .fu-ask .btn { align-self: flex-start; margin-top: 8px; }
.fu-sample, .todo strong, .todo p { overflow-wrap: anywhere; min-width: 0; }
.fu-card { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; } .fu-card h2 { margin: 0 0 4px; font-size: var(--fs-md); } .fu-card p { margin: 0; color: var(--text-muted); font-size: var(--fs-sm); overflow-wrap: anywhere; } .fu-card > div { flex: 1 1 280px; min-width: 0; }
.fu-wait { white-space: nowrap; margin-right: 6px; }
@media (max-width: 559px) { .fu-card .btn { width: 100%; } }
/* Sent on a phone: the card hides its action column, but a follow-up that can go (or the wait for it) stays on the card, full width and easy to press. */
@media (max-width: 639px) {
  [aria-label="Sent applications"] .table td.actions:has([data-followup], .fu-wait) { display: flex; grid-column: 1 / -1; grid-row: 3; align-items: center; gap: 8px; }
  [aria-label="Sent applications"] .table td.actions > a { display: none; }
  [aria-label="Sent applications"] .table td.actions [data-followup] { flex: 1; min-height: 44px; }
}

/* Knowledge Base: while another profile is being put in use the form is dimmed at once and cannot be pressed. */
[data-page="kb"][data-switching] form { opacity: .5; pointer-events: none; transition: opacity .15s; } [data-page="kb"][data-switching] .ps-count { font-weight: var(--fw-semibold); }

/* "Ask the AI to change this email": the box takes the row and the button sits beside it; on a phone the box has the whole width and the button the whole width below it */
.ai-ask { display: flex; flex-wrap: wrap; gap: 8px; } .ai-ask .input { flex: 1 1 220px; min-width: 0; } .ai-ask .btn { flex: 0 0 auto; }
@media (max-width: 560px) { .ai-ask .input, .ai-ask .btn { flex: 1 1 100%; } }

/* Pip's peek: now and then the round Pip in the corner becomes the whole Pip with one line next to him (pip.js), then goes back */
.pip-bubble { transition: opacity .2s; } .pip-bubble.pip-hide { opacity: 0; pointer-events: none; }
.pip-peek { position: fixed; touch-action: none; z-index: var(--z-nav); display: flex; align-items: center; gap: 6px; cursor: pointer; animation: pip-peek-in .5s cubic-bezier(.34, 1.4, .64, 1) both; }
.pip-peek[data-side="left"] { flex-direction: row-reverse; }
.pip-peek-pip { flex: none; width: 74px; height: 68px; filter: drop-shadow(0 6px 10px rgba(13, 11, 45, 0.25)); animation: pip-float 3.2s ease-in-out infinite; } .pip-peek-pip .pip-full { width: 74px; height: 68px; overflow: visible; }
.pip-peek-say { position: relative; margin: 0; max-width: min(210px, 52vw); padding: 9px 13px; background: var(--white); color: var(--ink); border-radius: 14px; box-shadow: 0 8px 20px rgba(13, 10, 46, 0.22); font-size: 13px; font-weight: 600; line-height: 18px; }
.pip-peek-say::after { content: ""; position: absolute; top: 50%; right: -4px; width: 11px; height: 11px; background: var(--white); border-radius: 3px; transform: translateY(-50%) rotate(45deg); }
.pip-peek[data-side="left"] .pip-peek-say::after { right: auto; left: -4px; }
.pip-peek-out { animation: pip-peek-out .24s ease both; pointer-events: none; }
@keyframes pip-peek-in { 0% { opacity: 0; transform: scale(.5) translateY(10px); } 60% { opacity: 1; transform: scale(1.06); } 100% { opacity: 1; transform: none; } }
@keyframes pip-peek-out { to { opacity: 0; transform: scale(.7); } }
@media (prefers-reduced-motion: reduce) { .pip-peek, .pip-peek-out, .pip-peek-pip { animation: none; } .pip-bubble { transition: none; } }
.pdf-pages { max-height: min(72vh, 640px); overflow: auto; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y; } .pdf-pages .pdf-page { width: 100%; max-width: none; flex: none; } /* the whole page fits; zoomed in, the box is a window on it that a finger drags */


/* Find jobs: the search form (the job and place typed, then level, how many, remote and the button) and the jobs as cards */
.find-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s-4); align-items: end; }
.find-grid .field { min-width: 0; } .find-grid .select, .find-grid .input { width: 100%; text-overflow: ellipsis; }
.find-job { grid-column: span 4; } .find-place { grid-column: span 3; } .find-grid .field:nth-of-type(3) { grid-column: span 3; } .find-grid .field:nth-of-type(4) { grid-column: span 2; }
.find-remote { grid-column: span 8; min-height: 44px; display: flex; align-items: center; } .find-go { grid-column: span 4; display: flex; justify-content: flex-end; } .find-go .btn { min-width: 160px; }
@media (max-width: 1023px) { .find-job, .find-place { grid-column: span 6; } .find-grid .field:nth-of-type(3), .find-grid .field:nth-of-type(4) { grid-column: span 3; } .find-remote { grid-column: span 6; } .find-go { grid-column: span 6; } }
@media (max-width: 639px) { .find-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-3); } .find-job, .find-place, .find-remote, .find-go { grid-column: 1 / -1; } .find-grid .field:nth-of-type(3), .find-grid .field:nth-of-type(4) { grid-column: span 1; } .find-go .btn { width: 100%; } }
.job-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.job-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s-3) var(--s-4); align-items: center; padding: var(--s-4); transition: box-shadow var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); } .job-card[hidden] { display: none; }
.job-card:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }
.job-card .title { font-weight: var(--fw-semibold); overflow-wrap: anywhere; } .job-main { min-width: 0; display: grid; gap: 4px; }
.job-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.job-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); justify-content: flex-end; } .job-actions form { margin: 0; }
@media (max-width: 819px) { .job-card { grid-template-columns: auto minmax(0, 1fr); } .job-actions { grid-column: 1 / -1; justify-content: stretch; } .job-actions form:first-child { flex: 1 1 100%; } .job-actions form:first-child .btn { width: 100%; } .job-actions form:not(:first-child) { flex: 1 1 0; } .job-actions form:not(:first-child) .btn { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .job-card { transition: none; } .job-card:hover { transform: none; } }
[data-page="radar"] .filters { flex-wrap: wrap; overflow: visible; } [data-page="radar"] .filters a { min-height: 36px; } /* four chips: they wrap on a phone, they never need a sideways scroll */
.job-card .title { display: inline-block; padding: 5px 0; }
.combo { position: relative; } .combo-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; max-height: 260px; overflow: auto; background: var(--white); border: 1px solid var(--border-strong); border-radius: var(--r-md); box-shadow: var(--shadow-2); }
.combo-list li { padding: 10px 12px; border-radius: var(--r-sm); cursor: pointer; font-size: 14px; line-height: 20px; } .combo-list li[hidden] { display: none; }
.combo-list li:hover, .combo-list li[aria-selected="true"] { background: var(--surface-strong); }

/* the "how well your resume fits" card: three bars, then groups of skills with a plain heading each */
.fit { background: var(--bg); gap: var(--s-4); }
.fit h3 { font-size: var(--fs-md, 17px); }
.fit h4 { font-size: 14px; font-weight: 700; }
.fit-row { display: flex; flex-direction: column; gap: 6px; }
.fit-top { display: flex; justify-content: space-between; gap: var(--s-3); align-items: baseline; flex-wrap: wrap; }
.fit-top span { font-weight: 600; }
.fit-bar { height: 8px; border-radius: 99px; background: var(--border, #e3e0f5); overflow: hidden; }
.fit-bar i { display: block; height: 100%; border-radius: 99px; background: var(--primary, #7160f2); }
.fit-bar i[data-level="low"] { background: #e0a14a; }
.fit-group { display: flex; flex-direction: column; gap: 6px; padding-top: var(--s-4); border-top: 1px solid var(--border, #e3e0f5); }
.fit-group p { margin: 0; }
.fit-group ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

/* In-app viewer (template preview, sample PDF): a full-screen layer with its own Close button */
.viewer { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; background: var(--bg); }
.viewer-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) var(--s-4); padding-top: max(var(--s-3), env(safe-area-inset-top)); border-bottom: 1px solid var(--border); background: var(--white); }
.viewer-body { flex: 1; overflow: auto; padding: var(--s-3); display: flex; justify-content: center; align-items: flex-start; -webkit-overflow-scrolling: touch; }
.viewer-page { flex: none; background: var(--white); box-shadow: var(--shadow-2); border-radius: var(--r-sm); overflow: hidden; } .viewer-page iframe { border: 0; transform-origin: 0 0; display: block; }
.viewer .pdf-frame { height: 100%; } .viewer .pdf-pages { width: 100%; height: 100%; max-height: none; }
body.viewer-open { overflow: hidden; }

/* auth-pro.css: the sign-in, sign-up and forgot-password screens (class "auth-pro" on the auth frame): the story panel, the card, the fields, the button, the error and busy states, tablet and phone.
   It holds: the premium look shared by the three public account screens, plus the eye's "hidden" icon that every password field shares. It must not hold: page logic (js/pages) or the other layouts (pages.css). */

.pw-eye[aria-pressed="true"] { background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B4BFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 19c-6.4 0-10-7-10-7a18.5 18.5 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c6.4 0 10 7 10 7a18.5 18.5 0 0 1-2.16 3.19M14.12 14.12a3 3 0 1 1-4.24-4.24M1 1l22 22'/%3E%3C/svg%3E"); }
.pw-eye:hover { background-color: var(--surface); }

.auth-pro { position: relative; overflow-x: clip; }
@media (min-width: 1100px) { .auth-pro { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .auth-pro .auth-head, .auth-pro .auth-steps { padding-inline: clamp(72px, 8vw, 140px); } } /* the blue half and the sign-in half are equal */

/* back to the website */
.auth-back { position: absolute; top: 24px; left: clamp(72px, 8vw, 140px); z-index: 3; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px 0 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.72); border: 1px solid rgba(91, 75, 255, 0.16);
  color: var(--ink); font: 600 13px/1 var(--font); text-decoration: none; transition: background 160ms var(--ease), box-shadow 160ms var(--ease); }
.auth-back svg { transition: transform 160ms var(--ease); }
.auth-back:hover { background: var(--white); box-shadow: 0 6px 16px -8px rgba(91, 75, 255, 0.5); } .auth-back:hover svg { transform: translateX(-2px); }
.auth-back:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* the story panel (desktop): a soft glow, a quiet dot grid, glass step cards, and Pip */
.auth-pro::before { background: radial-gradient(560px 420px at 8% 4%, rgba(255, 255, 255, 0.8), transparent 70%), radial-gradient(520px 520px at 100% 108%, rgba(113, 96, 242, 0.3), transparent 70%),
  radial-gradient(rgba(91, 75, 255, 0.14) 1.2px, transparent 1.5px) 0 0 / 24px 24px, linear-gradient(160deg, #EAE5FF 0%, #DCD5FF 100%); }
.auth-pro::after { content: ""; grid-column: 1; grid-row: 1 / -1; z-index: 0; pointer-events: none; background: radial-gradient(260px 260px at 78% 18%, rgba(167, 139, 250, 0.35), transparent 70%), radial-gradient(200px 200px at 22% 82%, rgba(91, 75, 255, 0.18), transparent 70%); animation: login-drift 16s ease-in-out infinite alternate; clip-path: inset(0); }
@keyframes login-drift { to { transform: translate3d(18px, -14px, 0) scale(1.05); } }
.auth-pro .auth-head h1 { font-size: 44px; line-height: 52px; letter-spacing: -0.025em; max-width: 480px; }
.auth-pro .auth-lead { font-size: 15px; line-height: 24px; }
.auth-pro .steps { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.auth-pro .steps li { align-items: center; padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.62); border: 1px solid rgba(255, 255, 255, 0.9); box-shadow: 0 1px 2px rgba(13, 11, 45, 0.05); backdrop-filter: blur(6px); transition: transform 200ms var(--ease), background 200ms var(--ease); }
.auth-pro .steps li:hover { transform: translateX(4px); background: rgba(255, 255, 255, 0.86); }
.auth-pro .steps .num { background: linear-gradient(135deg, #7A69F7, #5B4BFF); box-shadow: 0 6px 12px -4px rgba(91, 75, 255, 0.65); }
.auth-pip { display: none; }
@media (min-width: 1100px) and (min-height: 720px) {
  .auth-pip { display: flex; align-items: center; gap: 12px; position: absolute; left: clamp(72px, 8vw, 140px); bottom: 36px; z-index: 1; max-width: 440px; }
  .auth-pip svg { flex: none; animation: login-bob 3.4s ease-in-out infinite; }
  .auth-pip p { margin: 0; padding: 12px 16px; border-radius: 16px 16px 16px 4px; background: var(--white); box-shadow: 0 8px 20px -10px rgba(13, 11, 45, 0.3); font-size: 13px; line-height: 20px; color: var(--text); }
}
@keyframes login-bob { 50% { transform: translateY(-5px); } }

/* the card */
.auth-pro .auth-main { padding: 48px 32px; }
.auth-pro .auth-card { width: min(440px, 100%); padding: 40px; gap: 20px; border-radius: 24px; background: var(--white); border: 1px solid rgba(113, 96, 242, 0.14); box-shadow: 0 32px 64px -32px rgba(91, 75, 255, 0.4), 0 2px 8px rgba(13, 11, 45, 0.05); animation: login-rise 480ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes login-rise { from { transform: translateY(14px); } } /* movement only: if a browser pauses animations (hidden tab, device preview) the form is still fully visible */
.auth-pro .auth-card h2 { font-size: 26px; line-height: 34px; letter-spacing: -0.015em; }
.auth-pro .auth-card .muted { font-size: 14px; }
.auth-pro .auth-card form { gap: 18px; }
.auth-pro .field label { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ink); }
.field-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.auth-pro .auth-card .field-link { font-size: 13px; font-weight: 600; color: var(--accent); padding: 8px 0; margin: -8px 0; }
.auth-pro .auth-card .input { min-height: 48px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid #D5CFF4; background: var(--white); font-size: 15px; line-height: 22px; transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease); }
.auth-pro .auth-card .select { min-height: 48px; border-radius: 12px; border: 1.5px solid #D5CFF4; font-size: 15px; }
.auth-pro .auth-card:has([data-page="signup"]) { width: min(560px, 100%); }
.auth-pro .auth-card .input:hover { border-color: #B9B0EE; }
.auth-pro .auth-card .input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(91, 75, 255, 0.16); }
.auth-pro .auth-card .pw-box .input { padding-right: 48px; }
.auth-pro .field[data-invalid="true"] .input { border: 1.5px solid var(--ink); box-shadow: 0 0 0 3px rgba(13, 11, 45, 0.1); }
.auth-pro .field .error { font-size: 12.5px; line-height: 18px; font-weight: 600; } .auth-pro .field .error::before { content: none; }
.field-hint { align-self: flex-start; margin-top: 6px; padding: 4px 10px; border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 12px; font-weight: 600; }
.auth-pro .auth-card .form-error { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; background: #F1EEFF; border: 1px solid var(--surface-strong); border-left: 4px solid var(--ink); font-size: 13px; line-height: 20px; font-weight: 600; }
.auth-pro .auth-card .form-error:not([hidden]) { animation: login-nudge 320ms ease-out; }
.auth-pro .auth-card .form-error::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 1px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230D0B2D' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 8v4M12 16h.01'/%3E%3C/svg%3E") center / contain no-repeat; }
@keyframes login-nudge { 20% { transform: translateX(-5px); } 50% { transform: translateX(4px); } 80% { transform: translateX(-2px); } }
.auth-pro .auth-card .btn-primary { min-height: 50px; border-radius: 14px; font-size: 15px; font-weight: 700; background: linear-gradient(135deg, #7A69F7 0%, #5B4BFF 100%); box-shadow: 0 14px 26px -14px rgba(91, 75, 255, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.22); transition: transform 150ms var(--ease), box-shadow 150ms var(--ease); }
.auth-pro .auth-card .btn-primary:hover:not([disabled]) { transform: translateY(-1px); background: linear-gradient(135deg, #7A69F7 0%, #5B4BFF 100%); box-shadow: 0 18px 30px -14px rgba(91, 75, 255, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.22); }
.auth-pro .auth-card .btn-primary:active:not([disabled]) { transform: translateY(0); }
.auth-pro .auth-card .btn-primary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.auth-pro .auth-card .btn[aria-busy="true"] { opacity: 1; cursor: progress; }
.auth-pro .auth-card .btn[disabled]:not([aria-busy]) { opacity: 0.7; }
.auth-pro .auth-note { margin: 0; font-size: 13px; line-height: 20px; color: var(--text-muted); }
.auth-pro .auth-new { margin: 0; padding-top: 18px; border-top: 1px solid var(--border); text-align: center; color: var(--text-muted); }
.auth-pro .auth-card .auth-new a { font-size: 14px; font-weight: 700; color: var(--accent); }
.auth-pro .auth-card .legal { margin-top: -4px; color: var(--text-muted); }

/* tablet and phone: one column on a soft lavender top; the story panel is gone, the back link and the brand sit above the card */
@media (max-width: 1099px) {
  .auth-pro { background: linear-gradient(180deg, #E4DEFF 0, #EEEAFF 320px, var(--bg) 640px); }
  .auth-pro::after { display: none; }
  .auth-back { left: 20px; top: 16px; }
  .auth-pro .auth-head { padding-top: 76px; gap: 6px; }
  .auth-pro .auth-head h1 { max-width: 420px; font-size: 18px; line-height: 26px; font-weight: 600; letter-spacing: 0; color: var(--text); }
  .auth-pro .auth-main { padding: 24px 24px 48px; align-items: center; }
  .auth-pro .auth-card { width: min(480px, 100%); }
}
@media (min-width: 600px) and (max-width: 1099px) { /* tablet: the story steps sit under the card in one row, so the page is never a card on an empty screen */
  .auth-pro { grid-template-rows: auto auto auto; }
  .auth-pro .auth-main { padding-bottom: 8px; }
  .auth-pro .auth-steps { display: flex; grid-column: 1; grid-row: 3; width: min(760px, 100%); margin: 0 auto; padding: 16px 24px 56px; gap: 16px; }
  .auth-pro .auth-steps h2 { display: block; margin: 0; font-size: 17px; line-height: 24px; text-align: center; }
  .auth-pro .steps { flex-direction: row; align-items: stretch; }
  .auth-pro .steps li { flex: 1 1 0; min-width: 0; align-items: start; }
  .auth-pro .steps li:hover { transform: none; }
}
@media (max-width: 599px) {
  .auth-pro { background: linear-gradient(180deg, #E4DEFF 0, #EEEAFF 380px, var(--bg) 760px); }
  .auth-pro .auth-head { padding: 84px 20px 0; gap: 12px; }
  .auth-pro .auth-head h1 { font-size: 30px; line-height: 36px; font-weight: 700; letter-spacing: -0.02em; }
  .auth-pro .auth-main { padding: 20px 16px 0; align-items: start; }
  .auth-pro .auth-card { padding: 24px 20px; border-radius: 20px; gap: 16px; }
  .auth-pro .auth-card h2 { font-size: 24px; line-height: 30px; }
  .auth-pro .auth-card .input { font-size: 16px; min-height: 50px; } /* 16px: a phone does not zoom the page when a field is tapped */
  .auth-pro .auth-steps { padding: 28px 20px max(40px, env(safe-area-inset-bottom)); }
  .auth-pro .steps li { padding: 12px 14px; }
  .auth-pro .steps li:hover { transform: none; }
  .auth-back { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .auth-pro *, .auth-pro::after { animation: none !important; transition: none !important; } }
.auth-pro .checkbox a { display: inline-block; padding: 12px 4px; margin: -12px -4px; }
.tel-row { display: flex; gap: 8px; } .tel-row .select { min-width: 0; text-overflow: ellipsis; } .tel-row .input { flex: 1; min-width: 0; }
.auth-pro .field label em { font-style: normal; font-weight: 500; color: var(--text-muted); }
/* the phone: one box, a short "+92" on the left (a small searchable list opens under it, inside the page), the number on the right */
.tel-row { position: relative; gap: 0; }
.tel-js { align-items: stretch; border: 1.5px solid #D5CFF4; border-radius: 12px; background: var(--white, #fff); transition: border-color 150ms, box-shadow 150ms; } .tel-js:hover { border-color: #B9B0EE; } .tel-js:focus-within { border-color: var(--accent, #5B4BFF); box-shadow: 0 0 0 4px rgba(91, 75, 255, 0.16); }
.tel-code { flex: none; display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px 0 14px; border: 0; border-right: 1.5px solid #E6E1FA; border-radius: 10px 0 0 10px; background: var(--surface, #F1EEFF); font: 700 15px/1 var(--font); color: var(--ink, #0D0B2D); cursor: pointer; }
.tel-code[hidden] { display: none; }
.tel-code::after { content: ""; width: 7px; height: 7px; margin-top: -3px; border: solid var(--ink, #0D0B2D); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.tel-js .input { flex: 1; min-width: 0; border: 0 !important; box-shadow: none !important; background: transparent; border-radius: 0 12px 12px 0; }
.tel-menu { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: min(340px, 100%); display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid #D5CFF4; border-radius: 14px; background: var(--white, #fff); box-shadow: 0 18px 40px -16px rgba(13, 11, 45, 0.35); }
.tel-menu[hidden] { display: none; }
.tel-menu .input { flex: none; border: 1.5px solid #D5CFF4 !important; border-radius: 10px; min-height: 40px; padding: 8px 12px; font-size: 15px; }
.tel-menu ul { margin: 0; padding: 0; list-style: none; max-height: 232px; overflow-y: auto; overscroll-behavior: contain; }
.tel-menu li { padding: 10px 12px; border-radius: 8px; font-size: 15px; line-height: 20px; color: var(--ink, #0D0B2D); cursor: pointer; } .tel-menu li:hover, .tel-menu li.on { background: var(--surface, #F1EEFF); }
.tel-menu li[aria-selected="true"] { font-weight: 700; } .tel-menu li[hidden] { display: none; }
.field[data-invalid] .tel-js { border-color: var(--ink, #0D0B2D); box-shadow: 0 0 0 3px rgba(13, 11, 45, 0.1); }
@media (max-width: 599px) { .tel-menu { width: 100%; } .tel-menu .input { font-size: 16px; } }
/* the code boxes and the card never push past the screen: the six boxes share the width, whatever it is */
.auth-pro .auth-main, .auth-pro .auth-card { min-width: 0; } .auth-pro .auth-main { grid-template-columns: minmax(0, 1fr); }
.auth-pro .otp { width: 100%; gap: clamp(4px, 1.8vw, 10px); } .auth-pro .otp input { flex: 1 1 0; min-width: 0; width: auto; max-width: 56px; height: 52px; font-size: 20px; }
.auth-pro .auth-resend .linklike { min-height: 44px; padding: 0 6px; font-size: 13px; } .auth-pro .auth-resend a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; }
@view-transition { navigation: auto; } /* the website pages opt in too: a move between them and these screens has no aborted-transition error in the console */
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
