@font-face {
  font-family: "Refynes Poppins";
  src: url("./fonts/Poppins-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Refynes Poppins";
  src: url("./fonts/Poppins-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Refynes Lora";
  src: url("./fonts/Lora-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Refynes Lora";
  src: url("./fonts/Lora-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Refynes Space Grotesk";
  src: url("./fonts/SpaceGrotesk-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Refynes Space Grotesk";
  src: url("./fonts/SpaceGrotesk-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg-1: #f7efe6;
  --bg-2: #dff2ec;
  --canvas-glow-1: rgba(255, 170, 123, 0.22);
  --canvas-glow-2: rgba(66, 169, 151, 0.2);

  --ink: #102126;
  --muted: #4a5f65;
  --label: #264046;
  --line: #cfd9d8;

  --topbar-bg: rgba(255, 252, 247, 0.78);
  --topbar-border: rgba(255, 255, 255, 0.68);

  --panel-editor-bg: rgba(255, 252, 247, 0.76);
  --panel-preview-bg: rgba(234, 247, 242, 0.72);

  --card-bg: #ffffff;
  --card-subtle-bg: #fbf8f3;
  --card-border: rgba(207, 217, 216, 0.95);
  --card: #ffffff;
  --surface-glass: rgba(255, 252, 247, 0.72);
  --surface-glass-strong: rgba(255, 252, 247, 0.84);
  --surface-soft: rgba(250, 247, 241, 0.9);
  --surface-elevated: rgba(255, 255, 255, 0.94);

  --input-bg: #fffdf9;
  --input-text: #132226;
  --text: #102126;
  --placeholder: #728389;

  --accent: #146b6d;
  --accent-strong: #0d5255;
  --accent-soft: rgba(20, 107, 109, 0.14);
  --accent-contrast: #f7fbfa;
  --danger: #a33e2f;

  --button-text: #f7fbfa;
  --ghost-hover: rgba(20, 107, 109, 0.1);
  --ghost-border: rgba(69, 103, 111, 0.24);

  --resume-paper-bg: #ffffff;
  --resume-paper-border: #d7e3dd;
  --resume-text: #24383e;
  --resume-muted: #52656a;

  --shadow: 0 16px 36px rgba(15, 32, 38, 0.12);
  --shadow-soft: 0 14px 32px rgba(13, 31, 37, 0.1);
  --shadow-strong: 0 22px 48px rgba(11, 29, 35, 0.16);
  --radius: 18px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --focus-ring: rgba(20, 107, 109, 0.24);

  /* ─── Easing tokens (Emil Kowalski — animations.dev) ───────────────────
     Custom curves with more "punch" than built-in ease-out / ease-in-out.
     Use these for ALL transitions instead of bare `ease`. */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  /* Near-black glass base with a faint Refynes-green ambient (no pure #000) */
  --bg-1: #0a0b0c;
  --bg-2: #101315;
  --canvas-glow-1: rgba(70, 201, 138, 0.1);
  --canvas-glow-2: rgba(70, 201, 138, 0.06);

  --ink: #eef1f1;
  --muted: #9aa1a3;
  --label: #cdd2d3;
  --line: rgba(255, 255, 255, 0.09);

  /* Frosted glass chrome — translucent so backdrop-blur reads as glass */
  --topbar-bg: rgba(18, 21, 23, 0.62);
  --topbar-border: rgba(255, 255, 255, 0.1);

  --panel-editor-bg: rgba(20, 23, 25, 0.58);
  --panel-preview-bg: rgba(15, 18, 20, 0.55);

  /* Smoked dark glass — fill is DARKER than the canvas; the luminous edge +
     blur carry the glassiness (avoids the washed-out grey look) */
  --card-bg: rgba(13, 15, 17, 0.55);
  --card-subtle-bg: rgba(20, 23, 26, 0.6);
  --card-border: rgba(255, 255, 255, 0.12);
  --card: rgba(13, 15, 17, 0.55);
  --surface-glass: rgba(12, 14, 16, 0.58);
  --surface-glass-strong: rgba(10, 12, 14, 0.78);
  --surface-soft: rgba(16, 19, 22, 0.52);
  --surface-elevated: rgba(22, 25, 28, 0.72);

  /* Inputs read as recessed dark wells carved into the glass */
  --input-bg: rgba(0, 0, 0, 0.32);
  --input-text: #eef1f1;
  --text: #eef1f1;
  --placeholder: #7e8587;

  /* Refynes green — the signature accent on important components */
  --accent: #46c98a;
  --accent-strong: #74e2ab;
  --accent-soft: rgba(70, 201, 138, 0.16);
  --accent-contrast: #04150d;
  --danger: #e0796a;

  --button-text: #04150d;
  --ghost-hover: rgba(255, 255, 255, 0.07);
  --ghost-border: rgba(255, 255, 255, 0.14);

  /* Resume paper stays solid + legible (it is a document, not chrome) */
  --resume-paper-bg: #15181a;
  --resume-paper-border: rgba(255, 255, 255, 0.08);
  --resume-text: #e6e9e9;
  --resume-muted: #a2a8aa;

  --shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.5);
  --shadow-strong: 0 28px 64px rgba(0, 0, 0, 0.66);
  --focus-ring: rgba(70, 201, 138, 0.32);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  min-height: 100%;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  overscroll-behavior-y: none;
}

/* Prevent body scroll on desktop when the app workspace is visible */
@media (min-width: 981px) {
  body:has(.workspace-shell) {
    overflow-y: hidden;
  }
}

/* On native iOS, body/html must be locked — only the app shell scrolls */
html:has(.native-shell),
body:has(.native-shell) {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden !important;
  overscroll-behavior: none;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 10%, var(--canvas-glow-1), transparent 38%),
    radial-gradient(circle at 92% 8%, var(--canvas-glow-2), transparent 36%),
    linear-gradient(155deg, var(--bg-1), var(--bg-2));
  background-size: 160% 160%;
  animation: canvasDrift 18s ease-in-out infinite;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Light theme — pure white background with a whisper of warmth instead
   of the cream gradient. Cleaner, more "Apple-like" — lets the content
   breathe without competing for attention. The subtle radial glows stay
   at very low opacity so there's still a tiny depth cue. */
:root[data-theme="light"] body,
:root:not([data-theme="dark"]) body {
  background:
    radial-gradient(circle at 8% 10%, rgba(94, 202, 197, 0.05), transparent 38%),
    radial-gradient(circle at 92% 8%, rgba(167, 139, 250, 0.04), transparent 36%),
    #ffffff;
  background-size: 160% 160%;
}
:root[data-theme="dark"] body {
  /* re-assert the dark gradient for explicit dark theme — we need this
     because the :root[data-theme="light"] selector ABOVE would otherwise
     win specificity vs the fallback */
  background:
    radial-gradient(circle at 8% 10%, var(--canvas-glow-1), transparent 38%),
    radial-gradient(circle at 92% 8%, var(--canvas-glow-2), transparent 36%),
    linear-gradient(155deg, var(--bg-1), var(--bg-2));
}

::selection {
  background: color-mix(in srgb, var(--accent) 24%, transparent);
  color: var(--ink);
}

a {
  color: var(--accent-strong);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--accent);
}

a:focus-visible {
  outline: none;
  border-radius: 8px;
  box-shadow:
    0 0 0 3px var(--focus-ring),
    0 0 0 6px color-mix(in srgb, var(--accent) 12%, transparent);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 400;
  transform: translateY(-140%);
  border-radius: 999px;
  padding: 10px 14px;
  background: var(--accent);
  color: var(--button-text);
  font-weight: 800;
  text-decoration: none;
  box-shadow: var(--shadow-strong);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.app-splash-shell {
  min-height: 100vh;
  min-height: 100dvh;
  padding:
    calc(24px + var(--safe-top))
    min(28px, 6vw)
    calc(24px + var(--safe-bottom));
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.app-splash-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
  pointer-events: none;
}

.app-splash-glow-a {
  width: 52vh;
  height: 52vh;
  left: -14vh;
  top: calc(var(--safe-top) - 6vh);
  background: rgba(74, 161, 255, 0.26);
  animation: nativeGlowDrift 7s ease-in-out infinite;
}

.app-splash-glow-b {
  width: 48vh;
  height: 48vh;
  right: -12vh;
  bottom: calc(var(--safe-bottom) - 8vh);
  background: rgba(18, 98, 117, 0.2);
  animation: nativeGlowDrift 8s ease-in-out infinite reverse;
}

.app-splash-card {
  position: relative;
  z-index: 2;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(230, 246, 243, 0.6));
  backdrop-filter: blur(16px) saturate(1.08);
  padding: 22px 24px;
  width: min(340px, 100%);
  display: grid;
  justify-items: center;
  gap: 8px;
  box-shadow:
    0 26px 52px rgba(6, 20, 28, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
  animation: nativeCardIn 260ms cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

.app-splash-logo {
  /* Now wraps a wordmark — taller width than the old square icon. Keep
     intrinsic aspect by setting height only. */
  height: 56px;
  width: auto;
  max-width: 280px;
  border-radius: 0;
}
.app-splash-logo .brand-wordmark-img {
  height: 56px;
}

.app-splash-name {
  margin: 2px 0 0;
  font-family: "Poppins", sans-serif;
  font-size: 1.56rem;
  line-height: 1.18;
}

.app-splash-tagline {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
}

:root[data-theme="dark"] .app-splash-card {
  border-color: rgba(131, 198, 187, 0.32);
  background: linear-gradient(145deg, rgba(18, 43, 50, 0.92), rgba(10, 34, 38, 0.84));
  box-shadow:
    0 28px 56px rgba(1, 8, 12, 0.54),
    inset 0 1px 0 rgba(166, 222, 212, 0.16);
}

.native-signup-shell {
  min-height: 100vh;
  min-height: 100dvh;
  padding:
    calc(24px + var(--safe-top))
    min(28px, 5vw)
    calc(22px + var(--safe-bottom));
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.native-signup-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(8px);
}

.native-signup-glow-a {
  width: 48vh;
  height: 48vh;
  left: -12vh;
  top: calc(var(--safe-top) - 5vh);
  background: rgba(255, 196, 133, 0.24);
  animation: nativeGlowDrift 7s ease-in-out infinite;
}

.native-signup-glow-b {
  width: 44vh;
  height: 44vh;
  right: -13vh;
  bottom: calc(var(--safe-bottom) - 8vh);
  background: rgba(85, 200, 178, 0.24);
  animation: nativeGlowDrift 8s ease-in-out infinite reverse;
}

.native-signup-card {
  width: min(560px, 100%);
  position: relative;
  z-index: 2;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(233, 249, 245, 0.58));
  backdrop-filter: blur(14px) saturate(1.08);
  box-shadow:
    0 26px 56px rgba(5, 22, 30, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
  padding: 26px;
  animation: nativeCardIn 280ms cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

:root[data-theme="dark"] .native-signup-card {
  border-color: rgba(130, 202, 190, 0.3);
  background: linear-gradient(145deg, rgba(16, 40, 46, 0.9), rgba(10, 32, 36, 0.8));
  box-shadow:
    0 28px 58px rgba(1, 9, 13, 0.48),
    inset 0 1px 0 rgba(172, 229, 220, 0.16);
}

.standalone-auth-top-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: color-mix(in srgb, var(--muted) 88%, var(--accent) 12%);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.18s ease, transform 0.18s ease;
}

.standalone-auth-top-link .button-icon {
  opacity: 0.78;
}

.standalone-auth-top-link:hover {
  color: var(--ink);
  transform: translateX(-1px);
}

.standalone-auth-top-link:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 10px;
}

.native-signup-logo-wrap {
  width: 96px;
  height: 96px;
  margin: 0 auto;
  border-radius: 22px;
  border: 0;
  background: transparent;
  overflow: hidden;
  display: grid;
  place-items: center;
  /* Subtle shadow only — no glow */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  box-shadow: 0 12px 24px rgba(8, 36, 44, 0.2);
}

:root[data-theme="dark"] .native-signup-logo-wrap {
  /* Dark mode: keep the transparent background; drop-shadow stays from base */
  background: transparent;
  border: 0;
  box-shadow: none;
}

.native-signup-logo {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 22px;
  display: block;
}

.native-signup-eyebrow {
  margin: 14px 0 0;
  text-align: center;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 800;
}

.native-signup-title {
  margin: 10px 0 0;
  text-align: center;
  font-family: "Poppins", sans-serif;
  font-size: clamp(1.46rem, 2.2vw, 1.84rem);
  line-height: 1.25;
}

.native-signup-copy {
  margin: 10px auto 0;
  max-width: 460px;
  text-align: center;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.94rem;
}

.native-signup-preview {
  margin-top: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.52);
  padding: 14px;
}

:root[data-theme="dark"] .native-signup-preview {
  border-color: rgba(137, 204, 193, 0.34);
  background: rgba(18, 47, 54, 0.72);
}

.native-signup-preview h2 {
  margin: 0;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Poppins", sans-serif;
}

.native-signup-preview ul {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

.native-signup-preview li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--label);
}

:root[data-theme="dark"] .native-signup-preview li {
  color: var(--ink);
}

.native-signup-actions {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.native-signup-primary {
  border-color: rgba(18, 106, 111, 0.75);
}

.native-signup-primary:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.native-signup-primary:disabled:hover {
  transform: none;
}

/* ══════════════════════════════════════════════════
   iOS Native Auth Screen — Apple-style design
   ══════════════════════════════════════════════════ */
.ios-auth-shell {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(48px + var(--safe-top)) 28px calc(20px + var(--safe-bottom));
  background: #0a1a1f;
  overflow: hidden;
}

/* Animated gradient orbs */
.ios-auth-shell::before,
.ios-auth-shell::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
}

.ios-auth-shell::before {
  width: 300px;
  height: 300px;
  top: -80px;
  left: -60px;
  background: radial-gradient(circle, rgba(94, 202, 197, 0.25), transparent 70%);
  animation: ios-orb-a 8s ease-in-out infinite;
}

.ios-auth-shell::after {
  width: 280px;
  height: 280px;
  bottom: -60px;
  right: -80px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.2), transparent 70%);
  animation: ios-orb-b 10s ease-in-out infinite;
}

@keyframes ios-orb-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, 40px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

@keyframes ios-orb-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-25px, -30px) scale(1.08); }
  66% { transform: translate(15px, -15px) scale(0.92); }
}

.ios-auth-main {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;            /* breathing room between every CTA block */
  position: relative;
  z-index: 1;
}

/* Staggered entrance animations */
.ios-auth-top { animation: ios-fade-up 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: 0.1s; }
.ios-auth-form { animation: ios-fade-up 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: 0.25s; }
.ios-auth-divider { animation: ios-fade-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: 0.4s; }
.ios-auth-buttons { animation: ios-fade-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: 0.5s; }
.ios-auth-switch { animation: ios-fade-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: 0.6s; }
.ios-auth-terms { animation: ios-fade-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: 0.65s; }

@keyframes ios-fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Logo + Title */
.ios-auth-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 32px;
}

/* Floating particles */
.ios-auth-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.ios-auth-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(94, 202, 197, 0.4);
  animation: ios-particle-float 12s ease-in-out infinite;
  animation-delay: calc(var(--i) * -2s);
}

.ios-auth-particle:nth-child(1) { left: 10%; top: 20%; }
.ios-auth-particle:nth-child(2) { left: 85%; top: 15%; width: 3px; height: 3px; background: rgba(139, 92, 246, 0.4); }
.ios-auth-particle:nth-child(3) { left: 50%; top: 80%; width: 5px; height: 5px; }
.ios-auth-particle:nth-child(4) { left: 25%; top: 70%; width: 3px; height: 3px; background: rgba(139, 92, 246, 0.3); }
.ios-auth-particle:nth-child(5) { left: 75%; top: 55%; }
.ios-auth-particle:nth-child(6) { left: 40%; top: 10%; width: 3px; height: 3px; background: rgba(139, 92, 246, 0.35); }

@keyframes ios-particle-float {
  0%, 100% { transform: translateY(0) translateX(0); opacity: 0.3; }
  25% { transform: translateY(-20px) translateX(10px); opacity: 0.7; }
  50% { transform: translateY(-10px) translateX(-15px); opacity: 0.4; }
  75% { transform: translateY(-25px) translateX(5px); opacity: 0.6; }
}

/* Logo with ring */
.ios-auth-logo-ring {
  position: relative;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Subtle pulsing glow BEHIND the logo — soft teal/purple radial, no ring.
   Purely decorative, sits behind via z-index:0. */
.ios-auth-logo-ring::before {
  content: "";
  position: absolute;
  inset: -26px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center,
      rgba(94, 202, 197, 0.28) 0%,
      rgba(94, 202, 197, 0.12) 35%,
      rgba(139, 92, 246, 0.06) 60%,
      transparent 80%);
  filter: blur(14px);
  animation: ios-logo-breathe 4.5s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
}

@keyframes ios-logo-breathe {
  0%, 100% {
    opacity: 0.55;
    transform: scale(0.92);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

.ios-auth-logo-wrap {
  width: 92px;
  height: 92px;
  border-radius: 22px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.ios-auth-logo {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 22px;
  display: block;
}

.ios-auth-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #f0f7f6;
  margin: 0 0 8px;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.ios-auth-sub {
  font-size: 0.88rem;
  color: rgba(178, 208, 205, 0.6);
  margin: 0;
  line-height: 1.6;
  max-width: 300px;
}

/* Feature rows */
.ios-auth-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-bottom: 40px;
}

.ios-auth-feature {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0;
  background: none;
  border: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}

.ios-auth-feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 45%, #8b5cf6));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 25%, transparent);
}

/* Auth buttons */
.ios-auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-bottom: 24px;
}

.ios-auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 54px;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.15s, opacity 0.15s;
  border: none;
  letter-spacing: -0.01em;
}

.ios-auth-btn:active:not(:disabled) {
  transform: scale(0.97);
  opacity: 0.85;
}

.ios-auth-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.ios-auth-btn-google {
  background: #fff;
  color: #1f1f1f;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1), 0 0 0 1px rgba(0,0,0,0.06);
}

.ios-auth-btn-linkedin {
  background: #0A66C2;
  color: #fff;
  box-shadow: 0 2px 8px rgba(10,102,194,0.3);
}

.ios-auth-btn-linkedin .linkedin-brand-icon {
  filter: brightness(10);
}

.ios-auth-btn-email {
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--line);
}

/* Divider */
.ios-auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin: 4px 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.ios-auth-divider::before,
.ios-auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* Terms */
/* Form */
.ios-auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-bottom: 0;       /* handled by parent gap */
}

.ios-auth-input-wrap {
  position: relative;
  width: 100%;
}

.ios-auth-input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(94, 202, 197, 0.5);
  pointer-events: none;
  z-index: 1;
}

.ios-auth-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(178, 208, 205, 0.7);
  letter-spacing: 0.02em;
}

.ios-auth-input {
  width: 100% !important;
  height: 54px !important;
  border-radius: 16px !important;
  border: 1.5px solid rgba(94, 202, 197, 0.12) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  color: #f0f7f6 !important;
  font-size: 0.95rem !important;
  padding: 0 18px 0 46px !important;
  font-family: inherit !important;
  margin: 0 !important;
  box-shadow: none !important;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s !important;
  -webkit-appearance: none !important;
}

.ios-auth-input:focus {
  outline: none !important;
  border-color: rgba(94, 202, 197, 0.45) !important;
  background: rgba(255, 255, 255, 0.07) !important;
  box-shadow: 0 0 0 3px rgba(94, 202, 197, 0.08), 0 0 24px rgba(94, 202, 197, 0.06) !important;
}

.ios-auth-input:focus + .ios-auth-input-icon,
.ios-auth-input-wrap:focus-within .ios-auth-input-icon {
  color: rgba(94, 202, 197, 0.8);
}

.ios-auth-input::placeholder {
  color: rgba(178, 208, 205, 0.3) !important;
}

/* Submit button */
.ios-auth-btn-submit {
  background: linear-gradient(135deg, #5ecac5, #7c6cf6) !important;
  color: #fff !important;
  box-shadow: 0 6px 24px rgba(94, 202, 197, 0.3), 0 0 50px rgba(139, 92, 246, 0.12);
  margin-top: 8px;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  letter-spacing: 0.01em;
  transition: transform 0.12s, box-shadow 0.25s !important;
  position: relative;
  overflow: hidden;
}

/* Shimmer animation on button — uses `transform: translateX()` instead of
   `left:` so the infinite loop animates only the GPU compositor, not the
   layout/paint pipeline (was triggering full reflow per frame on iOS). */
.ios-auth-btn-submit::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: translateX(-100%);
  animation: ios-btn-shimmer 3s ease-in-out infinite;
  pointer-events: none;
  will-change: transform;
}

@keyframes ios-btn-shimmer {
  0%        { transform: translateX(-100%); }
  50%, 100% { transform: translateX(100%); }
}

/* Honor user preference for reduced motion — skip the continuous loop. */
@media (prefers-reduced-motion: reduce) {
  .ios-auth-btn-submit::after { animation: none; transform: translateX(-100%); }
}

.ios-auth-btn-submit:active:not(:disabled) {
  transform: scale(0.96) !important;
}

.ios-auth-btn-submit:disabled {
  opacity: 0.5 !important;
}

/* Feature pills */
.ios-auth-features-mini {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 0;       /* handled by parent gap */
  animation: ios-fade-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.7s;
}

.ios-auth-feature-pill {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(94, 202, 197, 0.7);
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid rgba(94, 202, 197, 0.15);
  background: rgba(94, 202, 197, 0.06);
  letter-spacing: 0.02em;
}

/* Divider */
.ios-auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin: 4px 0;
  color: rgba(178, 208, 205, 0.3);
  font-size: 0.76rem;
  font-weight: 500;
}

.ios-auth-divider::before,
.ios-auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(94, 202, 197, 0.15), transparent);
}

/* Social buttons - dark style */
.ios-auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-bottom: 20px;
}

.ios-auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 52px;
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  letter-spacing: -0.01em;
  transition: transform 0.1s, box-shadow 0.15s, opacity 0.15s;
}

.ios-auth-btn:active:not(:disabled) {
  transform: scale(0.97);
  opacity: 0.85;
}

.ios-auth-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.ios-auth-btn-google {
  background: rgba(255, 255, 255, 0.08);
  color: #f0f7f6;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
}

.ios-auth-btn-linkedin {
  background: rgba(10, 102, 194, 0.2);
  color: #7cb8e8;
  border: 1.5px solid rgba(10, 102, 194, 0.3);
}

.ios-auth-btn-linkedin .linkedin-brand-icon {
  filter: brightness(1.5);
}

.ios-auth-btn-email {
  background: rgba(255, 255, 255, 0.06);
  color: #f0f7f6;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
}

/* Status message (error / working / success) — legacy, kept for any
   non-iOS-auth context that still references it. */
.ios-auth-status {
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  margin: 0;
  padding: 12px 16px;
  border-radius: 12px;
  line-height: 1.4;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(240, 247, 246, 0.9);
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.ios-auth-status[data-type="error"] {
  background: rgba(255, 82, 82, 0.14);
  color: #ff9a9a;
  border: 1px solid rgba(255, 82, 82, 0.35);
  font-weight: 600;
  animation: ios-auth-shake 0.4s ease-in-out;
}
@keyframes ios-auth-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}
.ios-auth-status[data-type="success"] {
  background: rgba(94, 202, 197, 0.12);
  color: #8fe6e1;
  border-color: rgba(94, 202, 197, 0.3);
}
.ios-auth-status[data-type="working"] {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(178, 208, 205, 0.85);
  border-color: rgba(178, 208, 205, 0.2);
}
.ios-auth-status[data-type="info"] {
  background: rgba(94, 202, 197, 0.1);
  color: #9fe3de;
  border: 1px solid rgba(94, 202, 197, 0.3);
  font-weight: 500;
}

/* ─────────────────────────────────────────────────────────────────────
   New auth banner — sits inside the form, above the inputs, so it's
   always visible regardless of keyboard state. Slides down with a
   strong custom ease, lights up the input borders below it on error,
   and offers a tap-to-dismiss close button.
   ───────────────────────────────────────────────────────────────────── */
.ios-auth-banner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 12px 12px;
  border-radius: 14px;
  margin-bottom: 14px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.005em;
  /* Slide down + scale settle. Strong custom ease-out for instant
     visibility, which is the whole point of this banner. */
  animation: ios-auth-banner-in 320ms cubic-bezier(0.23, 1, 0.32, 1);
  transform-origin: top center;
  border: 1px solid transparent;
}
@keyframes ios-auth-banner-in {
  0% { opacity: 0; transform: translateY(-12px) scale(0.96); }
  60% { opacity: 1; transform: translateY(2px) scale(1.01); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.ios-auth-banner-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  flex-shrink: 0;
}
.ios-auth-banner-text {
  min-width: 0;
  word-break: normal;
  overflow-wrap: anywhere;
}
.ios-auth-banner-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: inherit;
  opacity: 0.55;
  cursor: pointer;
  transition: opacity 160ms cubic-bezier(0.23, 1, 0.32, 1),
              background-color 160ms cubic-bezier(0.23, 1, 0.32, 1),
              transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
  -webkit-tap-highlight-color: transparent;
}
.ios-auth-banner-close:hover { opacity: 1; background: rgba(255, 255, 255, 0.08); }
.ios-auth-banner-close:active { transform: scale(0.94); }

/* ── Error variant — soft coral, pulse ring on the icon, gentle shake ── */
.ios-auth-banner[data-type="error"] {
  background: linear-gradient(135deg, rgba(255, 99, 99, 0.20), rgba(255, 99, 99, 0.10));
  border-color: rgba(255, 99, 99, 0.45);
  color: #ffd0d0;
  box-shadow: 0 8px 28px rgba(220, 60, 60, 0.18), 0 0 0 1px rgba(255, 99, 99, 0.10) inset;
  animation:
    ios-auth-banner-in 320ms cubic-bezier(0.23, 1, 0.32, 1),
    ios-auth-banner-nudge 540ms cubic-bezier(0.36, 0.07, 0.19, 0.97) 320ms;
}
.ios-auth-banner[data-type="error"] .ios-auth-banner-icon {
  background: rgba(255, 99, 99, 0.20);
  color: #ff8a8a;
  position: relative;
}
.ios-auth-banner[data-type="error"] .ios-auth-banner-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1.5px solid rgba(255, 99, 99, 0.55);
  animation: ios-auth-banner-pulse 1.6s ease-out infinite;
}
@keyframes ios-auth-banner-pulse {
  0%   { transform: scale(1);    opacity: 0.7; }
  100% { transform: scale(1.45); opacity: 0;   }
}
@keyframes ios-auth-banner-nudge {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-3px); }
  40%      { transform: translateX(3px); }
  60%      { transform: translateX(-2px); }
  80%      { transform: translateX(2px); }
}

/* ── Success variant — Refynes teal aurora ── */
.ios-auth-banner[data-type="success"] {
  background: linear-gradient(135deg, rgba(94, 202, 197, 0.22), rgba(94, 202, 197, 0.10));
  border-color: rgba(94, 202, 197, 0.50);
  color: #c8f0ed;
  box-shadow: 0 8px 28px rgba(94, 202, 197, 0.18), 0 0 0 1px rgba(94, 202, 197, 0.10) inset;
}
.ios-auth-banner[data-type="success"] .ios-auth-banner-icon {
  background: rgba(94, 202, 197, 0.22);
  color: #5ecac5;
}

/* ── Info variant — calm muted teal ── */
.ios-auth-banner[data-type="info"] {
  background: linear-gradient(135deg, rgba(94, 202, 197, 0.14), rgba(167, 139, 250, 0.08));
  border-color: rgba(94, 202, 197, 0.32);
  color: #b8e6e2;
  box-shadow: 0 6px 22px rgba(94, 202, 197, 0.10);
}
.ios-auth-banner[data-type="info"] .ios-auth-banner-icon {
  background: rgba(94, 202, 197, 0.14);
  color: #9fe3de;
}

/* ── Working variant — neutral, subtle ── */
.ios-auth-banner[data-type="working"] {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.10);
  color: rgba(178, 208, 205, 0.92);
}
.ios-auth-banner[data-type="working"] .ios-auth-banner-icon {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(178, 208, 205, 0.92);
}

/* When the banner is showing an error, the email/password input borders
   light up coral too — so the user sees both the message and exactly
   which fields need attention. */
.ios-auth-input-wrap.is-error {
  border-color: rgba(255, 99, 99, 0.55);
  background: rgba(255, 99, 99, 0.06);
  box-shadow: 0 0 0 3px rgba(255, 99, 99, 0.08);
  transition:
    border-color 200ms cubic-bezier(0.23, 1, 0.32, 1),
    background-color 200ms cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow 200ms cubic-bezier(0.23, 1, 0.32, 1);
}
.ios-auth-input-wrap.is-error .ios-auth-input-icon {
  color: #ff8a8a;
}
/* Reduce-motion: keep the banner instantly visible but kill movement */
@media (prefers-reduced-motion: reduce) {
  .ios-auth-banner,
  .ios-auth-banner[data-type="error"] {
    animation: none;
  }
  .ios-auth-banner[data-type="error"] .ios-auth-banner-icon::after {
    animation: none;
    opacity: 0.5;
  }
}

/* ─── Forgot-password SENT confirmation card ─── */
.ios-auth-sent-icon-wrap {
  width: 92px;
  height: 92px;
  border-radius: 24px;
  background: rgba(88, 203, 198, 0.08);
  border: 1.5px solid rgba(88, 203, 198, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: ios-auth-sent-pop 0.5s cubic-bezier(0.22, 1.2, 0.36, 1);
}
@keyframes ios-auth-sent-pop {
  from { opacity: 0; transform: scale(0.6); }
  to { opacity: 1; transform: scale(1); }
}
.ios-auth-sent-card {
  width: 100%;
  padding: 20px;
  border-radius: 18px;
  background: rgba(17, 40, 48, 0.6);
  border: 1px solid rgba(88, 203, 198, 0.25);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ios-auth-sent-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ios-auth-sent-step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
  color: rgba(226, 242, 239, 0.9);
  line-height: 1.35;
}
.ios-auth-sent-step-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(88, 203, 198, 0.18);
  border: 1px solid rgba(88, 203, 198, 0.4);
  color: #89e2db;
  font-weight: 700;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ios-auth-sent-hint {
  font-size: 0.78rem;
  color: rgba(178, 208, 205, 0.7);
  line-height: 1.5;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(88, 203, 198, 0.12);
}
.ios-auth-sent-hint code {
  font-family: "SF Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  background: rgba(0, 0, 0, 0.35);
  padding: 1px 5px;
  border-radius: 4px;
  color: #89e2db;
}

/* "Back to Sign In" button on the dedicated forgot-password screen */
.ios-auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--line, #274249);
  color: var(--label, #d0e3e0);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  align-self: center;
}
.ios-auth-back-link:hover {
  background: rgba(94, 202, 197, 0.08);
  border-color: rgba(94, 202, 197, 0.35);
  color: var(--text, #e2f2ef);
}
.ios-auth-back-link:active {
  transform: translateY(1px);
}

/* Forgot password link beneath the sign-in button */
.ios-auth-forgot {
  background: transparent;
  border: 0;
  color: rgba(178, 208, 205, 0.8);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 0 0 0;
  margin: 0 auto;
  cursor: pointer;
  text-align: center;
  text-decoration: underline;
  text-decoration-color: rgba(178, 208, 205, 0.35);
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
  align-self: center;
}
.ios-auth-forgot:hover:not(:disabled) {
  color: #8fe6e1;
  text-decoration-color: #8fe6e1;
}
.ios-auth-forgot:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* "or continue with" divider */
.ios-auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0 2px 0;
}
.ios-auth-divider::before,
.ios-auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(178, 208, 205, 0.2), transparent);
}
.ios-auth-divider span {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(178, 208, 205, 0.45);
}

/* Social buttons — 3 columns when Apple is enabled */
.ios-auth-socials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.ios-auth-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 12px;
  border-radius: 14px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
  color: #f0f7f6;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}
.ios-auth-social:hover:not(:disabled),
.ios-auth-social:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}
.ios-auth-social:active:not(:disabled) {
  transform: scale(0.97);
}
.ios-auth-social:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.ios-auth-social-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.ios-auth-social-google {
  background: #fff;
  color: #1f1f1f;
  border-color: #fff;
}
.ios-auth-social-google:hover:not(:disabled),
.ios-auth-social-google:focus-visible {
  background: #f5f5f5;
  border-color: #f5f5f5;
}
.ios-auth-social-linkedin {
  background: #0a66c2;
  color: #fff;
  border-color: #0a66c2;
}
.ios-auth-social-linkedin:hover:not(:disabled),
.ios-auth-social-linkedin:focus-visible {
  background: #0958a8;
  border-color: #0958a8;
}
.ios-auth-social-apple {
  background: #000;
  color: #fff;
  border-color: #000;
}
.ios-auth-social-apple:hover:not(:disabled),
.ios-auth-social-apple:focus-visible {
  background: #1a1a1a;
  border-color: #1a1a1a;
}

/* Apple sign-in button used in profile hub (desktop / wider layouts) */
.apple-auth-button {
  background: #000 !important;
  color: #fff !important;
  border-color: #000 !important;
}
.apple-auth-button:hover:not(:disabled),
.apple-auth-button:focus-visible {
  background: #1a1a1a !important;
  border-color: #1a1a1a !important;
}

/* Switch link */
.ios-auth-switch {
  text-align: center;
  margin-bottom: 0;      /* handled by parent gap */
  width: 100%;
}

.ios-auth-switch p {
  font-size: 0.84rem;
  color: rgba(178, 208, 205, 0.5);
  margin: 0;
}

.ios-auth-link {
  background: none;
  border: none;
  color: #5ecac5;
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

/* Terms */
.ios-auth-terms {
  font-size: 0.7rem;
  color: rgba(178, 208, 205, 0.45);
  text-align: center;
  max-width: 290px;
  line-height: 1.55;
  margin: 0;
}
.ios-auth-terms-link {
  color: rgba(178, 208, 205, 0.85);
  text-decoration: underline;
  text-decoration-color: rgba(178, 208, 205, 0.4);
  text-underline-offset: 2px;
  font-weight: 500;
  transition: color 0.15s ease;
}
.ios-auth-terms-link:hover,
.ios-auth-terms-link:active {
  color: #8fe6e1;
  text-decoration-color: #8fe6e1;
}

.standalone-auth-footer-link {
  justify-self: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: color-mix(in srgb, var(--muted) 90%, var(--accent) 10%);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.18s ease, opacity 0.18s ease;
}

.standalone-auth-footer-link:hover {
  color: var(--ink);
}

.standalone-auth-footer-link:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 10px;
}

.native-signup-guest {
  font-size: 1.125rem;
}

.landing-shell {
  min-height: 100vh;
  min-height: 100dvh;
  width: min(1400px, 96vw);
  margin: 0 auto;
  padding:
    calc(18px + var(--safe-top))
    0
    calc(32px + var(--safe-bottom));
  position: relative;
  overflow: hidden;
}

.landing-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(18px);
  pointer-events: none;
}

.landing-orb-a {
  width: 58vw;
  height: 58vw;
  max-width: 760px;
  max-height: 760px;
  left: -22vw;
  top: calc(var(--safe-top) - 18vw);
  background: radial-gradient(circle, rgba(255, 176, 116, 0.22), transparent 68%);
}

.landing-orb-b {
  width: 64vw;
  height: 64vw;
  max-width: 880px;
  max-height: 880px;
  right: -24vw;
  top: -14vw;
  background: radial-gradient(circle, rgba(89, 181, 250, 0.22), transparent 70%);
}

.landing-orb-c {
  width: 58vw;
  height: 58vw;
  max-width: 740px;
  max-height: 740px;
  right: -18vw;
  bottom: -24vw;
  background: radial-gradient(circle, rgba(75, 195, 171, 0.18), transparent 72%);
}

.landing-header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--topbar-border);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(235, 249, 245, 0.58));
  backdrop-filter: blur(14px) saturate(1.06);
  padding: 14px 18px;
  box-shadow: 0 18px 36px rgba(7, 26, 33, 0.14);
}

:root[data-theme="dark"] .landing-header {
  border-color: rgba(130, 202, 191, 0.3);
  background: linear-gradient(145deg, rgba(16, 40, 46, 0.9), rgba(10, 33, 38, 0.82));
  box-shadow: 0 20px 40px rgba(1, 10, 14, 0.44);
}

.landing-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.landing-main {
  margin-top: 20px;
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 18px;
  grid-template-areas:
    "hero stage"
    "story story"
    "all all";
}

.landing-hero {
  grid-area: hero;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  background: linear-gradient(152deg, rgba(255, 255, 255, 0.86), rgba(239, 250, 247, 0.64));
  padding: clamp(22px, 3.5vw, 42px);
  box-shadow:
    0 26px 56px rgba(7, 25, 32, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  overflow: hidden;
  position: relative;
  animation: landingBlockIn 520ms cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

.landing-hero::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  right: -160px;
  top: -180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(89, 181, 250, 0.26), transparent 68%);
  pointer-events: none;
}

:root[data-theme="dark"] .landing-hero {
  border-color: rgba(132, 201, 190, 0.32);
  background: linear-gradient(152deg, rgba(17, 41, 47, 0.92), rgba(11, 35, 39, 0.84));
  box-shadow:
    0 28px 58px rgba(1, 9, 12, 0.5),
    inset 0 1px 0 rgba(165, 223, 214, 0.16);
}

.landing-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 800;
}

.landing-hero h2 {
  margin: 12px 0 0;
  font-family: "Poppins", sans-serif;
  font-size: clamp(1.85rem, 4.2vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  max-width: 760px;
}

.landing-copy {
  margin: 14px 0 0;
  color: var(--muted);
  max-width: 700px;
  line-height: 1.56;
  font-size: 1.03rem;
}

.landing-actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 780px;
}

.landing-actions .button {
  flex: 1 1 230px;
  min-width: 0;
}

.landing-stats {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.landing-stat {
  border: 1px solid var(--line);
  border-left: 3px solid color-mix(in srgb, var(--accent) 65%, transparent);
  border-radius: 14px;
  background: var(--card-subtle-bg);
  padding: 10px 13px;
}

.landing-stat p {
  margin: 0;
  font-size: 1.22rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.landing-stat span {
  display: block;
  margin-top: 3px;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
}

.landing-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.landing-stage {
  grid-area: stage;
  display: grid;
  gap: 12px;
}

.landing-stage-card {
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: linear-gradient(152deg, rgba(255, 255, 255, 0.8), rgba(233, 248, 244, 0.62));
  box-shadow:
    0 18px 38px rgba(8, 25, 32, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
  padding: 18px;
  animation: landingBlockIn 520ms cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

.landing-stage-primary {
  border-color: rgba(81, 161, 238, 0.36);
}

.landing-stage-secondary {
  border-color: rgba(66, 170, 151, 0.34);
}

.landing-stage-card:nth-child(2) {
  animation-delay: 90ms;
}

:root[data-theme="dark"] .landing-stage-card {
  border-color: rgba(130, 199, 188, 0.3);
  background: linear-gradient(152deg, rgba(17, 41, 47, 0.9), rgba(11, 34, 39, 0.82));
  box-shadow:
    0 20px 42px rgba(1, 9, 12, 0.5),
    inset 0 1px 0 rgba(165, 223, 214, 0.14);
}

.landing-stage-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.73rem;
  color: var(--muted);
  font-weight: 800;
}

.landing-stage-card h3 {
  margin: 8px 0 0;
  font-family: "Poppins", sans-serif;
  font-size: 1.22rem;
  line-height: 1.28;
}

.landing-stage-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.48;
  font-size: 0.91rem;
}

.landing-stage-tags {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.landing-stage-tags span {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card-subtle-bg);
  padding: 6px 9px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.landing-story-grid {
  grid-area: story;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.landing-story-card {
  border-radius: 20px;
  border: 1px solid var(--card-border);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(237, 250, 247, 0.58));
  padding: 16px;
  box-shadow: 0 12px 24px rgba(9, 24, 31, 0.1);
  animation: landingBlockIn 520ms cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

.landing-story-card:nth-child(1) {
  animation-delay: 80ms;
}

.landing-story-card:nth-child(2) {
  animation-delay: 120ms;
}

.landing-story-card:nth-child(3) {
  animation-delay: 160ms;
}

.landing-story-card:nth-child(4) {
  animation-delay: 200ms;
}

:root[data-theme="dark"] .landing-story-card {
  border-color: rgba(126, 192, 183, 0.28);
  background: linear-gradient(145deg, rgba(17, 41, 47, 0.88), rgba(11, 34, 39, 0.8));
  box-shadow: 0 14px 26px rgba(1, 8, 12, 0.42);
}

.landing-story-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 800;
}

.landing-story-card h3 {
  margin: 8px 0 0;
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  line-height: 1.3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.landing-story-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.46;
}

.landing-all-features {
  grid-area: all;
  border-radius: 24px;
  border: 1px solid var(--card-border);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.8), rgba(233, 248, 244, 0.64));
  box-shadow: 0 18px 36px rgba(7, 24, 31, 0.12);
  padding: 18px;
  animation: landingBlockIn 520ms cubic-bezier(0.2, 0.8, 0.3, 1) both;
  animation-delay: 220ms;
}

:root[data-theme="dark"] .landing-all-features {
  border-color: rgba(129, 196, 186, 0.3);
  background: linear-gradient(145deg, rgba(17, 41, 47, 0.9), rgba(11, 34, 39, 0.82));
  box-shadow: 0 20px 40px rgba(1, 8, 12, 0.46);
}

.landing-all-features h3 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Poppins", sans-serif;
  font-size: 1.08rem;
}

.landing-feature-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.landing-feature-card {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card-subtle-bg);
  padding: 12px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  animation: landingCardRise 460ms cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

.landing-feature-card:nth-child(2) {
  animation-delay: 50ms;
}

.landing-feature-card:nth-child(3) {
  animation-delay: 90ms;
}

.landing-feature-card:nth-child(4) {
  animation-delay: 130ms;
}

.landing-feature-card:nth-child(5) {
  animation-delay: 170ms;
}

.landing-feature-card:nth-child(6) {
  animation-delay: 210ms;
}

.landing-feature-card:nth-child(7) {
  animation-delay: 250ms;
}

.landing-feature-card:nth-child(8) {
  animation-delay: 290ms;
}

.landing-feature-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(23, 98, 103, 0.1);
  color: var(--accent-strong);
}

.landing-feature-title {
  margin: 0;
  font-weight: 800;
  font-size: 0.92rem;
}

.landing-feature-body {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.81rem;
  line-height: 1.42;
}

.landing-footer {
  margin-top: 14px;
  position: relative;
  z-index: 4;
  text-align: center;
}

.landing-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}

.landing-footer-links {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-link-button {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 88%, transparent);
  color: var(--accent-strong);
  border-radius: 999px;
  padding: 7px 14px;
  font-family: "Poppins", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.footer-link-button:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 65%, var(--line));
}

.footer-link-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.privacy-shell {
  width: min(1500px, 96vw);
}

.privacy-main {
  margin-top: 22px;
}

.privacy-card {
  background: linear-gradient(158deg, rgba(255, 255, 255, 0.82), rgba(242, 250, 250, 0.58));
  border: 1px solid rgba(125, 163, 170, 0.3);
  border-radius: 28px;
  padding: clamp(20px, 3vw, 36px);
  box-shadow: 0 18px 36px rgba(16, 39, 50, 0.1);
}

.privacy-card h2 {
  margin: 0;
  font-family: "Poppins", sans-serif;
  font-size: clamp(1.95rem, 4vw, 2.7rem);
  line-height: 1.06;
  color: var(--text);
}

.privacy-meta {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.privacy-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed rgba(128, 162, 168, 0.42);
}

.privacy-section h3 {
  margin: 0;
  font-size: 1.08rem;
  font-family: "Poppins", sans-serif;
  color: var(--text);
}

.privacy-section p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.72;
  font-size: 0.96rem;
}

.privacy-section a {
  color: var(--accent-strong);
  font-weight: 700;
}

:root[data-theme="dark"] .privacy-card {
  background: linear-gradient(160deg, rgba(20, 44, 50, 0.82), rgba(13, 30, 36, 0.9));
  border-color: rgba(82, 122, 132, 0.5);
}

@media (max-width: 760px) {
  .landing-shell.privacy-shell .landing-header-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .landing-shell.privacy-shell .landing-header-actions .button {
    width: 100%;
    justify-content: center;
  }

  .landing-footer-links {
    flex-direction: column;
    gap: 8px;
  }
}

/* Apple-style landing overrides */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px) scale(0.99);
  transition:
    opacity 620ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 620ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.landing-shell {
  width: min(1500px, 96vw);
  padding:
    calc(14px + var(--safe-top))
    0
    calc(36px + var(--safe-bottom));
}

.landing-orb {
  filter: blur(26px);
}

.landing-header {
  position: sticky;
  top: calc(8px + var(--safe-top));
  z-index: 10;
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px) saturate(1.18);
}

:root[data-theme="dark"] .landing-header {
  background: rgba(14, 34, 40, 0.72);
  border-color: rgba(132, 201, 190, 0.3);
}

.landing-main {
  margin-top: 28px;
  gap: 44px;
  grid-template-columns: 1fr;
  grid-template-areas:
    "hero"
    "stage"
    "story"
    "all";
}

.landing-hero {
  border-radius: 40px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  min-height: min(86vh, 860px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 72px);
  background:
    radial-gradient(circle at 78% 14%, rgba(117, 192, 255, 0.34), transparent 38%),
    radial-gradient(circle at 20% 80%, rgba(106, 210, 190, 0.24), transparent 45%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.9), rgba(234, 249, 245, 0.68));
}

:root[data-theme="dark"] .landing-hero {
  border-color: rgba(141, 212, 201, 0.34);
  background:
    radial-gradient(circle at 76% 18%, rgba(88, 166, 224, 0.32), transparent 40%),
    radial-gradient(circle at 24% 82%, rgba(81, 182, 162, 0.2), transparent 44%),
    linear-gradient(164deg, rgba(16, 40, 46, 0.96), rgba(9, 29, 34, 0.9));
}

.landing-kicker {
  letter-spacing: 0.16em;
  font-size: 0.72rem;
}

.landing-hero h2 {
  font-size: clamp(2.15rem, 7vw, 5.2rem);
  line-height: 0.96;
  max-width: none;
}

.landing-copy {
  margin-top: 16px;
  max-width: 780px;
  font-size: clamp(1rem, 1.4vw, 1.22rem);
}

.landing-actions {
  margin-top: 22px;
}

.landing-actions .button {
  min-height: 52px;
}

.landing-stats {
  margin-top: 22px;
  max-width: 760px;
}

.landing-stat {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
  border-color: rgba(158, 183, 190, 0.42);
}

:root[data-theme="dark"] .landing-stat {
  background: rgba(13, 34, 39, 0.72);
  border-color: rgba(120, 172, 165, 0.42);
}

.landing-scroll-hint {
  margin: 16px 0 0;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 800;
}

.landing-note {
  margin-top: 10px;
}

.landing-filmstrip {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.landing-film-card {
  border-radius: 34px;
  padding: clamp(20px, 3.6vw, 38px);
  min-height: clamp(340px, 45vw, 540px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.62);
  box-shadow: 0 28px 52px rgba(8, 22, 28, 0.16);
}

.landing-film-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(170deg, transparent 0%, rgba(7, 17, 22, 0.12) 100%);
  pointer-events: none;
}

.landing-film-card-left {
  background:
    radial-gradient(circle at 80% 14%, rgba(95, 173, 255, 0.5), transparent 44%),
    linear-gradient(170deg, #f6fbff 0%, #d9eef5 100%);
}

.landing-film-card-right {
  background:
    radial-gradient(circle at 14% 16%, rgba(99, 211, 186, 0.42), transparent 42%),
    linear-gradient(170deg, #f6fffb 0%, #d7f1ea 100%);
}

:root[data-theme="dark"] .landing-film-card-left {
  background:
    radial-gradient(circle at 80% 14%, rgba(82, 157, 231, 0.42), transparent 44%),
    linear-gradient(170deg, #112d36 0%, #0c2730 100%);
}

:root[data-theme="dark"] .landing-film-card-right {
  background:
    radial-gradient(circle at 14% 16%, rgba(84, 189, 165, 0.34), transparent 42%),
    linear-gradient(170deg, #112f33 0%, #0c292d 100%);
}

.landing-film-kicker {
  margin: 0;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 800;
}

.landing-film-card h3 {
  margin: 10px 0 0;
  font-family: "Poppins", sans-serif;
  font-size: clamp(1.44rem, 2.2vw, 2.25rem);
  line-height: 1.12;
  position: relative;
  z-index: 1;
}

.landing-film-card p {
  margin: 10px 0 0;
  max-width: 36ch;
  position: relative;
  z-index: 1;
}

.landing-film-tags {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.landing-film-tags span {
  border: 1px solid rgba(72, 113, 124, 0.4);
  background: rgba(255, 255, 255, 0.65);
  color: #1f4955;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
}

:root[data-theme="dark"] .landing-film-tags span {
  border-color: rgba(123, 179, 172, 0.36);
  background: rgba(13, 35, 41, 0.74);
  color: #b9e4de;
}

.landing-storyline h3,
.landing-feature-runway h3 {
  margin: 0 0 14px;
  font-size: clamp(1.16rem, 2vw, 1.54rem);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.landing-storyline-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.landing-storyline-item {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  gap: 16px;
  padding: 20px 4px;
  border-top: 1px solid var(--line);
}

.landing-storyline-item:first-child {
  border-top: none;
}

.landing-storyline-kicker {
  margin: 3px 0 0;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--muted);
  font-weight: 800;
}

.landing-storyline-copy h4 {
  margin: 0;
  font-family: "Poppins", sans-serif;
  font-size: clamp(1.14rem, 1.7vw, 1.4rem);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.landing-storyline-copy p {
  margin: 8px 0 0;
  max-width: 60ch;
  line-height: 1.54;
  color: var(--muted);
}

.landing-feature-rows {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.landing-feature-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 4px;
  border-top: 1px solid var(--line);
}

.landing-feature-row:first-child {
  border-top: none;
}

.landing-feature-row .landing-feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  border: 1px solid rgba(115, 151, 161, 0.42);
  background: rgba(255, 255, 255, 0.72);
}

.landing-feature-row:nth-child(odd) {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.38), transparent 70%);
}

:root[data-theme="dark"] .landing-feature-row .landing-feature-icon {
  border-color: rgba(125, 178, 170, 0.42);
  background: rgba(12, 33, 38, 0.76);
}

:root[data-theme="dark"] .landing-feature-row:nth-child(odd) {
  background: linear-gradient(90deg, rgba(18, 45, 51, 0.32), transparent 70%);
}

.landing-feature-title {
  font-size: 1rem;
}

.landing-feature-body {
  font-size: 0.9rem;
}

.landing-platforms h3 {
  margin: 0 0 14px;
  font-size: clamp(1.16rem, 2vw, 1.54rem);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.landing-platform-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.landing-platform-card {
  border-radius: 24px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 22px 36px rgba(8, 24, 30, 0.15);
  display: grid;
  gap: 10px;
}

.landing-platform-card h4 {
  margin: 0;
  font-size: clamp(1.18rem, 1.7vw, 1.56rem);
  line-height: 1.18;
}

.landing-platform-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.landing-platform-kicker {
  margin: 0;
  font-size: 0.74rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--muted);
}

.landing-platform-card-ios {
  background:
    radial-gradient(circle at 80% 16%, rgba(111, 187, 255, 0.44), transparent 44%),
    linear-gradient(170deg, #f6fbff 0%, #dcedf7 100%);
}

.landing-platform-card-chrome {
  background:
    radial-gradient(circle at 16% 14%, rgba(99, 211, 186, 0.38), transparent 42%),
    linear-gradient(170deg, #f6fffb 0%, #def4e8 100%);
}

:root[data-theme="dark"] .landing-platform-card {
  border-color: rgba(134, 198, 189, 0.38);
  box-shadow: 0 24px 38px rgba(2, 12, 16, 0.44);
}

:root[data-theme="dark"] .landing-platform-card-ios {
  background:
    radial-gradient(circle at 80% 16%, rgba(85, 161, 223, 0.36), transparent 44%),
    linear-gradient(170deg, #102d36 0%, #0b252d 100%);
}

:root[data-theme="dark"] .landing-platform-card-chrome {
  background:
    radial-gradient(circle at 16% 14%, rgba(74, 178, 154, 0.34), transparent 42%),
    linear-gradient(170deg, #112f33 0%, #0c2629 100%);
}

.landing-platform-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.landing-platform-tags span {
  border: 1px solid rgba(77, 123, 132, 0.36);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: #18474e;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 800;
  padding: 6px 10px;
}

:root[data-theme="dark"] .landing-platform-tags span {
  border-color: rgba(121, 178, 169, 0.36);
  background: rgba(9, 28, 33, 0.78);
  color: #bce8e2;
}

.landing-platform-actions {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.landing-platform-actions .platform-button {
  min-height: 48px;
}

.landing-footer {
  margin-top: 24px;
}

.landing-film-card-left {
  transform: translateY(10px) scale(0.995);
}

.landing-film-card-right {
  transform: translateY(-4px);
}

@media (max-width: 1180px) {
  .landing-film-card-left,
  .landing-film-card-right {
    transform: none;
  }
}

.app-shell {
  width: 100%;
  max-width: 100vw;
  padding-top: calc(16px + var(--safe-top));
  padding-bottom: calc(24px + var(--safe-bottom));
  padding-left: 16px;
  padding-right: 16px;
}

.app-shell.native-shell {
  /* Single scroll container — topbar + bottom nav sit on top via position:fixed */
  height: 100dvh;
  max-height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  /* Content offsets: topbar above, bottom nav below */
  padding-top: calc(var(--safe-top) + var(--native-topbar-content));
  padding-bottom: calc(60px + var(--safe-bottom));
  padding-left: 0;
  padding-right: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  overflow: visible;
  /* Theme-aware surface — uses the topbar variables defined in :root.
     Falls back to a dark gradient for the rare case those vars aren't set. */
  background: var(--topbar-bg, linear-gradient(180deg, rgba(24, 27, 29, 0.55), rgba(16, 19, 21, 0.5)));
  border: 1px solid var(--topbar-border, rgba(255, 255, 255, 0.1));
  backdrop-filter: blur(16px) saturate(1.08);
  /* Tighter vertical padding — content (38px logo / 48px buttons) does
     the height work, padding just adds breathing room. Side padding
     stays slightly larger so chrome elements don't kiss the edge. */
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 24px rgba(4, 14, 18, 0.18);
  z-index: 130;
  transition: opacity 0.2s ease, transform 0.2s ease, background 200ms ease, border-color 200ms ease;
}
/* Light theme — soft cream-white topbar with subtle shadow */
:root[data-theme="light"] .topbar,
:root:not([data-theme="dark"]) .topbar {
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.96), rgba(247, 239, 230, 0.92));
  border-color: rgba(195, 210, 207, 0.7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 6px 20px rgba(15, 32, 38, 0.08);
}
/* Re-assert dark when explicit data-theme="dark" or no preference set */
:root[data-theme="dark"] .topbar {
  background: linear-gradient(180deg, rgba(24, 27, 29, 0.55), rgba(16, 19, 21, 0.5));
  border-color: rgba(255, 255, 255, 0.1);
}

.app-shell.native-shell .topbar {
  top: 0;
}

.topbar.topbar-hidden {
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
}

.topbar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  opacity: 0.85;
  pointer-events: none;
}

.brand-title {
  margin: 0;
  font-family: "Poppins", sans-serif;
  font-size: 1.56rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
}

.brand {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "logo title";
  column-gap: 10px;
  align-items: center;
}

.brand-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.brand-link:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 78%, white 22%);
  outline-offset: 4px;
  border-radius: 10px;
}

/* ─── BrandWordmark wrapper ────────────────────────────────────────────
   Two <img> elements stacked in the same box. The wrong-theme one fades to
   opacity:0 so it stays decoded and warm — theme toggling has zero swap
   latency and zero visible flash. */
.brand-wordmark {
  position: relative;
  display: inline-block;
  line-height: 0;          /* kill baseline gap so vertical align is exact */
  vertical-align: middle;
}
.brand-wordmark-img {
  display: block;
  height: 100%;
  width: auto;
  object-fit: contain;
  transition: opacity 180ms cubic-bezier(0.23, 1, 0.32, 1);
}
/* Light variant overlays the dark one so they share the same box */
.brand-wordmark-light {
  position: absolute;
  inset: 0;
  opacity: 0;
}
/* Dark theme (default) shows the dark variant. Light theme shows the
   light variant via `:root[data-theme="light"]`. */
:root[data-theme="light"] .brand-wordmark-dark {
  opacity: 0;
}
:root[data-theme="light"] .brand-wordmark-light {
  opacity: 1;
}

/* ─── .app-logo — sizing applied to the BrandWordmark wrapper ───────── */
.app-logo {
  grid-area: logo;
  display: inline-flex;
  align-items: center;       /* lock vertical centering with siblings */
  justify-content: flex-start;
  height: 36px;              /* slightly bigger so it reads from across the room */
  width: auto;
  max-width: 200px;
  line-height: 0;            /* kill any baseline gap that would offset center */
  transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}
.app-logo .brand-wordmark-img {
  height: 36px;
  display: block;            /* removes inline baseline misalignment */
}
.brand-link {
  /* Brand link is the *whole* clickable area — make sure the logo and
     any siblings vertically center as a flex row (overrides any grid-area
     inheritance from the topbar layout). */
  display: inline-flex;
  align-items: center;
  gap: 0;
}
.brand-link:active .app-logo {
  /* Press feedback — instant, hardware-accelerated. Both images scale
     together because they're inside the same wrapper. (Emil rule:
     buttons must feel responsive.) */
  transform: scale(0.97);
}

/* Mobile — bump logo height to match the 48px button row visually */
@media (max-width: 980px) {
  .app-logo,
  .app-logo .brand-wordmark-img {
    height: 38px;
  }
  .app-logo {
    max-width: 180px;
  }
}

.eyebrow {
  grid-area: eyebrow;
}

.brand-title {
  grid-area: title;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
  font-weight: 700;
}

.topbar .eyebrow {
  display: none;
}

/* The wordmark already shows "refynes" — hide the redundant text wherever
   the brand-link appears (topbar, marketing-header, landing-header,
   recruiter-landing-header, recruiter-dashboard-topbar). The element stays
   in the DOM for screen readers (visually-hidden), so brand-name semantics
   are preserved. */
.brand-link .eyebrow,
.brand-link .brand-title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.plan-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  background: var(--card-subtle-bg);
}

.topbar .toolbar {
  gap: 8px;
  flex-wrap: nowrap;
}

.topbar .plan-chip {
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  border-color: rgba(87, 187, 193, 0.44);
  background: rgba(13, 40, 51, 0.94);
  color: #57bbc1;
  font-size: 14px;
  font-weight: 500;
  box-shadow: none;
}

.plan-chip.pro {
  color: #0f5a63;
  border-color: rgba(23, 98, 103, 0.42);
  background: rgba(23, 98, 103, 0.1);
}

.plan-chip.free {
  color: var(--muted);
}

:root[data-theme="dark"] .plan-chip.pro {
  color: #8ce7de;
  border-color: rgba(141, 224, 214, 0.45);
  background: rgba(76, 183, 180, 0.16);
}

.topbar .plan-chip.pro {
  color: #57bbc1;
  border-color: rgba(87, 187, 193, 0.44);
  background: rgba(13, 40, 51, 0.94);
}

.topbar-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  position: relative;
  z-index: 131;
}

.topbar .button.ghost {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 10px;
  border-color: var(--ghost-border);
  background: linear-gradient(180deg, rgba(24, 27, 29, 0.55), rgba(16, 19, 21, 0.5));
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  backdrop-filter: none;
  transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1),
              border-color 160ms cubic-bezier(0.23, 1, 0.32, 1),
              background-color 160ms cubic-bezier(0.23, 1, 0.32, 1);
}
/* Light theme — soft surface, dark text, gentle border */
:root[data-theme="light"] .topbar .button.ghost,
:root:not([data-theme="dark"]) .topbar .button.ghost {
  background: linear-gradient(180deg, #ffffff, #fbf8f3);
  border-color: rgba(207, 217, 216, 0.95);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 1px 2px rgba(15, 32, 38, 0.04);
}
:root[data-theme="dark"] .topbar .button.ghost {
  background: linear-gradient(180deg, rgba(24, 27, 29, 0.55), rgba(16, 19, 21, 0.5));
  border-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}
.topbar .button.ghost:active {
  transform: scale(0.96);
}

.topbar .button.ghost:hover {
  border-color: rgba(135, 141, 145, 0.92);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.05));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 8px 18px rgba(6, 16, 20, 0.18);
}
:root[data-theme="light"] .topbar .button.ghost:hover,
:root:not([data-theme="dark"]) .topbar .button.ghost:hover {
  background: linear-gradient(180deg, #ffffff, #f5efe5);
  border-color: rgba(20, 107, 109, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 6px 14px rgba(15, 32, 38, 0.10);
}

.topbar .button.icon-only {
  /* Bigger touch targets — Apple HIG recommends 44pt min, but these are
     desktop-first so 40px works without crowding the topbar. */
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 10px;
}
.topbar .button.icon-only .button-icon {
  /* The icon inside should scale up too — larger glyph reads cleaner */
  width: 18px;
  height: 18px;
}

.topbar .button .button-content {
  gap: 4px;
  font-size: 15px;
  font-weight: 700;
}

.topbar .button-icon,
.topbar .chip-icon {
  width: 16px;
  height: 16px;
}

.mobile-theme-toggle {
  display: none;
  position: relative;
  z-index: 160;
}

/* ─── Mobile topbar icon trio ─────────────────────────────────────────
   Theme · Resumes · Hamburger — same square footprint, same radius, same
   press feedback. On a phone these three are the entire navigation
   surface (the hamburger reveals everything else inside). Press feedback
   uses a strong custom ease-out so the tap registers instantly even when
   the main thread is busy. */
.mobile-theme-toggle,
.mobile-resumes-toggle,
.mobile-menu-toggle {
  position: relative;
  z-index: 160;
  transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1),
              background-color 160ms cubic-bezier(0.23, 1, 0.32, 1);
  /* Force GPU compositing so the press scale never jitters under load */
  will-change: transform;
}
.mobile-theme-toggle:active,
.mobile-resumes-toggle:active,
.mobile-menu-toggle:active {
  transform: scale(0.94);
}

/* Resume icon button — icon-only on mobile, with a small badge that shows
   how many saved resumes exist. The badge uses the brand teal so it reads
   instantly without competing with the hamburger. */
.mobile-resumes-toggle {
  display: none;
}
.mobile-resumes-toggle .button-content {
  position: relative;
}
.mobile-resumes-toggle-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: var(--accent-contrast);
  font-size: 10.5px;
  font-weight: 800;
  font-family: "Poppins", sans-serif;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 1.5px solid var(--card-bg);
  box-shadow: 0 2px 6px color-mix(in srgb, var(--accent) 35%, transparent);
  /* @starting-style entry — the badge shouldn't pop into existence; it
     gently scales in the first time it appears. Starts from 0.6 (not 0)
     because nothing in the real world appears from absolute nothingness. */
  animation: mobile-resumes-badge-in 220ms cubic-bezier(0.23, 1, 0.32, 1);
}
:root[data-theme="dark"] .mobile-resumes-toggle-badge {
  border-color: rgba(25, 27, 29, 0.95);
}
@keyframes mobile-resumes-badge-in {
  from { transform: scale(0.6); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.download-menu {
  position: relative;
}

.download-menu-trigger {
  min-width: 170px;
}

.topbar .download-menu-trigger {
  min-width: 118px;
}

.download-menu-trigger .button-content {
  gap: 6px;
}

.download-chevron {
  transition: transform 0.16s ease;
}

.download-menu.open .download-chevron {
  transform: rotate(180deg);
}

.download-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 208px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
  background: linear-gradient(180deg, var(--surface-elevated), var(--card-bg));
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(18px) saturate(1.06);
  padding: 6px;
  z-index: 65;
  display: grid;
  gap: 5px;
}

.download-menu-option {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-weight: 700;
  font-size: 16px;
  min-height: 40px;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
}

.download-menu-option:hover {
  background: color-mix(in srgb, var(--accent-soft) 76%, var(--card-subtle-bg));
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
}

.download-menu-option:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 1px;
}

/* Thin separator between Cover Letter exports and Resume exports in the
   topbar Download menu when the user is on the Cover Letter section. */
.download-menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 6px;
}
:root[data-theme="light"] .download-menu-divider {
  background: rgba(0, 0, 0, 0.08);
}

:root[data-theme="dark"] .download-menu-panel {
  box-shadow: 0 16px 26px rgba(1, 10, 14, 0.42);
}

.mobile-menu-toggle {
  display: none;
  min-width: 52px;
  padding: 10px 12px;
  position: relative;
  z-index: 160;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 220ms ease;
}

.mobile-menu-toggle.active {
  border-color: var(--accent);
  box-shadow: 0 10px 20px rgba(10, 50, 58, 0.2);
  transform: translateY(-1px);
}

.menu-toggle-icon {
  width: 21px;
  height: 21px;
  transition: transform 180ms ease, opacity 180ms ease;
}

.mobile-menu-toggle.active .menu-toggle-icon {
  transform: rotate(90deg) scale(1.07);
}

.mobile-toolbar-backdrop {
  position: fixed;
  inset: 0;
  border: none;
  background: rgba(7, 15, 20, 0.38);
  z-index: 58;
}

.native-shell .ios-back-button {
  border-radius: 999px;
  border-color: rgba(150, 170, 177, 0.44);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.68), rgba(241, 249, 247, 0.44));
  color: #0f4d52;
  backdrop-filter: blur(16px) saturate(1.1);
  box-shadow:
    0 10px 18px rgba(8, 24, 30, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  min-height: 38px;
  padding: 7px 12px;
}

.native-shell .ios-back-button .button-icon {
  width: 15px;
  height: 15px;
}

.native-shell .ios-back-button:hover {
  border-color: rgba(81, 125, 136, 0.52);
  transform: translateY(-1px);
}

.native-shell .ios-back-button:active {
  transform: translateY(0) scale(0.98);
}

:root[data-theme="dark"] .native-shell .ios-back-button {
  border-color: rgba(150, 156, 160, 0.32);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  color: #e2e4e5;
  box-shadow:
    0 12px 20px rgba(2, 10, 14, 0.45),
    inset 0 1px 0 rgba(165, 224, 215, 0.18);
}

.button-content {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.button-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.button.icon-only {
  width: 46px;
  min-width: 46px;
  padding: 10px;
}

.button.icon-only .button-content {
  width: auto;
  gap: 0;
}

.button.icon-only .button-icon {
  width: 18px;
  height: 18px;
}

.theme-toggle-button {
  border-radius: 999px;
  position: relative;
  overflow: hidden;
}

.theme-toggle-button .button-icon {
  transition: transform 220ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.theme-toggle-button:hover .button-icon {
  transform: rotate(12deg) scale(1.05);
}

.theme-toggle-button.is-animating .button-icon {
  animation: themeIconTwirl 560ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.landing-header-actions .theme-toggle-button {
  flex: 0 0 auto;
}

.theme-morph-overlay {
  position: fixed;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 200;
  opacity: 0.92;
  transform: translate(-50%, -50%) scale(0.2);
  will-change: transform, opacity;
  box-shadow: 0 10px 28px rgba(6, 19, 26, 0.3);
}

.theme-morph-overlay.active {
  animation: themeMorphExpand 620ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.google-brand-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.linkedin-brand-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.google-auth-button {
  min-height: 52px;
  padding: 12px 16px;
  font-size: 16px;
}

.google-auth-button .button-content {
  gap: 10px;
}

.linkedin-auth-button {
  min-height: 52px;
  padding: 12px 16px;
  font-size: 16px;
}

.linkedin-auth-button .button-content {
  gap: 10px;
}

.profile-launch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 10px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--surface-elevated) 84%, transparent), color-mix(in srgb, var(--surface-soft) 72%, transparent));
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
}

.profile-launch:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 68%, var(--surface-elevated));
  box-shadow: 0 12px 22px rgba(13, 41, 48, 0.12);
}

.profile-launch:active {
  transform: translateY(0);
}

.profile-launch:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

:root[data-theme="dark"] .profile-launch {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
}

.profile-launch-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-launch.muted {
  color: var(--muted);
}

.profile-launch-avatar,
.profile-launch-fallback {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.profile-launch-avatar {
  object-fit: cover;
}

.profile-launch-fallback {
  display: grid;
  place-items: center;
  font-size: 0.66rem;
  font-weight: 800;
}

/* ── Mobile hamburger inline profile card (replaces the profile-launch
   button so users see their account info immediately when the menu opens,
   no second tap required) ──────────────────────────────────────────── */
.toolbar-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  margin-top: 4px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-strong) 70%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
}

.toolbar-profile-avatar,
.toolbar-profile-fallback {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.toolbar-profile-avatar {
  object-fit: cover;
}

.toolbar-profile-fallback {
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent-strong) 82%, var(--accent)));
  color: var(--button-text);
}

.toolbar-profile-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
}

.toolbar-profile-name {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toolbar-profile-email {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-chip.small {
  font-size: 0.7rem;
  padding: 2px 7px;
  align-self: flex-start;
  margin-top: 2px;
}

.toolbar-profile-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.toolbar-profile-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--border) 40%, transparent);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1),
              background 160ms ease,
              border-color 160ms ease;
  text-align: left;
}

.toolbar-profile-action:hover {
  background: color-mix(in srgb, var(--surface-strong) 50%, transparent);
  border-color: color-mix(in srgb, var(--border) 70%, transparent);
}

.toolbar-profile-action:active {
  transform: scale(0.97);
}

.toolbar-profile-action.primary {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent-strong) 82%, var(--accent)));
  color: var(--button-text);
  border-color: color-mix(in srgb, var(--accent) 76%, var(--accent-strong));
}

.toolbar-profile-action-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-strong) 60%, transparent);
  flex: 0 0 auto;
}

.toolbar-profile-action.primary .toolbar-profile-action-icon {
  background: rgba(255, 255, 255, 0.18);
}

.chip-icon {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--accent) 76%, var(--accent-strong));
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent-strong) 82%, var(--accent)));
  color: var(--button-text);
  font-weight: 700;
  font-family: inherit;
  border-radius: 12px;
  padding: 10px 14px;
  min-height: 44px;
  font-size: 16px;
  line-height: 1.1;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    background-color 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease,
    filter 0.16s ease;
  box-shadow:
    0 10px 20px color-mix(in srgb, var(--accent) 18%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  position: relative;
}

.button:hover {
  transform: translateY(-1px);
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--accent) 82%, var(--accent-strong)),
    var(--accent-strong)
  );
  border-color: color-mix(in srgb, var(--accent-strong) 82%, var(--accent));
  box-shadow:
    0 14px 24px color-mix(in srgb, var(--accent) 22%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  filter: saturate(1.03);
}

.button:active {
  transform: translateY(0);
}

/* Anchors styled as buttons (`<a class="button">` — the nav Sign In, hero
   CTAs, etc.) must use BUTTON text colors in every state. The global
   `a:hover { color: var(--accent) }` rule has specificity (0,1,1) and was
   beating `.button` (0,1,0), so hovering a link-button turned its label
   green-on-green (the washed-out "Sign In" hover). These selectors restore
   the correct, high-contrast label color on hover/focus/visited. */
a.button,
a.button:hover,
a.button:focus,
a.button:visited {
  color: var(--button-text);
}
a.button.ghost,
a.button.ghost:hover,
a.button.ghost:focus,
a.button.ghost:visited {
  color: var(--accent-strong);
}
:root[data-theme="dark"] a.button.ghost,
:root[data-theme="dark"] a.button.ghost:hover,
:root[data-theme="dark"] a.button.ghost:focus,
:root[data-theme="dark"] a.button.ghost:visited {
  color: #c2ebe4;
}

.button:focus-visible,
.mobile-preview-cta:focus-visible,
.mobile-menu-toggle:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px var(--focus-ring),
    0 0 0 6px color-mix(in srgb, var(--accent) 12%, transparent);
}

.button:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.button:disabled:hover {
  transform: none;
}

.button.ghost {
  background: linear-gradient(145deg, color-mix(in srgb, var(--surface-elevated) 84%, transparent), color-mix(in srgb, var(--surface-soft) 72%, transparent));
  border-color: var(--ghost-border);
  color: var(--accent-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 8px 16px rgba(11, 28, 34, 0.06);
  backdrop-filter: blur(12px) saturate(1.04);
}

.button.ghost:hover {
  background: color-mix(in srgb, var(--ghost-hover) 72%, var(--surface-elevated));
  border-color: color-mix(in srgb, var(--accent) 34%, var(--ghost-border));
}

:root[data-theme="dark"] .button.ghost {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025));
  border-color: var(--ghost-border);
  color: #c2ebe4;
}

.button.danger {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff8f7;
  box-shadow: 0 8px 14px rgba(163, 62, 47, 0.2);
}

.button.small {
  padding: 9px 12px;
  font-size: 15px;
  min-height: 40px;
}

.file-pill input {
  display: none;
}

.workspace-shell {
  --workspace-sidebar-width: 82px;
  margin-top: 14px;
  display: grid;
  grid-template-columns: var(--workspace-sidebar-width) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.workspace-shell.sidebar-collapsed {
  --workspace-sidebar-width: 52px;
}

.workspace-sidebar {
  position: sticky;
  top: calc(var(--safe-top) + 88px);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: var(--surface-elevated);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 12px 24px rgba(15, 32, 38, 0.08);
  backdrop-filter: blur(18px) saturate(1.08);
  padding: 8px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: calc(100vh - (var(--safe-top) + 118px));
  max-height: calc(100vh - (var(--safe-top) + 118px));
  /* dvh companion: stop the sidebar from jumping as the iOS Safari URL bar
     collapses/expands (100vh ignores the dynamic toolbar; 100dvh tracks it). */
  min-height: calc(100dvh - (var(--safe-top) + 118px));
  max-height: calc(100dvh - (var(--safe-top) + 118px));
  position: sticky;
  overflow: visible;
  transition: background 200ms ease, border-color 200ms ease;
}

:root[data-theme="dark"] .workspace-sidebar {
  background: linear-gradient(180deg, rgba(24, 27, 29, 0.55), rgba(16, 19, 21, 0.5));
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 12px 24px rgba(4, 14, 18, 0.18);
}

.workspace-sidebar-head {
  display: flex;
  justify-content: flex-end;
}

.sidebar-collapse-toggle {
  min-height: 32px;
  width: 32px;
  padding: 0;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: var(--surface-glass);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 1;
  transition:
    opacity 0.16s ease,
    border-color 0.16s ease,
    background-color 0.16s ease,
    transform 0.16s ease,
    box-shadow 0.16s ease;
}
:root[data-theme="dark"] .sidebar-collapse-toggle {
  border-color: rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(24, 27, 29, 0.55), rgba(16, 19, 21, 0.5));
  color: #f7fbfd;
}

.sidebar-collapse-toggle .button-icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.1;
}

.sidebar-collapse-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(112, 137, 146, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 6px 14px rgba(5, 15, 19, 0.22);
}

.sidebar-collapse-toggle:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

:root[data-theme="dark"] .sidebar-collapse-toggle {
  background: linear-gradient(180deg, rgba(24, 27, 29, 0.55), rgba(16, 19, 21, 0.5));
  border-color: rgba(255, 255, 255, 0.1);
  color: #f7fbfd;
}

.workspace-sidebar.collapsed .sidebar-collapse-toggle {
  opacity: 0.88;
}

.workspace-sidebar-nav {
  display: grid;
  gap: 6px;
  flex: 1 1 auto;
  overflow: auto;
  align-content: start;
  min-height: 0;
}

/* ── Minimalist vertical nav button ── */
.workspace-nav-button {
  width: 100%;
  border: none;
  border-radius: 10px;
  background: transparent;
  /* Theme-aware muted text. var(--muted) is #4a5f65 in light, #a1bab7 in
     dark — readable in both contexts. */
  color: var(--muted);
  font-family: inherit;
  padding: 10px 4px 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-align: center;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
:root[data-theme="dark"] .workspace-nav-button {
  color: rgba(178, 208, 205, 0.6);
}

.workspace-nav-button:hover {
  background: var(--ghost-hover);
  color: var(--text);
}
:root[data-theme="dark"] .workspace-nav-button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #d4eeeb;
}

.workspace-nav-button.active {
  background: var(--accent-soft);
  color: var(--accent);
}
:root[data-theme="dark"] .workspace-nav-button.active {
  background: rgba(88, 203, 198, 0.13);
  color: #5ecac5;
}

.workspace-nav-button:focus-visible {
  outline: 2px solid rgba(88, 203, 198, 0.5);
  outline-offset: 2px;
}

/* Icon inside nav button */
.nav-icon {
  flex-shrink: 0;
  transition: color 0.15s ease;
}

/* Two-line label */
.nav-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  line-height: 1;
}

.nav-label-line1 {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.nav-label-line2 {
  font-size: 0.58rem;
  font-weight: 400;
  opacity: 0.72;
  line-height: 1.3;
}

.workspace-nav-button:focus-visible {
  outline: 2px solid rgba(88, 203, 198, 0.5);
  outline-offset: 2px;
}

.workspace-sidebar-footer {
  margin-top: auto;
  border-top: none;
  padding-top: 6px;
  display: grid;
  gap: 6px;
}

.sidebar-collapse-toggle-bottom {
  position: absolute;
  right: -15px;
  bottom: 48px;
  align-self: auto;
  margin-top: 0;
  width: 32px;
  min-height: 32px;
  border-radius: 8px;
  z-index: 24;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.sidebar-collapse-toggle-bottom:hover {
  transform: translateX(1px);
}

.sidebar-profile-launch {
  width: 100%;
  max-width: none;
  min-height: 40px;
  border-radius: 8px;
  justify-content: flex-start;
  gap: 8px;
  padding: 6px 8px;
  font-size: 16px;
  background: var(--surface-glass);
  border-color: var(--card-border);
  color: var(--text);
}
:root[data-theme="dark"] .sidebar-profile-launch {
  background: linear-gradient(180deg, rgba(24, 27, 29, 0.55), rgba(16, 19, 21, 0.5));
  border-color: rgba(255, 255, 255, 0.1);
  color: #f7fbfd;
}

.workspace-sidebar.collapsed .workspace-sidebar-head {
  justify-content: center;
}

.workspace-sidebar.collapsed .workspace-nav-button {
  padding: 10px 4px;
}

.workspace-sidebar.collapsed .sidebar-profile-launch {
  justify-content: center;
  padding: 6px;
  min-height: 40px;
}

.workspace-sidebar.collapsed .sidebar-profile-launch .profile-launch-avatar,
.workspace-sidebar.collapsed .sidebar-profile-launch .profile-launch-fallback {
  width: 28px;
  height: 28px;
}

.sidebar-upgrade-button {
  width: 100%;
  min-height: 34px;
  border-radius: 8px;
  font-size: 12px;
}

.workspace-content {
  min-width: 0;
  overflow-x: hidden;
}

.workspace {
  --workspace-splitter-size: 14px;
  --editor-col-width: 50%;
  --preview-col-width: 50%;
  margin-top: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

.workspace.desktop-resizable {
  grid-template-columns:
    minmax(340px, var(--editor-col-width))
    var(--workspace-splitter-size)
    minmax(340px, var(--preview-col-width));
  gap: 0;
}

.workspace.desktop-resizable .editor-panel,
.workspace.desktop-resizable .preview-panel {
  min-width: 0;
}

.workspace-resizer {
  align-self: stretch;
  justify-self: stretch;
  position: relative;
  cursor: col-resize;
  user-select: none;
  touch-action: none;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.workspace-resizer::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: transparent;
  transition: background-color 0.16s ease;
}

.workspace-resizer:hover::before,
.workspace-resizer:focus-visible::before,
.workspace-resizer.active::before {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.workspace-resizer:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 1px;
}

.workspace-resizer-handle {
  position: relative;
  width: 4px;
  height: clamp(72px, 28%, 164px);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 58%, var(--line));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
}

.panel {
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--topbar-border) 76%, transparent);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px) saturate(1.05);
}

.editor-panel {
  background: linear-gradient(160deg, var(--panel-editor-bg), color-mix(in srgb, var(--surface-soft) 68%, transparent));
}

.preview-panel {
  background: linear-gradient(160deg, var(--panel-preview-bg), color-mix(in srgb, var(--surface-glass) 62%, transparent));
}

.pdf-editor-workspace-panel {
  background: linear-gradient(
    180deg,
    var(--surface-elevated),
    color-mix(in srgb, var(--card-bg) 88%, var(--card-subtle-bg))
  );
  overflow: hidden;
}

.pdf-editor-workspace-shell {
  height: calc(100vh - 130px);
  height: calc(100dvh - 130px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  overflow: hidden;
}

.panel-scroll {
  height: calc(100vh - 130px);
  height: calc(100dvh - 130px);
  overflow: auto;
  padding: 18px;
}

/* Jobs / admin / ai-coach panels: single scroll on desktop — only the inner panel-scroll scrolls */
@media (min-width: 981px) {
  .jobs-browser-panel,
  .ai-coach-panel {
    overflow: hidden !important;
    max-height: calc(100vh - 130px);
    max-height: calc(100dvh - 130px);
  }
}

.preview-shell {
  position: relative;
  isolation: isolate;
  height: calc(100vh - 130px);
  height: calc(100dvh - 130px);
  overflow: auto;
  padding: 22px;
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--line) 62%, transparent);
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--surface-elevated) 44%, transparent),
      color-mix(in srgb, var(--surface-soft) 52%, transparent)
    ),
    radial-gradient(circle at 1px 1px, rgba(97, 130, 138, 0.18) 1px, transparent 0);
  background-size: auto, 14px 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

:root[data-theme="dark"] .preview-shell {
  border-color: rgba(116, 157, 165, 0.28);
  background:
    linear-gradient(
      180deg,
      rgba(9, 24, 31, 0.96),
      rgba(12, 30, 38, 0.92)
    ),
    radial-gradient(circle at 1px 1px, rgba(124, 160, 168, 0.18) 1px, transparent 0);
  background-size: auto, 14px 14px;
  box-shadow:
    inset 0 1px 0 rgba(183, 228, 221, 0.08),
    0 18px 34px rgba(4, 10, 15, 0.28);
}

.preview-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 18% 20%, color-mix(in srgb, var(--accent-soft) 34%, transparent), transparent 34%),
    linear-gradient(120deg, transparent 22%, color-mix(in srgb, var(--accent) 16%, transparent) 50%, transparent 78%);
  transform: translateX(-12%) scale(1.02);
}

.preview-shell.has-change-marks {
  cursor: pointer;
}

.preview-shell.is-palette-animating::after {
  animation: previewPaletteSweep 720ms ease-out;
}

.panel-scroll,
.preview-shell,
.toolbar {
  -webkit-overflow-scrolling: touch;
}

body.is-desktop-resizing,
body.is-desktop-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}

.preview-heading {
  margin-bottom: 14px;
}

.preview-heading h2 {
  margin: 0;
  font-family: "Poppins", sans-serif;
  font-size: 1.2rem;
}

.preview-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.preview-change-clear {
  margin-top: 10px;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.74);
  border-color: rgba(82, 110, 118, 0.34);
  color: var(--accent-strong);
  box-shadow: none;
}

:root[data-theme="dark"] .preview-change-clear {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(118, 173, 165, 0.36);
  color: #c2ebe4;
}

@keyframes previewPaletteSweep {
  0% {
    opacity: 0;
    transform: translateX(-12%) scale(1.02);
  }
  24% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translateX(10%) scale(1.04);
  }
}

@keyframes paletteCanvasPulse {
  0% {
    transform: scale(0.992);
    box-shadow: 0 20px 38px rgba(12, 30, 35, 0.16);
  }
  38% {
    transform: scale(1.006);
    box-shadow:
      0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent),
      0 24px 42px rgba(12, 30, 35, 0.2);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 20px 38px rgba(12, 30, 35, 0.16);
  }
}

.mobile-preview-cta {
  display: none;
  position: fixed;
  right: 14px;
  bottom: calc(14px + var(--safe-bottom));
  z-index: 62;
  border: 1px solid var(--accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: var(--button-text);
  backdrop-filter: blur(10px) saturate(1.05);
  border-radius: 999px;
  padding: 11px 16px;
  min-height: 44px;
  font-size: 1.125rem;
  box-shadow: 0 14px 26px rgba(9, 33, 40, 0.26);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background-color 0.16s ease,
    border-color 0.2s ease;
}

:root[data-theme="dark"] .mobile-preview-cta {
  box-shadow: 0 16px 28px rgba(2, 11, 14, 0.4);
}

.mobile-preview-cta .button-content {
  position: relative;
  z-index: 0;
}

.mobile-preview-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(9, 33, 40, 0.28);
}

.mobile-preview-cta:active {
  transform: translateY(0);
}

.mobile-preview-cta.active {
  border-color: var(--accent-strong);
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
}

:root[data-theme="dark"] .mobile-preview-cta.active {
  background: linear-gradient(135deg, #6ecbc8, #4cb7b4);
  color: #072128;
}

.mobile-step-nav {
  display: none;
}

.mobile-step-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.mobile-step-scroll::-webkit-scrollbar {
  display: none;
}

.mobile-step-button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  padding: 10px 12px;
  min-height: 44px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.mobile-step-button:hover {
  transform: translateY(-1px);
  background: var(--ghost-hover);
}

.mobile-step-button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--button-text);
  box-shadow: 0 8px 16px rgba(10, 38, 43, 0.2);
}

.mobile-step-button:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.mobile-step-button .button-icon {
  width: 16px;
  height: 16px;
}

:root[data-theme="dark"] .mobile-step-button.active {
  background: #6ac7c3;
  border-color: #6ac7c3;
  color: #062128;
}

.mobile-preview-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 15, 20, 0.55);
  backdrop-filter: blur(3px);
  z-index: 66;
  display: grid;
  align-items: end;
  animation: backdropFadeIn 180ms ease-out both;
}

.mobile-preview-panel {
  width: 100%;
  height: min(92vh, 100%);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.68), rgba(215, 241, 236, 0.5)),
    var(--panel-preview-bg);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-bottom: none;
  border-radius: 22px 22px 0 0;
  box-shadow:
    0 -16px 36px rgba(4, 11, 16, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px) saturate(1.05);
  overflow: hidden;
  padding-bottom: var(--safe-bottom);
  animation: previewSheetIn 230ms cubic-bezier(0.2, 0.8, 0.25, 1) both;
}

:root[data-theme="dark"] .mobile-preview-panel {
  background:
    linear-gradient(155deg, rgba(16, 41, 47, 0.86), rgba(11, 35, 39, 0.78)),
    var(--panel-preview-bg);
  border-color: rgba(122, 188, 176, 0.24);
  box-shadow:
    0 -20px 42px rgba(2, 8, 12, 0.45),
    inset 0 1px 0 rgba(172, 229, 220, 0.14);
}

.mobile-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.52);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(243, 251, 249, 0.48));
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 2;
}

:root[data-theme="dark"] .mobile-preview-head {
  border-bottom-color: rgba(122, 188, 176, 0.26);
  background: linear-gradient(145deg, rgba(22, 25, 27, 0.6), rgba(15, 18, 20, 0.52));
}

:root[data-theme="dark"] .mobile-preview-panel .preview-shell {
  background:
    radial-gradient(circle at 14% 0%, rgba(153, 218, 208, 0.2), transparent 45%),
    radial-gradient(circle at 88% 0%, rgba(64, 157, 147, 0.2), transparent 45%),
    radial-gradient(circle at 1px 1px, rgba(142, 186, 181, 0.14) 1px, transparent 0);
  background-size:
    auto,
    auto,
    14px 14px;
}

.card {
  background: linear-gradient(180deg, var(--surface-elevated), color-mix(in srgb, var(--card-bg) 88%, var(--card-subtle-bg)));
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 18px;
  position: relative;
  box-shadow: 0 8px 18px rgba(11, 29, 35, 0.05);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

.card:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--card-border));
  box-shadow: 0 12px 22px rgba(14, 45, 50, 0.09);
}

.card.support-card {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--surface-elevated) 78%, transparent),
    color-mix(in srgb, var(--card-subtle-bg) 94%, transparent)
  );
  border-color: color-mix(in srgb, var(--line) 78%, transparent);
  box-shadow: 0 6px 14px rgba(11, 29, 35, 0.04);
}

.card.support-card:hover {
  transform: none;
  border-color: color-mix(in srgb, var(--line) 78%, transparent);
  box-shadow: 0 6px 14px rgba(11, 29, 35, 0.04);
}

.auth-card {
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(76, 183, 180, 0.06), transparent 35%);
  pointer-events: none;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}

.section-head-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.section-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.section-head-meta {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  background: color-mix(in srgb, var(--surface-elevated) 84%, transparent);
  color: color-mix(in srgb, var(--label) 82%, var(--muted));
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.section-collapse-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
  background: color-mix(in srgb, var(--surface-elevated) 82%, transparent);
  color: var(--label);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.section-collapse-toggle:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 46%, var(--surface-elevated));
  box-shadow: 0 10px 24px rgba(10, 31, 37, 0.08);
}

.section-collapse-toggle:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 58%, white);
  outline-offset: 2px;
}

.section-collapse-icon {
  transition: transform 0.16s ease;
}

.section-collapse-toggle[aria-expanded="true"] .section-collapse-icon {
  transform: rotate(180deg);
}

.collapsible-card-summary {
  width: 100%;
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--surface-elevated) 84%, transparent),
      color-mix(in srgb, var(--card-subtle-bg) 88%, transparent)
    );
  color: var(--label);
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.collapsible-card-summary:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
  box-shadow: 0 14px 30px rgba(10, 31, 37, 0.08);
}

.collapsible-card-summary:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 58%, white);
  outline-offset: 2px;
}

.collapsible-card-summary-label {
  color: color-mix(in srgb, var(--label) 68%, var(--muted));
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.collapsible-card-summary-text {
  color: var(--label);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.45;
}

.section-title {
  margin: 0;
  font-family: "Poppins", sans-serif;
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.01em;
}

.section-icon {
  width: 15px;
  height: 15px;
  color: var(--accent);
  flex: 0 0 auto;
}

.auth-state {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 800;
}

.auth-state.on {
  color: #2a8f6d;
  border-color: rgba(42, 143, 109, 0.45);
  background: rgba(42, 143, 109, 0.08);
}

:root[data-theme="dark"] .auth-state.on {
  color: #7ce0ba;
  border-color: rgba(124, 224, 186, 0.35);
  background: rgba(124, 224, 186, 0.08);
}

.auth-state.off {
  color: var(--muted);
}

.auth-copy {
  margin: 4px 0 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.auth-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.auth-avatar,
.auth-avatar-fallback {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--line);
}

.auth-avatar {
  object-fit: cover;
  background: var(--card-subtle-bg);
}

.auth-avatar-fallback {
  display: grid;
  place-items: center;
  font-weight: 800;
  color: var(--accent-strong);
  background: var(--card-subtle-bg);
}

.auth-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.auth-email {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.auth-choice-backdrop {
  position: fixed;
  inset: 0;
  z-index: 75;
  background: rgba(8, 17, 22, 0.58);
  backdrop-filter: blur(5px);
  display: grid;
  place-items: center;
  padding: 18px;
}

.auth-choice-panel {
  width: min(460px, 100%);
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  background: linear-gradient(180deg, var(--surface-elevated), color-mix(in srgb, var(--card-bg) 86%, var(--card-subtle-bg)));
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(18px) saturate(1.06);
  padding: 18px;
  display: grid;
  gap: 12px;
}

.auth-choice-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.4;
}

.auth-choice-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.auth-choice-mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px;
  background: var(--card-subtle-bg);
}

.auth-choice-head .auth-choice-mode-toggle {
  flex: 1;
}

.auth-choice-close {
  border: 1px solid var(--line);
  background: var(--card-subtle-bg);
  color: var(--ink);
  border-radius: 10px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.auth-choice-close:hover {
  border-color: var(--accent);
  background: var(--ghost-hover);
}

.auth-choice-close:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 1px;
}

.auth-choice-mode-button {
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  min-height: 40px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.auth-choice-mode-button:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  color: var(--ink);
}

.auth-choice-mode-button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--button-text);
}

.auth-choice-mode-button:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 1px;
}

.native-auth-mode-toggle {
  margin-top: 2px;
}

.auth-choice-actions {
  display: grid;
  gap: 10px;
}

.auth-choice-actions .button {
  width: 100%;
}

.auth-provider-divider {
  margin: 2px 0 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.auth-provider-divider::before,
.auth-provider-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-email-form {
  display: grid;
  gap: 10px;
}

.auth-input-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.auth-inline-link {
  border: none;
  background: transparent;
  color: var(--accent-strong);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 2px 2px 6px;
  justify-self: start;
  cursor: pointer;
}

.auth-inline-link:hover {
  text-decoration: underline;
}

.auth-inline-link:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 8px;
}

.pdf-editor-backdrop {
  position: fixed;
  inset: 0;
  z-index: 240;
  background: rgba(6, 16, 22, 0.68);
  backdrop-filter: blur(6px);
  padding: 18px;
  overflow: hidden;
}

.pdf-editor-panel {
  position: fixed;
  top: 18px;
  bottom: 18px;
  left: 50%;
  width: min(1480px, calc(100vw - 36px));
  max-width: calc(100vw - 36px);
  height: auto;
  max-height: none;
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  background: linear-gradient(180deg, var(--surface-elevated), color-mix(in srgb, var(--card-bg) 88%, var(--card-subtle-bg)));
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(18px) saturate(1.06);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  transform: translateX(-50%);
  overflow: hidden;
}

.pdf-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pdf-editor-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.pdf-editor-layout {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 360px minmax(0, 1.55fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 14px;
  overflow: hidden;
  align-items: stretch;
}

.pdf-editor-controls {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card-subtle-bg);
  padding: 14px;
  height: 100%;
  min-height: 0;
  overflow: auto;
}

.pdf-editor-subpanel {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: color-mix(in srgb, var(--card-bg) 78%, transparent);
  margin-top: 12px;
}

.pdf-editor-control-group {
  margin-bottom: 12px;
}

.pdf-editor-control-title {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.pdf-editor-preset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.pdf-editor-preset-grid .button {
  width: 100%;
}

.pdf-editor-controls label {
  margin: 0 0 10px;
}

.pdf-editor-file-name-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.pdf-editor-file-name-row input {
  min-width: 0;
}

.pdf-editor-controls input[type="range"] {
  accent-color: var(--accent);
}

.pdf-editor-actions {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.pdf-editor-actions .button {
  width: 100%;
}

.pdf-editor-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.pdf-editor-stack-note {
  font-size: 0.76rem;
  color: var(--muted);
}

.pdf-editor-section-list {
  display: grid;
  gap: 8px;
}

.pdf-editor-section-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: color-mix(in srgb, var(--card-bg) 90%, transparent);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  cursor: pointer;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.pdf-editor-section-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(5, 18, 24, 0.12);
}

.pdf-editor-section-row.active {
  border-color: color-mix(in srgb, var(--accent) 58%, var(--line));
  box-shadow: 0 0 0 2px rgba(79, 185, 178, 0.16);
}

.pdf-editor-section-row.muted {
  opacity: 0.58;
}

.pdf-editor-section-row-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pdf-editor-section-row-main strong,
.pdf-layout-section-title strong {
  display: block;
  font-size: 0.95rem;
}

.pdf-editor-section-row-main span:last-child,
.pdf-layout-section-title span {
  display: block;
  font-size: 0.78rem;
  color: var(--pdf-theme-muted, var(--muted));
}

.pdf-editor-section-row-icon,
.pdf-layout-section-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line));
  display: grid;
  place-items: center;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 85%, transparent);
  flex: 0 0 auto;
}

.pdf-editor-section-row-actions,
.pdf-layout-section-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pdf-editor-icon-button,
.pdf-layout-tool {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  display: grid;
  place-items: center;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.pdf-editor-icon-button:hover,
.pdf-layout-tool:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 72%, transparent);
}

.pdf-editor-icon-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pdf-editor-rotate-90 {
  transform: rotate(90deg);
}

.pdf-editor-inspector-actions {
  margin-top: 10px;
}

.pdf-editor-inline-status {
  margin: 10px 0 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--text);
  background: color-mix(in srgb, var(--card-subtle-bg) 92%, transparent);
}

.pdf-editor-inline-status.success {
  border-color: rgba(70, 201, 176, 0.42);
}

.pdf-editor-inline-status.error {
  border-color: rgba(240, 120, 110, 0.55);
}

.pdf-editor-inline-status.info {
  border-color: rgba(111, 185, 227, 0.45);
}

.pdf-editor-inline-status.working {
  border-color: rgba(255, 193, 92, 0.45);
}

.pdf-editor-import-summary {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.84rem;
}

.pdf-editor-import-list {
  display: grid;
  gap: 10px;
}

.pdf-editor-import-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: color-mix(in srgb, var(--card-bg) 92%, transparent);
  display: grid;
  gap: 10px;
}

.pdf-editor-import-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.pdf-editor-import-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.pdf-editor-import-card-copy {
  min-width: 0;
}

.pdf-editor-import-card-copy strong {
  display: block;
  font-size: 0.94rem;
}

.pdf-editor-import-card-copy span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
}

.pdf-editor-import-card-meta {
  display: grid;
  gap: 6px;
}

.pdf-editor-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--card-bg) 90%, transparent);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
}

.pdf-editor-chip.success {
  border-color: rgba(70, 201, 176, 0.42);
  background: rgba(70, 201, 176, 0.12);
}

.pdf-editor-chip.error {
  border-color: rgba(240, 120, 110, 0.48);
  background: rgba(240, 120, 110, 0.12);
}

.pdf-editor-chip.working {
  border-color: rgba(255, 193, 92, 0.48);
  background: rgba(255, 193, 92, 0.12);
}

.pdf-editor-chip-subtle {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.pdf-editor-import-hint {
  margin: -2px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.pdf-editor-import-hint.invalid {
  color: var(--danger);
}

.pdf-editor-import-empty {
  min-height: 132px;
  border: 1px dashed color-mix(in srgb, var(--accent) 32%, var(--line));
  border-radius: 14px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 16px;
  gap: 8px;
  color: var(--muted);
  background:
    radial-gradient(circle at top, rgba(114, 236, 255, 0.08), transparent 52%),
    color-mix(in srgb, var(--card-bg) 94%, transparent);
}

.pdf-editor-import-empty.compact {
  min-height: 0;
  padding: 14px;
}

.pdf-editor-inline-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pdf-editor-export-readiness {
  display: grid;
  gap: 12px;
}

.pdf-editor-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pdf-editor-preview {
  position: relative;
  isolation: isolate;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(
      145deg,
      color-mix(in srgb, var(--panel-preview-bg) 88%, transparent),
      color-mix(in srgb, var(--panel-preview-bg) 98%, #fff 2%)
    );
  padding: 10px;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  transition: box-shadow 220ms ease, border-color 220ms ease;
}

.pdf-editor-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 22% 18%, color-mix(in srgb, var(--accent-soft) 34%, transparent), transparent 36%),
    linear-gradient(120deg, transparent 18%, color-mix(in srgb, var(--accent) 14%, transparent) 48%, transparent 80%);
  transform: translateX(-8%) scale(1.01);
}

.pdf-editor-preview-shell {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  overflow: hidden;
}

.pdf-editor-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pdf-editor-preview-mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--card-bg) 88%, transparent);
}

.pdf-editor-preview-mode-toggle button {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.pdf-editor-preview-mode-toggle button.active {
  background: color-mix(in srgb, var(--accent-soft) 84%, transparent);
  color: var(--text);
}

.pdf-editor-preview-mode-toggle button:disabled {
  opacity: 0.5;
}

.pdf-editor-preview-toolbar-note {
  color: var(--muted);
  font-size: 0.8rem;
  text-align: right;
}

.pdf-editor-preview.is-tweaking {
  border-color: color-mix(in srgb, var(--accent) 52%, var(--line));
  box-shadow:
    0 0 0 3px rgba(79, 185, 178, 0.16),
    0 12px 26px rgba(9, 29, 36, 0.18);
}

.pdf-editor-preview.is-palette-animating::after {
  animation: previewPaletteSweep 720ms ease-out;
}

.pdf-editor-preview-stage {
  position: relative;
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  border-radius: 10px;
  padding: 18px;
  transition: padding 240ms ease;
  overflow: auto;
}

.pdf-editor-preview-stage::before {
  content: "";
  position: absolute;
  inset: var(--pdf-preview-margin, 14px);
  border: 1px dashed rgba(96, 143, 151, 0.34);
  border-radius: 8px;
  pointer-events: none;
  transition: inset 240ms ease, border-color 220ms ease;
}

.pdf-editor-preview.is-tweaking .pdf-editor-preview-stage::before {
  border-color: color-mix(in srgb, var(--accent) 48%, rgba(96, 143, 151, 0.34));
}

.pdf-layout-canvas-page {
  width: min(100%, var(--pdf-preview-page-width, 920px));
  margin: 0 auto;
  min-height: 100%;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid rgba(207, 224, 229, 0.95);
  box-shadow: 0 22px 38px rgba(7, 23, 29, 0.18);
  position: relative;
  overflow: hidden;
  transition:
    transform 240ms ease,
    box-shadow 240ms ease,
    border-color 240ms ease,
    background 240ms ease,
    color 240ms ease;
  color: var(--pdf-theme-text, #1d3137);
  font-family: var(--pdf-font-body, "Refynes Poppins", "Poppins", sans-serif);
}

.pdf-layout-canvas-page::before {
  content: "";
  position: absolute;
  inset: var(--pdf-preview-margin, 14px);
  border: 1px dashed rgba(96, 143, 151, 0.28);
  border-radius: 14px;
  pointer-events: none;
  transition: inset 240ms ease, border-color 220ms ease;
}

.pdf-editor-preview.is-tweaking .pdf-layout-canvas-page {
  transform: scale(1.004);
  box-shadow: 0 26px 46px rgba(7, 23, 29, 0.22);
}

.pdf-editor-preview.is-palette-animating .pdf-layout-canvas-page {
  animation: paletteCanvasPulse 720ms ease-out;
}

.pdf-layout-canvas-content {
  position: absolute;
  inset: var(--pdf-preview-margin, 14px);
  display: grid;
  align-content: start;
  gap: var(--pdf-preview-section-gap, 14px);
  padding: 0;
  overflow: hidden;
  transition: inset 240ms ease, gap 240ms ease;
}

.pdf-layout-export-flow {
  width: min(100%, var(--pdf-preview-page-width, 920px));
  margin: 0 auto 14px;
  display: grid;
  gap: 8px;
}

.pdf-layout-export-flow-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.pdf-layout-attachment-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pdf-layout-attachment-card {
  min-width: 180px;
  max-width: 260px;
  border-radius: 14px;
  border: 1px solid rgba(207, 224, 229, 0.95);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(240, 249, 250, 0.94));
  box-shadow: 0 10px 18px rgba(8, 23, 30, 0.08);
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.pdf-layout-attachment-card.primary {
  border-color: color-mix(in srgb, var(--pdf-theme-accent, #0f5a63) 45%, rgba(207, 224, 229, 0.95));
  background:
    linear-gradient(
      145deg,
      color-mix(in srgb, var(--pdf-theme-accent-soft, #e8f4f6) 65%, #fff),
      rgba(255, 255, 255, 0.98)
    );
}

.pdf-imported-page-shell {
  width: min(100%, var(--pdf-preview-page-width, 920px));
  margin: 0 auto;
  display: grid;
}

.pdf-imported-page-canvas {
  position: relative;
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(207, 224, 229, 0.95);
  box-shadow: 0 22px 38px rgba(7, 23, 29, 0.18);
  background: #ffffff;
}

.pdf-imported-page-image,
.pdf-imported-page-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.pdf-imported-page-image {
  object-fit: fill;
}

.pdf-imported-page-overlay {
  pointer-events: none;
}

.pdf-imported-block {
  position: absolute;
  display: block;
  padding: 2px 4px;
  border-radius: 8px;
  border: 1px solid rgba(79, 185, 178, 0.16);
  background: rgba(255, 255, 255, 0.02);
  text-align: left;
  line-height: 1.18;
  pointer-events: auto;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease,
    transform 180ms ease;
}

.pdf-imported-block:hover {
  border-color: rgba(79, 185, 178, 0.55);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 18px rgba(8, 23, 30, 0.16);
}

.pdf-imported-block.selected {
  border-color: rgba(79, 185, 178, 0.82);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 3px rgba(79, 185, 178, 0.14);
  transform: translateY(-1px);
}

.pdf-imported-block.changed {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(114, 236, 255, 0.45);
}

.pdf-imported-block-label {
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
}

.pdf-layout-attachment-card strong {
  display: block;
  font-size: 0.9rem;
  color: var(--pdf-theme-text, #162c33);
}

.pdf-layout-attachment-card span {
  display: block;
  margin-top: 4px;
  font-size: 0.77rem;
  color: var(--pdf-theme-muted, #55707a);
}

.pdf-layout-header {
  position: relative;
  border-radius: 16px;
  border: 1px solid rgba(207, 224, 229, 0.95);
  background: var(--pdf-theme-header, #f2f8fa);
  overflow: hidden;
}

.pdf-layout-header-banner {
  height: 12px;
  background: linear-gradient(90deg, var(--pdf-theme-accent, #0f5a63), color-mix(in srgb, var(--pdf-theme-accent-soft, #e8f4f6) 35%, var(--pdf-theme-accent, #0f5a63)));
}

.pdf-layout-header-copy {
  padding: 20px 22px 18px;
}

.pdf-layout-header-copy h2 {
  margin: 0;
  font-size: clamp(1.4rem, calc(1.15rem * var(--pdf-preview-title-scale, 1)), 2rem);
  line-height: 1.05;
  color: var(--pdf-theme-text, #162c33);
  font-family: var(--pdf-font-heading, "Refynes Poppins", "Poppins", sans-serif);
}

.pdf-layout-header-title {
  margin: 8px 0 0;
  color: var(--pdf-theme-accent, #0f5a63);
  font-weight: 700;
  font-family: var(--pdf-font-heading, "Refynes Poppins", "Poppins", sans-serif);
}

.pdf-layout-header-contact {
  margin: 8px 0 0;
  color: var(--pdf-theme-muted, #4f6870);
  font-size: 0.84rem;
  line-height: 1.45;
}

.pdf-layout-header-links {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pdf-layout-header-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--pdf-theme-accent, #0f5a63);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
}

.pdf-layout-header-link:hover {
  text-decoration: underline;
}

.pdf-layout-header-link-icon {
  width: 13px;
  height: 13px;
}

.pdf-layout-section-card {
  border-radius: 14px;
  border: 1px solid rgba(207, 224, 229, 0.95);
  background: #ffffff;
  padding: 14px;
  box-shadow: 0 10px 20px rgba(6, 20, 26, 0.06);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    opacity 180ms ease,
    background 180ms ease;
  cursor: pointer;
}

.pdf-layout-section-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(6, 20, 26, 0.1);
}

.pdf-layout-canvas-page.is-static-export .pdf-layout-section-card {
  cursor: default;
}

.pdf-layout-canvas-page.is-static-export .pdf-layout-section-card:hover {
  transform: none;
  box-shadow: 0 10px 20px rgba(6, 20, 26, 0.06);
}

.pdf-layout-canvas-page.is-export-mode {
  width: var(--pdf-export-page-width, 816px);
  min-height: var(--pdf-export-page-height, 1056px);
  height: var(--pdf-export-page-height, 1056px);
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.pdf-layout-canvas-page.is-export-mode::before {
  display: none;
}

.pdf-layout-canvas-page.is-export-mode .pdf-layout-section-card,
.pdf-layout-canvas-page.is-export-mode .pdf-layout-entry,
.pdf-layout-canvas-page.is-export-mode .pdf-layout-attachment-card,
.pdf-layout-canvas-page.is-export-mode .pdf-layout-header {
  box-shadow: none;
}

.pdf-layout-section-card.selected {
  border-color: color-mix(in srgb, var(--pdf-theme-accent, #0f5a63) 60%, rgba(207, 224, 229, 0.95));
  box-shadow: 0 0 0 2px rgba(79, 185, 178, 0.14), 0 18px 30px rgba(6, 20, 26, 0.12);
}

.pdf-layout-section-card.dragging {
  opacity: 0.42;
  transform: scale(0.99);
}

.pdf-layout-section-card.section-style-card {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbfc 100%);
}

.pdf-layout-section-card.section-style-accent {
  border-left: 4px solid var(--pdf-theme-accent, #0f5a63);
}

.pdf-layout-section-card.section-style-minimal {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  border: 0;
  border-top: 1px solid rgba(207, 224, 229, 0.95);
  padding-left: 0;
  padding-right: 0;
}

.pdf-layout-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.pdf-layout-section-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.pdf-layout-section-title strong {
  display: block;
  font-size: calc(1rem * var(--pdf-section-scale, 1));
  color: var(--pdf-theme-text, #162c33);
  font-family: var(--pdf-font-heading, "Refynes Poppins", "Poppins", sans-serif);
}

.pdf-layout-handle {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px dashed rgba(96, 143, 151, 0.4);
  display: grid;
  place-items: center;
  color: var(--pdf-theme-muted, #4f6870);
  cursor: grab;
}

.pdf-layout-section-copy {
  margin: 0;
  color: var(--pdf-theme-text, #22373e);
  line-height: 1.55;
  font-size: calc(0.9rem * var(--pdf-section-scale, 1));
}

.pdf-layout-entry-stack {
  display: grid;
  gap: 10px;
}

.pdf-layout-entry {
  border: 1px solid rgba(226, 236, 239, 0.95);
  border-radius: 12px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--pdf-theme-accent-soft, #e8f4f6) 16%, #fff);
}

.pdf-layout-entry-head {
  display: grid;
  gap: 4px;
}

.pdf-layout-entry-head strong {
  font-size: calc(0.95rem * var(--pdf-section-scale, 1));
  color: var(--pdf-theme-text, #162c33);
  font-family: var(--pdf-font-heading, "Refynes Poppins", "Poppins", sans-serif);
}

.pdf-layout-entry-head span {
  font-size: calc(0.8rem * var(--pdf-section-scale, 1));
  color: var(--pdf-theme-muted, #4f6870);
}

.pdf-layout-entry-bullets {
  margin: 8px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
  color: var(--pdf-theme-text, #22373e);
  font-size: calc(0.84rem * var(--pdf-section-scale, 1));
}

.pdf-layout-skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pdf-layout-skill-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  border: 1px solid rgba(207, 224, 229, 0.95);
  background: color-mix(in srgb, var(--pdf-theme-accent-soft, #e8f4f6) 42%, #fff);
  color: var(--pdf-theme-text, #1d3137);
  font-size: calc(0.8rem * var(--pdf-section-scale, 1));
  font-weight: 600;
}

.pdf-layout-empty-state {
  min-height: 180px;
  border: 1px dashed rgba(96, 143, 151, 0.32);
  border-radius: 16px;
  display: grid;
  place-items: center;
  gap: 8px;
  color: var(--pdf-theme-muted, #4f6870);
  text-align: center;
  padding: 18px;
}

.pdf-editor-color-grid {
  display: grid;
  gap: 10px;
}

.pdf-editor-color-control {
  display: grid;
  gap: 8px;
}

.pdf-editor-color-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.pdf-editor-color-row input[type="color"] {
  width: 56px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

.pdf-editor-preview-frame {
  width: 100%;
  height: 100%;
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  transition: transform 240ms ease, box-shadow 240ms ease;
}

.pdf-editor-preview.is-tweaking .pdf-editor-preview-frame {
  transform: scale(1.006);
  box-shadow: 0 14px 28px rgba(7, 23, 29, 0.18);
}

.pdf-editor-preview.is-tweaking {
  animation: pdfPreviewPulse 220ms ease-out;
}

@keyframes pdfPreviewPulse {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.003);
  }
  100% {
    transform: scale(1);
  }
}

:root[data-theme="dark"] .pdf-editor-panel {
  box-shadow: 0 26px 44px rgba(0, 0, 0, 0.45);
}

:root[data-theme="dark"] .pdf-editor-preview {
  background: linear-gradient(145deg, rgba(9, 30, 37, 0.9), rgba(8, 24, 30, 0.96));
}

:root[data-theme="dark"] .pdf-editor-preview-stage::before {
  border-color: rgba(123, 186, 181, 0.3);
}

.email-auth-button .button-content {
  gap: 10px;
}

.toast-viewport {
  position: fixed;
  right: 14px;
  bottom: calc(14px + var(--safe-bottom));
  z-index: 320;
  display: grid;
  gap: 8px;
  width: min(380px, calc(100vw - 28px));
}

/* On native iOS, push toasts above the bottom nav (60px) AND above the
   chat composer when it's visible (~92px). Using a generous 170px keeps
   the toast fully visible whether we're on Resume Builder (composer)
   or any other tab (nav only). */
.native-shell .toast-viewport {
  bottom: calc(170px + var(--safe-bottom));
  right: 12px;
  left: 12px;
  width: auto;
  max-width: none;
  justify-items: center;
}

.native-shell .toast-item {
  width: min(420px, 100%);
}

.toast-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(7, 30, 36, 0.92);
  color: #ebf8f6;
  box-shadow: 0 12px 24px rgba(3, 11, 16, 0.3);
  padding: 10px 12px;
}

.toast-item p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.35;
}

.toast-item.success {
  border-color: rgba(70, 201, 176, 0.4);
}

.toast-item.error {
  border-color: rgba(240, 120, 110, 0.55);
}

.toast-item.info {
  border-color: rgba(111, 185, 227, 0.45);
}

.toast-item.working {
  border-color: rgba(255, 193, 92, 0.45);
}

.toast-close {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  opacity: 0.85;
  padding: 2px;
  border-radius: 8px;
}

.toast-close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
}

.profile-hub-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 17, 22, 0.55);
  backdrop-filter: blur(4px);
  z-index: 300;
  display: grid;
  justify-items: end;
}

.profile-hub-panel {
  height: 100%;
  width: min(520px, 96vw);
  background: var(--card-bg);
  border-left: 1px solid var(--line);
  box-shadow: -16px 0 32px rgba(4, 12, 18, 0.28);
  padding: calc(18px + var(--safe-top)) 18px calc(18px + var(--safe-bottom));
  overflow: auto;
}

.profile-hub-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--card-bg);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}

/* ── Language toggle inside the Profile Hub ────────────────────────
   Segmented control with two pill-shaped options. Active option is
   filled with the accent gradient; the inactive one stays ghosted.
   Scale-on-press for tactile feedback. */
.profile-hub-language {
  margin: 14px 0 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-hub-language-toggle {
  display: flex;
  align-items: stretch;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  background: color-mix(in srgb, var(--surface-strong) 70%, transparent);
  /* Full-width with equal-share options so three pills (English / Français /
     Español) divide the row evenly and never overflow the profile panel at
     narrow widths (320–375px), where a fixed min-width used to spill the
     third button off-screen. */
  width: 100%;
  max-width: 360px;
}

.profile-hub-language-option {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 9px;
  cursor: pointer;
  transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1),
              background 160ms ease,
              color 160ms ease;
  /* Equal share of the row; min-width:0 lets them shrink below content width
     so they wrap text instead of overflowing. min-height keeps the touch
     target at the 44px accessibility minimum. */
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .profile-hub-language-option {
    transition: background 160ms ease, color 160ms ease;
  }
  .profile-hub-language-option:active {
    transform: none;
  }
}

.profile-hub-language-option:hover {
  color: var(--text);
}

.profile-hub-language-option:active {
  transform: scale(0.97);
}

.profile-hub-language-option.is-active {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent-strong) 82%, var(--accent)));
  color: var(--button-text);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 30%, transparent);
}

.profile-hub-language-option:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Close button on the profile hub. Sits to the right of the "Profile"
   title so users can dismiss the panel without hunting for the
   backdrop tap area. */
.profile-hub-close {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1),
              background 160ms ease,
              border-color 160ms ease;
}

.profile-hub-close:hover {
  background: color-mix(in srgb, var(--surface-strong) 50%, transparent);
  border-color: color-mix(in srgb, var(--border) 80%, transparent);
}

.profile-hub-close:active {
  transform: scale(0.94);
}

.profile-hub-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.linkedin-expired-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(220, 100, 60, 0.12);
  border: 1px solid rgba(220, 100, 60, 0.35);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.linkedin-expired-banner-text {
  font-size: 0.82rem;
  color: var(--text);
  flex: 1;
}

.linkedin-expired-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(220, 100, 60, 0.1);
  border: 1px solid rgba(220, 100, 60, 0.3);
  border-radius: 8px;
  padding: 7px 10px;
  margin-bottom: 8px;
  font-size: 0.8rem;
  color: var(--text);
  flex-wrap: wrap;
}

.cloud-sync-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.01em;
}

.cloud-sync-badge-syncing {
  background: rgba(60, 130, 220, 0.12);
  color: #3c82dc;
  border: 1px solid rgba(60, 130, 220, 0.3);
}

.cloud-sync-badge-synced {
  background: rgba(40, 170, 100, 0.12);
  color: #28aa64;
  border: 1px solid rgba(40, 170, 100, 0.3);
}

.cloud-sync-badge-error {
  background: rgba(220, 60, 60, 0.1);
  color: #dc3c3c;
  border: 1px solid rgba(220, 60, 60, 0.25);
}

.profile-hub-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-hub-avatar,
.profile-hub-avatar-fallback {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1px solid var(--line);
}

.profile-hub-avatar {
  object-fit: cover;
}

.profile-hub-avatar-fallback {
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1rem;
}

.profile-hub-name {
  margin: 0;
  font-weight: 800;
  font-size: 1.06rem;
}

.profile-hub-email {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.profile-hub-bio {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.9rem;
}

.profile-hub-stats {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.profile-hub-stats > div {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-subtle-bg);
  padding: 10px;
}

/* Getting Started — first-time user milestone checklist */
.getting-started-card {
  position: relative;
  margin: 0 0 20px 0;
  padding: 18px 18px 14px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 75%, var(--card-bg) 25%), var(--card-bg));
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line) 72%);
  box-shadow: 0 6px 20px rgba(13, 42, 50, 0.06);
  overflow: hidden;
}
.getting-started-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #62c1ba 40%), var(--accent));
}
.getting-started-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.getting-started-title {
  margin: 0 0 4px 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}
.getting-started-sub {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.getting-started-dismiss {
  background: transparent;
  border: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.getting-started-dismiss:hover { background: var(--card-subtle-bg); color: var(--text); }
.getting-started-progress {
  height: 6px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--line) 60%, transparent 40%);
  overflow: hidden;
  margin-bottom: 14px;
}
.getting-started-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #6ecbc8 30%));
  border-radius: 99px;
  transition: width 0.42s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.getting-started-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.getting-started-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  text-align: left;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.1s ease;
}
.getting-started-item:hover:not(:disabled) {
  background: color-mix(in srgb, var(--card-bg) 65%, transparent 35%);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line) 70%);
}
.getting-started-item.done {
  opacity: 0.65;
  text-decoration: line-through;
  cursor: default;
}
.getting-started-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}
.getting-started-item.done .getting-started-check {
  background: var(--accent);
  color: var(--button-text);
}
.getting-started-label {
  flex: 1;
  font-weight: 500;
}
.getting-started-arrow {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 600;
  opacity: 0.5;
  transition: transform 0.16s ease, opacity 0.16s ease;
}
.getting-started-item:hover .getting-started-arrow {
  opacity: 1;
  transform: translateX(2px);
}

/* Quick Tools grid in profile hub — replaces hamburger menu on native iOS */
.profile-hub-quick-tools .profile-quick-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.profile-quick-tool {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card-subtle-bg);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.1s ease;
}
.profile-quick-tool:hover,
.profile-quick-tool:focus-visible {
  background: color-mix(in srgb, var(--accent-soft) 70%, var(--card-subtle-bg) 30%);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line) 60%);
}
.profile-quick-tool:active {
  transform: scale(0.97);
}
.profile-quick-tool-active {
  background: color-mix(in srgb, var(--accent) 14%, var(--card-subtle-bg) 86%);
  border-color: var(--accent);
  color: var(--accent);
}
.profile-quick-tool-active .profile-quick-tool-icon {
  background: var(--accent);
  color: var(--button-text);
}
.profile-quick-tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}
.profile-quick-tool-label {
  line-height: 1.2;
}

/* Hide the hamburger toggle, topbar theme toggle, and full toolbar on native iOS.
   The Profile tab (Quick Tools section) replaces all of these. */
.native-shell .mobile-menu-toggle,
.native-shell .mobile-theme-toggle,
.native-shell .toolbar,
.native-shell .mobile-toolbar-backdrop {
  display: none !important;
}

.profile-hub-admin-section {
  position: relative;
  overflow: hidden;
}

.profile-hub-admin-section::before {
  content: "";
  position: absolute;
  inset: -34% -24% auto -24%;
  height: 72%;
  pointer-events: none;
  background: linear-gradient(
    120deg,
    rgba(66, 133, 244, 0.07),
    rgba(52, 168, 83, 0.06),
    rgba(251, 188, 5, 0.06),
    rgba(234, 67, 53, 0.06)
  );
  filter: blur(14px);
  opacity: 0.65;
}

.profile-hub-admin-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.profile-hub-admin-grid > div {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-subtle-bg);
  padding: 10px;
}

.profile-hub-admin-grid-secondary {
  margin-top: 10px;
}

.profile-admin-chips {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.profile-admin-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card-subtle-bg);
  padding: 4px 10px;
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--muted);
}

.profile-admin-events {
  margin-top: 10px;
  display: grid;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.profile-admin-event {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card-subtle-bg);
  padding: 8px 10px;
}

.profile-admin-event-type {
  margin: 0;
  font-size: 0.79rem;
  font-weight: 700;
  line-height: 1.3;
}

.profile-admin-event-meta {
  margin: 3px 0 0;
  font-size: 0.74rem;
  color: var(--muted);
}

.profile-admin-error {
  margin: 6px 0 0;
  border: 1px solid color-mix(in srgb, var(--danger) 60%, var(--line) 40%);
  border-radius: 10px;
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: var(--danger);
  font-size: 0.82rem;
  line-height: 1.45;
  padding: 8px 10px;
}

.hub-stat-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.profile-hub-section {
  margin-top: 14px;
  border-top: 1px dashed var(--line);
  padding-top: 14px;
}

.profile-hub-section h3 {
  margin: 0;
  font-size: 0.94rem;
  font-family: "Poppins", sans-serif;
}

.profile-hub-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.profile-auth-state {
  margin-left: auto;
}

.profile-hub-auth-actions {
  margin-top: 2px;
}

.profile-hub-stack-actions {
  display: grid;
  gap: 10px;
}

.profile-hub-stack-actions .button {
  width: 100%;
}

.cancel-sub-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
  text-align: center;
  text-decoration: underline;
  font-family: inherit;
  transition: color 0.15s;
}
.cancel-sub-link:hover:not(:disabled) {
  color: #e53935;
}
.cancel-sub-link:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.linkedin-import-card {
  position: relative;
  overflow: visible;
  isolation: isolate;
  z-index: 2;
}

.linkedin-import-card::before {
  content: "";
  position: absolute;
  inset: -18% -18% auto -18%;
  height: 72%;
  pointer-events: none;
  background: linear-gradient(
    120deg,
    rgba(66, 133, 244, 0.09),
    rgba(52, 168, 83, 0.08),
    rgba(251, 188, 5, 0.09),
    rgba(234, 67, 53, 0.08),
    rgba(66, 133, 244, 0.09)
  );
  filter: blur(16px);
  background-size: 220% 220%;
  animation: aiRainbowShift 9s linear infinite paused;
  opacity: 0.24;
  transition: opacity 0.24s ease;
}

.linkedin-import-card:hover::before {
  animation-play-state: running;
  opacity: 0.38;
}

.linkedin-import-tools {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.linkedin-import-gradient-button {
  flex: 1 1 230px;
  min-width: 0;
  border-color: transparent;
  color: #052129;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.62)) padding-box,
    linear-gradient(120deg, rgba(66, 133, 244, 0.55), rgba(52, 168, 83, 0.48), rgba(251, 188, 5, 0.54), rgba(234, 67, 53, 0.48), rgba(66, 133, 244, 0.55))
      border-box;
  background-size:
    auto,
    200% 200%;
  box-shadow: 0 7px 14px rgba(8, 34, 42, 0.14);
  transition:
    transform 0.16s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.linkedin-import-gradient-button:hover {
  transform: translateY(-1px);
  filter: saturate(1.05);
  box-shadow: 0 10px 20px rgba(10, 40, 52, 0.18);
  animation: aiRainbowShift 3.6s linear infinite;
}

:root[data-theme="dark"] .linkedin-import-gradient-button {
  color: #e6f8f7;
  background:
    linear-gradient(120deg, rgba(10, 34, 39, 0.92), rgba(13, 39, 44, 0.86)) padding-box,
    linear-gradient(120deg, rgba(66, 133, 244, 0.62), rgba(52, 168, 83, 0.56), rgba(251, 188, 5, 0.62), rgba(234, 67, 53, 0.56), rgba(66, 133, 244, 0.62))
      border-box;
}

.profile-import-tools {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.profile-import-tools .button {
  flex: 1 1 220px;
}

.profile-import-tip-wrap {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  z-index: 8;
}

.profile-import-tip-trigger {
  min-height: 36px;
  border: 1px solid color-mix(in srgb, var(--line) 92%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--card-subtle-bg) 42%, transparent);
  color: color-mix(in srgb, var(--muted) 92%, var(--ink));
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 7px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease, opacity 0.16s ease;
  opacity: 0.72;
}

.profile-import-tip-trigger:hover {
  border-color: color-mix(in srgb, var(--accent) 18%, var(--line));
  color: var(--label);
  background: color-mix(in srgb, var(--ghost-hover) 52%, transparent);
  opacity: 0.92;
}

.profile-import-tip-trigger:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.profile-import-tooltip {
  position: absolute;
  right: 0;
  top: auto;
  bottom: calc(100% + 8px);
  z-index: 16;
  width: min(280px, 72vw);
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--card-bg) 92%, var(--card-subtle-bg));
  color: color-mix(in srgb, var(--ink) 88%, var(--muted));
  font-size: 0.75rem;
  line-height: 1.4;
  padding: 8px 10px;
  box-shadow: 0 10px 16px rgba(4, 14, 20, 0.12);
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.linkedin-import-copy {
  max-width: 44ch;
}

.profile-import-tip-wrap:hover .profile-import-tooltip,
.profile-import-tip-wrap:focus-within .profile-import-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.profile-hub-form-grid {
  margin-top: 10px;
}

.profile-hub-section .google-auth-button {
  width: 100%;
}

.profile-hub-section .linkedin-auth-button {
  width: 100%;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.profile-detail-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.profile-detail-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-subtle-bg);
  padding: 10px;
}

.profile-detail-value {
  margin: 4px 0 0;
  line-height: 1.35;
  font-size: 0.85rem;
  color: var(--ink);
  word-break: break-word;
}

.resume-library-list {
  display: grid;
  gap: 10px;
}

.resume-library-manager-card {
  margin-top: 2px;
  border-top: 3px solid color-mix(in srgb, var(--accent) 50%, transparent);
}

.resume-library-default-note {
  margin: 0 0 12px;
  font-size: 0.83rem;
  color: var(--muted);
}

.resume-library-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: var(--card-subtle-bg);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.resume-library-copy {
  min-width: 0;
}

.resume-library-name {
  margin: 0;
  font-weight: 800;
  font-size: 0.91rem;
}

.resume-library-name-row {
  margin: 0;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.resume-default-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid color-mix(in srgb, var(--accent) 62%, var(--line) 38%);
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: color-mix(in srgb, var(--accent-strong) 78%, white 22%);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

:root[data-theme="dark"] .resume-default-pill {
  color: #9de9df;
  border-color: rgba(122, 206, 193, 0.44);
  background: rgba(102, 198, 189, 0.16);
}

.resume-library-meta {
  margin: 4px 0 0;
  font-size: 0.77rem;
  color: var(--muted);
}

.resume-library-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.is-default-resume-action {
  opacity: 1;
}

.job-library-item {
  align-items: center;
}

.job-library-note {
  margin: 8px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
}

.jobs-filter-grid {
  align-items: end;
}

/* Job Board tabs */
.jobs-board-header-card {
  padding-bottom: 0 !important;
}

.jobs-board-tabs {
  display: flex;
  gap: 4px;
  margin-top: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0;
}

.jobs-board-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px 10px;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}

.jobs-board-tab:hover {
  color: var(--text);
}

.jobs-board-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.jobs-board-tab .button-icon {
  width: 14px;
  height: 14px;
}

/* AI Recruiter result */
.field-required {
  color: var(--accent);
}

.field-hint {
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 400;
  margin-left: 4px;
}

.ai-recruiter-result {
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-recruiter-result-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin: 0;
}

.ai-recruiter-result-query {
  font-size: 0.9rem;
  color: var(--text);
  margin: 0;
}

.ai-recruiter-result-reasoning {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.ai-recruiter-chips-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.ai-recruiter-chips-label {
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 600;
}

.ai-recruiter-tips {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ai-recruiter-tips li {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
}

/* ══════════════════════════════════════════════════
   Marketing Home — New Premium Design
   ══════════════════════════════════════════════════ */

/* ─── Apple MacBook Pro-style marketing typography ──────────────────────
   Reverse-engineered from apple.com/macbook-pro:
   - SF Pro Display on Apple devices (via -apple-system), Inter/Poppins
     fallback elsewhere. SF Pro is what makes Apple pages SCREAM Apple.
   - Huge display sizes (up to ~80px), Semibold weight, ultra-tight
     tracking (-0.04em to -0.05em), tight leading (1.05).
   - Centered, generous max-widths (~14ch on display copy).
   - Section intros sit alone in massive whitespace.
   ─────────────────────────────────────────────────────────────────────── */

/* Apple-system font stack: SF Pro Display on Mac/iOS, falls back to
   Poppins on Windows/Android. The -apple-system keyword resolves to
   SF Pro Display for big text and SF Pro Text for body text. */
.marketing-section-intro,
.marketing-section-intro * {
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Display",
    "SF Pro Text",
    "Inter",
    "Poppins",
    "Segoe UI",
    Roboto,
    sans-serif;
}

/* Section intro container — Apple-style centered with breathing room */
.marketing-section-intro {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  max-width: none;
  padding: clamp(40px, 7vw, 96px) 24px clamp(28px, 4vw, 56px);
  margin: 0 auto;
}

.mkt-kicker {
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin: 0;
  text-shadow: 0 0 24px color-mix(in srgb, var(--accent) 32%, transparent);
}
:root[data-theme="light"] .mkt-kicker {
  text-shadow: none;
}

.mkt-section-title {
  /* Default for CENTERED section intros — big and confident.
     Scales 2rem (mobile) → 3.5rem (56px) at 1440px+.
     The previous 4.5rem ceiling was breaking left-aligned variants into
     4-line walls. 3.5rem is the better default; the hero is bigger
     (5rem) because it has its own clamp. */
  font-size: clamp(1.8rem, 5.2vw, 3.5rem);
  /* SF Pro Display Semibold on Apple devices, Poppins 600 elsewhere */
  font-weight: 600;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.04em;
  line-height: 1.06;
  text-wrap: balance;
  font-feature-settings: "kern", "liga", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Emphasis via brightness + glow, not heavier weight — Apple's trick */
.mkt-section-title strong,
.mkt-section-title .mkt-title-accent {
  font-weight: 600;
  color: #ffffff;
  text-shadow:
    0 0 32px rgba(255, 255, 255, 0.28),
    0 0 48px color-mix(in srgb, var(--accent) 22%, transparent);
}
:root[data-theme="light"] .mkt-section-title strong,
:root[data-theme="light"] .mkt-section-title .mkt-title-accent {
  color: var(--ink);
  text-shadow: none;
}

.mkt-section-sub {
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);   /* 18-22px — Apple's intro size */
  font-weight: 400;
  color: var(--muted);
  max-width: 36ch;
  margin: 8px auto 0;
  line-height: 1.42;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

/* ─── Hero ─── */
.mkt-hero {
  /* Tight vertical rhythm — the hero shouldn't dominate the viewport.
     ~32px top from the topbar's bottom edge feels balanced and gives
     the next section room to peek above the fold (encourages scroll). */
  padding-top: 32px !important;
  padding-bottom: 16px !important;
  min-height: 0 !important;
}

.mkt-hero-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

/* ─── Two-column hero (desktop) ──────────────────────────────────────
   Text content on the left, 3D R on the right. Vertically centered.
   On mobile (≤860px) stacks vertically: text first, 3D below — keeps
   the headline as the first thing the user sees.
   Columns balanced so headline ("Your resume deserves") fits on one
   line at the largest font-size, while the R still has room to be the
   visual anchor. */
.mkt-hero-split {
  display: grid;
  /* Right column gets a bit more space than text — the R is the visual anchor. */
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 40px;
  align-items: center;
  /* NO min-height — hero row is dictated by the text column's natural
     content height. The R wrap fits the row, the row never grows. */
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
.mkt-hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;   /* left-align text + CTAs on desktop */
  text-align: left;
  max-width: 560px;
}
.mkt-hero-split .mkt-hero-headline {
  text-align: left;
}
.mkt-hero-split .mkt-hero-sub {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
}
.mkt-hero-split .mkt-hero-actions {
  justify-content: flex-start;
}
.mkt-hero-split .mkt-hero-howitworks {
  align-self: flex-start;
  margin-left: -10px;  /* nudge left so the icon hangs in the optical margin */
}

/* Mobile: stack vertically, text first, then 3D. Re-center everything
   for the stacked layout — looks more balanced when stacked. */
@media (max-width: 860px) {
  .mkt-hero-split {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 0 16px;
  }
  .mkt-hero-text {
    align-items: center;
    text-align: center;
    max-width: 100%;
    order: 1;
  }
  .mkt-hero-split .mkt-hero-headline,
  .mkt-hero-split .mkt-hero-sub {
    text-align: center;
  }
  .mkt-hero-split .mkt-hero-actions {
    justify-content: center;
  }
  .mkt-hero-split .mkt-hero-howitworks {
    align-self: center;
    margin-left: 0;
  }
  .mkt-hero-3d-wrap {
    order: 2;
    margin: 0 auto !important;
  }
}

.mkt-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.mkt-hero-copy {
  max-width: 560px;
}

/* Hero trust badge */
.mkt-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  border-radius: 24px;
  padding: 6px 14px;
  margin-bottom: 18px;
}

.mkt-hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: mkt-badge-pulse 2s ease-in-out infinite;
}

@keyframes mkt-badge-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* ─── 3D R centerpiece ─────────────────────────────────────────────────
   In the two-column hero layout this fills the right column. Soft glow
   underneath, transparent stage, no UI chrome from model-viewer.
   Sized to feel like a hero product element — square-ish ratio, capped
   max-width so the hero doesn't feel cavernous. */
.mkt-hero-3d-wrap {
  position: relative;
  /* Wrap fits naturally inside the compact hero row — DOES NOT grow the
     hero. 432px = compact size per user. Mask removed — full sharp
     logo edges visible (no radial fade). */
  width: 100%;
  max-width: 432px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}
@media (max-width: 980px) {
  .mkt-hero-3d-wrap {
    width: 100%;
    max-width: 480px;
    height: auto;
    aspect-ratio: 1 / 1;
  }
}
/* ─── Cinematic aurora glow behind the R ───────────────────────────────
   Two layered pseudo-elements create a multi-color halo:
   - ::before = wide multi-stop aurora (teal + purple + blue) that pulses
     SLOWLY to give the logo presence. Heavy blur so it reads as ambient
     light bleeding off the R, not a defined halo.
   - ::after = tight inner rim glow synced in counter-pulse with ::before
     so when one expands the other contracts — feels alive, not loopy.
   Reads premium on light AND dark themes because everything fades to
   transparent (lets the body background show through). */
.mkt-hero-3d-wrap::before {
  content: "";
  position: absolute;
  inset: -18%;
  background:
    radial-gradient(circle at 32% 30%, color-mix(in srgb, var(--accent) 55%, transparent) 0%, transparent 48%),
    radial-gradient(circle at 70% 68%, color-mix(in srgb, #8b5cf6 48%, transparent) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, color-mix(in srgb, #4f8cff 38%, transparent) 0%, transparent 60%),
    radial-gradient(circle at 78% 22%, color-mix(in srgb, #f472b6 28%, transparent) 0%, transparent 45%);
  filter: blur(64px);
  z-index: -1;
  pointer-events: none;
  animation: mkt-r-aurora 7s ease-in-out infinite;
  will-change: transform, opacity;
}
.mkt-hero-3d-wrap::after {
  content: "";
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  background: radial-gradient(circle,
    transparent 48%,
    color-mix(in srgb, var(--accent) 32%, transparent) 64%,
    color-mix(in srgb, #8b5cf6 18%, transparent) 76%,
    transparent 92%);
  filter: blur(28px);
  z-index: -1;
  pointer-events: none;
  animation: mkt-r-aurora-rim 7s ease-in-out infinite;
  will-change: transform, opacity;
}
@keyframes mkt-r-aurora {
  0%, 100% { opacity: 0.78; transform: scale(0.96) rotate(0deg); }
  50%      { opacity: 1;    transform: scale(1.08) rotate(8deg); }
}
@keyframes mkt-r-aurora-rim {
  0%, 100% { opacity: 1;    transform: scale(1.04); }
  50%      { opacity: 0.7;  transform: scale(0.94); }
}
/* Respect reduced-motion: still show the glow, but kill the pulse */
@media (prefers-reduced-motion: reduce) {
  .mkt-hero-3d-wrap::before,
  .mkt-hero-3d-wrap::after {
    animation: none;
  }
}
/* Target the model-viewer via descendant selector — React 18's
   className→class mapping is unreliable on custom elements (web
   components), so we anchor to the wrap div which has a real class. */
.mkt-hero-3d-wrap model-viewer {
  width: 100%;
  height: 100%;
  --poster-color: transparent;
  background-color: transparent;
  --progress-bar-color: transparent;
  --progress-mask: transparent;
  transform: translateZ(0);
  position: relative;
  z-index: 1;
}
/* ─── Floor shadow ─────────────────────────────────────────────────────
   Soft elliptical drop beneath the R. Pulses gently in sync with the
   outer aurora (same 7s cycle) so the whole composition breathes
   together. Sells "object floating on light" — without this the R
   looks like it's pasted in FRONT of the aurora; with this, the R
   looks like it's RESTING on it. */
.mkt-hero-3d-floor {
  position: absolute;
  left: 50%;
  bottom: 4%;
  width: 70%;
  height: 16%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center,
    color-mix(in srgb, var(--accent) 42%, transparent) 0%,
    color-mix(in srgb, #8b5cf6 26%, transparent) 30%,
    color-mix(in srgb, #4f8cff 14%, transparent) 55%,
    transparent 82%);
  filter: blur(22px);
  z-index: 0;
  pointer-events: none;
  animation: mkt-r-floor 7s ease-in-out infinite;
  will-change: transform, opacity;
}
@keyframes mkt-r-floor {
  0%, 100% { opacity: 0.85; transform: translateX(-50%) scaleX(1.00); }
  50%      { opacity: 1.00; transform: translateX(-50%) scaleX(1.14); }
}
/* ─── Specular orbit ───────────────────────────────────────────────────
   A bright pinpoint that very slowly circles the rim. Uses CSS
   offset-path (Chrome 55+, Safari 16+) for a perfect circular trajectory
   — no JS, no math. Mix-blend-mode: screen makes it light-up whatever's
   behind it, like a real reflective hotspot on metal/glass. */
.mkt-hero-3d-spec {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  background: radial-gradient(circle,
    rgba(255, 255, 255, 0.95) 0%,
    color-mix(in srgb, var(--accent) 60%, #fff) 40%,
    transparent 75%);
  border-radius: 50%;
  filter: blur(3px);
  /* circular orbit at 40% radius from center */
  offset-path: circle(40% at 50% 50%);
  offset-distance: 0%;
  animation: mkt-r-spec-orbit 14s linear infinite;
  pointer-events: none;
  z-index: 2;
  mix-blend-mode: screen;
  opacity: 0.9;
  will-change: offset-distance;
}
@keyframes mkt-r-spec-orbit {
  to { offset-distance: 100%; }
}
/* ─── Film grain over the entire hero ─────────────────────────────────
   At very low opacity (5%) — invisible until you look for it, but
   noticeably elevates flat color regions from "AI gradient" to
   "intentional design." Inline SVG so no extra HTTP request. */
.mkt-hero { position: relative; isolation: isolate; }
.mkt-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.55 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
  opacity: 0.05;
  mix-blend-mode: overlay;
  z-index: 0;
}
/* ─── Theme-aware aurora intensity ────────────────────────────────────
   Dark theme can carry hotter, more saturated colors because the dark
   background gives them room to glow. Light theme stays softer so the
   pastels don't clash with white. */
:root[data-theme="dark"] .mkt-hero-3d-wrap::before {
  background:
    radial-gradient(circle at 32% 30%, color-mix(in srgb, var(--accent) 78%, transparent) 0%, transparent 48%),
    radial-gradient(circle at 70% 68%, color-mix(in srgb, #c084fc 68%, transparent) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, color-mix(in srgb, #60a5fa 55%, transparent) 0%, transparent 60%),
    radial-gradient(circle at 78% 22%, color-mix(in srgb, #f472b6 48%, transparent) 0%, transparent 45%);
}
:root[data-theme="dark"] .mkt-hero-3d-floor {
  background: radial-gradient(ellipse at center,
    color-mix(in srgb, var(--accent) 60%, transparent) 0%,
    color-mix(in srgb, #c084fc 38%, transparent) 30%,
    color-mix(in srgb, #60a5fa 22%, transparent) 55%,
    transparent 82%);
}
@media (prefers-reduced-motion: reduce) {
  .mkt-hero-3d-floor,
  .mkt-hero-3d-spec { animation: none; }
}
/* Hide model-viewer's default "interaction-prompt" tooltip + AR button
   since we set interaction-prompt="none" and disable-zoom anyway */
.mkt-hero-3d-wrap model-viewer::part(default-progress-bar) {
  display: none;
}

@media (max-width: 640px) {
  .mkt-hero-3d-wrap {
    max-width: 300px;
  }
}

.mkt-hero-headline {
  /* Apple MacBook Pro hero headline. SF Pro Display on Apple devices,
     Semibold weight, ultra-tight -0.045em tracking, 1.04 line-height.
     This combination is what makes apple.com headlines look like Apple. */
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Display",
    "SF Pro Text",
    "Inter",
    "Poppins",
    "Segoe UI",
    Roboto,
    sans-serif;
  font-size: clamp(2.5rem, 7.2vw, 5rem);
  font-weight: 600;
  color: var(--text);
  margin: 0 0 22px;
  letter-spacing: -0.045em;
  line-height: 1.04;
  text-wrap: balance;
  font-feature-settings: "kern", "liga", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.mkt-hero-gradient-text {
  /* Deliberately NOT a gradient. The old fill ran brand teal into #8b5cf6
     ("AI purple"), which is the single most generic signal a SaaS hero can
     send. One saturated-but-deep accent, set solid, reads more expensive
     and keeps the headline crisp at every size. */
  color: var(--accent);
  -webkit-text-fill-color: currentColor;
}

/* Small caps lead-in inside the H1. Carries the "free" message and the
   "AI resume builder" keyword while letting the emotional line stay the
   hero — hierarchy by weight and colour, not by more scale. */
.mkt-hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  font-family: "Poppins", sans-serif;
  font-size: clamp(0.72rem, 1.1vw, 0.8rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.mkt-hero-eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.55;
  flex: none;
}

/* Concrete proof under the CTAs — "free" means nothing without specifics. */
.mkt-hero-trust {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  /* Sized so all three claims hold ONE line at the 501px hero text column;
     the copy was measured against this gap and font-size. */
  gap: 8px 16px;
  margin: 22px 0 0;
  padding: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.mkt-hero-trust li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
}

/* Hairline check mark drawn in CSS — no icon dependency, no emoji. */
.mkt-hero-trust li::before {
  content: "";
  width: 13px;
  height: 7px;
  flex: none;
  border-left: 1.8px solid var(--accent);
  border-bottom: 1.8px solid var(--accent);
  border-radius: 1px;
  transform: rotate(-45deg) translateY(-1px);
  opacity: 0.85;
}

@media (max-width: 860px) {
  /* Stacked, the three claims each centre independently and the check marks
     end up on a ragged left edge. Lay them out as a column sized to its
     widest item and centre THAT — the checks then line up in one column. */
  .mkt-hero-trust {
    flex-direction: column;
    align-items: flex-start;
    width: max-content;
    max-width: 100%;
    margin: 20px auto 0;
    gap: 9px;
    font-size: 0.82rem;
  }
  .mkt-hero-eyebrow { justify-content: center; }
  .mkt-hero-eyebrow::before { display: none; }
}

.mkt-hero-sub {
  /* Single-sentence subtitle — short, declarative, no list-of-features. */
  font-size: clamp(0.98rem, 1.6vw, 1.1rem);
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 32px;
  max-width: 560px;
  text-align: center;
}

.mkt-hero-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  justify-content: center;
}

/* "How it works ↓" — quiet tertiary link below the CTAs. Inviting, not
   competing. Uses a subtle hover lift + the down-arrow icon to imply
   scroll-discovery. */
.mkt-hero-howitworks {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 8px 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.005em;
  cursor: pointer;
  border-radius: 999px;
  transition: color 180ms cubic-bezier(0.23, 1, 0.32, 1),
              background-color 180ms cubic-bezier(0.23, 1, 0.32, 1),
              transform 180ms cubic-bezier(0.23, 1, 0.32, 1);
  -webkit-tap-highlight-color: transparent;
}
.mkt-hero-howitworks:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}
.mkt-hero-howitworks:active {
  transform: scale(0.96);
}
.mkt-hero-howitworks svg {
  /* Subtle "breathing" arrow that hints at scrolling. Custom keyframe —
     not infinite-aggressive, just a gentle nod every 2.4s. */
  animation: mkt-hero-howitworks-bob 2.4s ease-in-out infinite;
}
@keyframes mkt-hero-howitworks-bob {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50%      { transform: translateY(3px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .mkt-hero-howitworks svg { animation: none; }
}

.mkt-cta-primary {
  /* Single-hue tonal ramp (light edge -> deep core) instead of teal->purple.
     The 1px inner highlight is what sells it as a physical, moulded surface
     rather than a flat colour swatch, and the shadow is TINTED with the
     accent so it reads as the button's own light, not a grey drop shadow. */
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--accent) 88%, white),
    var(--accent) 52%,
    color-mix(in srgb, var(--accent) 88%, black)) !important;
  border-color: transparent !important;
  color: #fff !important;
  font-weight: 700 !important;
  padding: 14px 28px !important;
  font-size: 0.95rem !important;
  letter-spacing: -0.01em !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.22) inset,
    0 0 0 1px color-mix(in srgb, var(--accent) 88%, black) inset,
    0 6px 18px -4px color-mix(in srgb, var(--accent) 45%, transparent),
    0 2px 6px -1px color-mix(in srgb, var(--accent) 30%, transparent) !important;
  /* Emil: name exact properties + custom ease-out curve, not bare `ease`.
     Different durations for hover-lift (visual) vs press-feedback (snappy). */
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out) !important;
}

@media (hover: hover) and (pointer: fine) {
  .mkt-cta-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.26) inset,
      0 0 0 1px color-mix(in srgb, var(--accent) 88%, black) inset,
      0 12px 26px -6px color-mix(in srgb, var(--accent) 52%, transparent),
      0 3px 8px -2px color-mix(in srgb, var(--accent) 34%, transparent) !important;
  }
}

/* Emil: every pressable element should feel "heard" by the interface.
   scale(0.97) on :active fires instantly and conveys real responsiveness. */
.mkt-cta-primary:active {
  transform: scale(0.97) !important;
  transition-duration: 100ms !important;
}

/* Launch announcement variant of the hero badge — clickable, gradient ring,
   pulsing dot. Replaces the trust copy when we have something newsworthy
   like a fresh App Store launch. */
.mkt-hero-badge-launch {
  position: relative;
  text-decoration: none;
  font-size: 0.84rem;
  padding: 8px 16px 8px 14px;
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  border: 1px solid transparent;
  background-clip: padding-box;
  backdrop-filter: blur(10px) saturate(1.3);
  -webkit-backdrop-filter: blur(10px) saturate(1.3);
  box-shadow:
    0 4px 14px -4px color-mix(in srgb, var(--accent) 24%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  /* Emil: name the properties and use the strong ease-out curve. */
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
  isolation: isolate;
}
.mkt-hero-badge-launch::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  /* Refracted edge: bright at the top, fading round the curve — reads as a
     lit glass rim rather than a coloured outline. */
  background: linear-gradient(160deg,
    color-mix(in srgb, var(--accent) 62%, transparent),
    color-mix(in srgb, var(--accent) 20%, transparent) 52%,
    color-mix(in srgb, var(--accent) 48%, transparent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  z-index: -1;
}
.mkt-hero-badge-launch:active {
  transform: scale(0.975);
  transition-duration: 100ms;
}

.mkt-hero-badge-launch:hover {
  transform: translateY(-1px);
  box-shadow:
    0 8px 22px color-mix(in srgb, var(--accent) 28%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.mkt-hero-badge-launch .mkt-hero-badge-text {
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.005em;
}
.mkt-hero-badge-launch .mkt-hero-badge-text strong {
  color: var(--accent);
  font-weight: 800;
  margin-right: 6px;
}
.mkt-hero-badge-launch svg {
  color: var(--accent);
  flex: 0 0 auto;
  transition: transform 0.18s ease;
}
.mkt-hero-badge-launch:hover svg {
  transform: translateX(3px);
}
.mkt-hero-badge-pulse {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
}
.mkt-hero-badge-pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
  animation: mkt-badge-launch-pulse 1.6s ease-out infinite;
}
@keyframes mkt-badge-launch-pulse {
  0%   { transform: scale(0.6); opacity: 0.55; }
  100% { transform: scale(2.4); opacity: 0;    }
}

/* Apple-style "Download on the App Store" badge — black pill with the
   Apple glyph + two-line label. Uses currentColor on the SVG so it inverts
   cleanly in light mode if needed. */
.mkt-app-store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 14px;
  border-radius: 12px;
  background: #000;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: transform 0.16s ease, box-shadow 0.2s ease;
  height: 50px;
}
.mkt-app-store-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}
.mkt-app-store-glyph {
  width: 26px;
  height: 30px;
  flex: 0 0 auto;
}
.mkt-app-store-stack {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  text-align: left;
}
.mkt-app-store-line1 {
  font-size: 10.5px;
  letter-spacing: 0.04em;
  opacity: 0.85;
  text-transform: none;
}
.mkt-app-store-line2 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.mkt-hero-proof {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.84rem;
  color: var(--muted);
}

.mkt-hero-proof strong {
  color: var(--accent);
  font-weight: 700;
}

.mkt-proof-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted);
  opacity: 0.4;
  flex-shrink: 0;
}

/* ─── Features Bar ─── */
/* ONE surface, not two. This bar used to be a bordered, blurred, rounded
   .mkt-features-bar-inner sitting inside the bordered, blurred, rounded
   .marketing-section — and because the bar zeroed its own vertical padding
   the two rings ended up millimetres apart, reading as a double-drawn card.
   The section is the card; the chips are its content. */
.mkt-features-bar {
  padding-top: clamp(14px, 1.7vw, 20px) !important;
  padding-bottom: clamp(14px, 1.7vw, 20px) !important;
}

.mkt-features-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  /* No border / background / blur / radius here — see the note above. */
  padding: 0;
}

.mkt-feature-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  padding: 7px 14px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 15%, transparent);
  white-space: nowrap;
}

.mkt-feature-chip svg {
  color: var(--accent);
}

/* ─── Platform Showcase ─── */
.mkt-showcase {
  padding-top: 20px !important;
}

.mkt-showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 40px;
}

.mkt-showcase-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 24px;
  position: relative;
  /* Emil: specify exact properties (not `all`) + custom ease-out curve.
     Shorter on lift (snappy), slightly longer on shadow (smooths the depth). */
  transition: transform 220ms var(--ease-out), box-shadow 260ms var(--ease-out), border-color 200ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .mkt-showcase-card:hover {
    transform: translateY(-6px);
    box-shadow:
      0 20px 44px rgba(0,0,0,0.10),
      0 6px 16px rgba(0,0,0,0.04);
    border-color: color-mix(in srgb, var(--accent) 22%, var(--line));
  }
}

.mkt-showcase-card:active {
  transform: translateY(-2px) scale(0.995);
  transition-duration: 120ms;
}

.mkt-showcase-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--card-accent, var(--accent)) 15%, var(--bg));
  color: var(--card-accent, var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

/* ─── Showcase card variant with a real screenshot at the top ──────────
   Bigger card. Screenshot bleeds to the edges (no padding around it),
   a thin gradient accent line above it, then padded body below.
   Image zooms 1.02× on hover for that "alive" feel. */
.mkt-showcase-card-shot {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.mkt-showcase-shot {
  position: relative;
  background: var(--card-subtle-bg);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  /* Subtle gradient accent strip at the very top, tinted with the card accent */
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.mkt-showcase-shot::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg,
    transparent,
    color-mix(in srgb, var(--card-accent, var(--accent)) 80%, transparent),
    transparent);
  z-index: 2;
  pointer-events: none;
}
.mkt-showcase-shot img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
  border: 0;
  transition: transform 600ms var(--ease-out);
  will-change: transform;
}
@media (hover: hover) and (pointer: fine) {
  .mkt-showcase-card-shot:hover .mkt-showcase-shot img {
    transform: scale(1.025);
  }
}
.mkt-showcase-body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}
.mkt-showcase-card-shot h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text);
}
.mkt-showcase-card-shot > .mkt-showcase-body > p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 14px;
}
@media (max-width: 920px) {
  .mkt-showcase-shot { aspect-ratio: 16 / 9; }
}

.mkt-showcase-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text);
}

.mkt-showcase-card > p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 16px;
}

.mkt-card-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mkt-card-features li {
  font-size: 0.82rem;
  color: var(--text);
  padding-left: 18px;
  position: relative;
  line-height: 1.45;
}

.mkt-card-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
}

.mkt-card-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 50%, #8b5cf6));
  color: #fff;
  border-radius: 6px;
  padding: 3px 8px;
}

/* ═══════════════════════════════════════════════════════════════════════
   LIVE PREVIEW — bento grid of real app screenshots
   ─────────────────────────────────────────────────────────────────────
   Asymmetric grid: one hero tile that spans + four supporting tiles.
   Each tile is a soft card with the screenshot bleeding to the edge,
   the caption tucked at the bottom-left. Subtle hover lift via Emil's
   custom ease-out curve; image scales slightly inside its frame for
   that "alive" feel without moving the card around.
   ═══════════════════════════════════════════════════════════════════════ */
.mkt-preview {
  padding-top: 28px !important;
}
.mkt-preview-bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
  margin: 48px auto 0;
  max-width: 1280px;
}

/* Each tile = card chrome + image + caption */
.mkt-preview-tile {
  position: relative;
  margin: 0;
  background: var(--card-bg);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* Box shadow at rest — gentle lift, refined by hover */
  box-shadow:
    0 18px 38px -14px rgba(15, 32, 38, 0.12),
    0 4px 12px -4px rgba(15, 32, 38, 0.05);
  /* Emil: name properties, custom curve, slow-ish (360ms) for premium feel */
  transition:
    transform 360ms var(--ease-out),
    box-shadow 360ms var(--ease-out),
    border-color 240ms var(--ease-out);
  will-change: transform;
}
:root[data-theme="dark"] .mkt-preview-tile {
  box-shadow:
    0 24px 48px -16px rgba(0, 0, 0, 0.55),
    0 6px 16px -4px rgba(0, 0, 0, 0.28);
}

/* Tile-specific grid placement */
.mkt-preview-tile-hero {
  grid-column: span 4;
  grid-row: span 2;
}
.mkt-preview-tile-dark {
  grid-column: span 2;
}
.mkt-preview-tile-score {
  grid-column: span 2;
}
.mkt-preview-tile-jobs {
  grid-column: span 3;
}
.mkt-preview-tile-stack {
  grid-column: span 3;
}

/* The screenshot container — fixed aspect for predictable layout */
.mkt-preview-shot {
  position: relative;
  background: var(--card-subtle-bg);
  overflow: hidden;
  /* Subtle inner gradient mask at the bottom to softly fade into the caption */
  flex: 1 1 auto;
  min-height: 0;
}
.mkt-preview-shot img {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  object-fit: cover;
  object-position: top center;
  /* Image scale-in on hover — slower than the lift so it feels intentional */
  transition: transform 600ms var(--ease-out), filter 400ms var(--ease-out);
  will-change: transform;
}

/* Hero tile shows the full image at object-position top — others crop a bit */
.mkt-preview-tile-hero .mkt-preview-shot { min-height: 480px; }
.mkt-preview-tile-dark .mkt-preview-shot,
.mkt-preview-tile-score .mkt-preview-shot { min-height: 230px; }
.mkt-preview-tile-jobs .mkt-preview-shot,
.mkt-preview-tile-stack .mkt-preview-shot { min-height: 280px; }

/* Caption — bottom-left, on a soft cream/dark band */
.mkt-preview-cap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 22px 20px;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--card-bg) 88%, transparent),
    var(--card-bg) 60%);
  border-top: 1px solid color-mix(in srgb, var(--line) 50%, transparent);
}
.mkt-preview-cap-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
}
.mkt-preview-cap-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.45;
  display: block;
}

/* Hover: lift + softer shadow + slight image zoom — Emil: NEVER use scale(0)
   for entry/exit. Here we use scale(1.02) for hover so the image always has
   real proportions. Image zooms inside its frame; card itself only lifts. */
@media (hover: hover) and (pointer: fine) {
  .mkt-preview-tile:hover {
    transform: translateY(-6px);
    box-shadow:
      0 32px 64px -16px rgba(15, 32, 38, 0.18),
      0 10px 24px -6px rgba(15, 32, 38, 0.08);
    border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
  }
  :root[data-theme="dark"] .mkt-preview-tile:hover {
    box-shadow:
      0 44px 80px -16px rgba(0, 0, 0, 0.72),
      0 12px 28px -6px rgba(0, 0, 0, 0.4);
  }
  .mkt-preview-tile:hover .mkt-preview-shot img {
    transform: scale(1.025);
  }
}

/* :active — Emil principle: every pressable element scales slightly on press */
.mkt-preview-tile:active {
  transform: translateY(-2px) scale(0.995);
  transition-duration: 120ms;
}

/* Tablet — collapse hero to half-width and reshuffle */
@media (max-width: 1100px) {
  .mkt-preview-bento {
    grid-template-columns: repeat(4, 1fr);
  }
  .mkt-preview-tile-hero { grid-column: span 4; grid-row: span 1; }
  .mkt-preview-tile-dark,
  .mkt-preview-tile-score { grid-column: span 2; }
  .mkt-preview-tile-jobs,
  .mkt-preview-tile-stack { grid-column: span 2; }
  .mkt-preview-tile-hero .mkt-preview-shot { min-height: 360px; }
}

/* Mobile — single column stack */
@media (max-width: 700px) {
  .mkt-preview-bento {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .mkt-preview-tile-hero,
  .mkt-preview-tile-dark,
  .mkt-preview-tile-score,
  .mkt-preview-tile-jobs,
  .mkt-preview-tile-stack { grid-column: span 1; }
  .mkt-preview-tile-hero .mkt-preview-shot,
  .mkt-preview-tile-dark .mkt-preview-shot,
  .mkt-preview-tile-score .mkt-preview-shot,
  .mkt-preview-tile-jobs .mkt-preview-shot,
  .mkt-preview-tile-stack .mkt-preview-shot { min-height: 240px; }
  .mkt-preview-cap { padding: 14px 18px 16px; }
  .mkt-preview-cap-title { font-size: 0.88rem; }
}

/* Reduced motion — Emil: keep opacity for comprehension, kill movement */
@media (prefers-reduced-motion: reduce) {
  .mkt-preview-tile,
  .mkt-preview-shot img { transition: none; }
  .mkt-preview-tile:hover { transform: none; }
  .mkt-preview-tile:hover .mkt-preview-shot img { transform: none; }
}

/* ─── AI Features ─── */
.mkt-ai-section {
  padding-top: 20px !important;
  /* Need relative positioning so the absolute video sits BEHIND content */
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* Ambient background video — fills the section, dimmed, behind everything.
   The video itself is the iOS splash (1MB, 7s loop, 1080×1080 R-glow).
   Sits at z-index -1 inside the isolated stacking context so it never
   bleeds into adjacent sections.
   Three layered overlays:
     1. Radial soft-vignette to focus eyes on center content
     2. Bottom gradient fade to the section's normal background
     3. Top gradient fade for the kicker readability */
.mkt-ai-bg-video {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}
.mkt-ai-bg-video video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 110%;
  height: 110%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  /* Dimmed + slightly blurred so it reads as ambient texture, not a video
     that demands attention. */
  opacity: 0.22;
  filter: blur(1.5px) saturate(1.1);
}
:root[data-theme="light"] .mkt-ai-bg-video video {
  opacity: 0.18;
  filter: blur(1px) saturate(0.9) brightness(1.05);
}

/* Overlay tints: radial vignette + edge fades so content stays legible */
.mkt-ai-bg-video::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center,
      transparent 0%,
      color-mix(in srgb, var(--bg-1) 30%, transparent) 55%,
      color-mix(in srgb, var(--bg-1) 70%, transparent) 90%);
  pointer-events: none;
}
.mkt-ai-bg-video::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--bg-1) 40%, transparent) 0%,
      transparent 18%,
      transparent 82%,
      color-mix(in srgb, var(--bg-1) 40%, transparent) 100%);
  pointer-events: none;
}

/* Reduced motion: hide the video entirely (poster image still shows briefly
   via the underlying <video> poster attribute) — Emil/Apple principle */
@media (prefers-reduced-motion: reduce) {
  .mkt-ai-bg-video video,
  .mkt-workflow-bg-video video {
    display: none;
  }
}

/* On small screens, the videos aren't worth the bandwidth. */
@media (max-width: 720px) {
  .mkt-ai-bg-video video,
  .mkt-workflow-bg-video video {
    opacity: 0.12;
    filter: blur(3px);
  }
}

/* ─── Workflow section bg video (Three steps. One system.) ─────────────
   Same pattern as the AI section. 1080×720 H.264, 775KB, 7s loop.
   Slightly different overlay character — workflow video reads warmer
   so we pull more of the bg-1 vignette through for legibility. */
.mkt-workflow-section {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.mkt-workflow-bg-video {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}
.mkt-workflow-bg-video video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 110%;
  height: 110%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  opacity: 0.20;
  filter: blur(1.5px) saturate(1.05);
}
:root[data-theme="light"] .mkt-workflow-bg-video video {
  opacity: 0.16;
  filter: blur(1px) saturate(0.9) brightness(1.05);
}
.mkt-workflow-bg-video::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center,
      transparent 0%,
      color-mix(in srgb, var(--bg-1) 35%, transparent) 55%,
      color-mix(in srgb, var(--bg-1) 75%, transparent) 90%);
  pointer-events: none;
}
.mkt-workflow-bg-video::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--bg-1) 42%, transparent) 0%,
      transparent 18%,
      transparent 82%,
      color-mix(in srgb, var(--bg-1) 42%, transparent) 100%);
  pointer-events: none;
}

.mkt-ai-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 40px;
}

.mkt-ai-card {
  /* True glass effect — blurs the video behind it so text reads cleanly.
     Card bg uses a stronger color-mix (78% solid) so the video isn't
     bleeding through at full strength.
     backdrop-filter is what makes the actual frosted-glass effect.
     Border has a subtle inner highlight (top-edge) for that "glass shine". */
  background: color-mix(in srgb, var(--card-bg) 78%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  border-radius: 16px;
  padding: 24px 22px;
  /* Backdrop blur is the magic — frosts everything behind the card. */
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  backdrop-filter: blur(20px) saturate(1.6);
  /* Inner highlight at the top edge — mimics light bouncing off glass */
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #ffffff 12%, transparent),
    0 4px 16px rgba(0, 0, 0, 0.04);
  transition:
    border-color 200ms var(--ease-out),
    transform 220ms var(--ease-out),
    background 200ms var(--ease-out),
    box-shadow 220ms var(--ease-out);
}

:root[data-theme="light"] .mkt-ai-card {
  background: color-mix(in srgb, #ffffff 82%, transparent);
  border-color: color-mix(in srgb, var(--line) 70%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 4px 16px rgba(15, 32, 38, 0.04);
}

@media (hover: hover) and (pointer: fine) {
  .mkt-ai-card:hover {
    /* Slightly more opaque on hover — emphasizes the active card */
    background: color-mix(in srgb, var(--card-bg) 88%, transparent);
    border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
    transform: translateY(-3px);
    box-shadow:
      inset 0 1px 0 color-mix(in srgb, #ffffff 16%, transparent),
      0 14px 32px rgba(0, 0, 0, 0.08);
  }
  :root[data-theme="light"] .mkt-ai-card:hover {
    background: color-mix(in srgb, #ffffff 92%, transparent);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.8),
      0 14px 32px rgba(15, 32, 38, 0.08);
  }
}

.mkt-ai-card:active {
  transform: translateY(-1px) scale(0.99);
  transition-duration: 100ms;
}

.mkt-ai-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 50%, #8b5cf6));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.mkt-ai-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--text);
}

.mkt-ai-card p {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

/* ─── Job Board ─── */
.mkt-jobs-section {
  padding-top: 20px !important;
}

.mkt-jobs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.mkt-jobs-copy .mkt-section-title {
  text-align: left;
  /* Left-aligned in a half-width column — size down so it doesn't wrap
     to 4 lines. Apple's product detail headlines use ~40-48px here, not
     the 72px reserved for centered hero/section intros. */
  font-size: clamp(1.6rem, 3.2vw, 2.6rem);
  letter-spacing: -0.035em;
  line-height: 1.08;
}
/* Jobs section uses a non-centered intro — undo the global center alignment */
.mkt-jobs-section .marketing-section-intro,
.mkt-jobs-copy {
  text-align: left;
}

.mkt-jobs-copy .mkt-section-sub {
  text-align: left;
  margin: 0 0 24px;
}

.mkt-jobs-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mkt-jobs-features li {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
}

.mkt-jobs-features li strong {
  color: var(--accent);
}

.mkt-jobs-visual {
  display: flex;
  justify-content: center;
}

.mkt-jobs-mock {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mkt-jobs-mock-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  animation: mkt-card-slide 0.4s ease-out both;
  animation-delay: var(--delay, 0s);
}

@keyframes mkt-card-slide {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.mkt-jobs-mock-card div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mkt-jobs-mock-card strong {
  font-size: 0.9rem;
  color: var(--text);
}

.mkt-jobs-mock-card span {
  font-size: 0.76rem;
  color: var(--muted);
}

.mkt-jobs-mock-btn {
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  color: var(--accent) !important;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-radius: 8px;
  padding: 6px 12px;
  white-space: nowrap;
}

/* ─── Pricing ─── */
.mkt-pricing {
  padding-top: 20px !important;
}

.mkt-pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  max-width: 680px;
  margin: 40px auto 0;
}

.mkt-price-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.mkt-price-pro {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 8px 24px color-mix(in srgb, var(--accent) 15%, transparent);
}

.mkt-price-popular {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 50%, #8b5cf6));
  color: #fff;
  border-radius: 20px;
  padding: 4px 14px;
  white-space: nowrap;
}

.mkt-price-header h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--text);
}

.mkt-price-amount {
  margin: 0 0 20px;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.mkt-price-amount span:first-child {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.mkt-price-amount span:last-child {
  font-size: 0.85rem;
  color: var(--muted);
}

.mkt-price-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.mkt-price-features li {
  font-size: 0.85rem;
  color: var(--text);
  padding-left: 22px;
  position: relative;
  line-height: 1.45;
}

.mkt-price-features li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8rem;
}

.mkt-price-features li strong {
  color: var(--accent);
  font-weight: 700;
}

/* ─── Final CTA ─── */
/* ─── About page steps (horizontal) ─── */
.mkt-steps-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin-top: 36px;
}

.mkt-step-card {
  flex: 1;
  max-width: 240px;
  text-align: center;
  padding: 0 12px;
}

.mkt-step-card-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.mkt-step-num {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.06em;
  opacity: 0.5;
}

.mkt-step-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--step-color, var(--accent)), color-mix(in srgb, var(--step-color, var(--accent)) 60%, #1a1a2e));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px color-mix(in srgb, var(--step-color, var(--accent)) 25%, transparent);
}

.mkt-step-card h4 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.mkt-step-card p {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.mkt-step-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 42px;
  color: var(--muted);
  opacity: 0.25;
  flex-shrink: 0;
}

@media (max-width: 700px) {
  .mkt-steps-row {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }
  .mkt-step-card { max-width: 320px; }
  .mkt-step-connector {
    padding-top: 0;
    transform: rotate(90deg);
  }
}

/* ─── Social Proof ─── */
.mkt-social-proof {
  padding-top: 20px !important;
}

.mkt-stats-row {
  display: flex;
  justify-content: center;
  gap: 0;
  margin: 32px 0;
  flex-wrap: wrap;
}

.mkt-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 32px;
  position: relative;
}

.mkt-stat-item:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: var(--line);
}

.mkt-stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.mkt-stat-label {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}

.mkt-testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 8px;
}

.mkt-testimonial-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.12s, box-shadow 0.2s;
}

.mkt-testimonial-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.mkt-testimonial-stars {
  color: #f59e0b;
  font-size: 0.85rem;
  letter-spacing: 2px;
}

.mkt-testimonial-quote {
  font-size: 0.86rem;
  color: var(--text);
  line-height: 1.6;
  margin: 0;
  font-style: italic;
  opacity: 0.9;
}

.mkt-testimonial-author {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}

.mkt-testimonial-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 50%, #8b5cf6));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.mkt-testimonial-author strong {
  font-size: 0.82rem;
  color: var(--text);
  display: block;
  line-height: 1.3;
}

.mkt-testimonial-author span {
  font-size: 0.73rem;
  color: var(--muted);
}

@media (max-width: 900px) {
  .mkt-testimonials {
    grid-template-columns: 1fr;
  }
  .mkt-stat-item {
    padding: 12px 20px;
  }
}

.mkt-final-cta {
  padding-top: 20px !important;
  padding-bottom: 20px !important;
}

.mkt-final-cta-inner {
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}

.mkt-final-cta-inner h3 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 800;
  color: var(--text);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.mkt-final-cta-inner p {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0 0 24px;
  line-height: 1.6;
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .mkt-hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .mkt-hero-copy { max-width: 100%; }
  .mkt-hero-sub { max-width: 100%; }
  .mkt-hero-actions { justify-content: center; }
  .mkt-hero-proof { justify-content: center; }
  .marketing-product-window { display: none; }
  .mkt-hero-stat { padding: 0 14px; }
  .mkt-hero-stat-value { font-size: 1.1rem; }
  .mkt-showcase-grid { grid-template-columns: 1fr; }
  .mkt-ai-grid { grid-template-columns: 1fr; }
  .mkt-jobs-grid { grid-template-columns: 1fr; }
  .mkt-pricing-grid { grid-template-columns: 1fr; max-width: 400px; }
}

.jobs-mode-filter-group {
  margin-bottom: 0;
}

.jobs-mode-filter-label {
  margin: 0 0 8px;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.jobs-mode-toggle-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.jobs-mode-toggle {
  border: 1px solid var(--line);
  background: var(--card-subtle-bg);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 12px;
  min-height: 40px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.jobs-mode-toggle .button-icon {
  transition: transform 180ms ease;
}

.jobs-mode-toggle:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}

.jobs-mode-toggle:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 58%, #ffffff);
  outline-offset: 2px;
}

.jobs-mode-toggle.active {
  color: var(--accent-strong);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--accent) 24%, transparent),
    color-mix(in srgb, var(--accent-soft) 20%, transparent)
  );
  box-shadow: 0 10px 20px -18px color-mix(in srgb, var(--accent) 80%, transparent);
}

.jobs-mode-toggle.active .button-icon {
  transform: scale(1.08);
}

.jobs-location-suggestion-row {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.jobs-location-chip {
  border: 1px solid var(--line);
  background: var(--card-subtle-bg);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.jobs-location-chip:hover {
  background: var(--ghost-hover);
}

.jobs-location-chip.active {
  border-color: var(--accent);
  background: rgba(64, 196, 194, 0.17);
  color: var(--accent-strong);
}

.jobs-results-list {
  display: grid;
  gap: 10px;
}

/* ── Jobs pagination ── */
.jobs-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 4px 4px;
  gap: 12px;
  flex-wrap: wrap;
}

.jobs-pagination-info {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

.jobs-pagination-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.jobs-page-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  padding: 0;
}

.jobs-page-btn:hover:not(:disabled) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

.jobs-page-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.jobs-page-num {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0 6px;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  font-family: inherit;
}

.jobs-page-num:hover:not(.active) {
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  border-color: var(--line);
}

.jobs-page-num.active {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
  font-weight: 700;
}

.jobs-page-ellipsis {
  font-size: 0.82rem;
  color: var(--muted);
  padding: 0 2px;
  user-select: none;
}

.job-result-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: var(--card-subtle-bg);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.job-result-copy {
  min-width: 0;
}

.job-result-title {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.32;
}

.job-result-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.job-result-snippet {
  margin: 8px 0 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--ink);
}

.job-result-status-row {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.job-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.job-refyne-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 240;
  background:
    linear-gradient(180deg, rgba(4, 11, 15, 0.12), rgba(4, 11, 15, 0.62)),
    rgba(8, 17, 22, 0.56);
  backdrop-filter: blur(8px) saturate(1.04);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding:
    calc(18px + var(--safe-top))
    18px
    0;
  animation: backdropFadeIn 180ms ease-out both;
}

.job-refyne-sheet-backdrop.panel-scoped {
  inset: auto;
  padding: 0;
  border-radius: 20px;
  overflow: hidden;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
}

.job-refyne-sheet {
  display: flex;
  flex-direction: column;
  width: min(1024px, calc(100vw - 28px));
  height: min(86vh, 920px);
  max-height: calc(100dvh - var(--safe-top));
  border-radius: 18px 18px 0 0;
  border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--line));
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--accent) 5%, transparent),
      color-mix(in srgb, var(--accent) 2%, transparent) 14%,
      color-mix(in srgb, var(--card-bg) 98%, transparent)
    ),
    var(--card-bg);
  box-shadow:
    0 -24px 80px rgba(4, 12, 16, 0.46),
    0 -6px 24px rgba(7, 24, 31, 0.18);
  overflow: hidden;
  animation: jobRefyneSheetRise 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
  will-change: transform, opacity;
  transform-origin: center bottom;
}

.job-refyne-sheet-backdrop.panel-scoped .job-refyne-sheet {
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 18px;
  border-color: color-mix(in srgb, var(--accent) 14%, var(--line));
  box-shadow: none;
  animation: jobRefyneSheetRise 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.job-refyne-sheet-backdrop.panel-scoped .job-refyne-sheet-grabber {
  display: none;
}

.job-refyne-sheet-backdrop.panel-scoped .job-refyne-sheet-body {
  max-height: none;
}

.job-refyne-sheet-grabber {
  display: flex;
  justify-content: center;
  padding: 12px 20px 4px;
  user-select: none;
  -webkit-user-select: none;
}

.job-refyne-sheet-handle {
  display: block;
  width: 182px;
  max-width: calc(100% - 120px);
  height: 3px;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--muted) 35%, transparent),
      color-mix(in srgb, var(--accent) 36%, var(--muted)),
      color-mix(in srgb, var(--muted) 35%, transparent)
    );
  margin: 0;
  opacity: 0.88;
}

.job-refyne-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--accent) 4%, transparent),
      color-mix(in srgb, var(--card-subtle-bg) 66%, transparent)
    );
}

.job-refyne-sheet-copy {
  min-width: 0;
}

.job-refyne-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.job-refyne-head-actions .button {
  min-height: 44px;
}

.job-refyne-sheet-kicker {
  margin: 0 0 10px;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
}

.job-refyne-sheet-head h3 {
  margin: 0;
  font-size: clamp(1.9rem, 2.7vw, 2.8rem);
  line-height: 1.02;
}

.job-refyne-sheet-head .job-result-meta {
  margin-top: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--ink) 90%, var(--muted));
}

.job-refyne-sheet-close {
  flex-shrink: 0;
  width: 44px;
  min-width: 44px;
  padding: 0;
  border-radius: 12px;
}

.job-refyne-sheet-tabs {
  display: flex;
  gap: 0;
  padding: 0;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  background: transparent;
}

.job-refyne-sheet-tab {
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 0;
  padding: 11px 18px 10px;
  font-size: 0.98rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition:
    border-color 0.18s ease,
    color 0.18s ease,
    background 0.18s ease;
}

.job-refyne-sheet-tab:hover {
  color: var(--ink);
}

.job-refyne-sheet-tab.active {
  border-bottom-color: color-mix(in srgb, var(--accent) 82%, transparent);
  color: var(--ink);
  box-shadow: none;
  transform: none;
}

.job-refyne-sheet-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 10px 20px 22px;
  overflow-y: auto;
  max-height: calc(min(88vh, 940px) - 152px);
  overscroll-behavior: contain;
}

.job-refyne-sheet.is-dragging {
  transition: none !important;
}

.job-refyne-tab-panel {
  display: grid;
  gap: 14px;
}

.job-refyne-tab-shell {
  display: inline-flex;
  max-width: 100%;
  margin-bottom: 10px;
  padding: 0 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 10%, var(--line));
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--surface-elevated) 48%, transparent),
      color-mix(in srgb, var(--card-subtle-bg) 88%, transparent)
    );
}

.job-refyne-asset-card {
  border: none;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.job-refyne-preview-block {
  margin-top: 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 12%, var(--line));
  border-radius: 16px;
  padding: 14px;
  background: color-mix(in srgb, var(--accent) 5%, var(--card-subtle-bg));
}

.job-refyne-preview-block strong,
.job-refyne-preview-item strong,
.job-refyne-fix-item strong {
  display: block;
  margin: 0 0 4px;
}

.job-refyne-preview-block p,
.job-refyne-preview-item p,
.job-refyne-fix-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.job-refyne-preview-list,
.job-refyne-fix-list {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.job-refyne-preview-item,
.job-refyne-fix-item,
.job-refyne-blocked-card,
.job-refyne-inline-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: var(--card-subtle-bg);
}

.job-refyne-preview-item span,
.job-refyne-fix-item span {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.8rem;
}

.job-refyne-blocked-card strong {
  display: block;
  margin-bottom: 6px;
}

.job-refyne-blocked-card p,
.job-refyne-inline-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.job-refyne-inline-card strong {
  display: block;
  margin-bottom: 6px;
}

.job-refyne-option-list,
.job-refyne-actions,
.job-refyne-chip-row {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.job-refyne-export-actions {
  padding-top: 2px;
}

.job-refyne-resume-preview-shell {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.job-refyne-resume-preview-stage {
  max-height: min(62vh, 760px);
  overflow: auto;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--accent) 8%, var(--line));
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--surface-elevated) 24%, transparent),
      color-mix(in srgb, var(--surface-soft) 44%, transparent)
    ),
    radial-gradient(circle at 1px 1px, rgba(97, 130, 138, 0.16) 1px, transparent 0);
  background-size: auto, 14px 14px;
}

:root[data-theme="dark"] .job-refyne-resume-preview-stage {
  border-color: rgba(116, 157, 165, 0.24);
  background:
    linear-gradient(
      180deg,
      rgba(8, 20, 27, 0.96),
      rgba(10, 25, 32, 0.94)
    ),
    radial-gradient(circle at 1px 1px, rgba(124, 160, 168, 0.14) 1px, transparent 0);
  background-size: auto, 14px 14px;
}

.job-refyne-resume-preview-stage .resume-paper {
  width: min(100%, 760px);
  min-height: 0;
  padding: 38px;
  box-shadow: 0 18px 34px rgba(7, 21, 26, 0.2);
}

.job-refyne-cover-letter-preview,
.job-refyne-description {
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--accent) 4%, transparent),
      var(--card-subtle-bg)
    );
  padding: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.job-refyne-cover-letter-preview pre,
.job-refyne-description pre {
  margin: 0;
  white-space: pre-wrap;
  font: inherit;
  line-height: 1.62;
  color: var(--ink);
}

.job-refyne-description pre {
  max-height: min(44vh, 420px);
  overflow-y: auto;
  padding-right: 6px;
}

.job-refyne-description-inline {
  margin-top: 0;
}

.job-refyne-description-label {
  margin: 0 0 10px;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
}

.job-refyne-job-summary {
  margin-top: 0;
}

.job-refyne-resume-card {
  display: grid;
  gap: 14px;
}

.job-refyne-resume-body {
  display: grid;
  gap: 14px;
}

.job-refyne-primary-actions {
  align-items: center;
  gap: 12px;
  margin-top: 0;
}

.job-refyne-resume-panel {
  gap: 0;
}

.job-refyne-description-block {
  display: grid;
  gap: 8px;
}

.job-refyne-panel-label {
  margin: 0;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.job-refyne-description-block .job-refyne-description-inline {
  padding: 14px 16px;
  border-radius: 14px;
}

.job-refyne-description-copy {
  display: grid;
  gap: 12px;
  max-height: 148px;
  overflow-y: auto;
  padding-right: 6px;
}

.job-refyne-description-copy p {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.56;
}

.job-refyne-mode-menu {
  position: relative;
}

.job-refyne-mode-menu .tailor-menu-trigger {
  width: auto;
  min-width: 212px;
}

.job-refyne-mode-menu .tailor-menu-panel {
  min-width: 240px;
}

.job-refyne-inline-hint {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.job-refyne-inline-download {
  position: relative;
}

.job-refyne-download-trigger {
  min-width: 138px;
}

.job-refyne-resume-note {
  margin-top: 2px;
}

.job-refyne-job-copy {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.job-refyne-job-copy p {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card-subtle-bg);
  padding: 12px;
}

.job-refyne-job-copy strong {
  display: block;
  margin-bottom: 4px;
}

.job-refyne-job-copy span {
  color: var(--muted);
  line-height: 1.45;
}

.job-workspace-status-chips {
  margin: 10px 0 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.job-workspace-list {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.job-workspace-list-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: var(--card-subtle-bg);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.job-workspace-list-item.active {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 14px 30px -26px color-mix(in srgb, var(--accent) 75%, transparent);
  transform: translateY(-1px);
}

.job-workspace-list-copy {
  min-width: 0;
}

.job-workspace-list-flags {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.job-workspace-list-flags .profile-admin-chip {
  color: var(--accent-strong);
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, var(--card-subtle-bg));
}

.job-workspace-list-flags .profile-admin-chip.muted {
  color: var(--muted);
  border-color: var(--line);
  background: var(--card-subtle-bg);
}

.job-workspace-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--line));
  border-radius: 16px;
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--accent) 12%, transparent),
      color-mix(in srgb, var(--card-subtle-bg) 88%, transparent)
    ),
    var(--card-subtle-bg);
}

.job-workspace-hero h3 {
  margin: 0;
  font-size: 1.04rem;
  line-height: 1.3;
}

.job-workspace-hero-copy {
  min-width: 0;
}

.job-workspace-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.job-workspace-score-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.job-workspace-score-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: var(--card-subtle-bg);
}

.job-workspace-snapshot-panel {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--card-subtle-bg) 94%, transparent),
    color-mix(in srgb, var(--accent) 5%, transparent)
  );
}

.job-workspace-snapshot-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.profile-empty {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.paywall-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(8, 17, 22, 0.62);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding:
    calc(20px + var(--safe-top))
    14px
    calc(20px + var(--safe-bottom));
  animation: backdropFadeIn 180ms ease-out both;
}

.paywall-panel {
  width: min(920px, 100%);
  max-height: min(92vh, 980px);
  overflow: auto;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.8), rgba(232, 248, 244, 0.6));
  box-shadow:
    0 24px 48px rgba(5, 14, 18, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px) saturate(1.06);
  padding: 18px;
}

:root[data-theme="dark"] .paywall-panel {
  border-color: rgba(131, 198, 187, 0.3);
  background: linear-gradient(145deg, rgba(22, 25, 27, 0.62), rgba(15, 18, 20, 0.58));
  box-shadow:
    0 24px 50px rgba(2, 9, 12, 0.56),
    inset 0 1px 0 rgba(166, 222, 212, 0.16);
}

.paywall-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.paywall-copy {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

/* BILL-08: Reactivate banner for canceled subs. */
.paywall-reactivate-banner {
  margin: 14px 0 0;
  padding: 14px 16px;
  border-radius: 16px;
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--border));
  background: color-mix(in srgb, var(--accent) 6%, var(--panel));
  box-shadow: 0 8px 22px -16px color-mix(in srgb, var(--accent) 35%, transparent);
}
.paywall-reactivate-banner.expired {
  border-color: color-mix(in srgb, #ef4444 36%, var(--border));
  background: color-mix(in srgb, #ef4444 7%, var(--panel));
  box-shadow: 0 8px 22px -16px color-mix(in srgb, #ef4444 40%, transparent);
}
.paywall-reactivate-icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
}
.paywall-reactivate-banner.expired .paywall-reactivate-icon { color: #ef4444; }
.paywall-reactivate-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.88rem;
  line-height: 1.4;
  min-width: 0;
}
.paywall-reactivate-copy strong {
  font-weight: 600;
  color: var(--text);
}
.paywall-reactivate-copy span {
  color: var(--muted);
}
.paywall-reactivate-cta {
  white-space: nowrap;
  transition: transform 160ms ease-out;
  /* MOBILE (qa-mobile): drop below 44px violated Apple HIG. Force min
     height so the tap target is never below the threshold regardless
     of whether `.button` modifiers are applied at the React layer. */
  min-height: 44px;
}
.paywall-reactivate-cta:active { transform: scale(0.97); }
@media (max-width: 540px) {
  .paywall-reactivate-banner {
    grid-template-columns: 22px 1fr;
    grid-template-rows: auto auto;
    /* MOBILE (qa-mobile): icon must align with the FIRST text line, not
     the vertical center of a multi-line copy block (large Dynamic Type
     can wrap the copy to 4–5 lines). */
    align-items: start;
  }
  .paywall-reactivate-icon {
    margin-top: 2px;
  }
  .paywall-reactivate-cta {
    grid-column: 1 / -1;
    justify-self: stretch;
  }
}

.billing-toggle {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.billing-pill {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-subtle-bg);
  color: var(--ink);
  text-align: left;
  font-family: inherit;
  padding: 10px 12px;
  min-height: 58px;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.billing-pill:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.billing-pill.active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
  background: rgba(23, 98, 103, 0.08);
}

:root[data-theme="dark"] .billing-pill.active {
  background: rgba(76, 183, 180, 0.15);
}

.billing-pill-title {
  display: block;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 800;
}

.billing-pill-price {
  display: block;
  margin-top: 4px;
  font-size: 16px;
  font-weight: 800;
}

.paywall-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.plan-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: var(--card-subtle-bg);
  display: grid;
  gap: 10px;
}

.plan-card.active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.plan-card.pro {
  background: linear-gradient(145deg, rgba(23, 98, 103, 0.1), rgba(23, 98, 103, 0.02));
}

:root[data-theme="dark"] .plan-card.pro {
  background: linear-gradient(145deg, rgba(76, 183, 180, 0.16), rgba(76, 183, 180, 0.04));
}

.plan-name {
  margin: 0;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-weight: 800;
}

.plan-price {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1.1;
}

.plan-price span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}

.plan-feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.plan-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 0.86rem;
  line-height: 1.35;
}

.paywall-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.ai-review-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300; /* above iOS bottom nav (z 250) */
  background: rgba(6, 18, 24, 0.72);
  backdrop-filter: blur(10px) saturate(1.05);
  -webkit-backdrop-filter: blur(10px) saturate(1.05);
  display: grid;
  place-items: end center; /* anchor sheet to bottom on mobile */
  padding: 0;
  animation: backdropFadeIn 200ms ease-out both;
}

/* ═══════════════════════════════════════════════════════════════════════
   AI Review — proper iOS-style bottom sheet:
   - Rounded top corners, flush to bottom on mobile (native feel)
   - Fixed header, scrolling body, fixed footer
   - overscroll-behavior: contain → background never scrolls
   - Safe-area aware bottom padding
   - Centered modal on desktop (>720px)
   ═══════════════════════════════════════════════════════════════════════ */
.ai-review-panel.ai-review-sheet {
  width: 100%;
  max-width: 760px;
  height: 92vh;
  max-height: 92vh;
  border-radius: 28px 28px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: none;
  background: linear-gradient(180deg, rgba(32, 42, 58, 0.99), rgba(18, 28, 42, 0.99));
  box-shadow:
    0 -14px 60px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px) saturate(1.1);
  -webkit-backdrop-filter: blur(24px) saturate(1.1);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden; /* contains the sticky header/footer, body does own scroll */
  animation: ai-review-sheet-in 380ms cubic-bezier(0.22, 1.2, 0.36, 1) both;
}

/* Desktop: float centered with rounded corners all around */
@media (min-width: 720px) {
  .ai-review-backdrop {
    place-items: center;
    padding: calc(24px + var(--safe-top, 0px)) 20px calc(24px + var(--safe-bottom, 0px));
  }
  .ai-review-panel.ai-review-sheet {
    max-width: 900px;
    height: min(88vh, 900px);
    border-radius: 26px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }
}

@keyframes ai-review-sheet-in {
  from { transform: translateY(36px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* iOS-style grab handle at the top of the sheet */
.ai-review-grabber {
  width: 36px;
  height: 4.5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  margin: 8px auto 2px;
  flex-shrink: 0;
}

/* ─── Sticky header ─── */
.ai-review-sheet-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(32, 42, 58, 0.98), rgba(32, 42, 58, 0.92));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.ai-review-sheet-header-copy {
  min-width: 0;
  flex: 1;
}

.ai-review-sheet-header .ai-review-kicker {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(94, 202, 197, 0.9);
}

.ai-review-sheet-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-review-sheet-close {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  font-size: 22px;
  line-height: 1;
  font-weight: 400;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  font-family: inherit;
  transition: background 150ms ease, transform 100ms ease;
}

.ai-review-sheet-close:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.14);
}

/* ─── Scrollable body (THE ONLY scrolling container) ─── */
.ai-review-sheet-body {
  flex: 1;
  min-height: 0; /* critical for flex child to be scrollable */
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain; /* stops scroll from bubbling to <body> */
  overscroll-behavior-y: contain;
  padding: 16px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  /* A little momentum feel on iOS */
  scroll-behavior: smooth;
}

.ai-review-sheet-body .ai-review-copy {
  margin: 0 0 4px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.5;
}

/* ─── Sticky footer ─── */
.ai-review-sheet-footer {
  flex-shrink: 0;
  padding: 14px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(32, 42, 58, 0.92), rgba(18, 28, 42, 0.99));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ai-review-sheet-footer .ai-review-footer-note {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

.ai-review-sheet-footer .ai-review-actions {
  display: flex;
  gap: 10px;
}

.ai-review-footer-btn {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  border-radius: 14px;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: transform 100ms ease, box-shadow 150ms ease, opacity 150ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: -0.01em;
}

.ai-review-footer-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.ai-review-footer-btn-ghost {
  flex: 0 0 auto;
  min-width: 100px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.ai-review-footer-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.ai-review-footer-btn-primary {
  flex: 1;
  background: linear-gradient(135deg, #5ecac5, #4f8cff, #8b5cf6);
  color: white;
  box-shadow:
    0 8px 22px rgba(94, 202, 197, 0.4),
    0 3px 10px rgba(139, 92, 246, 0.3);
}

.ai-review-footer-btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

/* Body class set when AI review is open — belt-and-suspenders lock */
body.ai-review-open {
  overflow: hidden !important;
  touch-action: none;
}

/* Paywall subscription details block — required by Apple 3.1.2(c) */
.paywall-subscription-details {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.paywall-subscription-summary {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
}

.paywall-subscription-summary strong {
  color: #ffffff;
  font-weight: 700;
}

.paywall-subscription-details .paywall-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.55);
}

.paywall-legal-links {
  margin: 4px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.paywall-legal-links a {
  color: #5ecac5;
  text-decoration: underline;
  font-weight: 600;
  cursor: pointer;
}

.paywall-legal-links a:hover {
  color: #7ed8d2;
}

.paywall-legal-sep {
  opacity: 0.35;
  user-select: none;
}

/* Light-mode adjustments for paywall subscription details */
@media (prefers-color-scheme: light) {
  .paywall-subscription-details {
    background: rgba(10, 30, 40, 0.04);
    border-color: rgba(10, 30, 40, 0.08);
  }
  .paywall-subscription-summary {
    color: rgba(20, 40, 55, 0.9);
  }
  .paywall-subscription-summary strong {
    color: #0b1a28;
  }
  .paywall-subscription-details .paywall-note {
    color: rgba(20, 40, 55, 0.65);
  }
  .paywall-legal-links {
    color: rgba(20, 40, 55, 0.7);
  }
  .paywall-legal-links a {
    color: #2a8f88;
  }
}

/* Inline Cancel button for the cover-letter / ATS / Refyne progress bar */
.ai-progress-meta-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.ai-progress-cancel {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(255, 120, 120, 0.3);
  background: rgba(255, 120, 120, 0.1);
  color: #ff7a7a;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 150ms ease, transform 100ms ease;
}

.ai-progress-cancel:hover {
  background: rgba(255, 120, 120, 0.18);
}

.ai-progress-cancel:active {
  transform: scale(0.94);
}

/* ═══════════════════════════════════════════════════════════════════════
   Floating AI cancel dock — appears during Refyne / Humanize / ATS / Cover
   Letter runs with a status label, elapsed timer, and a Cancel button that
   aborts the in-flight fetch. Positioned above the chat composer + nav.
   ═══════════════════════════════════════════════════════════════════════ */
.refyne-cancel-dock {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 24px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2147483641;
  width: min(520px, calc(100vw - 32px));
  pointer-events: none;
  animation: refyne-cancel-dock-in 360ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.refyne-cancel-dock-body {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 10px 12px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(22, 30, 46, 0.96), rgba(14, 20, 32, 0.96));
  border: 1px solid rgba(94, 202, 197, 0.3);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(94, 202, 197, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  pointer-events: auto;
}

.refyne-cancel-dock-spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
  background:
    conic-gradient(from 0deg,
      rgba(94, 202, 197, 0) 0%,
      rgba(94, 202, 197, 0.9) 20%,
      rgba(79, 140, 255, 1) 45%,
      rgba(139, 92, 246, 1) 70%,
      rgba(94, 202, 197, 0) 100%);
  animation: refyne-cancel-dock-spin 1.1s linear infinite;
  position: relative;
}

.refyne-cancel-dock-spinner::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #0e1420;
}

.refyne-cancel-dock-text {
  flex: 1;
  min-width: 0;
}

.refyne-cancel-dock-label {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.refyne-cancel-dock-timer {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.refyne-cancel-dock-btn {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(255, 120, 120, 0.28);
  background: rgba(255, 120, 120, 0.08);
  color: #ff7a7a;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
  letter-spacing: 0.01em;
  transition: background 150ms ease, border-color 150ms ease, transform 100ms ease;
}

.refyne-cancel-dock-btn:hover {
  background: rgba(255, 120, 120, 0.14);
  border-color: rgba(255, 120, 120, 0.4);
}

.refyne-cancel-dock-btn:active {
  transform: scale(0.95);
}

@keyframes refyne-cancel-dock-in {
  from { opacity: 0; transform: translateX(-50%) translateY(14px) scale(0.95); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0)    scale(1); }
}

@keyframes refyne-cancel-dock-spin {
  to { transform: rotate(360deg); }
}

/* Light-mode adjustments */
@media (prefers-color-scheme: light) {
  .refyne-cancel-dock-body {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 253, 0.98));
    border-color: rgba(94, 202, 197, 0.4);
  }
  .refyne-cancel-dock-label { color: #0b1628; }
  .refyne-cancel-dock-timer { color: rgba(30, 40, 60, 0.55); }
  .refyne-cancel-dock-spinner::before { background: #ffffff; }
}

/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .refyne-cancel-dock,
  .refyne-cancel-dock-spinner {
    animation: none;
  }
}

/* Lift above the iOS bottom nav + chat composer on native */
.native-shell .refyne-cancel-dock {
  bottom: calc(env(safe-area-inset-bottom, 0px) + 170px);
}

/* ═══════════════════════════════════════════════════════════════════════
   Swipe-to-delete row (Gmail / iOS Mail style)
   - Wrapper contains the delete action (absolute right) and content (top)
   - Content translates left to reveal delete underneath
   - On "triggerDelete", content slides off-screen AND height collapses
   ═══════════════════════════════════════════════════════════════════════ */
.swipe-row {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  /* Reserves space; collapses on delete */
  max-height: 200px;
  opacity: 1;
  transition:
    max-height 320ms cubic-bezier(0.4, 0, 0.2, 1) 60ms,
    opacity 260ms ease-in 80ms,
    margin 280ms cubic-bezier(0.4, 0, 0.2, 1) 80ms;
}

.swipe-row.is-collapsing {
  max-height: 0;
  opacity: 0;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  pointer-events: none;
}

.swipe-row-delete {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 88px;
  background: linear-gradient(135deg, #ff5a5a, #e23e3e);
  border: none;
  color: white;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  box-shadow: inset 2px 0 6px rgba(0, 0, 0, 0.18);
  transition: filter 150ms ease;
  letter-spacing: 0.02em;
}

.swipe-row-delete:active {
  filter: brightness(1.1);
}

.swipe-row-delete-icon {
  font-size: 22px;
  line-height: 1;
}

.swipe-row-delete-label {
  font-size: 12px;
  letter-spacing: 0.02em;
}

.swipe-row-content {
  position: relative;
  z-index: 1;
  background: inherit;
  /* Ensures the card visually covers the delete action when closed */
  will-change: transform;
  touch-action: pan-y; /* allow vertical page scroll to work normally */
}

/* When a row wraps a button, make sure the inner button stays full-width
   and the hover/active state still works */
.native-library-swipe {
  background: transparent;
  margin-bottom: 0;
}

.native-library-swipe .swipe-row-content {
  background: inherit;
  border-radius: inherit;
}

.native-library-swipe .native-library-item {
  width: 100%;
  border-radius: 14px;
}

/* Slightly more subtle style when snapped open — hints user to tap delete */
.swipe-row.is-open .native-library-item {
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.18);
}

/* Reduced motion: disable animations, keep delete revealable via tap */
@media (prefers-reduced-motion: reduce) {
  .swipe-row,
  .swipe-row.is-collapsing,
  .swipe-row-content {
    transition-duration: 100ms !important;
  }
}

:root[data-theme="dark"] .ai-review-panel {
  border-color: rgba(131, 198, 187, 0.28);
  background: linear-gradient(145deg, rgba(22, 25, 27, 0.66), rgba(15, 18, 20, 0.6));
  box-shadow:
    0 28px 58px rgba(2, 8, 11, 0.58),
    inset 0 1px 0 rgba(166, 222, 212, 0.14);
}

.ai-review-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.ai-review-kicker {
  margin: 0 0 6px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.ai-review-head h2 {
  margin: 0;
  font-size: clamp(1.55rem, 2vw, 2rem);
  line-height: 1.04;
  color: var(--ink);
}

.ai-review-copy {
  margin: 8px 0 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.48;
}

.ai-review-toolbar {
  display: grid;
  gap: 12px;
}

.ai-review-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.ai-review-stats > div {
  min-width: 170px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.5);
  padding: 12px 14px;
}

:root[data-theme="dark"] .ai-review-stats > div {
  background: rgba(255, 255, 255, 0.04);
}

.ai-review-stat-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.ai-review-stats strong {
  display: block;
  margin-top: 4px;
  font-size: 1.25rem;
  color: var(--ink);
}

.ai-review-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ai-review-metric-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid rgba(73, 143, 140, 0.24);
  background: rgba(64, 176, 170, 0.12);
  color: var(--text);
  padding: 8px 12px;
  font-size: 0.82rem;
}

.ai-review-metric-pill strong {
  color: var(--ink);
}

.ai-review-section-list {
  display: grid;
  gap: 14px;
}

.ai-review-section-card {
  border: 1px solid rgba(73, 143, 140, 0.18);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.5);
  padding: 16px;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    opacity 140ms ease,
    transform 140ms ease;
}

:root[data-theme="dark"] .ai-review-section-card {
  background: rgba(255, 255, 255, 0.03);
}

.ai-review-section-card.selected {
  border-color: rgba(79, 193, 188, 0.36);
  box-shadow:
    0 14px 30px rgba(5, 16, 19, 0.12),
    inset 0 0 0 1px rgba(79, 193, 188, 0.16);
}

.ai-review-section-card.muted {
  opacity: 0.82;
}

.ai-review-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.ai-review-section-copy {
  min-width: 0;
}

.ai-review-section-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.ai-review-section-title-row h3 {
  margin: 0;
  font-size: 1.06rem;
  color: var(--ink);
}

.ai-review-section-state {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(142, 167, 175, 0.3);
  background: rgba(255, 255, 255, 0.56);
  color: var(--muted);
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 700;
}

:root[data-theme="dark"] .ai-review-section-state {
  background: rgba(255, 255, 255, 0.05);
}

.ai-review-section-state.selected {
  border-color: rgba(79, 193, 188, 0.34);
  background: rgba(67, 192, 185, 0.14);
  color: var(--ink);
}

.ai-review-section-copy p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.ai-review-compare {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.ai-review-column {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(248, 251, 252, 0.72);
  padding: 14px;
  min-width: 0;
}

:root[data-theme="dark"] .ai-review-column {
  background: rgba(7, 24, 28, 0.72);
}

.ai-review-column.ai {
  border-color: rgba(79, 193, 188, 0.3);
  box-shadow: inset 0 0 0 1px rgba(79, 193, 188, 0.12);
}

.ai-review-column-label {
  margin: 0 0 12px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.ai-review-entry + .ai-review-entry {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(124, 151, 158, 0.18);
}

.ai-review-entry-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ai-review-entry-head strong {
  color: var(--ink);
}

.ai-review-entry-head span {
  color: var(--muted);
  font-size: 0.84rem;
}

.ai-review-entry-text {
  margin: 8px 0 0;
  color: var(--text);
  line-height: 1.55;
  white-space: pre-wrap;
}

.ai-review-bullet-list {
  margin: 10px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--text);
}

.ai-review-bullet-list li {
  line-height: 1.5;
}

.ai-review-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.ai-review-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(23, 98, 103, 0.1);
  color: var(--ink);
  padding: 7px 10px;
  font-size: 0.8rem;
  font-weight: 600;
}

.ai-review-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.ai-review-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}

.ai-review-footer-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.ai-review-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.template-card {
  position: relative;
}

.template-hint {
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.template-palette-panel {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--card-subtle-bg) 82%, transparent);
}

.template-palette-panel.studio {
  margin: 0;
}

.template-palette-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.template-palette-title {
  margin: 0;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.template-palette-status {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.template-palette-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.template-palette-swatch {
  position: relative;
  overflow: hidden;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  background:
    radial-gradient(circle at 28% 28%, rgba(255, 255, 255, 0.5), transparent 42%),
    conic-gradient(
      from 200deg,
      var(--swatch-accent) 0deg,
      color-mix(in srgb, var(--swatch-accent) 68%, white) 130deg,
      color-mix(in srgb, var(--swatch-text) 72%, white) 250deg,
      var(--swatch-text) 360deg
    );
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.22),
    0 8px 18px rgba(7, 23, 29, 0.12);
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.template-palette-swatch::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background:
    radial-gradient(circle at 30% 26%, rgba(255, 255, 255, 0.5), transparent 35%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), transparent 52%);
  opacity: 0.92;
}

.template-palette-swatch::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: inherit;
  background: color-mix(in srgb, var(--swatch-text) 56%, transparent);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22);
  opacity: 0.92;
}

.template-palette-swatch:hover {
  transform: translateY(-1px) scale(1.04);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.28),
    0 12px 22px rgba(7, 23, 29, 0.18);
}

.template-palette-swatch.active {
  border-color: var(--swatch-accent);
  box-shadow:
    0 0 0 2px var(--bg),
    0 0 0 4px var(--swatch-accent),
    0 14px 26px rgba(7, 23, 29, 0.2);
  animation: paletteSwatchPulse 560ms ease-out;
}

.template-palette-swatch.active::before {
  background:
    radial-gradient(circle at 30% 26%, rgba(255, 255, 255, 0.72), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.28), transparent 56%);
}

@keyframes paletteSwatchPulse {
  0% {
    transform: scale(0.94);
  }
  55% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

.template-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.template-option {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
  border-radius: 12px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--surface-elevated) 92%, white),
    color-mix(in srgb, var(--card-subtle-bg) 92%, white)
  );
  color: var(--ink);
  text-align: left;
  font-family: inherit;
  padding: 11px;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    color 0.18s ease;
}

.template-option::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 14%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 36%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 52%);
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}

.template-option .template-name,
.template-option .template-desc,
.template-option .template-lock-pill {
  position: relative;
  z-index: 1;
  transition:
    color 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease;
}

.template-option:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  box-shadow: 0 12px 22px rgba(12, 32, 38, 0.08);
}

.template-option:hover::before {
  opacity: 1;
}

.template-option.active {
  border-color: color-mix(in srgb, var(--accent) 76%, transparent);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--accent) 72%, transparent),
    0 12px 24px rgba(12, 34, 40, 0.08);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-elevated));
}

:root[data-theme="light"] .template-option:hover,
:root[data-theme="light"] .template-option.active {
  color: var(--accent-contrast);
  border-color: color-mix(in srgb, var(--accent) 72%, transparent);
  background:
    linear-gradient(
      145deg,
      color-mix(in srgb, var(--accent) 84%, #2d5d66),
      color-mix(in srgb, var(--accent) 68%, #193a44)
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 14px 30px rgba(15, 52, 63, 0.18);
}

:root[data-theme="light"] .template-option:hover .template-name,
:root[data-theme="light"] .template-option.active .template-name {
  color: var(--accent-contrast);
}

:root[data-theme="light"] .template-option:hover .template-desc,
:root[data-theme="light"] .template-option.active .template-desc {
  color: color-mix(in srgb, var(--accent-contrast) 82%, transparent);
}

:root[data-theme="light"] .template-option:hover .template-lock-pill,
:root[data-theme="light"] .template-option.active .template-lock-pill {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.14);
  color: var(--accent-contrast);
}

:root[data-theme="dark"] .template-option.active {
  background: rgba(76, 183, 180, 0.14);
}

.template-option.locked {
  border-style: dashed;
}

.template-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.template-lock-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 0.64rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid rgba(23, 98, 103, 0.42);
  background: rgba(23, 98, 103, 0.1);
  color: var(--accent-strong);
}

:root[data-theme="dark"] .template-lock-pill {
  border-color: rgba(141, 224, 214, 0.45);
  background: rgba(76, 183, 180, 0.17);
  color: #a4ebe2;
}

.template-name {
  display: block;
  font-size: 16px;
  font-weight: 800;
}

.template-desc {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

label {
  display: block;
  margin-bottom: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--label);
  line-height: 1.35;
}

input,
textarea,
select {
  margin-top: 6px;
  width: 100%;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
  padding: 11px 13px;
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--input-text);
  background: linear-gradient(180deg, color-mix(in srgb, var(--input-bg) 96%, white 4%), var(--input-bg));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background-color 0.16s ease;
}

input,
select {
  min-height: 48px;
}

input::placeholder,
textarea::placeholder {
  color: var(--placeholder);
}

input:hover,
textarea:hover,
select:hover {
  border-color: color-mix(in srgb, var(--accent) 24%, var(--line));
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 78%, var(--line));
  box-shadow:
    0 0 0 3px var(--focus-ring),
    0 8px 18px color-mix(in srgb, var(--accent) 10%, transparent);
  background: color-mix(in srgb, var(--input-bg) 94%, var(--surface-elevated));
}

textarea {
  resize: vertical;
  min-height: 120px;
}

input:disabled,
textarea:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  background: color-mix(in srgb, var(--input-bg) 78%, var(--card-subtle-bg));
}

.grid.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.grid.one {
  display: grid;
  gap: 10px;
}

.stack-list {
  display: grid;
  gap: 10px;
}

.entry-card {
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-elevated) 82%, transparent), color-mix(in srgb, var(--card-subtle-bg) 88%, transparent));
  padding: 12px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.entry-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(var(--accent), transparent);
  opacity: 0.6;
}

.entry-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 8px;
}

.entry-top h3 {
  margin: 0;
  font-size: 0.92rem;
}

/* DRAG-REORDER: left-side cluster with drag handle + role label, and a
   right-side cluster with move/remove buttons. */
.entry-top-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.entry-top-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* Drag handle — minimal grip icon to the left of the entry title. */
.entry-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: none;
  padding: 0;
  background: transparent;
  color: color-mix(in srgb, var(--text) 45%, transparent);
  cursor: grab;
  transition: background-color 140ms ease-out, color 140ms ease-out;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
}
.entry-drag-handle:hover {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--text);
}
.entry-drag-handle:active {
  cursor: grabbing;
}
.entry-drag-handle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* Up/down move buttons — compact icon-only. */
.entry-move-btn {
  min-height: 32px;
  min-width: 32px;
  padding: 4px 6px;
}
.entry-move-btn .button-icon {
  width: 14px;
  height: 14px;
}
.button.icon-only .button-content {
  gap: 0;
}

/* Dragging + drop-target visual feedback. */
.entry-card.is-dragging {
  opacity: 0.45;
  transform: scale(0.985);
  transition: opacity 120ms ease-out, transform 120ms ease-out;
}
.entry-card.is-drop-target {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.entry-card.is-drop-target::before {
  opacity: 1;
  width: 4px;
}

/* On narrow mobile, the up/down + remove buttons can crowd the title;
   keep the layout but allow the actions row to wrap if needed. */
@media (max-width: 480px) {
  .entry-top {
    flex-wrap: wrap;
  }
  .entry-top-actions {
    margin-left: auto;
  }
}

.tailor-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin: 20px 0 0;
  position: relative;
  z-index: 40;
}

@keyframes aiRainbowShift {
  0% {
    background-position:
      0% 50%,
      0% 50%;
  }
  100% {
    background-position:
      0% 50%,
      220% 50%;
  }
}

@keyframes aiActionGlowPulse {
  0% {
    opacity: 0.42;
    transform: scale(0.985);
  }
  50% {
    opacity: 0.88;
    transform: scale(1.02);
  }
  100% {
    opacity: 0.42;
    transform: scale(0.985);
  }
}

.ai-tailor-card {
  position: relative;
  overflow: visible;
  isolation: isolate;
}

.ai-tailor-card::before {
  content: "";
  position: absolute;
  inset: -40% -30% auto -30%;
  height: 58%;
  pointer-events: none;
  background: linear-gradient(
    120deg,
    rgba(66, 133, 244, 0.08),
    rgba(52, 168, 83, 0.07),
    rgba(251, 188, 5, 0.08),
    rgba(234, 67, 53, 0.07),
    rgba(66, 133, 244, 0.08)
  );
  filter: blur(18px);
  background-size: 240% 240%;
  animation: aiRainbowShift 8s linear infinite paused;
  opacity: 0.3;
  transition: opacity 0.24s ease;
}

.ai-tailor-card:hover::before {
  animation-play-state: running;
  opacity: 0.48;
}

.ai-tailor-card > * {
  position: relative;
}

.ai-tailor-card.ai-action-active::before,
.cover-letter-card.ai-action-active::before {
  animation-play-state: running;
  opacity: 0.92;
}

.ai-tailor-card.ai-action-active,
.cover-letter-card.ai-action-active {
  border-color: rgba(87, 184, 198, 0.78);
  box-shadow:
    0 0 0 1px rgba(109, 212, 214, 0.48),
    0 14px 30px rgba(7, 35, 44, 0.28),
    0 0 22px rgba(71, 182, 199, 0.28);
}

.ai-tailor-card.ai-action-active::after,
.cover-letter-card.ai-action-active::after {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: calc(var(--radius) + 16px);
  background:
    radial-gradient(circle at 16% 18%, rgba(66, 133, 244, 0.26), transparent 34%),
    radial-gradient(circle at 80% 20%, rgba(52, 168, 83, 0.22), transparent 30%),
    radial-gradient(circle at 22% 82%, rgba(251, 188, 5, 0.18), transparent 28%),
    radial-gradient(circle at 84% 78%, rgba(234, 67, 53, 0.18), transparent 26%),
    radial-gradient(circle at 50% 50%, rgba(92, 206, 219, 0.22), transparent 52%);
  pointer-events: none;
  z-index: -1;
  filter: blur(18px);
  transform-origin: center;
  animation: aiActionGlowPulse 2.6s ease-in-out infinite;
}

.builder-textarea-field {
  display: grid;
  gap: 10px;
}

.field-label {
  font-weight: 700;
  color: var(--label);
}

.field-helper {
  margin-top: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  max-width: 46ch;
}

/* Inline label suffix (e.g. "— optional"). Muted weight so it doesn't
   compete with the field label, but readable enough to set expectations. */
.label-hint {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.85em;
  margin-left: 4px;
}

/* ─── Inline field tooltip ──────────────────────────────────────────────
   Tiny "i" badge next to a label that reveals a tooltip on hover/focus/tap.
   - Wrapper is inline so it sits beside the label text
   - Button toggles tooltip visibility on TAP (mobile/iOS) via :focus
   - Hover triggers on desktop via :hover on the wrap
   - Tooltip auto-positions above with arrow pointing down */
.label-with-tip {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.field-tip-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.field-tip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--muted) 50%, transparent);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-family: "Georgia", "Times New Roman", serif;
  font-style: italic;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  transition: color 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}
.field-tip-btn:hover,
.field-tip-btn:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  outline: none;
}
.field-tip {
  position: absolute;
  bottom: calc(100% + 8px);
  /* anchor to the button so the tip aligns with it, but keep within viewport */
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: max-content;
  max-width: min(260px, 76vw);
  z-index: 30;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--card-bg) 96%, var(--card-subtle-bg));
  color: color-mix(in srgb, var(--ink) 92%, var(--muted));
  font-size: 0.74rem;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  line-height: 1.4;
  box-shadow: 0 10px 20px rgba(4, 14, 20, 0.14);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}
/* Little arrow pointing down to the button */
.field-tip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: color-mix(in srgb, var(--card-bg) 96%, var(--card-subtle-bg));
}
/* Show on hover, focus, or tap (button click focuses it on iOS) */
.field-tip-wrap:hover .field-tip,
.field-tip-wrap:focus-within .field-tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
/* Dark theme — keep tooltip readable */
:root[data-theme="dark"] .field-tip {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.10);
  color: #e2f2ef;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.36);
}
:root[data-theme="dark"] .field-tip::after {
  border-top-color: rgba(255, 255, 255, 0.1);
}

.field-char-counter {
  display: block;
  text-align: right;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 3px;
  opacity: 0.7;
}

.job-description-textarea {
  min-height: 164px;
  margin-top: 2px;
}

.ai-mode-note {
  display: grid;
  gap: 6px;
  margin: 18px 0 0;
}

.ai-mode-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--line) 92%, transparent);
  background: color-mix(in srgb, var(--card-subtle-bg) 42%, transparent);
  color: color-mix(in srgb, var(--muted) 94%, var(--label));
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ai-mode-helper {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
  max-width: 46ch;
}

.builder-action-guidance {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
  max-width: 52ch;
}

.tailor-efficiency-tip-trigger {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card-subtle-bg);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease;
}

.tailor-efficiency-tip-trigger:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: var(--ghost-hover);
}

.tailor-efficiency-tip-trigger:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.tailor-efficiency-tooltip {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 5;
  width: min(360px, 86vw);
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-bg);
  color: var(--ink);
  font-size: 0.8rem;
  line-height: 1.45;
  padding: 10px 12px;
  box-shadow: 0 12px 22px rgba(4, 14, 20, 0.2);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.tailor-efficiency-tip-wrap:hover .tailor-efficiency-tooltip,
.tailor-efficiency-tip-wrap:focus-within .tailor-efficiency-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.tailor-efficiency-tooltip strong {
  color: var(--ink);
}

.tailor-menu {
  position: relative;
  z-index: 6;
}

.tailor-menu.open {
  z-index: 120;
}

.tailor-menu-trigger {
  width: 100%;
  min-height: 44px;
}

.tailor-trigger-label {
  white-space: nowrap;
  font-size: 0.94rem;
}

.ai-rainbow-button {
  border-color: transparent;
  color: #07242c;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.64)) padding-box,
    linear-gradient(120deg, rgba(66, 133, 244, 0.52), rgba(52, 168, 83, 0.46), rgba(251, 188, 5, 0.52), rgba(234, 67, 53, 0.46), rgba(66, 133, 244, 0.52))
      border-box;
  background-size:
    auto,
    180% 180%;
  transition:
    transform 0.16s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.ai-rainbow-button:hover {
  animation: aiRainbowShift 3.4s linear infinite;
  box-shadow: 0 9px 18px rgba(18, 68, 82, 0.18);
  transform: translateY(-1px);
  filter: saturate(1.04);
}

:root[data-theme="dark"] .ai-rainbow-button {
  color: #daf7f5;
  background:
    linear-gradient(120deg, rgba(9, 33, 39, 0.94), rgba(10, 36, 42, 0.88)) padding-box,
    linear-gradient(120deg, rgba(66, 133, 244, 0.58), rgba(52, 168, 83, 0.52), rgba(251, 188, 5, 0.58), rgba(234, 67, 53, 0.52), rgba(66, 133, 244, 0.58))
      border-box;
}

.tailor-menu-trigger .button-content {
  width: 100%;
  justify-content: space-between;
  gap: 8px;
}

.tailor-chevron {
  transition: transform 0.16s ease;
}

.tailor-menu.open .tailor-chevron {
  transform: rotate(180deg);
}

.tailor-actions .tailor-menu:last-child .tailor-menu-trigger {
  border-color: color-mix(in srgb, var(--line) 84%, transparent);
  background: color-mix(in srgb, var(--card-subtle-bg) 58%, transparent);
  color: color-mix(in srgb, var(--label) 88%, var(--muted));
  box-shadow: none;
}

.secondary-tailor-trigger {
  opacity: 0.94;
}

.secondary-tailor-trigger:hover {
  opacity: 1;
}

.secondary-tailor-trigger .tailor-trigger-label {
  font-size: 0.89rem;
}

.tailor-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: max(100%, 220px);
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card-bg);
  box-shadow: 0 14px 24px rgba(7, 19, 24, 0.2);
  padding: 6px;
  z-index: 220;
  display: grid;
  gap: 5px;
}

.tailor-actions .tailor-menu:last-child .tailor-menu-panel {
  left: auto;
  right: 0;
}

.tailor-menu-option {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-weight: 700;
  font-size: 16px;
  min-height: 40px;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
}

.tailor-menu-option .button-content {
  justify-content: space-between;
  gap: 8px;
}

.tailor-menu-option:hover {
  background: var(--ghost-hover);
  border-color: rgba(23, 98, 103, 0.24);
}

.ai-rainbow-option {
  border-color: rgba(113, 154, 180, 0.26);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.72), rgba(251, 252, 255, 0.6)) padding-box,
    linear-gradient(120deg, rgba(66, 133, 244, 0.4), rgba(52, 168, 83, 0.36), rgba(251, 188, 5, 0.4), rgba(234, 67, 53, 0.36), rgba(66, 133, 244, 0.4))
      border-box;
  background-size:
    auto,
    180% 180%;
}

.ai-rainbow-option:hover {
  border-color: transparent;
  animation: aiRainbowShift 3.2s linear infinite;
  box-shadow: 0 8px 16px rgba(12, 46, 56, 0.18);
  transform: translateY(-1px);
}

:root[data-theme="dark"] .ai-rainbow-option {
  border-color: rgba(111, 167, 210, 0.34);
  background:
    linear-gradient(120deg, rgba(12, 37, 42, 0.92), rgba(14, 41, 46, 0.88)) padding-box,
    linear-gradient(120deg, rgba(66, 133, 244, 0.48), rgba(52, 168, 83, 0.44), rgba(251, 188, 5, 0.5), rgba(234, 67, 53, 0.44), rgba(66, 133, 244, 0.48))
      border-box;
}

.tailor-menu-option:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 1px;
}

.tailor-pro-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(23, 98, 103, 0.3);
  background: rgba(23, 98, 103, 0.1);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ai-settings-block {
  margin-top: 18px;
}

.ai-settings-helper {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.4;
}

.ai-settings {
  margin: 0;
}

.ai-rainbow-shell {
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  border-radius: 12px;
  padding: 8px 10px;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.08));
}

:root[data-theme="dark"] .ai-rainbow-shell {
  border-color: rgba(111, 167, 210, 0.12);
  background: linear-gradient(120deg, rgba(10, 33, 38, 0.56), rgba(12, 37, 42, 0.46));
}

.ai-settings summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--muted);
  font-size: 0.82rem;
}

.ai-settings[open] summary,
.ai-settings summary:hover {
  color: var(--label);
}

.ai-settings-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px;
  background: var(--card-subtle-bg);
  margin-top: 10px;
}

.ai-settings-tab {
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  min-height: 38px;
  cursor: pointer;
}

.ai-settings-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--button-text);
}

.ai-settings-tab:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 1px;
}

.ai-settings-panel {
  margin-top: 10px;
}

.ai-settings-help-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-settings-note {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--muted);
}

.cover-letter-card {
  position: relative;
  overflow: visible;
  isolation: isolate;
}

.cover-letter-context-card {
  display: grid;
  gap: 12px;
}

.cover-letter-context-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cover-letter-context-stack {
  display: grid;
  gap: 10px;
}

.cover-letter-context-block {
  border: 1px solid color-mix(in srgb, var(--line) 68%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--card-subtle-bg) 90%, transparent);
  padding: 11px 12px;
  display: grid;
  gap: 6px;
}

.cover-letter-context-label {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.cover-letter-context-block strong {
  font-size: 0.95rem;
  color: var(--ink);
}

.cover-letter-context-block span,
.cover-letter-context-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.cover-letter-context-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 0.8rem;
  line-height: 1.45;
}

.cover-letter-card::before {
  content: "";
  position: absolute;
  inset: -35% auto auto -25%;
  width: 70%;
  height: 64%;
  pointer-events: none;
  background: linear-gradient(
    130deg,
    rgba(66, 133, 244, 0.08),
    rgba(52, 168, 83, 0.06),
    rgba(251, 188, 5, 0.08),
    rgba(234, 67, 53, 0.06)
  );
  filter: blur(16px);
  background-size: 220% 220%;
  animation: aiRainbowShift 8s linear infinite paused;
  opacity: 0.55;
  transition: opacity 0.24s ease;
}

.cover-letter-card:hover::before {
  animation-play-state: running;
  opacity: 0.82;
}

.cover-letter-card > * {
  position: relative;
}

.cover-letter-textarea {
  min-height: 240px;
  line-height: 1.58;
  white-space: pre-wrap;
}

.cover-letter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.cover-letter-progress {
  margin: 4px 0 12px;
}

.cover-letter-actions .button {
  flex: 1 1 220px;
}

.api-help-panel {
  width: min(520px, 100%);
}

.api-help-steps {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
  color: var(--ink);
}

.api-help-note {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--muted);
}

:root[data-theme="dark"] .tailor-menu-panel {
  box-shadow: 0 16px 26px rgba(1, 10, 14, 0.42);
}

:root[data-theme="dark"] .ai-tailor-card.ai-action-active,
:root[data-theme="dark"] .cover-letter-card.ai-action-active {
  border-color: rgba(117, 223, 226, 0.72);
  box-shadow:
    0 0 0 1px rgba(120, 235, 230, 0.44),
    0 18px 34px rgba(1, 12, 18, 0.56),
    0 0 28px rgba(89, 213, 225, 0.34);
}

:root[data-theme="dark"] .tailor-pro-pill {
  border-color: rgba(112, 215, 224, 0.45);
  background: rgba(112, 215, 224, 0.14);
  color: #97e5ec;
}

:root[data-theme="dark"] .tailor-efficiency-tooltip {
  box-shadow: 0 16px 26px rgba(1, 10, 14, 0.42);
}

.status-text {
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.85rem;
  margin: 14px 0 12px;
  position: relative;
  z-index: 1;
}

.ai-progress {
  margin: -2px 0 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-subtle-bg);
  position: relative;
  overflow: hidden;
}

.ai-progress::before {
  content: "";
  position: absolute;
  inset: auto -42px -56px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(102, 224, 230, 0.28) 0%,
    rgba(89, 194, 255, 0.14) 38%,
    rgba(89, 194, 255, 0) 72%
  );
  filter: blur(10px);
  pointer-events: none;
  opacity: 0.9;
}

.ai-progress-track {
  position: relative;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(10, 51, 60, 0.14), rgba(10, 51, 60, 0.08));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 0 0 1px rgba(23, 90, 102, 0.08);
  overflow: hidden;
}

.ai-progress-fill {
  display: block;
  position: relative;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2fc7d1 0%, #67e8ef 46%, #89dcff 100%);
  transition: width 0.3s ease;
  overflow: hidden;
  box-shadow:
    0 0 16px rgba(62, 210, 219, 0.34),
    0 0 34px rgba(120, 176, 255, 0.16);
}

.ai-progress-fill::before {
  content: "";
  position: absolute;
  inset: -14px -22px -14px 36%;
  border-radius: 999px;
  background: radial-gradient(
    circle,
    rgba(199, 250, 255, 0.62) 0%,
    rgba(135, 238, 243, 0.26) 42%,
    rgba(135, 238, 243, 0) 76%
  );
  filter: blur(10px);
  pointer-events: none;
}

.ai-progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.24) 52%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translateX(-28%);
  animation: aiProgressShimmer 1.6s linear infinite;
  pointer-events: none;
}

.ai-progress-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ai-progress-particle {
  position: absolute;
  bottom: -6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.28);
  animation: aiParticleRise 1.35s ease-in-out infinite;
}

.ai-progress-particle:nth-child(1) {
  left: 12%;
  animation-delay: 0s;
}

.ai-progress-particle:nth-child(2) {
  left: 28%;
  animation-delay: 0.24s;
}

.ai-progress-particle:nth-child(3) {
  left: 44%;
  animation-delay: 0.52s;
}

.ai-progress-particle:nth-child(4) {
  left: 62%;
  animation-delay: 0.16s;
}

.ai-progress-particle:nth-child(5) {
  left: 78%;
  animation-delay: 0.72s;
}

@keyframes aiParticleRise {
  0% {
    transform: translateY(6px) scale(0.7);
    opacity: 0;
  }
  35% {
    opacity: 0.9;
  }
  100% {
    transform: translateY(-12px) scale(1.05);
    opacity: 0;
  }
}

@keyframes aiProgressShimmer {
  0% {
    transform: translateX(-42%);
    opacity: 0.3;
  }
  50% {
    opacity: 0.7;
  }
  100% {
    transform: translateX(46%);
    opacity: 0.2;
  }
}

.ai-progress-meta {
  margin: 8px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.77rem;
  font-weight: 700;
  color: var(--muted);
}

:root[data-theme="dark"] .ai-progress-track {
  background: linear-gradient(180deg, rgba(87, 205, 216, 0.2), rgba(87, 205, 216, 0.08));
  box-shadow:
    inset 0 1px 0 rgba(210, 247, 247, 0.08),
    inset 0 0 0 1px rgba(110, 229, 236, 0.08);
}

:root[data-theme="dark"] .ai-progress-fill {
  background: linear-gradient(90deg, #57cdd8 0%, #90f1f4 45%, #8db9ff 100%);
  box-shadow:
    0 0 18px rgba(110, 234, 241, 0.34),
    0 0 42px rgba(118, 145, 255, 0.18);
}

:root[data-theme="dark"] .ai-progress-particle {
  background: rgba(214, 246, 242, 0.82);
  box-shadow: 0 0 7px rgba(155, 241, 244, 0.34);
}

.status-text[data-type="info"] {
  background: rgba(23, 98, 103, 0.1);
  color: #164e52;
}

.status-text[data-type="success"] {
  background: rgba(30, 141, 102, 0.14);
  color: #146442;
}

.status-text[data-type="error"] {
  background: rgba(163, 62, 47, 0.15);
  color: #7d2f23;
}

.status-text[data-type="working"] {
  background: rgba(207, 140, 36, 0.15);
  color: #7c5615;
}

:root[data-theme="dark"] .status-text[data-type="info"] {
  color: #86d8db;
}

:root[data-theme="dark"] .status-text[data-type="success"] {
  color: #8fe0bf;
}

:root[data-theme="dark"] .status-text[data-type="error"] {
  color: #f0b7ad;
}

:root[data-theme="dark"] .status-text[data-type="working"] {
  color: #f3d18c;
}

.insight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ats-insight-grid .insight-value {
  font-size: 1.2rem;
}

.insight-grid > div {
  border: 1px solid var(--line);
  background: var(--card-subtle-bg);
  border-radius: 12px;
  padding: 10px;
}

.insight-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.insight-value {
  margin: 4px 0 0;
  font-size: 1.12rem;
  font-weight: 800;
}

.insight-value.small {
  font-size: 0.83rem;
  line-height: 1.36;
}

.ats-audit-shell {
  margin-top: 16px;
  border: 1px solid color-mix(in srgb, var(--line) 66%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--card-subtle-bg) 82%, transparent);
  padding: 14px;
  display: grid;
  gap: 12px;
}

.submission-readiness-banner {
  border: 1px solid color-mix(in srgb, var(--line) 66%, transparent);
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--surface-elevated) 84%, transparent),
    color-mix(in srgb, var(--card-subtle-bg) 88%, transparent)
  );
  display: grid;
  gap: 12px;
}

.submission-readiness-banner.pass {
  border-color: color-mix(in srgb, #4fdca8 44%, var(--line));
}

.submission-readiness-banner.warn {
  border-color: color-mix(in srgb, #f2b96b 48%, var(--line));
}

.submission-readiness-banner.fail {
  border-color: color-mix(in srgb, #ef8f8f 54%, var(--line));
}

.submission-readiness-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.submission-readiness-copy-block {
  display: grid;
  gap: 2px;
}

.submission-readiness-title {
  display: block;
  margin-top: 4px;
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--ink);
}

.submission-readiness-score-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.submission-readiness-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 10%, var(--line));
  background: color-mix(in srgb, var(--accent) 2%, var(--card-subtle-bg));
  color: color-mix(in srgb, var(--label) 72%, var(--muted));
  font-size: 0.69rem;
  font-weight: 700;
}

.submission-readiness-pill.recruiter {
  border-color: color-mix(in srgb, #ffb26f 18%, var(--line));
  background: color-mix(in srgb, #ffb26f 5%, var(--card-subtle-bg));
}

.submission-readiness-pill.pass {
  border-color: color-mix(in srgb, #3ecf8e 40%, transparent);
  background: color-mix(in srgb, #3ecf8e 10%, var(--card-subtle-bg));
  color: color-mix(in srgb, #3ecf8e 80%, var(--ink));
}

.submission-readiness-pill.warn {
  border-color: color-mix(in srgb, #f59e0b 38%, transparent);
  background: color-mix(in srgb, #f59e0b 10%, var(--card-subtle-bg));
  color: color-mix(in srgb, #f59e0b 85%, var(--ink));
}

.submission-readiness-pill.fail {
  border-color: color-mix(in srgb, #f87171 38%, transparent);
  background: color-mix(in srgb, #f87171 10%, var(--card-subtle-bg));
  color: color-mix(in srgb, #f87171 85%, var(--ink));
}

.submission-readiness-copy {
  margin: 0;
  color: var(--ink);
  font-size: 0.93rem;
  line-height: 1.5;
  max-width: 46ch;
}

.submission-readiness-fixes {
  display: grid;
  gap: 8px;
}

.submission-readiness-fix-list {
  display: grid;
  gap: 8px;
}

.submission-readiness-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-top: 4px;
}

.submission-readiness-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.submission-readiness-next {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
  max-width: 44ch;
}

.submission-readiness-action {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: color-mix(in srgb, var(--accent) 14%, var(--surface-elevated));
  color: var(--accent-strong);
  box-shadow: 0 8px 16px rgba(10, 41, 48, 0.12);
  align-self: flex-start;
  min-width: 148px;
}

.submission-readiness-action .button-content {
  white-space: nowrap;
  justify-content: center;
}

.submission-readiness-action.secondary {
  border-color: color-mix(in srgb, var(--line) 82%, transparent);
  background: color-mix(in srgb, var(--surface-elevated) 82%, transparent);
  color: var(--muted);
  box-shadow: none;
}

.submission-readiness-action:hover {
  border-color: color-mix(in srgb, var(--accent) 58%, var(--line));
  background: color-mix(in srgb, var(--accent) 18%, var(--surface-elevated));
  box-shadow: 0 10px 18px rgba(10, 41, 48, 0.15);
}

.submission-readiness-action.secondary:hover {
  border-color: color-mix(in srgb, var(--line) 92%, var(--accent));
  background: color-mix(in srgb, var(--accent-soft) 36%, var(--surface-elevated));
  color: var(--ink);
  box-shadow: none;
}

.ats-audit-details {
  display: grid;
  gap: 12px;
  border-top: 1px dashed color-mix(in srgb, var(--line) 80%, transparent);
  padding-top: 12px;
}

.ats-audit-details summary {
  cursor: pointer;
  list-style: none;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  transition: color 0.16s ease;
}

.ats-audit-details summary::-webkit-details-marker {
  display: none;
}

.ats-audit-details summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.16s ease;
}

.ats-audit-details[open] summary::after {
  transform: rotate(225deg) translateY(-1px);
}

.ats-audit-details summary:hover,
.ats-audit-details[open] summary {
  color: var(--label);
}

.ats-audit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ats-dual-score-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ats-score-card {
  border: 1px solid color-mix(in srgb, var(--line) 68%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--card-subtle-bg) 92%, transparent);
  padding: 11px;
  display: grid;
  gap: 8px;
}

.ats-score-card.pass {
  border-color: color-mix(in srgb, #4fdca8 48%, var(--line));
}

.ats-score-card.warn {
  border-color: color-mix(in srgb, #f2b96b 54%, var(--line));
}

.ats-score-card.fail {
  border-color: color-mix(in srgb, #ef8f8f 58%, var(--line));
}

.ats-score-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.ats-score-card-head strong {
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
}

.ats-score-card-detail {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.4;
}

.ats-audit-score {
  font-size: 1.08rem;
  font-weight: 800;
  color: color-mix(in srgb, var(--ink) 86%, var(--accent));
}

.ats-audit-meter {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: color-mix(in srgb, var(--line) 62%, transparent);
}

.ats-audit-meter > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #24b9b8 0%, #42d1ff 68%, #7de8ff 100%);
  box-shadow: 0 0 18px rgba(47, 202, 221, 0.32);
  transition: width 240ms ease;
}

.ats-audit-meter.recruiter > span {
  background: linear-gradient(90deg, #ff9c54 0%, #ffcc70 58%, #ffe5a8 100%);
  box-shadow: 0 0 18px rgba(255, 172, 98, 0.24);
}

.ats-audit-summary {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
}

.ats-audit-subsection {
  display: grid;
  gap: 9px;
  padding-top: 2px;
}

.ats-subsection-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ats-subsection-score {
  font-size: 0.95rem;
  font-weight: 800;
  color: color-mix(in srgb, var(--ink) 82%, var(--accent));
}

.ats-audit-signal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ats-audit-signal-card {
  border: 1px solid color-mix(in srgb, var(--line) 68%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--card-subtle-bg) 90%, transparent);
  padding: 10px;
  display: grid;
  gap: 4px;
}

.ats-audit-signal-card.pass {
  border-color: color-mix(in srgb, #4fdca8 48%, var(--line));
}

.ats-audit-signal-card.warn {
  border-color: color-mix(in srgb, #f2b96b 54%, var(--line));
}

.ats-audit-signal-card.fail {
  border-color: color-mix(in srgb, #ef8f8f 58%, var(--line));
}

.ats-audit-signal-label,
.ats-audit-list-label {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.ats-audit-signal-card strong {
  font-size: 0.95rem;
  color: var(--ink);
}

.ats-audit-signal-card span {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.35;
}

.ats-audit-priority-list,
.ats-audit-strength-list {
  display: grid;
  gap: 8px;
}

.ats-audit-priority-item,
.ats-audit-strength-item {
  border: 1px solid color-mix(in srgb, var(--line) 68%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--card-subtle-bg) 92%, transparent);
  padding: 9px 10px;
}

.ats-audit-priority-item.fail {
  border-color: color-mix(in srgb, #ef8f8f 58%, var(--line));
}

.ats-audit-priority-item.warn {
  border-color: color-mix(in srgb, #f2b96b 50%, var(--line));
}

.ats-audit-priority-item strong,
.ats-audit-strength-item strong {
  display: block;
  font-size: 0.82rem;
  color: var(--ink);
}

.ats-audit-priority-item p,
.ats-audit-strength-item p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.36;
}

.ats-chip-groups {
  display: grid;
  gap: 10px;
}

.ats-chip-group {
  display: grid;
  gap: 7px;
}

.ats-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ats-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--line) 68%, transparent);
  background: color-mix(in srgb, var(--card-subtle-bg) 92%, transparent);
  font-size: 0.74rem;
  line-height: 1.2;
  color: var(--ink);
}

.ats-chip.matched {
  border-color: color-mix(in srgb, #4fdca8 48%, var(--line));
  background: color-mix(in srgb, #4fdca8 12%, var(--card-subtle-bg));
}

.ats-chip.missing {
  border-color: color-mix(in srgb, #f2b96b 54%, var(--line));
  background: color-mix(in srgb, #f2b96b 12%, var(--card-subtle-bg));
}

.ats-chip.empty {
  color: var(--muted);
}

.ats-audit-checks {
  display: grid;
  gap: 8px;
}

.ats-audit-check {
  border: 1px solid color-mix(in srgb, var(--line) 68%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--card-subtle-bg) 90%, transparent);
  padding: 8px 10px;
}

.ats-audit-check.pass {
  border-color: color-mix(in srgb, #4fdca8 45%, var(--line));
}

.ats-audit-check.warn {
  border-color: color-mix(in srgb, #f2b96b 50%, var(--line));
}

.ats-audit-check.fail {
  border-color: color-mix(in srgb, #ef8f8f 58%, var(--line));
}

.ats-audit-check-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.ats-audit-check-head p {
  margin: 0;
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--ink);
}

.ats-audit-check-head span {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.ats-audit-check-detail {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.36;
}

.ats-audit-actions {
  display: flex;
  justify-content: flex-end;
}

.resume-paper {
  position: relative;
  overflow: hidden;
  margin: 0 auto;
  width: min(100%, 820px);
  min-height: 1100px;
  padding: 44px;
  background: var(--resume-paper-bg);
  border-radius: 14px;
  border: 1px solid var(--resume-paper-border);
  box-shadow: 0 20px 38px rgba(12, 30, 35, 0.16);
  font-family: var(--resume-body-font, "Refynes Poppins", "Poppins", sans-serif);
  transition:
    transform 260ms ease,
    box-shadow 260ms ease,
    border-color 260ms ease,
    background 260ms ease,
    color 260ms ease;
}

.resume-paper::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 20% 16%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 32%),
    linear-gradient(120deg, transparent 24%, color-mix(in srgb, var(--accent) 12%, transparent) 52%, transparent 80%);
  transform: translateX(-8%) scale(1.02);
}

.preview-shell.is-palette-animating .resume-paper::after {
  animation: previewPaletteSweep 720ms ease-out;
}

.preview-shell.is-palette-animating .resume-paper {
  animation: paletteCanvasPulse 720ms ease-out;
}

.resume-paper.template-modern .resume-header {
  border-bottom: 1px solid var(--resume-paper-border);
  padding-bottom: 16px;
}

.resume-paper.template-executive {
  border-left: 8px solid var(--accent);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.resume-paper.template-executive .resume-header h1 {
  letter-spacing: 0.02em;
}

.resume-paper.template-executive .resume-section h2 {
  letter-spacing: 0.2em;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--resume-paper-border);
}

.resume-paper.template-executive .item-heading h3 {
  font-size: 1rem;
}

.resume-paper.template-minimal {
  padding: 32px;
}

.resume-paper.template-minimal .resume-header {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--resume-paper-border);
}

.resume-paper.template-minimal .resume-header h1 {
  font-size: 1.7rem;
}

.resume-paper.template-minimal .resume-title {
  margin-top: 4px;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.84rem;
}

.resume-paper.template-minimal .resume-section {
  margin-top: 18px;
}

.resume-paper.template-minimal .resume-section h2 {
  font-size: 0.76rem;
  letter-spacing: 0.12em;
}

.resume-paper.template-atlas {
  border-top: 9px solid var(--accent);
  padding: 32px;
}

.resume-paper.template-atlas .resume-header {
  border: 1px solid var(--resume-paper-border);
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--card-subtle-bg);
}

.resume-paper.template-atlas .resume-section h2 {
  display: inline-block;
  border: none;
  border-radius: 8px;
  padding: 4px 9px;
  margin-bottom: 10px;
  background: var(--card-subtle-bg);
  letter-spacing: 0.09em;
}

.resume-paper.template-atlas .resume-item {
  border-left: 3px solid var(--resume-paper-border);
  padding-left: 12px;
}

.resume-paper.template-aurora .resume-header {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--resume-paper-border));
  border-radius: 20px;
  padding: 22px 24px 18px;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--accent) 12%, white),
    rgba(255, 255, 255, 0.94)
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 16px 28px rgba(60, 40, 96, 0.08);
}

.resume-paper.template-aurora .resume-header::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--accent) 92%, white),
    color-mix(in srgb, var(--accent) 54%, white)
  );
}

.resume-paper.template-aurora .resume-header::after {
  content: "";
  position: absolute;
  inset: auto -24px -42px auto;
  width: 150px;
  height: 150px;
  border-radius: 999px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 12%, white), transparent 68%);
  pointer-events: none;
}

.resume-paper.template-aurora .resume-header h1 {
  position: relative;
  z-index: 1;
  letter-spacing: -0.02em;
  font-size: 2.22rem;
  line-height: 1.04;
}

.resume-paper.template-aurora .resume-title {
  position: relative;
  z-index: 1;
  margin: 10px 0 8px;
  color: color-mix(in srgb, var(--accent) 88%, #4f3c74);
  font-size: 1.02rem;
}

.resume-paper.template-aurora .resume-contact {
  position: relative;
  z-index: 1;
  font-size: 0.96rem;
}

.resume-paper.template-aurora .resume-link-list {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  gap: 10px;
}

.resume-paper.template-aurora .resume-link-item {
  border-color: color-mix(in srgb, var(--accent) 20%, var(--resume-paper-border));
  background: rgba(255, 255, 255, 0.78);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 8px 16px rgba(61, 44, 93, 0.06);
}

.resume-paper.template-aurora .resume-section {
  margin-top: 22px;
}

.resume-paper.template-aurora .resume-section h2 {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  letter-spacing: 0.12em;
}

.resume-paper.template-aurora .resume-section h2::after {
  content: "";
  position: absolute;
  left: 0;
  right: auto;
  bottom: 0;
  width: 54px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.resume-paper.template-aurora .resume-item {
  padding: 14px 0 12px;
  border-bottom: 1px dashed var(--resume-paper-border);
}

.resume-paper.template-aurora .resume-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.resume-paper.template-aurora .item-heading h3 {
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}

.resume-paper.template-aurora .item-meta {
  font-size: 0.92rem;
}

.resume-paper.template-aurora .resume-list {
  margin-top: 10px;
}

.resume-paper.template-aurora .resume-list li::marker {
  color: var(--accent);
}

.resume-paper.template-aurora .resume-skills {
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 14%, var(--resume-paper-border));
  border-radius: 16px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--accent) 7%, white),
    color-mix(in srgb, var(--accent) 3%, white)
  );
  line-height: 1.85;
}

.resume-paper.template-horizon {
  border-radius: 10px;
  border-width: 2px;
  padding: 36px 38px;
}

.resume-paper.template-horizon .resume-header {
  border-bottom: 2px solid var(--accent);
  padding-bottom: 12px;
}

.resume-paper.template-horizon .resume-section {
  margin-top: 20px;
}

.resume-paper.template-horizon .resume-section h2 {
  border-bottom: none;
  letter-spacing: 0.07em;
}

.resume-paper.template-horizon .item-heading {
  align-items: flex-start;
}

.resume-paper.template-horizon .item-meta {
  text-align: right;
}

.resume-paper.template-studio {
  padding: 34px;
  background: var(--card-subtle-bg);
}

.resume-paper.template-studio .resume-header {
  border-bottom: none;
  padding-bottom: 8px;
}

.resume-paper.template-studio .resume-title {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  margin-bottom: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.resume-paper.template-studio .resume-section {
  margin-top: 18px;
}

.resume-paper.template-studio .resume-section h2 {
  border-bottom: none;
  margin-bottom: 8px;
}

.resume-paper.template-sidebar {
  width: min(100%, 920px);
}

.resume-paper.template-sidebar .resume-header {
  border-bottom: 1px solid var(--resume-paper-border);
  padding-bottom: 14px;
}

.resume-layout {
  display: grid;
  grid-template-columns: minmax(200px, 230px) 1fr;
  gap: 22px;
  margin-top: 20px;
}

.resume-aside {
  border-right: 1px solid var(--resume-paper-border);
  padding-right: 16px;
}

.resume-aside .resume-section {
  margin-top: 0;
  margin-bottom: 20px;
}

.resume-aside .resume-section:last-child {
  margin-bottom: 0;
}

.resume-main .resume-section:first-child {
  margin-top: 0;
}

.resume-header h1 {
  margin: 0;
  font-family: var(--resume-heading-font, "Refynes Poppins", "Poppins", sans-serif);
  font-size: 2rem;
  line-height: 1.15;
  color: var(--resume-text);
}

.resume-title {
  margin: 6px 0 10px;
  color: var(--accent-strong);
  font-size: 1.02rem;
  font-weight: 700;
  font-family: var(--resume-heading-font, "Refynes Poppins", "Poppins", sans-serif);
}

.resume-contact {
  margin: 0;
  color: var(--resume-muted);
  font-size: 1.04rem;
}

.resume-contact a {
  color: var(--accent-strong);
}

.resume-link-list {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.resume-link-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--resume-paper-border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--resume-paper-bg) 86%, var(--accent) 14%);
  color: var(--accent-strong);
  padding: 5px 10px;
  font-size: 0.86rem;
  line-height: 1;
  text-decoration: none;
}

.resume-link-icon {
  width: 14px;
  height: 14px;
  stroke-width: 1.8;
}

.resume-section {
  margin-top: 24px;
}

.resume-section h2 {
  margin: 0 0 9px;
  font-size: 0.94rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-strong);
  font-family: var(--resume-heading-font, "Refynes Poppins", "Poppins", sans-serif);
}

.resume-section p {
  margin: 0;
  color: var(--resume-text);
  line-height: 1.62;
  font-size: 1.07rem;
}

.resume-item {
  margin-bottom: 14px;
}

.resume-item:last-child {
  margin-bottom: 0;
}

.item-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.item-heading h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--resume-text);
  font-family: var(--resume-heading-font, "Refynes Poppins", "Poppins", sans-serif);
}

.item-meta {
  margin: 3px 0 0;
  color: var(--resume-muted);
  font-size: 0.94rem;
  font-weight: 600;
}

.resume-list {
  margin: 7px 0 0 18px;
  padding: 0;
}

.resume-list li {
  margin-bottom: 5px;
  line-height: 1.55;
  color: var(--resume-text);
  font-size: 1.05rem;
}

.resume-skills {
  margin: 0;
  line-height: 1.65;
  color: var(--resume-text);
  font-size: 1.05rem;
}

@keyframes previewChangePulse {
  0% {
    background: rgba(110, 203, 200, 0.48);
    box-shadow: 0 0 0 0 rgba(59, 191, 197, 0.32);
  }
  55% {
    background: rgba(110, 203, 200, 0.24);
    box-shadow: 0 0 0 5px rgba(59, 191, 197, 0.17);
  }
  100% {
    background: rgba(110, 203, 200, 0.13);
    box-shadow: 0 0 0 1px rgba(59, 191, 197, 0.22);
  }
}

.preview-change-word {
  border-radius: 5px;
  padding: 0 2px;
  background: rgba(110, 203, 200, 0.13);
  box-shadow: 0 0 0 1px rgba(59, 191, 197, 0.2);
  animation: previewChangePulse 1.8s ease-out;
}

:root[data-theme="dark"] .preview-change-word {
  background: rgba(129, 230, 222, 0.14);
  box-shadow: 0 0 0 1px rgba(129, 230, 222, 0.28);
  animation: previewChangePulse 1.8s ease-out;
}

@keyframes nativeGlowDrift {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-10px) scale(1.03);
  }
}

@keyframes nativeCardIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes landingBlockIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes landingCardRise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes backdropFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes previewSheetIn {
  from {
    opacity: 0.65;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes jobRefyneDrawerIn {
  from {
    opacity: 0.72;
    transform: translateX(28px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes jobRefyneSheetRise {
  from {
    opacity: 0.64;
    transform: translateY(42px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toolbarPop {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toolbarSheetIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toolbarItemIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes canvasDrift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes themeIconTwirl {
  0% {
    transform: rotate(0deg) scale(1);
  }
  45% {
    transform: rotate(140deg) scale(1.18);
  }
  100% {
    transform: rotate(280deg) scale(1);
  }
}

@keyframes themeMorphExpand {
  0% {
    transform: translate(-50%, -50%) scale(0.2);
    opacity: 0.86;
  }
  68% {
    transform: translate(-50%, -50%) scale(var(--theme-morph-scale, 140));
    opacity: 0.95;
  }
  100% {
    transform: translate(-50%, -50%) scale(var(--theme-morph-scale, 140));
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .panel-scroll,
  .preview-shell {
    height: auto;
    max-height: none;
  }

  .resume-paper {
    min-height: auto;
  }

  .job-workspace-score-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .landing-shell {
    width: min(980px, 96vw);
  }

  .landing-header {
    position: static;
    border-radius: 24px;
  }

  .landing-header-actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .landing-main {
    gap: 30px;
  }

  .landing-hero {
    min-height: auto;
  }

  .landing-actions,
  .landing-stats {
    max-width: none;
  }

  .landing-actions .button,
  .landing-header-actions .button {
    flex: 1 1 220px;
  }

  .landing-filmstrip {
    grid-template-columns: 1fr;
  }

  .landing-film-card {
    min-height: 320px;
  }

  .job-workspace-list-item,
  .job-workspace-hero,
  .job-workspace-snapshot-head {
    flex-direction: column;
  }

  .job-workspace-hero-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .submission-readiness-head,
  .submission-readiness-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .submission-readiness-score-row {
    justify-content: flex-start;
  }

  .landing-platform-grid {
    grid-template-columns: 1fr;
  }

  .landing-storyline-item {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 16px 4px;
  }

  .app-shell {
    padding-top: calc(22px + var(--safe-top));
    padding-left: 8px;
    padding-right: 8px;
    box-sizing: border-box;
  }

  .workspace-content {
    max-width: 100%;
    overflow-x: hidden;
  }

  .workspace-content .panel,
  .workspace-content .panel-scroll,
  .workspace-content .card {
    max-width: 100%;
    box-sizing: border-box;
    word-break: break-word;
  }

  .workspace-shell {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 8px;
    max-width: 100%;
  }

  .workspace-sidebar {
    position: static;
    top: auto;
    padding: 5px;
    z-index: 55;
    min-height: 0;
    max-height: none;
    display: block;
    border-radius: 16px;
    overflow: hidden;
    width: 100%;
  }

  .workspace-sidebar-head {
    display: none;
  }

  .workspace-sidebar-nav {
    display: flex;
    flex-wrap: nowrap !important;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 2px 20px 2px 2px;
  }

  .workspace-sidebar-nav::-webkit-scrollbar {
    display: none;
  }

  .workspace-nav-button {
    width: auto;
    min-width: auto;
    flex: 0 0 auto;
    flex-direction: row;
    min-height: 42px;
    padding: 8px 12px;
    font-size: 0.95rem;
    gap: 7px;
    white-space: nowrap;
  }

  .topbar {
    overflow: visible;
    align-items: center;
    padding: 12px 14px;
    border-radius: 18px;
    gap: 12px;
    flex-wrap: nowrap;
  }

  .brand,
  .brand-link {
    min-width: 0;
    flex: 1 1 auto;
  }

  .brand {
    grid-template-areas: "logo title";
    column-gap: 10px;
  }

  .topbar .eyebrow {
    display: none;
  }

  .brand-title {
    min-width: 0;
    font-size: 1.28rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .topbar-actions {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    align-self: center;
  }

  .topbar-actions > * {
    flex: 0 0 auto;
  }

  /* Mobile topbar trio (theme · resumes · hamburger) plus the icon-only
     download trigger — all share the same 48×48 footprint, same surface,
     same chrome. 48pt is comfortably above Apple's 44pt HIG minimum and
     makes tapping with a thumb feel effortless. */
  .mobile-theme-toggle,
  .mobile-resumes-toggle,
  .mobile-menu-toggle,
  .topbar .download-menu-trigger.icon-only {
    display: inline-flex;
    width: 48px;
    height: 48px;
    min-height: 48px;
    min-width: 48px;
    padding: 0;
    border-radius: 14px;
    border-color: rgba(88, 135, 147, 0.42);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(231, 247, 243, 0.66));
    backdrop-filter: blur(12px) saturate(1.08);
    -webkit-backdrop-filter: blur(12px) saturate(1.08);
    box-shadow: 0 8px 18px rgba(10, 42, 50, 0.14);
    align-items: center;
    justify-content: center;
  }

  :root[data-theme="dark"] .mobile-theme-toggle,
  :root[data-theme="dark"] .mobile-resumes-toggle,
  :root[data-theme="dark"] .mobile-menu-toggle,
  :root[data-theme="dark"] .topbar .download-menu-trigger.icon-only {
    border-color: rgba(122, 185, 180, 0.36);
    background: linear-gradient(145deg, rgba(20, 47, 54, 0.9), rgba(13, 37, 43, 0.84));
    box-shadow: 0 12px 22px rgba(2, 10, 14, 0.42);
  }

  /* Resumes icon button shows on mobile only */
  .mobile-resumes-toggle {
    position: relative;
    z-index: 160;
  }
  .mobile-resumes-toggle .button-icon {
    width: 22px;
    height: 22px;
    stroke-width: 2.1;
    color: var(--accent-strong);
  }
  :root[data-theme="dark"] .mobile-resumes-toggle .button-icon {
    color: #d1f3ed;
  }
  .mobile-resumes-toggle:hover {
    border-color: rgba(94, 202, 197, 0.55);
  }

  /* Download trigger as icon-only on mobile — matches the trio exactly so
     the user sees four perfectly aligned squares in the topbar. The label
     and chevron are hidden via JSX, but we kill any leftover min-width
     here too in case the cascade introduces a pixel of drift. */
  .topbar .download-menu-trigger.icon-only {
    min-width: 44px !important;
    width: 44px;
    gap: 0;
  }
  .topbar .download-menu-trigger.icon-only .button-content {
    gap: 0;
  }
  .topbar .download-menu-trigger.icon-only .button-icon {
    width: 22px;
    height: 22px;
    stroke-width: 2.1;
    color: var(--accent-strong);
  }
  :root[data-theme="dark"] .topbar .download-menu-trigger.icon-only .button-icon {
    color: #d1f3ed;
  }

  .mobile-menu-toggle .button-icon {
    width: 24px;
    height: 24px;
    stroke-width: 2.35;
    color: var(--accent-strong);
    opacity: 1;
    transition: transform 0.22s ease;
  }

  :root[data-theme="dark"] .mobile-menu-toggle .button-icon {
    color: #d1f3ed;
  }

  .mobile-menu-toggle.active .button-icon {
    transform: rotate(96deg) scale(1.08);
  }

  .toolbar {
    position: fixed;
    top: calc(var(--safe-top) + 74px);
    right: 10px;
    left: 10px;
    display: none;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: stretch;
    width: auto;
    height: calc(100dvh - (var(--safe-top) + 86px));
    max-height: calc(100dvh - (var(--safe-top) + 86px));
    padding: 14px 12px calc(var(--safe-bottom) + 16px);
    border-radius: 24px;
    border: 1px solid rgba(122, 169, 178, 0.32);
    background:
      radial-gradient(120% 80% at 0% 0%, rgba(124, 204, 198, 0.24), transparent 58%),
      linear-gradient(155deg, rgba(255, 255, 255, 0.84), rgba(232, 248, 244, 0.68)),
      var(--card-bg);
    backdrop-filter: blur(20px) saturate(1.1);
    box-shadow:
      0 22px 38px rgba(7, 20, 26, 0.26),
      inset 0 1px 0 rgba(255, 255, 255, 0.78);
    overflow: auto;
    overscroll-behavior: contain;
    z-index: 170;
    position: fixed;
  }

  :root[data-theme="dark"] .toolbar {
    border-color: rgba(122, 188, 182, 0.3);
    background:
      radial-gradient(120% 80% at 0% 0%, rgba(98, 193, 186, 0.22), transparent 58%),
      linear-gradient(155deg, rgba(19, 45, 52, 0.93), rgba(12, 35, 40, 0.88)),
      var(--card-bg);
    box-shadow:
      0 24px 40px rgba(1, 8, 12, 0.54),
      inset 0 1px 0 rgba(160, 220, 210, 0.16);
  }

  .toolbar.open {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    overflow-y: auto;
    overflow-x: hidden;
    animation: toolbarSheetIn 260ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .toolbar.open > * {
    opacity: 0;
    transform: translateY(8px);
    animation: toolbarItemIn 240ms cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
  }

  .toolbar.open > :nth-child(1) {
    animation-delay: 24ms;
  }

  .toolbar.open > :nth-child(2) {
    animation-delay: 54ms;
  }

  .toolbar.open > :nth-child(3) {
    animation-delay: 84ms;
  }

  .toolbar.open > :nth-child(4) {
    animation-delay: 114ms;
  }

  .toolbar.open > :nth-child(5) {
    animation-delay: 144ms;
  }

  .mobile-toolbar-backdrop {
    display: block;
    z-index: 125;
    backdrop-filter: blur(2px);
    background: rgba(7, 15, 20, 0.32);
    animation: backdropFadeIn 180ms ease-out both;
  }

  .toolbar > * {
    width: 100%;
    margin-inline: auto;
  }

  .toolbar .button,
  .toolbar .profile-launch,
  .toolbar .plan-chip,
  .toolbar .download-menu {
    width: 100%;
    max-width: none;
    border-radius: 16px;
  }

  .toolbar .button {
    justify-content: flex-start;
    min-height: 52px;
    padding: 12px 14px;
  }

  .toolbar .button .button-content {
    width: 100%;
    justify-content: flex-start;
    gap: 11px;
  }

  .toolbar .button.icon-only .button-content {
    width: auto;
  }

  .toolbar .button-icon,
  .toolbar .chip-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2.1;
    opacity: 0.98;
  }

  .toolbar .profile-launch {
    justify-content: flex-start;
    min-height: 52px;
    border-radius: 16px;
    border-color: rgba(95, 138, 146, 0.32);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(236, 250, 246, 0.58));
  }

  :root[data-theme="dark"] .toolbar .profile-launch {
    border-color: rgba(122, 185, 180, 0.3);
    background: linear-gradient(145deg, rgba(19, 48, 55, 0.9), rgba(13, 39, 45, 0.82));
  }

  .toolbar .plan-chip {
    justify-content: center;
    min-height: 46px;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(238, 251, 247, 0.62));
  }

  :root[data-theme="dark"] .toolbar .plan-chip {
    background: linear-gradient(145deg, rgba(20, 47, 53, 0.9), rgba(14, 38, 44, 0.84));
  }

  .toolbar .download-menu-panel {
    position: static;
    top: auto;
    right: auto;
    width: 100%;
    min-width: 0;
    margin-top: 10px;
    border-radius: 14px;
    border: 1px solid rgba(98, 141, 150, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(234, 248, 244, 0.54)),
      var(--card-subtle-bg);
  }

  :root[data-theme="dark"] .toolbar .download-menu-panel {
    border-color: rgba(120, 182, 176, 0.26);
    box-shadow: inset 0 1px 0 rgba(156, 216, 206, 0.14);
    background:
      linear-gradient(145deg, rgba(20, 47, 53, 0.88), rgba(13, 38, 44, 0.8)),
      var(--card-subtle-bg);
  }

  .toolbar-mobile-footer {
    position: sticky;
    bottom: 0;
    margin-top: auto;
    width: 100%;
    margin-inline: 0;
    display: grid;
    gap: 10px;
    padding: 12px 2px 2px;
    border-top: 1px solid rgba(96, 136, 146, 0.24);
    flex-shrink: 0;
    background:
      linear-gradient(180deg, rgba(244, 253, 251, 0), rgba(244, 253, 251, 0.78) 45%, rgba(244, 253, 251, 0.92));
  }

  :root[data-theme="dark"] .toolbar-mobile-footer {
    border-top-color: rgba(121, 183, 177, 0.24);
    background:
      linear-gradient(180deg, rgba(11, 32, 38, 0), rgba(11, 32, 38, 0.82) 45%, rgba(11, 32, 38, 0.92));
  }

  .workspace.mobile-layout {
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: stretch;
  }

  .workspace.mobile-layout .editor-panel {
    border-radius: 16px;
    overflow: hidden;
  }

  .workspace.mobile-layout .panel-scroll {
    height: auto;
    max-height: none;
    overflow: visible;
    padding: 12px 12px calc(104px + var(--safe-bottom));
  }

  .workspace.mobile-layout .panel-scroll .card {
    margin-bottom: 12px;
    border-radius: 16px;
    padding: 14px;
  }

  .workspace.mobile-layout .panel-scroll .section-head {
    align-items: flex-start;
    margin-bottom: 12px;
    padding-bottom: 8px;
  }

  .workspace.mobile-layout .panel-scroll .section-head-actions {
    width: 100%;
    justify-content: space-between;
  }

  .workspace.mobile-layout .panel-scroll .section-collapse-toggle {
    min-height: 36px;
    padding: 0 11px;
    font-size: 0.84rem;
  }

  .pdf-editor-workspace-shell {
    height: auto;
    min-height: 0;
    padding: 12px;
  }

  .panel-scroll .card {
    scroll-margin-top: calc(var(--safe-top) + 94px);
  }

  .mobile-step-nav {
    display: none;
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(10px + var(--safe-bottom));
    z-index: 63;
    border-radius: 16px;
    border: 1px solid rgba(123, 161, 171, 0.38);
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(232, 248, 244, 0.64)),
      var(--card-bg);
    backdrop-filter: blur(14px) saturate(1.05);
    box-shadow:
      0 12px 24px rgba(6, 17, 24, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.84);
    padding: 8px;
  }

  :root[data-theme="dark"] .mobile-step-nav {
    border-color: rgba(129, 191, 184, 0.32);
    background:
      linear-gradient(145deg, rgba(18, 43, 49, 0.9), rgba(12, 35, 40, 0.82)),
      var(--card-bg);
    box-shadow:
      0 14px 28px rgba(1, 9, 14, 0.5),
      inset 0 1px 0 rgba(166, 223, 213, 0.16);
  }

  .mobile-preview-cta {
    display: inline-flex;
    left: auto;
    right: 12px;
    width: auto;
    max-width: calc(100vw - 24px);
    justify-content: center;
    border-radius: 999px;
    min-height: 46px;
    padding: 10px 14px;
  }

  .mobile-preview-panel .preview-shell {
    height: calc(100% - 58px - var(--safe-bottom));
    max-height: none;
    border-radius: 0;
    padding: 16px;
    background:
      radial-gradient(circle at 14% 0%, rgba(255, 255, 255, 0.58), transparent 45%),
      radial-gradient(circle at 88% 0%, rgba(147, 207, 197, 0.38), transparent 45%),
      radial-gradient(circle at 1px 1px, rgba(97, 130, 138, 0.16) 1px, transparent 0);
    background-size:
      auto,
      auto,
      14px 14px;
  }

  :root[data-theme="dark"] .mobile-preview-panel .preview-shell {
    background:
      radial-gradient(circle at 14% 0%, rgba(121, 188, 181, 0.16), transparent 42%),
      radial-gradient(circle at 88% 0%, rgba(70, 127, 156, 0.2), transparent 44%),
      linear-gradient(180deg, rgba(8, 23, 29, 0.98), rgba(12, 31, 39, 0.96)),
      radial-gradient(circle at 1px 1px, rgba(124, 160, 168, 0.16) 1px, transparent 0);
    background-size:
      auto,
      auto,
      auto,
      14px 14px;
  }

  .mobile-preview-panel .resume-paper {
    min-height: auto;
    margin-bottom: 16px;
  }

  .pdf-editor-backdrop {
    padding: 10px;
    align-items: stretch;
  }

  .pdf-editor-panel {
    position: static;
    top: auto;
    bottom: auto;
    left: auto;
    transform: none;
    width: 100%;
    max-height: none;
    height: 100%;
    border-radius: 18px;
    padding: 12px;
  }

  .pdf-editor-layout {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .pdf-editor-controls {
    max-height: 42vh;
  }

  .pdf-editor-preset-grid {
    grid-template-columns: 1fr;
  }

  .pdf-editor-preview-stage {
    min-height: 52vh;
  }

  .pdf-editor-preview-frame {
    min-height: 52vh;
  }

  .job-result-item {
    flex-direction: column;
  }

  .job-result-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .paywall-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .pdf-editor-controls {
    max-height: 38vh;
  }

  .pdf-editor-inline-grid {
    grid-template-columns: 1fr;
  }

  .pdf-editor-preview-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .pdf-editor-preview-toolbar-note {
    text-align: left;
  }

  .pdf-editor-preview-stage {
    min-height: 46vh;
  }

  .pdf-editor-import-card-actions {
    justify-content: stretch;
  }

  .pdf-editor-import-card-actions .button {
    width: 100%;
  }

  .pdf-editor-import-card-head {
    flex-direction: column;
  }

  .pdf-layout-attachment-card {
    min-width: 0;
    width: 100%;
    max-width: none;
  }

  .pdf-editor-preview-frame {
    min-height: 46vh;
  }

  .landing-header {
    position: static;
    border-radius: 24px;
    padding: 12px;
  }

  .landing-header-actions {
    width: 100%;
    justify-content: stretch;
  }

  .landing-header-actions .button {
    flex: 1 1 0;
  }

  .landing-header-actions .theme-toggle-button {
    flex: 0 0 auto;
    width: 52px;
    min-width: 52px;
  }

  .job-refyne-sheet-backdrop {
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
  }

  .job-refyne-sheet {
    width: 100%;
    min-height: 100dvh;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }

  .job-refyne-sheet-grabber {
    padding-top: calc(10px + var(--safe-top));
    padding-bottom: 8px;
    background:
      linear-gradient(
        180deg,
        color-mix(in srgb, var(--accent) 7%, transparent),
        color-mix(in srgb, var(--card-subtle-bg) 72%, transparent)
      );
    touch-action: none;
  }

  .job-refyne-sheet-handle {
    width: 88px;
    max-width: 34vw;
  }

  .job-refyne-sheet-head,
  .job-refyne-sheet-body {
    padding-left: 14px;
    padding-right: 14px;
  }

  .job-refyne-sheet-head {
    flex-direction: column;
    align-items: stretch;
    padding-top: 8px;
  }

  .job-refyne-sheet-head h3 {
    font-size: clamp(1.3rem, 6vw, 1.72rem);
  }

  .job-refyne-head-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .job-refyne-head-actions .button:not(.job-refyne-sheet-close) {
    flex: 1 1 auto;
  }

  .job-refyne-sheet-close {
    align-self: flex-end;
  }

  .job-refyne-sheet-body {
    max-height: none;
    padding-top: 14px;
    padding-bottom: calc(18px + var(--safe-bottom));
  }

  .job-refyne-tab-shell {
    padding-left: 8px;
    padding-right: 8px;
  }

  .job-refyne-sheet-tab {
    padding: 11px 12px 10px;
    font-size: 0.9rem;
  }

  .job-refyne-job-copy {
    grid-template-columns: 1fr;
  }

  .job-refyne-actions .button,
  .job-refyne-option-list .button,
  .job-result-actions .button {
    width: 100%;
  }

  .job-refyne-inline-download,
  .job-refyne-inline-download .download-menu-trigger,
  .job-refyne-mode-menu,
  .job-refyne-mode-menu .tailor-menu-trigger {
    width: 100%;
    min-width: 0;
  }

  .job-refyne-inline-download .download-menu-panel,
  .job-refyne-mode-menu .tailor-menu-panel {
    left: 0;
    right: auto;
    width: 100%;
    min-width: 0;
  }

  .landing-hero,
  .landing-film-card,
  .landing-platform-card {
    border-radius: 18px;
    padding: 14px;
  }

  .landing-hero h2 {
    font-size: clamp(1.7rem, 9vw, 2.7rem);
    line-height: 1.02;
  }

  .landing-actions .button {
    flex: 1 1 100%;
  }

  .landing-stats {
    grid-template-columns: 1fr;
  }

  .landing-film-card {
    min-height: 280px;
  }

  .landing-film-card h3 {
    font-size: 1.34rem;
  }

  .landing-storyline-item {
    padding: 14px 0;
  }

  .landing-feature-row {
    align-items: flex-start;
  }

  .landing-platform-actions {
    flex-direction: column;
  }

  .landing-platform-actions .platform-button {
    width: 100%;
  }

  .native-signup-card {
    padding: 20px;
    border-radius: 24px;
  }

  .native-signup-logo-wrap {
    width: 88px;
    height: 88px;
    border-radius: 20px;
    border: 0;
    background: transparent;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  }

  .native-signup-logo {
    width: 88px;
    height: 88px;
    border-radius: 20px;
    object-fit: cover;
  }

  .native-signup-preview {
    padding: 12px;
  }

  .topbar {
    padding: 10px 12px;
    border-radius: 18px;
    gap: 10px;
  }

  .topbar::after {
    left: 14px;
    right: 14px;
    opacity: 0.3;
  }

  .brand {
    grid-template-areas: "logo title";
    column-gap: 8px;
  }

  .brand h1,
  .brand-title {
    font-size: 1.16rem;
  }

  .app-logo {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .topbar-actions {
    gap: 6px;
  }

  .mobile-theme-toggle,
  .mobile-menu-toggle {
    min-height: 40px;
    min-width: 40px;
    padding: 8px;
    border-radius: 14px;
    box-shadow: 0 6px 14px rgba(10, 42, 50, 0.12);
  }

  .workspace-sidebar {
    padding: 4px;
    border-radius: 15px;
    overflow: hidden;
    width: 100%;
  }

  .workspace-sidebar-nav {
    display: flex;
    flex-wrap: nowrap !important;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 2px 20px 2px 2px;
  }

  .workspace-sidebar-nav::-webkit-scrollbar {
    display: none;
  }

  .workspace-nav-button {
    width: auto;
    min-width: auto;
    flex: 0 0 auto;
    flex-direction: row;
    min-height: 42px;
    padding: 9px 10px;
    font-size: 0.89rem;
    border-radius: 11px;
    gap: 6px;
    white-space: nowrap;
  }

  .workspace-nav-button span {
    line-height: 1.15;
  }

  .grid.two {
    grid-template-columns: 1fr;
  }

  .insight-grid {
    grid-template-columns: 1fr;
  }

  .ats-dual-score-grid {
    grid-template-columns: 1fr;
  }

  .cover-letter-context-grid {
    grid-template-columns: 1fr;
  }

  .ats-audit-signal-grid {
    grid-template-columns: 1fr;
  }

  .tailor-actions {
    grid-template-columns: 1fr;
  }

  .template-hint,
  .linkedin-import-copy {
    margin: 4px 0 10px;
    font-size: 0.86rem;
    line-height: 1.45;
  }

  .template-palette-panel {
    gap: 8px;
    margin-bottom: 12px;
    padding: 10px;
    border-radius: 12px;
  }

  .template-palette-head {
    gap: 8px;
    flex-wrap: wrap;
  }

  .template-palette-title {
    font-size: 0.74rem;
  }

  .template-palette-status {
    margin-top: 2px;
    font-size: 0.74rem;
  }

  .template-palette-swatch {
    width: 34px;
    height: 34px;
  }

  .tailor-efficiency-tip-wrap {
    width: 100%;
  }

  .tailor-efficiency-tip-trigger {
    width: 100%;
    justify-content: center;
  }

  .tailor-efficiency-tooltip {
    width: min(100%, 420px);
  }

  .resume-paper {
    padding: 28px 20px;
  }

  .template-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .template-option {
    padding: 10px;
    border-radius: 11px;
  }

  .template-desc {
    margin-top: 3px;
    font-size: 0.74rem;
  }

  .resume-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .resume-aside {
    border-right: none;
    border-bottom: 1px solid var(--resume-paper-border);
    padding-right: 0;
    padding-bottom: 14px;
    margin-bottom: 14px;
  }

  .profile-launch {
    max-width: 100%;
  }

  .profile-detail-grid {
    grid-template-columns: 1fr;
  }

  .resume-library-item {
    flex-direction: column;
    align-items: stretch;
  }

  .resume-library-actions {
    justify-content: flex-start;
  }

  .job-workspace-score-grid {
    grid-template-columns: 1fr;
  }

  .job-workspace-hero-actions .button,
  .job-workspace-list-item .button {
    width: 100%;
  }

  .job-refyne-sheet-tab {
    padding: 8px 12px;
    font-size: 0.84rem;
  }

  .submission-readiness-footer .button {
    width: 100%;
  }

  .mobile-preview-cta {
    right: 10px;
    bottom: calc(10px + var(--safe-bottom));
    min-height: 44px;
    padding: 9px 13px;
    font-size: 0.98rem;
    box-shadow: 0 10px 20px rgba(2, 11, 14, 0.3);
  }

  .mobile-preview-cta .button-content {
    gap: 7px;
  }

  .profile-hub-stats {
    grid-template-columns: 1fr;
  }

  .profile-hub-admin-grid {
    grid-template-columns: 1fr;
  }

  .profile-hub-panel {
    width: 100vw;
    border-left: none;
  }

  .billing-toggle {
    grid-template-columns: 1fr;
  }

  .paywall-panel {
    padding: 14px;
    border-radius: 16px;
  }
}

/* Sectional marketing pages */
.marketing-shell {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: 100svh;
  overflow-x: hidden;
  --marketing-max-width: 1280px;
  padding: clamp(14px, 2vw, 24px);
  padding-bottom: calc(12px + var(--safe-bottom));
  --mk-scroll-drift: 0px;
  --mk-scroll-drift-negative: 0px;
  --mk-pointer-x: 0;
  --mk-pointer-y: 0;
  background:
    radial-gradient(circle at 12% 10%, rgba(70, 211, 212, 0.2), transparent 38%),
    radial-gradient(circle at 86% 16%, rgba(34, 137, 176, 0.18), transparent 44%),
    linear-gradient(165deg, rgba(5, 41, 55, 0.98) 0%, rgba(7, 31, 45, 0.98) 100%);
  color: var(--ink);
}

.marketing-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.04), transparent 38%),
    radial-gradient(circle at 50% -10%, rgba(127, 241, 230, 0.12), transparent 54%);
}

:root[data-theme="light"] .marketing-shell {
  /* Pure white background — clean, Apple-like. The radial accents are
     barely-there color hints (4-6% alpha) so the page still has tiny
     depth without competing with content. */
  background:
    radial-gradient(circle at 10% 10%, rgba(94, 202, 197, 0.05), transparent 36%),
    radial-gradient(circle at 88% 14%, rgba(167, 139, 250, 0.04), transparent 40%),
    #ffffff;
}
:root[data-theme="light"] .marketing-shell::before {
  /* The fixed overlay above the page can read too "milky" on white —
     mute it down for the light theme. */
  background: none;
}
:root[data-theme="light"] .marketing-shell .landing-orb {
  /* Orbs are decorative blurs — too dominant on a white background.
     Drop opacity so the page feels clean, not busy. */
  opacity: 0.18;
}

.marketing-shell .landing-orb {
  position: fixed;
  opacity: 0.45;
  filter: blur(48px);
  transition: transform 360ms ease-out;
  z-index: 0;
}

.marketing-shell .landing-orb-a {
  transform: translate3d(
      calc(var(--mk-pointer-x) * 28px),
      calc(var(--mk-scroll-drift-negative) + (var(--mk-pointer-y) * -18px)),
      0
    )
    scale(1.02);
}

.marketing-shell .landing-orb-b {
  transform: translate3d(
      calc(var(--mk-pointer-x) * -24px),
      calc(var(--mk-scroll-drift) + (var(--mk-pointer-y) * 14px)),
      0
    )
    scale(1.04);
}

.marketing-shell .landing-orb-c {
  transform: translate3d(
      calc(var(--mk-pointer-x) * 16px),
      calc((var(--mk-scroll-drift) * 0.5) + (var(--mk-pointer-y) * 12px)),
      0
    )
    scale(1.01);
}

.marketing-header {
  position: sticky;
  top: calc(var(--safe-top) + 12px);
  width: min(var(--marketing-max-width), 100%);
  margin: 0 auto;
  box-sizing: border-box;
  z-index: 30;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--topbar-border) 80%, transparent);
  border-radius: 20px;
  background: linear-gradient(145deg, var(--surface-glass-strong), var(--surface-glass));
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
}

.marketing-header > .brand-link {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.marketing-header .brand {
  min-width: 0;
  column-gap: 12px;
}

.marketing-header .brand-title {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
}

.marketing-nav {
  display: inline-flex;
  gap: 8px;
  justify-self: center;
  flex-wrap: wrap;
  min-width: 0;
}

.marketing-nav-link {
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  min-height: 40px;
  padding: 8px 14px;
  cursor: pointer;
  transition:
    border-color 0.22s ease,
    color 0.22s ease,
    background-color 0.22s ease,
    transform 0.22s ease;
}

.marketing-nav-link:hover {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--accent) 22%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 54%, transparent);
  transform: translateY(-1px);
}

.marketing-nav-link.active {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  box-shadow: none;
}

.marketing-nav-link:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px var(--focus-ring),
    0 0 0 6px color-mix(in srgb, var(--accent) 10%, transparent);
}

.marketing-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  justify-self: end;
}

.marketing-header-actions .profile-launch {
  max-width: min(300px, 34vw);
  min-height: 42px;
}

.marketing-desktop-auth-action {
  display: inline-flex;
  align-items: center;
}

.marketing-menu-trigger {
  display: none;
}

.marketing-menu-trigger.authenticated {
  padding: 5px;
  width: 44px;
  min-width: 44px;
}

.marketing-menu-icon {
  width: 20px;
  height: 20px;
}

.marketing-menu-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(175, 228, 223, 0.5);
  object-fit: cover;
  flex: 0 0 auto;
}

.marketing-menu-avatar-fallback {
  display: inline-grid;
  place-items: center;
  font-size: 0.66rem;
  font-weight: 800;
}

.marketing-mobile-menu-backdrop {
  display: none;
}

.marketing-mobile-menu {
  display: none;
}

.marketing-main {
  display: grid;
  gap: 26px;
  margin: 28px auto 0;
  width: min(var(--marketing-max-width), 100%);
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

.marketing-section {
  box-sizing: border-box;
  border: 1px solid color-mix(in srgb, var(--line) 66%, transparent);
  border-radius: 28px;
  padding: clamp(22px, 3vw, 36px);
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-elevated) 88%, transparent), color-mix(in srgb, var(--card-subtle-bg) 76%, transparent));
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px) saturate(1.02);
}

.marketing-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 600px);
  gap: clamp(22px, 3vw, 40px);
  align-items: center;
}

.marketing-hero h2,
.marketing-page-title {
  margin: 0 0 12px;
  font-size: clamp(32px, 4.8vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.marketing-page-copy {
  margin: 0;
  font-size: 19px;
  line-height: 1.62;
  color: var(--muted);
  max-width: 72ch;
}

.marketing-hero-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.marketing-summary-card {
  border: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  border-radius: 22px;
  padding: 20px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-elevated) 84%, transparent), color-mix(in srgb, var(--card-subtle-bg) 82%, transparent));
  transform: translateY(var(--mk-scroll-drift-negative));
  transition: transform 300ms ease-out;
}

.marketing-summary-kicker {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--muted);
}

.marketing-summary-steps {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--ink);
}

.marketing-section-title {
  margin: 0 0 12px;
  font-size: clamp(24px, 3vw, 36px);
}

.marketing-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.marketing-feature-card {
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-elevated) 84%, transparent), color-mix(in srgb, var(--card-subtle-bg) 86%, transparent));
}

.marketing-feature-card h4 {
  margin: 8px 0 6px;
  font-size: 16px;
}

.marketing-feature-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

.marketing-feature-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}

.marketing-showcase {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.marketing-showcase-card {
  border: 1px solid color-mix(in srgb, var(--line) 68%, transparent);
  border-radius: 20px;
  padding: 20px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-elevated) 84%, transparent), color-mix(in srgb, var(--card-subtle-bg) 84%, transparent));
}

.marketing-showcase-card h4 {
  margin: 0 0 8px;
  font-size: 22px;
}

.marketing-showcase-card p {
  margin: 0 0 12px;
  color: var(--muted);
}

.marketing-platform-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.marketing-hero-premium {
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 18%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 34%),
    radial-gradient(circle at 86% 6%, rgba(111, 196, 255, 0.12), transparent 30%),
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--surface-elevated) 96%, rgba(255, 255, 255, 0.1)),
      color-mix(in srgb, var(--card-subtle-bg) 86%, transparent)
    );
}

:root[data-theme="light"] .marketing-hero-premium {
  background:
    radial-gradient(circle at 14% 18%, rgba(68, 188, 189, 0.18), transparent 34%),
    radial-gradient(circle at 86% 6%, rgba(111, 196, 255, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(246, 252, 254, 0.98), rgba(236, 247, 250, 0.94));
}

.marketing-hero-premium-grid {
  gap: clamp(18px, 3vw, 30px);
  align-items: center;
  grid-template-columns: minmax(0, 1.3fr) minmax(160px, 320px);
}

.marketing-hero-premium h2 {
  font-size: clamp(22px, 2.4vw, 36px);
}

.marketing-hero-copy {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.marketing-hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.marketing-hero-proof span,
.marketing-window-chip-row span,
.marketing-shot-chip-row span,
.marketing-platform-tags span {
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: color-mix(in srgb, var(--accent) 7%, var(--surface-elevated));
}

.marketing-hero-proof span::before {
  content: "✓";
  margin-right: 5px;
  color: var(--accent);
  font-size: 11px;
}

.marketing-product-window {
  position: relative;
  border: 1px solid color-mix(in srgb, var(--line) 68%, transparent);
  border-radius: 34px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(6, 37, 52, 0.98), rgba(3, 19, 30, 0.98)),
    linear-gradient(180deg, color-mix(in srgb, var(--surface-elevated) 90%, transparent), transparent);
  box-shadow:
    0 26px 60px rgba(4, 16, 24, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

:root[data-theme="light"] .marketing-product-window {
  background:
    linear-gradient(180deg, rgba(247, 251, 254, 0.98), rgba(232, 245, 249, 0.96)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), transparent);
  box-shadow:
    0 24px 58px rgba(14, 62, 80, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.marketing-product-window::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 82% 10%, rgba(110, 214, 255, 0.18), transparent 28%),
    radial-gradient(circle at 16% 84%, rgba(85, 212, 190, 0.12), transparent 32%);
  pointer-events: none;
}

.marketing-window-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.marketing-window-dots {
  display: inline-flex;
  gap: 6px;
}

.marketing-window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
}

:root[data-theme="light"] .marketing-window-dots span {
  background: rgba(16, 53, 71, 0.16);
}

.marketing-window-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.marketing-window-tabs span {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(240, 249, 250, 0.78);
  background: rgba(255, 255, 255, 0.04);
}

.marketing-window-tabs span.active {
  background: rgba(85, 212, 190, 0.14);
  color: #f8fffd;
  border-color: rgba(85, 212, 190, 0.22);
}

:root[data-theme="light"] .marketing-window-tabs span {
  border-color: rgba(15, 69, 90, 0.1);
  color: rgba(12, 39, 51, 0.72);
  background: rgba(255, 255, 255, 0.68);
}

:root[data-theme="light"] .marketing-window-tabs span.active {
  background: rgba(55, 185, 186, 0.12);
  color: rgba(8, 36, 47, 0.92);
  border-color: rgba(55, 185, 186, 0.22);
}

.marketing-window-body {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  gap: 14px;
  min-height: 520px;
}

.marketing-window-sidebar,
.marketing-window-canvas,
.marketing-shot-card,
.marketing-product-art-card {
  border: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  background: color-mix(in srgb, var(--surface-elevated) 78%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.marketing-window-sidebar {
  border-radius: 26px;
  padding: 18px;
  display: grid;
  gap: 16px;
  align-content: start;
}

.marketing-window-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.marketing-window-brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: #f4fffd;
  background: linear-gradient(180deg, rgba(69, 197, 200, 0.9), rgba(40, 149, 156, 0.9));
}

.marketing-window-brand strong,
.marketing-window-sidecard strong,
.marketing-window-panel strong,
.marketing-window-floating-card strong,
.marketing-product-art-card strong,
.marketing-shot-card h4 {
  display: block;
}

.marketing-window-brand strong {
  font-size: 15px;
}

.marketing-window-brand span,
.marketing-window-sidecard span,
.marketing-window-panel p,
.marketing-window-floating-card span {
  color: var(--muted);
  font-size: 12px;
}

.marketing-window-nav {
  display: grid;
  gap: 8px;
}

.marketing-window-nav span {
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 10px 12px;
  font-weight: 700;
  color: rgba(234, 246, 247, 0.78);
  background: rgba(255, 255, 255, 0.04);
}

.marketing-window-nav span.active {
  color: #f7fffd;
  border-color: rgba(86, 214, 191, 0.22);
  background: rgba(86, 214, 191, 0.12);
}

:root[data-theme="light"] .marketing-window-nav span {
  color: rgba(16, 46, 58, 0.76);
  background: rgba(255, 255, 255, 0.72);
}

:root[data-theme="light"] .marketing-window-nav span.active {
  color: rgba(8, 38, 49, 0.92);
  border-color: rgba(56, 185, 186, 0.2);
  background: rgba(56, 185, 186, 0.1);
}

.marketing-window-sidecard {
  margin-top: auto;
  border-radius: 20px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.05);
}

.marketing-window-sidecard p,
.marketing-window-floating-card p,
.marketing-window-panel-kicker,
.marketing-window-kicker,
.marketing-product-art-kicker {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--muted);
}

.marketing-window-canvas {
  border-radius: 28px;
  padding: 18px;
  display: grid;
  gap: 16px;
}

.marketing-window-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.marketing-window-layout {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.marketing-window-controls {
  display: grid;
  gap: 10px;
}

.marketing-window-panel {
  border-radius: 20px;
  padding: 14px;
  display: grid;
  gap: 8px;
}

.marketing-window-panel strong {
  font-size: 16px;
  color: var(--ink);
}

.marketing-window-button,
.marketing-shot-cta {
  border-radius: 18px;
  padding: 13px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  color: #06242d;
  background: linear-gradient(135deg, rgba(84, 214, 191, 0.94), rgba(63, 189, 234, 0.92));
  box-shadow: 0 16px 30px rgba(24, 136, 148, 0.22);
}

.marketing-window-preview {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: 18px;
  background:
    radial-gradient(circle at 18% 18%, rgba(87, 214, 191, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.marketing-window-floating-card {
  position: absolute;
  top: 18px;
  right: 18px;
  width: min(220px, 44%);
  border-radius: 20px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 34px rgba(6, 23, 30, 0.14);
}

.marketing-window-floating-card strong {
  margin: 6px 0 4px;
  font-size: 16px;
  color: #0c2832;
}

.marketing-window-page {
  position: relative;
  width: min(100%, 356px);
  aspect-ratio: 8.5 / 11;
  margin: 58px auto 0;
  border-radius: 26px;
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 12px;
  background: #ffffff;
  box-shadow: 0 26px 50px rgba(7, 23, 29, 0.18);
}

.marketing-window-page-header {
  border-radius: 18px;
  padding: 18px;
  display: grid;
  gap: 6px;
  background: linear-gradient(180deg, rgba(235, 246, 249, 0.92), rgba(248, 252, 253, 0.98));
  border: 1px solid rgba(210, 226, 232, 0.94);
}

.marketing-window-page-header strong {
  font-size: 24px;
  line-height: 1.05;
  color: #112a33;
}

.marketing-window-page-header span {
  color: #4f6a73;
  font-weight: 600;
}

.marketing-window-page-block {
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 8px;
  border: 1px solid rgba(219, 232, 236, 0.96);
  background: rgba(255, 255, 255, 0.96);
}

.marketing-window-page-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  font-weight: 800;
  color: #17313a;
}

.marketing-window-badge {
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 700;
  color: #0f5a63;
  background: rgba(77, 188, 190, 0.12);
}

.marketing-window-badge.subtle {
  color: #556f78;
  background: rgba(86, 107, 116, 0.08);
}

.marketing-window-line,
.marketing-shot-preview-line,
.marketing-product-art-lines span {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(39, 95, 112, 0.16), rgba(39, 95, 112, 0.08));
}

.marketing-window-line.long,
.marketing-shot-preview-line.long,
.marketing-product-art-lines .long {
  width: 100%;
}

.marketing-window-line.medium,
.marketing-shot-preview-line.medium,
.marketing-product-art-lines .medium {
  width: 72%;
}

.marketing-window-line.short,
.marketing-shot-preview-line.short,
.marketing-product-art-lines .short {
  width: 48%;
}

.marketing-window-pill-row,
.marketing-product-pill-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.marketing-window-pill-row span,
.marketing-product-pill-stack span {
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #12323b;
  background: rgba(78, 191, 193, 0.12);
}

.marketing-product-window {
  width: 100%;
  max-width: 600px;
  margin-left: auto;
  min-width: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.marketing-product-window::before,
.marketing-product-window::after {
  display: none;
}

.marketing-cover-shell {
  position: relative;
  width: 100%;
  max-width: 600px;
  aspect-ratio: 2 / 1;
  min-height: clamp(220px, 30vw, 300px);
  border: 1px solid rgba(171, 210, 220, 0.34);
  border-radius: 34px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 12% 18%, rgba(84, 214, 191, 0.22), transparent 28%),
    radial-gradient(circle at 86% 12%, rgba(104, 181, 255, 0.2), transparent 30%),
    linear-gradient(135deg, rgba(247, 252, 255, 0.98), rgba(229, 243, 249, 0.96));
  box-shadow:
    0 30px 70px rgba(7, 22, 31, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.marketing-cover-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), transparent 38%),
    radial-gradient(circle at 1px 1px, rgba(35, 104, 126, 0.08) 1px, transparent 0);
  background-size: auto, 16px 16px;
  pointer-events: none;
}

.marketing-cover-shell::after {
  content: "";
  position: absolute;
  top: -24%;
  bottom: -24%;
  left: -42%;
  width: 34%;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.64), transparent);
  transform: translateX(-180%) skewX(-18deg);
  transition:
    transform 900ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 260ms ease;
  pointer-events: none;
  z-index: 4;
}

.marketing-cover-shell:hover::after {
  opacity: 1;
  transform: translateX(420%) skewX(-18deg);
}

.marketing-cover-chip,
.marketing-cover-card,
.marketing-cover-document-stack,
.marketing-cover-metrics {
  position: absolute;
  transition: transform 560ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.marketing-cover-chip {
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid rgba(163, 205, 216, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 12px 26px rgba(10, 28, 37, 0.08);
  color: #143743;
  font-size: 11px;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.marketing-cover-chip .button-icon {
  width: 13px;
  height: 13px;
}

.marketing-cover-chip-a {
  top: 18px;
  left: 18px;
}

.marketing-cover-chip-b {
  top: 18px;
  right: 18px;
}

.marketing-cover-chip-c {
  left: 20px;
  bottom: 18px;
}

.marketing-cover-card {
  z-index: 3;
  border: 1px solid rgba(163, 205, 216, 0.38);
  border-radius: 24px;
  padding: 16px;
  display: grid;
  gap: 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(240, 247, 251, 0.9)),
    linear-gradient(145deg, rgba(245, 252, 255, 0.68), rgba(255, 255, 255, 0.2));
  box-shadow:
    0 18px 36px rgba(7, 24, 33, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.marketing-cover-card p {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 800;
  color: rgba(20, 67, 80, 0.54);
}

.marketing-cover-card strong {
  display: block;
  font-size: 20px;
  line-height: 1.04;
  color: #0d2b35;
}

.marketing-cover-card span {
  color: #5f7881;
  font-size: 13px;
  line-height: 1.45;
}

.marketing-cover-card-primary {
  top: 74px;
  left: 22px;
  width: min(220px, 34%);
}

.marketing-cover-card-secondary {
  left: 54px;
  bottom: 28px;
  width: min(246px, 40%);
}

.marketing-cover-document-stack {
  z-index: 4;
  top: 34px;
  right: 22px;
  width: 44%;
  height: 76%;
  transform-style: preserve-3d;
}

.marketing-cover-sheet {
  position: absolute;
  inset: 0;
  border-radius: 28px;
}

.marketing-cover-sheet-shadow {
  background: rgba(16, 47, 59, 0.12);
  filter: blur(18px);
  transform: translate3d(12px, 18px, 0) rotate(7deg);
}

.marketing-cover-sheet-back {
  border: 1px solid rgba(208, 226, 232, 0.84);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 40px rgba(9, 26, 34, 0.1);
  transform: translate3d(-10px, 12px, 0) rotate(-6deg);
}

.marketing-cover-sheet-front {
  border: 1px solid rgba(208, 226, 232, 0.94);
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 10px;
  background: #ffffff;
  box-shadow:
    0 22px 48px rgba(11, 27, 35, 0.16),
    0 10px 18px rgba(11, 27, 35, 0.06);
}

.marketing-cover-sheet-front::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 10px;
  border-radius: 28px 28px 0 0;
  background: linear-gradient(90deg, rgba(81, 191, 190, 0.96), rgba(116, 171, 240, 0.92));
}

.marketing-cover-sheet-topbar,
.marketing-cover-sheet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.marketing-cover-sheet-topbar {
  margin-top: 4px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(25, 71, 84, 0.58);
  font-weight: 800;
}

.marketing-cover-sheet-header {
  border: 1px solid rgba(208, 226, 232, 0.94);
  border-radius: 18px;
  padding: 16px 14px;
  display: grid;
  gap: 4px;
  background: linear-gradient(180deg, rgba(236, 247, 250, 0.92), rgba(250, 253, 254, 0.98));
}

.marketing-cover-sheet-header strong {
  display: block;
  font-size: 24px;
  line-height: 1.02;
  color: #132f39;
}

.marketing-cover-sheet-header span {
  color: #52707a;
  font-size: 13px;
  font-weight: 700;
}

.marketing-cover-sheet-section {
  border: 1px solid rgba(220, 233, 236, 0.96);
  border-radius: 18px;
  padding: 12px;
  display: grid;
  gap: 8px;
  background: rgba(255, 255, 255, 0.98);
}

.marketing-cover-sheet-row span {
  font-size: 12px;
  font-weight: 800;
  color: #17333d;
}

.marketing-cover-sheet-row em {
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  color: #0f5a63;
  background: rgba(77, 188, 190, 0.12);
}

.marketing-cover-sheet-line {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(39, 95, 112, 0.16), rgba(39, 95, 112, 0.08));
}

.marketing-cover-sheet-line.long {
  width: 100%;
}

.marketing-cover-sheet-line.medium {
  width: 72%;
}

.marketing-cover-sheet-line.short {
  width: 48%;
}

.marketing-cover-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.marketing-cover-pill-row span {
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 700;
  color: #12323b;
  background: rgba(78, 191, 193, 0.12);
}

.marketing-cover-metrics {
  right: 22px;
  bottom: 20px;
  z-index: 2;
  width: 172px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.marketing-cover-metric {
  border: 1px solid rgba(163, 205, 216, 0.38);
  border-radius: 18px;
  padding: 12px 10px;
  display: grid;
  gap: 4px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 28px rgba(9, 26, 35, 0.08);
}

.marketing-cover-metric strong {
  display: block;
  font-size: 14px;
  color: #0e2d38;
}

.marketing-cover-metric span {
  font-size: 11px;
  color: #617983;
}

.marketing-cover-shell:hover .marketing-cover-chip-a {
  transform: translate3d(8px, -6px, 0);
}

.marketing-cover-shell:hover .marketing-cover-chip-b {
  transform: translate3d(-8px, -4px, 0);
}

.marketing-cover-shell:hover .marketing-cover-chip-c {
  transform: translate3d(10px, 4px, 0);
}

.marketing-cover-shell:hover .marketing-cover-card-primary {
  transform: translate3d(10px, -12px, 0) rotate(-2deg);
}

.marketing-cover-shell:hover .marketing-cover-card-secondary {
  transform: translate3d(18px, 8px, 0) rotate(2deg);
}

.marketing-cover-shell:hover .marketing-cover-document-stack {
  transform: translate3d(-18px, -10px, 0) rotate(-4deg) scale(1.02);
}

.marketing-cover-shell:hover .marketing-cover-metrics {
  transform: translate3d(-10px, -8px, 0);
}

@media (prefers-reduced-motion: reduce) {
  .marketing-cover-shell::after {
    display: none;
  }

  .marketing-about-cover-shell {
    animation: none;
  }

  .marketing-cover-chip,
  .marketing-cover-card,
  .marketing-cover-document-stack,
  .marketing-cover-metrics {
    transition: none;
  }
}

.marketing-shot-card,
.marketing-product-art-card {
  border: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  background: color-mix(in srgb, var(--surface-elevated) 78%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.marketing-shot-gallery,
.marketing-product-runway {
  display: grid;
  gap: 18px;
}

.marketing-section-intro {
  display: grid;
  gap: 8px;
  max-width: 72ch;
}

.marketing-shot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.marketing-shot-card {
  border-radius: 26px;
  padding: 18px;
  display: grid;
  gap: 14px;
}

.marketing-shot-card h4 {
  margin: 0;
  font-size: 24px;
  line-height: 1.08;
}

.marketing-shot-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.marketing-shot-frame {
  border-radius: 24px;
  padding: 14px;
  min-height: 248px;
  border: 1px solid color-mix(in srgb, var(--line) 64%, transparent);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04)),
    linear-gradient(160deg, rgba(8, 40, 56, 0.96), rgba(5, 24, 35, 0.98));
  overflow: hidden;
}

:root[data-theme="light"] .marketing-shot-frame {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.28)),
    linear-gradient(160deg, rgba(238, 248, 251, 0.96), rgba(228, 243, 247, 0.96));
}

.marketing-shot-real-image-wrap {
  position: relative;
  min-height: 248px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 64%, transparent);
  background:
    radial-gradient(circle at 16% 14%, rgba(87, 214, 191, 0.18), transparent 26%),
    linear-gradient(160deg, rgba(8, 40, 56, 0.98), rgba(5, 24, 35, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 34px rgba(5, 18, 26, 0.16);
}

:root[data-theme="light"] .marketing-shot-real-image-wrap {
  background:
    radial-gradient(circle at 16% 14%, rgba(87, 214, 191, 0.14), transparent 26%),
    linear-gradient(160deg, rgba(240, 249, 252, 0.98), rgba(229, 243, 247, 0.98));
}

.marketing-shot-real-image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(3, 16, 26, 0.02), rgba(3, 16, 26, 0.52)),
    linear-gradient(90deg, rgba(3, 16, 26, 0.08), transparent 42%);
  pointer-events: none;
}

.marketing-shot-real-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 248px;
  object-fit: cover;
  object-position: top left;
  transform: scale(1.02);
}

.marketing-shot-real-overlay {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 1;
  display: grid;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 14px;
  background: rgba(6, 28, 40, 0.72);
  backdrop-filter: blur(16px);
  box-shadow: 0 14px 28px rgba(4, 14, 23, 0.22);
}

.marketing-shot-real-overlay .marketing-summary-kicker {
  color: rgba(220, 245, 248, 0.72);
}

.marketing-shot-real-overlay strong {
  font-size: 22px;
  line-height: 1.08;
  color: #f7fffd;
}

.marketing-shot-real-overlay span {
  color: rgba(226, 240, 244, 0.88);
  line-height: 1.45;
}

.marketing-shot-frame-builder {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
}

.marketing-shot-rail,
.marketing-shot-settings,
.marketing-shot-field-stack {
  display: grid;
  gap: 8px;
  align-content: start;
}

.marketing-shot-rail span,
.marketing-shot-settings span {
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(238, 248, 250, 0.78);
  background: rgba(255, 255, 255, 0.06);
}

.marketing-shot-rail span.active {
  background: rgba(79, 199, 194, 0.14);
  color: #f7fffd;
}

:root[data-theme="light"] .marketing-shot-rail span,
:root[data-theme="light"] .marketing-shot-settings span {
  color: rgba(14, 47, 61, 0.78);
  background: rgba(255, 255, 255, 0.72);
}

.marketing-shot-editor,
.marketing-shot-extension-panel {
  border-radius: 18px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.marketing-shot-toolbar,
.marketing-shot-extension-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(238, 248, 250, 0.82);
}

:root[data-theme="light"] .marketing-shot-toolbar,
:root[data-theme="light"] .marketing-shot-extension-top {
  color: rgba(12, 46, 58, 0.82);
}

.marketing-shot-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 10px;
  margin-top: 10px;
}

.marketing-shot-field-stack span {
  display: block;
  height: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
}

:root[data-theme="light"] .marketing-shot-field-stack span {
  background: rgba(23, 79, 100, 0.08);
}

.marketing-shot-preview-card,
.marketing-shot-page,
.marketing-product-art-card {
  border-radius: 20px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.9);
}

.marketing-shot-preview-head,
.marketing-shot-page-banner {
  height: 54px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(231, 245, 248, 0.94), rgba(248, 251, 252, 0.98));
}

.marketing-shot-frame-studio {
  display: grid;
  gap: 12px;
}

.marketing-shot-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.marketing-shot-studio-shell {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 10px;
}

.marketing-shot-page {
  display: grid;
  gap: 10px;
}

.marketing-shot-page-card {
  border-radius: 16px;
  padding: 12px;
  display: grid;
  gap: 8px;
  border: 1px solid rgba(220, 233, 236, 0.96);
}

.marketing-shot-frame-apply {
  display: grid;
  gap: 10px;
}

.marketing-shot-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.marketing-shot-toggle {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: rgba(124, 150, 160, 0.32);
}

.marketing-shot-toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ffffff;
  transition: transform 220ms ease;
}

.marketing-shot-toggle.active {
  background: rgba(72, 198, 194, 0.9);
}

.marketing-shot-toggle.active::after {
  transform: translateX(16px);
}

.marketing-product-rows {
  display: grid;
  gap: 16px;
}

.marketing-product-row {
  display: grid;
  grid-template-columns: 1fr 0.92fr;
  gap: clamp(16px, 2.4vw, 28px);
  align-items: center;
  padding-top: 18px;
  border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.marketing-product-row:first-child {
  padding-top: 0;
  border-top: none;
}

.marketing-product-row.reverse .marketing-product-row-copy {
  order: 2;
}

.marketing-product-row.reverse .marketing-product-row-art {
  order: 1;
}

.marketing-product-row-copy {
  display: grid;
  gap: 12px;
}

.marketing-product-row-copy h4 {
  margin: 0;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.marketing-product-row-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.marketing-product-bullet-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--ink);
}

.marketing-product-row-art {
  min-height: 250px;
  display: grid;
  align-items: stretch;
}

.marketing-product-art-card {
  min-height: 100%;
  display: grid;
  align-content: start;
  gap: 12px;
  border-radius: 28px;
  padding: 22px;
}

.marketing-product-row-art-layout .marketing-product-art-card {
  background:
    radial-gradient(circle at 14% 18%, rgba(72, 198, 194, 0.14), transparent 32%),
    linear-gradient(180deg, rgba(242, 250, 252, 0.96), rgba(232, 244, 248, 0.98));
}

.marketing-product-row-art-ai .marketing-product-art-card {
  background:
    radial-gradient(circle at 82% 18%, rgba(140, 168, 255, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(245, 247, 253, 0.96), rgba(234, 239, 251, 0.98));
}

.marketing-product-row-art-apply .marketing-product-art-card {
  background:
    radial-gradient(circle at 18% 20%, rgba(93, 214, 189, 0.14), transparent 30%),
    linear-gradient(180deg, rgba(241, 249, 251, 0.96), rgba(230, 242, 247, 0.98));
}

.marketing-product-art-card strong {
  font-size: 26px;
  line-height: 1.08;
  color: #0d2a33;
}

.marketing-product-art-lines {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

.marketing-showcase-premium {
  gap: 14px;
}

.marketing-platform-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.marketing-plan-list {
  margin: 0 0 14px;
  padding-left: 18px;
  display: grid;
  gap: 7px;
  color: var(--ink);
}

.marketing-timeline {
  display: grid;
  gap: 10px;
}

.marketing-timeline-item {
  border: 1px solid color-mix(in srgb, var(--line) 68%, transparent);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: flex-start;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-elevated) 86%, transparent), color-mix(in srgb, var(--card-subtle-bg) 88%, transparent));
}

.marketing-step-index {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-contrast);
  background: var(--accent);
}

.marketing-timeline-item h4 {
  margin: 0 0 6px;
  font-size: 18px;
}

.marketing-timeline-item p {
  margin: 0;
  color: var(--muted);
}

.marketing-values-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.marketing-value-card {
  border: 1px solid color-mix(in srgb, var(--line) 68%, transparent);
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-elevated) 86%, transparent), color-mix(in srgb, var(--card-subtle-bg) 88%, transparent));
}

.marketing-value-card h4 {
  margin: 0 0 8px;
  font-size: 18px;
}

.marketing-value-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.marketing-contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.marketing-contact-card {
  border: 1px solid color-mix(in srgb, var(--line) 68%, transparent);
  border-radius: 16px;
  padding: 16px;
  background: color-mix(in srgb, var(--card-subtle-bg) 88%, transparent);
}

.marketing-contact-card h4 {
  margin: 0 0 8px;
  font-size: 18px;
}

.marketing-contact-card p {
  margin: 0 0 12px;
  color: var(--muted);
}

.marketing-contact-card a {
  font-weight: 700;
  color: var(--accent);
}

.marketing-contact-cta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.marketing-about-intro {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 12px;
  align-items: start;
}

.marketing-about-intro-premium {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.95fr);
  gap: clamp(18px, 3vw, 34px);
  align-items: center;
}

.marketing-about-intro-copy {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.marketing-about-hero-visual {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.marketing-about-cover-shell {
  max-width: 520px;
  transform-origin: center right;
  animation: marketingAboutCoverFloat 8.4s ease-in-out infinite;
}

.marketing-about-proof-shell,
.marketing-about-flow-shell,
.marketing-about-audience-shell {
  display: grid;
  gap: 18px;
}

.marketing-about-proof-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.marketing-about-proof-card,
.marketing-about-flow-card,
.marketing-about-audience-card {
  border: 1px solid color-mix(in srgb, var(--line) 68%, transparent);
  border-radius: 24px;
  padding: 18px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-elevated) 88%, transparent), color-mix(in srgb, var(--card-subtle-bg) 86%, transparent));
  box-shadow: var(--shadow-soft);
}

.marketing-about-proof-card {
  display: grid;
  gap: 14px;
  overflow: hidden;
}

.marketing-about-proof-card-wide {
  grid-column: 1 / -1;
  grid-template-columns: minmax(220px, 0.78fr) minmax(0, 1.22fr);
  align-items: center;
}

.marketing-about-proof-copy {
  display: grid;
  gap: 10px;
  align-content: center;
}

.marketing-about-proof-copy h4,
.marketing-about-proof-card h4,
.marketing-about-flow-card h4,
.marketing-about-audience-card h4 {
  margin: 0;
  font-size: 28px;
  line-height: 1.05;
}

.marketing-about-proof-copy p:last-child,
.marketing-about-proof-card > p:last-child,
.marketing-about-flow-card p,
.marketing-about-audience-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.marketing-about-proof-art,
.marketing-about-proof-real-image {
  min-height: 264px;
  transition:
    transform 360ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 360ms ease;
}

.marketing-about-proof-card-wide .marketing-about-proof-art {
  min-height: 280px;
}

.marketing-about-proof-card:hover .marketing-about-proof-art,
.marketing-about-proof-card:hover .marketing-about-proof-real-image {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 22px 40px rgba(7, 24, 33, 0.16);
}

.marketing-about-flow-grid,
.marketing-about-audience-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.marketing-about-flow-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 12px;
}

.marketing-about-flow-card::before,
.marketing-about-audience-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 18%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 38%);
  opacity: 0.8;
  pointer-events: none;
}

.marketing-about-flow-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.marketing-about-flow-step {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--muted);
}

.marketing-about-flow-lines {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.marketing-about-flow-lines span {
  display: block;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(39, 95, 112, 0.16), rgba(39, 95, 112, 0.08));
}

.marketing-about-flow-lines .long {
  width: 100%;
}

.marketing-about-flow-lines .medium {
  width: 72%;
}

.marketing-about-flow-lines .short {
  width: 48%;
}

.marketing-about-audience-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 10px;
  min-height: 180px;
}

.marketing-about-actions {
  margin-top: 2px;
}

.marketing-about-highlight {
  border: 1px solid color-mix(in srgb, var(--line) 68%, transparent);
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-elevated) 84%, transparent), color-mix(in srgb, var(--card-subtle-bg) 86%, transparent));
}

.marketing-about-highlight p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.5;
}

.marketing-about-highlight-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.marketing-about-highlight-tags span {
  border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.marketing-use-case-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.marketing-use-case-card {
  border: 1px solid color-mix(in srgb, var(--line) 68%, transparent);
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-elevated) 84%, transparent), color-mix(in srgb, var(--card-subtle-bg) 86%, transparent));
}

.marketing-use-case-card h4 {
  margin: 0 0 8px;
  font-size: 18px;
}

.marketing-use-case-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

@keyframes marketingAboutCoverFloat {
  0%,
  100% {
    transform: translateY(0) scale(0.96);
  }
  50% {
    transform: translateY(-8px) scale(0.96);
  }
}

.marketing-contact-form-shell {
  overflow: hidden;
}

.marketing-contact-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 14px;
  align-items: stretch;
}

.marketing-contact-form {
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 24px;
  padding: clamp(18px, 2vw, 24px);
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-elevated) 86%, transparent), color-mix(in srgb, var(--card-subtle-bg) 86%, transparent));
  display: grid;
  gap: 14px;
}

.marketing-contact-form .marketing-page-title {
  margin: 0;
  font-size: clamp(34px, 3.2vw, 48px);
}

.marketing-contact-form .marketing-page-copy {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  max-width: 56ch;
}

.marketing-contact-form-fields {
  display: grid;
  gap: 10px;
}

.marketing-contact-form-fields label {
  display: grid;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--muted);
}

.marketing-contact-form-fields input,
.marketing-contact-form-fields select,
.marketing-contact-form-fields textarea {
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--card-bg) 74%, transparent);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.45;
  padding: 12px 14px;
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    background-color 0.22s ease;
}

.marketing-contact-form-fields textarea {
  min-height: 170px;
  resize: vertical;
}

.marketing-contact-form-fields input::placeholder,
.marketing-contact-form-fields textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 82%, transparent);
}

.marketing-contact-form-fields input:focus-visible,
.marketing-contact-form-fields select:focus-visible,
.marketing-contact-form-fields textarea:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 72%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
  background: color-mix(in srgb, var(--card-bg) 88%, transparent);
}

.marketing-contact-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.marketing-contact-form-actions .button {
  min-width: 180px;
}

.marketing-contact-asset {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 24px;
  padding: clamp(20px, 2.2vw, 28px);
  background:
    radial-gradient(circle at 18% 18%, color-mix(in srgb, var(--accent) 32%, transparent), transparent 46%),
    radial-gradient(circle at 82% 12%, rgba(126, 220, 255, 0.22), transparent 48%),
    linear-gradient(160deg, rgba(5, 37, 52, 0.92) 0%, rgba(4, 25, 38, 0.95) 100%);
  box-shadow: inset 0 0 0 1px rgba(120, 224, 234, 0.08);
  display: grid;
  align-items: end;
  min-height: 100%;
}

:root[data-theme="light"] .marketing-contact-asset {
  background:
    radial-gradient(circle at 16% 16%, rgba(75, 198, 199, 0.2), transparent 44%),
    radial-gradient(circle at 82% 12%, rgba(118, 181, 255, 0.16), transparent 46%),
    linear-gradient(160deg, rgba(233, 248, 253, 0.96) 0%, rgba(223, 243, 250, 0.96) 100%);
  box-shadow: inset 0 0 0 1px rgba(52, 126, 152, 0.14);
}

.marketing-contact-asset-ring {
  position: absolute;
  border-radius: 999px;
  border: 1px solid rgba(124, 228, 236, 0.34);
  filter: blur(0.15px);
  pointer-events: none;
  z-index: 0;
}

.marketing-contact-asset-ring-a {
  width: clamp(220px, 25vw, 300px);
  height: clamp(220px, 25vw, 300px);
  top: -110px;
  right: -90px;
  animation: marketingContactOrbitA 11s ease-in-out infinite;
}

.marketing-contact-asset-ring-b {
  width: clamp(200px, 24vw, 280px);
  height: clamp(200px, 24vw, 280px);
  left: -92px;
  bottom: -108px;
  border-color: rgba(135, 211, 255, 0.27);
  animation: marketingContactOrbitB 12s ease-in-out infinite;
}

.marketing-contact-asset-card {
  position: relative;
  z-index: 1;
  border: 1px solid color-mix(in srgb, var(--line) 58%, transparent);
  border-radius: 18px;
  padding: 16px;
  background: color-mix(in srgb, var(--card-bg) 78%, transparent);
  backdrop-filter: blur(12px);
}

.marketing-contact-asset-card h3 {
  margin: 0 0 10px;
  font-size: clamp(24px, 2.3vw, 31px);
  line-height: 1.1;
}

.marketing-contact-asset-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

.marketing-contact-asset-card li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 600;
}

.marketing-contact-asset-card .chip-icon {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

@keyframes marketingContactOrbitA {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.88;
  }
  50% {
    transform: translate3d(-14px, 10px, 0) scale(1.05);
    opacity: 0.52;
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.88;
  }
}

@keyframes marketingContactOrbitB {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.54;
  }
  50% {
    transform: translate3d(14px, -12px, 0) scale(0.95);
    opacity: 0.8;
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.54;
  }
}

.marketing-contact-intro .marketing-page-copy {
  max-width: 66ch;
}

.marketing-contact-details-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.marketing-contact-detail-card {
  border: 1px solid color-mix(in srgb, var(--line) 68%, transparent);
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-elevated) 84%, transparent), color-mix(in srgb, var(--card-subtle-bg) 86%, transparent));
}

.marketing-contact-detail-card h4 {
  margin: 0 0 8px;
  font-size: 17px;
}

.marketing-contact-detail-card p,
.marketing-contact-detail-card a {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.marketing-contact-detail-card a {
  color: var(--accent);
}

.marketing-faq-list {
  display: grid;
  gap: 10px;
}

.marketing-faq-item {
  border: 1px solid color-mix(in srgb, var(--line) 68%, transparent);
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-elevated) 84%, transparent), color-mix(in srgb, var(--card-subtle-bg) 86%, transparent));
}

.marketing-faq-item h4 {
  margin: 0 0 8px;
  font-size: 17px;
}

.marketing-faq-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.marketing-feature-card,
.marketing-showcase-card,
.marketing-timeline-item,
.marketing-value-card,
.marketing-contact-card,
.marketing-use-case-card,
.marketing-contact-detail-card,
.marketing-faq-item,
.marketing-about-proof-card,
.marketing-about-flow-card,
.marketing-about-audience-card {
  transition:
    transform 240ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 240ms ease,
    border-color 240ms ease,
    background-color 240ms ease;
}

.marketing-feature-card:hover,
.marketing-showcase-card:hover,
.marketing-timeline-item:hover,
.marketing-value-card:hover,
.marketing-contact-card:hover,
.marketing-use-case-card:hover,
.marketing-contact-detail-card:hover,
.marketing-faq-item:hover,
.marketing-about-proof-card:hover,
.marketing-about-flow-card:hover,
.marketing-about-audience-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
  box-shadow: 0 14px 28px rgba(5, 16, 24, 0.2);
  background: color-mix(in srgb, var(--accent) 9%, var(--card-subtle-bg));
}

:root[data-theme="light"] .marketing-feature-card:hover,
:root[data-theme="light"] .marketing-showcase-card:hover,
:root[data-theme="light"] .marketing-timeline-item:hover,
:root[data-theme="light"] .marketing-value-card:hover,
:root[data-theme="light"] .marketing-contact-card:hover,
:root[data-theme="light"] .marketing-use-case-card:hover,
:root[data-theme="light"] .marketing-contact-detail-card:hover,
:root[data-theme="light"] .marketing-faq-item:hover,
:root[data-theme="light"] .marketing-about-proof-card:hover,
:root[data-theme="light"] .marketing-about-flow-card:hover,
:root[data-theme="light"] .marketing-about-audience-card:hover {
  box-shadow: 0 12px 24px rgba(17, 58, 74, 0.14);
}

.marketing-footer {
  width: min(var(--marketing-max-width), 100%);
  margin: 24px 0 0;
  margin-inline: auto;
  box-sizing: border-box;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 24px;
  padding: 18px clamp(18px, 2vw, 24px) calc(10px + var(--safe-bottom));
  background: linear-gradient(145deg, var(--surface-glass-strong), var(--surface-glass));
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.marketing-footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
}

.marketing-footer .footer-link-button,
.marketing-footer .footer-link-anchor {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 0;
  border-radius: 0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.marketing-footer .footer-link-button:hover,
.marketing-footer .footer-link-anchor:hover {
  color: var(--ink);
  transform: translateY(-1px);
}

.marketing-footer-meta p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  width: 100%;
  margin-inline: auto;
}

.footer-link-anchor {
  text-decoration: none;
}

@media (max-width: 1080px) {
  .marketing-header {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand actions";
    align-items: center;
    row-gap: 0;
    column-gap: 10px;
  }

  .marketing-header > .brand-link {
    grid-area: brand;
    min-width: 0;
  }

  .marketing-header > .brand-link .brand {
    grid-template-areas: "logo title";
    column-gap: 10px;
    min-width: 0;
  }

  .marketing-header > .brand-link .eyebrow {
    display: none;
  }

  .marketing-header > .brand-link .brand-title {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1.2rem;
  }

  .marketing-nav {
    display: none;
  }

  .marketing-header-actions {
    grid-area: actions;
    justify-self: end;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
  }

  .marketing-header-actions > * {
    flex: 0 0 auto;
  }

  .marketing-desktop-auth-action {
    display: none;
  }

  .marketing-menu-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .marketing-mobile-menu-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 28;
    border: 0;
    margin: 0;
    padding: 0;
    background: rgba(2, 12, 18, 0.38);
    backdrop-filter: blur(2px);
  }

  .marketing-mobile-menu {
    display: grid;
    gap: 12px;
    position: fixed;
    left: 12px;
    right: 12px;
    top: calc(var(--safe-top) + 84px);
    z-index: 32;
    border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
    border-radius: 18px;
    padding: 12px;
    background: linear-gradient(180deg, var(--surface-glass-strong), var(--surface-glass));
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-strong);
    opacity: 0;
    transform: translateY(-8px) scale(0.985);
    pointer-events: none;
    transition:
      opacity 0.22s ease,
      transform 0.22s ease;
  }

  .marketing-mobile-menu.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }

  .marketing-mobile-menu-links {
    display: grid;
    gap: 6px;
  }

  .marketing-mobile-menu-link {
    border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
    border-radius: 12px;
    padding: 12px 13px;
    min-height: 48px;
    text-align: left;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    background: linear-gradient(180deg, color-mix(in srgb, var(--surface-elevated) 84%, transparent), color-mix(in srgb, var(--card-subtle-bg) 88%, transparent));
    font-family: inherit;
    cursor: pointer;
    transition:
      transform 0.2s ease,
      border-color 0.2s ease,
      background-color 0.2s ease;
  }

  .marketing-mobile-menu-link:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--accent) 58%, var(--line));
    background: color-mix(in srgb, var(--accent) 14%, var(--card-subtle-bg));
  }

  .marketing-mobile-menu-link.active {
    border-color: color-mix(in srgb, var(--accent) 70%, transparent);
    background: color-mix(in srgb, var(--accent) 16%, transparent);
  }

  .marketing-mobile-menu-link:focus-visible {
    outline: none;
    box-shadow:
      0 0 0 3px var(--focus-ring),
      0 0 0 6px color-mix(in srgb, var(--accent) 10%, transparent);
  }

  .marketing-mobile-menu-footer {
    border-top: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
    padding-top: 10px;
  }

  .marketing-mobile-menu-footer .button {
    width: 100%;
    justify-content: center;
  }

  .marketing-feature-grid {
    grid-template-columns: 1fr;
  }

  .marketing-showcase,
  .marketing-shot-grid,
  .marketing-values-grid,
  .marketing-contact-grid,
  .marketing-contact-form-grid,
  .marketing-contact-details-grid,
  .marketing-use-case-grid,
  .marketing-about-intro,
  .marketing-about-proof-grid,
  .marketing-about-flow-grid,
  .marketing-about-audience-grid {
    grid-template-columns: 1fr;
  }

  .marketing-contact-asset {
    min-height: 260px;
  }

  .marketing-hero-grid,
  .marketing-window-body,
  .marketing-window-layout,
  .marketing-shot-frame-builder,
  .marketing-shot-editor-grid,
  .marketing-shot-studio-shell,
  .marketing-product-row {
    grid-template-columns: 1fr;
  }

  .marketing-product-window {
    margin-inline: auto;
  }

  .marketing-cover-shell {
    min-height: clamp(230px, 48vw, 300px);
  }

  .marketing-product-row.reverse .marketing-product-row-copy,
  .marketing-product-row.reverse .marketing-product-row-art {
    order: initial;
  }

  .marketing-about-proof-card-wide {
    grid-template-columns: 1fr;
  }

  .marketing-about-hero-visual {
    justify-content: flex-start;
  }

  .marketing-about-cover-shell {
    max-width: 100%;
  }

  .marketing-window-floating-card {
    position: static;
    width: 100%;
    margin-bottom: 12px;
  }

  .marketing-window-page {
    margin-top: 0;
  }
}

@media (max-width: 700px) {
  .marketing-shell {
    padding: 10px;
  }

  .marketing-header {
    top: calc(var(--safe-top) + 8px);
    border-radius: 14px;
    padding: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 8px;
  }

  .marketing-header > .brand-link {
    min-width: 0;
  }

  .marketing-header > .brand-link .brand {
    grid-template-areas: "logo title";
    column-gap: 8px;
  }

  .marketing-header-actions {
    width: auto;
    gap: 8px;
    align-items: center;
  }

  .marketing-header-actions .button.icon-only {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 10px;
  }

  .marketing-header-actions .button {
    padding: 10px 12px;
  }

  .marketing-menu-trigger.authenticated {
    width: 42px;
    min-width: 42px;
    padding: 4px;
  }

  .marketing-menu-avatar {
    width: 26px;
    height: 26px;
  }

  .marketing-header > .brand-link .eyebrow {
    display: none;
  }

  .marketing-header > .brand-link .brand-title {
    font-size: 1.08rem;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .marketing-header > .brand-link .app-logo {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .landing-header {
    gap: 10px;
    align-items: center;
  }

  .landing-header .brand-link,
  .landing-header .brand {
    min-width: 0;
    flex: 1 1 auto;
  }

  .landing-header .brand {
    grid-template-areas: "logo title";
    column-gap: 8px;
  }

  .landing-header .eyebrow {
    display: none;
  }

  .landing-header .brand-title {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1.08rem;
  }

  .landing-header-actions {
    width: auto;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
  }

  .landing-header-actions .button {
    min-height: 40px;
    padding: 10px 12px;
  }

  .marketing-mobile-menu {
    left: 10px;
    right: 10px;
    top: calc(var(--safe-top) + 72px);
    border-radius: 14px;
    padding: 10px;
  }

  .marketing-hero h2,
  .marketing-page-title {
    font-size: clamp(30px, 10vw, 42px);
  }

  .marketing-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .marketing-hero-actions .button {
    width: 100%;
    justify-content: center;
  }

  .marketing-shot-card {
    border-radius: 22px;
    padding: 12px;
  }

  .marketing-window-sidebar,
  .marketing-window-canvas,
  .marketing-shot-frame,
  .marketing-shot-real-image-wrap,
  .marketing-product-art-card {
    border-radius: 20px;
  }

  .marketing-window-canvas,
  .marketing-product-art-card {
    padding: 14px;
  }

  .marketing-product-window {
    padding: 0;
  }

  .marketing-cover-shell {
    min-height: 240px;
    border-radius: 26px;
  }

  .marketing-cover-card {
    padding: 12px;
    border-radius: 18px;
  }

  .marketing-cover-card p {
    font-size: 10px;
  }

  .marketing-cover-card strong {
    font-size: 17px;
  }

  .marketing-cover-card span {
    font-size: 12px;
  }

  .marketing-cover-card-primary {
    top: 70px;
    left: 14px;
    width: 42%;
  }

  .marketing-cover-card-secondary,
  .marketing-cover-chip-c,
  .marketing-cover-metrics {
    display: none;
  }

  .marketing-cover-chip {
    padding: 7px 10px;
    font-size: 10px;
  }

  .marketing-cover-chip-a {
    top: 14px;
    left: 14px;
  }

  .marketing-cover-chip-b {
    top: 14px;
    right: 14px;
  }

  .marketing-cover-document-stack {
    top: 42px;
    right: 12px;
    width: 58%;
    height: 76%;
  }

  .marketing-cover-sheet,
  .marketing-cover-sheet-front {
    border-radius: 22px;
  }

  .marketing-cover-sheet-front {
    padding: 10px;
  }

  .marketing-cover-sheet-front::before {
    height: 8px;
    border-radius: 22px 22px 0 0;
  }

  .marketing-cover-sheet-header {
    padding: 12px 10px;
    border-radius: 14px;
  }

  .marketing-cover-sheet-header strong {
    font-size: 18px;
  }

  .marketing-cover-sheet-header span {
    font-size: 11px;
  }

  .marketing-cover-sheet-topbar {
    font-size: 9px;
    letter-spacing: 0.08em;
  }

  .marketing-cover-sheet-section {
    padding: 10px;
    border-radius: 14px;
  }

  .marketing-window-page {
    width: 100%;
    border-radius: 20px;
    padding: 14px;
  }

  .marketing-window-page-header {
    padding: 14px;
  }

  .marketing-shot-card h4 {
    font-size: 20px;
  }

  .marketing-about-proof-copy h4,
  .marketing-about-proof-card h4,
  .marketing-about-flow-card h4,
  .marketing-about-audience-card h4 {
    font-size: 24px;
  }

  .marketing-about-proof-card,
  .marketing-about-flow-card,
  .marketing-about-audience-card {
    padding: 14px;
    border-radius: 20px;
  }

  .marketing-about-proof-art,
  .marketing-about-proof-real-image {
    min-height: 220px;
  }

  .marketing-product-mini-stats {
    grid-template-columns: 1fr;
  }

  .marketing-product-row-copy h4 {
    font-size: clamp(28px, 9vw, 34px);
  }

  .marketing-contact-form {
    padding: 16px;
    border-radius: 18px;
  }

  .marketing-contact-form-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .marketing-contact-form-actions .button {
    width: 100%;
    min-width: 0;
  }

  .marketing-contact-asset {
    border-radius: 18px;
    min-height: 220px;
    padding: 18px;
  }

  .marketing-contact-asset-card {
    padding: 14px;
  }
}

@media (max-width: 980px) {
  .ai-review-backdrop {
    padding:
      calc(10px + var(--safe-top))
      10px
      calc(10px + var(--safe-bottom));
  }

  .ai-review-panel {
    width: 100%;
    max-height: 100dvh;
    border-radius: 24px;
    padding: 16px;
  }

  .ai-review-head,
  .ai-review-section-head,
  .ai-review-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .ai-review-compare {
    grid-template-columns: 1fr;
  }

  .ai-review-actions {
    justify-content: stretch;
  }

  .ai-review-actions .button,
  .ai-review-section-head .button {
    width: 100%;
    justify-content: center;
  }
}

@media print {
  body {
    background: #fff;
    color: #111;
  }

  .topbar,
  .native-signup-shell,
  .landing-shell,
  .workspace-sidebar,
  .editor-panel,
  .workspace-resizer,
  .preview-heading,
  .ai-review-backdrop,
  .profile-hub-backdrop,
  .paywall-backdrop,
  .mobile-step-nav,
  .mobile-preview-cta,
  .mobile-preview-backdrop,
  .mobile-toolbar-backdrop {
    display: none !important;
  }

  .workspace {
    display: block;
    margin: 0;
  }

  .preview-panel {
    border: none;
    box-shadow: none;
    background: transparent;
  }

  .preview-shell {
    padding: 0;
    height: auto;
  }

  .resume-paper {
    width: 100%;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    min-height: auto;
    background: #fff;
  }

  .resume-paper.template-sidebar .resume-layout {
    grid-template-columns: minmax(190px, 230px) 1fr;
    gap: 16px;
  }

  .resume-paper.template-sidebar .resume-aside {
    border-right: 1px solid #d4d4d4;
    border-bottom: none;
    padding: 0 14px 0 0;
    margin-bottom: 0;
  }
}

/* ── Resume Checker ──────────────────────────────────────── */
.resume-checker-shell {
  display: grid;
  gap: 14px;
  padding: 14px;
}

/* ── Resume Score — glassy hero with soft glow halo ─────────────────────── */
.resume-checker-hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 26px 28px;
  border-radius: 24px;
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--accent) 14%, var(--surface-elevated)),
      color-mix(in srgb, var(--card-subtle-bg) 92%, transparent) 55%,
      color-mix(in srgb, #a78bfa 8%, transparent) 110%);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  box-shadow:
    0 24px 60px -32px color-mix(in srgb, var(--accent) 60%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.resume-checker-hero::before {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 80% at 8% 20%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 60%),
    radial-gradient(50% 70% at 95% 110%, color-mix(in srgb, #a78bfa 22%, transparent), transparent 65%);
  opacity: 0.75;
}
.resume-checker-hero > * { position: relative; z-index: 1; }

.resume-checker-ring-wrap {
  position: relative;
  flex-shrink: 0;
  width: 108px;
  height: 108px;
  filter: drop-shadow(0 8px 22px color-mix(in srgb, var(--accent) 45%, transparent));
}
.resume-checker-ring-wrap::after {
  content: "";
  position: absolute; inset: -12%;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 18%, transparent), transparent 65%);
  z-index: -1;
  animation: rcGlow 3.6s ease-in-out infinite;
}
@keyframes rcGlow {
  0%, 100% { transform: scale(1); opacity: 0.75; }
  50% { transform: scale(1.08); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .resume-checker-ring-wrap::after { animation: none; }
}

.resume-checker-ring { width: 100%; height: 100%; }

.resume-checker-score {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.05rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  text-shadow: 0 2px 14px color-mix(in srgb, currentColor 55%, transparent);
}
.resume-checker-score-pct {
  font-size: 0.92rem;
  font-weight: 700;
  margin-top: 6px;
  opacity: 0.78;
}

.resume-checker-hero-copy { flex: 1; min-width: 0; }
.resume-checker-title {
  margin: 0 0 6px;
  font-size: 1.32rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--ink), color-mix(in srgb, var(--accent) 70%, var(--ink)));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.resume-checker-subtitle {
  margin: 0 0 14px;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Summary pills (issue/warning/passed) */
.resume-checker-summary-pills { display: flex; flex-wrap: wrap; gap: 7px; }
.resume-checker-pill {
  display: inline-flex; align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid transparent;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 160ms cubic-bezier(0.23,1,0.32,1);
}
.resume-checker-pill:hover { transform: translateY(-1px); }
.resume-checker-pill.fail {
  background: linear-gradient(135deg, color-mix(in srgb, #f87171 22%, transparent), color-mix(in srgb, #ef4444 10%, transparent));
  border-color: color-mix(in srgb, #f87171 50%, transparent);
  color: color-mix(in srgb, #fda4a4 85%, white);
  box-shadow: 0 6px 18px -10px color-mix(in srgb, #f87171 60%, transparent);
}
.resume-checker-pill.warn {
  background: linear-gradient(135deg, color-mix(in srgb, #f59e0b 22%, transparent), color-mix(in srgb, #fbbf24 10%, transparent));
  border-color: color-mix(in srgb, #f59e0b 50%, transparent);
  color: color-mix(in srgb, #fcd34d 92%, white);
  box-shadow: 0 6px 18px -10px color-mix(in srgb, #f59e0b 60%, transparent);
}
.resume-checker-pill.pass {
  background: linear-gradient(135deg, color-mix(in srgb, #3ecf8e 22%, transparent), color-mix(in srgb, #34d399 10%, transparent));
  border-color: color-mix(in srgb, #3ecf8e 50%, transparent);
  color: color-mix(in srgb, #6ee7b7 88%, white);
  box-shadow: 0 6px 18px -10px color-mix(in srgb, #3ecf8e 50%, transparent);
}

/* ── Category cards — glassy, per-section accent color ──────────────────── */
.resume-checker-category {
  --cat-accent: var(--accent);
  position: relative;
  padding: 0;
  overflow: hidden;
  border-radius: 20px;
  background: color-mix(in srgb, var(--surface-elevated) 92%, transparent);
  border: 1px solid color-mix(in srgb, var(--cat-accent) 22%, var(--line));
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  box-shadow:
    0 18px 40px -28px color-mix(in srgb, var(--cat-accent) 50%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 220ms cubic-bezier(0.23,1,0.32,1), border-color 220ms ease, box-shadow 220ms ease;
}
.resume-checker-category:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--cat-accent) 36%, var(--line));
  box-shadow:
    0 26px 56px -30px color-mix(in srgb, var(--cat-accent) 60%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.resume-checker-category::before {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(135deg, color-mix(in srgb, var(--cat-accent) 11%, transparent), transparent 55%);
  opacity: 0.85;
}
.resume-checker-category > * { position: relative; }

/* Rotate accent hue per category — cycles 6 brand-aligned colors */
.resume-checker-category:nth-of-type(6n+1) { --cat-accent: #5ecac5; }
.resume-checker-category:nth-of-type(6n+2) { --cat-accent: #6aa8ff; }
.resume-checker-category:nth-of-type(6n+3) { --cat-accent: #a78bfa; }
.resume-checker-category:nth-of-type(6n+4) { --cat-accent: #f59e0b; }
.resume-checker-category:nth-of-type(6n+5) { --cat-accent: #ec4899; }
.resume-checker-category:nth-of-type(6n+6) { --cat-accent: #10b981; }

.resume-checker-category-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--cat-accent) 18%, var(--line));
}
.resume-checker-category-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--ink);
}
.resume-checker-category-title .button-icon {
  width: 16px; height: 16px;
  padding: 6px;
  border-radius: 9px;
  box-sizing: content-box;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--cat-accent) 30%, transparent),
    color-mix(in srgb, var(--cat-accent) 12%, transparent));
  color: var(--cat-accent);
  border: 1px solid color-mix(in srgb, var(--cat-accent) 38%, transparent);
  box-shadow:
    0 6px 14px -6px color-mix(in srgb, var(--cat-accent) 60%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.resume-checker-category-pills { display: flex; gap: 6px; flex-shrink: 0; }
.resume-checker-mini-pill {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  border: 1px solid transparent;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.resume-checker-mini-pill.fail {
  background: linear-gradient(135deg, color-mix(in srgb, #f87171 18%, transparent), color-mix(in srgb, #ef4444 8%, transparent));
  border-color: color-mix(in srgb, #f87171 40%, transparent);
  color: color-mix(in srgb, #fda4a4 85%, white);
}
.resume-checker-mini-pill.warn {
  background: linear-gradient(135deg, color-mix(in srgb, #f59e0b 18%, transparent), color-mix(in srgb, #fbbf24 8%, transparent));
  border-color: color-mix(in srgb, #f59e0b 40%, transparent);
  color: color-mix(in srgb, #fcd34d 92%, white);
}
.resume-checker-mini-pill.pass {
  background: linear-gradient(135deg, color-mix(in srgb, #3ecf8e 18%, transparent), color-mix(in srgb, #34d399 8%, transparent));
  border-color: color-mix(in srgb, #3ecf8e 40%, transparent);
  color: color-mix(in srgb, #6ee7b7 88%, white);
}

/* Check items — soft hover background tinted by category, glowing icons */
.resume-checker-check-list { display: grid; }
.resume-checker-check-item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 12px 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 40%, transparent);
  transition: background 180ms ease;
}
.resume-checker-check-item:last-child { border-bottom: none; }
.resume-checker-check-item:hover {
  background: color-mix(in srgb, var(--cat-accent) 6%, transparent);
}
.resume-checker-check-item.fail { background: color-mix(in srgb, #f87171 4%, transparent); }
.resume-checker-check-item.warn { background: color-mix(in srgb, #f59e0b 4%, transparent); }

.resume-checker-check-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 900;
  margin-top: 1px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.resume-checker-check-item.pass .resume-checker-check-icon {
  background: linear-gradient(135deg, color-mix(in srgb, #3ecf8e 28%, transparent), color-mix(in srgb, #34d399 14%, transparent));
  color: #3ecf8e;
  box-shadow:
    0 0 14px -2px color-mix(in srgb, #3ecf8e 55%, transparent),
    inset 0 0 0 1px color-mix(in srgb, #3ecf8e 32%, transparent);
}
.resume-checker-check-item.warn .resume-checker-check-icon {
  background: linear-gradient(135deg, color-mix(in srgb, #f59e0b 28%, transparent), color-mix(in srgb, #fbbf24 14%, transparent));
  color: #f59e0b;
  box-shadow:
    0 0 14px -2px color-mix(in srgb, #f59e0b 55%, transparent),
    inset 0 0 0 1px color-mix(in srgb, #f59e0b 32%, transparent);
}
.resume-checker-check-item.fail .resume-checker-check-icon {
  background: linear-gradient(135deg, color-mix(in srgb, #f87171 28%, transparent), color-mix(in srgb, #ef4444 14%, transparent));
  color: #f87171;
  box-shadow:
    0 0 14px -2px color-mix(in srgb, #f87171 55%, transparent),
    inset 0 0 0 1px color-mix(in srgb, #f87171 32%, transparent);
}

.resume-checker-check-copy {
  flex: 1;
  min-width: 0;
}

.resume-checker-check-label {
  margin: 0;
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}

.resume-checker-check-item.pass .resume-checker-check-label {
  color: var(--muted);
  font-weight: 500;
}

.resume-checker-check-detail {
  margin: 3px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

.resume-checker-footer {
  margin: 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
  padding-bottom: 8px;
}

.resume-checker-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
}

/* ============================================================
   iOS / Capacitor — native feel
   ============================================================ */

/* Safe-area padding for notch / home-indicator */
body {
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* Smooth momentum scrolling everywhere */
* {
  -webkit-overflow-scrolling: touch;
}

/* Remove blue tap highlight on all interactive elements */
a, button, [role="button"], input, select, textarea {
  -webkit-tap-highlight-color: transparent;
}

/* Prevent text size adjustment on orientation change */
html {
  -webkit-text-size-adjust: 100%;
}

/* Prevent callout (long-press menu) on images & non-editable elements */
img, svg {
  -webkit-touch-callout: none;
}

/* Status bar area background matches app header (dark mode aware) */
@media (prefers-color-scheme: dark) {
  .app-header, .workspace-header {
    padding-top: max(env(safe-area-inset-top), 0px);
  }
}

/* Workspace content scrollable area — full height on iOS */
.workspace-content {
  height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
}

/* Bottom nav safe area */
.workspace-nav, .bottom-nav {
  padding-bottom: env(safe-area-inset-bottom);
}

/* ============================================================
   Email Verification Gate
   ============================================================ */

.verify-email-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: var(--bg);
}

.verify-email-gate-panel {
  width: min(460px, 100%);
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  background: var(--card-bg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.verify-email-gate-icon {
  width: 40px;
  height: 40px;
  color: #f59e0b;
}

.verify-email-gate-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}

.verify-email-gate-body {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.verify-email-resend {
  background: #f59e0b;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
  width: 100%;
}

.verify-email-resend:hover:not(:disabled) {
  opacity: 0.85;
}

.verify-email-resend:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.verify-email-gate-signout {
  background: none;
  border: none;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  text-decoration: underline;
}

.verify-email-gate-signout:hover {
  color: var(--text);
}

/* ============================================================
   Onboarding Modal
   ============================================================ */

.onboarding-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
  padding: 1.5rem;
  backdrop-filter: blur(2px);
}

.onboarding-panel {
  background: var(--bg);
  border-radius: 16px;
  padding: 2rem 2rem 1.75rem;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  animation: onboarding-in 0.22s ease;
}

@keyframes onboarding-in {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.onboarding-steps {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.onboarding-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  transition: background 0.2s;
}

.onboarding-step-dot.active {
  background: var(--accent);
  width: 22px;
  border-radius: 4px;
}

.onboarding-step-dot.done {
  background: var(--accent);
  opacity: 0.4;
}

.onboarding-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
  text-align: center;
  color: var(--text);
}

.onboarding-subtitle {
  font-size: 0.875rem;
  color: var(--muted);
  margin: -0.5rem 0 0;
  text-align: center;
}

.onboarding-fields {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.onboarding-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.onboarding-input {
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  border: 1.5px solid var(--line);
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.15s;
  outline: none;
}

.onboarding-input:focus {
  border-color: var(--accent);
}

.onboarding-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: stretch;
}

.onboarding-actions .button.primary {
  justify-content: center;
  gap: 0.4rem;
}

.onboarding-actions .button.ghost {
  align-self: center;
  font-size: 0.8rem;
}

.onboarding-choice-grid {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.onboarding-choice-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--bg);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s;
}

.onboarding-choice-card:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--bg));
}

.onboarding-choice-icon {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.onboarding-choice-card strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.onboarding-choice-card span:last-child {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}

.onboarding-back {
  align-self: center;
  font-size: 0.8rem;
}

/* ============================================================
   Resume Dashboard
   ============================================================ */

.dashboard-hidden {
  display: none !important;
}

.dashboard-shell {
  width: 100%;
  padding: 36px 0 56px;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}

.dashboard-header-copy {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.dashboard-title {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text);
}

.dashboard-count-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-radius: 999px;
  padding: 2px 10px;
}

.dashboard-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  margin-left: 4px;
  line-height: 1;
}

/* Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
  align-items: start;
}

/* Base card */
.dashboard-card {
  background: var(--card-bg, var(--bg));
  border: 1.5px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  text-align: left;
}

.dashboard-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  box-shadow: 0 10px 28px rgba(0,0,0,0.11);
}

.dashboard-card.is-default {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
}

/* "New Resume" card */
.dashboard-card-new {
  min-height: 210px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-direction: column;
  border: 2px dashed var(--line);
  background: transparent;
  box-shadow: none;
  font-family: inherit;
}

.dashboard-card-new:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  transform: translateY(-3px);
}

.dashboard-card-new-icon {
  font-size: 2.6rem;
  line-height: 1;
  color: var(--accent);
  font-weight: 300;
}

.dashboard-card-new-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  font-family: inherit;
}

.dashboard-card-new:hover .dashboard-card-new-label {
  color: var(--accent);
}

/* Thumbnail area */
.dashboard-card-thumb {
  width: 100%;
  aspect-ratio: 3/4;
  max-height: 155px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent) 15%, transparent),
    color-mix(in srgb, var(--accent) 6%, transparent)
  );
  border-bottom: 1.5px solid var(--line);
  transition: background 0.15s;
}

.dashboard-card-resume:hover .dashboard-card-thumb {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent) 22%, transparent),
    color-mix(in srgb, var(--accent) 10%, transparent)
  );
}

.dashboard-thumb-initials {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
  line-height: 1;
}

.dashboard-thumb-template {
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dashboard-thumb-company {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 4px;
  padding: 1px 6px;
}

/* Card body */
.dashboard-card-body {
  padding: 12px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.dashboard-card-name {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-card-role {
  margin: 0;
  font-size: 0.775rem;
  color: var(--accent);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Position line — shown below resume name */
.dashboard-card-position {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text);
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Company line — accent blue, always visible when set */
.dashboard-card-company-line {
  margin: 1px 0 0;
  font-size: 0.74rem;
  font-weight: 600;
  color: #3ba2e6;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
:root[data-theme="dark"] .dashboard-card-company-line {
  color: #5bbcf5;
}

.dashboard-card-company {
  margin: 2px 0 0;
  font-size: 0.73rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.dashboard-card-tailored-tag {
  margin: 3px 0 0;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Pencil edit button — top-right of card thumb, always visible */
.dashboard-card-edit-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 0;
  background: rgba(0, 0, 0, 0.45);
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: background 0.16s ease;
  z-index: 2;
}
.dashboard-card-edit-btn:hover {
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
}

/* "Add company" clickable hint when no company is set */
.dashboard-card-add-company {
  margin: 1px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 500;
  color: color-mix(in srgb, var(--muted) 70%, var(--accent) 30%);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  opacity: 0.7;
  transition: opacity 0.14s ease, color 0.14s ease;
}
.dashboard-card-add-company:hover {
  opacity: 1;
  color: #3ba2e6;
}
:root[data-theme="dark"] .dashboard-card-add-company:hover {
  color: #5bbcf5;
}

/* Make card thumb position:relative so the pencil can absolute-position inside */
.dashboard-card-thumb {
  position: relative;
}

.jobs-progress-bar {
  height: 3px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 12px;
}

.jobs-progress-bar-fill {
  height: 100%;
  width: 40%;
  background: var(--accent);
  border-radius: 99px;
  animation: jobs-progress-slide 1.6s ease-in-out infinite;
}

@keyframes jobs-progress-slide {
  0%   { transform: translateX(-200%); }
  100% { transform: translateX(400%); }
}

.dashboard-card-date {
  margin: 4px 0 0;
  font-size: 0.68rem;
  color: var(--muted);
  opacity: 0.75;
}

.dashboard-default-pill {
  margin-top: 6px;
  align-self: flex-start;
}

/* Card action footer */
.dashboard-card-resume {
  cursor: pointer;
}

.dashboard-card-actions {
  display: flex;
  gap: 6px;
  padding: 8px 10px 10px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
}

.dashboard-card-actions .button {
  flex: 1;
  font-size: 0.74rem;
  padding: 4px 6px;
}

/* Empty state */
.dashboard-empty {
  text-align: center;
  padding: 72px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.dashboard-empty-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.dashboard-empty-body {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 320px;
  line-height: 1.5;
}

/* Welcome dashboard for new users */
.dashboard-welcome {
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.dashboard-welcome-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.dashboard-welcome-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(145deg, var(--accent), color-mix(in srgb, var(--accent) 45%, #8b5cf6));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 30%, transparent);
}

.dashboard-welcome-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.02em;
}

.dashboard-welcome-sub {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0;
  max-width: 380px;
  line-height: 1.6;
}

.dashboard-welcome-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 560px;
}

.dashboard-welcome-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 20px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  transition: border-color 0.15s, transform 0.12s, box-shadow 0.2s;
}

.dashboard-welcome-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 12%, transparent);
}

.dashboard-welcome-card:active {
  transform: translateY(0);
}

.dashboard-welcome-card-emoji {
  font-size: 1.4rem;
  line-height: 1;
  margin-bottom: 4px;
}

.dashboard-welcome-card strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.dashboard-welcome-card span {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 480px) {
  .dashboard-welcome-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .dashboard-shell {
    padding: 24px 16px 40px;
  }
  .dashboard-grid {
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 12px;
  }
  .dashboard-card-new {
    min-height: 155px;
  }
  .dashboard-title {
    font-size: 1.3rem;
  }
}

/* ============================================================
   Sidebar Active Resume Card
   ============================================================ */

/* ── Sidebar save card — vertical layout matching nav buttons ── */
.sidebar-resume-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 8px 4px 0;
  padding: 10px 4px 9px;
  background: var(--accent-soft);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  width: calc(100% - 8px);
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}
:root[data-theme="dark"] .sidebar-resume-card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.09);
}

.sidebar-resume-card:hover {
  background: rgba(88, 203, 198, 0.12);
  border-color: rgba(88, 203, 198, 0.25);
}

.sidebar-save-icon {
  flex-shrink: 0;
  color: var(--accent);
}

.sidebar-resume-card-name {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1;
  max-width: 100%;
  padding: 0 4px;
}

/* Rail tile: icon inside a soft rounded square with a corner status dot.
   Status text lives in the tooltip/aria-label — never as wrapped copy. */
.sidebar-save-tile {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-soft);
}

.sidebar-resume-status-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--bg-1, #f7f9fa);
}
:root[data-theme="dark"] .sidebar-resume-status-dot { border-color: #101315; }

.sidebar-resume-card.is-saved .sidebar-resume-status-dot {
  background: #3ecf8e;
}

.sidebar-resume-card.is-unsaved .sidebar-resume-status-dot {
  background: #f59e0b;
  animation: pulse-dot 1.8s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar-resume-card.is-unsaved .sidebar-resume-status-dot { animation: none; }
}

/* ── Editor empty states — friendly dashed cards instead of bare lists ─── */
.editor-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 26px 18px 22px;
  text-align: center;
  border: 1.5px dashed var(--card-border, rgba(20, 40, 50, 0.16));
  border-radius: 14px;
  background: var(--card-subtle-bg, rgba(20, 107, 109, 0.03));
}

.editor-empty-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 4px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
}

.editor-empty-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text, inherit);
}

.editor-empty-hint {
  margin: 0;
  max-width: 380px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted, #6c7a80);
}

.editor-empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

/* ── Preview ghost — skeleton resume for the blank canvas ───────────────── */
.resume-paper-ghost {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  min-height: 420px;
  padding: 48px 46px;
}

.preview-ghost-art {
  display: flex;
  justify-content: center;
  padding-top: 26px;
}

/* Illustration palette — soft 3D-style document + brand-green check badge */
.pg-backdrop { fill: #f2f4f6; }
.pg-spark, .pg-dot { fill: #dfe4e8; }
.pg-sheet-group { filter: drop-shadow(0 14px 22px rgba(20, 30, 50, 0.10)); }
.pg-sheet { fill: #ffffff; stroke: #e7ebee; stroke-width: 1.5; }
.pg-curl { fill: #f1f3f5; }
.pg-avatar-ring { fill: #eef1f3; stroke: #dde3e7; stroke-width: 2; }
.pg-avatar-head, .pg-avatar-body { fill: #cfd6db; }
.pg-line { fill: #e3e8ec; }
.pg-line.soft { fill: #ecf0f2; }
.pg-bullet { fill: #dbe1e6; }
.pg-badge-group { filter: drop-shadow(0 10px 18px rgba(24, 130, 80, 0.28)); }
.pg-badge-ring { fill: #ffffff; }
/* Fixed cheerful green in BOTH themes (matches the saved-status dot) — the
   light theme's --accent is a dark teal that reads sombre on the badge. */
.pg-badge { fill: #3ecf8e; }
.pg-check {
  fill: none;
  stroke: #ffffff;
  stroke-width: 9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:root[data-theme="dark"] .pg-backdrop { fill: rgba(255, 255, 255, 0.04); }
:root[data-theme="dark"] .pg-spark,
:root[data-theme="dark"] .pg-dot { fill: rgba(255, 255, 255, 0.13); }
:root[data-theme="dark"] .pg-sheet-group { filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.45)); }
:root[data-theme="dark"] .pg-sheet { fill: #1a1e22; stroke: rgba(255, 255, 255, 0.08); }
:root[data-theme="dark"] .pg-curl { fill: #23282d; }
:root[data-theme="dark"] .pg-avatar-ring { fill: rgba(255, 255, 255, 0.06); stroke: rgba(255, 255, 255, 0.10); }
:root[data-theme="dark"] .pg-avatar-head,
:root[data-theme="dark"] .pg-avatar-body { fill: rgba(255, 255, 255, 0.16); }
:root[data-theme="dark"] .pg-line { fill: rgba(255, 255, 255, 0.11); }
:root[data-theme="dark"] .pg-line.soft { fill: rgba(255, 255, 255, 0.07); }
:root[data-theme="dark"] .pg-bullet { fill: rgba(255, 255, 255, 0.13); }
:root[data-theme="dark"] .pg-badge-ring { fill: #101315; }

/* Gentle life: the badge bobs, the sparkles twinkle. GPU-only transforms. */
.pg-badge-group { animation: pg-bob 3.4s ease-in-out infinite; }
.pg-spark { animation: pg-twinkle 2.8s ease-in-out infinite; }
.pg-spark:nth-of-type(2) { animation-delay: 1.2s; }

@keyframes pg-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes pg-twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
  .pg-badge-group, .pg-spark { animation: none; }
}

.preview-ghost-caption {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: center;
  margin-top: 34px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 500;
}

/* ============================================================
   Save Resume Modal
   ============================================================ */

.save-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
  padding: 1.5rem;
  backdrop-filter: blur(2px);
}

.save-modal {
  background: var(--bg);
  border-radius: 14px;
  padding: 1.75rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: onboarding-in 0.2s ease;
}

.save-modal-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.save-modal-subtitle {
  margin: -0.5rem 0 0;
  font-size: 0.83rem;
  color: var(--muted);
}

.save-modal-input {
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  border: 1.5px solid var(--line);
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}

.save-modal-input:focus {
  border-color: var(--accent);
}

.save-modal-actions {
  display: flex;
  gap: 8px;
}

.save-modal-actions .button {
  flex: 1;
  justify-content: center;
}

/* ══════════════════════════════════════════════════
   AI Coach — Premium Chat
   ══════════════════════════════════════════════════ */
.ai-coach-panel {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 130px);
  height: calc(100dvh - 130px);
  overflow: hidden !important;
  position: relative;
}

/* ─── Top bar ─── */
.aic-topbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 54px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 60%, var(--bg));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2;
}

.aic-topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.aic-topbar-avatar {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 50%, #8b5cf6));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.aic-topbar-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.aic-topbar-chip {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 50%, #8b5cf6));
  color: #fff;
  border-radius: 6px;
  padding: 2px 6px;
  line-height: 1.3;
}

.aic-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.aic-topbar-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 10px;
  cursor: pointer;
  transition: border-color 0.15s;
  white-space: nowrap;
}

.aic-topbar-pill:hover { border-color: var(--accent); color: var(--text); }

.aic-topbar-select {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--text);
  font-size: 0.76rem;
  cursor: pointer;
  outline: none;
  max-width: 150px;
  min-height: unset !important;
  padding: 0 !important;
  margin: 0 !important;
  width: auto !important;
}

.aic-new-chat { cursor: pointer; }

/* ─── Body / scroll ─── */
.aic-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scroll-behavior: smooth;
  display: flex;
  flex-direction: column;
}

/* ─── Welcome / empty ─── */
.aic-welcome {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px 24px 32px;
  position: relative;
  overflow: hidden;
}

/* Glowing radial behind welcome */
.aic-welcome-glow {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 14%, transparent) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  pointer-events: none;
  z-index: 0;
}

.aic-welcome > *:not(.aic-welcome-glow) { position: relative; z-index: 1; }

.aic-welcome-icon {
  width: 80px;
  height: 80px;
  border-radius: 28px;
  background: linear-gradient(145deg, var(--accent), color-mix(in srgb, var(--accent) 45%, #8b5cf6));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.1) inset,
    0 12px 40px color-mix(in srgb, var(--accent) 30%, transparent);
  animation: aic-float 5s ease-in-out infinite;
}

@keyframes aic-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.aic-welcome-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 8px;
  letter-spacing: -0.025em;
}

.aic-welcome-sub {
  font-size: 0.88rem;
  color: var(--muted);
  max-width: 380px;
  margin: 0 0 28px;
  line-height: 1.6;
}

.aic-prompts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 560px;
}

.aic-prompt-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 14px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s, transform 0.12s, box-shadow 0.2s;
}

.aic-prompt-card:hover:not(:disabled) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 5%, var(--surface));
  transform: translateY(-2px);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 12%, transparent);
}

.aic-prompt-card:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: none;
}

.aic-prompt-emoji {
  font-size: 1.25rem;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--accent) 10%, var(--bg));
  border-radius: 10px;
}

.aic-prompt-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.aic-prompt-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.aic-prompt-desc {
  font-size: 0.73rem;
  color: var(--muted);
  line-height: 1.35;
}

.aic-prompt-arrow {
  flex-shrink: 0;
  color: var(--muted);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.15s, transform 0.15s;
}

.aic-prompt-card:hover .aic-prompt-arrow {
  opacity: 0.7;
  transform: translateX(0);
}

/* ─── Thread / messages ─── */
.aic-thread {
  display: flex;
  flex-direction: column;
  padding: 8px 0 16px;
}

.aic-row {
  padding: 6px 0;
  animation: aic-msg-in 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes aic-msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.aic-row-assistant {
  background: color-mix(in srgb, var(--surface) 50%, var(--bg));
}

.aic-row-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  max-width: 760px;
  margin: 0 auto;
  padding: 12px 24px;
  align-items: flex-start;
}

.aic-row-user .aic-row-inner {
  flex-direction: row-reverse;
}

.aic-avatar {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 50%, #8b5cf6));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.aic-bubble {
  flex: 1;
  min-width: 0;
  font-size: 0.885rem;
  line-height: 1.7;
  color: var(--text);
  word-break: break-word;
}

.aic-bubble p {
  margin: 0 0 6px;
}

.aic-bubble p:last-child { margin-bottom: 0; }

/* ─── COACH-06: Markdown inside Coach assistant replies ─── */
.aic-markdown h3,
.aic-markdown h4,
.aic-markdown h5 {
  margin: 12px 0 6px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}
.aic-markdown h3 { font-size: 1.02rem; }
.aic-markdown h4 { font-size: 0.95rem; }
.aic-markdown h5 { font-size: 0.9rem; opacity: 0.85; }
.aic-markdown h3:first-child,
.aic-markdown h4:first-child,
.aic-markdown h5:first-child { margin-top: 0; }
.aic-markdown strong { font-weight: 600; color: var(--text); }
.aic-markdown em { font-style: italic; }
.aic-markdown code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.83em;
  padding: 1px 5px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: color-mix(in srgb, var(--accent) 80%, var(--text) 20%);
}
.aic-markdown a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  transition: opacity 160ms ease-out;
}
/* MOBILE (LOW polish): the unscoped `.aic-markdown a:hover` rule used to
   live here. It made touch devices flash the link to opacity:0.78 on tap
   (sticky :hover on iOS), and the @media (hover: none) block below had to
   override it back. Canonical home for the hover rule is now the
   @media (hover: hover) block at line ~19178. */
.aic-md-list {
  margin: 6px 0 8px;
  padding-left: 22px;
}
.aic-md-list li { margin-bottom: 4px; }
.aic-md-list li:last-child { margin-bottom: 0; }
.aic-md-list-ordered { list-style-type: decimal; }
.aic-md-list:not(.aic-md-list-ordered) { list-style-type: disc; }
.aic-mdbr {
  display: block;
  height: 6px;
}

/* ── AI Coach applyable suggestion cards ───────────────────────────────── */
.aic-suggestions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  /* Force onto its OWN full-width line below the message bubble. Without
     flex-basis:100% it became a third flex item in the row and squeezed the
     text bubble down to ~1 character wide (text rendered one letter per line).
     The row now wraps; avatar+bubble stay on line 1, suggestions span line 2. */
  flex: 1 0 100%;
  width: 100%;
}
.aic-suggestion-card {
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
  border-radius: 12px;
  padding: 10px 12px;
}
.aic-suggestion-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  color: var(--text);
}
.aic-suggestion-label { font-weight: 600; font-size: 0.85rem; }
.aic-suggestion-section {
  margin-left: auto;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
}
.aic-suggestion-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.aic-suggestion-option {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  width: 100%;
  appearance: none;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 9px;
  padding: 8px 10px;
  min-height: 44px;
  transition: transform 140ms cubic-bezier(0.23, 1, 0.32, 1),
              border-color 140ms ease, background 140ms ease;
}
.aic-suggestion-option:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}
.aic-suggestion-option:active { transform: scale(0.985); }
.aic-suggestion-option-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.aic-suggestion-option-label { font-weight: 600; font-size: 0.82rem; color: var(--text); }
.aic-suggestion-apply {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--button-text);
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent-strong) 82%, var(--accent)));
  border-radius: 6px;
  padding: 2px 9px;
}
.aic-suggestion-option-preview {
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--text-muted);
}
@media (prefers-reduced-motion: reduce) {
  .aic-suggestion-option { transition: border-color 140ms ease, background 140ms ease; }
  .aic-suggestion-option:active { transform: none; }
}
.aic-row-user .aic-bubble.aic-markdown a { color: #fff; }
.aic-row-user .aic-bubble.aic-markdown code {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

/* COACH-06 (qa-mobile): user bubble renders plain text, no markdown list
   indent. The aic-user-text class is the explicit "plain text" path. */
.aic-bubble.aic-user-text p {
  margin: 0 0 4px;
}
.aic-bubble.aic-user-text p:last-child { margin-bottom: 0; }

/* COACH-06 (qa-mobile): hover-only opacity for assistant links so taps on
   touch screens don't leave a sticky-hover dim. */
@media (hover: hover) {
  .aic-markdown a:hover { opacity: 0.78; }
}
@media (hover: none) {
  .aic-markdown a { transition: none; }
  .aic-markdown a:hover { opacity: 1; }
}

/* ─── COACH-05: Coach paywall surface for free users ─── */
.aic-paywall-panel {
  display: flex;
  /* `safe center` falls back to flex-start when content overflows the
     container — prevents iPhone SE portrait + keyboard from clipping
     the paywall title (qa-mobile finding). */
  align-items: safe center;
  justify-content: center;
  /* Respect notch / safe-area on landscape iPhone. */
  padding: max(32px, env(safe-area-inset-top)) max(32px, env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom)) max(32px, env(safe-area-inset-left));
  /* Override the parent `.ai-coach-panel`'s `overflow: hidden !important`
     so the CTA stays reachable on iPhone SE portrait + landscape. */
  overflow-y: auto !important;
}
.aic-paywall {
  position: relative;
  max-width: 480px;
  width: 100%;
  text-align: center;
  padding: 36px 28px 32px;
  border-radius: 28px;
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--border));
  box-shadow:
    0 20px 60px -24px color-mix(in srgb, var(--accent) 25%, transparent),
    inset 0 1px 0 color-mix(in srgb, #fff 8%, transparent);
  overflow: hidden;
  /* Force a fresh stacking context — Safari < 17 sometimes paints the
     blur halo past the rounded corners. `isolation: isolate` plus a
     GPU layer on the glow keeps it clean. */
  isolation: isolate;
}
.aic-paywall-glow {
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--accent) 32%, transparent), transparent 55%);
  filter: blur(28px);
  pointer-events: none;
  opacity: 0.7;
  animation: aic-paywall-glow 8s ease-in-out infinite;
  /* Force a fresh stacking context — prevents iOS Safari from painting
     the blur halo past the parent's rounded corners (qa-mobile finding). */
  will-change: transform, opacity;
  transform: translateZ(0);
}
@keyframes aic-paywall-glow {
  0%, 100% { transform: translate(0, 0); opacity: 0.55; }
  50% { transform: translate(2%, -3%); opacity: 0.8; }
}
/* MOBILE (qa-mobile): the only perpetual Coach animation that lacked a
   reduced-motion kill switch. iOS low-power-mode + accessibility users
   should see a static glow instead of a drifting one. */
@media (prefers-reduced-motion: reduce) {
  .aic-paywall-glow {
    animation: none !important;
  }
  /* MOBILE (LOW polish): also kill the perpetual typing dots + welcome
     icon float for reduced-motion users. Same rationale — battery on
     low-power-mode iOS. */
  .aic-typing span {
    animation: none !important;
    opacity: 0.55;
  }
  .aic-welcome-icon {
    animation: none !important;
  }
}
.aic-paywall > *:not(.aic-paywall-glow) { position: relative; z-index: 1; }
.aic-paywall-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 22px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #8b5cf6));
  color: #fff;
  box-shadow: 0 12px 28px -10px color-mix(in srgb, var(--accent) 60%, transparent);
}
.aic-paywall-title {
  margin: 0 0 8px;
  font-size: 1.42rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}
.aic-paywall-sub {
  margin: 0 0 18px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: color-mix(in srgb, var(--text) 70%, transparent);
  max-width: 36ch;
  margin-left: auto;
  margin-right: auto;
}
.aic-paywall-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  gap: 8px;
  text-align: left;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}
.aic-paywall-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text);
}
.aic-paywall-list li svg {
  flex-shrink: 0;
  color: var(--accent);
}
.aic-paywall-cta {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  transition: transform 160ms ease-out;
}
.aic-paywall-cta:active { transform: scale(0.97); }

.aic-row-user .aic-bubble {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #8b5cf6));
  color: #fff;
  padding: 12px 16px;
  border-radius: 18px 18px 5px 18px;
  box-shadow: 0 3px 12px color-mix(in srgb, var(--accent) 25%, transparent);
  flex: unset;
  max-width: 72%;
}

/* ─── Typing ─── */
.aic-typing {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 4px 0 !important;
}

.aic-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: aic-dot 1.3s infinite ease-in-out;
}

.aic-typing span:nth-child(2) { animation-delay: 0.18s; }
.aic-typing span:nth-child(3) { animation-delay: 0.36s; }

@keyframes aic-dot {
  0%, 70%, 100% { transform: translateY(0); opacity: 0.3; }
  35%           { transform: translateY(-7px); opacity: 1; }
}

/* ─── Composer (input bar) ─── */
/* ═══════════════════════════════════════════════════════════════════════
   AI Composer — Apple-Intelligence-style premium glass card
   Frosted backdrop, animated rainbow ring on focus, inner highlight,
   layered shadows, breathing glow. The chat is now the hero of the screen.
   ═══════════════════════════════════════════════════════════════════════ */
.aic-composer {
  flex-shrink: 0;
  padding: 14px 24px 22px;
  background: transparent;
  padding-bottom: max(22px, env(safe-area-inset-bottom, 22px));
  position: relative;
}

.aic-composer-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  max-width: 820px;
  margin: 0 auto;
  padding: 12px 12px 12px 22px;
  border-radius: 22px;
  /* Vibrant glass: punchy dark base + teal-tinted highlight + saturation boost
     so the composer always stands out from the editor behind it. */
  background:
    linear-gradient(135deg, rgba(94, 202, 197, 0.10), rgba(139, 92, 246, 0.06) 60%, rgba(255, 255, 255, 0.04)),
    rgba(11, 22, 31, 0.92);
  backdrop-filter: blur(32px) saturate(1.85);
  -webkit-backdrop-filter: blur(32px) saturate(1.85);
  /* Vibrant multi-color emission — dialed back from the max version.
     Still reads as "emitting light" but more compact, doesn't bleed
     too far into surrounding UI. */
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.45),
    0 14px 32px rgba(94, 202, 197, 0.45),
    0 8px 24px rgba(139, 92, 246, 0.30),
    0 4px 18px rgba(244, 114, 182, 0.18),
    0 0 50px rgba(94, 202, 197, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.20),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(94, 202, 197, 0.22);
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 240ms ease,
              background 240ms ease, border-color 240ms ease;
  overflow: hidden; /* keep the conic gradient inside the rounded shape */
}
/* Light theme — clean white glass card with subtle teal-violet glow */
:root[data-theme="light"] .aic-composer-card,
:root:not([data-theme="dark"]) .aic-composer-card {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 252, 247, 0.88) 60%),
    rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(20, 107, 109, 0.18);
  box-shadow:
    0 22px 60px rgba(15, 32, 38, 0.10),
    0 6px 18px rgba(94, 202, 197, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: var(--text);
}
:root[data-theme="light"] .aic-composer-card::before,
:root:not([data-theme="dark"]) .aic-composer-card::before {
  opacity: 0.30;
}
:root[data-theme="light"] .aic-composer-card::after,
:root:not([data-theme="dark"]) .aic-composer-card::after {
  opacity: 0.35;
}

/* The animated rainbow ring sits behind the card via a pseudo-element.
   On focus it brightens + spins. Off-focus it's subtle (low opacity).
   This is the "Apple Intelligence" treatment.                           */
.aic-composer-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(
    from 0deg,
    rgba(94, 202, 197, 1),
    rgba(79, 140, 255, 0.95),
    rgba(139, 92, 246, 0.95),
    rgba(244, 114, 182, 0.85),
    rgba(255, 164, 87, 0.75),
    rgba(94, 202, 197, 1)
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0.75;
  animation: aic-ring-spin 8s linear infinite;
  pointer-events: none;
  transition: opacity 280ms ease;
  z-index: 0;
}

/* Compact Apple-Intelligence aurora — teal + magenta + blue glow under
   the bar. Smaller spread than the maxed-out version so it doesn't
   bleed across the whole editor. */
.aic-composer-card::after {
  content: "";
  position: absolute;
  inset: -48px -40px -48px -40px;
  border-radius: 56px;
  background:
    radial-gradient(ellipse 65% 90% at 25% 100%,
      rgba(94, 202, 197, 0.72),
      rgba(94, 202, 197, 0.28) 45%,
      transparent 72%),
    radial-gradient(ellipse 65% 90% at 75% 100%,
      rgba(244, 114, 182, 0.50),
      rgba(139, 92, 246, 0.36) 45%,
      transparent 72%),
    radial-gradient(ellipse 80% 60% at 50% 100%,
      rgba(79, 140, 255, 0.32),
      transparent 72%);
  filter: blur(28px) saturate(1.25);
  opacity: 0.95;
  animation: aic-breathe 4s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

.aic-composer-card:hover {
  transform: translateY(-1px);
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.5),
    0 8px 22px rgba(94, 202, 197, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}

.aic-composer-card:hover::before { opacity: 0.7; }

.aic-composer-card:focus-within {
  border-color: rgba(94, 202, 197, 0.4);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.55),
    0 10px 30px rgba(94, 202, 197, 0.3),
    0 0 0 4px rgba(94, 202, 197, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.aic-composer-card:focus-within::before {
  opacity: 0.95;
  animation-duration: 5s; /* speed up rotation when active */
}

@keyframes aic-ring-spin {
  to { transform: rotate(360deg); }
}

@keyframes aic-breathe {
  /* Stronger breathing — aura grows + brightens noticeably for that
     "alive, listening" Siri feel. */
  0%, 100% { opacity: 0.75; transform: scale(0.96); }
  50%      { opacity: 1;    transform: scale(1.06); }
}

.aic-composer-input {
  position: relative;
  z-index: 1;
  flex: 1;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  font-size: 1rem;
  font-weight: 500;
  /* Theme-aware text color — white in dark, near-black in light */
  color: var(--text);
  resize: none;
  line-height: 1.55;
  font-family: inherit;
  max-height: 180px;
  min-height: unset;
  overflow-y: auto;
  padding: 10px 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  width: 100%;
  letter-spacing: -0.005em;
}
:root[data-theme="dark"] .aic-composer-input {
  color: #ffffff;
}

.aic-composer-input::placeholder {
  /* Theme-aware placeholder */
  color: var(--placeholder) !important;
  font-weight: 400;
}
:root[data-theme="dark"] .aic-composer-input::placeholder {
  color: rgba(255, 255, 255, 0.55) !important;
}

/* Light-mode tuning — keep the glass feel but on a paper background */
@media (prefers-color-scheme: light) {
  .aic-composer-card {
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65) 60%),
      rgba(245, 248, 252, 0.75);
    border-color: rgba(10, 30, 40, 0.08);
    box-shadow:
      0 18px 50px rgba(15, 30, 50, 0.18),
      0 6px 18px rgba(94, 202, 197, 0.16),
      inset 0 1px 0 rgba(255, 255, 255, 0.6),
      inset 0 -1px 0 rgba(15, 30, 50, 0.04);
  }
  .aic-composer-input {
    color: #0b1a28;
  }
  .aic-composer-input::placeholder {
    color: rgba(20, 40, 55, 0.55) !important;
  }
}

/* The big circular send button — gradient, glowing, bouncy */
.aic-send {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  border: none;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04)),
    linear-gradient(135deg, #5ecac5, #4f8cff 50%, #8b5cf6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.2s ease,
              opacity 0.15s ease;
  box-shadow:
    0 8px 22px rgba(94, 202, 197, 0.5),
    0 3px 10px rgba(139, 92, 246, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.aic-send:hover:not(:disabled) {
  transform: scale(1.08) translateY(-1px);
  box-shadow:
    0 12px 30px rgba(94, 202, 197, 0.6),
    0 5px 14px rgba(139, 92, 246, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.aic-send:active:not(:disabled) {
  transform: scale(0.94);
  box-shadow:
    0 4px 12px rgba(94, 202, 197, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.aic-send:disabled {
  opacity: 0.42;
  cursor: default;
  box-shadow: none;
  background:
    linear-gradient(135deg, rgba(94, 202, 197, 0.45), rgba(139, 92, 246, 0.4));
}

/* Send button text "R" — bigger when ready (after a small slide-in animation) */
.ai-composer-send-r {
  font-weight: 800;
  font-size: 16px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.aic-composer-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.42);
  margin: 10px 0 0;
  letter-spacing: 0.02em;
  font-weight: 500;
}

@media (prefers-color-scheme: light) {
  .aic-composer-hint { color: rgba(20, 40, 55, 0.45); }
}

.aic-composer-hint svg {
  width: 12px;
  height: 12px;
}

/* Reduced-motion: drop the spin + breathe animations */
@media (prefers-reduced-motion: reduce) {
  .aic-composer-card::before,
  .aic-composer-card::after { animation: none !important; }
}

/* ══════════════════════════════════════════════════
   Integrations — Trigger icon + Modal
   ══════════════════════════════════════════════════ */
.intg-trigger-icon {
  width: 28px; height: 28px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 45%, #8b5cf6));
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 30%, transparent);
  transition: transform 0.15s, box-shadow 0.15s;
}
.intg-trigger:hover .intg-trigger-icon { transform: scale(1.08); box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 40%, transparent); }
.intg-trigger.active .intg-trigger-icon { box-shadow: 0 0 0 2px var(--accent), 0 4px 14px color-mix(in srgb, var(--accent) 40%, transparent); }

.intg-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(6px);
  z-index: 300; display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: intg-fade 0.15s ease-out;
}
@keyframes intg-fade { from { opacity: 0; } to { opacity: 1; } }

.intg-modal {
  width: 100%; max-width: 520px; max-height: 85vh; overflow-y: auto;
  background: var(--bg); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5); padding: 28px;
  animation: intg-modal-in 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes intg-modal-in { from { opacity: 0; transform: translateY(12px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

.intg-modal-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.intg-modal-title-row { display: flex; align-items: center; gap: 14px; }
.intg-modal-icon {
  width: 44px; height: 44px; border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 45%, #8b5cf6));
  color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 30%, transparent);
}
.intg-modal-header h2 { font-size: 1.1rem; font-weight: 700; margin: 0 0 2px; color: var(--text); }
.intg-modal-header p { font-size: 0.82rem; color: var(--muted); margin: 0; }
.intg-modal-close {
  background: none; border: none; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 8px;
  transition: color 0.12s, background 0.12s;
}
.intg-modal-close:hover { color: var(--text); background: color-mix(in srgb, var(--muted) 10%, transparent); }

.intg-modal-key-section { margin-bottom: 20px; padding: 14px 16px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; }
.intg-modal-key-label { font-size: 0.78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 10px; }
.intg-gen-key { width: 100%; }
.intg-key-row { display: flex; align-items: center; gap: 8px; }
.intg-key-value {
  flex: 1; font-size: 0.78rem; font-family: monospace; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: var(--surface); padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line);
}
.intg-copy-btn {
  background: var(--accent); color: var(--accent-text); border: none; border-radius: 8px;
  padding: 7px 14px; font-size: 0.76rem; font-weight: 600; cursor: pointer; font-family: inherit; white-space: nowrap;
}

.intg-modal-list { display: flex; flex-direction: column; gap: 8px; }
.intg-modal-card { border: 1px solid var(--line); border-radius: 14px; background: var(--bg); overflow: hidden; transition: border-color 0.12s; }
.intg-modal-card:hover, .intg-modal-card.expanded { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }

.intg-modal-card-head {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; width: 100%;
  background: none; border: none; cursor: pointer; font-family: inherit; color: var(--text); text-align: left;
}
.intg-modal-card-icon {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--intg-color, var(--accent)), color-mix(in srgb, var(--intg-color, var(--accent)) 60%, #1a1a2e));
  color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  box-shadow: 0 3px 10px color-mix(in srgb, var(--intg-color, var(--accent)) 25%, transparent);
}
.intg-modal-card-info { flex: 1; min-width: 0; }
.intg-modal-card-info strong { font-size: 0.88rem; font-weight: 700; display: block; line-height: 1.3; }
.intg-modal-card-info span { font-size: 0.75rem; color: var(--muted); }

.intg-status-live {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  background: color-mix(in srgb, #22c55e 15%, transparent); color: #22c55e; padding: 3px 8px; border-radius: 6px;
}
.intg-status-coming {
  font-size: 0.68rem; font-weight: 500; color: var(--muted); padding: 3px 8px; border-radius: 6px;
  background: color-mix(in srgb, var(--muted) 10%, transparent);
}
.intg-chevron { color: var(--muted); flex-shrink: 0; }

.intg-modal-card-body { padding: 0 14px 16px; animation: intg-body-in 0.18s ease-out; }
@keyframes intg-body-in { from { opacity: 0; } to { opacity: 1; } }
.intg-modal-card-desc { font-size: 0.84rem; color: var(--text); line-height: 1.6; margin: 0 0 12px; opacity: 0.9; }
.intg-modal-tools-label, .intg-modal-setup-label { font-size: 0.74rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 6px; }
.intg-modal-tools ul { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.intg-modal-tools li { font-size: 0.78rem; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; }
.intg-modal-setup p { font-size: 0.82rem; color: var(--muted); margin: 0 0 10px; line-height: 1.5; }
.intg-modal-config { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.intg-modal-config pre { font-size: 0.76rem; font-family: monospace; color: var(--text); margin: 0 0 10px; white-space: pre-wrap; word-break: break-all; line-height: 1.5; }
.intg-modal-footer { font-size: 0.72rem; color: var(--muted); text-align: center; margin: 16px 0 0; opacity: 0.5; font-family: monospace; }

@media (max-width: 600px) { .intg-modal { max-width: 100%; border-radius: 16px; padding: 20px; } }

/* ── Contact page ── */
.mkt-contact-form-wrap {
  max-width: 600px;
  margin: 28px auto 0;
}

.mkt-contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mkt-contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.mkt-contact-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mkt-contact-label span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

/* FAQ accordion */
.mkt-faq-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 640px;
  margin: 24px auto 0;
}

.mkt-faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.15s;
}

.mkt-faq-item[open] {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
}

.mkt-faq-item summary {
  padding: 16px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: color 0.12s;
}

.mkt-faq-item summary::-webkit-details-marker { display: none; }

.mkt-faq-item summary::after {
  content: "+";
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.mkt-faq-item[open] summary::after {
  transform: rotate(45deg);
  color: var(--accent);
}

.mkt-faq-item summary:hover {
  color: var(--accent);
}

.mkt-faq-item p {
  padding: 0 20px 16px;
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 600px) {
  .mkt-contact-row { grid-template-columns: 1fr; }
}

/* ── Email capture ── */
.mkt-email-capture {
  padding: 20px !important;
  text-align: center;
}

.mkt-email-capture-inner {
  max-width: 480px;
  margin: 0 auto;
}

.mkt-email-capture-inner h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
}

.mkt-email-capture-inner p {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0 0 18px;
  line-height: 1.5;
}

.mkt-email-form {
  display: flex;
  gap: 8px;
  max-width: 420px;
  margin: 0 auto;
}

.mkt-email-form input {
  flex: 1;
}

.mkt-email-form .button {
  white-space: nowrap;
}

@media (max-width: 900px) {
  .mkt-contact-grid { grid-template-columns: 1fr; }
}

/* ── AI Recruiter job results ── */
.recruiter-jobs-section {
  padding: 0 24px 16px;
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
  animation: aic-msg-in 0.22s ease-out;
}

.recruiter-jobs-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 0 10px;
  color: var(--accent);
  font-size: 0.88rem;
}

.recruiter-jobs-header strong {
  color: var(--text);
}

.recruiter-jobs-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recruiter-job-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color 0.12s;
}

.recruiter-job-card:hover {
  border-color: var(--accent);
}

.recruiter-job-info {
  flex: 1;
  min-width: 0;
}

.recruiter-job-info strong {
  font-size: 0.88rem;
  color: var(--text);
  display: block;
  line-height: 1.3;
}

.recruiter-job-info span {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.3;
}

.recruiter-job-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.recruiter-jobs-more {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  padding: 8px 0;
  margin: 0;
}

@media (max-width: 600px) {
  .recruiter-job-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .recruiter-job-actions {
    width: 100%;
  }
}

/* ═══ ATS VIEW TOGGLE ═══ */
.preview-heading-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.ats-view-toggle {
  font-size: 0.78rem;
}

.ats-view-toggle.active {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  color: var(--accent-strong);
}

.ats-view-shell {
  background: var(--surface, #fff);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  overflow-y: auto;
}

/* ─── Dark-theme ATS view ──────────────────────────────────────────────
   The ATS view is meant to simulate plain-text parsing — should feel
   like a clean terminal, NOT match the app's warm premium palette.
   Override the shell to a solid cool-dark background + high-contrast
   neutral body text. Yellow is reserved for actual warnings only. */
:root[data-theme="dark"] .ats-view-shell {
  background: #0e1320;
  border-color: rgba(255, 255, 255, 0.08);
  color: #e5e7eb;
}
:root[data-theme="dark"] .ats-view-body,
:root[data-theme="dark"] .ats-view-line {
  color: #d1d5db;
}

.ats-view-note {
  font-family: inherit;
  font-size: 0.75rem;
  color: var(--muted);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 16px;
  line-height: 1.45;
}
:root[data-theme="dark"] .ats-view-note {
  color: #cbd5e1;
  background: rgba(94, 202, 197, 0.06);
  border-color: rgba(94, 202, 197, 0.22);
}

.ats-view-note-warn {
  color: #b45309;
  font-weight: 600;
}

:root[data-theme="dark"] .ats-view-note-warn {
  color: #fbbf24;
}

.ats-view-body {
  color: var(--text);
}

.ats-view-header {
  font-weight: 700;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin-top: 14px;
  margin-bottom: 4px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line);
}
/* Crisp white headers in dark — clearly demarcates resume sections */
:root[data-theme="dark"] .ats-view-header {
  color: #f8fafc;
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.ats-view-header-warn {
  background: #fef08a;
  color: #78350f;
  padding: 2px 6px;
  border-radius: 4px;
  border-color: #fcd34d;
}

:root[data-theme="dark"] .ats-view-header-warn {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.35);
}

.ats-view-line {
  color: var(--text);
  margin: 1px 0;
  word-break: break-word;
}

/* ═══ TEMPLATE ATS BADGE ═══ */
.template-ats-badge {
  display: block;
  margin-top: 6px;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 5px;
  padding: 3px 6px;
  letter-spacing: 0.01em;
}

.template-ats-badge.ats-ok {
  color: #065f46;
  background: rgba(16, 185, 129, 0.12);
}

.template-ats-badge.ats-risk {
  color: #92400e;
  background: rgba(245, 158, 11, 0.12);
}

:root[data-theme="dark"] .template-ats-badge.ats-ok {
  color: #6ee7b7;
  background: rgba(52, 211, 153, 0.12);
}

:root[data-theme="dark"] .template-ats-badge.ats-risk {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
}

/* ═══ AI REVIEW ATS GAP CARD ═══ */
.ai-review-ats-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 14px;
}

.ai-review-ats-card-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.ai-review-ats-card-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.84rem;
}

.ai-review-ats-card-body strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.ai-review-ats-card-body span {
  color: var(--muted);
}

/* ═══════════════════════════════════════════════════════════════
   iOS Native Shell — Bottom Tab Bar & Library Sheet
   ═══════════════════════════════════════════════════════════════ */

/* Hide horizontal workspace sidebar nav in native shell — bottom nav replaces it */
.native-shell .workspace-sidebar {
  display: none !important;
}

/* Remove sidebar column from grid and add bottom padding for the tab bar */
.native-shell .workspace-shell {
  grid-template-columns: 1fr !important;
  padding-bottom: calc(80px + var(--safe-bottom));
}

/* Topbar: compact fixed bar on native — edge-to-edge, no card styling.
   Height is controlled by --native-topbar-content (content portion only);
   total occupied height = var(--safe-top) + var(--native-topbar-content). */
.native-shell {
  /* Topbar content height. Flex centers the logo vertically so the visual padding
     is auto-distributed. Tweak this single number to change the gap between the
     status bar and the first card. */
  --native-topbar-content: 64px;
}
.native-shell .topbar {
  position: fixed;
  top: 0 !important;
  left: 0;
  right: 0;
  z-index: 140;
  border-radius: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(88, 203, 198, 0.14) !important;
  margin: 0 !important;
  width: 100%;
  height: calc(var(--safe-top) + var(--native-topbar-content));
  padding: var(--safe-top) 14px 0 !important;  /* only safe-area on top, no extra pad */
  min-height: 0;
  box-sizing: border-box;
  align-items: center !important;   /* vertical-center logo in remaining space */
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25) !important;
  background: linear-gradient(180deg, rgba(6, 19, 25, 0.98) 0%, rgba(10, 24, 30, 0.96) 100%) !important;
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
}

/* Remove the floating separator pseudo-element on native */
.native-shell .topbar::after {
  display: none !important;
}

/* Light theme topbar on native */
:root[data-theme="light"] .native-shell .topbar {
  background: linear-gradient(180deg, rgba(244, 248, 247, 0.98) 0%, rgba(238, 244, 243, 0.96) 100%) !important;
  border-bottom: 1px solid rgba(20, 107, 109, 0.12) !important;
  box-shadow: 0 1px 0 rgba(20, 107, 109, 0.05), 0 6px 20px rgba(10, 40, 50, 0.08) !important;
}

/* Light theme topbar title + icons — dark text on light bg */
:root[data-theme="light"] .native-shell .topbar .brand-title,
:root[data-theme="light"] .native-shell .topbar .brand h1 {
  color: #0d2a32 !important;
}
:root[data-theme="light"] .native-shell .topbar .button .button-icon {
  color: #0d2a32 !important;
}

/* Push the mobile menu panel below the new edge-to-edge topbar */
.native-shell .toolbar {
  top: calc(var(--safe-top) + var(--native-topbar-content) + 8px) !important;
  height: calc(100dvh - (var(--safe-top) + var(--native-topbar-content) + 8px + 60px + var(--safe-bottom))) !important;
  max-height: calc(100dvh - (var(--safe-top) + var(--native-topbar-content) + 8px + 60px + var(--safe-bottom))) !important;
  padding-bottom: 18px !important;
}

/* Lift the floating "Preview" CTA above the bottom nav so it's not hidden */
.native-shell .mobile-preview-cta {
  bottom: calc(14px + 60px + var(--safe-bottom)) !important;
}

.native-shell .topbar .brand {
  gap: 8px;
}

.native-shell .topbar .brand h1,
.native-shell .topbar .brand-title {
  font-size: 1rem;
}

.native-shell .topbar .app-logo {
  width: 56px;   /* 37 × 1.5 */
  height: 56px;
  border-radius: 14px;
}

.native-shell .topbar .eyebrow {
  display: none;
}

.native-shell .topbar .button {
  min-height: 34px;
  height: 34px;
  padding: 4px 10px;
}

.native-shell .topbar .button.icon-only {
  width: 34px;
  min-width: 34px;
}

/* Native: shells sit flush against the topbar — no padding-top, no margin.
   First card inside gets a tiny margin-top for breathing room. */
.native-shell .workspace-shell,
.native-shell .dashboard-shell {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Remove ALL inner scroll containers — app-shell is the only thing that scrolls */
.native-shell .panel-scroll,
.native-shell .jobs-panel-scroll,
.native-shell .workspace-content,
.native-shell .workspace.mobile-layout .panel-scroll,
.native-shell .workspace.mobile-layout .editor-panel {
  overflow: visible !important;
  max-height: none !important;
  height: auto !important;
  min-height: 0 !important;
}

/* Kill ALL panel-scroll padding on native (Jobs, Builder, ATS Check all use this) */
.native-shell .workspace.mobile-layout .panel-scroll,
.native-shell .panel-scroll,
.native-shell .jobs-panel-scroll {
  padding: 0 !important;
}

/* ATS Resume Checker: reduce inner padding on native */
.native-shell .resume-checker-shell {
  padding: 0 !important;
  gap: 10px !important;
}

/* Dashboard-shell on native: tight to topbar, slim horizontal gutters */
.native-shell .dashboard-shell {
  padding: 0 8px 12px !important;
}

/* Workspace-shell on native: edge-to-edge content + flush to navbar */
.native-shell .workspace-shell {
  padding-bottom: 0 !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
  margin-top: 0 !important; /* kill the 14px default that leaves a gap under the navbar */
}

/* Kill the margin on ALL first-children in native content containers — flush to topbar */
.native-shell .workspace-content > *:first-child,
.native-shell .workspace-content .panel > *:first-child,
.native-shell .workspace-content .panel-scroll > *:first-child,
.native-shell .dashboard-shell > *:first-child,
.native-shell .workspace.mobile-layout > *:first-child {
  margin-top: 0 !important;
}

/* Also zero out section-level margins that might compound */
.native-shell .workspace-content,
.native-shell .workspace.mobile-layout {
  margin-top: 0 !important;
  gap: 0 !important;
  padding-top: 0 !important;
}

/* Remove the editor-panel wrapper layer on native — cards sit directly on app-shell background */
.native-shell .panel,
.native-shell .editor-panel,
.native-shell .preview-panel,
.native-shell .workspace.mobile-layout .editor-panel {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  overflow: visible !important;
  padding: 0 !important;
}

/* Profile hub: needs bottom padding for tab bar too */
.native-shell .profile-hub-backdrop,
.native-shell .profile-hub-panel {
  padding-bottom: calc(80px + var(--safe-bottom));
}

/* ═══════════════════════════════════════════════════════════════════════
   Profile Hub — iOS polish layer
   Native-only overrides for consistent, tidy, iOS-native feel.
   Applied on top of the existing desktop styles.
   ═══════════════════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════════════════
   Profile Hub — FULL-SCREEN premium tab view (not a modal).
   - Occupies entire area from top edge to just above bottom nav
   - No back button, no done button (user navigates away via bottom tab bar)
   - Deep gradient background with subtle aurora blobs for premium feel
   - No black space anywhere
   ═══════════════════════════════════════════════════════════════════════ */
.native-shell .profile-hub-panel {
  width: 100%;
  /* Fill entire screen above bottom nav */
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  height: auto;
  max-height: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding:
    calc(var(--safe-top, 0px) + 56px) /* room for sticky header */
    16px
    calc(84px + var(--safe-bottom)); /* space above tab bar */
  background:
    radial-gradient(circle at 15% 0%, rgba(94, 202, 197, 0.14), transparent 55%),
    radial-gradient(circle at 85% 15%, rgba(139, 92, 246, 0.12), transparent 55%),
    radial-gradient(circle at 50% 100%, rgba(79, 140, 255, 0.08), transparent 60%),
    linear-gradient(180deg, rgba(10, 16, 26, 1), rgba(6, 10, 18, 1));
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* Backdrop should cover whole screen behind the profile panel.
   Profile panel itself is positioned full-screen above it. */
.native-shell .profile-hub-backdrop {
  bottom: calc(60px + var(--safe-bottom));
  top: 0;
  padding: 0;
  background: rgba(6, 10, 18, 1); /* solid, no seams */
  backdrop-filter: none;
}

/* ═══════════════════════════════════════════════════════════════════════
   Profile Hub header — minimal, elegant, NO buttons.
   Just a big bold title pinned to the top, with a blurred bar behind it
   that activates when user scrolls. No chrome clutter.
   ═══════════════════════════════════════════════════════════════════════ */
.native-shell .profile-hub-head {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  padding:
    calc(var(--safe-top, 0px) + 12px)
    20px
    14px;
  min-height: calc(var(--safe-top, 0px) + 52px);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  background: linear-gradient(180deg,
    rgba(10, 16, 26, 0.72) 0%,
    rgba(10, 16, 26, 0.4) 75%,
    transparent 100%);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.native-shell .profile-hub-nav-title {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
  text-align: left;
  letter-spacing: -0.035em;
  line-height: 1;
  font-feature-settings: "ss01", "cv11";
  background: linear-gradient(135deg, #ffffff 0%, #b8e5e3 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Hide anything leftover from old structure */
.native-shell .profile-hub-head .section-icon,
.native-shell .profile-hub-head h2.section-title,
.native-shell .profile-hub-nav-btn {
  display: none !important;
}

/* ─── Hero identity card — premium glass + gradient ring on avatar ─── */
.native-shell .profile-hub-identity {
  background:
    linear-gradient(145deg, rgba(94, 202, 197, 0.18), rgba(139, 92, 246, 0.14) 50%, rgba(79, 140, 255, 0.12));
  border: 1px solid rgba(94, 202, 197, 0.25);
  border-radius: 24px;
  padding: 20px;
  gap: 16px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.native-shell .profile-hub-identity::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -50px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(94, 202, 197, 0.4), transparent 65%);
  pointer-events: none;
  filter: blur(8px);
}

.native-shell .profile-hub-identity::after {
  content: "";
  position: absolute;
  bottom: -80px;
  left: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.3), transparent 65%);
  pointer-events: none;
  filter: blur(14px);
}

.native-shell .profile-hub-avatar,
.native-shell .profile-hub-avatar-fallback {
  width: 72px;
  height: 72px;
  border: 3px solid transparent;
  background-image:
    linear-gradient(rgba(14, 20, 30, 1), rgba(14, 20, 30, 1)),
    linear-gradient(135deg, #5ecac5, #4f8cff, #8b5cf6);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow:
    0 8px 28px rgba(94, 202, 197, 0.4),
    0 3px 12px rgba(139, 92, 246, 0.3);
  position: relative;
  z-index: 1;
}

.native-shell .profile-hub-avatar-fallback {
  color: #ffffff;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background-image:
    linear-gradient(135deg, rgba(94, 202, 197, 0.2), rgba(139, 92, 246, 0.2)),
    linear-gradient(135deg, #5ecac5, #4f8cff, #8b5cf6);
}

.native-shell .profile-hub-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 3px;
  /* Truncate long emails like Apple private-relay with ellipsis */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  min-width: 0;
}

.native-shell .profile-hub-email {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 500;
  /* Same truncation — long private-relay emails otherwise overflow */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  min-width: 0;
}

/* The parent <div> inside .profile-hub-identity needs min-width:0 so
   flex children can actually shrink and trigger text-overflow. */
.native-shell .profile-hub-identity > div:not(.profile-hub-avatar-fallback):not(.profile-hub-avatar) {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.native-shell .profile-hub-bio {
  display: none; /* Redundant on mobile — less clutter */
}

/* Stats: 2-up grid of pill cards (Plan + Template) */
.native-shell .profile-hub-stats {
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 0 0 18px;
}

.native-shell .profile-hub-stats > div {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 12px 10px;
  text-align: center;
  transition: background 150ms ease;
}

.native-shell .profile-hub-stats > div:active {
  background: rgba(255, 255, 255, 0.07);
}

.native-shell .profile-hub-stats .insight-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 4px;
}

.native-shell .profile-hub-stats .insight-value,
.native-shell .profile-hub-stats .insight-value.small {
  font-size: 17px !important;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.native-shell .profile-hub-stats .hub-stat-note {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 3px;
  line-height: 1.2;
}

/* Section cards — iOS grouped-table feel */
.native-shell .profile-hub-section {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 16px 16px 14px;
  margin-bottom: 12px;
}

.native-shell .profile-hub-section-head {
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.native-shell .profile-hub-section h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.native-shell .profile-hub-section .auth-copy {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.45;
  margin: 0 0 12px;
}

.native-shell .profile-hub-section .auth-state.on {
  background: rgba(94, 202, 197, 0.18);
  color: #5ecac5;
  border: 1px solid rgba(94, 202, 197, 0.35);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.native-shell .profile-hub-section .auth-state.off {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* Buttons inside profile sections — bigger touch targets, consistent spacing */
.native-shell .profile-hub-section .button {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 12px;
  min-height: 44px;
}

.native-shell .profile-hub-section .auth-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Quick tools grid — cleaner 2-col layout, larger touch targets */
.native-shell .profile-quick-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 4px;
}

.native-shell .profile-quick-tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms ease, transform 100ms ease;
  min-height: 76px;
  font-family: inherit;
}

.native-shell .profile-quick-tool:active {
  background: rgba(255, 255, 255, 0.08);
  transform: scale(0.97);
}

.native-shell .profile-quick-tool-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(94, 202, 197, 0.25), rgba(139, 92, 246, 0.2));
  border: 1px solid rgba(94, 202, 197, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5ecac5;
}

.native-shell .profile-quick-tool-label {
  font-size: 12.5px;
  letter-spacing: -0.005em;
}

/* Form inputs */
.native-shell .profile-hub-form-grid {
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 4px 0 10px;
}

.native-shell .profile-hub-form-grid label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
  display: block;
}

.native-shell .profile-hub-form-grid input {
  margin-top: 4px;
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #ffffff;
  font-family: inherit;
}

.native-shell .profile-hub-form-grid input:disabled {
  opacity: 0.55;
}

/* Delete account button — separated danger zone with clear visual */
.native-shell .profile-hub-section .button.danger {
  background: transparent;
  color: #ff7a7a;
  border: 1px solid rgba(255, 120, 120, 0.3);
}

.native-shell .profile-hub-section .button.danger:active {
  background: rgba(255, 120, 120, 0.1);
}

/* ═══════════════════════════════════════════════════════════════════════
   Profile Hub — LIGHT THEME overrides for iOS native shell
   ─────────────────────────────────────────────────────────────────────
   The base .native-shell styles above were designed for dark mode and
   use hardcoded white-on-black palette. When the user switches to light
   theme on iOS, these overrides re-paint EVERYTHING so the profile
   reads naturally on a pale background. All re-skinned: panel bg,
   sticky header, identity card, stats grid, sections, quick tools,
   form inputs, and the inline auth-state pills.
   ═══════════════════════════════════════════════════════════════════════ */
:root[data-theme="light"] .native-shell .profile-hub-panel {
  background:
    radial-gradient(circle at 15% 0%, rgba(20, 107, 109, 0.07), transparent 55%),
    radial-gradient(circle at 85% 15%, rgba(139, 92, 246, 0.05), transparent 55%),
    radial-gradient(circle at 50% 100%, rgba(94, 202, 197, 0.05), transparent 60%),
    linear-gradient(180deg, #fbf8f3 0%, #ffffff 100%);
}
:root[data-theme="light"] .native-shell .profile-hub-backdrop {
  background: #ffffff;
}
:root[data-theme="light"] .native-shell .profile-hub-head {
  background: linear-gradient(180deg,
    rgba(255, 252, 247, 0.85) 0%,
    rgba(255, 252, 247, 0.55) 75%,
    transparent 100%);
  border-bottom-color: rgba(20, 40, 55, 0.06);
}
:root[data-theme="light"] .native-shell .profile-hub-nav-title {
  background: linear-gradient(135deg, #102126 0%, #146b6d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Identity card — premium glass on light, soft gradient ring */
:root[data-theme="light"] .native-shell .profile-hub-identity {
  background:
    linear-gradient(145deg, rgba(20, 107, 109, 0.08), rgba(139, 92, 246, 0.06) 50%, rgba(79, 140, 255, 0.05));
  border-color: rgba(20, 107, 109, 0.18);
  box-shadow:
    0 14px 40px rgba(15, 32, 38, 0.08),
    0 0 0 1px rgba(20, 40, 55, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
:root[data-theme="light"] .native-shell .profile-hub-identity::before {
  background: radial-gradient(circle, rgba(20, 107, 109, 0.18), transparent 65%);
}
:root[data-theme="light"] .native-shell .profile-hub-identity::after {
  background: radial-gradient(circle, rgba(139, 92, 246, 0.14), transparent 65%);
}
:root[data-theme="light"] .native-shell .profile-hub-avatar,
:root[data-theme="light"] .native-shell .profile-hub-avatar-fallback {
  background-image:
    linear-gradient(#ffffff, #ffffff),
    linear-gradient(135deg, #146b6d, #4f8cff, #8b5cf6);
  box-shadow:
    0 8px 24px rgba(20, 107, 109, 0.22),
    0 3px 10px rgba(139, 92, 246, 0.18);
}
:root[data-theme="light"] .native-shell .profile-hub-avatar-fallback {
  color: #146b6d;
  background-image:
    linear-gradient(135deg, rgba(20, 107, 109, 0.08), rgba(139, 92, 246, 0.08)),
    linear-gradient(135deg, #146b6d, #4f8cff, #8b5cf6);
}
:root[data-theme="light"] .native-shell .profile-hub-name {
  color: #102126;
}
:root[data-theme="light"] .native-shell .profile-hub-email {
  color: rgba(20, 40, 55, 0.62);
}

/* Stats pills — light glass cards */
:root[data-theme="light"] .native-shell .profile-hub-stats > div {
  background: rgba(20, 40, 55, 0.04);
  border-color: rgba(20, 40, 55, 0.08);
}
:root[data-theme="light"] .native-shell .profile-hub-stats > div:active {
  background: rgba(20, 40, 55, 0.07);
}
:root[data-theme="light"] .native-shell .profile-hub-stats .insight-label {
  color: rgba(20, 40, 55, 0.55);
}
:root[data-theme="light"] .native-shell .profile-hub-stats .insight-value,
:root[data-theme="light"] .native-shell .profile-hub-stats .insight-value.small {
  color: #102126;
}
:root[data-theme="light"] .native-shell .profile-hub-stats .hub-stat-note {
  color: rgba(20, 40, 55, 0.5);
}

/* Section cards (iOS grouped-table feel) */
:root[data-theme="light"] .native-shell .profile-hub-section {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(20, 40, 55, 0.07);
  box-shadow: 0 2px 10px rgba(15, 32, 38, 0.03);
}
:root[data-theme="light"] .native-shell .profile-hub-section h3 {
  color: #102126;
}
:root[data-theme="light"] .native-shell .profile-hub-section .auth-copy {
  color: rgba(20, 40, 55, 0.7);
}

/* Auth state pills */
:root[data-theme="light"] .native-shell .profile-hub-section .auth-state.on {
  background: rgba(20, 107, 109, 0.10);
  color: #0d5255;
  border-color: rgba(20, 107, 109, 0.32);
}
:root[data-theme="light"] .native-shell .profile-hub-section .auth-state.off {
  background: rgba(20, 40, 55, 0.05);
  color: rgba(20, 40, 55, 0.65);
  border-color: rgba(20, 40, 55, 0.12);
}

/* Quick tools grid */
:root[data-theme="light"] .native-shell .profile-quick-tool {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(20, 40, 55, 0.08);
  color: #102126;
  box-shadow: 0 2px 8px rgba(15, 32, 38, 0.04);
}
:root[data-theme="light"] .native-shell .profile-quick-tool:active {
  background: rgba(20, 107, 109, 0.06);
}
:root[data-theme="light"] .native-shell .profile-quick-tool-icon {
  background: linear-gradient(135deg, rgba(20, 107, 109, 0.14), rgba(139, 92, 246, 0.10));
  border-color: rgba(20, 107, 109, 0.22);
  color: #146b6d;
}

/* Form inputs (editable name/email) */
:root[data-theme="light"] .native-shell .profile-hub-form-grid label {
  color: rgba(20, 40, 55, 0.62);
}
:root[data-theme="light"] .native-shell .profile-hub-form-grid input {
  background: #ffffff;
  border-color: rgba(20, 40, 55, 0.14);
  color: #102126;
}
:root[data-theme="light"] .native-shell .profile-hub-form-grid input::placeholder {
  color: rgba(20, 40, 55, 0.42);
}

/* Danger button — adjust red for white background contrast */
:root[data-theme="light"] .native-shell .profile-hub-section .button.danger {
  color: #b91c1c;
  border-color: rgba(185, 28, 28, 0.3);
}
:root[data-theme="light"] .native-shell .profile-hub-section .button.danger:active {
  background: rgba(185, 28, 28, 0.08);
}

/* Bottom Tab Bar */
.ios-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: space-around;
  z-index: 250 !important;
  height: calc(60px + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  /* IMPORTANT: keep this background fully opaque (no rgba transparency
     beyond the tail of the gradient) — when the iOS keyboard hides, the
     WKWebView briefly snaps the layout back and any semi-transparent fixed
     element exposes the body / accent color underneath, which renders as a
     "green flash" on the bottom nav. The opaque dark gradient kills that. */
  background: linear-gradient(180deg, #061318 0%, #040c12 100%);
  /* backdrop-filter is kept as a *bonus* visual on devices that support
     it cleanly, but the layer above is fully opaque so the filter is
     never load-bearing for visibility. */
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  border-top: 1px solid rgba(88, 203, 198, 0.16);
  box-shadow:
    0 -1px 0 rgba(88, 203, 198, 0.08),
    0 -8px 32px rgba(0, 0, 0, 0.36);
  /* Slide-down on hide — used when a full-screen sheet is open so the
     sheet's CTAs can reach the true bottom of the screen */
  transition: transform 260ms cubic-bezier(0.4, 0, 0.2, 1), opacity 220ms ease;
  /* Force GPU compositing so iOS doesn't redraw the layer mid-keyboard
     transition (which is what produces the brief flash). */
  transform: translateZ(0);
  will-change: transform;
  -webkit-transform: translateZ(0);
}

/* Safety net — when the keyboard is open, lock the body background to dark
   so any tiny gap between the nav and the bottom of the WebView shows a
   matching dark color instead of the canvas teal accent. */
body.keyboard-open,
html.keyboard-open {
  background: #040b11 !important;
}
body.keyboard-open::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(60px + var(--safe-bottom));
  background: #040b11;
  z-index: 200;
  pointer-events: none;
}

.ios-bottom-nav-hidden,
body.keyboard-open .ios-bottom-nav {
  /* Slide the bottom nav offscreen when keyboard is open — frees up space
     for the composer to lift right above the keyboard, and prevents the
     nav buttons from being "behind" the keyboard layer. */
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

/* Hide the chat composer when a full-screen sheet is open */
.ai-composer-wrap-hidden {
  opacity: 0 !important;
  transform: translateY(120%) !important;
  pointer-events: none !important;
  transition: transform 260ms cubic-bezier(0.4, 0, 0.2, 1), opacity 220ms ease !important;
}

:root[data-theme="light"] .ios-bottom-nav {
  background: linear-gradient(180deg, rgba(244, 248, 247, 0.97) 0%, rgba(238, 244, 243, 0.99) 100%);
  border-top: 1px solid rgba(20, 107, 109, 0.14);
  box-shadow:
    0 -1px 0 rgba(20, 107, 109, 0.06),
    0 -6px 20px rgba(10, 40, 50, 0.1);
}

.ios-tab-btn {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 4px 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  -webkit-tap-highlight-color: transparent;
  transition: color 0.14s ease, opacity 0.14s ease;
  touch-action: manipulation;
  min-height: 60px;
  position: relative;
  overflow: hidden;
}

.ios-tab-btn::before {
  content: "";
  position: absolute;
  inset: 6px 10%;
  background: var(--accent-soft);
  border-radius: 10px;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.ios-tab-btn.active::before {
  opacity: 1;
  transform: scale(1);
}

.ios-tab-btn:active {
  opacity: 0.68;
}

.ios-tab-btn.active {
  color: var(--accent);
}

.ios-tab-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: transform 0.14s ease;
}

.ios-tab-btn.active .ios-tab-icon {
  stroke-width: 2.1;
  transform: scale(1.06);
}

.ios-tab-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  font-family: "Poppins", sans-serif;
  line-height: 1;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

/* Native Library Sheet — slide-up panel for resume selection */
.native-library-backdrop {
  position: fixed;
  inset: 0;
  bottom: calc(52px + var(--safe-bottom));
  background: rgba(4, 14, 20, 0.6);
  z-index: 190;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* Web variant — no iOS bottom nav to clear, sheet sits flush at viewport
   bottom and can use a centered modal layout on larger screens. */
.native-library-backdrop.is-web {
  bottom: 0;
  z-index: 1000;
  justify-content: center;
  padding: 24px;
}
.native-library-backdrop.is-web .native-library-sheet {
  border-radius: 28px;
  border: 1px solid rgba(94, 202, 197, 0.18);
  width: min(1100px, calc(100vw - 48px));
  max-width: min(1100px, calc(100vw - 48px));
  height: min(820px, calc(100dvh - 64px));
  max-height: min(820px, calc(100dvh - 64px));
  margin: 0 auto;
  align-self: center;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(94, 202, 197, 0.10) inset;
}
.native-library-backdrop.is-web .native-library-sheet.native-library-sheet-stack {
  max-height: min(820px, calc(100dvh - 64px));
}
/* Larger stage for the bigger web modal so cards have room to spread */
.native-library-backdrop.is-web .library-stack-stage {
  min-height: 460px;
}
.native-library-backdrop.is-web .library-stack-card {
  width: 240px;
  height: 340px;
  margin-left: -120px;
  margin-top: -170px;
}
@media (max-width: 720px) {
  .native-library-backdrop.is-web {
    padding: 0;
  }
  .native-library-backdrop.is-web .native-library-sheet {
    width: 100%;
    max-width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
  /* Bigger cards on mobile so they feel like real "objects" instead of
     thumbnails — the available width is taller and narrower than desktop,
     so we can afford a fuller card without it cropping the side cards. */
  .native-library-backdrop.is-web .library-stack-stage,
  .library-stack-stage {
    min-height: 440px;
  }
  .native-library-backdrop.is-web .library-stack-card,
  .library-stack-card {
    width: 240px;
    height: 360px;
    margin-left: -120px;
    margin-top: -180px;
    border-radius: 26px;
  }
  /* Roomier inner padding to match the bigger card frame */
  .library-stack-card-inner {
    padding: 22px 20px;
  }
  .library-stack-card-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 14px;
  }
  .library-stack-card-name {
    font-size: 18px;
    line-height: 1.22;
  }
  .library-stack-card-role { font-size: 13px; }
  .library-stack-card-company { font-size: 12px; }

  /* Bigger header — title + segmented toggle scale up so they feel
     proportional on phone screens instead of being tiny in a corner. */
  .native-library-title {
    font-size: 1.18rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.015em !important;
  }
  .library-view-segmented {
    padding: 4px;
    gap: 0;
  }
  .library-view-segmented-pill {
    top: 4px;
    bottom: 4px;
    width: calc(50% - 4px);
    transform: translateX(4px);
  }
  .library-view-segmented.is-list .library-view-segmented-pill {
    transform: translateX(calc(100% + 4px));
  }
  .library-view-seg-btn {
    padding: 9px 16px;
    font-size: 13.5px;
  }
  .library-view-seg-btn svg {
    width: 17px;
    height: 17px;
  }
  /* Keep both labels visible on mobile (we have plenty of horizontal room
     in the header). The earlier 480px rule that hid them was overriding —
     we restore visibility for tablets/phones where the header has space. */
  .library-view-seg-btn span { display: inline; }

  /* "Done" button also gets a bit beefier so the touch target is comfy */
  .native-library-done {
    font-size: 1rem !important;
    padding: 6px 4px !important;
  }
  /* Header padding bumped slightly for breathing room */
  .native-library-header {
    padding: 22px 20px 16px;
  }
}

/* Tiny phones (older iPhones, Android budget phones) — pull back a touch
   so the bigger card still fits without overflowing the side cards. */
@media (max-width: 380px) {
  .native-library-backdrop.is-web .library-stack-card,
  .library-stack-card {
    width: 220px;
    height: 330px;
    margin-left: -110px;
    margin-top: -165px;
  }
  .library-view-seg-btn span { display: none; }
  .library-view-seg-btn { padding: 9px 12px; }
}

.native-library-sheet {
  background: var(--card-bg);
  border-radius: 20px 20px 0 0;
  border: 1px solid var(--line);
  border-bottom: none;
  max-height: 72dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.44);
  animation: ios-sheet-up 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

/* Stack-mode sheet: taller, darker, lets the 3D cards breathe */
.native-library-sheet.native-library-sheet-stack {
  max-height: 86dvh;
  background:
    radial-gradient(ellipse 90% 70% at 50% 30%, rgba(94,202,197,0.10), transparent 60%),
    radial-gradient(ellipse 70% 50% at 90% 90%, rgba(94,202,197,0.06), transparent 60%),
    linear-gradient(180deg, #08111a 0%, #050b11 100%);
  border-color: rgba(94,202,197,0.12);
}
.native-library-sheet-stack .native-library-title {
  color: #eaf6f5;
  letter-spacing: -0.01em;
}
.native-library-sheet-stack .native-library-header {
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.native-library-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* iOS-style segmented control — sliding pill indicator picks the active mode.
   Used for "Stack" / "List" toggle in the saved-resumes sheet. */
.library-view-segmented {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 3px;
  gap: 0;
}
.library-view-segmented-pill {
  position: absolute;
  top: 3px;
  bottom: 3px;
  width: calc(50% - 3px);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(94, 202, 197, 0.95), rgba(20, 107, 109, 0.85));
  box-shadow:
    0 2px 8px rgba(94, 202, 197, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  left: 0;
  transform: translateX(3px);
}
.library-view-segmented.is-list .library-view-segmented-pill {
  transform: translateX(calc(100% + 3px));
}

.library-view-seg-btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px 6px 12px;
  border: 0;
  background: transparent;
  color: rgba(234, 246, 245, 0.55);
  font-size: 12.5px;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  letter-spacing: 0.005em;
  cursor: pointer;
  border-radius: 999px;
  transition: color 0.22s ease;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.library-view-seg-btn.is-active {
  color: #ffffff;
}
.library-view-seg-btn:not(.is-active):hover {
  color: rgba(234, 246, 245, 0.85);
}
.library-view-seg-btn svg {
  flex-shrink: 0;
}

/* (Removed — the 380px rule below now controls icon-only collapse so we
   keep readable labels on the broader phone-size range.) */

/* ═══════════════════════════════════════════════════════════════════════
   Glass card stack — saved resumes shown as 3D frosted cards
   ═══════════════════════════════════════════════════════════════════════ */
.library-stack-wrap {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 12px 0 18px;
}

.library-stack-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 360px;
  perspective: 1400px;
  perspective-origin: 50% 60%;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  cursor: grab;
}
.library-stack-stage:active { cursor: grabbing; }

/* Soft shelf line under the cards — subtle reflection cue */
.library-stack-stage::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(94,202,197,0.35), transparent);
  filter: blur(1px);
  z-index: 0;
}

.library-stack-track {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

/* Cards anchor to the center of the stage and translate from there */
.library-stack-card {
  position: absolute;
  top: 50%;
  left: 50%;
  margin-left: -100px;   /* half of width  (200px) */
  margin-top: -145px;    /* half of height (290px) */
  width: 200px;
  height: 290px;
  border-radius: 22px;
  background: linear-gradient(140deg,
    rgba(255, 255, 255, 0.13),
    rgba(255, 255, 255, 0.04) 55%,
    rgba(255, 255, 255, 0.10) 100%);
  backdrop-filter: blur(28px) saturate(1.55);
  -webkit-backdrop-filter: blur(28px) saturate(1.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.55),
    0 4px 18px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04);
  transition:
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.4s ease,
    box-shadow 0.4s ease,
    background 0.4s ease,
    border-color 0.4s ease;
  transform-style: preserve-3d;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}

/* Glossy diagonal shine sweep on each card */
.library-stack-card-shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.18) 0%,
    rgba(255, 255, 255, 0) 35%,
    rgba(255, 255, 255, 0) 65%,
    rgba(255, 255, 255, 0.06) 100%
  );
  pointer-events: none;
  z-index: 1;
}

.library-stack-card-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 18px 16px;
  color: #eaf6f5;
}

.library-stack-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.library-stack-card-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  color: #eaf6f5;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-family: "Poppins", sans-serif;
}

.library-stack-card-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(94, 202, 197, 0.18);
  border: 1px solid rgba(94, 202, 197, 0.45);
  color: #c8f0ed;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.library-stack-card-name {
  font-size: 16px;
  font-weight: 700;
  font-family: "Poppins", sans-serif;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: #ffffff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}

.library-stack-card-role {
  font-size: 12px;
  font-weight: 500;
  color: rgba(234, 246, 245, 0.78);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.library-stack-card-company {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: rgba(94, 202, 197, 0.95);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.library-stack-card-spacer { flex: 1 1 auto; }

.library-stack-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: rgba(234, 246, 245, 0.55);
  letter-spacing: 0.02em;
  text-transform: capitalize;
}
.library-stack-card-template {
  background: rgba(255,255,255,0.06);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.06);
}

.library-stack-card-delete {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.35);
  color: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  transition: opacity 0.3s ease, background 0.15s ease;
}
.library-stack-card.is-active .library-stack-card-delete { opacity: 1; }
.library-stack-card-delete:hover {
  background: rgba(229, 70, 80, 0.7);
  border-color: rgba(229, 70, 80, 0.85);
}

/* Active (centered) card — Refynes teal aurora glow + lift */
.library-stack-card.is-active {
  background:
    linear-gradient(140deg, rgba(94,202,197,0.55), rgba(20,107,109,0.40) 55%, rgba(94,202,197,0.50)),
    linear-gradient(140deg, rgba(167,139,250,0.18), transparent 70%);
  border-color: rgba(94,202,197,0.65);
  box-shadow:
    0 36px 90px rgba(94,202,197,0.40),
    0 12px 30px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255,255,255,0.30),
    inset 0 -1px 0 rgba(255,255,255,0.06);
}
.library-stack-card.is-active .library-stack-card-avatar {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.30);
  color: #ffffff;
}
.library-stack-card.is-active .library-stack-card-name {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
.library-stack-card.is-active .library-stack-card-template {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.18);
  color: #ffffff;
}

/* Special ring on the resume that's currently loaded in the editor */
.library-stack-card.is-current::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  pointer-events: none;
  border: 1.5px solid rgba(94, 202, 197, 0.55);
  box-shadow: 0 0 28px rgba(94, 202, 197, 0.35);
}

/* Empty state — single floating card with a "+" */
.library-stack-empty {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
}
.library-stack-empty-card {
  width: 200px;
  height: 290px;
  border-radius: 22px;
  background: linear-gradient(140deg, rgba(255,255,255,0.10), rgba(255,255,255,0.03));
  backdrop-filter: blur(20px) saturate(1.5);
  border: 1.5px dashed rgba(94,202,197,0.32);
  display: flex;
  align-items: center;
  justify-content: center;
}
.library-stack-empty-glyph {
  font-size: 64px;
  font-weight: 200;
  color: rgba(94,202,197,0.65);
  line-height: 1;
}
.library-stack-empty-text {
  margin: 0;
  font-size: 14px;
  color: rgba(234, 246, 245, 0.7);
}
.library-stack-create-btn {
  border: 1px solid rgba(94,202,197,0.45);
  background: rgba(94,202,197,0.14);
  color: #c8f0ed;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 12px;
  cursor: pointer;
  font-family: "Poppins", sans-serif;
}

/* Stack controls — pagination dots / counter + arrow buttons */
.library-stack-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 8px 20px 12px;
  flex-shrink: 0;
}
.library-stack-arrow {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  color: rgba(234, 246, 245, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, transform 0.12s ease, opacity 0.2s ease;
}
.library-stack-arrow:not(:disabled):active {
  transform: scale(0.92);
  background: rgba(94,202,197,0.20);
}
.library-stack-arrow:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}
.library-stack-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 100px;
  justify-content: center;
}
.library-stack-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  transition: background 0.25s ease, transform 0.25s ease;
}
.library-stack-dot.is-active {
  background: #5ecac5;
  transform: scale(1.5);
  box-shadow: 0 0 12px rgba(94,202,197,0.6);
}
.library-stack-counter {
  font-size: 12px;
  font-weight: 600;
  color: rgba(234, 246, 245, 0.7);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* Bottom action row — New + Open buttons */
.library-stack-actions {
  display: flex;
  gap: 10px;
  padding: 0 20px calc(16px + var(--safe-bottom));
  flex-shrink: 0;
}
.library-stack-new,
.library-stack-open {
  flex: 1 1 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.library-stack-new {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  color: #eaf6f5;
}
.library-stack-new:active { transform: scale(0.97); background: rgba(255,255,255,0.10); }
.library-stack-new-icon {
  font-size: 18px;
  line-height: 1;
  color: rgba(94,202,197,0.95);
}
.library-stack-open {
  background: linear-gradient(135deg, #5ecac5, #146b6d);
  border: 1px solid rgba(94,202,197,0.55);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(94,202,197,0.35);
}
.library-stack-open:active {
  transform: scale(0.97);
  box-shadow: 0 4px 14px rgba(94,202,197,0.45);
}
.library-stack-open:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Tighter spacing on small phones */
@media (max-height: 720px) {
  .library-stack-stage { min-height: 300px; }
  .library-stack-card {
    width: 180px;
    height: 250px;
    margin-left: -90px;
    margin-top: -125px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   List view — clean expandable cards. Each row shows the full name (no
   truncation), lifts on hover, and expands inline on click to reveal stats
   + Open / Delete buttons. A second click opens the resume.
   ═══════════════════════════════════════════════════════════════════════ */
.library-list-wrap {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 14px 18px calc(20px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.library-list-new-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1.5px dashed rgba(94, 202, 197, 0.45);
  background: rgba(94, 202, 197, 0.06);
  color: #c8f0ed;
  font-size: 14px;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}
.library-list-new-btn:hover {
  background: rgba(94, 202, 197, 0.14);
  border-color: rgba(94, 202, 197, 0.75);
}
.library-list-new-btn:active { transform: scale(0.98); }
.library-list-new-icon {
  font-size: 18px;
  line-height: 1;
  color: rgba(94, 202, 197, 1);
}

.library-list-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.library-list-card {
  background: linear-gradient(140deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  overflow: hidden;
  transition:
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease;
  position: relative;
}
.library-list-card:hover {
  transform: translateY(-3px);
  background: linear-gradient(140deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  border-color: rgba(94, 202, 197, 0.30);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(94, 202, 197, 0.14) inset;
}
.library-list-card.is-expanded {
  background: linear-gradient(140deg, rgba(94,202,197,0.10), rgba(167,139,250,0.04));
  border-color: rgba(94, 202, 197, 0.45);
  box-shadow:
    0 18px 40px rgba(94, 202, 197, 0.18),
    0 0 0 1px rgba(94, 202, 197, 0.30) inset;
  transform: translateY(-3px);
}
.library-list-card.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #5ecac5, #146b6d);
  box-shadow: 0 0 14px rgba(94, 202, 197, 0.55);
}

.library-list-card-head {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

.library-list-card-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(94,202,197,0.85), rgba(20,107,109,0.85));
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-family: "Poppins", sans-serif;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.library-list-card-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.library-list-card-name {
  font-size: 15px;
  font-weight: 700;
  font-family: "Poppins", sans-serif;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: #eaf6f5;
  /* Allow names to wrap fully — never truncate */
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.library-list-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-size: 12px;
  color: rgba(234, 246, 245, 0.65);
}
.library-list-card-role {
  color: rgba(234, 246, 245, 0.78);
  font-weight: 500;
}
.library-list-card-company {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: rgba(94, 202, 197, 0.95);
  font-weight: 500;
}
.library-list-card-date {
  color: rgba(234, 246, 245, 0.45);
  font-variant-numeric: tabular-nums;
}

.library-list-card-current {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(94, 202, 197, 0.18);
  border: 1px solid rgba(94, 202, 197, 0.45);
  color: #c8f0ed;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.library-list-card-chevron {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(234, 246, 245, 0.5);
  transition: color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.library-list-card:hover .library-list-card-chevron {
  color: rgba(94, 202, 197, 0.95);
  background: rgba(94, 202, 197, 0.10);
}

/* Expanded detail panel */
.library-list-card-detail {
  padding: 0 16px 16px 72px; /* indent under the avatar column */
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: library-list-detail-in 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes library-list-detail-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.library-list-card-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.library-list-card-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.library-list-card-stat-num {
  font-size: 18px;
  font-weight: 800;
  color: #5ecac5;
  font-family: "Poppins", sans-serif;
  line-height: 1;
}
.library-list-card-stat-template {
  font-size: 13px;
  text-transform: capitalize;
  color: #eaf6f5;
}
.library-list-card-stat-label {
  font-size: 10px;
  color: rgba(234, 246, 245, 0.55);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.library-list-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.library-list-card-delete,
.library-list-card-edit,
.library-list-card-duplicate,
.library-list-card-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s ease, background 0.18s ease;
}
.library-list-card-delete {
  background: transparent;
  border: 1px solid rgba(229, 70, 80, 0.45);
  color: rgba(255, 169, 173, 0.95);
  margin-right: auto;
}
.library-list-card-delete:hover {
  background: rgba(229, 70, 80, 0.16);
}
/* Edit + Duplicate share the secondary "ghost" treatment so the
   primary "Open" action stays visually dominant. */
.library-list-card-edit,
.library-list-card-duplicate {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(234, 246, 245, 0.90);
}
.library-list-card-edit:hover,
.library-list-card-duplicate:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(94, 202, 197, 0.45);
  color: #eaf6f5;
}
.library-list-card-edit:active,
.library-list-card-duplicate:active {
  transform: scale(0.97);
}
.library-list-card-open {
  background: linear-gradient(135deg, #5ecac5, #146b6d);
  border: 1px solid rgba(94, 202, 197, 0.55);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(94, 202, 197, 0.30);
}
.library-list-card-open:hover { transform: translateY(-1px); }
.library-list-card-open:active { transform: scale(0.97); }

/* Stack-view secondary action row (Edit + Duplicate under the primary
   New/Open buttons). Sits below .library-stack-actions. */
.library-stack-secondary {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
}
.library-stack-secondary-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(234, 246, 245, 0.85);
  font-size: 12px;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s ease, background 0.18s ease, border-color 0.18s ease;
}
.library-stack-secondary-btn:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(94, 202, 197, 0.45);
  color: #eaf6f5;
}
.library-stack-secondary-btn:active {
  transform: scale(0.97);
}

/* Tighter on phones */
@media (max-width: 540px) {
  .library-list-card-detail { padding-left: 16px; }
  .library-list-card-stats {
    grid-template-columns: repeat(3, 1fr);
  }
  .library-list-card-actions {
    flex-direction: column-reverse;
  }
  .library-list-card-delete,
  .library-list-card-edit,
  .library-list-card-duplicate,
  .library-list-card-open {
    width: 100%;
    justify-content: center;
  }
}

@keyframes ios-sheet-up {
  from {
    transform: translateY(100%);
    opacity: 0.5;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.native-library-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.native-library-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  font-family: "Poppins", sans-serif;
}

.native-library-done {
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 700;
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  padding: 4px 2px;
  border-radius: 6px;
  -webkit-tap-highlight-color: transparent;
  line-height: 1;
}

.native-library-list {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 10px 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.native-library-new-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border: 1.5px dashed color-mix(in srgb, var(--accent) 48%, transparent);
  background: var(--accent-soft);
  border-radius: 12px;
  cursor: pointer;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.14s ease;
  text-align: left;
}

.native-library-new-btn:active {
  opacity: 0.65;
}

.native-library-new-icon {
  font-size: 1.3rem;
  line-height: 1;
  font-weight: 400;
}

.native-library-empty {
  text-align: center;
  color: var(--muted);
  font-size: 0.87rem;
  padding: 28px 16px;
  margin: 0;
  line-height: 1.5;
}

.native-library-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  background: var(--card-subtle-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.14s ease;
}

.native-library-item:active {
  opacity: 0.65;
}

.native-library-item.active {
  background: color-mix(in srgb, var(--accent-soft) 55%, var(--card-subtle-bg));
  border-color: color-mix(in srgb, var(--accent) 38%, var(--card-border));
}

.native-library-item-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 52%, #8b5cf6));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-contrast);
  font-size: 0.78rem;
  font-weight: 700;
  font-family: "Poppins", sans-serif;
  flex-shrink: 0;
}

.native-library-item-info {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.native-library-item-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  font-family: "Poppins", sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.native-library-item-role {
  font-size: 0.76rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.native-library-item-company {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.native-library-item-date {
  font-size: 0.68rem;
  color: color-mix(in srgb, var(--muted) 70%, transparent 30%);
  white-space: nowrap;
}

.native-library-item-check {
  color: var(--accent);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   Recruiter Mode — Post Jobs Dashboard
   ═══════════════════════════════════════════════════════════════ */

.hire-dashboard-hero {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, var(--card-bg) 90%), var(--card-bg));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line) 70%);
  padding: 20px !important;
  margin-bottom: 16px;
}
.hire-dashboard-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.hire-dashboard-title {
  margin: 0 0 4px 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.hire-dashboard-sub {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.hire-post-btn {
  flex-shrink: 0;
}
.hire-dashboard-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.hire-stat-card {
  background: var(--card-subtle-bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}
.hire-stat-card .insight-label {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 4px 0;
}
.hire-stat-card .insight-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}

.hire-empty-card {
  text-align: center;
  padding: 40px 24px !important;
  color: var(--muted);
}
.hire-empty-card h3 {
  margin: 16px 0 8px 0;
  color: var(--text);
  font-size: 1.2rem;
}
.hire-empty-card p {
  margin: 0 0 20px 0;
  font-size: 0.92rem;
  line-height: 1.5;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}
.hire-empty-state {
  text-align: center;
  color: var(--muted);
  padding: 32px 16px;
  font-size: 0.92rem;
}

.hire-jobs-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hire-job-card {
  padding: 16px 18px !important;
  transition: border-color 0.16s ease, transform 0.12s ease;
}
.hire-job-card:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line) 65%);
}
.hire-job-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
.hire-job-title {
  margin: 0 0 2px 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.hire-job-company {
  margin: 0;
  font-size: 0.88rem;
  color: var(--accent);
  font-weight: 500;
}
.hire-job-status {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 9px;
  border-radius: 99px;
}
.hire-job-status-published {
  background: rgba(62, 207, 142, 0.14);
  color: #3ecf8e;
}
.hire-job-status-draft {
  background: rgba(148, 163, 184, 0.14);
  color: var(--muted);
}
.hire-job-status-closed {
  background: rgba(248, 113, 113, 0.14);
  color: #f87171;
}
.hire-job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 10px;
  font-size: 0.82rem;
  color: var(--muted);
}
.hire-job-excerpt {
  margin: 0 0 12px 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: color-mix(in srgb, var(--text) 85%, var(--muted) 15%);
}
.hire-job-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.hire-job-date {
  font-size: 0.74rem;
  color: var(--muted);
}
.hire-job-actions {
  display: flex;
  gap: 6px;
}

/* Post Job Modal */
.hire-job-modal {
  max-width: 640px !important;
  width: calc(100vw - 32px);
  max-height: 88vh;
  overflow-y: auto;
}
.hire-modal-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.hire-modal-row .save-modal-label:last-child.hire-modal-currency {
  max-width: 110px;
}
.hire-modal-row:has(.hire-modal-currency) {
  grid-template-columns: 1fr 1fr 110px;
}
.hire-modal-textarea {
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}

/* Job result title row with badge */
.job-result-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 4px 0;
}
.job-result-title-row .job-result-title {
  margin: 0;
  flex: 1;
  min-width: 0;
}

/* "Posted on Refynes" badge for candidate job board */
.job-card-refynes-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 99px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 20%, transparent), color-mix(in srgb, var(--accent-strong, var(--accent)) 24%, transparent));
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
}

@media (max-width: 640px) {
  .hire-dashboard-stats {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .hire-modal-row {
    grid-template-columns: 1fr;
  }
  .hire-modal-row:has(.hire-modal-currency) {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════
   RECRUITER MARKETING SITE & DASHBOARD
   ═══════════════════════════════════════════════════════════════ */

.recruiter-landing-shell {
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(94, 202, 197, 0.12), transparent 50%),
    radial-gradient(ellipse at 80% 30%, rgba(124, 58, 237, 0.08), transparent 50%),
    linear-gradient(180deg, #0a1a1f 0%, #0d2328 100%);
  color: #e8f4f2;
  font-family: "Poppins", sans-serif;
  display: flex;
  flex-direction: column;
}
:root[data-theme="light"] .recruiter-landing-shell {
  background:
    radial-gradient(ellipse at 20% 0%, rgba(94, 202, 197, 0.18), transparent 50%),
    radial-gradient(ellipse at 80% 30%, rgba(124, 58, 237, 0.10), transparent 50%),
    linear-gradient(180deg, #f4f9f8 0%, #e8f4f1 100%);
  color: #0d2a32;
}

.recruiter-landing-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  background: rgba(10, 26, 31, 0.65);
  border-bottom: 1px solid rgba(94, 202, 197, 0.18);
}
:root[data-theme="light"] .recruiter-landing-header {
  background: rgba(244, 249, 248, 0.82);
  border-bottom-color: rgba(20, 107, 109, 0.14);
}
.recruiter-landing-brand .app-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}
.recruiter-landing-brand .brand-title {
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.recruiter-landing-badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 99px;
  background: linear-gradient(135deg, #5ecac5, #7c3aed);
  color: #fff;
  border: 0;
}
.recruiter-landing-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.recruiter-landing-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 80px;
  padding: 60px 32px 80px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.recruiter-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}
.recruiter-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.recruiter-hero-eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 99px;
  background: rgba(94, 202, 197, 0.14);
  color: #5ecac5;
  width: fit-content;
  margin: 0;
  border: 1px solid rgba(94, 202, 197, 0.3);
}
.recruiter-hero-title {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;  /* Real Poppins-Bold; 900 was browser-synthesized */
  letter-spacing: -0.03em;
  line-height: 1.1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.recruiter-hero-gradient {
  background: linear-gradient(135deg, #5ecac5, #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.recruiter-hero-sub {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.6;
  color: rgba(232, 244, 242, 0.75);
  max-width: 520px;
}
:root[data-theme="light"] .recruiter-hero-sub {
  color: rgba(13, 42, 50, 0.72);
}
.recruiter-hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.recruiter-hero-btn {
  font-size: 1rem !important;
  padding: 14px 26px !important;
  border-radius: 12px !important;
}
.recruiter-hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.88rem;
  color: rgba(232, 244, 242, 0.6);
  margin-top: 20px;
}
:root[data-theme="light"] .recruiter-hero-trust {
  color: rgba(13, 42, 50, 0.6);
}

.recruiter-hero-visual {
  position: relative;
  min-height: 420px;
}
.recruiter-hero-card {
  position: absolute;
  background: rgba(19, 44, 50, 0.92);
  border: 1px solid rgba(94, 202, 197, 0.25);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
  width: 280px;
  transition: transform 0.3s ease;
}
:root[data-theme="light"] .recruiter-hero-card {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(20, 107, 109, 0.16);
  box-shadow: 0 20px 40px rgba(13, 42, 50, 0.12);
}
.recruiter-hero-card-1 {
  top: 0;
  right: 0;
  transform: rotate(2deg);
  z-index: 3;
}
.recruiter-hero-card-2 {
  top: 120px;
  left: 20px;
  transform: rotate(-3deg);
  z-index: 2;
  opacity: 0.85;
}
.recruiter-hero-card-3 {
  top: 280px;
  right: 40px;
  transform: rotate(1deg);
  z-index: 1;
  opacity: 0.7;
}
.recruiter-hero-card-head {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}
.recruiter-hero-card-avatar {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, #5ecac5, #7c3aed);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.88rem;
  flex-shrink: 0;
}
.recruiter-hero-card-head strong {
  display: block;
  font-size: 0.95rem;
}
.recruiter-hero-card-head p {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: rgba(232, 244, 242, 0.55);
}
:root[data-theme="light"] .recruiter-hero-card-head p {
  color: rgba(13, 42, 50, 0.55);
}
.recruiter-hero-card-meta {
  margin: 0 0 12px;
  font-size: 0.82rem;
  color: rgba(232, 244, 242, 0.7);
}
:root[data-theme="light"] .recruiter-hero-card-meta {
  color: rgba(13, 42, 50, 0.7);
}
.recruiter-hero-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(94, 202, 197, 0.2);
}
.recruiter-hero-card-stats strong {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: #5ecac5;
}
.recruiter-hero-card-stats span {
  font-size: 0.74rem;
  color: rgba(232, 244, 242, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
:root[data-theme="light"] .recruiter-hero-card-stats span {
  color: rgba(13, 42, 50, 0.55);
}

.recruiter-section-title {
  margin: 0 0 40px 0;
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
}
.recruiter-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.recruiter-feature-card {
  padding: 24px;
  border-radius: 16px;
  background: rgba(19, 44, 50, 0.65);
  border: 1px solid rgba(94, 202, 197, 0.15);
  transition: border-color 0.18s ease, transform 0.12s ease;
}
:root[data-theme="light"] .recruiter-feature-card {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(20, 107, 109, 0.12);
}
.recruiter-feature-card:hover {
  border-color: rgba(94, 202, 197, 0.4);
  transform: translateY(-2px);
}
.recruiter-feature-card h3 {
  margin: 12px 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
}
.recruiter-feature-card p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(232, 244, 242, 0.7);
}
:root[data-theme="light"] .recruiter-feature-card p {
  color: rgba(13, 42, 50, 0.7);
}
.recruiter-feature-icon {
  font-size: 2rem;
}
.recruiter-feature-card-soon {
  opacity: 0.65;
  position: relative;
}
.recruiter-feature-card-soon::after {
  content: "Coming Soon";
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 99px;
  background: rgba(124, 58, 237, 0.18);
  color: #a78bfa;
}

.recruiter-cta-band {
  text-align: center;
  padding: 60px 32px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(94, 202, 197, 0.14), rgba(124, 58, 237, 0.12));
  border: 1px solid rgba(94, 202, 197, 0.25);
}
.recruiter-cta-band h2 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.recruiter-cta-band p {
  margin: 0 0 24px;
  color: rgba(232, 244, 242, 0.7);
}
:root[data-theme="light"] .recruiter-cta-band p {
  color: rgba(13, 42, 50, 0.7);
}

.recruiter-landing-footer {
  padding: 24px 32px;
  text-align: center;
  border-top: 1px solid rgba(94, 202, 197, 0.15);
  font-size: 0.86rem;
  color: rgba(232, 244, 242, 0.5);
}
:root[data-theme="light"] .recruiter-landing-footer {
  border-top-color: rgba(20, 107, 109, 0.14);
  color: rgba(13, 42, 50, 0.55);
}
.link-button {
  background: transparent;
  border: 0;
  color: #5ecac5;
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-button:hover { color: #7cd8d2; }

/* ── Recruiter Auth (signin/signup) ─────────────────── */
.recruiter-auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.recruiter-auth-card {
  max-width: 440px;
  width: 100%;
  padding: 40px 32px;
  border-radius: 20px;
  background: rgba(19, 44, 50, 0.75);
  border: 1px solid rgba(94, 202, 197, 0.2);
  backdrop-filter: blur(18px);
}
:root[data-theme="light"] .recruiter-auth-card {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(20, 107, 109, 0.12);
  box-shadow: 0 24px 56px rgba(13, 42, 50, 0.1);
}
.recruiter-auth-title {
  margin: 0 0 8px;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.recruiter-auth-sub {
  margin: 0 0 24px;
  font-size: 0.95rem;
  color: rgba(232, 244, 242, 0.7);
}
:root[data-theme="light"] .recruiter-auth-sub {
  color: rgba(13, 42, 50, 0.65);
}
.recruiter-auth-providers {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.recruiter-auth-submit {
  margin-top: 4px;
}
.recruiter-auth-switch {
  margin: 20px 0 0;
  text-align: center;
  font-size: 0.88rem;
  color: rgba(232, 244, 242, 0.6);
}
:root[data-theme="light"] .recruiter-auth-switch {
  color: rgba(13, 42, 50, 0.6);
}

/* ── Recruiter Dashboard ─────────────────── */
.recruiter-dashboard-shell {
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(94, 202, 197, 0.08), transparent 40%),
    linear-gradient(180deg, #0a1a1f 0%, #0b1e23 100%);
  color: #e8f4f2;
  display: flex;
  flex-direction: column;
}
:root[data-theme="light"] .recruiter-dashboard-shell {
  background:
    radial-gradient(ellipse at 0% 0%, rgba(94, 202, 197, 0.12), transparent 40%),
    linear-gradient(180deg, #f4f9f8 0%, #eaf3f1 100%);
  color: #0d2a32;
}

.recruiter-dashboard-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: rgba(10, 26, 31, 0.75);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(94, 202, 197, 0.18);
  position: sticky;
  top: 0;
  z-index: 30;
}
:root[data-theme="light"] .recruiter-dashboard-topbar {
  background: rgba(244, 249, 248, 0.88);
  border-bottom-color: rgba(20, 107, 109, 0.14);
}
.recruiter-dashboard-topbar .app-logo {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}
.recruiter-dashboard-topbar .brand-title {
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.recruiter-dashboard-topbar-right {
  display: flex;
  gap: 8px;
}

.recruiter-dashboard-main {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 24px;
  flex: 1;
}
.recruiter-dashboard-sidebar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 14px;
  border-radius: 16px;
  background: rgba(19, 44, 50, 0.55);
  border: 1px solid rgba(94, 202, 197, 0.14);
  height: fit-content;
  position: sticky;
  top: 80px;
}
:root[data-theme="light"] .recruiter-dashboard-sidebar {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(20, 107, 109, 0.12);
}
.recruiter-dashboard-sidebar-label {
  margin: 12px 0 6px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(232, 244, 242, 0.45);
}
:root[data-theme="light"] .recruiter-dashboard-sidebar-label {
  color: rgba(13, 42, 50, 0.45);
}
.recruiter-dashboard-sidebar-label:first-child {
  margin-top: 0;
}
.recruiter-dashboard-nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.14s ease;
  text-align: left;
}
.recruiter-dashboard-nav-btn:hover:not(.disabled) {
  background: rgba(94, 202, 197, 0.1);
}
.recruiter-dashboard-nav-btn.active {
  background: rgba(94, 202, 197, 0.18);
  color: #5ecac5;
  font-weight: 600;
}
.recruiter-dashboard-nav-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.recruiter-dashboard-sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(94, 202, 197, 0.12);
}
.recruiter-dashboard-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
  width: 100%;
  color: inherit;
  text-align: left;
}
.recruiter-dashboard-profile:hover {
  background: rgba(94, 202, 197, 0.08);
}
.recruiter-dashboard-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.88rem;
  color: #fff;
  flex-shrink: 0;
  object-fit: cover;
}
.recruiter-dashboard-profile-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.recruiter-dashboard-profile-text strong {
  font-size: 0.88rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recruiter-dashboard-profile-text span {
  font-size: 0.72rem;
  color: rgba(232, 244, 242, 0.55);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
:root[data-theme="light"] .recruiter-dashboard-profile-text span {
  color: rgba(13, 42, 50, 0.55);
}

.recruiter-dashboard-content {
  min-width: 0;
  padding: 0;
}

@media (max-width: 980px) {
  .recruiter-hero {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .recruiter-hero-visual {
    min-height: 340px;
  }
  .recruiter-features-grid {
    grid-template-columns: 1fr 1fr;
  }
  .recruiter-landing-main {
    padding: 40px 20px 60px;
    gap: 60px;
  }
  .recruiter-dashboard-main {
    grid-template-columns: 1fr;
    padding: 16px;
  }
  .recruiter-dashboard-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    overflow-x: auto;
  }
  .recruiter-dashboard-sidebar-label,
  .recruiter-dashboard-sidebar-footer {
    display: none;
  }
  .recruiter-dashboard-nav-btn {
    flex-shrink: 0;
    padding: 8px 12px;
    font-size: 0.85rem;
  }
  .recruiter-dashboard-nav-btn.disabled { display: none; }
}
@media (max-width: 640px) {
  .recruiter-landing-header {
    padding: 14px 18px;
  }
  .recruiter-landing-nav {
    gap: 6px;
  }
  .recruiter-landing-nav .button {
    font-size: 0.84rem;
    padding: 8px 12px;
  }
  .recruiter-features-grid {
    grid-template-columns: 1fr;
  }
  .recruiter-dashboard-topbar-right .button span:not(.button-content) {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════════════
   MODAL / POPUP CONTRAST — universal upgrade for all overlays
   Applies to: Post Job, Edit Card, Save Resume, Integrations,
   Onboarding, Profile Hub, Paywall, Auth Choice, AI Review, etc.
   ═══════════════════════════════════════════════════════════════ */

/* Darken backdrop + strong blur across every modal overlay in the app */
.save-modal-backdrop,
.intg-backdrop,
.onboarding-backdrop,
.paywall-backdrop,
.auth-choice-backdrop,
.ai-review-backdrop,
.profile-hub-backdrop,
.mobile-preview-backdrop,
.job-refyne-sheet-backdrop,
.pdf-editor-backdrop,
.marketing-mobile-menu-backdrop {
  background: rgba(4, 10, 14, 0.72) !important;
  backdrop-filter: blur(14px) saturate(1.4) !important;
  -webkit-backdrop-filter: blur(14px) saturate(1.4) !important;
}

:root[data-theme="light"] .save-modal-backdrop,
:root[data-theme="light"] .intg-backdrop,
:root[data-theme="light"] .onboarding-backdrop,
:root[data-theme="light"] .paywall-backdrop,
:root[data-theme="light"] .auth-choice-backdrop,
:root[data-theme="light"] .ai-review-backdrop,
:root[data-theme="light"] .profile-hub-backdrop,
:root[data-theme="light"] .mobile-preview-backdrop,
:root[data-theme="light"] .job-refyne-sheet-backdrop,
:root[data-theme="light"] .pdf-editor-backdrop,
:root[data-theme="light"] .marketing-mobile-menu-backdrop {
  background: rgba(15, 30, 36, 0.55) !important;
  backdrop-filter: blur(14px) saturate(1.3) !important;
  -webkit-backdrop-filter: blur(14px) saturate(1.3) !important;
}

/* Modal cards: solid background, crisp border, pronounced shadow */
.save-modal,
.intg-modal,
.onboarding-panel,
.paywall-panel,
.paywall-modal,
.auth-choice-panel,
.auth-choice-modal,
.ai-review-panel,
.ai-review-modal,
.profile-hub-panel {
  background: linear-gradient(160deg,
    color-mix(in srgb, var(--card-bg) 98%, #000 2%),
    color-mix(in srgb, var(--card-bg) 94%, #000 6%)) !important;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line) 78%) !important;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.5),
    0 10px 24px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 color-mix(in srgb, var(--accent) 12%, transparent) !important;
  backdrop-filter: blur(22px) saturate(1.25) !important;
  -webkit-backdrop-filter: blur(22px) saturate(1.25) !important;
}

:root[data-theme="light"] .save-modal,
:root[data-theme="light"] .intg-modal,
:root[data-theme="light"] .onboarding-panel,
:root[data-theme="light"] .paywall-panel,
:root[data-theme="light"] .paywall-modal,
:root[data-theme="light"] .auth-choice-panel,
:root[data-theme="light"] .auth-choice-modal,
:root[data-theme="light"] .ai-review-panel,
:root[data-theme="light"] .ai-review-modal,
:root[data-theme="light"] .profile-hub-panel {
  background: linear-gradient(160deg, #ffffff, #f6fafa) !important;
  border-color: color-mix(in srgb, var(--accent) 18%, rgba(13, 42, 50, 0.12) 82%) !important;
  box-shadow:
    0 30px 80px rgba(13, 42, 50, 0.22),
    0 10px 24px rgba(13, 42, 50, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

/* Form inputs inside modals — subtle depth so they stand out against the card */
.save-modal-input,
.intg-modal input,
.intg-modal textarea,
.intg-modal select,
.onboarding-input {
  background: color-mix(in srgb, var(--card-subtle-bg) 88%, #000 12%) !important;
  border: 1px solid color-mix(in srgb, var(--line) 70%, var(--accent) 10%) !important;
  color: var(--text) !important;
}
:root[data-theme="light"] .save-modal-input,
:root[data-theme="light"] .intg-modal input,
:root[data-theme="light"] .intg-modal textarea,
:root[data-theme="light"] .intg-modal select,
:root[data-theme="light"] .onboarding-input {
  background: #ffffff !important;
  border-color: rgba(13, 42, 50, 0.14) !important;
}
.save-modal-input:focus,
.intg-modal input:focus,
.intg-modal textarea:focus,
.intg-modal select:focus,
.onboarding-input:focus {
  outline: none;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent) !important;
}

/* ═══════════════════════════════════════════════════════════════
   ORG CHART — Welcome Screen + Tree Visualization
   ═══════════════════════════════════════════════════════════════ */

.org-welcome-card {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 36px !important;
}
.org-welcome-header {
  text-align: center;
  margin-bottom: 32px;
}
.org-welcome-emoji {
  font-size: 3.5rem;
  margin-bottom: 12px;
  line-height: 1;
}
.org-welcome-title {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.org-welcome-sub {
  margin: 0 auto;
  max-width: 520px;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--muted);
}
.org-welcome-field {
  margin-bottom: 20px;
}
.org-welcome-field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}
.org-industry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.org-industry-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--card-subtle-bg);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.1s ease;
}
.org-industry-card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line) 55%);
  background: color-mix(in srgb, var(--accent-soft) 60%, var(--card-subtle-bg) 40%);
}
.org-industry-card.selected {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, var(--card-bg) 84%);
  transform: scale(1.02);
}
.org-industry-emoji {
  font-size: 1.6rem;
}
.org-industry-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  line-height: 1.25;
}
.org-welcome-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 28px;
}
.org-welcome-generate {
  width: 100%;
  white-space: nowrap;
}
@media (max-width: 560px) {
  .org-welcome-actions {
    grid-template-columns: 1fr;
  }
}
.org-welcome-note {
  margin: 20px 0 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
}

/* Org chart header */
.org-chart-header-card {
  padding: 20px 24px !important;
  margin-bottom: 20px;
}
.org-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}
.org-chart-title {
  margin: 0 0 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.org-chart-company {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}
.org-chart-industry {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.org-chart-sub {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.org-chart-header-actions {
  display: flex;
  gap: 8px;
}

/* Tree visualization */
.org-chart-tree {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding: 24px 12px 32px;
  overflow-x: auto;
  position: relative;
}
.org-chart-level {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  position: relative;
  padding-top: 32px;
}
.org-chart-level:first-child {
  padding-top: 0;
}
.org-chart-level:not(:first-child)::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 32px;
  background: color-mix(in srgb, var(--accent) 45%, transparent);
  transform: translateX(-50%);
}
.org-chart-node {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
  max-width: 220px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: var(--card-bg);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: border-color 0.16s ease, transform 0.1s ease, box-shadow 0.16s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  position: relative;
}
.org-chart-node:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.12);
  border-color: var(--accent);
}
.org-chart-node-empty {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line) 50%);
}
.org-chart-node-hiring {
  border-color: #3ecf8e;
  background: color-mix(in srgb, #3ecf8e 10%, var(--card-bg) 90%);
}
.org-chart-node-filled {
  opacity: 0.7;
}
.org-chart-node-department {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.org-chart-node-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}
.org-chart-node-seats {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}
.org-chart-node-status {
  margin-top: 4px;
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 99px;
}
.org-chart-node-status-empty {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
}
.org-chart-node-status-hiring {
  background: rgba(62, 207, 142, 0.18);
  color: #3ecf8e;
}
.org-chart-node-status-filled {
  background: rgba(148, 163, 184, 0.18);
  color: var(--muted);
}

.org-chart-jobs-section {
  margin-top: 20px;
  padding: 20px 24px !important;
}
.org-chart-section-title {
  margin: 0 0 14px;
  font-size: 1.1rem;
  font-weight: 700;
}

.recruiter-dashboard-nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: var(--button-text);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
}

@media (max-width: 720px) {
  .org-industry-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .org-chart-tree {
    gap: 32px;
  }
  .org-chart-node {
    min-width: 150px;
    padding: 10px 12px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   Support Center FAQ — premium accordion with categories
   ═══════════════════════════════════════════════════════════════ */

.support-faq-categories {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 760px;
  margin: 32px auto 0;
}

.support-faq-category {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.support-faq-category-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px 6px;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line) 80%);
}

.support-faq-category-head h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.support-faq-category-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent) 20%, transparent),
    color-mix(in srgb, var(--accent) 30%, transparent));
  color: var(--accent);
  flex-shrink: 0;
}

.support-faq-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.support-faq-item {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.support-faq-item:hover {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line) 70%);
  background: color-mix(in srgb, var(--card-bg) 88%, var(--accent-soft) 12%);
}

.support-faq-item[open] {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--card-bg) 92%, var(--accent-soft) 8%);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 10%, transparent);
}

.support-faq-item summary {
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-family: inherit;
  transition: color 0.15s ease;
}

.support-faq-item summary::-webkit-details-marker { display: none; }
.support-faq-item summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.support-faq-q {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  letter-spacing: -0.005em;
}

.support-faq-item[open] .support-faq-q {
  color: var(--accent);
}

.support-faq-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent-soft) 60%, transparent);
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.25, 1), background 0.18s ease, color 0.18s ease;
}

.support-faq-item:hover .support-faq-chevron {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.support-faq-item[open] .support-faq-chevron {
  transform: rotate(180deg);
  background: var(--accent);
  color: var(--button-text);
}

.support-faq-a {
  padding: 0 18px 18px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: color-mix(in srgb, var(--text) 80%, var(--muted) 20%);
  animation: supportFaqReveal 0.28s cubic-bezier(0.2, 0.8, 0.25, 1);
}

@keyframes supportFaqReveal {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.support-faq-footer {
  margin: 44px auto 0;
  text-align: center;
  max-width: 520px;
}

.support-faq-footer p {
  margin: 0 0 14px;
  font-size: 0.95rem;
  color: var(--muted);
}

@media (max-width: 640px) {
  .support-faq-categories {
    gap: 24px;
  }
  .support-faq-item summary {
    padding: 14px 14px;
  }
  .support-faq-q {
    font-size: 0.9rem;
  }
  .support-faq-a {
    padding: 0 14px 14px;
    font-size: 0.86rem;
  }
}

/* ═══════════════════════════════════════════════════════════════
   ORG TREE — proper hierarchical chart with connecting lines + scroll
   Uses classic nested <ul>/<li> pattern with CSS-drawn tree lines.
   ═══════════════════════════════════════════════════════════════ */

.org-tree-scroller {
  overflow-x: auto;
  overflow-y: visible;
  padding: 20px 24px 32px;
  margin: 0 -12px;
  -webkit-overflow-scrolling: touch;
}

.org-tree-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 20px;
  padding: 8px 12px;
  background: color-mix(in srgb, var(--accent-soft) 60%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line) 82%);
  border-radius: 10px;
  width: fit-content;
}
.org-tree-hint strong {
  color: var(--accent);
  font-weight: 700;
}

/* Top-level tree list — centered horizontally, children expand outward */
.org-tree,
.org-tree-children {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  justify-content: center;
  align-items: flex-start;
  position: relative;
}
.org-tree {
  min-width: max-content; /* grow to fit all nodes horizontally */
}

/* Each node — padding gives room for connecting lines between siblings */
.org-tree-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 14px;
  position: relative;
}

/* Vertical line connecting a child UL to its parent card */
.org-tree-children {
  padding-top: 36px;
  position: relative;
}
.org-tree-children::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 18px;
  background: color-mix(in srgb, var(--accent) 35%, var(--line) 65%);
  transform: translateX(-50%);
}

/* Horizontal line spanning across siblings (connects them to parent) */
.org-tree-children > .org-tree-node::before {
  content: "";
  position: absolute;
  top: -18px;
  left: 0;
  right: 0;
  height: 2px;
  background: color-mix(in srgb, var(--accent) 35%, var(--line) 65%);
}
/* Hide overhanging edges so horizontal bar spans only between siblings */
.org-tree-children > .org-tree-node:first-child::before {
  left: 50%;
}
.org-tree-children > .org-tree-node:last-child::before {
  right: 50%;
}
/* Single-child edge case: only show the vertical drop, no horizontal bar */
.org-tree-children > .org-tree-node:only-child::before {
  left: 50%;
  right: 50%;
}

/* Vertical connector from horizontal bar DOWN to each sibling card */
.org-tree-children > .org-tree-node::after {
  content: "";
  position: absolute;
  top: -18px;
  left: 50%;
  width: 2px;
  height: 18px;
  background: color-mix(in srgb, var(--accent) 35%, var(--line) 65%);
  transform: translateX(-50%);
}
/* Hide the vertical for only-child (the ::before already handles it) */
.org-tree-children > .org-tree-node:only-child::after {
  display: none;
}

/* ── Card styling ── */
.org-tree-card {
  position: relative;
  min-width: 190px;
  max-width: 240px;
  background: var(--card-bg);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.14s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.org-tree-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
}
.org-tree-card-empty {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line) 55%);
}
.org-tree-card-hiring {
  border-color: #3ecf8e;
  background: color-mix(in srgb, #3ecf8e 8%, var(--card-bg) 92%);
}
.org-tree-card-filled { opacity: 0.72; }

.org-tree-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.org-tree-department {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.org-tree-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.org-tree-seats {
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 500;
}
.org-tree-status {
  align-self: flex-start;
  margin-top: 2px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 99px;
}
.org-tree-status-empty {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
}
.org-tree-status-hiring {
  background: rgba(62, 207, 142, 0.18);
  color: #3ecf8e;
}
.org-tree-status-filled {
  background: rgba(148, 163, 184, 0.18);
  color: var(--muted);
}

/* Hover-revealed add/delete buttons */
.org-tree-card-actions {
  position: absolute;
  top: -10px;
  right: 6px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.14s ease, transform 0.14s ease;
  pointer-events: none;
  z-index: 3;
}
.org-tree-card:hover .org-tree-card-actions,
.org-tree-card:focus-within .org-tree-card-actions {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.org-tree-icon-btn {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--card-bg);
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}
.org-tree-icon-btn:hover {
  background: var(--accent);
  color: var(--button-text);
  border-color: var(--accent);
}
.org-tree-icon-btn-danger:hover {
  background: #f87171;
  border-color: #f87171;
}

/* Add-top-level button */
.org-tree-add-root {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

/* Always-visible action buttons on touch devices (no hover) */
@media (hover: none) {
  .org-tree-card-actions {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
}

/* Mobile — tighter cards, still scrollable */
@media (max-width: 760px) {
  .org-tree-scroller {
    padding: 16px 12px 24px;
  }
  .org-tree-card {
    min-width: 160px;
    max-width: 200px;
  }
  .org-tree-card-body {
    padding: 12px 14px;
  }
  .org-tree-title {
    font-size: 0.88rem;
  }
}

/* ═══════════════════════════════════════════════════════════════
   NATIVE CHAT HOME — ChatGPT/Claude-style mobile experience
   Takes over on iOS Capacitor when user is authed on /app
   ═══════════════════════════════════════════════════════════════ */

.native-chat-shell {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(94, 202, 197, 0.06), transparent 50%),
    linear-gradient(180deg, #0a1a1f 0%, #0d2328 100%);
  color: #e8f4f2;
  font-family: "Poppins", sans-serif;
  overflow: hidden;
}
:root[data-theme="light"] .native-chat-shell {
  background:
    radial-gradient(ellipse at 20% 0%, rgba(94, 202, 197, 0.10), transparent 50%),
    linear-gradient(180deg, #f8fafa 0%, #eef5f3 100%);
  color: #0d2a32;
}

/* ── Top bar ── */
.native-chat-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(var(--safe-top) + 8px) 12px 10px 12px;
  background: rgba(10, 26, 31, 0.85);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid rgba(94, 202, 197, 0.14);
  position: relative;
  z-index: 30;
  flex-shrink: 0;
}
:root[data-theme="light"] .native-chat-topbar {
  background: rgba(248, 250, 250, 0.88);
  border-bottom-color: rgba(20, 107, 109, 0.12);
}
.native-chat-topbar-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.14s ease;
}
.native-chat-topbar-btn:active {
  background: rgba(94, 202, 197, 0.14);
}

/* ── Model picker ── */
.native-chat-model-picker-wrap { position: relative; flex: 1; display: flex; justify-content: center; }
.native-chat-model-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(94, 202, 197, 0.3);
  background: rgba(94, 202, 197, 0.08);
  color: inherit;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease;
  max-width: 220px;
}
.native-chat-model-picker:active {
  background: rgba(94, 202, 197, 0.16);
}
.native-chat-model-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.native-chat-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
}
.native-chat-picker-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: min(90vw, 340px);
  background: #0d2328;
  border: 1px solid rgba(94, 202, 197, 0.28);
  border-radius: 14px;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  z-index: 50;
  animation: nativeChatFadeDown 0.18s ease;
}
:root[data-theme="light"] .native-chat-picker-menu {
  background: #ffffff;
  border-color: rgba(20, 107, 109, 0.14);
  box-shadow: 0 22px 48px rgba(13, 42, 50, 0.18);
}
@keyframes nativeChatFadeDown {
  from { opacity: 0; transform: translate(-50%, -4px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
.native-chat-picker-option {
  display: block;
  width: 100%;
  padding: 14px 16px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(94, 202, 197, 0.1);
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
  transition: background 0.14s ease;
}
.native-chat-picker-option:last-child { border-bottom: 0; }
.native-chat-picker-option:active {
  background: rgba(94, 202, 197, 0.1);
}
.native-chat-picker-option.selected {
  background: rgba(94, 202, 197, 0.08);
}
.native-chat-picker-opt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.native-chat-picker-opt-head strong {
  font-size: 0.95rem;
  font-weight: 700;
}
.native-chat-picker-option p {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(232, 244, 242, 0.55);
  line-height: 1.4;
}
:root[data-theme="light"] .native-chat-picker-option p {
  color: rgba(13, 42, 50, 0.55);
}
.native-chat-pro-pill {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 99px;
  margin-left: 6px;
  background: linear-gradient(135deg, #5ecac5, #7c3aed);
  color: #fff;
  vertical-align: 1px;
}
.native-chat-picker-check {
  color: #5ecac5;
  font-weight: 800;
  font-size: 1rem;
}

/* Preview button */
.native-chat-preview-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(94, 202, 197, 0.3);
  background: rgba(94, 202, 197, 0.1);
  color: #5ecac5;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease;
}
.native-chat-preview-btn:active {
  background: rgba(94, 202, 197, 0.2);
  transform: scale(0.96);
}
:root[data-theme="light"] .native-chat-preview-btn {
  color: #1a7a7a;
  background: rgba(20, 107, 109, 0.08);
  border-color: rgba(20, 107, 109, 0.2);
}

/* ── Messages area (scrollable middle) ── */
.native-chat-messages {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 20px 16px 20px;
}

.native-chat-empty {
  padding: 40px 16px 20px;
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}
.native-chat-empty-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(94, 202, 197, 0.18), rgba(124, 58, 237, 0.14));
  border: 1px solid rgba(94, 202, 197, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 22px;
}
.native-chat-empty-icon img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.native-chat-empty-title {
  margin: 0 0 10px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.native-chat-empty-sub {
  margin: 0 0 28px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(232, 244, 242, 0.65);
}
:root[data-theme="light"] .native-chat-empty-sub {
  color: rgba(13, 42, 50, 0.65);
}
.native-chat-suggestions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 420px;
  margin: 0 auto;
}
.native-chat-suggestion {
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid rgba(94, 202, 197, 0.2);
  background: rgba(19, 44, 50, 0.5);
  color: inherit;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.1s ease;
}
:root[data-theme="light"] .native-chat-suggestion {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(20, 107, 109, 0.14);
}
.native-chat-suggestion:active {
  transform: scale(0.98);
  background: rgba(94, 202, 197, 0.12);
  border-color: rgba(94, 202, 197, 0.4);
}

/* Message list & bubbles */
.native-chat-messages-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 720px;
  margin: 0 auto;
}
.native-chat-msg {
  display: flex;
}
.native-chat-msg-user {
  justify-content: flex-end;
}
.native-chat-msg-assistant {
  justify-content: flex-start;
}
.native-chat-msg-bubble {
  max-width: 92%;
  padding: 14px 16px;
  border-radius: 18px;
  line-height: 1.55;
  font-size: 0.92rem;
}
.native-chat-msg-user .native-chat-msg-bubble {
  background: linear-gradient(135deg, #5ecac5, #46b8b0);
  color: #0a1f24;
  border-bottom-right-radius: 6px;
  box-shadow: 0 4px 12px rgba(94, 202, 197, 0.22);
}
.native-chat-msg-assistant .native-chat-msg-bubble {
  background: rgba(19, 44, 50, 0.78);
  border: 1px solid rgba(94, 202, 197, 0.15);
  border-bottom-left-radius: 6px;
  backdrop-filter: blur(8px);
}
:root[data-theme="light"] .native-chat-msg-assistant .native-chat-msg-bubble {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(20, 107, 109, 0.12);
  box-shadow: 0 4px 14px rgba(13, 42, 50, 0.06);
}
.native-chat-msg-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(94, 202, 197, 0.14);
}
.native-chat-msg-avatar {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  object-fit: contain;
}
.native-chat-msg-who {
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(232, 244, 242, 0.7);
  letter-spacing: 0.01em;
}
:root[data-theme="light"] .native-chat-msg-who {
  color: rgba(13, 42, 50, 0.7);
}
.native-chat-msg-body {
  font-size: 0.92rem;
  line-height: 1.55;
}
.native-chat-msg-body p {
  margin: 0 0 8px;
}
.native-chat-msg-body p:last-child { margin-bottom: 0; }
.native-chat-msg-body strong {
  color: #5ecac5;
  font-weight: 700;
}
:root[data-theme="light"] .native-chat-msg-body strong {
  color: #1a7a7a;
}
.native-chat-msg-upgrade {
  margin-top: 10px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 0;
  background: linear-gradient(135deg, #5ecac5, #7c3aed);
  color: #fff;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}
.native-chat-msg-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.native-chat-msg-action {
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid rgba(94, 202, 197, 0.3);
  background: rgba(94, 202, 197, 0.08);
  color: #5ecac5;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

/* Typing indicator */
.native-chat-thinking {
  display: flex;
  gap: 4px;
  padding: 6px 0;
}
.native-chat-thinking span {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(94, 202, 197, 0.55);
  animation: nativeChatDotBounce 1.2s ease-in-out infinite;
}
.native-chat-thinking span:nth-child(2) { animation-delay: 0.15s; }
.native-chat-thinking span:nth-child(3) { animation-delay: 0.3s; }
@keyframes nativeChatDotBounce {
  0%, 60%, 100% { opacity: 0.35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}

/* ── Bottom composer ── */
.native-chat-composer {
  flex-shrink: 0;
  padding: 8px 12px calc(var(--safe-bottom) + 12px);
  background: rgba(10, 26, 31, 0.9);
  backdrop-filter: blur(18px) saturate(1.4);
  border-top: 1px solid rgba(94, 202, 197, 0.14);
}
:root[data-theme="light"] .native-chat-composer {
  background: rgba(248, 250, 250, 0.92);
  border-top-color: rgba(20, 107, 109, 0.12);
}
.native-chat-composer-inner {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: rgba(19, 44, 50, 0.7);
  border: 1px solid rgba(94, 202, 197, 0.25);
  border-radius: 22px;
  padding: 6px 6px 6px 14px;
  transition: border-color 0.14s ease;
}
.native-chat-composer-inner:focus-within {
  border-color: rgba(94, 202, 197, 0.55);
  box-shadow: 0 0 0 3px rgba(94, 202, 197, 0.12);
}
:root[data-theme="light"] .native-chat-composer-inner {
  background: #ffffff;
  border-color: rgba(20, 107, 109, 0.18);
}
.native-chat-input {
  flex: 1;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.4;
  resize: none;
  padding: 10px 0;
  outline: none;
  max-height: 140px;
  min-height: 20px;
  font-family: inherit;
}
.native-chat-input::placeholder {
  color: rgba(232, 244, 242, 0.4);
}
:root[data-theme="light"] .native-chat-input::placeholder {
  color: rgba(13, 42, 50, 0.4);
}
.native-chat-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: linear-gradient(135deg, #5ecac5, #46b8b0);
  color: #0a1f24;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.1s ease, opacity 0.16s ease;
}
.native-chat-send-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.native-chat-send-btn:not(:disabled):active {
  transform: scale(0.92);
}
.native-chat-hint {
  margin: 8px 4px 0;
  font-size: 0.74rem;
  color: rgba(232, 244, 242, 0.45);
  text-align: center;
}
:root[data-theme="light"] .native-chat-hint {
  color: rgba(13, 42, 50, 0.5);
}

/* ── Hamburger drawer ── */
.native-chat-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 10, 14, 0.62);
  backdrop-filter: blur(6px);
  z-index: 80;
  animation: nativeChatFadeIn 0.18s ease;
}
@keyframes nativeChatFadeIn { from { opacity: 0; } to { opacity: 1; } }
.native-chat-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(84vw, 340px);
  background: linear-gradient(180deg, #0d2328, #0a1a1f);
  border-right: 1px solid rgba(94, 202, 197, 0.18);
  padding: calc(var(--safe-top) + 16px) 14px calc(var(--safe-bottom) + 16px);
  z-index: 81;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 20px 0 60px rgba(0, 0, 0, 0.55);
  animation: nativeChatDrawerSlide 0.26s cubic-bezier(0.2, 0.9, 0.25, 1);
}
:root[data-theme="light"] .native-chat-drawer {
  background: linear-gradient(180deg, #ffffff, #f4f9f8);
  border-right-color: rgba(20, 107, 109, 0.14);
  box-shadow: 20px 0 48px rgba(13, 42, 50, 0.15);
}
@keyframes nativeChatDrawerSlide {
  from { transform: translateX(-100%); }
  to   { transform: translateX(0); }
}
.native-chat-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(94, 202, 197, 0.12);
}
.native-chat-drawer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.native-chat-drawer-brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
}
.native-chat-drawer-brand > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.native-chat-drawer-brand strong {
  font-size: 1rem;
  font-weight: 700;
  color: inherit;
  line-height: 1.2;
}
.native-chat-drawer-brand span {
  font-size: 0.76rem;
  color: rgba(232, 244, 242, 0.55);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
:root[data-theme="light"] .native-chat-drawer-brand span {
  color: rgba(13, 42, 50, 0.55);
}
.native-chat-drawer-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 0;
  background: rgba(94, 202, 197, 0.08);
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.native-chat-drawer-close:active {
  background: rgba(94, 202, 197, 0.18);
}

.native-chat-drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  overflow-y: auto;
}
.native-chat-drawer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease;
}
.native-chat-drawer-item:active {
  background: rgba(94, 202, 197, 0.14);
}
.native-chat-drawer-item svg,
.native-chat-drawer-item .icon-svg {
  color: #5ecac5;
  flex-shrink: 0;
}

.native-chat-drawer-footer {
  padding-top: 14px;
  border-top: 1px solid rgba(94, 202, 197, 0.12);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.native-chat-drawer-plan {
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  margin-left: 14px;
}
.native-chat-drawer-plan-pro {
  background: linear-gradient(135deg, #5ecac5, #7c3aed);
  color: #fff;
}
.native-chat-drawer-plan-free {
  background: rgba(148, 163, 184, 0.2);
  color: rgba(232, 244, 242, 0.7);
}
:root[data-theme="light"] .native-chat-drawer-plan-free {
  color: rgba(13, 42, 50, 0.7);
}

/* ═══════════════════════════════════════════════════════════════
   NATIVE iOS chat OVERLAYS — topbar + bottom composer (not takeover)
   These float above the existing builder and replace the old
   native-shell .topbar + .ios-bottom-nav chrome entirely.
   ═══════════════════════════════════════════════════════════════ */

/* Hide old iOS chrome (logo topbar + bottom tab bar) when overlays are active.
   The new hamburger topbar + bottom composer replace them entirely. */
body.native-chat-overlays-active .app-shell.native-shell .topbar,
body.native-chat-overlays-active .ios-bottom-nav {
  display: none !important;
}

/* Pad the app-shell so content doesn't hide behind the fixed topbar and composer */
body.native-chat-overlays-active .app-shell.native-shell {
  padding-top: calc(var(--safe-top) + 68px) !important;
  padding-bottom: calc(var(--safe-bottom) + 20px) !important;
}
/* When the composer is showing (in builder view), add room for it */
body.native-chat-overlays-active:has(.native-chat-composer-overlay) .app-shell.native-shell {
  padding-bottom: calc(var(--safe-bottom) + 110px) !important;
}
/* Fallback for browsers without :has() */
body.native-chat-builder-active .app-shell.native-shell {
  padding-bottom: calc(var(--safe-bottom) + 110px) !important;
}

/* Section title shown in topbar when not in builder (e.g. "Admin Dashboard") */
.native-chat-section-title {
  flex: 1;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: inherit;
  letter-spacing: -0.01em;
}
.native-chat-topbar-spacer {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

/* ── New top bar — hamburger + model picker + preview, glassy ── */
.native-chat-overlay-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 12px 10px 12px;
  background: rgba(10, 26, 31, 0.82);
  -webkit-backdrop-filter: blur(28px) saturate(1.7);
  backdrop-filter: blur(28px) saturate(1.7);
  border-bottom: 1px solid rgba(94, 202, 197, 0.14);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  color: #e8f4f2;
  min-height: 56px;
}
:root[data-theme="light"] .native-chat-overlay-topbar {
  background: rgba(248, 250, 250, 0.85);
  border-bottom-color: rgba(20, 107, 109, 0.12);
  color: #0d2a32;
  box-shadow: 0 10px 30px rgba(13, 42, 50, 0.08);
}
:root[data-theme="light"] .native-chat-overlay-topbar {
  background: rgba(248, 250, 250, 0.85);
  border-bottom-color: rgba(20, 107, 109, 0.12);
  box-shadow: 0 10px 30px rgba(13, 42, 50, 0.08);
}
:root[data-theme="light"] .native-chat-overlay-topbar {
  background: rgba(248, 250, 250, 0.7);
  border-bottom-color: rgba(20, 107, 109, 0.1);
  box-shadow: 0 10px 30px rgba(13, 42, 50, 0.06);
}

/* ── Bottom composer — fixed at the very bottom (replaces tab bar) ── */
.native-chat-composer-overlay {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  padding: 10px 12px calc(var(--safe-bottom) + 12px);
  background: linear-gradient(180deg, transparent 0%, rgba(10, 26, 31, 0.75) 35%, rgba(10, 26, 31, 0.95) 100%);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  backdrop-filter: blur(24px) saturate(1.5);
  pointer-events: none;
  border-top: 1px solid rgba(94, 202, 197, 0.12);
}
:root[data-theme="light"] .native-chat-composer-overlay {
  background: linear-gradient(180deg, transparent 0%, rgba(248, 250, 250, 0.75) 35%, rgba(248, 250, 250, 0.95) 100%);
  border-top-color: rgba(20, 107, 109, 0.1);
}
:root[data-theme="light"] .native-chat-composer-overlay {
  background: linear-gradient(180deg, transparent 0%, rgba(248, 250, 250, 0.6) 40%, rgba(248, 250, 250, 0.9) 100%);
}
.native-chat-composer-overlay > * { pointer-events: auto; }

/* The input pill itself */
.native-chat-composer-glass {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: rgba(19, 44, 50, 0.75);
  border: 1px solid rgba(94, 202, 197, 0.3);
  border-radius: 24px;
  padding: 6px 6px 6px 16px;
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.4),
    0 2px 8px rgba(94, 202, 197, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.native-chat-composer-glass:focus-within {
  border-color: rgba(94, 202, 197, 0.6);
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.45),
    0 0 0 3px rgba(94, 202, 197, 0.18);
}
:root[data-theme="light"] .native-chat-composer-glass {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(20, 107, 109, 0.2);
  box-shadow:
    0 16px 40px rgba(13, 42, 50, 0.12),
    0 2px 8px rgba(20, 107, 109, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.native-chat-composer-input {
  flex: 1;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-family: "Poppins", sans-serif;
  font-size: 0.95rem;
  line-height: 1.45;
  resize: none;
  padding: 10px 0;
  outline: none;
  max-height: 140px;
  min-height: 22px;
}
.native-chat-composer-input::placeholder {
  color: rgba(232, 244, 242, 0.45);
}
:root[data-theme="light"] .native-chat-composer-input::placeholder {
  color: rgba(13, 42, 50, 0.45);
}

.native-chat-composer-send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: linear-gradient(135deg, #5ecac5, #46b8b0);
  color: #0a1f24;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.12s ease, opacity 0.16s ease, box-shadow 0.16s ease;
  box-shadow: 0 6px 14px rgba(94, 202, 197, 0.35);
}
.native-chat-composer-send:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: rgba(148, 163, 184, 0.25);
  color: rgba(232, 244, 242, 0.5);
  box-shadow: none;
}
.native-chat-composer-send:not(:disabled):active {
  transform: scale(0.92);
}

/* Spinning send button */
.native-chat-send-spinner {
  display: flex;
  gap: 3px;
}
.native-chat-send-spinner span {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: nativeChatSendBounce 1s ease-in-out infinite;
}
.native-chat-send-spinner span:nth-child(2) { animation-delay: 0.12s; }
.native-chat-send-spinner span:nth-child(3) { animation-delay: 0.24s; }
@keyframes nativeChatSendBounce {
  0%, 60%, 100% { opacity: 0.35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

/* ── Result card (slides in above composer when AI replies) ── */
.native-chat-result-card {
  margin-bottom: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(19, 44, 50, 0.85);
  border: 1px solid rgba(94, 202, 197, 0.3);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: nativeChatResultSlide 0.28s cubic-bezier(0.2, 0.8, 0.25, 1);
  max-height: 40vh;
  overflow-y: auto;
}
:root[data-theme="light"] .native-chat-result-card {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(20, 107, 109, 0.18);
  box-shadow: 0 18px 40px rgba(13, 42, 50, 0.18);
}
@keyframes nativeChatResultSlide {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.native-chat-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.native-chat-result-badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(94, 202, 197, 0.22), rgba(124, 58, 237, 0.18));
  color: #5ecac5;
  border: 1px solid rgba(94, 202, 197, 0.3);
}
.native-chat-result-dismiss {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 0;
  background: rgba(148, 163, 184, 0.12);
  color: inherit;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.native-chat-result-dismiss:active { background: rgba(148, 163, 184, 0.25); }
.native-chat-result-body p {
  margin: 0 0 6px;
  font-size: 0.88rem;
  line-height: 1.5;
}
.native-chat-result-body p:last-child { margin-bottom: 0; }
.native-chat-result-body strong {
  color: #5ecac5;
  font-weight: 700;
}
:root[data-theme="light"] .native-chat-result-body strong {
  color: #1a7a7a;
}
.native-chat-result-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.native-chat-result-action {
  padding: 9px 14px;
  border-radius: 10px;
  border: 0;
  background: rgba(94, 202, 197, 0.14);
  color: #5ecac5;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}
.native-chat-result-action.primary {
  background: linear-gradient(135deg, #5ecac5, #46b8b0);
  color: #0a1f24;
  box-shadow: 0 4px 12px rgba(94, 202, 197, 0.3);
}
.native-chat-result-action:active { transform: scale(0.97); }

/* Active state on drawer items */
.native-chat-drawer-item.active {
  background: rgba(94, 202, 197, 0.16);
  color: #5ecac5;
  font-weight: 600;
}

/* ── Mobile builder tightening for native iOS ─────────── */
body.native-chat-overlays-active .workspace-shell,
body.native-chat-overlays-active .dashboard-shell {
  padding: 0 8px 8px !important;
  margin: 0 !important;
}
/* Template cards tighter + glassier on native */
body.native-chat-overlays-active .template-card,
body.native-chat-overlays-active .card {
  border-radius: 16px !important;
  background: rgba(19, 44, 50, 0.55) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-color: rgba(94, 202, 197, 0.12) !important;
}
:root[data-theme="light"] body.native-chat-overlays-active .template-card,
:root[data-theme="light"] body.native-chat-overlays-active .card {
  background: rgba(255, 255, 255, 0.75) !important;
  border-color: rgba(20, 107, 109, 0.1) !important;
}

/* ════════════════════════════════════════════════════════════════
   AI Composer Bar
   Pinned to the bottom of the app on the Resume Builder workspace.
   Works on desktop + mobile. Matches Figma design (node 32:446).
   ════════════════════════════════════════════════════════════════ */

/* Composer is rendered at .app-shell root (not inside .panel.editor-panel)
   so position:fixed positions against the viewport — not the editor-panel
   which has backdrop-filter (creates a containing block for fixed descendants). */
.ai-composer-wrap {
  position: fixed;
  z-index: 85;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  box-shadow: none;

  /* Desktop: spans the full screen width (minus the left sidebar) so the
     composer is reachable from anywhere in the editor + preview area.
     User feedback: previously it was confined to just the editor column,
     leaving the preview side without a quick way to refine. */
  left: 132px;
  right: 24px;
  bottom: 20px;
}

/* Center the composer card so it doesn't stretch to full width on
   ultra-wide monitors (looks weird at 2000px+). The wrap sets the
   horizontal range; the card chooses its own max-width inside. */
.ai-composer-wrap > * {
  width: 100%;
  max-width: 920px;
  pointer-events: auto;
}

/* Scroll headroom so last editor card isn't hidden behind the composer.
   :not(.swipe-panel) — the AutoApply panel has no composer; without the
   guard this rule beats .swipe-panel-scroll { padding: 0 } on specificity
   and leaves ~96px of dead scroll space under the deck. */
.panel.editor-panel:not(.swipe-panel) .panel-scroll { padding-bottom: 96px; }

/* Mobile: edge-to-edge, pinned to viewport bottom above the ios-bottom-nav.
   When the keyboard opens we set --kb-height via JS so the composer rises
   ABOVE the keyboard — the user sees what they're typing. The transition
   uses a strong custom ease-out so the composer feels like it's "carried"
   by the keyboard rather than reacting to it. */
@media (max-width: 980px) {
  .ai-composer-wrap {
    left: 10px !important;
    right: 10px !important;
    bottom: calc(var(--kb-height, 0px) + env(safe-area-inset-bottom, 0px) + 12px) !important;
    z-index: 95 !important;
    transition: bottom 220ms cubic-bezier(0.23, 1, 0.32, 1);
  }
  body:has(.ios-bottom-nav) .ai-composer-wrap,
  .native-shell .ai-composer-wrap {
    /* On native iOS the bottom nav (60px) takes the safe-area space when
       the keyboard is closed. When the keyboard opens, the bottom nav
       slides offscreen (translateY(100%)) so we don't need to clear it —
       just clear the keyboard height instead. */
    bottom: calc(var(--kb-height, 0px) + env(safe-area-inset-bottom, 0px) + 86px) !important;
  }
  body.keyboard-open:has(.ios-bottom-nav) .ai-composer-wrap,
  body.keyboard-open .native-shell .ai-composer-wrap {
    /* Keyboard is open: bottom nav is hidden anyway, clear just keyboard
       + safe area + small breathing room */
    bottom: calc(var(--kb-height, 0px) + 12px) !important;
  }
  .panel.editor-panel:not(.swipe-panel) .panel-scroll { padding-bottom: 120px !important; }
  body:has(.ios-bottom-nav) .panel.editor-panel:not(.swipe-panel) .panel-scroll,
  .native-shell .panel.editor-panel:not(.swipe-panel) .panel-scroll {
    padding-bottom: 180px !important;
  }
  .ai-composer {
    max-width: 100% !important;
    padding: 5px !important;
    height: 42px !important;
  }
  .ai-composer-input {
    font-size: 14px !important;
  }
  .ai-composer-menu {
    max-width: 100% !important;
  }
}

/* ─── Compact pill ─── */
/* ═══════════════════════════════════════════════════════════════════════
   AI Composer — Apple-Intelligence-style glass with rotating rainbow ring,
   breathing aurora, layered shadows. Same treatment as `.aic-composer-card`
   but for the inline composer that sits in the resume editor.
   ═══════════════════════════════════════════════════════════════════════ */
.ai-composer {
  position: relative;
  pointer-events: auto;
  width: 100%;
  max-width: 880px;
  align-self: center;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 14px;
  min-height: 56px;
  border-radius: 20px;
  /* Vibrant glass — matches the .aic-composer-card treatment.
     Punchy 92% opaque base + teal/purple tint highlight + saturation. */
  background:
    linear-gradient(135deg, rgba(94, 202, 197, 0.10), rgba(139, 92, 246, 0.06) 60%, rgba(255, 255, 255, 0.04)),
    rgba(11, 22, 31, 0.92);
  backdrop-filter: blur(32px) saturate(1.85);
  -webkit-backdrop-filter: blur(32px) saturate(1.85);
  border: 1px solid rgba(94, 202, 197, 0.22);
  /* Same compact vibrant multi-color shadow as .aic-composer-card */
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.45),
    0 14px 32px rgba(94, 202, 197, 0.45),
    0 8px 24px rgba(139, 92, 246, 0.30),
    0 4px 18px rgba(244, 114, 182, 0.18),
    0 0 50px rgba(94, 202, 197, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.20),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 240ms ease,
              background 240ms ease, border-color 240ms ease;
  overflow: hidden;
}
/* Light theme — clean white glass with subtle teal-violet glow. The conic
   ring (::before) still shows because we mask with content-box; we just
   dim it slightly so it doesn't dominate on a white page. */
:root[data-theme="light"] .ai-composer,
:root:not([data-theme="dark"]) .ai-composer {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 252, 247, 0.88) 60%),
    rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(20, 107, 109, 0.18);
  box-shadow:
    0 22px 60px rgba(15, 32, 38, 0.10),
    0 6px 18px rgba(94, 202, 197, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: var(--text);
}
:root[data-theme="light"] .ai-composer::before,
:root:not([data-theme="dark"]) .ai-composer::before {
  /* Less intense conic ring on white — the colors compete with content */
  opacity: 0.30;
}
:root[data-theme="light"] .ai-composer::after,
:root:not([data-theme="dark"]) .ai-composer::after {
  /* Aurora glow — much softer on white so it's a hint, not a halo */
  opacity: 0.35;
}

/* Rotating conic-gradient rainbow ring — vibrant (matches .aic-composer-card) */
.ai-composer::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(
    from 0deg,
    rgba(94, 202, 197, 1),
    rgba(79, 140, 255, 0.95),
    rgba(139, 92, 246, 0.95),
    rgba(244, 114, 182, 0.85),
    rgba(255, 164, 87, 0.75),
    rgba(94, 202, 197, 1)
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0.75;
  animation: ai-composer-ring-spin 8s linear infinite;
  pointer-events: none;
  transition: opacity 280ms ease;
  z-index: 0;
}

/* Compact aurora glow underneath — same balanced spread as .aic-composer-card */
.ai-composer::after {
  content: "";
  position: absolute;
  inset: -48px -40px -48px -40px;
  border-radius: 56px;
  background:
    radial-gradient(ellipse 65% 90% at 25% 100%,
      rgba(94, 202, 197, 0.72),
      rgba(94, 202, 197, 0.28) 45%,
      transparent 72%),
    radial-gradient(ellipse 65% 90% at 75% 100%,
      rgba(244, 114, 182, 0.50),
      rgba(139, 92, 246, 0.36) 45%,
      transparent 72%),
    radial-gradient(ellipse 80% 60% at 50% 100%,
      rgba(79, 140, 255, 0.32),
      transparent 72%);
  filter: blur(28px) saturate(1.25);
  opacity: 0.95;
  animation: ai-composer-breathe 4s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

.ai-composer:hover {
  transform: translateY(-1px);
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.5),
    0 8px 22px rgba(94, 202, 197, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.ai-composer:hover::before { opacity: 0.7; }

.ai-composer:focus-within {
  border-color: rgba(94, 202, 197, 0.4);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.55),
    0 10px 30px rgba(94, 202, 197, 0.3),
    0 0 0 4px rgba(94, 202, 197, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.ai-composer:focus-within::before {
  opacity: 0.95;
  animation-duration: 5s;
}

@keyframes ai-composer-ring-spin {
  to { transform: rotate(360deg); }
}

@keyframes ai-composer-breathe {
  0%, 100% { opacity: 0.70; transform: scale(0.96); }
  50%      { opacity: 1;    transform: scale(1.06); }
}

/* + and Send buttons — bigger and chunkier */
.ai-composer-plus,
.ai-composer-send {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  cursor: pointer;
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.18s ease,
              box-shadow 0.2s ease,
              opacity 0.15s ease;
}

.ai-composer-plus {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(94, 202, 197, 0.14);
  border: 1px solid rgba(94, 202, 197, 0.32);
  color: #5ecac5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.ai-composer-plus:hover {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(94, 202, 197, 0.22);
  transform: scale(1.06);
}
.ai-composer-plus.is-open {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06)),
    rgba(94, 202, 197, 0.32);
  transform: rotate(45deg);
}
.ai-composer-plus svg { width: 18px; height: 18px; display: block; }

/* Input — bigger, bolder, white (was 13.5px / muted) */
.ai-composer-input,
.ai-composer-input:hover,
.ai-composer-input:focus,
.ai-composer-input:focus-visible,
.ai-composer-input:active {
  position: relative !important;
  z-index: 1 !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  width: auto !important;
  margin: 0 !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 8px 4px !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  outline-offset: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  background-image: none !important;
  color: var(--text) !important;
  font-family: inherit !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  letter-spacing: -0.005em !important;
  transition: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}
:root[data-theme="dark"] .ai-composer-input,
:root[data-theme="dark"] .ai-composer-input:hover,
:root[data-theme="dark"] .ai-composer-input:focus {
  color: #ffffff !important;
}
.ai-composer-input::placeholder {
  color: var(--placeholder) !important;
  opacity: 1 !important;
  font-weight: 400 !important;
}
:root[data-theme="dark"] .ai-composer-input::placeholder {
  color: rgba(255, 255, 255, 0.55) !important;
}

/* Send button — gradient + glow + glossy overlay */
.ai-composer-send {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04)),
    linear-gradient(135deg, #5ecac5, #4f8cff 50%, #8b5cf6);
  color: #ffffff;
  border: 0;
  font-family: inherit;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.02em;
  box-shadow:
    0 8px 22px rgba(94, 202, 197, 0.5),
    0 3px 10px rgba(139, 92, 246, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}
.ai-composer-send:hover:not(:disabled) {
  transform: scale(1.08) translateY(-1px);
  box-shadow:
    0 12px 30px rgba(94, 202, 197, 0.6),
    0 5px 14px rgba(139, 92, 246, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.ai-composer-send:active:not(:disabled) {
  transform: scale(0.94);
}
.ai-composer-send:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  background:
    linear-gradient(135deg, rgba(94, 202, 197, 0.45), rgba(139, 92, 246, 0.4));
  box-shadow:
    0 3px 8px rgba(94, 202, 197, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.ai-composer-send-r {
  display: inline-block;
  line-height: 1;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  /* No more text-clip gradient — a solid white "R" reads better on the
     gradient-glass background. */
  -webkit-background-clip: initial;
  background-clip: initial;
  -webkit-text-fill-color: #ffffff;
  background: none;
  color: #ffffff;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* Light-mode tuning — keep the glass feel on a paper background */
@media (prefers-color-scheme: light) {
  .ai-composer {
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65) 60%),
      rgba(245, 248, 252, 0.75);
    border-color: rgba(10, 30, 40, 0.08);
    box-shadow:
      0 18px 50px rgba(15, 30, 50, 0.18),
      0 6px 18px rgba(94, 202, 197, 0.16),
      inset 0 1px 0 rgba(255, 255, 255, 0.6),
      inset 0 -1px 0 rgba(15, 30, 50, 0.04);
  }
  .ai-composer-input { color: #0b1a28 !important; }
  .ai-composer-input::placeholder { color: rgba(20, 40, 55, 0.55) !important; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .ai-composer::before,
  .ai-composer::after { animation: none !important; }
}

/* ─── Backdrop — only the content behind it blurs, NOT the menu ─── */
.ai-composer-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 75; /* below .ai-composer-wrap (85) */
  background: rgba(4, 14, 18, 0.28);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: aicm-fade-in 0.15s ease-out;
  pointer-events: auto; /* catches the click-outside-to-close */
}

/* ─── Compact menu ─── */
.ai-composer-menu {
  pointer-events: auto;
  width: 100%;
  max-width: 380px;
  align-self: flex-start;
  padding: 6px;
  border-radius: 14px;
  background: var(--card, #112830);
  border: 1px solid var(--line, #274249);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.55),
    0 0 20px -8px rgba(88, 203, 198, 0.28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  gap: 1px;
  animation: aicm-pop-in 0.16s ease-out;
  position: relative;
  isolation: isolate; /* own stacking context so rows can't be blurred by ancestors */
}

.ai-composer-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px 4px 10px;
}
.ai-composer-menu-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--mutedDim, #7b9794);
}
.ai-composer-menu-hint {
  font-size: 10.5px;
  color: var(--mutedDim, #7b9794);
}

.ai-composer-menu-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 10px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--text, #e2f2ef);
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease;
  font: inherit;
}
.ai-composer-menu-row:hover {
  background: color-mix(in srgb, var(--accent, #58cbc6) 10%, transparent);
}

.ai-composer-menu-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--accent, #58cbc6) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, #58cbc6) 32%, transparent);
  color: var(--accent, #58cbc6);
}
.ai-composer-menu-icon svg { width: 14px; height: 14px; }

.ai-composer-menu-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.ai-composer-menu-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #e2f2ef);
  line-height: 1.2;
}
.ai-composer-menu-hint-row {
  font-size: 11px;
  color: var(--muted, #a1bab7);
  line-height: 1.2;
}

.ai-composer-menu-tag {
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.04em;
}
.ai-composer-menu-tag.is-pro {
  color: #f0c878;
  background: rgba(240, 200, 120, 0.12);
  border: 1px solid rgba(240, 200, 120, 0.4);
}
.ai-composer-menu-tag.is-free {
  color: var(--muted, #a1bab7);
  background: var(--card-subtle-bg, #16313a);
  border: 1px solid var(--line, #274249);
}

.ai-composer-menu-divider {
  height: 1px;
  background: var(--line, #274249);
  opacity: 0.5;
  margin: 4px 8px;
}

@keyframes aicm-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes aicm-pop-in {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.ai-tailor-hint {
  margin: 4px 0 14px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.ai-tailor-hint-saved {
  color: var(--accent, #58cbc6);
  font-weight: 600;
}

/* ════════════════════════════════════════════════════════════════
   ATS Score — compact summary trigger + full popup modal
   Replaces the big inline "Submission Readiness" block.
   ════════════════════════════════════════════════════════════════ */
.ats-score-trigger {
  width: 100%;
  margin-top: 14px;
  padding: 14px 18px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--card-subtle-bg, #16313a) 80%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, #58cbc6) 22%, transparent);
  color: inherit;
  cursor: pointer;
  text-align: left;
  font: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}
.ats-score-trigger:hover {
  border-color: color-mix(in srgb, var(--accent, #58cbc6) 48%, transparent);
  background: color-mix(in srgb, var(--card-subtle-bg, #16313a) 95%, transparent);
}
.ats-score-trigger:active {
  transform: translateY(1px);
}
.ats-score-trigger-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.ats-score-trigger-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ats-score-trigger-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mutedDim, #7b9794);
}
.ats-score-trigger-status {
  font-size: 17px;
  font-weight: 700;
  color: var(--text, #e2f2ef);
}
.ats-score-trigger-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.ats-score-trigger-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-end;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent, #58cbc6);
  padding-top: 2px;
}

/* tone hints — subtle tinted left border */
.ats-score-trigger.ready      { border-left: 3px solid #7dddba; padding-left: 15px; }
.ats-score-trigger.near-ready { border-left: 3px solid #f0c878; padding-left: 15px; }
.ats-score-trigger.needs-work { border-left: 3px solid #f0c878; padding-left: 15px; }
.ats-score-trigger.not-ready  { border-left: 3px solid #cb7263; padding-left: 15px; }

/* ─── Modal overlay ─── */
.ats-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(4, 14, 18, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: ats-modal-fade 0.18s ease-out;
}
.ats-modal-panel {
  width: 100%;
  max-width: 860px;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  background: var(--card, #112830);
  border: 1px solid var(--line, #274249);
  border-radius: 18px;
  box-shadow:
    0 32px 72px rgba(0, 0, 0, 0.6),
    0 0 28px -10px rgba(88, 203, 198, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: ats-modal-pop 0.22s cubic-bezier(0.22, 1.2, 0.36, 1);
}
.ats-modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line, #274249);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(180deg,
              color-mix(in srgb, var(--accent, #58cbc6) 8%, transparent),
              transparent);
}
.ats-modal-title-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.ats-modal-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mutedDim, #7b9794);
  margin: 0;
}
.ats-modal-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  color: var(--text, #e2f2ef);
}
.ats-modal-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line, #274249);
  color: var(--muted, #a1bab7);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.ats-modal-close:hover {
  background: color-mix(in srgb, var(--accent, #58cbc6) 12%, transparent);
  border-color: color-mix(in srgb, var(--accent, #58cbc6) 40%, transparent);
  color: var(--text, #e2f2ef);
}
.ats-modal-body {
  padding: 20px 22px 22px;
  overflow: auto;
  flex: 1 1 auto;
}

/* The modal renders the existing .ats-audit-shell — ensure it looks clean inside */
.ats-modal-body .ats-audit-shell {
  border: 0;
  background: transparent;
  padding: 0;
}

@keyframes ats-modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes ats-modal-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Mobile: modal goes edge-to-edge and scrolls inside */
@media (max-width: 720px) {
  .ats-modal-overlay { padding: 12px; }
  .ats-modal-panel { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
  .ats-modal-header { padding: 14px 16px; }
  .ats-modal-title { font-size: 18px; }
  .ats-modal-body { padding: 14px 16px 16px; }
  .ats-score-trigger { padding: 12px 14px; }
  .ats-score-trigger-status { font-size: 15px; }
}

/* (Old mobile composer CSS removed — consolidated into the composer block above
   that selects .ai-composer-wrap directly since it now lives at app-shell root.) */

/* ════════════════════════════════════════════════════════════════
   iOS (native-shell) tweaks:
   1) Fill the safe-area gap at the top — topbar bg extends under
      the notch/Dynamic Island instead of leaving an empty strip.
   2) Slightly bigger chat composer for comfortable thumb reach.
   Scoped to .native-shell so web layout stays identical.
   ════════════════════════════════════════════════════════════════ */

/* ─── 1. Safe-area background matches the topbar so there's no black gap ───
   Keep the topbar's original dimensions. Just paint the area above it
   (the safe-area region for the notch / Dynamic Island) with the SAME
   gradient the topbar uses — so visually it's one continuous bar. */
body.native-shell,
html:has(.native-shell) {
  background: linear-gradient(180deg, rgba(24, 27, 29, 0.55), rgba(16, 19, 21, 0.5)) !important;
}
.app-shell.native-shell {
  background: linear-gradient(180deg, rgba(24, 27, 29, 0.55), rgba(16, 19, 21, 0.5)) !important;
  /* --safe-top falls back to the default defined in :root
     (env(safe-area-inset-top, 0px)) — native device inset, no override. */
}

/* ─── 2. Bigger chat composer on iOS ─── */
.native-shell .ai-composer {
  height: 60px !important;
  padding: 10px !important;
  border-radius: 18px !important;
  gap: 12px !important;
}
.native-shell .ai-composer-plus,
.native-shell .ai-composer-send {
  width: 42px !important;
  height: 42px !important;
  border-radius: 12px !important;
}
.native-shell .ai-composer-plus svg {
  width: 20px !important;
  height: 20px !important;
}
.native-shell .ai-composer-input {
  /* 16.5px — comfortable + avoids iOS Safari's automatic zoom-on-focus */
  font-size: 16.5px !important;
  padding: 12px 4px !important;
}
.native-shell .ai-composer-send {
  font-size: 17px !important;
}
/* Nudge composer a touch higher so it clears the iOS home indicator comfortably */
.native-shell .ai-composer-wrap {
  bottom: calc(env(safe-area-inset-bottom, 0px) + 94px) !important;
}
/* Scroll headroom so the last card clears the now-taller composer */
.native-shell .panel.editor-panel .panel-scroll {
  padding-bottom: 200px !important;
}

/* ═══════════════════════════════════════════════════════════════════════
   Apple-Intelligence-style gradient frame that wraps the whole screen
   while Refynes is AI-thinking (Refyne to Job, Humanize, Cover Letter).

   Implementation:
   - position:fixed covers viewport, pointer-events:none never blocks taps
   - radial mask keeps only the EDGES visible (center transparent)
   - conic-gradient provides the rotating rainbow (teal → blue → purple
     → pink → orange → back to teal)
   - NO mix-blend-mode (causes rendering issues in iOS WKWebView)
   ═══════════════════════════════════════════════════════════════════════ */
.refyne-thinking-frame {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2147483647; /* max 32-bit int — always on top */
  overflow: hidden;
  animation: refyne-frame-fade-in 420ms ease-out;
}

.refyne-thinking-frame-glow {
  position: absolute;
  inset: 0;
  /* Symmetric 4-color gradient — no rotation, just a static rainbow halo.
     Each color gets its own edge for a balanced multi-color glow. */
  background:
    linear-gradient(0deg,   transparent 60%, rgba(94, 202, 197, 0.9) 100%),   /* top: teal */
    linear-gradient(90deg,  transparent 60%, rgba(139, 92, 246, 0.9) 100%),   /* right: purple */
    linear-gradient(180deg, transparent 60%, rgba(244, 114, 182, 0.85) 100%), /* bottom: pink */
    linear-gradient(270deg, transparent 60%, rgba(79, 140, 255, 0.85) 100%);  /* left: blue */
  filter: blur(30px) saturate(1.5);
  animation: refyne-frame-pulse 2.2s ease-in-out infinite;
  will-change: opacity, filter;
}

/* Inner tight glow that breathes softly — adds that "energy on the edge" feel */
.refyne-thinking-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow:
    inset 0 0 100px rgba(94, 202, 197, 0.55),
    inset 0 0 180px rgba(139, 92, 246, 0.35),
    inset 0 0 60px rgba(244, 114, 182, 0.25);
  animation: refyne-frame-breathe 2.8s ease-in-out infinite;
}

@keyframes refyne-frame-fade-in {
  from { opacity: 0; filter: blur(50px); }
  to { opacity: 1; filter: blur(30px); }
}

@keyframes refyne-frame-pulse {
  0%, 100% { opacity: 0.82; filter: blur(30px) saturate(1.5); }
  50%      { opacity: 1;    filter: blur(36px) saturate(1.8); }
}

@keyframes refyne-frame-breathe {
  0%, 100% { opacity: 0.6; }
  50%      { opacity: 1; }
}

/* ─── Success flash that fires when Refyne completes ─── */
.refyne-success-flash {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2147483646;
  overflow: hidden;
  animation: refyne-success-flash-fade 1400ms ease-out forwards;
}

.refyne-success-flash::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(94, 202, 197, 0.55) 0%,
    rgba(139, 92, 246, 0.35) 35%,
    transparent 70%
  );
  animation: refyne-success-flash-pulse 1400ms ease-out forwards;
}

@keyframes refyne-success-flash-fade {
  0% { opacity: 0; }
  15% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes refyne-success-flash-pulse {
  0% { transform: scale(0.85); }
  100% { transform: scale(1.15); }
}

/* ─── Sparkle confetti burst — 18 sparkles exploding outward from center ─── */
/* Anchor container is centered; each sparkle is absolutely positioned at
   (0,0) of this container, so transform values drive the explosion directly. */
.refyne-success-sparkles {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 2147483646;
  overflow: visible;
}

.refyne-success-sparkle {
  position: absolute;
  top: 0;
  left: 0;
  /* --end-x and --end-y set inline per sparkle from JS.
     The transform uses them directly (no calc multiplication) so iOS
     WKWebView doesn't silently skip the animation. */
  --end-x: 0px;
  --end-y: 0px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.3);
  animation: refyne-sparkle-burst 1700ms cubic-bezier(0.22, 0.9, 0.3, 1) forwards;
  filter:
    drop-shadow(0 0 14px rgba(94, 202, 197, 0.95))
    drop-shadow(0 0 28px rgba(139, 92, 246, 0.7))
    drop-shadow(0 0 48px rgba(255, 255, 255, 0.35));
  will-change: transform, opacity;
  line-height: 1;
  user-select: none;
  pointer-events: none;
  z-index: 1;
}

@keyframes refyne-sparkle-burst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3) rotate(-15deg);
  }
  12% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.5) rotate(10deg);
  }
  45% {
    opacity: 1;
    /* Note: translate uses var() directly, NO calc(), NO multiplication */
    transform: translate(var(--end-x), var(--end-y)) translate(-50%, -50%) scale(1.1) rotate(-5deg);
  }
  100% {
    opacity: 0;
    transform: translate(var(--end-x), var(--end-y)) translate(-50%, -50%) scale(0.5) rotate(20deg);
  }
}

/* ─── Hero success banner — big center card ("✨ Resume Refyned!") ─── */
.refyne-success-hero {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2147483646;
  padding: 32px 40px;
  border-radius: 30px;
  background: linear-gradient(135deg,
    rgba(94, 202, 197, 0.95) 0%,
    rgba(79, 140, 255, 0.92) 45%,
    rgba(139, 92, 246, 0.95) 100%);
  color: white;
  text-align: center;
  box-shadow:
    0 30px 90px rgba(94, 202, 197, 0.6),
    0 12px 36px rgba(139, 92, 246, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  pointer-events: none;
  min-width: 280px;
  animation:
    refyne-hero-in 460ms cubic-bezier(0.34, 1.72, 0.64, 1),
    refyne-hero-out 500ms ease-in 2.3s forwards;
}

.refyne-success-hero-icon {
  font-size: 52px;
  line-height: 1;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 22px rgba(255, 255, 255, 0.8));
  animation: refyne-hero-icon-bounce 1000ms ease-in-out;
}

.refyne-success-hero-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.refyne-success-hero-subtitle {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.95;
  letter-spacing: 0;
}

@keyframes refyne-hero-in {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5) rotate(-4deg);
  }
  60% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08) rotate(1deg);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
}

@keyframes refyne-hero-out {
  from {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.85) translateY(-20px);
  }
}

@keyframes refyne-hero-icon-bounce {
  0% { transform: scale(0.5) rotate(-15deg); }
  40% { transform: scale(1.3) rotate(8deg); }
  60% { transform: scale(0.95) rotate(-3deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* ─── Post-success Download CTA card — BIG, premium hero card ─── */
.refyne-download-prompt {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 90px);
  left: 16px;
  right: 16px;
  z-index: 2147483640;
  padding: 22px 22px 20px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(32, 45, 62, 0.98), rgba(22, 30, 46, 0.98));
  border: 1px solid rgba(94, 202, 197, 0.35);
  box-shadow:
    0 -1px 0 rgba(94, 202, 197, 0.2),
    0 30px 80px rgba(0, 0, 0, 0.6),
    0 10px 36px rgba(94, 202, 197, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  max-width: 540px;
  margin: 0 auto;
  animation: refyne-download-prompt-in 540ms cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.refyne-download-prompt::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(94, 202, 197, 0.25), transparent 70%);
  pointer-events: none;
}

.refyne-download-prompt-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.refyne-download-prompt-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(94, 202, 197, 0.3), rgba(139, 92, 246, 0.25));
  border: 1px solid rgba(94, 202, 197, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 6px 20px rgba(94, 202, 197, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.refyne-download-prompt-icon {
  font-size: 28px;
  line-height: 1;
  filter: drop-shadow(0 2px 8px rgba(94, 202, 197, 0.6));
}

.refyne-download-prompt-text {
  flex: 1;
  min-width: 0;
}

.refyne-download-prompt-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.refyne-download-prompt-subtitle {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 4px;
  line-height: 1.35;
}

.refyne-download-prompt-actions {
  display: flex;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.refyne-download-prompt-btn {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 20px;
  border-radius: 16px;
  cursor: pointer;
  font-family: inherit;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: -0.01em;
  min-height: 50px;
}

.refyne-download-prompt-btn:active {
  transform: scale(0.97);
}

.refyne-download-prompt-btn-primary {
  flex: 1;
  background: linear-gradient(135deg, #5ecac5, #4f8cff 55%, #8b5cf6);
  color: white;
  box-shadow:
    0 10px 28px rgba(94, 202, 197, 0.5),
    0 4px 12px rgba(139, 92, 246, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.refyne-download-prompt-btn-secondary {
  flex: 0 0 auto;
  min-width: 110px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.refyne-download-prompt-btn-secondary:active {
  background: rgba(255, 255, 255, 0.14);
}

.refyne-download-prompt-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  line-height: 1;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-family: inherit;
  z-index: 2;
  transition: background 150ms ease;
}

.refyne-download-prompt-close:active {
  background: rgba(255, 255, 255, 0.18);
}

@keyframes refyne-download-prompt-in {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Nudge download prompt above the iOS bottom nav (and chat composer if shown) */
.native-shell .refyne-download-prompt {
  bottom: calc(env(safe-area-inset-bottom, 0px) + 80px);
  left: 12px;
  right: 12px;
}

/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .refyne-thinking-frame-glow,
  .refyne-thinking-frame::after,
  .refyne-thinking-frame,
  .refyne-success-flash,
  .refyne-success-flash::before,
  .refyne-success-sparkle,
  .refyne-success-hero,
  .refyne-success-hero-icon,
  .refyne-download-prompt {
    animation: none !important;
  }
}

/* Tighter halo on mobile for a more focused edge glow */
@media (max-width: 720px) {
  .refyne-thinking-frame-glow {
    filter: blur(32px) saturate(1.6);
    -webkit-mask: radial-gradient(
      ellipse at center,
      transparent 36%,
      rgba(0, 0, 0, 0.35) 52%,
      rgba(0, 0, 0, 0.8) 70%,
      black 92%
    );
    mask: radial-gradient(
      ellipse at center,
      transparent 36%,
      rgba(0, 0, 0, 0.35) 52%,
      rgba(0, 0, 0, 0.8) 70%,
      black 92%
    );
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   Pre-Refyne "Save a copy first?" modal — replaces the ugly window.confirm
   ═══════════════════════════════════════════════════════════════════════ */
.pre-refyne-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483645;
  background: rgba(5, 10, 20, 0.68);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: pre-refyne-backdrop-in 220ms ease-out;
}

.pre-refyne-sheet {
  width: 100%;
  max-width: 400px;
  background: linear-gradient(145deg, rgba(32, 42, 58, 0.98), rgba(20, 28, 42, 0.98));
  border: 1px solid rgba(94, 202, 197, 0.22);
  border-radius: 24px;
  padding: 32px 26px 26px;
  text-align: center;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: pre-refyne-sheet-in 360ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pre-refyne-icon-wrap {
  width: 68px;
  height: 68px;
  margin: 0 auto 18px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(94, 202, 197, 0.22), rgba(139, 92, 246, 0.22));
  border: 1px solid rgba(94, 202, 197, 0.3);
  box-shadow: 0 8px 24px rgba(94, 202, 197, 0.2);
}

.pre-refyne-icon {
  font-size: 30px;
  line-height: 1;
  filter: drop-shadow(0 2px 8px rgba(94, 202, 197, 0.4));
}

.pre-refyne-title {
  margin: 0 0 10px;
  font-size: 21px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.pre-refyne-copy {
  margin: 0 0 22px;
  font-size: 14.5px;
  line-height: 1.48;
  color: rgba(255, 255, 255, 0.7);
}

.pre-refyne-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pre-refyne-btn {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 15.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
  font-family: inherit;
}

.pre-refyne-btn:active {
  transform: scale(0.97);
}

.pre-refyne-btn-primary {
  background: linear-gradient(135deg, #5ecac5, #4f8cff, #8b5cf6);
  color: #ffffff;
  box-shadow:
    0 10px 28px rgba(94, 202, 197, 0.38),
    0 4px 12px rgba(139, 92, 246, 0.3);
}

.pre-refyne-btn-primary:hover {
  box-shadow:
    0 14px 34px rgba(94, 202, 197, 0.5),
    0 6px 16px rgba(139, 92, 246, 0.4);
}

.pre-refyne-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.pre-refyne-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.13);
}

.pre-refyne-btn-cancel {
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  padding: 10px 18px;
  margin-top: 2px;
  font-weight: 500;
}

.pre-refyne-btn-cancel:hover {
  color: rgba(255, 255, 255, 0.85);
}

@keyframes pre-refyne-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pre-refyne-sheet-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Light-mode fallback (for web/Stripe flow) */
@media (prefers-color-scheme: light) {
  .pre-refyne-sheet {
    background: linear-gradient(145deg, #ffffff, #f6f9fd);
    border-color: rgba(79, 140, 255, 0.2);
    box-shadow:
      0 30px 80px rgba(30, 40, 60, 0.22),
      0 0 0 1px rgba(0, 0, 0, 0.04);
  }
  .pre-refyne-title { color: #0b1628; }
  .pre-refyne-copy { color: rgba(30, 40, 60, 0.7); }
  .pre-refyne-btn-secondary {
    background: rgba(0, 0, 0, 0.04);
    color: #1a2840;
    border-color: rgba(0, 0, 0, 0.08);
  }
  .pre-refyne-btn-cancel { color: rgba(30, 40, 60, 0.55); }
  .pre-refyne-btn-cancel:hover { color: rgba(30, 40, 60, 0.85); }
}

/* ═══════════════════════════════════════════════════════════════════════
   iOS topbar — Download menu (PDF / Word)
   Circular icon button on the right, opens a small popover with 2 options.
   ═══════════════════════════════════════════════════════════════════════ */
.iosn-download-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.iosn-download-btn {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: linear-gradient(135deg, rgba(94, 202, 197, 0.18), rgba(79, 140, 255, 0.14));
  border: 1px solid rgba(94, 202, 197, 0.32);
  color: #5ecac5;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 8px;
  transition: transform 120ms ease, background 150ms ease, box-shadow 150ms ease;
  box-shadow: 0 2px 8px rgba(94, 202, 197, 0.12);
  font-family: inherit;
}

.iosn-download-btn:active {
  transform: scale(0.94);
  background: linear-gradient(135deg, rgba(94, 202, 197, 0.3), rgba(79, 140, 255, 0.22));
}

.iosn-download-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 310;
  background: transparent;
}

.iosn-download-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 10px;
  z-index: 320;
  background: linear-gradient(145deg, rgba(22, 30, 46, 0.98), rgba(14, 20, 32, 0.98));
  border: 1px solid rgba(94, 202, 197, 0.22);
  border-radius: 16px;
  padding: 6px;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  min-width: 240px;
  animation: iosn-download-menu-in 220ms cubic-bezier(0.22, 1.2, 0.36, 1);
}

.iosn-download-menu-item {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  color: #ffffff;
  text-align: left;
  font-family: inherit;
  transition: background 120ms ease;
}

.iosn-download-menu-item:active,
.iosn-download-menu-item:hover {
  background: rgba(94, 202, 197, 0.1);
}

.iosn-download-menu-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}

.iosn-download-menu-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.iosn-download-menu-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 2px;
  line-height: 1.3;
}

@keyframes iosn-download-menu-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ═══════════════════════════════════════════════════════════════════════
   Missing-JD modal — shown when Refyne is triggered but the scraped job
   description is too short / generic for the AI tailor to do useful work.
   Replaces the silent auto-generated garbage resume.
   ═══════════════════════════════════════════════════════════════════════ */
.missing-jd-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483645;
  background: rgba(5, 10, 20, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: missing-jd-backdrop-in 220ms ease-out;
}

.missing-jd-sheet {
  width: 100%;
  max-width: 460px;
  background: linear-gradient(145deg, rgba(32, 42, 58, 0.98), rgba(20, 28, 42, 0.98));
  border: 1px solid rgba(255, 165, 87, 0.28);
  border-radius: 26px;
  padding: 28px 24px 22px;
  text-align: center;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: missing-jd-sheet-in 380ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.missing-jd-icon-wrap {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255, 165, 87, 0.22), rgba(244, 114, 182, 0.18));
  border: 1px solid rgba(255, 165, 87, 0.32);
  box-shadow: 0 8px 24px rgba(255, 165, 87, 0.18);
}

.missing-jd-icon {
  font-size: 28px;
  line-height: 1;
}

.missing-jd-title {
  margin: 0 0 10px;
  font-size: 19px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.missing-jd-copy {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
}

.missing-jd-snippet {
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.missing-jd-snippet-label {
  margin: 0 0 4px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.missing-jd-snippet-text {
  margin: 0;
  font-size: 12.5px;
  font-style: italic;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.65);
}

.missing-jd-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.missing-jd-btn {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  border-radius: 14px;
  padding: 13px 18px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: transform 100ms ease, box-shadow 150ms ease, background 150ms ease;
  letter-spacing: -0.01em;
}

.missing-jd-btn:active { transform: scale(0.97); }

.missing-jd-btn-primary {
  background: linear-gradient(135deg, #5ecac5, #4f8cff 50%, #8b5cf6);
  color: white;
  box-shadow: 0 8px 22px rgba(94, 202, 197, 0.42), 0 3px 10px rgba(139, 92, 246, 0.32);
}

.missing-jd-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.missing-jd-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.13);
}

.missing-jd-btn-cancel {
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  padding: 9px 18px;
  font-weight: 500;
}
.missing-jd-btn-cancel:hover { color: rgba(255, 255, 255, 0.85); }

.missing-jd-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.45);
}

@keyframes missing-jd-backdrop-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes missing-jd-sheet-in {
  from { opacity: 0; transform: translateY(20px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Light-mode adjustments */
@media (prefers-color-scheme: light) {
  .missing-jd-sheet {
    background: linear-gradient(145deg, #ffffff, #f6f9fd);
    border-color: rgba(255, 165, 87, 0.4);
    box-shadow:
      0 30px 80px rgba(30, 40, 60, 0.22),
      0 0 0 1px rgba(0, 0, 0, 0.04);
  }
  .missing-jd-title { color: #0b1628; }
  .missing-jd-copy { color: rgba(30, 40, 60, 0.78); }
  .missing-jd-snippet {
    background: rgba(10, 30, 40, 0.05);
    border-color: rgba(10, 30, 40, 0.1);
  }
  .missing-jd-snippet-label { color: rgba(30, 40, 60, 0.55); }
  .missing-jd-snippet-text { color: rgba(30, 40, 60, 0.72); }
  .missing-jd-btn-secondary {
    background: rgba(0, 0, 0, 0.04);
    color: #1a2840;
    border-color: rgba(0, 0, 0, 0.08);
  }
  .missing-jd-btn-cancel { color: rgba(30, 40, 60, 0.55); }
  .missing-jd-btn-cancel:hover { color: rgba(30, 40, 60, 0.85); }
  .missing-jd-hint { color: rgba(30, 40, 60, 0.5); }
}

/* ═══════════════════════════════════════════════════════════════════════
   Admin Dashboard — premium analytics view with sparklines, donuts,
   goal tracker, and live insights.
   ═══════════════════════════════════════════════════════════════════════ */
:root {
  --admin-card-bg: rgba(255, 255, 255, 0.04);
  --admin-card-border: rgba(255, 255, 255, 0.08);
  --admin-text: rgba(255, 255, 255, 0.92);
  --admin-text-muted: rgba(255, 255, 255, 0.55);
  --admin-text-faint: rgba(255, 255, 255, 0.4);
}

/* Light theme — explicit data-theme attribute (our user toggle) takes
   priority over OS preference. Also matches @media for OS preference
   as a fallback when no explicit toggle is set. */
:root[data-theme="light"] {
  --admin-card-bg: rgba(10, 30, 40, 0.06);
  --admin-card-border: rgba(10, 30, 40, 0.12);
  --admin-text: #0b1a28;
  --admin-text-muted: rgba(20, 40, 55, 0.72);
  --admin-text-faint: rgba(20, 40, 55, 0.52);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --admin-card-bg: rgba(10, 30, 40, 0.06);
    --admin-card-border: rgba(10, 30, 40, 0.12);
    --admin-text: #0b1a28;
    --admin-text-muted: rgba(20, 40, 55, 0.72);
    --admin-text-faint: rgba(20, 40, 55, 0.52);
  }
}

.admin-dashboard-panel .panel-scroll {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
}

.admin-dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 0 4px;
}

.admin-dashboard-title {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--admin-text);
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #5ecac5, #4f8cff 50%, #8b5cf6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.admin-dashboard-title-icon {
  -webkit-text-fill-color: initial;
  background: none;
  filter: drop-shadow(0 2px 8px rgba(94, 202, 197, 0.5));
}

.admin-dashboard-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--admin-text-muted);
}

.admin-dashboard-error {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 120, 120, 0.1);
  border: 1px solid rgba(255, 120, 120, 0.3);
  color: #ff7a7a;
}
.admin-dashboard-error p { margin: 0; font-size: 13px; }

/* KPI sparkline grid */
.admin-spark-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.admin-spark-card {
  position: relative;
  padding: 16px 16px 8px;
  border-radius: 18px;
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-card-border);
  overflow: hidden;
  transition: transform 200ms ease, border-color 200ms ease;
}

.admin-spark-card:hover {
  transform: translateY(-2px);
  border-color: rgba(94, 202, 197, 0.3);
}

.admin-spark-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-spark-label {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--admin-text-muted);
}

.admin-spark-delta {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.admin-spark-delta.is-up {
  background: rgba(94, 202, 197, 0.18);
  color: #5ecac5;
}
.admin-spark-delta.is-down {
  background: rgba(255, 122, 122, 0.16);
  color: #ff7a7a;
}

.admin-spark-value {
  margin: 8px 0 0;
  font-size: 28px;
  font-weight: 800;
  color: var(--admin-text);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.admin-spark-sub {
  margin: 4px 0 8px;
  font-size: 12px;
  color: var(--admin-text-faint);
}

.admin-spark-svg {
  display: block;
  width: 100%;
  height: 60px;
}

/* Two-col row */
.admin-dashboard-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 12px;
}

@media (max-width: 720px) {
  .admin-dashboard-row { grid-template-columns: 1fr; }
}

.admin-card {
  padding: 18px;
  border-radius: 18px;
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-card-border);
}

.admin-card-label {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--admin-text-muted);
}

.admin-card-headline {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 800;
  color: var(--admin-text);
  letter-spacing: -0.02em;
}

.admin-mrr-goal-target {
  font-size: 14px;
  font-weight: 600;
  color: var(--admin-text-faint);
}

.admin-mrr-progress {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  margin-bottom: 10px;
}

.admin-mrr-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #5ecac5, #4f8cff 50%, #8b5cf6);
  border-radius: 999px;
  transition: width 600ms cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 12px rgba(94, 202, 197, 0.5);
}

.admin-card-note {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--admin-text-muted);
}

.admin-mrr-substats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--admin-card-border);
}

.admin-stat-label {
  margin: 0;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--admin-text-faint);
}
.admin-stat-value {
  margin: 4px 0 2px;
  font-size: 17px;
  font-weight: 700;
  color: var(--admin-text);
  font-variant-numeric: tabular-nums;
}
.admin-stat-note {
  margin: 0;
  font-size: 11px;
  color: var(--admin-text-faint);
}

/* Status donut */
.admin-status-card {
  display: flex;
  flex-direction: column;
}

.admin-donut-wrap {
  display: flex;
  justify-content: center;
  margin: 8px 0 12px;
}

.admin-donut {
  width: 140px;
  height: 140px;
  filter: drop-shadow(0 4px 14px rgba(94, 202, 197, 0.2));
}

.admin-donut-total {
  font-size: 18px;
  font-weight: 800;
  fill: var(--admin-text);
}

.admin-donut-sub {
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  fill: var(--admin-text-muted);
  text-transform: uppercase;
}

.admin-status-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-status-legend li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--admin-text);
}

.admin-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.admin-status-name {
  flex: 1;
  font-weight: 600;
}

.admin-status-count {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--admin-text-muted);
}

/* Insights */
.admin-insights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
}

.admin-insight {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--admin-card-border);
}

.admin-insight-ok {
  background: rgba(94, 202, 197, 0.08);
  border-color: rgba(94, 202, 197, 0.22);
}
.admin-insight-warn {
  background: rgba(255, 122, 122, 0.07);
  border-color: rgba(255, 122, 122, 0.22);
}
.admin-insight-growth {
  background: rgba(79, 140, 255, 0.07);
  border-color: rgba(79, 140, 255, 0.22);
}

.admin-insight-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}

.admin-insight-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--admin-text);
}

.admin-insight-body {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--admin-text-muted);
}

/* Events feed */
.admin-events {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.admin-events::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 8px;
  width: 1px;
  background: linear-gradient(180deg,
    transparent, var(--admin-card-border), transparent);
}

.admin-event {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 10px 0;
  position: relative;
}

.admin-event-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #5ecac5;
  margin-top: 6px;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(10, 16, 24, 0.5), 0 0 10px currentColor;
  position: relative;
  z-index: 1;
}

.admin-event-ok .admin-event-dot { background: #5ecac5; color: #5ecac5; }
.admin-event-warn .admin-event-dot { background: #ff7a7a; color: #ff7a7a; }
.admin-event-neutral .admin-event-dot { background: #4f8cff; color: #4f8cff; }

.admin-event-body { flex: 1; min-width: 0; }

.admin-event-type {
  margin: 0 0 2px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--admin-text);
}

.admin-event-meta {
  margin: 0;
  font-size: 11.5px;
  color: var(--admin-text-faint);
  font-variant-numeric: tabular-nums;
}

.admin-empty {
  margin: 0;
  font-size: 13px;
  color: var(--admin-text-faint);
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════════════
   Resume Import — paste / file upload modal + preview confirmation
   ═══════════════════════════════════════════════════════════════════════ */
.resume-import-progress {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  z-index: 2147483645;
  pointer-events: none;
  animation: resume-import-progress-in 220ms ease-out;
}
.resume-import-progress-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02) 60%), rgba(14,22,32,0.92);
  backdrop-filter: blur(28px) saturate(1.6);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 22px 60px rgba(0,0,0,0.55), 0 6px 18px rgba(94,202,197,0.18), inset 0 1px 0 rgba(255,255,255,0.12);
  color: #e6f1ff;
  min-width: 260px;
  max-width: min(520px, calc(100vw - 32px));
}
.resume-import-progress-cancel {
  margin-left: auto;
  flex: 0 0 auto;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: #f0f5ff;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 160ms ease, transform 120ms ease, border-color 160ms ease;
  -webkit-tap-highlight-color: transparent;
}
.resume-import-progress-cancel:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.28);
}
.resume-import-progress-cancel:active {
  transform: scale(0.97);
}
.resume-import-progress-spinner {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2.5px solid rgba(94,202,197,0.25);
  border-top-color: rgba(94,202,197,1);
  animation: resume-import-progress-spin 720ms linear infinite;
}
.resume-import-progress-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.resume-import-progress-text strong {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
}
.resume-import-progress-text span {
  font-size: 12.5px;
  color: rgba(230, 241, 255, 0.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 480px;
}
@keyframes resume-import-progress-spin {
  to { transform: rotate(360deg); }
}
@keyframes resume-import-progress-in {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

.resume-import-ai-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  margin: 12px 22px 0;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(94,202,197,0.14), rgba(94,202,197,0.04) 70%);
  border: 1px solid rgba(94,202,197,0.32);
  box-shadow: 0 6px 20px rgba(94,202,197,0.12), inset 0 1px 0 rgba(255,255,255,0.06);
}
.resume-import-ai-banner-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.resume-import-ai-banner-text strong {
  font-size: 13.5px;
  font-weight: 600;
  color: #e6f1ff;
}
.resume-import-ai-banner-text span {
  font-size: 12.5px;
  color: rgba(230, 241, 255, 0.7);
}
.resume-import-ai-banner .button {
  flex: 0 0 auto;
}
@media (max-width: 540px) {
  .resume-import-ai-banner {
    flex-direction: column;
    align-items: stretch;
  }
  .resume-import-ai-banner .button {
    width: 100%;
  }
}

.resume-import-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483640;
  background: rgba(5, 10, 20, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: resume-import-backdrop-in 220ms ease-out;
}

.resume-import-sheet {
  width: 100%;
  max-width: 680px;
  max-height: 88vh;
  background: linear-gradient(145deg, rgba(32, 42, 58, 0.99), rgba(20, 28, 42, 0.99));
  border: 1px solid rgba(94, 202, 197, 0.22);
  border-radius: 24px;
  padding: 24px 24px 18px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: resume-import-sheet-in 360ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.resume-import-sheet-paste {
  max-width: 580px;
}

.resume-import-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.resume-import-head h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.resume-import-source {
  margin: 4px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  font-variant-numeric: tabular-nums;
}

.resume-import-close {
  appearance: none;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  font-family: inherit;
}

.resume-import-close:hover {
  background: rgba(255, 255, 255, 0.14);
}

.resume-import-copy {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
}

.resume-import-textarea {
  width: 100%;
  min-height: 240px;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #ffffff;
  font-size: 14px;
  line-height: 1.5;
  font-family: inherit;
  resize: vertical;
  outline: none;
  transition: border-color 150ms ease;
}

.resume-import-textarea:focus {
  border-color: rgba(94, 202, 197, 0.5);
}

.resume-import-textarea::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.resume-import-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.resume-import-confidence {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.resume-import-confidence-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.resume-import-confidence-pill.is-found {
  background: rgba(94, 202, 197, 0.14);
  color: #5ecac5;
  border: 1px solid rgba(94, 202, 197, 0.3);
}

.resume-import-confidence-pill.is-missing {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.resume-import-preview-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.resume-import-section h3 {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5ecac5;
}

.resume-import-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
}

@media (max-width: 560px) {
  .resume-import-grid {
    grid-template-columns: 1fr;
  }
}

.resume-import-grid > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.resume-import-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.resume-import-value {
  font-size: 14px;
  color: #ffffff;
  word-break: break-all;
}

.resume-import-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
}

.resume-import-entry {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.resume-import-entry strong {
  font-size: 14px;
  color: #ffffff;
}

.resume-import-entry-company {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
}

.resume-import-entry-dates {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.45);
  font-variant-numeric: tabular-nums;
}

.resume-import-bullets {
  margin: 6px 0 0 18px;
  padding: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
}

.resume-import-bullets li {
  margin-bottom: 3px;
}

.resume-import-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.resume-import-skill {
  padding: 4px 10px;
  background: rgba(94, 202, 197, 0.1);
  border: 1px solid rgba(94, 202, 197, 0.22);
  border-radius: 999px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
}

@keyframes resume-import-backdrop-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes resume-import-sheet-in {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-color-scheme: light) {
  .resume-import-sheet {
    background: linear-gradient(145deg, #ffffff, #f7f9fc);
    border-color: rgba(10, 30, 40, 0.15);
  }
  .resume-import-head h2 { color: #0b1a28; }
  .resume-import-copy { color: rgba(20, 40, 55, 0.7); }
  .resume-import-textarea {
    background: #f7f9fc;
    color: #0b1a28;
    border-color: rgba(10, 30, 40, 0.12);
  }
  .resume-import-textarea::placeholder { color: rgba(20, 40, 55, 0.4); }
  .resume-import-close {
    background: rgba(10, 30, 40, 0.06);
    color: #0b1a28;
  }
  .resume-import-source { color: rgba(20, 40, 55, 0.55); }
  .resume-import-label { color: rgba(20, 40, 55, 0.55); }
  .resume-import-value { color: #0b1a28; }
  .resume-import-text { color: rgba(20, 40, 55, 0.8); }
  .resume-import-entry {
    background: rgba(10, 30, 40, 0.03);
    border-color: rgba(10, 30, 40, 0.08);
  }
  .resume-import-entry strong { color: #0b1a28; }
  .resume-import-entry-company { color: rgba(20, 40, 55, 0.65); }
  .resume-import-entry-dates { color: rgba(20, 40, 55, 0.5); }
  .resume-import-bullets { color: rgba(20, 40, 55, 0.7); }
  .resume-import-skill {
    background: rgba(94, 202, 197, 0.12);
    border-color: rgba(94, 202, 197, 0.25);
    color: #0b1a28;
  }
  .resume-import-confidence-pill.is-missing {
    background: rgba(10, 30, 40, 0.04);
    color: rgba(20, 40, 55, 0.45);
    border-color: rgba(10, 30, 40, 0.08);
  }
}

/* ════════════════════════════════════════════════════════════════════════════
   JOB-BOARD AI RECRUITER — conversational chat
   ──────────────────────────────────────────────────────────────────────────
   Replaces the old static form with a real conversation. Lives inside the
   AI Recruiter tab of the Job Board card. Bubbles slide in, quick-reply
   chips scale on press, typing dots animate independently.
   ════════════════════════════════════════════════════════════════════════════ */

.jb-recruiter-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 18px 14px;
}

.jb-recruiter-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.jb-recruiter-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(95, 215, 197, 0.85), rgba(80, 180, 230, 0.85));
  color: #0c1417;
  flex-shrink: 0;
  box-shadow: 0 6px 14px -6px rgba(95, 215, 197, 0.55);
}
.jb-recruiter-headline {
  flex: 1;
  display: flex; flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.jb-recruiter-headline strong {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.jb-recruiter-headline span {
  font-size: 12px;
  opacity: 0.62;
  line-height: 1.4;
}
.jb-recruiter-reset {
  appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  color: inherit;
  font-size: 12px;
  transition: background 160ms ease, transform 120ms cubic-bezier(0.23, 1, 0.32, 1);
}
.jb-recruiter-reset:hover { background: rgba(255, 255, 255, 0.10); }
.jb-recruiter-reset:active { transform: scale(0.97); }

/* Thread */
.jb-recruiter-thread {
  display: flex; flex-direction: column;
  gap: 10px;
  min-height: 280px;
  max-height: 520px;
  overflow-y: auto;
  padding: 4px 2px;
  scrollbar-width: thin;
}
.jb-recruiter-thread::-webkit-scrollbar { width: 6px; }
.jb-recruiter-thread::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.10);
  border-radius: 3px;
}

.jb-recruiter-empty {
  display: flex; flex-direction: column;
  gap: 14px;
  padding: 18px 4px 6px;
}
.jb-recruiter-empty-bubble {
  align-self: flex-start;
  max-width: 520px;
  padding: 12px 16px;
  background: rgba(95, 215, 197, 0.08);
  border: 1px solid rgba(95, 215, 197, 0.20);
  border-radius: 16px 16px 16px 4px;
  animation: jbr-fade-in 280ms cubic-bezier(0.23, 1, 0.32, 1);
}
.jb-recruiter-empty-bubble p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}
.jb-recruiter-empty-bubble p + p { margin-top: 6px; }
.jb-recruiter-empty-sub {
  opacity: 0.65;
  font-size: 13px !important;
}

/* Bubble rows */
.jb-recruiter-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  animation: jbr-slide-up 260ms cubic-bezier(0.23, 1, 0.32, 1);
}
.jb-recruiter-row-user { justify-content: flex-end; }
.jb-recruiter-avatar-sm {
  flex-shrink: 0;
  width: 24px; height: 24px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(95, 215, 197, 0.85), rgba(80, 180, 230, 0.85));
  color: #0c1417;
  margin-bottom: 2px;
}
.jb-recruiter-bubble {
  max-width: min(80%, 520px);
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.jb-recruiter-bubble p { margin: 0; }
.jb-recruiter-bubble p + p { margin-top: 6px; }
.jb-recruiter-row-assistant .jb-recruiter-bubble {
  background: rgba(95, 215, 197, 0.06);
  border-color: rgba(95, 215, 197, 0.18);
  border-radius: 16px 16px 16px 4px;
}
.jb-recruiter-row-user .jb-recruiter-bubble {
  background: linear-gradient(135deg, rgba(95, 215, 197, 0.20), rgba(80, 180, 230, 0.18));
  border-color: rgba(95, 215, 197, 0.30);
  border-radius: 16px 16px 4px 16px;
}

/* Typing indicator */
.jb-recruiter-typing {
  padding: 14px 16px !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.jb-recruiter-typing span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(95, 215, 197, 0.7);
  animation: jbr-dot-bounce 1.1s infinite ease-in-out both;
}
.jb-recruiter-typing span:nth-child(2) { animation-delay: 0.15s; }
.jb-recruiter-typing span:nth-child(3) { animation-delay: 0.30s; }

/* Quick-reply CARDS — vertical layout with description (Claude Code style).
   Replaces the old horizontal chip pattern; the chip styles are kept below
   as a fallback in case any caller still passes string options. */
.jb-recruiter-cards {
  list-style: none;
  margin: 4px 4px 6px 32px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: jbr-fade-in 240ms 80ms cubic-bezier(0.23, 1, 0.32, 1) backwards;
}
.jb-recruiter-cards li { margin: 0; }
.jb-recruiter-card {
  appearance: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  background: rgba(95, 215, 197, 0.04);
  border: 1px solid rgba(95, 215, 197, 0.18);
  border-radius: 12px;
  color: inherit;
  font: inherit;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    transform 120ms cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow 240ms ease;
}
.jb-recruiter-card:hover:not(:disabled) {
  background: rgba(95, 215, 197, 0.10);
  border-color: rgba(95, 215, 197, 0.45);
  box-shadow: 0 4px 14px -8px rgba(95, 215, 197, 0.45);
}
.jb-recruiter-card:active:not(:disabled) { transform: scale(0.985); }
.jb-recruiter-card:disabled { opacity: 0.5; cursor: not-allowed; }
.jb-recruiter-card-label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: inherit;
}
.jb-recruiter-card-desc {
  font-size: 12.5px;
  line-height: 1.45;
  opacity: 0.68;
  font-weight: 400;
}

/* "Or type your own answer ↓" hint below cards */
.jb-recruiter-or-hint {
  margin: 4px 4px 4px 32px;
  font-size: 12px;
  opacity: 0.55;
  font-style: italic;
}

/* Legacy chip styling kept for backwards compatibility */
.jb-recruiter-quickreplies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 4px 2px 32px;
  animation: jbr-fade-in 240ms 80ms cubic-bezier(0.23, 1, 0.32, 1) backwards;
}
.jb-recruiter-chip {
  appearance: none;
  cursor: pointer;
  padding: 7px 14px;
  background: rgba(95, 215, 197, 0.06);
  border: 1px solid rgba(95, 215, 197, 0.24);
  border-radius: 999px;
  color: inherit;
  font-size: 13px;
  font-weight: 500;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 120ms cubic-bezier(0.23, 1, 0.32, 1),
    color 160ms ease;
}
.jb-recruiter-chip:hover:not(:disabled) {
  background: rgba(95, 215, 197, 0.14);
  border-color: rgba(95, 215, 197, 0.42);
}
.jb-recruiter-chip:active:not(:disabled) { transform: scale(0.97); }
.jb-recruiter-chip:disabled { opacity: 0.5; cursor: not-allowed; }

/* Composer */
.jb-recruiter-composer {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.jb-recruiter-input {
  flex: 1;
  resize: none;
  min-height: 40px;
  max-height: 120px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: inherit;
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
  transition: border-color 160ms ease, background 160ms ease;
}
.jb-recruiter-input:focus {
  outline: none;
  border-color: rgba(95, 215, 197, 0.55);
  background: rgba(0, 0, 0, 0.35);
}
.jb-recruiter-input:disabled { opacity: 0.6; }
.jb-recruiter-send {
  appearance: none;
  cursor: pointer;
  width: 40px; height: 40px;
  flex-shrink: 0;
  border: 0;
  border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(95, 215, 197, 0.95), rgba(80, 180, 230, 0.95));
  color: #0c1417;
  transition:
    transform 120ms cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow 200ms ease,
    opacity 160ms ease;
  box-shadow: 0 6px 16px -6px rgba(95, 215, 197, 0.5);
}
.jb-recruiter-send:hover:not(:disabled) {
  box-shadow: 0 10px 24px -6px rgba(95, 215, 197, 0.7);
}
.jb-recruiter-send:active:not(:disabled) { transform: scale(0.94); }
.jb-recruiter-send:disabled { opacity: 0.4; cursor: not-allowed; }

/* Animations */
@keyframes jbr-slide-up {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes jbr-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes jbr-dot-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40%           { transform: translateY(-4px); opacity: 1; }
}

/* Light theme variants */
@media (prefers-color-scheme: light) {
  .jb-recruiter-bubble {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
  }
  .jb-recruiter-row-assistant .jb-recruiter-bubble {
    background: rgba(20, 130, 110, 0.08);
    border-color: rgba(20, 130, 110, 0.20);
  }
  .jb-recruiter-row-user .jb-recruiter-bubble {
    background: linear-gradient(135deg, rgba(20, 130, 110, 0.16), rgba(40, 110, 160, 0.14));
    border-color: rgba(20, 130, 110, 0.28);
  }
  .jb-recruiter-input { background: rgba(0, 0, 0, 0.04); }
  .jb-recruiter-input:focus { background: rgba(0, 0, 0, 0.06); }
  .jb-recruiter-chip { color: #1a1c22; }
  .jb-recruiter-reset { color: #1a1c22; }
  .jb-recruiter-card {
    background: rgba(20, 130, 110, 0.06);
    border-color: rgba(20, 130, 110, 0.20);
    color: #1a1c22;
  }
  .jb-recruiter-card:hover:not(:disabled) {
    background: rgba(20, 130, 110, 0.12);
    border-color: rgba(20, 130, 110, 0.42);
  }
  .jb-recruiter-card-desc { opacity: 0.62; }
  .jb-recruiter-or-hint { opacity: 0.5; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .jb-recruiter-row,
  .jb-recruiter-empty-bubble,
  .jb-recruiter-quickreplies,
  .jb-recruiter-chip,
  .jb-recruiter-send,
  .jb-recruiter-reset { animation: none !important; transition: none !important; }
  .jb-recruiter-typing span { animation-duration: 0s; opacity: 0.6; }
}

/* ════════════════════════════════════════════════════════════════════════════
   REFYNES SWIPE — /swipe route
   ──────────────────────────────────────────────────────────────────────────
   Design engineering notes:
   • Card stack uses ease-out cubic-bezier for snap-back (no JS spring needed
     for a single property, transform).
   • Press feedback via scale(0.97) on :active.
   • Sheet uses transform-origin: bottom for slide-up that anchors correctly.
   • Custom keyframes are avoided in favor of transitions so swipes can be
     interrupted mid-fling without restarting from zero.
   ════════════════════════════════════════════════════════════════════════════ */

:root {
  --swipe-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --swipe-ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --swipe-tier-accent: linear-gradient(135deg, #6f8bff 0%, #b266ff 50%, #ff5ea8 100%);
}

.swipe-shell {
  min-height: 100vh;
  min-height: 100dvh;
  background: radial-gradient(circle at 20% 0%, rgba(120, 90, 255, 0.10), transparent 50%),
              radial-gradient(circle at 80% 100%, rgba(60, 180, 255, 0.08), transparent 50%),
              var(--bg, #0d0e12);
  color: var(--fg, #f3f3f5);
  display: flex;
  flex-direction: column;
}

.swipe-topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px;
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  background: color-mix(in srgb, var(--bg, #0d0e12) 75%, transparent);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.swipe-tabs {
  display: inline-flex; gap: 4px; padding: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
}
.swipe-tab {
  appearance: none; border: 0; cursor: pointer;
  padding: 8px 16px; border-radius: 999px;
  background: transparent; color: rgba(255, 255, 255, 0.6);
  font-weight: 500; font-size: 13px;
  transition: background 160ms var(--swipe-ease-out), color 160ms var(--swipe-ease-out), transform 120ms var(--swipe-ease-out);
}
.swipe-tab:active { transform: scale(0.97); }
.swipe-tab.active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--fg, #fff);
}
.swipe-topbar-right { display: flex; gap: 8px; align-items: center; }

/* ── Quota chip ─────────────────────────────────────────────────────────── */
.swipe-quota-chip {
  appearance: none; border: 0;
  display: flex; align-items: center; gap: 12px;
  margin: 18px auto 0;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: inherit; font-size: 13px;
  cursor: pointer;
  transition: background 160ms var(--swipe-ease-out), transform 120ms var(--swipe-ease-out), border-color 160ms ease;
}
.swipe-quota-chip:hover { background: rgba(255, 255, 255, 0.10); border-color: rgba(255, 255, 255, 0.16); }
.swipe-quota-chip:active { transform: scale(0.97); }
.swipe-quota-tier {
  font-weight: 600;
  background: var(--swipe-tier-accent);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.swipe-quota-progress {
  position: relative; display: inline-block;
  width: 70px; height: 4px;
  background: rgba(255, 255, 255, 0.10); border-radius: 4px; overflow: hidden;
}
.swipe-quota-progress > span {
  display: block; height: 100%;
  background: var(--swipe-tier-accent);
  transition: width 400ms var(--swipe-ease-out);
}
.swipe-quota-cycle { opacity: 0.55; font-size: 12px; }

/* ── Main + deck ────────────────────────────────────────────────────────── */
.swipe-main {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; padding: 18px 22px 60px;
  max-width: 540px; width: 100%; margin: 0 auto;
}

.swipe-deck-wrap { width: 100%; }
.swipe-deck-prompt {
  appearance: none; border: 0;
  display: block; width: 100%;
  padding: 12px 16px; margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(255, 200, 120, 0.18), rgba(255, 120, 180, 0.18));
  border: 1px solid rgba(255, 180, 120, 0.30);
  border-radius: 14px;
  color: inherit; font-weight: 500; cursor: pointer; text-align: left;
  transition: transform 160ms var(--swipe-ease-out), background 160ms ease;
}
.swipe-deck-prompt:hover { background: linear-gradient(135deg, rgba(255, 200, 120, 0.24), rgba(255, 120, 180, 0.24)); }
.swipe-deck-prompt:active { transform: scale(0.98); }

.swipe-deck {
  position: relative;
  width: 100%; height: 560px;
  margin: 18px auto 0;
  touch-action: none; user-select: none;
  /* Cards carry inline z-index for stack order (100 - depth). isolate traps
     those values INSIDE the deck — without it the top card (z:100) floated
     above the paywall sheet backdrop (z:60) and the sticky topbar (z:30). */
  isolation: isolate;
}

.swipe-card {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.02) 100%),
              rgba(20, 22, 28, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 24px;
  display: flex; flex-direction: column; gap: 14px;
  overflow: hidden;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.6), 0 8px 24px -8px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  will-change: transform, opacity;
  transform-origin: center bottom;
}

.swipe-card-overlay {
  position: absolute; top: 28px;
  padding: 6px 12px;
  border-radius: 8px; border: 2px solid currentColor;
  font-weight: 800; font-size: 22px; letter-spacing: 0.08em;
  pointer-events: none;
  transition: opacity 80ms linear;
  will-change: opacity;
}
.swipe-card-overlay-left  { left: 24px;  color: #ff6e80; transform: rotate(-12deg); }
.swipe-card-overlay-right { right: 24px; color: #43e8b3; transform: rotate( 12deg); }
.swipe-card-overlay-up    { top: 24px; left: 50%; transform: translateX(-50%); color: #ffd34d; border: 0; font-size: 32px; }

.swipe-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.swipe-card-company { display: flex; flex-direction: column; gap: 4px; }
.swipe-card-company-name { font-weight: 600; font-size: 14px; opacity: 0.75; }
.swipe-card-pill {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  background: rgba(80, 220, 180, 0.20); color: #6fe4be; font-size: 11px;
  width: fit-content; font-weight: 600;
}
.swipe-card-location { font-size: 12px; opacity: 0.55; }

.swipe-card-score {
  flex: 0 0 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; font-size: 20px;
  background: conic-gradient(from 180deg, #6f8bff, #b266ff, #ff5ea8, #ffd34d, #43e8b3, #6f8bff);
  color: #fff;
  position: relative;
}
.swipe-card-score::before {
  content: ""; position: absolute; inset: 4px;
  border-radius: 50%; background: rgba(20, 22, 28, 0.92);
  z-index: 0;
}
.swipe-card-score > * { position: relative; z-index: 1; }
.swipe-card-score { line-height: 1; grid-auto-rows: min-content; align-content: center; }
.swipe-card-score-value { font-size: 17px; font-weight: 700; }
.swipe-card-score-label {
  font-size: 7.5px; font-weight: 600;
  letter-spacing: 0.09em; text-transform: uppercase;
  opacity: 0.65; margin-top: 2px;
}

.swipe-card-role  { font-size: 26px; font-weight: 700; margin: 0; line-height: 1.15; }
.swipe-card-salary { font-size: 14px; opacity: 0.85; font-variant-numeric: tabular-nums; }
.swipe-card-description { font-size: 14px; line-height: 1.55; opacity: 0.78; flex: 1; overflow: hidden; }
.swipe-card-requirements { font-size: 13px; opacity: 0.7; padding-left: 18px; margin: 0; }
.swipe-card-requirements li { margin-bottom: 4px; }

.swipe-card-footer { display: flex; justify-content: space-between; font-size: 12px; opacity: 0.5; }

/* depth styling — second + third cards behind the top one */
.swipe-card-depth-1 { filter: brightness(0.95); }
.swipe-card-depth-2 { filter: brightness(0.88); }

/* ── Action buttons ─────────────────────────────────────────────────────
   Hierarchy: Apply (right) is the money action — filled brand green,
   largest. Pass/Super are smoked-glass secondaries with an always-on
   (not hover-only) color identity. Depth comes from a 1px inner top
   highlight + a tinted ambient shadow — never a neon glow. */
.swipe-deck-actions {
  display: flex; justify-content: center; align-items: flex-end; gap: 24px;
  margin-top: 24px;
}
.swipe-action-slot {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.swipe-action-label {
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.09em; text-transform: uppercase;
  opacity: 0.45;
  transition: opacity 180ms ease;
}
.swipe-action-slot:hover .swipe-action-label { opacity: 0.85; }

.swipe-action {
  appearance: none; cursor: pointer;
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid transparent;
  transition: transform 160ms var(--swipe-ease-out), background 180ms ease,
              border-color 180ms ease, box-shadow 220ms ease, color 180ms ease,
              filter 180ms ease;
  will-change: transform;
}
.swipe-action:hover { transform: translateY(-2px); }
.swipe-action:active { transform: translateY(0) scale(0.92); }
.swipe-action:focus-visible { outline: 2px solid rgba(70, 201, 138, 0.65); outline-offset: 3px; }
.swipe-action svg { display: block; }

/* Pass — desaturated rose */
.swipe-action-left {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)), rgba(26, 17, 19, 0.72);
  border-color: rgba(214, 92, 110, 0.30);
  color: #de8492;
  box-shadow: 0 12px 26px -14px rgba(214, 92, 110, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.10);
}
.swipe-action-left:hover {
  border-color: rgba(214, 92, 110, 0.55);
  color: #ec97a4;
  box-shadow: 0 16px 30px -14px rgba(214, 92, 110, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* Super interested — smaller secondary, warm amber */
.swipe-action-up {
  width: 50px; height: 50px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)), rgba(26, 22, 14, 0.72);
  border-color: rgba(219, 168, 62, 0.30);
  color: #dcb257;
  box-shadow: 0 12px 26px -14px rgba(219, 168, 62, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.10);
}
.swipe-action-up:hover {
  border-color: rgba(219, 168, 62, 0.55);
  color: #e8c169;
  box-shadow: 0 16px 30px -14px rgba(219, 168, 62, 0.40), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* Apply — primary: filled Refynes green, largest */
.swipe-action-right {
  width: 68px; height: 68px;
  background: linear-gradient(180deg, #58d89c 0%, #3bb87a 100%);
  border-color: rgba(255, 255, 255, 0.20);
  color: #06231a;
  box-shadow: 0 16px 34px -14px rgba(70, 201, 138, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.30);
}
.swipe-action-right:hover {
  filter: brightness(1.06);
  box-shadow: 0 20px 38px -14px rgba(70, 201, 138, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

/* ── Empty / loading / error states ─────────────────────────────────────── */
.swipe-deck-state {
  width: 100%; min-height: 320px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; opacity: 0.85; text-align: center;
}
.swipe-deck-spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.10);
  border-top-color: rgba(255, 255, 255, 0.55);
  animation: swipe-spin 720ms linear infinite;
}
@keyframes swipe-spin { to { transform: rotate(360deg); } }
.swipe-deck-error { color: #ff6e80; }

/* ── Empty (no auth) ────────────────────────────────────────────────────── */
.swipe-empty {
  margin: 80px auto; max-width: 380px; text-align: center;
  display: flex; flex-direction: column; gap: 14px; align-items: center;
}

/* ── Applications list ──────────────────────────────────────────────────── */
.swipe-applications { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.swipe-applications-header {
  display: flex; justify-content: space-between; align-items: center; padding: 4px 4px 8px;
}
.swipe-application-row {
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  display: flex; flex-direction: column; gap: 10px;
  transition: transform 160ms var(--swipe-ease-out), border-color 160ms ease, background 160ms ease;
}
.swipe-application-row:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}
.swipe-application-main { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.swipe-application-headline { display: flex; flex-direction: column; gap: 2px; }
.swipe-application-headline h3 { margin: 0; font-size: 16px; font-weight: 600; }
.swipe-application-company { font-size: 13px; opacity: 0.65; }
.swipe-application-error { font-size: 13px; color: #ff8c9d; margin: 0; }

.swipe-status-badge {
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid currentColor;
}
.swipe-status-neutral { color: rgba(255, 255, 255, 0.65); }
.swipe-status-accent  { color: #b8b3ff; }
.swipe-status-success { color: #43e8b3; }
.swipe-status-warn    { color: #ffd34d; }
.swipe-status-danger  { color: #ff6e80; }

.swipe-application-needs {
  background: rgba(255, 211, 77, 0.08);
  border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px;
}
.swipe-application-question { font-weight: 500; margin: 0; }
.swipe-application-textarea {
  width: 100%; resize: vertical; min-height: 70px;
  background: rgba(0, 0, 0, 0.30);
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 10px; padding: 10px 12px;
  font: inherit;
}
.swipe-application-textarea:focus { outline: none; border-color: rgba(255, 211, 77, 0.55); }

.swipe-application-interview {
  appearance: none; border: 0; cursor: pointer;
  padding: 10px 14px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(67, 232, 179, 0.20), rgba(67, 232, 179, 0.10));
  border: 1px solid rgba(67, 232, 179, 0.35);
  color: #6fe4be; font-weight: 600; font-size: 13px;
  width: fit-content;
  transition: transform 120ms var(--swipe-ease-out), background 160ms ease;
}
.swipe-application-interview:active { transform: scale(0.97); }

/* ── Questionnaire sheet ────────────────────────────────────────────────── */
.swipe-sheet-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: swipe-backdrop-in 220ms var(--swipe-ease-out);
}
@keyframes swipe-backdrop-in { from { opacity: 0; } to { opacity: 1; } }

.swipe-sheet {
  width: 100%; max-width: 560px; max-height: 88vh;
  background: rgba(18, 20, 26, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 22px 22px 0 0;
  display: flex; flex-direction: column;
  transform-origin: bottom center;
  animation: swipe-sheet-in 320ms var(--swipe-ease-out);
}
@keyframes swipe-sheet-in {
  from { transform: translateY(100%); opacity: 0.6; }
  to   { transform: translateY(0%);   opacity: 1; }
}

.swipe-sheet-header {
  padding: 22px 24px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.swipe-sheet-header h2 { margin: 0 0 4px; font-size: 22px; font-weight: 700; }
.swipe-sheet-header p { margin: 0; opacity: 0.65; font-size: 13px; line-height: 1.5; }
.swipe-sheet-note {
  margin: 0 24px; padding: 10px 14px;
  background: rgba(67, 232, 179, 0.10);
  border: 1px solid rgba(67, 232, 179, 0.30);
  color: #6fe4be;
  border-radius: 10px; font-size: 13px;
  margin-top: 12px;
}
.swipe-sheet-body {
  overflow-y: auto; padding: 16px 24px 8px;
  display: flex; flex-direction: column; gap: 24px;
  flex: 1;
}
.swipe-sheet-section h3 { margin: 0 0 10px; font-size: 14px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.7; }
.swipe-sheet-section h3 em { font-style: normal; opacity: 0.55; font-weight: 400; text-transform: none; letter-spacing: 0; }
.swipe-sheet-hint { font-size: 12px; opacity: 0.55; margin: -4px 0 10px; line-height: 1.5; }
.swipe-sheet-hint code { background: rgba(255, 255, 255, 0.08); padding: 1px 4px; border-radius: 4px; font-size: 11px; }

.swipe-field {
  display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px;
}
.swipe-field > span { font-size: 13px; opacity: 0.80; }
.swipe-field input[type="text"],
.swipe-field input[type="number"],
.swipe-field input[type="date"],
.swipe-field select,
.swipe-field textarea {
  background: rgba(0, 0, 0, 0.30);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: inherit;
  border-radius: 10px; padding: 10px 12px;
  font: inherit; width: 100%;
  transition: border-color 160ms ease, background 160ms ease;
}
.swipe-field input:focus, .swipe-field select:focus, .swipe-field textarea:focus {
  outline: none; border-color: rgba(140, 130, 255, 0.55); background: rgba(0, 0, 0, 0.40);
}
.swipe-field-row { flex-direction: row; align-items: center; gap: 10px; }

.swipe-field-segmented {
  display: inline-flex; padding: 4px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  gap: 4px;
  width: fit-content;
}
.swipe-seg {
  appearance: none; border: 0; cursor: pointer;
  padding: 6px 14px; border-radius: 8px;
  background: transparent; color: rgba(255, 255, 255, 0.6);
  font-size: 13px; font-weight: 500;
  transition: background 140ms ease, color 140ms ease, transform 100ms var(--swipe-ease-out);
}
.swipe-seg:active { transform: scale(0.97); }
.swipe-seg.active { background: rgba(255, 255, 255, 0.12); color: var(--fg, #fff); }

.swipe-sheet-error {
  margin: 0 24px; padding: 10px 14px;
  background: rgba(255, 110, 128, 0.10);
  border: 1px solid rgba(255, 110, 128, 0.30);
  color: #ff8c9d;
  border-radius: 10px; font-size: 13px;
}

.swipe-sheet-footer {
  padding: 14px 24px 20px;
  display: flex; justify-content: flex-end; gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── Toast ──────────────────────────────────────────────────────────────── */
.swipe-toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  z-index: 80;
  padding: 12px 18px;
  background: rgba(20, 22, 28, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  font-size: 13px;
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.5);
  animation: swipe-toast-in 240ms var(--swipe-ease-out);
}
@keyframes swipe-toast-in { from { transform: translate(-50%, 8px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* ── Light theme variants ────────────────────────────────────────────────
   IMPORTANT: the app theme is user-controlled via :root[data-theme] (set by
   app.js), NOT the OS setting — a prefers-color-scheme gate here broke every
   light-app/dark-OS combo (and vice versa). Light is the DEFAULT theme, so
   these key off :root:not([data-theme="dark"]), matching the global tokens. */
:root:not([data-theme="dark"]) .swipe-shell {
  background: radial-gradient(circle at 20% 0%, rgba(120, 90, 255, 0.06), transparent 50%),
              radial-gradient(circle at 80% 100%, rgba(60, 180, 255, 0.05), transparent 50%),
              linear-gradient(180deg, #fafafe 0%, #f3f4f9 100%);
  color: #1a1c22;
}
:root:not([data-theme="dark"]) .swipe-topbar {
  background: rgba(255, 255, 255, 0.78);
  border-bottom-color: rgba(0, 0, 0, 0.07);
}
:root:not([data-theme="dark"]) .swipe-tabs { background: rgba(0, 0, 0, 0.05); }
:root:not([data-theme="dark"]) .swipe-tab { color: rgba(26, 28, 34, 0.58); }
:root:not([data-theme="dark"]) .swipe-tab.active {
  background: #ffffff;
  color: #1a1c22;
  box-shadow: 0 1px 4px rgba(20, 30, 50, 0.14);
}
:root:not([data-theme="dark"]) .swipe-quota-chip {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
}
:root:not([data-theme="dark"]) .swipe-quota-chip:hover {
  background: rgba(0, 0, 0, 0.07);
  border-color: rgba(0, 0, 0, 0.14);
}
:root:not([data-theme="dark"]) .swipe-quota-progress { background: rgba(0, 0, 0, 0.10); }
:root:not([data-theme="dark"]) .swipe-card {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(0, 0, 0, 0.07);
  color: #1a1c22;
  box-shadow: 0 24px 60px -24px rgba(20, 30, 50, 0.28), 0 8px 24px -10px rgba(20, 30, 50, 0.12);
}
:root:not([data-theme="dark"]) .swipe-card-score { color: #1a1c22; }
:root:not([data-theme="dark"]) .swipe-card-score::before { background: rgba(255, 255, 255, 0.95); }
:root:not([data-theme="dark"]) .swipe-card-description,
:root:not([data-theme="dark"]) .swipe-card-requirements { color: #43474f; }
:root:not([data-theme="dark"]) .swipe-card-pill {
  background: rgba(16, 150, 105, 0.12);
  color: #0c8f63;
}
:root:not([data-theme="dark"]) .swipe-action-left {
  background: #ffffff;
  border-color: rgba(210, 66, 87, 0.32);
  color: #d24257;
  box-shadow: 0 10px 22px -12px rgba(210, 66, 87, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
:root:not([data-theme="dark"]) .swipe-action-left:hover {
  border-color: rgba(210, 66, 87, 0.55);
  color: #c13148;
  box-shadow: 0 14px 26px -12px rgba(210, 66, 87, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
:root:not([data-theme="dark"]) .swipe-action-up {
  background: #ffffff;
  border-color: rgba(192, 138, 0, 0.32);
  color: #b8860b;
  box-shadow: 0 10px 22px -12px rgba(192, 138, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
:root:not([data-theme="dark"]) .swipe-action-up:hover {
  border-color: rgba(192, 138, 0, 0.55);
  color: #a3760a;
  box-shadow: 0 14px 26px -12px rgba(192, 138, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
:root:not([data-theme="dark"]) .swipe-action-right {
  /* filled brand green works on the light canvas too — softer tinted shadow */
  border-color: rgba(255, 255, 255, 0.40);
  box-shadow: 0 14px 30px -14px rgba(23, 140, 89, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
:root:not([data-theme="dark"]) .swipe-action-label { opacity: 0.55; }
:root:not([data-theme="dark"]) .swipe-deck-spinner {
  border-color: rgba(0, 0, 0, 0.10);
  border-top-color: rgba(0, 0, 0, 0.55);
}
:root:not([data-theme="dark"]) .swipe-deck-error { color: #cf3049; }
:root:not([data-theme="dark"]) .swipe-application-row {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.07);
  color: #1a1c22;
  box-shadow: 0 2px 10px -6px rgba(20, 30, 50, 0.10);
}
:root:not([data-theme="dark"]) .swipe-application-row:hover {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.14);
}
:root:not([data-theme="dark"]) .swipe-application-error { color: #cf3049; }
:root:not([data-theme="dark"]) .swipe-status-neutral { color: rgba(26, 28, 34, 0.60); }
:root:not([data-theme="dark"]) .swipe-status-accent  { color: #5b51d8; }
:root:not([data-theme="dark"]) .swipe-status-success { color: #0c8f63; }
:root:not([data-theme="dark"]) .swipe-status-warn    { color: #a87700; }
:root:not([data-theme="dark"]) .swipe-status-danger  { color: #cf3049; }
:root:not([data-theme="dark"]) .swipe-application-needs { background: rgba(255, 211, 77, 0.18); }
:root:not([data-theme="dark"]) .swipe-application-textarea {
  background: #f5f6fa;
  color: #1a1c22;
  border-color: rgba(0, 0, 0, 0.10);
}
:root:not([data-theme="dark"]) .swipe-application-textarea:focus { border-color: rgba(194, 138, 0, 0.60); }
:root:not([data-theme="dark"]) .swipe-application-interview {
  background: linear-gradient(135deg, rgba(16, 150, 105, 0.14), rgba(16, 150, 105, 0.08));
  border-color: rgba(16, 150, 105, 0.35);
  color: #0c8f63;
}
:root:not([data-theme="dark"]) .swipe-sheet {
  background: rgba(255, 255, 255, 0.97);
  color: #1a1c22;
  border-color: rgba(0, 0, 0, 0.07);
}
:root:not([data-theme="dark"]) .swipe-sheet-header { border-bottom-color: rgba(0, 0, 0, 0.07); }
:root:not([data-theme="dark"]) .swipe-sheet-footer { border-top-color: rgba(0, 0, 0, 0.07); }
:root:not([data-theme="dark"]) .swipe-sheet-note {
  background: rgba(16, 150, 105, 0.10);
  border-color: rgba(16, 150, 105, 0.30);
  color: #0c8f63;
}
:root:not([data-theme="dark"]) .swipe-sheet-hint code { background: rgba(0, 0, 0, 0.06); }
:root:not([data-theme="dark"]) .swipe-field input[type="text"],
:root:not([data-theme="dark"]) .swipe-field input[type="number"],
:root:not([data-theme="dark"]) .swipe-field input[type="date"],
:root:not([data-theme="dark"]) .swipe-field select,
:root:not([data-theme="dark"]) .swipe-field textarea {
  background: #f5f6fa;
  border-color: rgba(0, 0, 0, 0.09);
  color: #1a1c22;
}
:root:not([data-theme="dark"]) .swipe-field input:focus,
:root:not([data-theme="dark"]) .swipe-field select:focus,
:root:not([data-theme="dark"]) .swipe-field textarea:focus {
  border-color: rgba(107, 92, 255, 0.55);
  background: #ffffff;
}
:root:not([data-theme="dark"]) .swipe-field-segmented { background: rgba(0, 0, 0, 0.05); }
:root:not([data-theme="dark"]) .swipe-seg { color: rgba(26, 28, 34, 0.58); }
:root:not([data-theme="dark"]) .swipe-seg.active {
  background: #ffffff;
  color: #1a1c22;
  box-shadow: 0 1px 4px rgba(20, 30, 50, 0.14);
}
:root:not([data-theme="dark"]) .swipe-sheet-error {
  background: rgba(207, 48, 73, 0.08);
  border-color: rgba(207, 48, 73, 0.30);
  color: #c62840;
}
:root:not([data-theme="dark"]) .swipe-toast {
  background: rgba(255, 255, 255, 0.98);
  color: #1a1c22;
  border-color: rgba(0, 0, 0, 0.10);
  box-shadow: 0 8px 24px -6px rgba(20, 30, 50, 0.25);
}

/* ── Embedded mode — AutoApply as a dashboard workspace section ──────────
   The swipe surface renders inside .swipe-panel > .panel-scroll next to the
   sidebar (like Jobs / Coach), so the shell must NOT paint its own full-page
   background or claim the viewport height. */
.swipe-shell-embedded,
:root:not([data-theme="dark"]) .swipe-shell-embedded {
  background: none;
  min-height: 100%;
}
.swipe-panel-scroll {
  padding: 0;
  overflow-x: hidden; /* flung cards travel ±800px — don't grow a scrollbar */
  display: flex;
  flex-direction: column;
}
.swipe-panel-scroll > .swipe-shell-embedded { flex: 1; }

/* Desktop: fit the WHOLE section (header → card → action row) in the
   viewport with no scrolling — the deck flexes into the remaining height
   instead of forcing 560px, and vertical rhythm tightens. */
@media (min-width: 981px) {
  .swipe-panel .panel-scroll { overflow-y: hidden; }
  .swipe-panel-scroll > .swipe-shell-embedded { height: 100%; min-height: 0; }
  .swipe-shell-embedded .swipe-embedded-header { padding-top: 16px; }
  .swipe-shell-embedded .swipe-quota-chip { margin-top: 10px; padding: 8px 14px; }
  .swipe-shell-embedded .swipe-context-bar { margin-top: 8px; }
  .swipe-shell-embedded .swipe-main {
    flex: 1;
    min-height: 0;
    overflow-y: auto; /* safety valve on very short windows + Applications tab */
    padding: 8px 22px 18px;
  }
  .swipe-shell-embedded .swipe-deck-wrap,
  .swipe-shell-embedded .swipe-deck-split,
  .swipe-shell-embedded .swipe-deck-rail {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  .swipe-shell-embedded .swipe-deck-prompt { padding: 9px 14px; margin-bottom: 0; font-size: 13px; }
  .swipe-shell-embedded .swipe-deck {
    flex: 1;
    height: auto;
    min-height: 340px;
    max-height: 560px;
    margin-top: 12px;
  }
  .swipe-shell-embedded .swipe-deck-actions { margin-top: 14px; }
  .swipe-shell-embedded .swipe-action-slot { gap: 6px; }
}

/* ── Phones: Tinder/Bumble-style deck ────────────────────────────────────
   The card IS the screen: chrome compresses to a title row + a scrollable
   chip strip, the deck stretches to fill the viewport, and the action
   buttons float over the card's bottom edge like a dating app. */
@media (max-width: 768px) {
  .swipe-embedded-header { padding: 14px 16px 0; }
  .swipe-embedded-heading h1 { font-size: 19px; }
  .swipe-embedded-heading p { display: none; } /* the deck explains itself */
  .swipe-embedded-header .swipe-tab { padding: 7px 13px; font-size: 12.5px; }

  /* One horizontal chip strip — swipes sideways instead of stacking */
  .swipe-context-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-top: 10px;
    padding: 0 16px;
  }
  .swipe-context-bar::-webkit-scrollbar { display: none; }
  .swipe-context-bar > * { flex: 0 0 auto; }
  /* Preferences lives as the round header button on phones — the chip-strip
     copy would scroll off-screen. */
  .swipe-context-bar .swipe-context-prefs { display: none; }
  .swipe-header-prefs { display: inline-flex; }
  .swipe-context-resume span, .swipe-quota-count { white-space: nowrap; }
  .swipe-quota-chip { gap: 10px; padding: 8px 12px; }
  .swipe-quota-progress { width: 64px; }

  .swipe-main { padding: 8px 12px 30px; }
  body:has(.ios-bottom-nav) .swipe-main,
  .native-shell .swipe-main { padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
  .swipe-deck-prompt-row { margin-bottom: 10px; }
  .swipe-deck-prompt-row .swipe-deck-prompt { padding: 10px 12px; font-size: 12.5px; }

  /* Full-bleed card */
  .swipe-deck {
    height: calc(100dvh - 330px);
    min-height: 430px;
    max-height: 660px;
    margin-top: 8px;
  }
  .swipe-card { padding: 20px; border-radius: 26px; gap: 12px; }
  .swipe-card-role { font-size: 24px; }
  .swipe-card-description { font-size: 13.5px; }
  .swipe-card-meta li { font-size: 13px; }

  /* Floating action row overlapping the card's bottom edge. The deck is
     isolation:isolate, so z-index 1 here paints above every card. */
  .swipe-deck-actions {
    position: relative;
    z-index: 1;
    margin-top: -30px;
    gap: 18px;
    align-items: center;
  }
  .swipe-action-label { display: none; } /* dating-app convention: icon-only */
  .swipe-action-slot { gap: 0; }
  .swipe-action { width: 56px; height: 56px; }
  .swipe-action-up { width: 48px; height: 48px; }
  .swipe-action-right { width: 66px; height: 66px; }
  /* Opaque-ish fills + deeper drop so the buttons read ABOVE the card */
  .swipe-action-left, .swipe-action-up {
    box-shadow: 0 12px 26px -10px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.10);
  }
  .swipe-action-right {
    box-shadow: 0 14px 30px -10px rgba(6, 40, 26, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.30);
  }
  .swipe-actions-hint { margin-top: 12px; }
}

/* ── Landscape split (≥1280px): reading pane LEFT, decision rail RIGHT ───
   The card sheds its description (it lives in the pane, full-length, with
   the match-factor breakdown) and becomes a compact decision ticket. */
.swipe-job-detail { display: none; } /* pane exists only on wide desktop */

@media (min-width: 1280px) {
  .swipe-shell-embedded .swipe-main { max-width: 1160px; }
  .swipe-shell-embedded .swipe-deck-split {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(340px, 1fr);
    gap: 20px;
    align-items: stretch;
    width: 100%;
    margin-top: 12px;
  }
  .swipe-shell-embedded .swipe-deck { margin-top: 0; min-height: 300px; max-height: 470px; }
  /* The pane owns the description — the card becomes a ticket. */
  .swipe-deck-split .swipe-card-description,
  .swipe-deck-split .swipe-card-requirements { display: none; }
  .swipe-deck-split .swipe-card-footer { margin-top: auto; }
  .swipe-deck-split .swipe-card-role { font-size: 22px; }

  .swipe-job-detail {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 0;
    overflow-y: auto;
    padding: 24px 26px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
                rgba(15, 17, 20, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  }
}

.swipe-job-detail-company { font-size: 13px; font-weight: 600; opacity: 0.65; }
.swipe-job-detail-role {
  margin: 4px 0 10px;
  font-size: 24px; font-weight: 700;
  line-height: 1.2; letter-spacing: -0.01em;
}
.swipe-job-detail-meta {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 8px 14px;
  font-size: 13px; opacity: 0.78;
}
.swipe-job-detail h4 {
  margin: 0 0 10px;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  opacity: 0.55;
}
.swipe-job-detail-match ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px 20px;
}
.swipe-job-detail-match li {
  display: grid; grid-template-columns: 78px 1fr 28px;
  align-items: center; gap: 8px;
  font-size: 12px;
}
.swipe-match-factor-label { opacity: 0.65; white-space: nowrap; }
.swipe-match-factor-bar {
  position: relative; height: 4px;
  border-radius: 4px; overflow: hidden;
  background: rgba(255, 255, 255, 0.09);
}
.swipe-match-factor-bar > span {
  display: block; height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, #46c98a, #74e2ab);
}
.swipe-match-factor-value { text-align: right; font-variant-numeric: tabular-nums; opacity: 0.7; }
.swipe-job-detail-body p {
  margin: 0;
  font-size: 14px; line-height: 1.65;
  opacity: 0.82;
  white-space: pre-line;
}
.swipe-job-detail-foot {
  margin-top: auto;
  display: flex; justify-content: space-between;
  padding-top: 6px;
  font-size: 12px; opacity: 0.5;
}
:root:not([data-theme="dark"]) .swipe-job-detail {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(0, 0, 0, 0.07);
  box-shadow: 0 10px 30px -18px rgba(20, 30, 50, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
:root:not([data-theme="dark"]) .swipe-match-factor-bar { background: rgba(0, 0, 0, 0.08); }

/* ── Mockup-parity pass: spark title, single toolbar row, dismissible
   banner, monogram, iconified factors, accent headings, expander, card
   meta rows, desktop cover + pitch, swipe hint ─────────────────────────── */
.swipe-embedded-heading h1 { display: flex; align-items: center; gap: 8px; }
.swipe-title-spark { color: var(--accent, #46c98a); }

.swipe-context-bar .swipe-quota-chip { margin: 0; }

.swipe-deck-prompt-row {
  display: flex; align-items: stretch; gap: 8px;
  margin-bottom: 14px;
}
.swipe-deck-prompt {
  display: flex; align-items: center; gap: 10px;
  flex: 1;
  margin-bottom: 0;
}
.swipe-prompt-icon { flex: 0 0 auto; opacity: 0.85; }
.swipe-deck-prompt-dismiss {
  appearance: none; cursor: pointer;
  flex: 0 0 auto;
  width: 40px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: inherit; opacity: 0.6;
  display: grid; place-items: center;
  transition: opacity 160ms ease, background 160ms ease, transform 120ms var(--swipe-ease-out);
}
.swipe-deck-prompt-dismiss:hover { opacity: 1; background: rgba(255, 255, 255, 0.08); }
.swipe-deck-prompt-dismiss:active { transform: scale(0.94); }

.swipe-job-detail-companyrow { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.swipe-company-monogram {
  width: 38px; height: 38px;
  border-radius: 11px;
  display: grid; place-items: center;
  font-size: 17px; font-weight: 700; color: #ffffff;
  background: linear-gradient(135deg, #46c98a 0%, #2f9bb3 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 6px 14px -8px rgba(70, 201, 138, 0.5);
}
.swipe-job-detail h4 { color: var(--accent, #46c98a); opacity: 0.95; }
:root:not([data-theme="dark"]) .swipe-job-detail h4 { color: #0c8f63; }

.swipe-job-detail-match li { grid-template-columns: 15px 78px 1fr 30px; }
.swipe-match-factor-icon { opacity: 0.55; }

.swipe-job-detail-body p.is-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 8;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.swipe-detail-expand {
  appearance: none; background: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 8px; padding: 0;
  font: inherit; font-size: 13px; font-weight: 600;
  color: var(--accent, #46c98a);
  transition: opacity 160ms ease;
}
.swipe-detail-expand:hover { opacity: 0.8; }
:root:not([data-theme="dark"]) .swipe-detail-expand { color: #0c8f63; }

.swipe-card-meta {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 9px;
}
.swipe-card-meta li { display: flex; align-items: center; gap: 9px; font-size: 13.5px; }
.swipe-card-meta li svg { flex: 0 0 auto; opacity: 0.55; color: var(--accent, #46c98a); }
:root:not([data-theme="dark"]) .swipe-card-meta li svg { color: #0c8f63; }

/* Desktop ticket extras — hidden below the split breakpoint */
.swipe-card-cover, .swipe-card-pitch { display: none; }
@media (min-width: 1280px) {
  .swipe-card-cover {
    display: grid; place-items: center;
    flex: 1; min-height: 90px;
    border-radius: 16px;
    background:
      radial-gradient(circle at 25% 20%, rgba(70, 201, 138, 0.22), transparent 55%),
      radial-gradient(circle at 80% 85%, rgba(60, 140, 220, 0.18), transparent 55%),
      rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }
  .swipe-card-cover > span { font-size: 44px; font-weight: 700; opacity: 0.24; letter-spacing: -0.02em; }
  .swipe-card-pitch {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 14px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  }
  .swipe-card-pitch-icon { flex: 0 0 auto; margin-top: 2px; color: var(--accent, #46c98a); }
  .swipe-card-pitch b { display: block; font-size: 13px; font-weight: 600; }
  .swipe-card-pitch p { margin: 2px 0 0; font-size: 12.5px; line-height: 1.5; opacity: 0.72; }
  /* the cover absorbs the flexible space instead of the (removed) description */
  .swipe-deck-split .swipe-card-description { display: none; }
  :root:not([data-theme="dark"]) .swipe-card-cover {
    background:
      radial-gradient(circle at 25% 20%, rgba(70, 201, 138, 0.16), transparent 55%),
      radial-gradient(circle at 80% 85%, rgba(60, 140, 220, 0.12), transparent 55%),
      rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.06);
  }
  :root:not([data-theme="dark"]) .swipe-card-pitch {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.07);
  }
}

.swipe-actions-hint {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 10px;
  font-size: 12px; opacity: 0.45;
}
.swipe-actions-hint svg { color: var(--accent, #46c98a); }

/* ── Header toolbar restyle (mockup crop parity) ─────────────────────────
   Crown-badged tier chip with a remaining-fuel gauge, blue reset date,
   rounded-rectangle chips, left-aligned full-width row on wide desktop,
   and the profile banner as one flat bar with the dismiss inside. */
.swipe-quota-chip { gap: 14px; border-radius: 14px; }
.swipe-quota-tier-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 9px;
  background: rgba(140, 110, 255, 0.16);
  color: #b9a8ff;
  font-weight: 600; font-size: 12.5px;
}
.swipe-quota-progress { width: 110px; height: 6px; }
.swipe-quota-progress > span { background: linear-gradient(90deg, #35d0c0, #46c98a); }
.swipe-quota-cycle { opacity: 1; color: #6aa8ff; }
:root:not([data-theme="dark"]) .swipe-quota-tier-badge { background: rgba(110, 80, 230, 0.12); color: #6a55d8; }
:root:not([data-theme="dark"]) .swipe-quota-cycle { color: #2f6fd0; }
.swipe-context-resume, .swipe-context-prefs { border-radius: 14px; padding: 9px 14px; }

/* (header + toolbar span the full panel at every width — title left,
   tabs right, chips left — no centered max-width cap.) */

.swipe-deck-prompt-row {
  align-items: center;
  gap: 0;
  padding-right: 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 160ms ease, border-color 160ms ease;
}
.swipe-deck-prompt-row:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.13); }
.swipe-deck-prompt-row .swipe-deck-prompt {
  background: none;
  border: 0;
  border-radius: 0;
  padding: 12px 16px;
}
.swipe-deck-prompt-row .swipe-deck-prompt:hover { background: none; }
.swipe-deck-prompt-row .swipe-deck-prompt-dismiss {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: none;
  border: 0;
}
.swipe-prompt-icon { color: var(--accent, #46c98a); }
:root:not([data-theme="dark"]) .swipe-deck-prompt-row {
  background: rgba(0, 0, 0, 0.035);
  border-color: rgba(0, 0, 0, 0.08);
}
:root:not([data-theme="dark"]) .swipe-deck-prompt-row:hover { background: rgba(0, 0, 0, 0.055); }
:root:not([data-theme="dark"]) .swipe-prompt-icon { color: #0c8f63; }

.swipe-embedded-header {
  display: flex;
  align-items: center;
  justify-content: space-between; /* title flush left, tabs flush right */
  gap: 16px;
  flex-wrap: wrap;
  padding: 22px 24px 0;
  width: 100%;
}
.swipe-embedded-heading h1 {
  margin: 0 0 2px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.swipe-embedded-heading p {
  margin: 0;
  font-size: 13px;
  opacity: 0.6;
  line-height: 1.5;
}
/* The embedded tabs sit on the dashboard canvas, not the swipe shell — give
   them the same treatment in both themes as the standalone ones. */
:root:not([data-theme="dark"]) .swipe-embedded-header .swipe-tabs { background: rgba(0, 0, 0, 0.05); }

.swipe-embedded-header-right { display: flex; align-items: center; gap: 10px; }
/* Mobile-only Job Preferences shortcut — hidden on desktop where the
   chip-strip button is always visible. */
.swipe-header-prefs {
  display: none;
  appearance: none; cursor: pointer;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(70, 201, 138, 0.10);
  border: 1px solid rgba(70, 201, 138, 0.30);
  color: #6fe4be;
  transition: transform 120ms var(--swipe-ease-out), background 160ms ease;
}
.swipe-header-prefs:active { transform: scale(0.94); }
:root:not([data-theme="dark"]) .swipe-header-prefs {
  background: rgba(16, 150, 105, 0.10);
  border-color: rgba(16, 150, 105, 0.32);
  color: #0c8f63;
}

/* ── Context bar — which resume is being sent + job preferences entry ───── */
.swipe-context-bar {
  display: flex; align-items: center; justify-content: flex-start;
  gap: 10px; flex-wrap: wrap;
  width: 100%;
  margin: 12px 0 0;
  padding: 0 24px;
  font-size: 12.5px;
}
.swipe-context-resume {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  opacity: 0.92;
}
.swipe-context-resume b { font-weight: 600; }
.swipe-context-resume.is-missing {
  background: rgba(255, 211, 77, 0.10);
  border-color: rgba(255, 211, 77, 0.35);
  color: #ffd34d;
}
.swipe-context-prefs {
  appearance: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px;
  background: rgba(70, 201, 138, 0.10);
  border: 1px solid rgba(70, 201, 138, 0.30);
  border-radius: 999px;
  color: #6fe4be;
  font: inherit; font-size: 12.5px; font-weight: 500;
  transition: transform 120ms var(--swipe-ease-out), background 160ms ease, border-color 160ms ease;
}
.swipe-context-prefs:hover { background: rgba(70, 201, 138, 0.16); border-color: rgba(70, 201, 138, 0.45); }
.swipe-context-prefs:active { transform: scale(0.97); }
:root:not([data-theme="dark"]) .swipe-context-resume {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
}
:root:not([data-theme="dark"]) .swipe-context-resume.is-missing {
  background: rgba(194, 138, 0, 0.10);
  border-color: rgba(194, 138, 0, 0.40);
  color: #a87700;
}
:root:not([data-theme="dark"]) .swipe-context-prefs {
  background: rgba(16, 150, 105, 0.10);
  border-color: rgba(16, 150, 105, 0.32);
  color: #0c8f63;
}
:root:not([data-theme="dark"]) .swipe-context-prefs:hover { background: rgba(16, 150, 105, 0.16); }

/* ── Sheets: bottom sheet on phones, centered dialog on desktop ──────────
   769px (not 768) so this never overlaps the max-width:768 mobile drawer
   block — at exactly 768px the .app-shell drawer corners would win on
   specificity and produce a centered dialog with squared bottom corners. */
@media (min-width: 769px) {
  .swipe-sheet-backdrop {
    align-items: center;
    padding: 32px 24px;
  }
  .swipe-sheet {
    border-radius: 22px;
    max-height: 82vh;
  }
}

/* ── Upgrade sheet (paywall) ─────────────────────────────────────────────── */
.swipe-upgrade-sheet { max-width: 760px; }
.swipe-upgrade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  padding-bottom: 12px;
}

.swipe-upgrade-card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 18px 16px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  transition: transform 200ms var(--swipe-ease-out),
              border-color 200ms ease,
              background 200ms ease,
              box-shadow 220ms ease;
}
.swipe-upgrade-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}
.swipe-upgrade-card.is-recommended {
  background:
    linear-gradient(135deg, rgba(140, 130, 255, 0.10), rgba(255, 110, 180, 0.06)),
    rgba(255, 255, 255, 0.04);
  border-color: rgba(140, 130, 255, 0.45);
  box-shadow: 0 16px 48px -20px rgba(140, 130, 255, 0.45);
}
.swipe-upgrade-card.is-current {
  opacity: 0.85;
  border-color: rgba(67, 232, 179, 0.40);
}

.swipe-upgrade-badge,
.swipe-upgrade-current-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.swipe-upgrade-badge {
  background: var(--swipe-tier-accent);
  color: #fff;
  box-shadow: 0 4px 14px -4px rgba(140, 130, 255, 0.6);
}
.swipe-upgrade-current-badge {
  background: rgba(67, 232, 179, 0.20);
  color: #6fe4be;
  border: 1px solid rgba(67, 232, 179, 0.45);
}

.swipe-upgrade-label {
  margin: 0 0 4px;
  font-size: 16px; font-weight: 700;
  background: var(--swipe-tier-accent);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.swipe-upgrade-price {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.swipe-upgrade-features {
  list-style: none; padding: 0; margin: 0 0 16px;
  display: flex; flex-direction: column; gap: 6px;
  flex: 1;
}
.swipe-upgrade-features li {
  font-size: 13px;
  line-height: 1.4;
  opacity: 0.82;
  position: relative;
  padding-left: 16px;
}
.swipe-upgrade-features li::before {
  content: "•";
  position: absolute;
  left: 4px;
  opacity: 0.55;
}
.swipe-upgrade-cta {
  width: 100%;
  font-size: 13px;
  padding: 10px 14px;
  transition: transform 120ms var(--swipe-ease-out), background 160ms ease;
}
.swipe-upgrade-cta:not(:disabled):active { transform: scale(0.97); }
.swipe-upgrade-cta:disabled { opacity: 0.55; cursor: not-allowed; }

/* Light theme variants — keyed off :root[data-theme] (app-controlled), not
   the OS prefers-color-scheme; see the note on the main swipe light block. */
:root:not([data-theme="dark"]) .swipe-upgrade-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  color: #1a1c22;
  box-shadow: 0 2px 12px -6px rgba(20, 30, 50, 0.10);
}
:root:not([data-theme="dark"]) .swipe-upgrade-card:hover {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.16);
}
:root:not([data-theme="dark"]) .swipe-upgrade-card.is-recommended {
  background: linear-gradient(135deg, rgba(140, 130, 255, 0.08), rgba(255, 110, 180, 0.05)), #ffffff;
  border-color: rgba(140, 130, 255, 0.45);
}
:root:not([data-theme="dark"]) .swipe-upgrade-card.is-current { border-color: rgba(16, 150, 105, 0.45); }
:root:not([data-theme="dark"]) .swipe-upgrade-current-badge {
  background: rgba(16, 150, 105, 0.12);
  color: #0c8f63;
  border-color: rgba(16, 150, 105, 0.40);
}
:root:not([data-theme="dark"]) .swipe-upgrade-features li { opacity: 0.78; }

/* ── Reduced motion ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .swipe-card,
  .swipe-quota-progress > span,
  .swipe-application-row,
  .swipe-application-interview,
  .swipe-action,
  .swipe-tab,
  .swipe-seg,
  .swipe-sheet,
  .swipe-sheet-backdrop,
  .swipe-toast,
  .swipe-deck-prompt,
  .swipe-upgrade-card,
  .swipe-upgrade-cta { animation: none !important; transition: none !important; }
  .swipe-deck-spinner { animation-duration: 0s; opacity: 0.5; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DASHBOARD MOBILE POLISH
   ───────────────────────────────────────────────────────────────────────────
   Layered AFTER all dashboard rules so we tighten without rewriting. Mirrors
   the design-engineering polish from home.html on the actual app surface:

   · Custom easing curves (CSS defaults feel weak on phones — close viewing
     distance amplifies sluggish motion).
   · Tactile press feedback (scale 0.97) — every CTA confirms touch.
   · Refined glass: 1px inner edge highlight + tinted inset shadow on every
     panel, modal, sheet, and card. Simulates real glass catching light.
   · Tighter typography + spacing on phones (< 768) and tiny phones (< 480).
   · 44–48px min tap targets per Apple HIG.
   · Lower-density visuals on phones — fewer orbs, lighter blur, no shimmer
     spam that taxes mobile GPUs.
   ═════════════════════════════════════════════════════════════════════════ */

/* Custom easing tokens — used by the polish rules below. Defined at :root
   so any consumer (dashboard / home / future surfaces) can reuse them. */
:root {
  --ease-out-strong: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out-strong: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
}

/* ── Tactile press feedback — scoped to the app shell so it doesn't leak ─
   transform-only (GPU compositor, no layout/paint) and ≤180ms so the press
   feels weighted but never sluggish. */
.app-shell .button,
.app-shell .button.ghost,
.app-shell .button.icon-only,
.app-shell .workspace-nav-button,
.app-shell .sidebar-profile-launch,
.app-shell .sidebar-collapse-toggle,
.app-shell .topbar .plan-chip,
.app-shell .topbar .download-menu-trigger,
.app-shell .swipe-action,
.app-shell .swipe-tab {
  /* NOTE: library-stack-card is intentionally EXCLUDED — its transform
     belongs to the JS-driven 3D stack positioning. Overriding it from
     CSS smashes the fan-out and ruins the floaty feel. */
  transition:
    transform 160ms var(--ease-out-strong),
    background 200ms ease,
    border-color 200ms ease,
    box-shadow 220ms ease,
    color 200ms ease;
}
.app-shell .button:not(:disabled):active,
.app-shell .button.ghost:not(:disabled):active,
.app-shell .button.icon-only:not(:disabled):active,
.app-shell .workspace-nav-button:not(:disabled):active,
.app-shell .sidebar-profile-launch:not(:disabled):active,
.app-shell .sidebar-collapse-toggle:not(:disabled):active,
.app-shell .topbar .plan-chip:not(:disabled):active,
.app-shell .topbar .download-menu-trigger:not(:disabled):active,
.app-shell .swipe-action:not(:disabled):active,
.app-shell .swipe-tab:not(:disabled):active {
  transform: scale(0.97);
}

/* ── Refined glass — inner edge highlight on every modal / panel / sheet
   so the surface reads as real glass instead of a flat tinted rectangle.
   Layered shadow (inset highlight + outer ambient) is the same trick the
   Apple HIG uses for sheets. */
.app-shell .topbar,
.app-shell .profile-hub-panel,
.app-shell .library-modal,
.app-shell .swipe-sheet,
.app-shell .editor-panel,
.app-shell .preview-panel {
  box-shadow:
    0 24px 60px -28px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
:root[data-theme="light"] .app-shell .topbar,
:root[data-theme="light"] .app-shell .profile-hub-panel,
:root[data-theme="light"] .app-shell .library-modal,
:root[data-theme="light"] .app-shell .swipe-sheet,
:root[data-theme="light"] .app-shell .editor-panel,
:root[data-theme="light"] .app-shell .preview-panel {
  box-shadow:
    0 18px 44px -28px rgba(20, 30, 50, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

/* ── 768px — most phones (portrait) and small tablets ───────────────── */
@media (max-width: 768px) {
  /* Larger min tap targets across the dashboard. 44px is the Apple HIG
     minimum; 48px is Material's. We split the diff. */
  .app-shell .button:not(.button.icon-only) {
    min-height: 44px;
  }
  .app-shell .button.icon-only {
    min-width: 44px;
    min-height: 44px;
  }
  .app-shell .workspace-nav-button {
    min-height: 44px;
  }

  /* Topbar — tighter rhythm, refined glass, safe-area aware. */
  .app-shell .topbar {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
    backdrop-filter: blur(20px) saturate(1.08);
    -webkit-backdrop-filter: blur(20px) saturate(1.08);
  }
  .app-shell .topbar .toolbar { gap: 6px; }
  .app-shell .topbar .plan-chip {
    font-size: 11.5px;
    padding: 5px 9px;
    min-height: 30px;
  }

  /* Workspace sidebar — when shown as a mobile drawer, smoother spring
     easing on slide + heavier backdrop blur for sheet feel. */
  .app-shell .workspace-sidebar {
    transition: transform 320ms var(--ease-drawer);
  }
  .app-shell .workspace-sidebar-nav {
    gap: 4px;
  }
  .app-shell .workspace-nav-button {
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 14px;
  }

  /* Editor + preview panels — tighter padding so content has more room
     on the narrow viewport. The default 18px x 2 sides eats 36px of a
     375px screen, which is a meaningful chunk. */
  .app-shell .panel-scroll {
    padding: 14px;
  }
  .app-shell .editor-panel,
  .app-shell .preview-panel {
    border-radius: 18px;
  }

  /* Modal sheets — refined glass + spring easing on slide-in. The
     `profile-hub-panel` and `library-modal` show as full-height sheets
     on mobile; treat them like iOS bottom sheets. */
  .app-shell .profile-hub-panel,
  .app-shell .library-modal,
  .app-shell .swipe-sheet {
    border-radius: 22px 22px 0 0;
    backdrop-filter: blur(22px) saturate(1.1);
    -webkit-backdrop-filter: blur(22px) saturate(1.1);
    transition: transform 340ms var(--ease-drawer),
                opacity 260ms ease;
  }

  /* Library stack card — slightly tighter on mobile. */
  .app-shell .library-stack-card {
    border-radius: 18px;
  }
}

/* ── 480px — small phones (iPhone SE / mini / Android compact) ────────── */
@media (max-width: 480px) {
  /* Topbar at the smallest sizes — tightest padding, smallest icons. */
  .app-shell .topbar {
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .app-shell .topbar .eyebrow {
    font-size: 10px;
    letter-spacing: 0.1em;
  }
  .app-shell .topbar .plan-chip {
    font-size: 11px;
    padding: 4px 8px;
  }
  .app-shell .topbar .toolbar { gap: 4px; }

  /* Panel padding — every pixel counts on a 320–375px screen. */
  .app-shell .panel-scroll {
    padding: 12px 10px;
  }
  .app-shell .editor-panel,
  .app-shell .preview-panel {
    border-radius: 14px;
  }

  /* Modal sheets — tighter inner padding. */
  .app-shell .profile-hub-panel,
  .app-shell .library-modal,
  .app-shell .swipe-sheet {
    border-radius: 18px 18px 0 0;
  }
}

/* ── Reduced motion — strip every transform/transition added above ──── */
@media (prefers-reduced-motion: reduce) {
  .app-shell .button,
  .app-shell .button.ghost,
  .app-shell .button.icon-only,
  .app-shell .workspace-nav-button,
  .app-shell .sidebar-profile-launch,
  .app-shell .sidebar-collapse-toggle,
  .app-shell .topbar .plan-chip,
  .app-shell .topbar .download-menu-trigger,
  .app-shell .swipe-action,
  .app-shell .swipe-tab,
  .app-shell .workspace-sidebar,
  .app-shell .profile-hub-panel,
  .app-shell .library-modal,
  .app-shell .swipe-sheet {
    transition: none !important;
  }
  .app-shell .button:active,
  .app-shell .button.icon-only:active,
  .app-shell .workspace-nav-button:active {
    transform: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   FEATURE-SURFACE POLISH — AI Tailor · AI Coach · Job Board · Library
   ───────────────────────────────────────────────────────────────────────────
   Design-engineering brief (per /design-taste-frontend, baseline 8/6/4):

   · MOTION_INTENSITY 6  → fluid CSS, custom cubic-bezier, animation-delay
     cascades. Hardware-accelerated (transform + opacity only).
   · VISUAL_DENSITY 4    → daily-app spacing on desktop; tightens at ≤ 768.
   · DESIGN_VARIANCE 8   → asymmetric where possible; strict single-column
     fallback at ≤ 768 per the skill's mobile-override clause.

   Forbidden patterns avoided: pure-black backgrounds, generic circular
   spinners, lila glows, neon outer shadows, font weight as a hierarchy
   crutch, animating `top/left/width/height`.
   ═════════════════════════════════════════════════════════════════════════ */

/* ── Shared shimmer keyframe (skeleton states + perpetual micro-motion) ── */
@keyframes refSkelShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes refStaggerIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Inverted-pendulum bounce on first reveal — used by composer + sheets.
   Keep the overshoot subtle (≤ 4%) so it reads as "settling" not "boing". */
@keyframes refSettleIn {
  0%   { opacity: 0; transform: translateY(14px) scale(0.985); }
  60%  { opacity: 1; transform: translateY(-2px) scale(1.004); }
  100% { opacity: 1; transform: translateY(0)    scale(1); }
}

/* ── 1. AI TAILOR — `.ai-tailor-card`, `.tailor-menu`, `.tailor-menu-trigger`
   Refines the entry card with inner-edge glass, tactile feedback on the
   trigger, and a stagger-cascade for cards inside the tailor panel. */
.app-shell .ai-tailor-card {
  box-shadow:
    0 24px 60px -32px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition:
    transform 220ms var(--ease-out-strong),
    box-shadow 240ms var(--ease-out-strong),
    border-color 200ms ease;
}
.app-shell .ai-tailor-card:hover {
  transform: translateY(-1px);
}
.app-shell .ai-tailor-card:active {
  transform: translateY(0) scale(0.995);
}
:root[data-theme="light"] .app-shell .ai-tailor-card {
  box-shadow:
    0 16px 40px -28px rgba(20, 30, 50, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

/* Tailor processing — skeleton row matching the eventual diff layout.
   Use .ai-tailor-skel as a sibling row inside the card while waiting. */
.app-shell .ai-tailor-skel {
  width: 100%;
  height: 12px;
  border-radius: 7px;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--line) 75%, transparent) 0%,
    color-mix(in srgb, var(--accent) 18%, var(--line)) 50%,
    color-mix(in srgb, var(--line) 75%, transparent) 100%);
  background-size: 200% 100%;
  animation: refSkelShimmer 1.4s linear infinite;
}
.app-shell .ai-tailor-skel + .ai-tailor-skel { margin-top: 10px; }
.app-shell .ai-tailor-skel.is-short { max-width: 64%; }
.app-shell .ai-tailor-skel.is-medium { max-width: 82%; }

/* ── 2. AI COACH — staggered message reveal + refined composer ───────── */
/* Every new message bubble rises in with an 8px translate + opacity fade.
   :nth-child cascade creates a natural conversational rhythm without any
   JavaScript orchestration. CSS-only = no React re-renders. */
.app-shell .aic-row {
  animation: refStaggerIn 360ms var(--ease-out-strong) both;
  animation-delay: calc(var(--row-index, 0) * 40ms);
}
/* Fallback cascade for rows that don't get --row-index set inline.
   Caps at 8 so a long chat doesn't get a 2-second delay on the 50th item. */
.app-shell .aic-row:nth-child(1) { --row-index: 0; }
.app-shell .aic-row:nth-child(2) { --row-index: 1; }
.app-shell .aic-row:nth-child(3) { --row-index: 2; }
.app-shell .aic-row:nth-child(4) { --row-index: 3; }
.app-shell .aic-row:nth-child(5) { --row-index: 4; }
.app-shell .aic-row:nth-child(n + 6) { --row-index: 5; }

/* Refined composer — inner edge highlight + tinted shadow, settles in
   with the iOS-style "land softly" curve. */
.app-shell .aic-composer-card {
  box-shadow:
    0 18px 44px -28px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: refSettleIn 480ms var(--ease-out-strong) 80ms both;
}
:root[data-theme="light"] .app-shell .aic-composer-card {
  box-shadow:
    0 14px 36px -28px rgba(20, 30, 50, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

/* Send button — bigger tactile target with overshoot press */
.app-shell .aic-send {
  transition:
    transform 140ms var(--ease-out-strong),
    background 200ms ease,
    box-shadow 220ms ease;
}
.app-shell .aic-send:not(:disabled):hover {
  transform: translateY(-1px);
}
.app-shell .aic-send:not(:disabled):active {
  transform: translateY(0) scale(0.96);
}

/* Coach "thinking" indicator — three-dot breath, not a generic spinner. */
@keyframes refCoachDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%           { transform: translateY(-3px); opacity: 1; }
}
.app-shell .aic-thinking {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 4px 0;
}
.app-shell .aic-thinking span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
  animation: refCoachDot 1.2s var(--ease-in-out-strong) infinite;
}
.app-shell .aic-thinking span:nth-child(2) { animation-delay: 0.15s; }
.app-shell .aic-thinking span:nth-child(3) { animation-delay: 0.30s; }

/* ── 3. JOB BOARD — `.job-result-item` press feedback + skeletons ────── */
.app-shell .job-result-item {
  transition:
    transform 180ms var(--ease-out-strong),
    border-color 200ms ease,
    background 200ms ease,
    box-shadow 220ms ease;
  /* Subtle inner edge so the card reads as elevated glass, not flat tint */
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
:root[data-theme="light"] .app-shell .job-result-item {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.app-shell .job-result-item:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
}
.app-shell .job-result-item:active {
  transform: translateY(0) scale(0.995);
}

/* Job result list — stagger cascade on first paint */
.app-shell .jobs-results-list > .job-result-item {
  animation: refStaggerIn 380ms var(--ease-out-strong) both;
  animation-delay: calc(var(--row-index, 0) * 35ms);
}
.app-shell .jobs-results-list > .job-result-item:nth-child(1) { --row-index: 0; }
.app-shell .jobs-results-list > .job-result-item:nth-child(2) { --row-index: 1; }
.app-shell .jobs-results-list > .job-result-item:nth-child(3) { --row-index: 2; }
.app-shell .jobs-results-list > .job-result-item:nth-child(4) { --row-index: 3; }
.app-shell .jobs-results-list > .job-result-item:nth-child(5) { --row-index: 4; }
.app-shell .jobs-results-list > .job-result-item:nth-child(6) { --row-index: 5; }
.app-shell .jobs-results-list > .job-result-item:nth-child(7) { --row-index: 6; }
.app-shell .jobs-results-list > .job-result-item:nth-child(n + 8) { --row-index: 7; }

/* Job result skeleton — drop in `.job-result-skel` during fetch.
   Matches the eventual layout: title row + meta row + actions strip. */
.app-shell .job-result-skel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card-subtle-bg);
}
.app-shell .job-result-skel-line {
  height: 12px;
  border-radius: 7px;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--line) 75%, transparent) 0%,
    color-mix(in srgb, var(--accent) 14%, var(--line)) 50%,
    color-mix(in srgb, var(--line) 75%, transparent) 100%);
  background-size: 200% 100%;
  animation: refSkelShimmer 1.4s linear infinite;
}
.app-shell .job-result-skel-line.title  { width: 62%; height: 14px; }
.app-shell .job-result-skel-line.meta   { width: 44%; height: 10px; }
.app-shell .job-result-skel-line.body   { width: 86%; height: 10px; }
.app-shell .job-result-skel-line.body-2 { width: 72%; height: 10px; }

/* ── 4. LIBRARY STACK — dialed-up cute, JS-positioning friendly ─────────
   The stack lives in a 3D space where JS sets transforms on each card
   to fan them out (depth + rotate + translate). Any CSS rule that
   overrides `transform` here will smash the stack flat, so we ONLY
   layer things that DO NOT touch `transform`:
   · A perpetual breath on the active card (scales the SHINE, not the card)
   · A continuously-drifting holographic sheen across the shine layer
   · A soft accent halo behind active cards
   · A subtle rainbow rim on `.is-current`
   · Bumpy press feedback on the delete button only
   ════════════════════════════════════════════════════════════════════ */

/* Skeleton card for the library cold-load (NOT a stack card — used in
   place of the stack while resumes are still being fetched). */
.app-shell .library-stack-skel {
  width: 100%;
  min-height: 220px;
  border-radius: 18px;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--line) 70%, transparent),
    color-mix(in srgb, var(--accent) 12%, var(--line)),
    color-mix(in srgb, var(--line) 70%, transparent));
  background-size: 200% 200%;
  animation: refSkelShimmer 1.6s linear infinite;
  border: 1px solid var(--line);
}

/* Continuous "holographic foil" sheen on the shine layer.
   The shine element is `pointer-events: none` so animating its
   `background-position` cannot break drag/select on the card.
   Background-position is a paint-only property — no layout reflow. */
@keyframes refLibShineDrift {
  0%   { background-position: -120% 0; }
  100% { background-position:  220% 0; }
}
.app-shell .library-stack-card .library-stack-card-shine {
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.22) 0%,
      rgba(255, 255, 255, 0)    35%,
      rgba(255, 255, 255, 0)    65%,
      rgba(255, 255, 255, 0.08) 100%),
    linear-gradient(
      110deg,
      transparent 30%,
      rgba(255, 255, 255, 0.10) 45%,
      rgba(199, 245, 240, 0.18) 50%,
      rgba(255, 255, 255, 0.10) 55%,
      transparent 70%);
  background-size: 100% 100%, 250% 100%;
  background-repeat: no-repeat;
  animation: refLibShineDrift 5.2s linear infinite;
}

/* PUSH UP the active card saturation — original looked vibrant cyan
   but the alpha-stack on `is-active` was reading muted on dark surfaces.
   Layer a richer mint→teal→lavender gradient + extra warm tone at top
   so it reads as candy-bright. */
.app-shell .library-stack-card.is-active {
  background:
    linear-gradient(140deg,
      rgba(140, 230, 220, 0.72) 0%,
      rgba(64, 180, 175, 0.62) 40%,
      rgba(94, 202, 197, 0.58) 60%,
      rgba(167, 139, 250, 0.40) 100%),
    linear-gradient(180deg,
      rgba(255, 235, 200, 0.18),
      transparent 40%);
  border-color: rgba(200, 245, 240, 0.55);
}

/* Active card — gentle "breath" on the SHINE layer (not the card,
   so the JS stack transform is untouched). The shine softly pulses
   like a tiny heartbeat. */
@keyframes refLibBreath {
  0%, 100% { opacity: 0.85; filter: brightness(1)   saturate(1); }
  50%      { opacity: 1.00; filter: brightness(1.10) saturate(1.08); }
}
.app-shell .library-stack-card.is-active .library-stack-card-shine {
  /* Brighter mint glint that drifts diagonally — visible against the
     stronger active background. */
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.30) 0%,
      rgba(255, 255, 255, 0)    35%,
      rgba(255, 255, 255, 0)    65%,
      rgba(255, 255, 255, 0.14) 100%),
    linear-gradient(
      110deg,
      transparent 25%,
      rgba(255, 255, 255, 0.16) 42%,
      rgba(220, 255, 250, 0.32) 50%,
      rgba(255, 255, 255, 0.16) 58%,
      transparent 75%);
  animation:
    refLibShineDrift 4.4s linear infinite,
    refLibBreath 3.6s var(--ease-in-out-strong) infinite;
}

/* Soft outer halo — bleeds OUTSIDE the card with a colored glow that
   pulses on a 4.2s loop. The card has overflow:hidden, so this lives
   on the .library-stack-card itself via box-shadow stack (NOT a child
   pseudo, so it can escape the clipped corners). */
@keyframes refLibHalo {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(220, 255, 250, 0.35),
      0 18px 60px -10px rgba(94, 202, 197, 0.35),
      0 6px 28px rgba(0, 0, 0, 0.45),
      inset 0 1px 0 rgba(255, 255, 255, 0.30),
      inset 0 -1px 0 rgba(255, 255, 255, 0.06);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(220, 255, 250, 0.55),
      0 28px 80px -8px rgba(94, 202, 197, 0.55),
      0 8px 36px rgba(167, 139, 250, 0.20),
      inset 0 1px 0 rgba(255, 255, 255, 0.42),
      inset 0 -1px 0 rgba(255, 255, 255, 0.08);
  }
}
.app-shell .library-stack-card.is-active {
  animation: refLibHalo 4.2s var(--ease-in-out-strong) infinite;
}

/* Internal radial highlight — adds extra dimensional pop inside the
   card without breaking the overflow:hidden bounds. */
@keyframes refLibInnerGlow {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 0.85; }
}
.app-shell .library-stack-card.is-active::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(120% 80% at 30% 15%, rgba(255, 245, 220, 0.32), transparent 55%),
    radial-gradient(140% 90% at 85% 95%, rgba(167, 139, 250, 0.28), transparent 55%);
  animation: refLibInnerGlow 4.2s var(--ease-in-out-strong) infinite;
}

/* ── Avatar: peach→mint gradient on the active card so the initials
   pop against the cyan background instead of receding into it. ── */
.app-shell .library-stack-card.is-active .library-stack-card-avatar {
  background:
    linear-gradient(135deg,
      rgba(255, 220, 190, 0.95),
      rgba(220, 255, 240, 0.90) 60%,
      rgba(199, 245, 240, 0.85));
  border-color: rgba(255, 255, 255, 0.55);
  color: #0e3a3a;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 4px 10px rgba(0, 0, 0, 0.22);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* ── Template chip — candy pill on the active card.
   Brighter background, chunkier corner radius, soft inner highlight. */
.app-shell .library-stack-card.is-active .library-stack-card-template {
  background:
    linear-gradient(180deg,
      rgba(255, 255, 255, 0.42),
      rgba(255, 255, 255, 0.22));
  border-color: rgba(255, 255, 255, 0.55);
  border-radius: 9px;
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.03em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08),
    0 3px 8px rgba(0, 0, 0, 0.22);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}

/* Active footer date — bump contrast so it reads on the bright bg. */
.app-shell .library-stack-card.is-active .library-stack-card-foot {
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}

/* Role + company text on the active card — pure muted teal washed out
   against the brighter active gradient. Push to high-contrast white. */
.app-shell .library-stack-card.is-active .library-stack-card-role {
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.16);
}
.app-shell .library-stack-card.is-active .library-stack-card-company {
  color: rgba(255, 255, 255, 0.78);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.16);
}

/* ── Tiny floating sparkle in the top-right of active cards.
   Pure SVG-as-data-URL on a positioned span (one DOM element per active
   card). Animates a soft float + twinkle without affecting layout. */
@keyframes refLibSparkleTwinkle {
  0%, 100% { transform: translate(0, 0) scale(0.92); opacity: 0.4; }
  40%      { transform: translate(-2px, 1px) scale(1.05); opacity: 1; }
  70%      { transform: translate(1px, -1px) scale(0.96); opacity: 0.7; }
}
.app-shell .library-stack-card.is-active .library-stack-card-inner::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 56px;       /* sits left of the delete button */
  width: 14px;
  height: 14px;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 3l1.5 4.5L18 9l-4.5 1.5L12 15l-1.5-4.5L6 9l4.5-1.5L12 3z'/><path d='M5 17l.7 1.5L7 19l-1.3.5L5 21l-.7-1.5L3 19l1.3-.5L5 17z'/><path d='M19 14l.5 1L21 15.5l-1.5.5L19 17l-.5-1L17 15.5l1.5-.5L19 14z'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
  animation: refLibSparkleTwinkle 2.8s var(--ease-in-out-strong) infinite;
  z-index: 3;
}

/* Current-resume rim — replaces the static ring with a slow rotating
   conic-gradient outline. Reads as a tiny "you're here" beacon. */
@keyframes refLibRimSpin {
  to { transform: rotate(360deg); }
}
.app-shell .library-stack-card.is-current::after {
  border: none;
  background:
    conic-gradient(
      from 0deg,
      rgba(94, 202, 197, 0.85),
      rgba(199, 245, 240, 0.15) 25%,
      rgba(167, 139, 250, 0.75) 50%,
      rgba(199, 245, 240, 0.15) 75%,
      rgba(94, 202, 197, 0.85));
  /* Mask the fill so only the 1.5px ring shows. */
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  padding: 1.5px;
  animation: refLibRimSpin 7s linear infinite;
  box-shadow: 0 0 24px rgba(94, 202, 197, 0.35);
}

/* The delete button: this one is OUTSIDE the 3D stack transform,
   so it CAN have a tactile press. Bumpier than other buttons because
   it's a small target and the visual squish reads as deliberate. */
.app-shell .library-stack-card-delete {
  transition: transform 160ms var(--ease-out-strong),
              background 200ms ease;
}
.app-shell .library-stack-card-delete:active {
  transform: scale(0.88);
}

/* (Template chip styling moved up into the candy-pill block above.) */

/* Reduce-motion: kill the perpetual loops, keep the static look. */
@media (prefers-reduced-motion: reduce) {
  .app-shell .library-stack-card .library-stack-card-shine,
  .app-shell .library-stack-card.is-active .library-stack-card-shine,
  .app-shell .library-stack-card.is-active,
  .app-shell .library-stack-card.is-active::before,
  .app-shell .library-stack-card.is-active .library-stack-card-inner::after,
  .app-shell .library-stack-card.is-current::after {
    animation: none !important;
  }
}

/* ── Mobile tightening — single-column fallback per design-taste skill ── */
@media (max-width: 768px) {
  /* AI Tailor card — tighter on mobile, bigger tap surface */
  .app-shell .ai-tailor-card {
    border-radius: 16px;
    padding: 14px;
  }

  /* Coach composer — anchor to viewport bottom with safe-area inset.
     Composer hovers at thumb-height instead of floating in mid-screen. */
  .app-shell .aic-composer {
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }
  .app-shell .aic-composer-card {
    border-radius: 16px;
  }
  .app-shell .aic-send {
    min-width: 44px;
    min-height: 44px;
  }
  /* Message bubbles use more of the width on phones */
  .app-shell .aic-row-inner { max-width: 92%; }
  .app-shell .aic-bubble { font-size: 14.5px; line-height: 1.55; }

  /* Job result item — denser stack, larger title for thumb scanning */
  .app-shell .job-result-item {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 14px;
    border-radius: 14px;
  }
  .app-shell .job-result-title { font-size: 1rem; }
  .app-shell .job-result-meta  { font-size: 0.82rem; }
  .app-shell .job-result-actions {
    justify-content: flex-start;
    margin-top: 4px;
  }
  .app-shell .job-result-actions .button {
    flex: 1 1 auto;
    min-height: 40px;
    justify-content: center;
  }

  /* Library stack — slightly tighter cards, bigger title block */
  .app-shell .library-stack-card { border-radius: 16px; }
}

@media (max-width: 480px) {
  .app-shell .ai-tailor-card { padding: 12px; border-radius: 14px; }
  .app-shell .job-result-item { padding: 11px 12px; border-radius: 12px; }
  .app-shell .aic-bubble      { font-size: 14px; }
}

/* ── Reduced motion: kill the animations, keep the layouts intact ───── */
@media (prefers-reduced-motion: reduce) {
  .app-shell .aic-row,
  .app-shell .aic-composer-card,
  .app-shell .jobs-results-list > .job-result-item,
  .app-shell .ai-tailor-skel,
  .app-shell .job-result-skel-line,
  .app-shell .library-stack-skel,
  .app-shell .aic-thinking span {
    animation: none !important;
  }
  .app-shell .ai-tailor-card:hover,
  .app-shell .ai-tailor-card:active,
  .app-shell .job-result-item:hover,
  .app-shell .job-result-item:active,
  .app-shell .aic-send:hover,
  .app-shell .aic-send:active {
    transform: none !important;
  }
}

/* ── Standalone /admin route shell ─────────────────────────────────────── */
.admin-route {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.admin-route-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.admin-route-brand {
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}
.admin-route-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 16px;
}
.admin-route-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 60vh;
  color: var(--text-muted);
  text-align: center;
}

/* ============================================================
   DARK GLASS LAYER — near-black base, frosted refraction glass,
   Refynes green accent. Scoped to dark theme only. (v=dark2)
   ============================================================ */

/* Frost the large surfaces so the translucent fills read as glass */
:root[data-theme="dark"] .workspace-sidebar,
:root[data-theme="dark"] .editor-panel,
:root[data-theme="dark"] .preview-panel,
:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .card,
:root[data-theme="dark"] .profile-launch,
:root[data-theme="dark"] .paywall-panel,
:root[data-theme="dark"] .ai-review-panel,
:root[data-theme="dark"] .aic-thread {
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  backdrop-filter: blur(26px) saturate(150%);
}

/* Apple-style floating glass tile: layered depth shadows give real thickness.
   top bright edge + bottom dark edge (the "lip") + hairline ring + contact
   shadow + a soft wide diffusion shadow. Reads as a 3D pane, not a flat box. */
:root[data-theme="dark"] .card,
:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .paywall-panel,
:root[data-theme="dark"] .ai-review-panel,
:root[data-theme="dark"] .profile-launch {
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.14),
    inset 0 26px 50px -38px rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 2px 6px rgba(0, 0, 0, 0.4),
    0 28px 64px -20px rgba(0, 0, 0, 0.8);
}

/* Tactile depth on hover — the tile floats up and the diffusion deepens.
   Scoped to .card so big static panels do not bounce around. */
:root[data-theme="dark"] .card {
  transition: transform 0.32s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.32s cubic-bezier(0.23, 1, 0.32, 1);
  will-change: transform;
}
:root[data-theme="dark"] .card:hover {
  transform: translateY(-3px);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.18),
    inset 0 26px 50px -38px rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.07),
    0 4px 12px rgba(0, 0, 0, 0.42),
    0 44px 90px -24px rgba(0, 0, 0, 0.86);
}
:root[data-theme="dark"] .card:active {
  transform: translateY(-1px) scale(0.995);
}

@media (prefers-reduced-motion: reduce) {
  :root[data-theme="dark"] .card { transition: none; }
  :root[data-theme="dark"] .card:hover { transform: none; }
}

/* Important components keep the Refynes green — make primary actions glow softly */
:root[data-theme="dark"] .button.primary,
:root[data-theme="dark"] .button:not(.ghost):not(.subtle) {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 8px 22px rgba(70, 201, 138, 0.28);
}

/* Active / accented chips and nav reinforce the green identity */
:root[data-theme="dark"] .plan-chip.pro {
  background: rgba(70, 201, 138, 0.14);
  border-color: rgba(70, 201, 138, 0.4);
  color: #74e2ab;
}

/* Paywall trial reassurance line (web only) */
.paywall-trial-note {
  margin: 10px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}

/* ── Best Quality trial visibility ──────────────────────────────── */
/* Floating chip above the AI composer: free users see their remaining
   trial refinements where the action happens, not buried in a menu. */
.ai-trial-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  align-self: center;
  pointer-events: auto;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  line-height: 1.3;
  color: var(--ink);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 8px 24px rgba(0, 0, 0, 0.25);
}
.ai-trial-chip strong {
  color: var(--accent-strong, var(--accent));
  font-weight: 700;
}
.ai-trial-chip .button-icon {
  width: 14px;
  height: 14px;
  color: var(--accent);
  flex-shrink: 0;
}
/* Last-free-refinement heads-up state: amber tint so the wall after the
   next Refyne is expected, not an ambush. Same shape, warmer signal. */
.ai-trial-chip.is-last {
  background: color-mix(in srgb, #f59e0b 16%, transparent);
  border-color: color-mix(in srgb, #f59e0b 55%, transparent);
}
.ai-trial-chip.is-last strong,
.ai-trial-chip.is-last .button-icon {
  color: #fbbf24;
}
@media (max-width: 640px) {
  .ai-trial-chip {
    font-size: 0.72rem;
    padding: 6px 12px;
    max-width: calc(100vw - 48px);
  }
}

/* Trial pill in the Refyne menus: green "N free" gift instead of a lock */
.tailor-pro-pill.trial-left {
  background: var(--accent-soft);
  color: var(--accent-strong, var(--accent));
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
}

/* ── "Cute AI" gradient highlight for the Best Quality trial ────────
   Teal → blue → violet → pink, matching the splash ring's AI palette.
   Animated border via the padding-box/border-box double-background
   trick (same technique as .ai-rainbow-option). */
@keyframes aiTrialGradientShift {
  0% { background-position: 0% 50%, 0% 50%; }
  100% { background-position: 0% 50%, 200% 50%; }
}

.ai-trial-chip {
  border: 1.5px solid transparent;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.92), rgba(248, 252, 251, 0.85)) padding-box,
    linear-gradient(120deg, #46c98a, #59b5fa, #a76cff, #f472b6, #46c98a) border-box;
  background-size: auto, 220% 220%;
  animation: aiTrialGradientShift 4s linear infinite;
}
:root[data-theme="dark"] .ai-trial-chip {
  background:
    linear-gradient(120deg, rgba(20, 23, 25, 0.88), rgba(16, 19, 21, 0.82)) padding-box,
    linear-gradient(120deg, rgba(70, 201, 138, 0.9), rgba(89, 181, 250, 0.85), rgba(167, 108, 255, 0.85), rgba(244, 114, 182, 0.85), rgba(70, 201, 138, 0.9)) border-box;
  background-size: auto, 220% 220%;
}
.ai-trial-chip strong {
  background: linear-gradient(100deg, #2da06e, #4a9be8, #9061e8, #e8559e);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
:root[data-theme="dark"] .ai-trial-chip strong {
  background: linear-gradient(100deg, #74e2ab, #8ec9ff, #c9a4ff, #ff9ecb);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Menu pill: same gradient ring, gradient count text */
.tailor-pro-pill.trial-left {
  border: 1px solid transparent;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.94), rgba(250, 253, 252, 0.9)) padding-box,
    linear-gradient(120deg, #46c98a, #59b5fa, #a76cff, #f472b6) border-box;
  color: #1c7a55;
  font-weight: 700;
}
:root[data-theme="dark"] .tailor-pro-pill.trial-left {
  background:
    linear-gradient(120deg, rgba(22, 25, 27, 0.94), rgba(17, 20, 22, 0.9)) padding-box,
    linear-gradient(120deg, rgba(70, 201, 138, 0.95), rgba(89, 181, 250, 0.9), rgba(167, 108, 255, 0.9), rgba(244, 114, 182, 0.9)) border-box;
  color: #74e2ab;
}

/* Paywall free-column row for the trial: gradient-ringed highlight card */
.plan-feature-list li.trial-feature-highlight {
  border: 1.5px solid transparent;
  border-radius: 12px;
  padding: 8px 10px;
  margin: 2px 0;
  font-weight: 600;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.95), rgba(250, 253, 252, 0.9)) padding-box,
    linear-gradient(120deg, #46c98a, #59b5fa, #a76cff, #f472b6, #46c98a) border-box;
  background-size: auto, 220% 220%;
  animation: aiTrialGradientShift 4s linear infinite;
}
:root[data-theme="dark"] .plan-feature-list li.trial-feature-highlight {
  background:
    linear-gradient(120deg, rgba(26, 29, 31, 0.94), rgba(20, 23, 25, 0.9)) padding-box,
    linear-gradient(120deg, rgba(70, 201, 138, 0.85), rgba(89, 181, 250, 0.8), rgba(167, 108, 255, 0.8), rgba(244, 114, 182, 0.8), rgba(70, 201, 138, 0.85)) border-box;
  background-size: auto, 220% 220%;
}
.plan-feature-list li.trial-feature-highlight .chip-icon {
  color: #a76cff;
}

@media (prefers-reduced-motion: reduce) {
  .ai-trial-chip,
  .plan-feature-list li.trial-feature-highlight {
    animation: none;
  }
}

/* Marketing pricing: gradient highlight for the free Best Quality trial */
.mkt-price-features li.mkt-trial-highlight {
  border: 1.5px solid transparent;
  border-radius: 12px;
  padding: 8px 10px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.95), rgba(250, 253, 252, 0.9)) padding-box,
    linear-gradient(120deg, #46c98a, #59b5fa, #a76cff, #f472b6, #46c98a) border-box;
  background-size: auto, 220% 220%;
  animation: aiTrialGradientShift 4s linear infinite;
}
.mkt-price-features li.mkt-trial-highlight strong {
  background: linear-gradient(100deg, #2da06e, #4a9be8, #9061e8, #e8559e);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
:root[data-theme="dark"] .mkt-price-features li.mkt-trial-highlight {
  background:
    linear-gradient(120deg, rgba(20, 23, 25, 0.92), rgba(16, 19, 21, 0.88)) padding-box,
    linear-gradient(120deg, rgba(70, 201, 138, 0.9), rgba(89, 181, 250, 0.85), rgba(167, 108, 255, 0.85), rgba(244, 114, 182, 0.85), rgba(70, 201, 138, 0.9)) border-box;
  background-size: auto, 220% 220%;
}
:root[data-theme="dark"] .mkt-price-features li.mkt-trial-highlight strong {
  background: linear-gradient(100deg, #74e2ab, #8ec9ff, #c9a4ff, #ff9ecb);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
@media (prefers-reduced-motion: reduce) {
  .mkt-price-features li.mkt-trial-highlight { animation: none; }
}

/* Free "regular Coach" → Pro upsell CTA under a response */
.aic-pro-upsell-cta { margin-top: 10px; }

/* One-time pass options in the web paywall */
.paywall-pass-options {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.paywall-pass-title {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--label);
  text-align: center;
}
.paywall-pass-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.paywall-pass-button .button-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.2;
}
.paywall-pass-length { font-weight: 700; font-size: 0.9rem; }
.paywall-pass-price { font-size: 0.76rem; color: var(--muted); }
.paywall-pass-note {
  margin: 8px 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
}

/* AutoApply (Swipe) sidebar entry — flagship feature gets the AI gradient
   ring so it reads as the headline action, not just another tab */
.swipe-nav-button {
  border: 1.5px solid transparent;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.9), rgba(250, 253, 252, 0.85)) padding-box,
    linear-gradient(120deg, #46c98a, #59b5fa, #a76cff, #f472b6, #46c98a) border-box;
  background-size: auto, 220% 220%;
  animation: aiTrialGradientShift 4s linear infinite;
}
:root[data-theme="dark"] .swipe-nav-button {
  background:
    linear-gradient(120deg, rgba(22, 25, 27, 0.92), rgba(17, 20, 22, 0.88)) padding-box,
    linear-gradient(120deg, rgba(70, 201, 138, 0.9), rgba(89, 181, 250, 0.85), rgba(167, 108, 255, 0.85), rgba(244, 114, 182, 0.85), rgba(70, 201, 138, 0.9)) border-box;
  background-size: auto, 220% 220%;
}
@media (prefers-reduced-motion: reduce) {
  .swipe-nav-button { animation: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
   NATIVE iOS CHROME v2 — centered logo · glass hamburger · left drawer
   · frosted capsule composer.

   Replaces the old layout (logo left, bottom tab bar). Everything here is
   scoped to `.native-shell` / `.ns-*`, so the web app is untouched.

   "ultraThinMaterial" has no web equivalent; the closest faithful mapping
   in a WKWebView is a low-alpha fill + heavy `backdrop-filter` blur with
   saturation boost, which is what the tokens below encode.
   ═══════════════════════════════════════════════════════════════════════ */

.native-shell {
  /* Shared glass tokens so every surface stays visually consistent */
  --ns-glass-bg: rgba(255, 255, 255, 0.08);
  --ns-glass-bg-strong: rgba(255, 255, 255, 0.12);
  --ns-glass-border: rgba(255, 255, 255, 0.16);
  --ns-glass-blur: blur(30px) saturate(1.8);
  --ns-teal: rgba(94, 202, 197, 1);
  --ns-teal-soft: rgba(94, 202, 197, 0.35);
  /* SwiftUI `.spring(response: 0.4, dampingFraction: 0.8)` — slightly
     under-damped, so the curve overshoots a hair before settling. */
  --ns-spring: cubic-bezier(0.28, 1.18, 0.4, 1);
  --ns-spring-dur: 400ms;
}
:root[data-theme="light"] .native-shell {
  --ns-glass-bg: rgba(255, 255, 255, 0.55);
  --ns-glass-bg-strong: rgba(255, 255, 255, 0.72);
  --ns-glass-border: rgba(20, 107, 109, 0.16);
  /* The dark-theme teal washes out to near-invisible on light glass —
     drop to the deeper brand teal the rest of the light theme already uses. */
  --ns-teal: rgba(16, 116, 117, 1);
  --ns-teal-soft: rgba(20, 107, 109, 0.34);
}
:root[data-theme="light"] .ns-drawer-row.is-active {
  background: rgba(20, 107, 109, 0.12);
}
:root[data-theme="light"] .ns-drawer-row-badge { color: #fff; }
:root[data-theme="light"] .ns-drawer-plan {
  background: rgba(20, 107, 109, 0.07);
}

/* ─────────────────────────────────────────────────────────────────────
   1. TOP NAV BAR — hamburger left · logo centered · glass card right
   ───────────────────────────────────────────────────────────────────── */

/* The bar becomes a positioning context so the brand can be centered on the
   bar itself rather than on whatever space the side elements leave over. */
.native-shell .topbar {
  justify-content: flex-start !important;
  gap: 0 !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
}

/* Centered logo. Absolute so it stays dead-center regardless of how wide
   the hamburger and the action card are. */
.native-shell .topbar .brand {
  position: absolute;
  left: 50%;
  top: var(--safe-top);
  bottom: 0;
  transform: translateX(-50%);
  display: flex !important;
  align-items: center;
  justify-content: center;
  grid-template-columns: none !important;
  grid-template-areas: none !important;
  column-gap: 0 !important;
  z-index: 1;
}
.native-shell .topbar .app-logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
}

/* Circular glass hamburger, pinned left */
.ns-hamburger {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  border: 1px solid var(--ns-glass-border);
  background: var(--ns-glass-bg);
  backdrop-filter: var(--ns-glass-blur);
  -webkit-backdrop-filter: var(--ns-glass-blur);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 4px 14px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 160ms ease, background 200ms ease, border-color 200ms ease;
}
.ns-hamburger:active {
  transform: scale(0.94);
  background: var(--ns-glass-bg-strong);
}
.ns-hamburger.is-open {
  background: var(--ns-glass-bg-strong);
  border-color: var(--ns-teal-soft);
}
.ns-hamburger-lines {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 18px;
}
.ns-hamburger-lines > span {
  display: block;
  height: 1.8px;
  width: 100%;
  border-radius: 2px;
  background: #fff;
  transition: transform 220ms var(--ns-spring), opacity 160ms ease;
}
:root[data-theme="light"] .ns-hamburger-lines > span { background: #0d2a32; }
/* Morph into an × while the drawer is open */
.ns-hamburger.is-open .ns-hamburger-lines > span:nth-child(1) { transform: translateY(5.8px) rotate(45deg); }
.ns-hamburger.is-open .ns-hamburger-lines > span:nth-child(2) { opacity: 0; }
.ns-hamburger.is-open .ns-hamburger-lines > span:nth-child(3) { transform: translateY(-5.8px) rotate(-45deg); }

/* Frosted card grouping the top-right actions.
   `display: contents` on web → the wrapper is invisible to layout there. */
.ns-topbar-actions-glass { display: contents; }
.native-shell .ns-topbar-actions-glass {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  position: relative;
  z-index: 2;
  padding: 4px;
  border-radius: 16px;
  border: 1px solid var(--ns-glass-border);
  background: var(--ns-glass-bg);
  backdrop-filter: var(--ns-glass-blur);
  -webkit-backdrop-filter: var(--ns-glass-blur);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 4px 14px rgba(0, 0, 0, 0.26);
}
/* Buttons inside the card lose their own chrome — the card is the surface */
.native-shell .ns-topbar-actions-glass .button.icon-only,
.native-shell .ns-topbar-actions-glass .iosn-download-btn {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  border-radius: 11px !important;
}
.native-shell .ns-topbar-actions-glass .button.icon-only:active,
.native-shell .ns-topbar-actions-glass .iosn-download-btn:active {
  background: rgba(255, 255, 255, 0.14) !important;
  transform: scale(0.95);
}
/* The download popover is anchored to its wrapper — keep it above the card */
.native-shell .ns-topbar-actions-glass .iosn-download-wrap { position: relative; z-index: 3; }

/* ─────────────────────────────────────────────────────────────────────
   2. LEFT DRAWER (replaces the bottom tab bar)
   ───────────────────────────────────────────────────────────────────── */

/* Main content slides 60pt right while the drawer slides in from the left.

   The transform goes on #root, NOT on .app-shell. .app-shell.native-shell is
   the app's scroll container (`height: 100dvh; overflow-y: auto`), and a
   transform on a scroll container turns its `position: fixed` descendants —
   the topbar and the composer — into scroll-following boxes. Anyone who had
   scrolled down would see both jump away the moment the drawer opened.
   #root is a plain, viewport-height, non-scrolling wrapper, so the fixed
   chrome stays pinned and simply travels the 60px with the content.

   The drawer is portaled onto <body>, i.e. outside #root, so it does not
   inherit this shift. */
#root {
  transition: transform var(--ns-spring-dur, 400ms) var(--ns-spring, ease);
}
#root:has(> .app-shell.native-shell.nav-drawer-open) {
  transform: translateX(60px);
}

/* The 60px shift must not become a horizontal scroll */
body.native-shell,
html:has(body.native-shell) {
  overflow-x: hidden;
}

.ns-drawer-root {
  position: fixed;
  inset: 0;
  z-index: 400;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0s linear var(--ns-spring-dur);
}
.ns-drawer-root.is-open {
  pointer-events: auto;
  visibility: visible;
  transition-delay: 0s;
}

.ns-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity var(--ns-spring-dur) ease;
  -webkit-tap-highlight-color: transparent;
}
.ns-drawer-root.is-open .ns-drawer-backdrop { opacity: 1; }

.ns-drawer {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 75%;
  max-width: 340px;
  display: flex;
  overflow: hidden;
  border-radius: 0 26px 26px 0;
  border-right: 1px solid var(--ns-glass-border);
  /* ultraThinMaterial ≈ low-alpha fill over a heavy blur */
  background: rgba(10, 22, 28, 0.62);
  backdrop-filter: blur(34px) saturate(1.9);
  -webkit-backdrop-filter: blur(34px) saturate(1.9);
  box-shadow: 18px 0 60px rgba(0, 0, 0, 0.5);
  transform: translateX(-100%);
  transition: transform var(--ns-spring-dur) var(--ns-spring);
  will-change: transform;
}
:root[data-theme="light"] .ns-drawer {
  background: rgba(250, 252, 251, 0.72);
  box-shadow: 18px 0 50px rgba(10, 40, 50, 0.18);
}
.ns-drawer-root.is-open .ns-drawer { transform: translateX(0); }

/* Ambient teal wash so the glass reads as branded, not grey */
.ns-drawer-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 55% at 92% 0%, rgba(94, 202, 197, 0.26), transparent 62%),
    radial-gradient(ellipse 80% 50% at 0% 100%, rgba(79, 140, 255, 0.16), transparent 60%);
}

.ns-drawer-inner {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: calc(var(--safe-top) + 14px) 0 calc(var(--safe-bottom) + 14px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.ns-drawer-masthead {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 20px 22px;
}
.ns-drawer-badge {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  font-family: "Poppins", sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--ns-teal);
  background: rgba(94, 202, 197, 0.16);
  border: 1px solid var(--ns-teal-soft);
}
.ns-drawer-brand { display: flex; flex-direction: column; line-height: 1.2; }
.ns-drawer-brand-name {
  font-family: "Poppins", sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.ns-drawer-brand-sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}

.ns-drawer-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 12px; }

.ns-drawer-row {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 13px 12px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--text);
  font-family: "Poppins", sans-serif;
  font-size: 16px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 160ms ease, transform 140ms ease;
}
.ns-drawer-row:active { background: rgba(255, 255, 255, 0.1); transform: scale(0.985); }
.ns-drawer-row.is-active {
  background: rgba(94, 202, 197, 0.14);
  color: var(--ns-teal);
  font-weight: 600;
}
.ns-drawer-row-icon {
  width: 24px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ns-drawer-row-label { flex: 1; }
.ns-drawer-row-badge {
  flex: 0 0 auto;
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  color: #04141a;
  background: var(--ns-teal);
}

.ns-drawer-foot { margin-top: auto; padding: 18px 20px 0; }
.ns-drawer-plan {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--ns-glass-border);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.ns-drawer-plan-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ns-teal);
}
.ns-drawer-plan.is-pro { color: var(--ns-teal); }

/* Reclaim the space the bottom tab bar used to occupy. The composer now
   floats just above the home indicator instead of above a 60px nav. */
.app-shell.native-shell {
  padding-bottom: calc(96px + var(--safe-bottom)) !important;
}
.native-shell .mobile-preview-cta {
  bottom: calc(14px + var(--safe-bottom)) !important;
}
/* The old keyboard-open mask painted a 60px black strip over the tab bar
   area. With no tab bar it would sit on top of the composer, so shrink it
   to just the safe-area inset. */
body.keyboard-open.native-shell::after,
body.native-shell.keyboard-open::after {
  height: var(--safe-bottom) !important;
}

/* ─────────────────────────────────────────────────────────────────────
   3. BOTTOM CHAT INPUT — frosted capsule with a teal brand-gradient rim
   ───────────────────────────────────────────────────────────────────── */

/* No tab bar to clear anymore — float just above the home indicator. */
.native-shell .ai-composer-wrap,
body.native-shell .ai-composer-wrap {
  bottom: calc(var(--kb-height, 0px) + var(--safe-bottom) + 14px) !important;
  left: 12px !important;
  right: 12px !important;
}
body.keyboard-open .native-shell .ai-composer-wrap,
body.native-shell.keyboard-open .ai-composer-wrap {
  bottom: calc(var(--kb-height, 0px) + 12px) !important;
}

.native-shell .ai-composer {
  /* Capsule, not a rounded rect */
  border-radius: 999px !important;
  padding: 8px 8px 8px 10px !important;
  height: auto !important;
  min-height: 60px;
  /* ultraThinMaterial: let the content behind actually show through */
  background: rgba(255, 255, 255, 0.07) !important;
  backdrop-filter: blur(34px) saturate(1.9) !important;
  -webkit-backdrop-filter: blur(34px) saturate(1.9) !important;
  border: 1px solid transparent !important;
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.42),
    0 0 34px rgba(94, 202, 197, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
  /* `overflow: hidden` on the base rule would clip the rim below */
  overflow: visible !important;
}
:root[data-theme="light"] .native-shell .ai-composer {
  background: rgba(255, 255, 255, 0.62) !important;
  box-shadow:
    0 18px 40px rgba(15, 32, 38, 0.14),
    0 0 30px rgba(94, 202, 197, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.85) !important;
}

/* Teal brand gradient border. Replaces the web build's spinning rainbow
   conic ring with a static, on-brand rim. */
.native-shell .ai-composer::before {
  content: "" !important;
  position: absolute !important;
  inset: -1px !important;
  border-radius: inherit !important;
  padding: 1.4px !important;
  background: linear-gradient(
    135deg,
    rgba(94, 202, 197, 0.95) 0%,
    rgba(94, 202, 197, 0.35) 38%,
    rgba(255, 255, 255, 0.16) 55%,
    rgba(60, 168, 168, 0.75) 100%
  ) !important;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0) !important;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0) !important;
  -webkit-mask-composite: xor !important;
          mask-composite: exclude !important;
  opacity: 1 !important;
  animation: none !important;   /* no spin — static brand rim */
  pointer-events: none;
  z-index: 0;
}

/* Soft teal bloom under the capsule */
.native-shell .ai-composer::after {
  inset: -26px -18px -26px -18px !important;
  border-radius: 999px !important;
  background: radial-gradient(
    ellipse 70% 130% at 50% 100%,
    rgba(94, 202, 197, 0.5),
    rgba(94, 202, 197, 0.16) 48%,
    transparent 74%
  ) !important;
  filter: blur(22px) saturate(1.2) !important;
  opacity: 0.9 !important;
  animation: none !important;
}

/* Keep the "+ | placeholder | R" structure, sized for the capsule */
.native-shell .ai-composer-plus,
.native-shell .ai-composer-send {
  position: relative;
  z-index: 1;
  width: 42px !important;
  height: 42px !important;
  border-radius: 50% !important;
  flex: 0 0 auto;
}
.native-shell .ai-composer-plus {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid var(--ns-glass-border) !important;
}
.native-shell .ai-composer-input {
  position: relative;
  z-index: 1;
  background: transparent !important;
}

/* ── Resume editor text fields + inline formatting toolbar ─────────────
   The toolbar sits between the field label and its textarea. It stays
   visible (so it is discoverable) but dims until the field is hovered or
   focused, which keeps a long list of experience entries calm.
   Buttons are tabIndex=-1 and cancel pointerdown in JS so they never steal
   focus from the textarea — on iOS that would close the keyboard and drop
   the selection the button is about to format. */
.resume-field {
  position: relative;
}

.resume-field-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  opacity: 0.55;
  transition: opacity 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

.resume-field:hover .resume-field-tools,
.resume-field.is-focused .resume-field-tools {
  opacity: 1;
}

.resume-field-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 30px;
  padding: 0 9px;
  border-radius: 9px;
  border: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
  background: color-mix(in srgb, var(--card) 82%, transparent);
  color: var(--label);
  font-family: "Poppins", sans-serif;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 140ms cubic-bezier(0.23, 1, 0.32, 1),
    background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.resume-field-tool:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--accent);
}

/* Tactile press feedback — the field keeps focus, so this is the only
   signal the user gets that the tool fired. */
.resume-field-tool:active {
  transform: scale(0.94);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.resume-field-tool:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.resume-field-tool.is-bold {
  font-weight: 800;
}

.resume-field-tool.is-dash,
.resume-field-tool.is-newline {
  font-size: 1.05rem;
}

/* Touch targets: keep the row comfortable on phones without letting the
   toolbar crowd out the textarea it belongs to. */
@media (max-width: 768px) {
  .resume-field-tools {
    gap: 6px;
    opacity: 1;
  }

  .resume-field-tool {
    min-width: 38px;
    height: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .resume-field-tools,
  .resume-field-tool {
    transition: none;
  }

  .resume-field-tool:active {
    transform: none;
  }
}

/* The rich bullet/summary editor. It is a contenteditable div (a textarea
   cannot render bold), so it has to reproduce the input styling by hand —
   keep this in sync with the `input, textarea, select` rule above. */
.resume-rich-input {
  margin-top: 6px;
  width: 100%;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
  padding: 11px 13px;
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--input-text);
  background: linear-gradient(180deg, color-mix(in srgb, var(--input-bg) 96%, white 4%), var(--input-bg));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background-color 0.16s ease;
  overflow-y: auto;
  max-height: 40vh;
  /* pre-wrap keeps literal spaces instead of letting HTML collapse them.
     Without it a space typed or pasted at a text-node boundary silently
     disappears ("Hired 3 PAs" + " pasted" -> "Hired 3 PAspasted") and the
     browser starts substituting &nbsp; behind our back. */
  white-space: pre-wrap;
  /* Long unbroken URLs in a bullet must not widen the editor. */
  overflow-wrap: break-word;
  word-break: break-word;
  -webkit-user-select: text;
  user-select: text;
}

.resume-rich-input:hover {
  border-color: color-mix(in srgb, var(--accent) 24%, var(--line));
}

.resume-rich-input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 78%, var(--line));
}

/* Bold inside the editor should read as clearly heavier than body text
   without shifting the line box. */
.resume-rich-input strong,
.resume-rich-input b {
  font-weight: 700;
  color: inherit;
}

/* Placeholder for an empty editor — :empty alone misses the browser's
   "<div><br></div>" filler, so cover that shape too. */
.resume-rich-input:empty::before,
.resume-rich-input:has(> div:only-child > br:only-child)::before {
  content: attr(data-placeholder);
  color: var(--placeholder);
  pointer-events: none;
}
