/* ==========================================================================
   AI Career Assistant - Prominent Sidebar Section
   Features:
   - Titled section "Geza's AI Assistant" with subtext & live status bar
   - Large gradient-shadow input (inspired by 21st.dev gradient-chat-input)
   - Animated 3D-effect thinking orb (inspired by Dribbble AI bot sphere)
   - Contoured answer bubble with dynamic sizing & markdown formatting
   ========================================================================== */

:root {
  --ai-card-bg: transparent;
  --ai-card-border: transparent;
  --ai-text-title: #0F172A;
  --ai-text-sub: #64748B;
  --ai-text-body: #1E293B;
  --ai-accent: #B45309;
  --ai-accent-hover: #92400E;
  --ai-accent-rgb: 180, 83, 9;
  --ai-input-bg: #FFFFFF;
  --ai-input-border: #E2DDD0;
  --ai-input-shadow: 0 12px 32px -6px rgba(41, 37, 36, 0.12), 0 4px 12px -2px rgba(0, 0, 0, 0.05);
  --ai-input-shadow-focus: 0 16px 40px -6px rgba(180, 83, 9, 0.22), 0 0 0 3px rgba(180, 83, 9, 0.15);
  --ai-bubble-bg: #FFFFFF;
  --ai-bubble-border: #E8E2D5;
  --ai-bubble-shadow: 0 16px 36px -8px rgba(180, 83, 9, 0.14), 0 4px 14px rgba(0, 0, 0, 0.05);
  --ai-pill-bg: #EFECE3;
  --ai-pill-hover: #E2DDD0;
  --ai-pill-text: #44403C;
  --ai-status-bg: rgba(34, 197, 94, 0.12);
  --ai-status-text: #15803D;
  --ai-status-dot: #22C55E;
}

/* Theme Adaptation: Editorial (v3-mavrk) */
body.editorial-theme,
.page-frame ~ .ai-assistant-container,
body:has(.page-frame) .ai-assistant-container {
  --ai-text-title: #111111;
  --ai-text-sub: #555555;
  --ai-text-body: #111111;
  --ai-accent: #D9381E;
  --ai-accent-hover: #B82A14;
  --ai-accent-rgb: 217, 56, 30;
  --ai-input-bg: #FFFFFF;
  --ai-input-border: #111111;
  --ai-input-shadow: 4px 4px 0px #111111;
  --ai-input-shadow-focus: 6px 6px 0px #D9381E;
  --ai-bubble-bg: #FFFFFF;
  --ai-bubble-border: #111111;
  --ai-bubble-shadow: 6px 6px 0px #111111;
  --ai-pill-bg: #F0ECE1;
  --ai-pill-hover: #E4DDCF;
  --ai-pill-text: #111111;
  --ai-status-bg: rgba(34, 197, 94, 0.15);
  --ai-status-text: #15803D;
}

/* Theme Adaptation: 21st.dev Dark Mode */
html.dark .ai-assistant-container,
body.dark .ai-assistant-container,
.dark .ai-assistant-container {
  --ai-text-title: #F4F4F5;
  --ai-text-sub: #A1A1AA;
  --ai-text-body: #E4E4E7;
  --ai-accent: #38BDF8;
  --ai-accent-hover: #0EA5E9;
  --ai-accent-rgb: 56, 189, 248;
  --ai-input-bg: #18181B;
  --ai-input-border: #27272A;
  --ai-input-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.6), 0 4px 12px rgba(0, 0, 0, 0.4);
  --ai-input-shadow-focus: 0 18px 42px -6px rgba(56, 189, 248, 0.25), 0 0 0 2px rgba(56, 189, 248, 0.3);
  --ai-bubble-bg: #18181B;
  --ai-bubble-border: #27272A;
  --ai-bubble-shadow: 0 16px 38px -8px rgba(0, 0, 0, 0.6);
  --ai-pill-bg: #27272A;
  --ai-pill-hover: #3F3F46;
  --ai-pill-text: #E4E4E7;
  --ai-status-bg: rgba(34, 197, 94, 0.18);
  --ai-status-text: #4ADE80;
}

