/* ✦ PatchQuest — Premium Pastel Theme ✦ */

:root {
  --bg:            #ffffff;
  --bg-elevated:   rgba(255, 255, 255, 0.75);
  --bg-muted:      rgba(0, 0, 0, 0.03);
  --bg-glass:      rgba(255, 255, 255, 0.7);
  --border:        rgba(0, 0, 0, 0.06);
  --border-subtle: rgba(0, 0, 0, 0.03);
  --text:          #0a0a0a;
  --text-muted:    #666666;
  --text-dim:      #999999;
  
  --accent:        #7342E2;
  --accent-hover:  #5B33B5;
  --accent-glow:   rgba(115, 66, 226, 0.15);
  --accent-gradient: linear-gradient(135deg, #8A5AFE 0%, #7342E2 100%);
  
  --success:       #00E559;
  --success-glow:  rgba(0, 229, 89, 0.15);
  --warning:       #FF6600;
  --danger:        #FF3333;
  
  --radius:        16px;
  --radius-lg:     32px;
  
  --font-sans:     "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading:  "Space Grotesk", var(--font-sans); 
  --mono:          "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  
  --transition:    0.4s cubic-bezier(0.22, 1, 0.36, 1);
  
  --shadow-sm:     0 4px 20px rgba(0, 0, 0, 0.03);
  --shadow-md:     0 8px 30px rgba(0, 0, 0, 0.04);
  --shadow-lg:     0 20px 40px rgba(0, 0, 0, 0.06);
  
  --line:          rgba(0, 0, 0, 0.06);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  font-weight: 500;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  letter-spacing: -0.04em;
  font-weight: 800;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 2;
  opacity: 0.5;
}

/* Floating Petals container */
#floating-petals {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
}

@keyframes petalDrift {
  0% { opacity: 0; transform: translate(0, 0) rotate(0deg) scale(0.8); }
  15% { opacity: 0.7; }
  50% { opacity: 0.5; transform: translate(40px, -80px) rotate(180deg) scale(1.1); }
  85% { opacity: 0.6; }
  100% { opacity: 0; transform: translate(80px, -160px) rotate(360deg) scale(0.8); }
}

@keyframes scrollHint {
  0%, 100% { opacity: 0.4; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(8px); }
}

@keyframes fadeSlideIn {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes flowDash {
  to {
    stroke-dashoffset: -20;
  }
}

@keyframes floatingNode {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

@keyframes miniWave {
  0% { transform: scaleY(0.4); }
  100% { transform: scaleY(1.2); }
}

/* Decorative sparkles (clean pastel nodes) */
.bg-sparkle {
  position: absolute;
  width: 90px;
  height: 90px;
  pointer-events: none;
  z-index: 2;
  opacity: 0.65;
  color: var(--accent);
}
.bg-sparkle-left {
  left: -40px;
  top: 20%;
}
.bg-sparkle-right {
  right: -40px;
  top: 45%;
  transform: scaleX(-1);
}

@media (max-width: 900px) {
  .bg-sparkle { display: none; }
}

/* ── Layout ─────────────────────────────────────────────────────────── */

.app {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  position: relative;
  z-index: 3;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 45px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
#app-workspace .brand {
  cursor: pointer;
  transition: opacity var(--transition);
}
#app-workspace .brand:hover {
  opacity: 0.8;
}

.logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--text);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: -0.04em;
  flex-shrink: 0;
}

h1 {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tagline {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 1px;
}

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

.btn-settings {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.btn-settings:hover {
  background: var(--bg-muted);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 4px 12px hsla(155, 72%, 46%, 0.1);
  transform: translateY(-1px);
}



/* ── Hero Landing Section ───────────────────────────────────────────── */

.hero-section {
  text-align: center;
  padding: 40px 0 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
}

.hero-tagline {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 18px;
  letter-spacing: 0.02em;
  background: rgba(159, 140, 239, 0.08);
  padding: 6px 18px;
  border-radius: 999px;
}

.hero-title {
  font-family: var(--font-sans);
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 1.12rem;
  color: var(--text-muted);
  max-width: 540px;
  margin-bottom: 32px;
  line-height: 1.6;
}

.btn-scroll {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 12px 34px;
  border-radius: 999px;
  background-color: var(--text);
  color: #fff;
  text-decoration: none;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.btn-scroll:hover {
  transform: translateY(-2px);
  background-color: var(--accent);
  box-shadow: 0 6px 20px rgba(159, 140, 239, 0.25);
}

/* ── Cards ──────────────────────────────────────────────────────────── */

.card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  animation: cardEnter 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 20px 40px rgba(115, 66, 226, 0.1);
}

@keyframes cardEnter {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-muted);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-muted);
  transition: all 0.35s ease;
  flex-shrink: 0;
}

.step-num.active {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.step-num.done {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 4px 12px var(--success-glow);
}

/* ── Forms ──────────────────────────────────────────────────────────── */

label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.input-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

input[type="text"],
input[type="url"],
input[type="password"],
textarea {
  flex: 1;
  min-width: 200px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  padding: 14px 24px;
  font-size: 0.95rem;
  font-family: inherit;
  box-shadow: none;
  transition: all var(--transition);
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  background-color: #FFFFFF;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

textarea {
  border-radius: var(--radius);
  resize: vertical;
  min-height: 80px;
  width: 100%;
}

/* ── Buttons ────────────────────────────────────────────────────────── */

button {
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 11px 24px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  position: relative;
}

button:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

button:active:not(:disabled) { transform: translateY(0) scale(0.98); }
button:disabled { opacity: 0.4; cursor: not-allowed; }

button.primary {
  background: var(--text);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

button.primary:hover:not(:disabled) {
  opacity: 0.9;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  transform: translateY(-3px);
}

button.success {
  background: var(--success);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px var(--success-glow);
}

button.success:hover:not(:disabled) {
  box-shadow: 0 6px 20px rgba(0, 229, 89, 0.3);
  transform: translateY(-3px);
}

button.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
  padding: 8px 14px;
  font-size: 0.85rem;
}

button.ghost:hover:not(:disabled) {
  background: var(--border-subtle);
  color: var(--text);
}

button.voice-btn {
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.2);
  color: var(--accent);
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

button.voice-btn:hover:not(:disabled) {
  background: rgba(139, 92, 246, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(139, 92, 246, 0.15);
}

/* ── Issue preview ──────────────────────────────────────────────────── */

.issue-preview {
  margin-top: 20px;
  padding: 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
  display: none;
  animation: fadeSlideIn 0.3s ease;
  transition: all var(--transition);
}

.issue-preview:hover {
  box-shadow: var(--shadow-sm);
}

.issue-preview.visible { display: block; }

.issue-preview h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.issue-preview .meta {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.issue-preview .body {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-height: 120px;
  overflow: hidden;
  white-space: pre-wrap;
  line-height: 1.6;
}

/* ── Skills list ────────────────────────────────────────────────────── */

.skills-list { list-style: none; margin-top: 20px; }

.skill-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: start;
  padding: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
  transition: all var(--transition);
  animation: fadeSlideIn 0.3s ease both;
}

.skill-item:hover {
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.skill-item.completed {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.04);
}

.skill-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
}

.skill-fields {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.skill-fields input {
  border-radius: 8px;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border-color: var(--border-subtle);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
  transition: all var(--transition);
}

.skill-fields input:focus {
  border-color: var(--accent);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02), 0 0 0 3px var(--accent-glow);
}

.input-with-link {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-link input {
  width: 100%;
  min-width: 0;
  padding-right: 42px; /* Space for the link button */
}

.external-link-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(159, 140, 239, 0.1);
  color: var(--accent) !important;
  display: grid;
  place-items: center;
  text-decoration: none !important;
  font-weight: 700;
  font-size: 1rem;
  transition: all var(--transition);
}

.external-link-btn:hover {
  background: var(--accent);
  color: #fff !important;
  transform: translateY(-50%) scale(1.05);
}

.skill-fields strong {
  font-size: 0.95rem;
  color: var(--text);
}

.skill-fields a {
  color: var(--accent);
  font-size: 0.82rem;
  text-decoration: underline;
  word-break: break-all;
  transition: color var(--transition);
}

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

.skill-rationale {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}

.skill-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

/* ── Progress ───────────────────────────────────────────────────────── */

.progress-wrap { margin: 24px 0; }

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.progress-bar {
  height: 8px;
  background: var(--bg-muted);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent-gradient);
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Outline / PR checklist ─────────────────────────────────────────── */

.outline-box {
  background: var(--bg-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 24px;
  font-size: 0.9rem;
  line-height: 1.7;
  max-height: 420px;
  overflow-y: auto;
  display: none;
}

.outline-box.visible { display: block; animation: fadeSlideIn 0.3s ease; }

.outline-box h2, .outline-box h3 {
  font-family: var(--font-sans);
  margin: 18px 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.outline-box h2:first-child { margin-top: 0; }
.outline-box ul, .outline-box ol { margin: 10px 0 10px 24px; }

.outline-box code {
  font-family: var(--mono);
  background: var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}

.outline-box pre {
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  overflow-x: auto;
  margin: 12px 0;
}

/* ── History List ── */
.history-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.history-item::before {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 4px; height: 100%;
  background: var(--border);
  transition: all var(--transition);
}

.history-item:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
  border-color: rgba(139, 92, 246, 0.2);
}

.history-item:hover::before {
  background: var(--accent-gradient);
}

.history-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  gap: 1rem;
}

.history-item-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  margin: 0;
  line-height: 1.4;
  word-wrap: break-word;
  word-break: break-word;
}

.history-item-state {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.1);
  color: var(--accent);
  white-space: nowrap;
}