/* ==========================================================================
   AI ASSISTANT CONTAINER & CARD
   ========================================================================== */

.ai-assistant-container {
  margin-top: 24px;
  margin-bottom: 24px;
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-family: inherit;
  position: relative;
  z-index: 20;
}

/* Section Header: Title, Subtext, and Status Bar */
.ai-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}

.ai-titles {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ai-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ai-text-title);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.ai-sparkle-icon {
  display: inline-flex;
  color: var(--ai-accent);
}

.ai-section-subtext {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ai-text-sub);
  margin: 0;
  letter-spacing: -0.01em;
}

/* Live Status Badge */
.ai-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 9999px;
  background-color: var(--ai-status-bg);
  color: var(--ai-status-text);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  flex-shrink: 0;
  user-select: none;
}

.ai-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--ai-status-dot);
  box-shadow: 0 0 8px var(--ai-status-dot);
  animation: aiStatusPulse 2s infinite ease-in-out;
}

@keyframes aiStatusPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* ==========================================================================
   LARGER GRADIENT CHAT INPUT BAR (Inspired by 21st.dev Gradient Input)
   ========================================================================== */

.ai-input-form {
  position: relative;
  display: flex;
  align-items: center;
  background-color: var(--ai-input-bg);
  border: 1.5px solid var(--ai-input-border);
  border-radius: 9999px;
  padding: 6px 8px 6px 18px;
  min-height: 54px;
  box-shadow: var(--ai-input-shadow);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-input-form:hover {
  border-color: var(--ai-accent);
}

.ai-input-form:focus-within {
  border-color: var(--ai-accent);
  box-shadow: var(--ai-input-shadow-focus);
  transform: translateY(-1px);
}

.ai-input-field {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--ai-text-title);
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 450;
  letter-spacing: -0.01em;
  padding-right: 10px;
}

.ai-input-field::placeholder {
  color: var(--ai-text-sub);
  opacity: 0.85;
}

/* Modern Circular Submit Button */
.ai-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ai-accent), var(--ai-accent-hover));
  color: #FFFFFF;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(var(--ai-accent-rgb), 0.35);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-send-btn:hover:not(:disabled) {
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(var(--ai-accent-rgb), 0.45);
}

.ai-send-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ==========================================================================
   QUICK SUGGESTION PILLS
   ========================================================================== */

.ai-suggestion-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: -2px;
}

.ai-pill-btn {
  background-color: var(--ai-pill-bg);
  color: var(--ai-pill-text);
  border: 1px solid transparent;
  border-radius: 9999px;
  padding: 5px 12px;
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: -0.01em;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.ai-pill-btn:hover {
  background-color: var(--ai-pill-hover);
  border-color: var(--ai-accent);
  color: var(--ai-accent);
  transform: translateY(-1px);
}

/* ==========================================================================
   ANIMATED THINKING ORB (Inspired by Dribbble AI Chat Bot Sphere)
   ========================================================================== */

.ai-stage {
  width: 100%;
  min-height: 0;
  display: none;
  margin-top: 4px;
  position: relative;
}

.ai-stage.active {
  display: block;
  animation: aiStageAppear 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes aiStageAppear {
  0% { opacity: 0; transform: translateY(10px) scale(0.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.ai-thinking-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 26px 20px;
  background-color: var(--ai-bubble-bg);
  border: 1.5px solid var(--ai-bubble-border);
  border-radius: 24px;
  box-shadow: var(--ai-bubble-shadow);
  position: relative;
  overflow: hidden;
}

/* The Luminous AI Orb */
.ai-orb-wrapper {
  position: relative;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Ambient Glow Aura */
.ai-orb-glow {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--ai-accent-rgb), 0.45) 0%, rgba(245, 158, 11, 0.25) 50%, transparent 75%);
  filter: blur(12px);
  animation: orbGlowPulse 2.4s infinite ease-in-out;
}

/* Inner Morphing Spherical Core */
.ai-orb-core {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFE082 0%, var(--ai-accent) 45%, #7C2D12 85%);
  box-shadow: 
    inset 0 2px 6px rgba(255, 255, 255, 0.8),
    inset 0 -3px 8px rgba(0, 0, 0, 0.4),
    0 8px 24px rgba(var(--ai-accent-rgb), 0.4);
  animation: orbFluidMorph 3.5s infinite ease-in-out, orbRotate 6s infinite linear;
  overflow: hidden;
}

/* Internal Swirling Wave Layer */
.ai-orb-wave {
  position: absolute;
  top: -20%;
  left: -20%;
  width: 140%;
  height: 140%;
  border-radius: 42%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.6) 0%, transparent 60%);
  animation: orbWaveSpin 2.8s infinite linear;
  mix-blend-mode: overlay;
}

@keyframes orbGlowPulse {
  0%, 100% { transform: scale(0.95); opacity: 0.55; }
  50% { transform: scale(1.2); opacity: 0.9; }
}

@keyframes orbFluidMorph {
  0%, 100% { border-radius: 50% 50% 48% 52% / 52% 48% 50% 50%; transform: scale(1); }
  33% { border-radius: 54% 46% 52% 48% / 46% 54% 48% 52%; transform: scale(1.05); }
  66% { border-radius: 48% 52% 46% 54% / 52% 48% 54% 46%; transform: scale(0.97); }
}

@keyframes orbRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes orbWaveSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(-360deg); }
}

/* Thinking Text Label */
.ai-thinking-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ai-text-sub);
  letter-spacing: -0.01em;
}

.ai-thinking-dots {
  display: inline-flex;
  gap: 4px;
}

.ai-thinking-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--ai-accent);
  animation: dotPulse 1.2s infinite ease-in-out;
}

.ai-thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-thinking-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; }
  40% { transform: scale(1.2); opacity: 1; }
}

/* ==========================================================================
   APPROPRIATELY SIZED ANSWER BUBBLE
   ========================================================================== */

.ai-answer-bubble {
  background-color: var(--ai-bubble-bg);
  color: var(--ai-text-body);
  border: 1.5px solid var(--ai-bubble-border);
  border-radius: 22px 22px 22px 8px;
  padding: 18px 20px 16px 20px;
  box-shadow: var(--ai-bubble-shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: all 0.25s ease;
  animation: bubbleFloat 4s infinite ease-in-out;
}

@keyframes bubbleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* Bubble Header: Question Pill & Dismiss ✕ */
.ai-bubble-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--ai-bubble-border);
  padding-bottom: 8px;
}

.ai-question-tag {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ai-accent);
  background-color: var(--ai-pill-bg);
  padding: 3px 10px;
  border-radius: 9999px;
  max-width: calc(100% - 28px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-dismiss-btn {
  background: transparent;
  border: none;
  color: var(--ai-text-sub);
  cursor: pointer;
  padding: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.ai-dismiss-btn:hover {
  background-color: var(--ai-pill-hover);
  color: var(--ai-text-title);
  transform: scale(1.1);
}

/* Bubble Body: Rendered Answer */
.ai-bubble-body {
  font-size: 0.89rem;
  line-height: 1.55;
  color: var(--ai-text-body);
  max-height: 320px;
  overflow-y: auto;
  scrollbar-width: thin;
  padding-right: 4px;
}

.ai-bubble-body p {
  margin: 0 0 8px 0;
}

.ai-bubble-body p:last-child {
  margin-bottom: 0;
}

.ai-bubble-body ul, .ai-bubble-body ol {
  margin: 6px 0;
  padding-left: 18px;
}

.ai-bubble-body li {
  margin-bottom: 4px;
}

.ai-bubble-body a {
  color: var(--ai-accent);
  text-decoration: underline;
  font-weight: 500;
}

/* Bubble Footer: Clean Latency Tag (No host/model mentions) */
.ai-bubble-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-size: 0.72rem;
  color: var(--ai-text-sub);
  margin-top: 4px;
}

.ai-bubble-latency {
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* Responsive */
@media (max-width: 1023px) {
  .ai-assistant-container {
    max-width: 100%;
    margin-top: 24px;
    margin-bottom: 28px;
  }
}

/* ==========================================================================
   AI ASSISTANT ARCHITECTURE FLOWCHART MODAL & TRIGGER
   Matches editorial design tokens, buff/slate palette, and neo-editorial shadows
   ========================================================================== */

/* Trigger link button positioned under Geza's AI Assistant section */
.ai-arch-link-container {
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
}

.ai-arch-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  font-family: inherit;
  font-size: 0.79rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ai-text-sub);
  background: rgba(92, 100, 112, 0.08);
  border: 1px solid rgba(92, 100, 112, 0.22);
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  line-height: 1.25;
  outline: none;
}