.history-item-state.completed {
  background: var(--success-glow);
  color: var(--success);
}

.history-item-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dashed var(--border);
  padding-top: 0.75rem;
  margin-top: 0.5rem;
}

.history-item-meta a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition);
}

.history-item-meta a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}
.outline-box pre code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1.5;
}

.pr-checklist-box {
  background: var(--bg-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 24px;
  font-size: 0.85rem;
  font-family: var(--mono);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 380px;
  overflow-y: auto;
  display: none;
  color: var(--text-muted);
}

.pr-checklist-box.visible { display: block; animation: fadeSlideIn 0.3s ease; }

/* ── Toolbar ────────────────────────────────────────────────────────── */

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* ── Loading overlay ────────────────────────────────────────────────── */

.loading-overlay {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: rgba(107, 206, 143, 0.08);
  border: 1px solid rgba(107, 206, 143, 0.15);
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: var(--success);
  margin-top: 16px;
}

.loading-overlay.visible { display: flex; animation: fadeSlideIn 0.25s ease; }

.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(107, 206, 143, 0.2);
  border-top-color: var(--success);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ──────────────────────────────────────────────────────────── */

.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--text);
  color: var(--bg-elevated);
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
  z-index: 200;
  pointer-events: none;
  box-shadow: var(--shadow-lg);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ── State classes ──────────────────────────────────────────────────── */

.section-locked {
  opacity: 0.35;
  pointer-events: none;
  filter: saturate(0.5);
  transition: opacity 0.4s ease, filter 0.4s ease;
}

.hidden { display: none !important; }

.muted-inline { font-weight: 400; color: var(--text-dim); font-size: 0.85rem; font-family: var(--font-sans); }

.hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.6;
}

/* ── Settings dialog ────────────────────────────────────────────────── */

.settings-dialog {
  border: none;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  color: var(--text);
  padding: 0;
  max-width: 480px;
  width: calc(100% - 40px);
  box-shadow: 0 32px 64px -12px rgba(15, 23, 42, 0.25); /* Much deeper shadow for modals */
  animation: modalEnter 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  overflow: hidden; /* For the top border line */
}

.settings-dialog::before {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 100%; height: 4px;
  background: var(--accent-gradient);
}

.settings-dialog::backdrop {
  background: rgba(15, 23, 42, 0.4); /* Deep slate translucent backdrop */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.settings-dialog .dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.settings-dialog .dialog-header h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0;
  color: var(--text);
}

.settings-dialog .dialog-body {
  padding: 24px;
  max-height: 60vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.settings-dialog .setting-group label {
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

.settings-dialog .setting-group input {
  width: 100%;
  margin-top: 4px;
}

.settings-dialog .setting-hint {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 8px;
  line-height: 1.4;
}

.settings-dialog .btn-close-dialog {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all var(--transition);
  box-shadow: none;
}

.settings-dialog .btn-close-dialog:hover {
  color: var(--text);
  background: var(--bg-muted);
  transform: none;
}

.watch-qr-section {
  text-align: center;
  padding-top: 6px;
}

.watch-qr-section canvas,
.watch-qr-section svg {
  margin: 12px auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.watch-link {
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: underline;
}

.watch-link:hover { color: var(--accent-hover); }

/* ── Voice session overlay ────────────────────────────────────────────── */

.voice-overlay {
  position: fixed;
  inset: 0;
  background: rgba(42, 46, 61, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  place-items: center;
  z-index: 300;
  animation: fadeIn 0.2s ease;
}

.voice-overlay.active { display: grid; }

.voice-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 360px;
  max-width: calc(100% - 40px);
  text-align: center;
  box-shadow: var(--shadow-lg);
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1), max-width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  animation: modalEnter 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.voice-card.sharing-active {
  width: 520px;
}

.voice-screen-container {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: #1e1e24;
  border: 1px solid var(--border-subtle);
  margin-bottom: 20px;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  animation: fadeSlideIn 0.3s ease;
}

.voice-screen-container.hidden {
  display: none !important;
}

#voice-screen-preview {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.voice-skill-name {
  font-family: var(--font-sans);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.voice-status {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 24px;
  min-height: 1.2em;
  transition: color var(--transition);
}

.voice-status.listening { color: var(--accent); font-weight: 700; }
.voice-status.speaking  { color: var(--accent-hover); font-weight: 700; }
.voice-status.error     { color: var(--danger); font-weight: 700; }

.voice-waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 60px;
  margin-bottom: 32px;
}

.voice-waveform .bar {
  width: 5px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
  transition: height 0.1s ease;
  opacity: 0.3;
}

.voice-waveform.active .bar {
  animation: waveform 0.8s ease-in-out infinite alternate;
  opacity: 1;
}

.voice-waveform.active .bar:nth-child(1) { animation-delay: 0s; }
.voice-waveform.active .bar:nth-child(2) { animation-delay: 0.1s; }
.voice-waveform.active .bar:nth-child(3) { animation-delay: 0.2s; }
.voice-waveform.active .bar:nth-child(4) { animation-delay: 0.3s; }
.voice-waveform.active .bar:nth-child(5) { animation-delay: 0.4s; }
.voice-waveform.active .bar:nth-child(6) { animation-delay: 0.5s; }
.voice-waveform.active .bar:nth-child(7) { animation-delay: 0.6s; }
.voice-waveform.active .bar:nth-child(8) { animation-delay: 0.7s; }
.voice-waveform.active .bar:nth-child(9) { animation-delay: 0.6s; }
.voice-waveform.active .bar:nth-child(10) { animation-delay: 0.5s; }
.voice-waveform.active .bar:nth-child(11) { animation-delay: 0.4s; }
.voice-waveform.active .bar:nth-child(12) { animation-delay: 0.3s; }

@keyframes waveform {
  from { height: 8px; }
  to   { height: 44px; }
}

.voice-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.btn-mic {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: #fff;
  font-size: 24px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 16px var(--accent-glow);
  padding: 0;
}

.btn-mic:hover {
  transform: scale(1.06);
  background: var(--accent-hover);
  box-shadow: 0 6px 24px var(--accent-glow);
}

.btn-mic.muted {
  background: var(--bg-muted);
  color: var(--text-muted);
  box-shadow: none;
}

.btn-mic.recording {
  animation: micPulse 1.5s ease-in-out infinite;
}

@keyframes micPulse {
  0%, 100% { box-shadow: 0 4px 16px var(--accent-glow); }
  50%      { box-shadow: 0 4px 28px rgba(159, 140, 239, 0.4); }
}

.btn-screenshare {
  background: rgba(159, 140, 239, 0.08);
  border: 1px solid rgba(159, 140, 239, 0.2);
  color: var(--accent);
  padding: 12px 24px;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 999px;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-screenshare:hover {
  background: rgba(159, 140, 239, 0.15);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.btn-screenshare.sharing {
  background: rgba(107, 206, 143, 0.12);
  border-color: var(--success);
  color: var(--success);
}

.btn-end-session {
  padding: 10px 24px;
  border-radius: 999px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.btn-end-session:hover { border-color: var(--danger); color: var(--danger); }

/* ── Animations ─────────────────────────────────────────────────────── */

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes modalEnter {
  from { opacity: 0; transform: translate(-50%, -40%) scale(0.95); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ── Responsive ─────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .app { padding: 20px 16px 48px; }

  header { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }

  .header-actions { align-self: center; margin-top: 0; }

  .input-row { flex-direction: column; }
  .input-row button { width: 100%; }

  .hero-title { font-size: 2.2rem; }

  .skill-item { grid-template-columns: auto 1fr; }

  .skill-item .skill-actions {
    grid-column: 2;
    flex-direction: row;
    justify-content: flex-end;
  }

  .voice-card { padding: 32px 20px; }
}

/* ── Print (PR checklist) ───────────────────────────────────────────── */

@media print {
  body { background: #fff; color: #111; }
  .card { border: 1px solid #ddd; box-shadow: none; background: #fff; }
  .section-locked { display: none; }
  header, .conn-badge, .toast, .voice-overlay, .settings-dialog, .bg-sparkle, .hero-section, .bg-glow { display: none; }
  .pr-checklist-box { max-height: none; color: #111; border-color: #ddd; }
}

/* ── Dashboard Grid Layout ── */
.dashboard-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: flex-start;
  margin-top: 30px;
  justify-content: center;
}

.dashboard-widgets {
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1 1 320px;
  min-width: 0;
  position: sticky;
  top: 24px;
}

.dashboard-main {
  flex: 2 1 400px;
  min-width: 0;
  width: min(100%, 920px);
  flex-basis: 920px;
}

@media (max-width: 900px) {
  .dashboard-widgets {
    position: static !important;
  }
}

.widget-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  transition: all var(--transition);
}

.widget-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.widget-header h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.status-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  background: rgba(107, 206, 143, 0.12);
  color: var(--success);
}

.status-badge.inactive {
  background: var(--bg-muted);
  color: var(--text-dim);
}

.widget-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 16px;
}

/* Inline Key styling */
.inline-api-key-group label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.api-key-input-row {
  display: flex;
  gap: 8px;
}

.api-key-input-row input {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-muted);
  color: var(--text);
  font-size: 0.85rem;
}

.api-key-input-row button {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.widget-voice-trigger {
  animation: fadeSlideIn 0.3s ease;
}

.widget-voice-trigger .divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 16px 0;
}

.active-skill-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* ── Simulated Watch Widget ── */
.simulated-watch-wrapper {
  display: flex;
  justify-content: center;
  margin: 20px 0 16px;
}

.simulated-watch {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: #161b22;
  border: 8px solid #2d3139;
  position: relative;
  box-shadow: var(--shadow-lg), inset 0 0 10px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.watch-screen-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #0d1117;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 16px 10px 10px;
  position: relative;
  color: #fff;
}

.watch-circle-progress {
  position: relative;
  width: 54px;
  height: 54px;
  margin-bottom: 4px;
  flex-shrink: 0;
}

.watch-progress-svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.watch-ring-bg {
  fill: none;
  stroke: #21262d;
  stroke-width: 5;
}

.watch-ring-fg {
  fill: none;
  stroke: var(--success);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 263.89;
  stroke-dashoffset: 263.89;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.watch-progress-stats {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#watch-widget-pct {
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

#watch-widget-count {
  font-size: 0.5rem;
  opacity: 0.7;
}

.watch-quest-title {
  font-size: 0.62rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  margin-bottom: 4px;
  color: #e6edf3;
}

.watch-checklist {
  width: 100%;
  flex: 1;
  overflow-y: auto;
  padding-right: 2px;
}

.watch-checklist::-webkit-scrollbar {
  width: 2px;
}
.watch-checklist::-webkit-scrollbar-thumb {
  background: #30363d;
  border-radius: 1px;
}

.watch-empty-msg, .watch-empty-state {
  font-size: 0.55rem;
  color: #8b949e;
  text-align: center;
  margin-top: 10px;
  line-height: 1.3;
}

.watch-mini-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 2px;
  border-bottom: 1px solid #21262d;
  cursor: pointer;
  text-align: left;
}

.watch-mini-row.done {
  opacity: 0.5;
}

.watch-mini-check {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid #30363d;
  display: grid;
  place-items: center;
  font-size: 0.45rem;
  color: transparent;
  flex-shrink: 0;
}

.watch-mini-row.done .watch-mini-check {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.watch-mini-name {
  font-size: 0.58rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.watch-physical-crown {
  position: absolute;
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 18px;
  background: #3b3f46;
  border-radius: 0 3px 3px 0;
  box-shadow: 2px 0 4px rgba(0,0,0,0.3);
}

.watch-widget-footer {
  text-align: center;
  margin-top: 8px;
}

.watch-widget-link {
  font-size: 0.78rem;
  color: var(--accent);
  text-decoration: underline;
}

/* ── Landing Page (Nudge-Inspired) ── */

.landing-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  position: relative;
  z-index: 3;
  animation: fadeIn 0.5s ease;
}

.landing-header {
  display: flex;
  align-items: center;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

/* ── Hero ── */
.lp-hero {
  text-align: center;
  padding: 60px 0 80px;
}

.lp-hero-title {
  font-family: var(--font-heading);
  font-size: 4.2rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--text) !important;
  margin-bottom: 24px;
}

.lp-hero-title em {
  font-style: normal;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lp-hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted) !important;
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.lp-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 32px;
  border-radius: 999px;
  background: var(--text);
  color: #ffffff !important;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.lp-cta:hover {
  opacity: 0.9;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.lp-cta:active {
  transform: scale(0.98);
}

/* ── Feature sections ── */
.lp-feature-section {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 56px 48px;
  margin-bottom: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: visible;
  position: relative;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.lp-feature-section:hover {
  transform: translateY(-4px);
  border-color: rgba(144, 97, 249, 0.25);
  box-shadow: var(--shadow-lg);
}

.lp-feature-section--alt {
  direction: rtl;
}
.lp-feature-section--alt > * {
  direction: ltr;
}

.lp-label {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(159, 140, 239, 0.1);
  color: var(--accent);
  margin-bottom: 16px;
}

.lp-feature-title {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text) !important;
  margin-bottom: 16px;
}

.lp-feature-title em {
  font-style: normal;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lp-feature-desc {
  font-size: 1rem;
  color: var(--text-muted) !important;
  line-height: 1.65;
  margin-bottom: 20px;
}

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

.lp-tag {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: transparent;
}

/* ── Feature visual area (floaters) ── */
.lp-feature-visual {
  position: relative;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lp-float-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  position: absolute;
  width: 210px;
  transition: transform 0.3s ease;
}

.lp-float-card:hover {
  transform: translateY(-4px) !important;
}

.lp-float-card strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.lp-float-card p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

.lp-float-label {
  display: inline-block;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.lp-float-label--listening {
  background: rgba(159, 140, 239, 0.12);
  color: var(--accent);
}
.lp-float-label--skill {
  background: rgba(107, 206, 143, 0.12);
  color: var(--success);
}
.lp-float-label--screen {
  background: rgba(107, 150, 206, 0.12);
  color: #5a8fd4;
}
.lp-float-label--quest {
  background: rgba(206, 160, 107, 0.12);
  color: #b08550;
}
.lp-float-label--sync {
  background: rgba(159, 140, 239, 0.12);
  color: var(--accent);
}

/* Voice mentor floaters positions */
.lp-float-1 {
  top: 8px; left: 10px;
  animation: lpFloatA 4s ease-in-out infinite alternate;
}
.lp-float-2 {
  top: 50%; right: 0;
  transform: translateY(-50%);
  animation: lpFloatB 5s ease-in-out infinite alternate;
}
.lp-float-3 {
  bottom: 0; left: 30px;
  animation: lpFloatC 4.5s ease-in-out infinite alternate;
}

/* Watch floaters positions */
.lp-float-w1 {
  top: 10px; right: -30px;
  animation: lpFloatA 4s ease-in-out 0.5s infinite alternate;
}
.lp-float-w2 {
  bottom: 10px; right: -20px;
  animation: lpFloatB 5s ease-in-out 1s infinite alternate;
}

@keyframes lpFloatA {
  from { transform: translateY(0); }
  to   { transform: translateY(-8px); }
}
@keyframes lpFloatB {
  from { transform: translateY(0); }
  to   { transform: translateY(6px); }
}
@keyframes lpFloatC {
  from { transform: translateY(0); }
  to   { transform: translateY(-5px); }
}

/* ── Watch device mockup (landing page) ── */
.lp-feature-visual--watch {
  justify-content: center;
}

.lp-watch-device {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: #1a1a1f;
  border: 10px solid #2d2d35;
  position: relative;
  box-shadow: 0 12px 48px rgba(0,0,0,0.25), inset 0 0 12px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lp-watch-screen {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #0d1117;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 12px 12px;
  color: #e6edf3;
}

.lp-watch-progress-ring {
  position: relative;
  width: 60px;
  height: 60px;
  margin-bottom: 6px;
  flex-shrink: 0;
}

.lp-watch-progress-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.lp-ring-bg {
  fill: none;
  stroke: #21262d;
  stroke-width: 5;
}

.lp-ring-fg {
  fill: none;
  stroke: var(--success);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 251.33;
  stroke-dashoffset: 95.5; /* 62% filled */
  transition: stroke-dashoffset 1s ease;
}

.lp-watch-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lp-watch-pct {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
}

.lp-watch-label {
  font-size: 0.45rem;
  letter-spacing: 0.08em;
  opacity: 0.6;
  margin-top: 2px;
}

.lp-watch-items {
  width: 100%;
  padding: 0 4px;
}

.lp-watch-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.55rem;
  padding: 3px 0;
  border-bottom: 1px solid #21262d;
  opacity: 0.85;
}

.lp-watch-row.done {
  opacity: 0.45;
  text-decoration: line-through;
}

.lp-watch-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid #30363d;
  flex-shrink: 0;
}

.lp-watch-row.done .lp-watch-dot {
  background: var(--success);
  border-color: var(--success);
}

.lp-watch-crown {
  position: absolute;
  right: -14px;
  top: 50%;
  transform: translateY(-50%);
  width: 7px;
  height: 20px;
  background: #3b3f46;
  border-radius: 0 4px 4px 0;
  box-shadow: 2px 0 6px rgba(0,0,0,0.3);
}

/* ── Fanned cards ── */
.lp-cards-fan-section {
  padding: 60px 0 40px;
  overflow: visible;
}

.lp-cards-fan {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  position: relative;
  height: 300px;
}

.lp-fan-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 32px 28px;
  width: 240px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  position: absolute;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

.lp-fan-card:hover {
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
}

.lp-fan-card h4 {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 10px;
}

.lp-fan-card h4 em {
  font-style: italic;
}

.lp-fan-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.lp-fan-left {
  transform: rotate(-8deg) translateX(-120px);
  z-index: 1;
}
.lp-fan-center {
  transform: rotate(0deg) translateY(-10px);
  z-index: 3;
}
.lp-fan-right {
  transform: rotate(8deg) translateX(120px);
  z-index: 1;
}

.lp-fan-left:hover  { transform: rotate(-4deg) translateX(-120px) translateY(-6px); z-index: 4; }
.lp-fan-center:hover { transform: rotate(0deg) translateY(-16px); z-index: 4; }
.lp-fan-right:hover { transform: rotate(4deg) translateX(120px) translateY(-6px); z-index: 4; }

/* ── Bottom CTA ── */
.lp-bottom-cta {
  text-align: center;
  padding: 20px 0 0;
}

/* ── LP responsive ── */
@media (max-width: 800px) {
  .lp-hero-title { font-size: 2.4rem; }
  .lp-feature-section { grid-template-columns: 1fr; padding: 36px 28px; }
  .lp-feature-section--alt { direction: ltr; }
  .lp-feature-visual { min-height: 220px; }
  .lp-cards-fan { height: auto; flex-direction: column; gap: 16px; }
  .lp-fan-card { position: static; transform: none !important; width: 100%; max-width: 320px; }
  .lp-float-w1, .lp-float-w2 { display: none; }
}

/* ── Hero UX Overhaul ────────────────────────────────────────────────── */

.skill-url-text {
  font-size: 0.75rem !important;
  color: var(--text-muted) !important;
  word-break: break-all;
  margin-top: 4px;
  text-decoration: none !important;
}

.skill-url-text:hover {
  text-decoration: underline !important;
  color: var(--accent) !important;
}

.quest-card {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  border-radius: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
  margin-bottom: 1rem;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.quest-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.1);
}

.quest-card-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}

.skill-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.skill-header strong {
  font-size: 1.1rem;
  color: var(--text-primary);
  word-break: break-word;
}

.skill-badges {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.badge {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-difficulty { background: rgba(253, 203, 110, 0.2); color: #fdcb6e; }
.badge-time { background: rgba(0, 206, 201, 0.2); color: #00cec9; }
.badge-resource { 
  background: rgba(9, 132, 227, 0.2); 
  color: #0984e3; 
  text-decoration: none;
  transition: background 0.2s;
}
.badge-resource:hover { background: rgba(9, 132, 227, 0.3); }

.skill-rationale {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.skill-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.glowing-voice {
  background: linear-gradient(135deg, #6c5ce7, #a29bfe);
  color: white;
  border: none;
  font-size: 1rem;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 0 15px rgba(108, 92, 231, 0.4);
  transition: all 0.3s ease;
  animation: pulse-glow 2s infinite;
}

.glowing-voice:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(108, 92, 231, 0.6);
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 10px rgba(108, 92, 231, 0.3); }
  50% { box-shadow: 0 0 20px rgba(108, 92, 231, 0.6); }
  100% { box-shadow: 0 0 10px rgba(108, 92, 231, 0.3); }
}

.markdown-body {
  background: var(--bg-tertiary);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
}

.markdown-body h2 {
  margin-top: 0;
  font-size: 1.3rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.markdown-body ul {
  padding-left: 20px;
}

.markdown-body li {
  margin-bottom: 8px;
}

.markdown-body input[type="checkbox"] {
  margin-right: 8px;
  transform: scale(1.2);
}

.markdown-body pre {
  background: #1e1e1e;
  padding: 12px;
  border-radius: 6px;
  overflow-x: auto;
  color: #d4d4d4;
  font-family: monospace;
}

.draft-card {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  border-radius: 8px;
  background: var(--bg-secondary);
  border: 1px dashed var(--border);
  margin-bottom: 1rem;
}

input.draft-name {
  font-size: 1.1rem;
  font-weight: bold;
  flex: 1;
  min-width: 0;
  width: 100%;
}

.skill-meta-draft {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.skill-meta-draft input {
  font-size: 0.8rem;
  padding: 4px 8px;
  border-radius: 4px;
  min-width: 0;
  flex: 1 1 80px;
}

/* ── Landing Page Workflow Diagram ── */
.lp-workflow {
  max-width: 900px;
  margin: 80px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  font-family: var(--font-sans);
}

.wf-level {
  width: 100%;
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.wf-box-purple { border-color: rgba(144, 97, 249, 0.4); box-shadow: 0 4px 24px rgba(144, 97, 249, 0.15); }
.wf-box-green { border-color: rgba(16, 185, 129, 0.4); box-shadow: 0 4px 24px rgba(16, 185, 129, 0.15); }
.wf-box-orange { border-color: rgba(239, 68, 68, 0.4); box-shadow: 0 4px 24px rgba(239, 68, 68, 0.15); }
.wf-box-blue { border-color: rgba(59, 130, 246, 0.4); box-shadow: 0 4px 24px rgba(59, 130, 246, 0.15); background: rgba(59, 130, 246, 0.03); }

.wf-box-label {
  position: absolute;
  top: -12px;
  left: 24px;
  background: var(--bg-glass);
  padding: 2px 14px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.wf-box-purple .wf-box-label { color: var(--accent-hover); border-color: var(--accent); }
.wf-box-green .wf-box-label { color: var(--success); border-color: var(--success); }
.wf-box-blue .wf-box-label { color: #5a91f5; border-color: rgba(59, 130, 246, 0.5); }

.wf-arrow-down {
  width: 2px;
  height: 24px;
  background: #94A3B8;
  position: relative;
  margin: 0 auto;
}
.wf-arrow-down::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: -4px;
  border-width: 5px 5px 0 5px;
  border-style: solid;
  border-color: #94A3B8 transparent transparent transparent;
}

.wf-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.wf-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.wf-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

.wf-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.wf-card h4 { font-size: 0.9rem; margin: 8px 0; color: var(--text); }
.wf-card ul { margin: 0; padding-left: 20px; font-size: 0.8rem; color: var(--text-muted); }
.wf-card ul li { margin-bottom: 4px; }
.wf-icon { font-size: 1.5rem; display: block; margin-bottom: 8px; }

.wf-level-1 { text-align: center; max-width: 600px; margin: 0 auto; }
.wf-card-header { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 8px; }
.wf-card-header h3 { font-size: 1.2rem; margin: 0; }
.wf-fake-input {
  background: var(--bg-muted);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.85rem;
  color: var(--text);
  margin-top: 12px;
  text-align: left;
  font-family: monospace;
}

.wf-mock-quest { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border-subtle); font-size: 0.8rem; }
.wf-mock-quest:last-child { border-bottom: none; }
.wf-q-icon { display: inline-block; width: 16px; }
.wf-badge-success { background: rgba(107, 206, 143, 0.1); color: var(--success); padding: 2px 6px; border-radius: 4px; font-size: 0.7rem; }
.wf-badge-warning { background: rgba(253, 160, 133, 0.1); color: var(--warning); padding: 2px 6px; border-radius: 4px; font-size: 0.7rem; }
.wf-badge-muted { background: var(--bg-muted); color: var(--text-muted); padding: 2px 6px; border-radius: 4px; font-size: 0.7rem; }

.wf-mock-watch {
  width: 120px;
  height: 120px;
  background: #111;
  border-radius: 50%;
  border: 6px solid #333;
  margin: 12px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.wf-watch-screen { padding: 10px; width: 100%; }
.wf-watch-screen p { font-size: 0.6rem; color: #aaa; margin: 0; }
.wf-watch-screen strong { font-size: 0.8rem; color: #fff; display: block; margin: 4px 0; }
.wf-watch-bar { width: 100%; height: 4px; background: #333; border-radius: 2px; margin: 6px 0; }
.wf-watch-bar div { height: 100%; background: var(--success); border-radius: 2px; }

.wf-mock-chat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}
.wf-chat-bubble { padding: 8px 12px; border-radius: 12px; font-size: 0.75rem; max-width: 90%; }
.wf-chat-user { background: var(--bg-muted); align-self: flex-end; border-bottom-right-radius: 2px; }
.wf-chat-ai { background: rgba(108, 92, 231, 0.1); color: var(--primary); align-self: flex-start; border-bottom-left-radius: 2px; border: 1px solid rgba(108, 92, 231, 0.2); }

.wf-watch-ul, .wf-tutor-ul { padding-left: 16px !important; margin-top: 12px !important; }

.wf-report-grid { display: grid; grid-template-columns: auto 1fr 1fr; gap: 24px; align-items: center; }
.wf-score-circle {
  width: 80px; height: 80px; border-radius: 50%;
  border: 4px solid var(--success);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: bold; color: var(--success);
  margin: 0 auto 12px;
}
.wf-report-score { text-align: center; font-size: 0.9rem; }
.wf-text-success { color: var(--success); }

.wf-report-bars { display: flex; flex-direction: column; gap: 12px; }
.wf-bar-row { display: flex; align-items: center; gap: 12px; font-size: 0.8rem; }
.wf-bar-label { width: 110px; color: var(--text-muted); }
.wf-bar { flex: 1; height: 6px; background: var(--bg-muted); border-radius: 3px; }
.wf-bar-fill { height: 100%; border-radius: 3px; }
.wf-bg-success { background: var(--success); }
.wf-bg-warning { background: var(--warning); }
.wf-bar-pct { width: 30px; text-align: right; font-weight: bold; }

.wf-report-suggestions h4 { margin: 0 0 12px 0; color: var(--text); }
.wf-report-suggestions ul { padding-left: 20px; font-size: 0.85rem; color: var(--text-muted); }

@media (max-width: 900px) {
  .wf-grid-4, .wf-grid-3, .wf-report-grid { grid-template-columns: 1fr; }
  .wf-report-grid { gap: 24px; }
  .wf-score-circle { width: 60px; height: 60px; font-size: 1.5rem; }
  .wf-bar-label { width: 110px; font-size: 0.8rem; }
}

/* Landing refinement — restrained motion and depth inspired by SuRaksha. */
html { scroll-padding-top: 96px; }

body {
  background:
    radial-gradient(circle at 10% -10%, rgba(115, 66, 226, 0.10), transparent 27rem),
    radial-gradient(circle at 92% 26%, rgba(0, 85, 255, 0.07), transparent 26rem),
    var(--bg);
}

body::before { opacity: 0.26; z-index: 1; }

.landing-page {
  max-width: 1200px;
  padding: 116px 24px 72px;
}

.fixed > header {
  border-color: rgba(10, 10, 10, 0.07) !important;
  box-shadow: 0 12px 32px rgba(20, 13, 47, 0.07) !important;
}

.lp-brand-name { display: block; }
.lp-nav { display: flex; }

.lp-hero {
  min-height: min(740px, calc(100vh - 72px));
  display: grid;
  align-items: center;
  padding: 44px 0 72px !important;
  overflow: visible !important;
}

.lp-hero > div { gap: clamp(2.5rem, 6vw, 5rem) !important; }
.lp-hero h1 { font-size: clamp(3.7rem, 7vw, 5.75rem) !important; max-width: 650px; }
.lp-hero p { max-width: 540px !important; }
.lp-hero .space-y-8 > * { animation: landingEnter 760ms cubic-bezier(.22, 1, .36, 1) both; }
.lp-hero .space-y-8 > :nth-child(1) { animation-delay: 80ms; }
.lp-hero .space-y-8 > :nth-child(2) { animation-delay: 160ms; }
.lp-hero .space-y-8 > :nth-child(3) { animation-delay: 240ms; }
.lp-hero .space-y-8 > :nth-child(4) { animation-delay: 320ms; }

.lp-cta {
  min-height: 52px;
  padding: 13px 28px;
  background: linear-gradient(135deg, #7342E2 0%, #FF453A 100%);
  box-shadow: 0 12px 32px rgba(115, 66, 226, 0.25);
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: white !important;
}
.lp-cta:hover {
  background: linear-gradient(135deg, #8152eb 0%, #ff5c52 100%);
  box-shadow: 0 16px 40px rgba(115, 66, 226, 0.4);
  transform: translateY(-3px) scale(1.03);
}
.lp-cta::after { content: "→"; margin-left: 10px; transition: transform .25s ease; }
.lp-cta:hover::after { transform: translateX(3px); }

.suraksha-parallax {
  --tilt-x: 9deg;
  --tilt-y: -5deg;
  transform: perspective(1800px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) scale(.97);
  will-change: transform;
  animation: dashboardFloat 7s ease-in-out 900ms infinite;
}

.suraksha-parallax:hover { animation-play-state: paused; }

.animate-on-scroll > .card,
.animate-on-scroll .spotlight-card { animation: none; }

.card.spotlight-card {
  background: rgba(255, 255, 255, 0.82) !important;
  border-color: rgba(10, 10, 10, 0.06) !important;
  box-shadow: 0 10px 30px rgba(20, 13, 47, 0.045) !important;
}
.card.spotlight-card:hover { transform: translateY(-6px); box-shadow: 0 22px 50px rgba(20, 13, 47, 0.10) !important; }

#workflow { margin-top: 7rem !important; }
#workflow > div { overflow: visible !important; }
#workflow h2 { letter-spacing: -0.055em !important; }
.workflow-stack-card > div { overflow: hidden !important; }
.workflow-stack-card > div::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 100%, rgba(115, 66, 226, 0.22), transparent 45%);
  pointer-events: none;
}

.lp-bottom-cta {
  margin-top: 4rem;
  padding: 80px 40px !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 32px;
  background: #0d0d12;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}
.lp-bottom-cta::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -20%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(115, 66, 226, 0.25) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}
.lp-bottom-cta::after {
  content: "";
  position: absolute;
  bottom: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 69, 58, 0.2) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

@keyframes landingEnter {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes dashboardFloat {
  0%, 100% { transform: perspective(1800px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateY(0) scale(.97); }
  50% { transform: perspective(1800px) rotateX(calc(var(--tilt-x) - 1deg)) rotateY(calc(var(--tilt-y) + 1deg)) translateY(-10px) scale(.97); }
}

@media (max-width: 900px) {
  .landing-page { padding: 96px 18px 56px; }
  .lp-hero { min-height: auto; padding-top: 32px !important; }
  .lp-hero h1 { font-size: clamp(3.25rem, 14vw, 4.5rem) !important; }
  #workflow { height: auto !important; margin-top: 4rem !important; }
  #workflow > div { position: static !important; height: auto !important; overflow: visible !important; }
  #workflow > div > div { display: block !important; }
  #workflow > div > div > :first-child { margin-bottom: 2.5rem; }
  #workflow .workflow-stack-card { position: relative !important; transform: none !important; opacity: 1 !important; margin-bottom: 14px; }
  #workflow .workflow-stack-card > div { height: auto !important; min-height: 220px; }
  .suraksha-parallax { transform: none; animation: none; }
  .lp-nav { display: none !important; }
  .lp-brand-name { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* Product surfaces: denser, more intentional feature modules. */
.pq-module-card {
  min-height: 510px !important;
  padding: 28px !important;
  gap: 26px;
  overflow: hidden;
}
.pq-module-card::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -110px;
  top: -130px;
  border-radius: 50%;
  pointer-events: none;
}
.pq-module-analyzer::after { background: radial-gradient(circle, rgba(0,229,89,.15), transparent 68%); }
.pq-module-tutor::after { background: radial-gradient(circle, rgba(0,85,255,.15), transparent 68%); }
.pq-module-copy { margin: 0 !important; position: relative; z-index: 1; }
.pq-module-copy > span { margin-bottom: 18px !important; }
.pq-module-copy h3 { font-size: 2rem !important; line-height: 1.05 !important; }
.pq-module-copy p { max-width: 470px; font-size: .98rem; }
.pq-module-meta, .pq-surface-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #777;
  font: 700 10px/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.pq-module-meta { margin-bottom: 20px; }
.pq-module-state { color: #087f43; display: inline-flex; gap: 7px; align-items: center; }
.pq-module-state i, .pq-live-listening i, .pq-watch-live i { width: 6px; height: 6px; border-radius: 999px; background: #00e559; box-shadow: 0 0 0 4px rgba(0,229,89,.12); }
.pq-module-state--blue { color: #2366e8; }
.pq-module-state--blue i { background: #2366e8; box-shadow: 0 0 0 4px rgba(35,102,232,.12); }
.pq-module-icon { border-radius: 14px !important; margin-bottom: 18px !important; }

.pq-analysis-surface, .pq-tutor-surface { height: 225px !important; border-radius: 16px !important; padding: 18px !important; }
.pq-analysis-surface { background: #fbfbfb !important; }
.pq-analysis-surface::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(30,30,30,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(30,30,30,.035) 1px, transparent 1px);
  background-size: 18px 18px;
  mask-image: linear-gradient(to bottom, black, transparent);
  pointer-events: none;
}
.pq-surface-topbar { position: absolute; z-index: 5; top: 14px; left: 18px; right: 18px; }
.pq-analysis-surface > div[style*="bottom"] { bottom: 17px !important; z-index: 4; }
.pq-analysis-surface > div[style*="left"] { left: 36px !important; top: 92px !important; z-index: 4 !important; }
.pq-analysis-surface > div[style*="right"] { right: 36px !important; top: 92px !important; z-index: 4 !important; }
.pq-analysis-surface svg { top: 14px !important; z-index: 2; }

.pq-tutor-surface { background: #111114 !important; border-color: rgba(255,255,255,.10) !important; padding-top: 48px !important; }
.pq-tutor-surface::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 80% 0, rgba(115,66,226,.23), transparent 34%), linear-gradient(120deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: auto, 18px 18px; opacity: .8; }
.pq-tutor-surface .pq-surface-topbar { color: rgba(255,255,255,.5); }
.pq-live-listening { color: #9ec2ff; display: inline-flex; align-items: center; gap: 7px; }
.pq-live-listening i { background: #4c85ff; box-shadow: 0 0 0 4px rgba(76,133,255,.14); }
.pq-tutor-surface > div:not(.pq-surface-topbar) { position: relative; z-index: 2; }
.pq-tutor-surface > div:last-child { border-radius: 12px !important; background: rgba(255,255,255,.055) !important; }

.pq-watch-stage { position: relative; }
.pq-watch-stage::before, .pq-watch-stage::after { content: ""; position: absolute; border: 1px solid rgba(115,66,226,.13); border-radius: 999px; pointer-events: none; }
.pq-watch-stage::before { width: 315px; height: 315px; }
.pq-watch-stage::after { width: 365px; height: 365px; border-style: dashed; }
.pq-watch { width: 236px !important; height: 236px !important; z-index: 2; }
.pq-watch-screen { background: radial-gradient(circle at 35% 25%, #29304a 0, #0c0e16 38%, #050507 100%) !important; }
.pq-watch-screen > .flex { display: none !important; }
.pq-watch-ui { position: relative; z-index: 12; width: 100%; height: 100%; padding: 22px 24px 20px; display: flex; flex-direction: column; align-items: center; }
.pq-watch-topline { width: 100%; display: flex; justify-content: space-between; color: rgba(255,255,255,.62); font: 700 8.5px/1 var(--mono); }
.pq-watch-live { color: #a6ffd0; display: inline-flex; align-items: center; gap: 5px; font-size: 7.5px; }
.pq-watch-live i { width: 5px; height: 5px; }
.pq-watch-progress { position: relative; width: 72px; height: 72px; margin: 6px 0 4px; }
.pq-watch-progress svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.pq-watch-progress circle { fill: none; stroke: rgba(255,255,255,.10); stroke-width: 6; }
.pq-watch-progress .pq-watch-progress-value { stroke: #8a5afe; stroke-linecap: round; stroke-dasharray: 214; stroke-dashoffset: 71; filter: drop-shadow(0 0 4px rgba(138,90,254,.65)); }
.pq-watch-progress strong { position: absolute; inset: 0; display: grid; place-items: center; color: white; font: 800 16px/1 var(--font-heading); }
.pq-watch-progress small { font-size: 7.5px; margin-left: 1px; color: #b7a5ff; }
.pq-watch-quest { text-align: center; line-height: 1.25; }
.pq-watch-quest span { display: block; color: #9298aa; font: 700 7px/1 var(--mono); letter-spacing: .1em; }
.pq-watch-quest b { display: block; margin-top: 2px; font-size: 10.5px; }
.pq-watch-quest p { margin: 1px 0 0; color: #9ca3b4; font-size: 8px; }
.pq-watch-action { margin-top: auto; width: 100%; display: flex; justify-content: space-between; align-items: center; border: 1px solid rgba(255,255,255,.12); border-radius: 999px; padding: 5px 12px; background: rgba(138,90,254,.19); color: white; font: 700 8.5px/1 var(--font-sans); }
.pq-watch-action span:last-child { color: #c6b9ff; font-size: 12px; }

@media (max-width: 900px) {
  .pq-module-card { min-height: 470px !important; }
  .pq-watch-stage { min-height: 300px !important; }
  .pq-watch-stage::after { width: 320px; height: 320px; }
}

/* Patch — the small quest companion. Original, code-drawn, and deliberately unobtrusive. */
.patch-pet {
  position: fixed;
  right: clamp(18px, 3vw, 44px);
  bottom: 18px;
  z-index: 90;
  width: 96px;
  height: 118px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 14px 12px rgba(20, 13, 47, .20));
  transition: transform .3s cubic-bezier(.22, 1, .36, 1), filter .3s ease;
  animation: patchBob 3.8s ease-in-out infinite;
}
.patch-pet:hover, .patch-pet:focus-visible { transform: translateY(-8px) rotate(-3deg) scale(1.04); filter: drop-shadow(0 18px 16px rgba(75, 54, 160, .26)); outline: none; }
.patch-pet:focus-visible .patch-pet-head { box-shadow: 0 0 0 4px rgba(115, 66, 226, .22); }
.patch-pet-head {
  position: absolute;
  left: 10px;
  top: 17px;
  width: 76px;
  height: 61px;
  border: 3px solid #17152a;
  border-radius: 31px 31px 25px 25px;
  background: linear-gradient(145deg, #9b92ff 0%, #7166df 46%, #5650bb 100%);
  box-shadow: inset 0 3px 0 rgba(255,255,255,.25), inset 0 -6px 0 rgba(20, 16, 75, .18);
}
.patch-pet-head::before, .patch-pet-head::after { content: ""; position: absolute; top: 9px; width: 15px; height: 20px; border-radius: 12px 12px 5px 5px; background: #8e85f1; }
.patch-pet-head::before { left: -5px; transform: rotate(-20deg); }
.patch-pet-head::after { right: -5px; transform: rotate(20deg); }
.patch-pet-face { position: absolute; inset: 13px 10px 8px; display: flex; gap: 14px; align-items: center; justify-content: center; border: 3px solid #17152a; border-radius: 18px; background: linear-gradient(145deg, #17244b, #0b1230); box-shadow: inset 0 2px 6px rgba(0,0,0,.5); }
.patch-pet-face::before { content: ""; position: absolute; top: 5px; left: 9px; right: 9px; height: 2px; border-radius: 4px; background: rgba(162, 195, 255, .2); }
.patch-pet-face i { width: 12px; height: 7px; border-bottom: 3px solid #79e9ff; border-radius: 0 0 12px 12px; filter: drop-shadow(0 0 3px rgba(121,233,255,.7)); }
.patch-pet-antenna { position: absolute; top: 1px; left: 45px; width: 5px; height: 21px; border-radius: 999px; background: #24203e; transform-origin: bottom; }
.patch-pet-antenna i { position: absolute; top: -5px; left: -4px; width: 13px; height: 13px; border: 2px solid #24203e; border-radius: 50%; background: #ffbd52; box-shadow: 0 0 0 3px rgba(255,189,82,.16); }
.patch-pet-body { position: absolute; left: 23px; top: 72px; width: 50px; height: 36px; border: 3px solid #17152a; border-radius: 17px 17px 12px 12px; background: linear-gradient(145deg, #7e73ec, #5047ad); }
.patch-pet-body::before, .patch-pet-body::after { content: ""; position: absolute; top: 8px; width: 13px; height: 20px; border: 3px solid #17152a; border-radius: 10px; background: #7166d8; }
.patch-pet-body::before { left: -13px; transform: rotate(14deg); }
.patch-pet-body::after { right: -13px; transform: rotate(-14deg); }
.patch-pet-body i { position: absolute; left: 50%; top: 8px; width: 17px; height: 12px; transform: translateX(-50%); border: 2px solid rgba(255,255,255,.34); border-radius: 5px; }
.patch-pet-body i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 7px; height: 2px; background: #aaf7ff; box-shadow: 0 3px 0 #aaf7ff; }
.patch-pet-feet { position: absolute; left: 28px; top: 104px; display: flex; gap: 16px; }
.patch-pet-feet i { width: 15px; height: 9px; border: 3px solid #17152a; border-radius: 4px 4px 9px 9px; background: #6157ca; }
.patch-pet-spark { position: absolute; z-index: -1; width: 8px; height: 8px; border-radius: 50%; background: #a497ff; opacity: .8; }
.patch-pet-spark--one { right: 2px; top: 23px; animation: patchSpark 2.6s ease-in-out infinite; }
.patch-pet-spark--two { left: 3px; top: 61px; width: 5px; height: 5px; background: #7de9ff; animation: patchSpark 2.6s .65s ease-in-out infinite; }
.patch-pet-bubble { position: absolute; right: 100px; bottom: 65px; width: 220px; max-width: 220px; white-space: normal; word-break: break-word; text-align: left; padding: 12px 14px; border: 1px solid rgba(18, 14, 38, .10); border-radius: 16px 16px 3px 16px; background: rgba(255,255,255,.98); color: #272238; font: 700 12.5px/1.4 var(--font-sans); box-shadow: 0 12px 28px rgba(20,13,47,.12); opacity: 0; transform: translateX(8px) translateY(5px) scale(.96); pointer-events: none; transition: opacity .25s ease, transform .25s ease; }
.patch-pet:hover .patch-pet-bubble, .patch-pet:focus-visible .patch-pet-bubble, .patch-pet.is-chatting .patch-pet-bubble { opacity: 1; transform: translateX(0) translateY(0) scale(1); }
.patch-pet.is-chatting .patch-pet-face i { height: 3px; border-bottom-width: 2px; transform: translateY(-1px); }
.patch-pet.is-chatting { animation-duration: 1.2s; }
@keyframes patchBob { 0%,100% { translate: 0 0; } 50% { translate: 0 -5px; } }
@keyframes patchSpark { 0%,100% { opacity: .15; transform: translateY(5px) scale(.65); } 50% { opacity: .95; transform: translateY(-5px) scale(1); } }
@media (max-width: 700px) { .patch-pet { right: 10px; bottom: 10px; transform: scale(.82); transform-origin: bottom right; } .patch-pet:hover { transform: translateY(-5px) scale(.86); } }
@media (prefers-reduced-motion: reduce) { .patch-pet, .patch-pet-spark { animation: none !important; } }

/* Softer Patch silhouette: a fluffy little quest sprite, not a mechanical robot. */
.patch-pet { width: 100px; height: 119px; }
.patch-pet-antenna { display: none; }
.patch-pet-head {
  left: 7px;
  top: 12px;
  width: 86px;
  height: 67px;
  border-color: #111936;
  border-radius: 43% 43% 37% 37%;
  background: radial-gradient(circle at 45% 21%, #93a9ff 0 19%, #6f86ea 42%, #5369cc 100%);
  box-shadow: inset 0 4px 0 rgba(255,255,255,.23), inset 0 -7px 0 rgba(31,42,121,.24), 0 4px 0 #111936;
}
.patch-pet-head::before, .patch-pet-head::after {
  top: -8px;
  width: 31px;
  height: 29px;
  border: 3px solid #111936;
  border-bottom: 0;
  border-radius: 55% 55% 42% 42%;
  background: #7e95ef;
  box-shadow: inset 0 4px 0 rgba(255,255,255,.16);
}
.patch-pet-head::before { left: 6px; transform: rotate(-11deg); }
.patch-pet-head::after { right: 6px; transform: rotate(11deg); }
.patch-pet-face {
  inset: 22px 13px 9px;
  gap: 16px;
  border-color: #111936;
  border-radius: 15px 15px 18px 18px;
  background: linear-gradient(145deg, #172859, #091334 68%);
}
.patch-pet-face i { width: 12px; height: 7px; border-bottom-color: #81f3ff; border-bottom-width: 3px; }
.patch-pet-body {
  left: 28px;
  top: 76px;
  width: 44px;
  height: 34px;
  border-color: #111936;
  border-radius: 14px 14px 11px 11px;
  background: linear-gradient(145deg, #8299f1, #576dce);
  box-shadow: inset 0 3px 0 rgba(255,255,255,.18);
}
.patch-pet-body::before, .patch-pet-body::after { top: 7px; width: 12px; height: 18px; border-color: #111936; border-radius: 8px; background: #7790e9; }
.patch-pet-body::before { left: -12px; transform: rotate(20deg); }
.patch-pet-body::after { right: -12px; transform: rotate(-20deg); }
.patch-pet-body i { display: none; }
.patch-pet-feet { left: 32px; top: 106px; gap: 12px; }
.patch-pet-feet i { width: 16px; height: 8px; border-color: #111936; background: #6076d7; }
.patch-pet-spark--one { right: 0; top: 35px; background: #84a1ff; }
.patch-pet-spark--two { left: 1px; top: 54px; background: #b6f3ff; }

/* BlackDragon asset supplied with the project. Frame 1 is the idle pose. */
.patch-pet {
  width: 108px;
  height: 102px;
  right: clamp(14px, 2.5vw, 38px);
  bottom: 10px;
  animation: blackdragonFloat 3.2s ease-in-out infinite;
}
.patch-pet > :not(.patch-pet-bubble):not(.blackdragon-sprite) { display: none !important; }
.blackdragon-sprite {
  position: absolute;
  inset: 0;
  display: block;
  background: url("blackdragon-spritesheet.webp") 0 0 / 700% auto no-repeat;
  image-rendering: auto;
}
.patch-pet:hover .blackdragon-sprite, .patch-pet.is-chatting .blackdragon-sprite { background-position: 0 0; }
.patch-pet-bubble { right: 100px; bottom: 65px; }
.patch-pet.is-chatting { animation-duration: 1.5s; }
@keyframes blackdragonFloat { 0%,100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@media (prefers-reduced-motion: reduce) { .patch-pet { animation: none !important; } }

/* Workspace is a separate product surface, not an extension of the landing page. */
#app-workspace {
  max-width: 1240px;
  padding-top: 34px;
}
#app-workspace > header {
  margin-bottom: 32px;
  padding: 0 0 20px;
}
#app-workspace .input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: stretch;
}
#app-workspace .input-row input {
  min-width: 0;
  min-height: 54px;
}
#app-workspace button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  line-height: 1;
}
#app-workspace button.primary,
#app-workspace button.success {
  min-height: 54px;
  padding-inline: 24px;
  font-size: .92rem;
  letter-spacing: -.01em;
}
#app-workspace .demo-actions button.ghost {
  min-height: auto;
  padding: 4px 6px;
}
#app-workspace .toolbar { gap: 12px; }
#app-workspace .toolbar button { min-height: 44px; }
@media (max-width: 600px) {
  #app-workspace .input-row { grid-template-columns: 1fr; }
  #app-workspace .input-row button { width: 100%; }
}
.gemini-live-widget {
  padding: 24px !important;
  border-radius: 24px !important;
  background: rgba(255,255,255,.86) !important;
  box-shadow: 0 16px 38px rgba(20,13,47,.055) !important;
}

/* Glowing Background Mesh Blobs */
.mesh-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.06;
  z-index: -5;
  pointer-events: none;
  mix-blend-mode: multiply;
  will-change: transform;
}
.mesh-blob-1 {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, #7342E2 0%, #0055FF 100%);
  top: -150px;
  left: -150px;
  animation: floatBlobOne 22s ease-in-out infinite alternate;
}
.mesh-blob-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #FF453A 0%, #FF9F0A 100%);
  bottom: 10%;
  right: -100px;
  animation: floatBlobTwo 26s ease-in-out infinite alternate;
}
.mesh-blob-3 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #00E559 0%, #0055FF 100%);
  top: 40%;
  left: 30%;
  animation: floatBlobThree 30s ease-in-out infinite alternate;
}

@keyframes floatBlobOne {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(120px, 80px) scale(1.15); }
  100% { transform: translate(-40px, 140px) scale(0.9); }
}
@keyframes floatBlobTwo {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-100px, -120px) scale(0.85); }
  100% { transform: translate(60px, 40px) scale(1.1); }
}
@keyframes floatBlobThree {
  0% { transform: translate(0, 0) scale(0.9); }
  50% { transform: translate(-60px, 90px) scale(1.1); }
  100% { transform: translate(80px, -40px) scale(0.95); }
}