.ai-arch-trigger-btn:hover {
  color: var(--ai-accent);
  background: var(--c-buff, #f7e0c1);
  border-color: var(--ai-accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--ai-accent-rgb), 0.15);
}

.ai-arch-trigger-btn:focus-visible {
  outline: 2px solid var(--ai-accent);
  outline-offset: 2px;
}

.ai-arch-btn-icon {
  color: var(--ai-accent);
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.ai-arch-btn-arrow {
  transition: transform 0.2s ease;
  font-weight: 700;
  color: var(--ai-accent);
}

.ai-arch-trigger-btn:hover .ai-arch-btn-arrow {
  transform: translateX(3px);
}

/* Body lock when modal is open */
body.ai-modal-open {
  overflow: hidden !important;
}

/* Modal Backdrop (Centered popup frame) */
.ai-arch-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(18, 20, 24, 0.68);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-arch-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Modal Frame */
.ai-arch-modal-frame {
  background-color: #FAF7F0;
  background-image: 
    radial-gradient(circle at 100% 0%, rgba(247, 224, 193, 0.5) 0%, transparent 45%),
    radial-gradient(circle at 0% 100%, rgba(92, 100, 112, 0.08) 0%, transparent 40%);
  border: 2px solid #111111;
  border-radius: 14px;
  box-shadow: 8px 8px 0px #111111, 0 24px 50px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  outline: none;
  overflow: hidden;
  transform: scale(0.96) translateY(12px);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-arch-modal-backdrop.is-open .ai-arch-modal-frame {
  transform: scale(1) translateY(0);
}

.ai-arch-modal-frame:focus-visible {
  outline: 2px solid var(--ai-accent);
  outline-offset: -2px;
}

/* Modal Header */
.ai-arch-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 16px;
  border-bottom: 1.5px solid rgba(17, 17, 17, 0.12);
  background: rgba(247, 224, 193, 0.32);
}

.ai-arch-modal-titles {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ai-arch-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ai-arch-badge-pill {
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 9999px;
  background: rgba(92, 100, 112, 0.12);
  color: #474E59;
  border: 1px solid rgba(92, 100, 112, 0.24);
}

.ai-arch-badge-pill.highlight {
  background: rgba(34, 197, 94, 0.14);
  color: #15803D;
  border-color: rgba(34, 197, 94, 0.35);
}

.ai-arch-modal-heading {
  font-family: var(--font-title, 'Raleway', sans-serif);
  font-size: 1.42rem;
  font-weight: 800;
  color: #111111;
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.ai-arch-modal-subheading {
  font-size: 0.86rem;
  color: #555555;
  margin: 0;
  line-height: 1.4;
}

/* Close Button */
.ai-arch-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1.5px solid #111111;
  background: #FFFFFF;
  color: #111111;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 2px 2px 0px #111111;
  transition: all 0.18s ease;
  outline: none;
}

.ai-arch-close-btn:hover {
  background: #111111;
  color: #FFFFFF;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px var(--ai-accent);
}

.ai-arch-close-btn:focus-visible {
  outline: 2px solid var(--ai-accent);
  outline-offset: 2px;
}

/* Modal Body */
.ai-arch-modal-body {
  padding: 22px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
  scrollbar-width: thin;
}

/* FLOWCHART PIPELINE */
.ai-flowchart {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 6px;
}

/* Step Card */
.ai-flow-step {
  background: #FFFFFF;
  border: 1.5px solid #111111;
  border-radius: 12px;
  padding: 16px 14px;
  box-shadow: 4px 4px 0px #111111;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.ai-flow-step:hover {
  transform: translateY(-2px);
  box-shadow: 5px 5px 0px #111111;
}

.ai-flow-step.highlight-step {
  background: #FFFDF9;
  border-color: var(--ai-accent);
  box-shadow: 4px 4px 0px var(--ai-accent);
}

.ai-step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.ai-step-badge {
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
  font-weight: 700;
  color: #5C6470;
  letter-spacing: 0.05em;
}

.ai-step-badge.highlight {
  color: var(--ai-accent);
}

.ai-step-icon-wrap {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(247, 224, 193, 0.45);
  border: 1px solid rgba(17, 17, 17, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111111;
  flex-shrink: 0;
}

.ai-flow-step.highlight-step .ai-step-icon-wrap {
  background: rgba(var(--ai-accent-rgb), 0.12);
  color: var(--ai-accent);
  border-color: rgba(var(--ai-accent-rgb), 0.3);
}

.ai-step-title {
  font-family: var(--font-title, 'Raleway', sans-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: #111111;
  margin: 0;
  line-height: 1.25;
}

.ai-step-desc {
  font-size: 0.8rem;
  color: #444444;
  line-height: 1.45;
  margin: 0;
  flex: 1;
}

.ai-step-footer {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 8px;
  border-top: 1px dashed rgba(17, 17, 17, 0.14);
}

.ai-step-tag {
  font-weight: 700;
  font-size: 0.74rem;
  color: #111111;
}

.ai-step-tag.accent {
  color: var(--ai-accent);
}

.ai-step-subnote {
  color: #777777;
  font-size: 0.7rem;
  line-height: 1.2;
}

/* Connecting Arrow between steps */
.ai-flow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ai-accent);
  font-size: 1.35rem;
  font-weight: 800;
  padding: 0 2px;
  user-select: none;
}

.ai-arrow-symbol {
  animation: aiArrowGlide 2s infinite ease-in-out;
  display: inline-block;
}

@keyframes aiArrowGlide {
  0%, 100% { transform: translateX(0); opacity: 0.75; }
  50% { transform: translateX(3px); opacity: 1; }
}

/* RECRUITER TAKEAWAYS / VALUE BOXES */
.ai-arch-takeaways {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.ai-takeaway-card {
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px solid rgba(17, 17, 17, 0.14);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.ai-takeaway-icon {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}

.ai-takeaway-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ai-takeaway-title {
  font-family: var(--font-title, 'Raleway', sans-serif);
  font-size: 0.85rem;
  font-weight: 700;
  color: #111111;
  margin: 0;
  line-height: 1.25;
}

.ai-takeaway-desc {
  font-size: 0.76rem;
  color: #555555;
  line-height: 1.4;
  margin: 0;
}

/* Modal Footer */
.ai-arch-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  border-top: 1.5px solid rgba(17, 17, 17, 0.12);
  background: rgba(247, 224, 193, 0.22);
}

.ai-arch-footer-hint {
  font-size: 0.78rem;
  color: #666666;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-arch-footer-hint kbd {
  display: inline-block;
  padding: 2px 6px;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 700;
  background: #FFFFFF;
  border: 1px solid #111111;
  border-radius: 4px;
  box-shadow: 1px 1px 0px #111111;
  color: #111111;
}

.ai-arch-close-action {
  padding: 8px 20px;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  background: #111111;
  color: #FFFFFF;
  border: 1.5px solid #111111;
  border-radius: 8px;
  box-shadow: 3px 3px 0px var(--ai-accent);
  cursor: pointer;
  transition: all 0.18s ease;
  outline: none;
}

.ai-arch-close-action:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0px var(--ai-accent);
  background: var(--ai-accent);
  border-color: var(--ai-accent);
}

.ai-arch-close-action:focus-visible {
  outline: 2px solid var(--ai-accent);
  outline-offset: 2px;
}

/* RESPONSIVE BREAKPOINTS FOR FLOWCHART */
@media (max-width: 860px) {
  .ai-arch-modal-backdrop {
    padding: 12px;
  }

  .ai-arch-modal-frame {
    max-height: 94vh;
  }

  .ai-flowchart {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .ai-flow-arrow {
    transform: rotate(90deg);
    padding: 2px 0;
  }

  .ai-arch-takeaways {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .ai-arch-modal-header {
    padding: 16px 18px 12px;
  }

  .ai-arch-modal-body {
    padding: 16px 18px;
  }

  .ai-arch-modal-footer {
    padding: 12px 18px;
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 10px;
  }

  .ai-arch-close-action {
    width: 100%;
    text-align: center;
  }

  .ai-arch-footer-hint {
    justify-content: center;
  }
}

/* DARK MODE ADAPTATIONS */
html.dark .ai-arch-modal-frame,
body.dark .ai-arch-modal-frame,
.dark .ai-arch-modal-frame {
  background-color: #18181B;
  background-image: none;
  border-color: #3F3F46;
  box-shadow: 8px 8px 0px #38BDF8, 0 24px 50px rgba(0, 0, 0, 0.6);
}

html.dark .ai-arch-modal-header,
body.dark .ai-arch-modal-header,
.dark .ai-arch-modal-header {
  background: rgba(39, 39, 42, 0.65);
  border-bottom-color: #27272A;
}

html.dark .ai-arch-modal-heading,
body.dark .ai-arch-modal-heading,
.dark .ai-arch-modal-heading {
  color: #F4F4F5;
}

html.dark .ai-arch-modal-subheading,
body.dark .ai-arch-modal-subheading,
.dark .ai-arch-modal-subheading {
  color: #A1A1AA;
}

html.dark .ai-flow-step,
body.dark .ai-flow-step,
.dark .ai-flow-step {
  background: #27272A;
  border-color: #3F3F46;
  box-shadow: 4px 4px 0px #09090B;
}

html.dark .ai-flow-step.highlight-step,
body.dark .ai-flow-step.highlight-step,
.dark .ai-flow-step.highlight-step {
  background: #2D2A26;
  border-color: #38BDF8;
  box-shadow: 4px 4px 0px #38BDF8;
}

html.dark .ai-step-title,
body.dark .ai-step-title,
.dark .ai-step-title {
  color: #F4F4F5;
}

html.dark .ai-step-desc,
body.dark .ai-step-desc,
.dark .ai-step-desc {
  color: #D4D4D8;
}

html.dark .ai-takeaway-card,
body.dark .ai-takeaway-card,
.dark .ai-takeaway-card {
  background: #27272A;
  border-color: #3F3F46;
}

html.dark .ai-takeaway-title,
body.dark .ai-takeaway-title,
.dark .ai-takeaway-title {
  color: #F4F4F5;
}

html.dark .ai-takeaway-desc,
body.dark .ai-takeaway-desc,
.dark .ai-takeaway-desc {
  color: #A1A1AA;
}

html.dark .ai-arch-close-btn,
body.dark .ai-arch-close-btn,
.dark .ai-arch-close-btn {
  background: #27272A;
  border-color: #3F3F46;
  color: #F4F4F5;
  box-shadow: 2px 2px 0px #09090B;
}

html.dark .ai-arch-modal-footer,
body.dark .ai-arch-modal-footer,
.dark .ai-arch-modal-footer {
  background: #202023;
  border-top-color: #27272A;
}

