:root {
    /* WriteCrisp Official Palette - Light (Paper) */
    --wp-bg-primary: #FAF9F6;
    --wp-bg-secondary: #F0EDE6;
    --wp-bg-tertiary: #E8E4DB;
    --wp-bg-input: #FFFFFF;
    --wp-accent: #D97706;
    --wp-accent-glow: rgba(217, 119, 6, 0.4);
    --wp-text-primary: #1A1A1A;
    --wp-text-secondary: #6B6560;
    --wp-text-tertiary: #9B958E;
    --wp-border: rgba(0, 0, 0, 0.08);
    --wp-success: #059669;
    --wp-radius: 16px;
    --wp-radius-sm: 10px;
    
    --wp-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --wp-font-serif: 'Newsreader', 'Georgia', serif;

    /* Deep Liquid Glass Tokens - Light */
    --wp-glass-bg: rgba(250, 249, 246, 0.45);
    --wp-glass-border: rgba(0, 0, 0, 0.05);
    --wp-glass-highlight: rgba(255, 255, 255, 0.8);
    --wp-glass-blur: 32px; /* 64px was visually identical but far heavier on the GPU */
    --wp-glass-saturate: 200%;
    --wp-shadow-premium: 0 8px 32px 0 rgba(0, 0, 0, 0.06);
}

[data-theme='dark'] {
    /* WriteCrisp Official Palette - Dark (Ink) */
    --wp-bg-primary: #0F0F0F;
    --wp-bg-secondary: #1A1A1A;
    --wp-bg-tertiary: #232323;
    --wp-bg-input: #151515;
    --wp-accent: #F59E0B;
    --wp-accent-glow: rgba(245, 158, 11, 0.3);
    --wp-text-primary: #F0EDE6;
    --wp-text-secondary: #9B958E;
    --wp-text-tertiary: #6B6560;
    --wp-border: rgba(255, 255, 255, 0.08);
    --wp-success: #34D399;

    /* Deep Liquid Glass Tokens - Dark */
    --wp-glass-bg: rgba(20, 20, 20, 0.4);
    --wp-glass-border: rgba(255, 255, 255, 0.06);
    --wp-glass-highlight: rgba(255, 255, 255, 0.15);
    --wp-shadow-premium: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

/* Basic Reset */
* { box-sizing: border-box; margin: 0; padding: 0; }
html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--wp-bg-primary);
    color: var(--wp-text-primary);
    font-family: var(--wp-font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Ambient Background --- */
.ambient-container {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: move 20s infinite alternate ease-in-out;
}

.blob-1 {
    width: 400px; height: 400px;
    background: var(--wp-bg-secondary);
    top: -100px; right: -100px;
    animation-duration: 25s;
}

.blob-2 {
    width: 500px; height: 500px;
    background: var(--wp-accent);
    bottom: -150px; left: -100px;
    opacity: 0.08;
    animation-duration: 30s;
    animation-delay: -5s;
}

.blob-3 {
    width: 300px; height: 300px;
    background: var(--wp-bg-tertiary);
    top: 40%; left: 20%;
    animation-duration: 20s;
    animation-delay: -10s;
}

@keyframes move {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(100px, 50px) scale(1.1); }
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Liquid Glass Material Class --- */
.glass-material {
    background: var(--wp-glass-bg);
    backdrop-filter: blur(var(--wp-glass-blur)) saturate(var(--wp-glass-saturate));
    -webkit-backdrop-filter: blur(var(--wp-glass-blur)) saturate(var(--wp-glass-saturate));
    border: 1px solid var(--wp-glass-border);
    border-top: 1px solid var(--wp-glass-highlight);
    border-left: 1px solid var(--wp-glass-highlight);
    box-shadow: var(--wp-shadow-premium);
}

/* --- Navigation --- */
nav {
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 20px;
    margin: 0 1.5rem;
    border-radius: 20px;
    z-index: 1000;
    transition: all 0.3s ease;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--wp-text-primary);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
}

.logo img { width: 28px; height: 28px; }

.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a {
    text-decoration: none;
    color: var(--wp-text-secondary);
    font-size: 0.9rem;
    font-weight: 600; /* Increased weight for legibility on deep glass */
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--wp-text-primary); }

.btn-install {
    background: var(--wp-accent);
    color: #ffffff !important; /* White text on orange by default (light theme) */
    padding: 0.6rem 1.4rem;
    border-radius: var(--wp-radius-sm);
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap; /* Never wrap to two lines (would collide with the logo) */
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.btn-install:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

[data-theme='dark'] .btn-install {
    color: #000000 !important; /* Black text on orange for dark theme */
}

/* --- Hero --- */
header.hero {
    padding: 8rem 0 6rem;
    text-align: center;
}

h1 {
    font-family: var(--wp-font-serif);
    font-size: 4.5rem;
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    background: linear-gradient(180deg, var(--wp-text-primary) 0%, var(--wp-text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.4rem;
    color: var(--wp-text-secondary);
    max-width: 700px;
    margin: 0 auto 3.5rem;
    font-weight: 400;
}

.hero-cta { display: flex; gap: 1.5rem; justify-content: center; }

.btn {
    padding: 1rem 2.2rem;
    border-radius: var(--wp-radius);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 1.05rem;
}

.btn-primary {
    background: var(--wp-accent);
    color: #ffffff !important; /* White text on orange by default (light theme) */
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

[data-theme='dark'] .btn-primary {
    color: #000000 !important; /* Black text on orange for dark theme */
}

.btn-outline {
    border: 1px solid var(--wp-border);
    color: var(--wp-text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.btn-outline:hover {
    background: var(--wp-bg-secondary);
    transform: translateY(-2px);
}

/* --- Demo Browser Window --- */
.demo-window {
    max-width: 950px;
    margin: 4rem auto 8rem;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
}

.demo-header {
    background: rgba(0, 0, 0, 0.03);
    height: 54px;
    display: flex; align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--wp-glass-border);
}

.dot-group { display: flex; gap: 8px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(0,0,0,0.1); }
.dot.red { background: #FF5F56; }
.dot.yellow { background: #FFBD2E; }
.dot.green { background: #27C93F; }

.demo-address-bar {
    flex-grow: 1; height: 32px; background: var(--wp-bg-primary);
    border-radius: 10px; margin: 0 20px 0 14px; border: 1px solid var(--wp-border);
    display: flex; align-items: center; padding-left: 14px;
    font-size: 12px; color: var(--wp-text-tertiary);
    opacity: 0.6;
}

/* Replay button in the demo browser chrome */
.demo-refresh-btn {
    width: 28px; height: 28px;
    margin-left: 14px;
    display: flex; align-items: center; justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--wp-text-tertiary);
    cursor: pointer;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.demo-refresh-btn:hover {
    color: var(--wp-accent);
    background: var(--wp-bg-secondary);
    border-color: var(--wp-border);
    transform: rotate(90deg);
}

.demo-content {
    padding: 50px;
    min-height: 450px;
    position: relative;
}

#demo-textarea {
    width: 100%;
    height: 300px;
    border: none;
    outline: none;
    background: transparent;
    font-family: var(--wp-font-sans);
    font-size: 1.35rem; /* Slightly smaller for density */
    color: var(--wp-text-primary);
    overflow-y: auto;
    line-height: 1.5;
    padding-bottom: 40px;
    scrollbar-width: none;
}

#demo-textarea::-webkit-scrollbar { display: none; }

#demo-textarea[contenteditable]:empty:before {
    content: attr(data-placeholder);
    color: var(--wp-text-tertiary);
    opacity: 0.5;
}

/* Markdown styling inside the main editor - Tightened */
#demo-textarea h3 {
    font-family: var(--wp-font-serif);
    font-size: 1.6rem;
    margin: 1rem 0 0.5rem; /* Reduced top/bottom margin */
    color: var(--wp-accent);
}

#demo-textarea p {
    margin-bottom: 0.75rem; /* Reduced margin */
}

#demo-textarea ul, #demo-textarea ol {
    margin-left: 1.5rem;
    margin-bottom: 0.75rem;
}

#demo-textarea li {
    margin-bottom: 0.3rem;
}

#demo-textarea strong {
    color: var(--wp-accent);
}

/* --- Suggestion Box Replica (1:1 from overlay.css) --- */
#wp-demo-box {
    /* Scoped Variables from overlay.css */
    --wp-box-bg-primary:      #FAF9F6;
    --wp-box-bg-secondary:    #F0EDE6;
    --wp-box-bg-tertiary:     #E8E4DB;
    --wp-box-bg-input:        #FFFFFF;
    --wp-box-bg-hover:        rgba(0, 0, 0, 0.03);
    --wp-box-text-primary:    #1A1A1A;
    --wp-box-text-secondary:  #6B6560;
    --wp-box-text-tertiary:   #9B958E;
    --wp-box-border:          rgba(0, 0, 0, 0.08);
    --wp-box-border-soft:     rgba(0, 0, 0, 0.05);
    --wp-box-accent:          #D97706;
    --wp-box-accent-bg:       rgba(217, 119, 6, 0.08);
    --wp-box-accent-border:   rgba(217, 119, 6, 0.2);
    --wp-box-accent-text:     #B45309;
    --wp-box-success:         #059669;
    --wp-box-success-bg:      rgba(5, 150, 105, 0.08);
    --wp-box-success-border:  rgba(5, 150, 105, 0.25);
    --wp-box-error:           #DC2626;
    --wp-box-error-bg:        rgba(220, 38, 38, 0.06);
    --wp-box-btn-primary-bg:  #1A1A1A;
    --wp-box-btn-primary-text:#FFFFFF;
    --wp-box-btn-secondary-bg:rgba(0, 0, 0, 0.05);
    --wp-box-btn-secondary-text: #6B6560;
    --wp-box-shadow:          0 4px 24px -4px rgba(0, 0, 0, 0.14),
                              0 0 0 1px rgba(0, 0, 0, 0.07);
    --wp-box-shadow-sm:       0 1px 3px rgba(0, 0, 0, 0.06);
  
    position: absolute;
    top: 140px;
    right: 50px;
    width: 400px;
    max-width: calc(100vw - 32px);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-size: 13px;
    line-height: 1.5;
    color: var(--wp-box-text-primary);
    background: var(--wp-box-bg-primary);
    border: 1px solid var(--wp-box-border);
    border-radius: 14px;
    box-shadow: var(--wp-box-shadow);
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 50;
  }
  
  /* Dark mode overrides for the demo box itself */
  [data-theme='dark'] #wp-demo-box {
    --wp-box-bg-primary:      #1A1A1A;
    --wp-box-bg-secondary:    #232323;
    --wp-box-bg-tertiary:     #2D2D2D;
    --wp-box-bg-input:        #2D2D2D;
    --wp-box-bg-hover:        rgba(255, 255, 255, 0.04);
    --wp-box-text-primary:    #E8E4DB;
    --wp-box-text-secondary:  #9B958E;
    --wp-box-text-tertiary:   #6B6560;
    --wp-box-border:          rgba(255, 255, 255, 0.08);
    --wp-box-border-soft:     rgba(255, 255, 255, 0.05);
    --wp-box-accent:          #F59E0B;
    --wp-box-accent-bg:       rgba(245, 158, 11, 0.1);
    --wp-box-accent-border:   rgba(245, 158, 11, 0.25);
    --wp-box-accent-text:     #FBBF24;
    --wp-box-success:         #34D399;
    --wp-box-success-bg:      rgba(52, 211, 153, 0.1);
    --wp-box-success-border:  rgba(52, 211, 153, 0.25);
    --wp-box-error:           #F87171;
    --wp-box-error-bg:        rgba(248, 113, 113, 0.08);
    --wp-box-btn-primary-bg:  #E8E4DB;
    --wp-box-btn-primary-text:#1A1A1A;
    --wp-box-btn-secondary-bg:rgba(255, 255, 255, 0.06);
    --wp-box-btn-secondary-text: #9B958E;
    --wp-box-shadow:          0 4px 24px -4px rgba(0, 0, 0, 0.45),
                              0 0 0 1px rgba(255, 255, 255, 0.07);
    --wp-box-shadow-sm:       0 1px 3px rgba(0, 0, 0, 0.25);
  }
  
  #wp-demo-box.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }
  
  #wp-demo-box .wp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--wp-box-bg-secondary);
    border-bottom: 1px solid var(--wp-box-border);
    cursor: default;
    touch-action: none; /* allow pointer-based dragging on touch screens */
  }

  #wp-demo-box .wp-header-actions {
    display: flex;
    align-items: center;
    gap: 2px;
  }
  
  #wp-demo-box .wp-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  #wp-demo-box .wp-icon {
    width: 15px;
    height: 15px;
    color: var(--wp-box-accent);
    flex-shrink: 0;
  }
  
  #wp-demo-box .wp-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--wp-box-text-primary);
  }
  
  #wp-demo-box .wp-mode-badge {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 2px 8px;
    border-radius: 100px;
    background: var(--wp-box-bg-tertiary);
    color: var(--wp-box-text-tertiary);
    border: 1px solid var(--wp-box-border);
    text-transform: none;
  }

  /* --- Mode Picker UI Styles (Exact Vertical List) --- */
  #wp-demo-box .wp-mode-picker {
    padding: 14px 16px;
    background: var(--wp-box-bg-primary);
  }

  #wp-demo-box .wp-picker-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--wp-box-accent);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--wp-box-border-soft);
  }

  #wp-demo-box .wp-picker-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
  }

  #wp-demo-box .wp-picker-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--wp-box-accent-bg);
    border: 1px solid var(--wp-box-accent-border);
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: all 0.15s ease;
    width: 100%;
    color: var(--wp-box-accent-text);
  }

  #wp-demo-box .wp-picker-btn:hover {
    background: var(--wp-box-accent);
    border-color: var(--wp-box-accent);
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: var(--wp-box-shadow-sm);
  }

  #wp-demo-box .wp-picker-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: inherit;
  }

  #wp-demo-box .wp-picker-label {
    font-size: 12px;
    font-weight: 600;
    color: inherit;
    letter-spacing: 0.01em;
  }

  #wp-demo-box .wp-hotkey-badge {
    margin-left: auto;
    background: var(--wp-box-bg-tertiary);
    color: var(--wp-box-text-tertiary);
    border: 1px solid var(--wp-box-border);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 9px;
    font-weight: 800;
    font-family: inherit;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
    pointer-events: none;
    opacity: 0.8;
    transition: all 0.15s ease;
  }

  #wp-demo-box .wp-picker-btn:hover .wp-hotkey-badge {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
    opacity: 1;
  }

  #wp-demo-box .wp-picker-custom {
    display: flex;
    gap: 6px;
    align-items: center;
  }

  #wp-demo-box .wp-picker-input {
    flex: 1;
    background: var(--wp-box-bg-input);
    color: var(--wp-box-text-primary);
    border: 1px solid var(--wp-box-border);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    font-family: inherit;
    outline: none;
    transition: all 0.15s ease;
    min-width: 0;
  }

  #wp-demo-box .wp-picker-input:focus {
    border-color: var(--wp-box-accent);
    box-shadow: 0 0 0 2px var(--wp-box-accent-bg);
  }

  #wp-demo-box .wp-picker-apply {
    flex-direction: row;
    padding: 8px 14px;
    gap: 6px;
    flex-shrink: 0;
    width: auto;
    background: var(--wp-box-btn-primary-bg);
    color: var(--wp-box-btn-primary-text);
  }

  #wp-demo-box .wp-mode-grammar {
    background: var(--wp-box-success-bg);
    color: var(--wp-box-success);
    border-color: var(--wp-box-success-border);
  }

  #wp-demo-box .wp-mode-prompt,
  #wp-demo-box .wp-mode-custom,
  #wp-demo-box .wp-mode-caveman,
  #wp-demo-box .wp-mode-explain {
    background: var(--wp-box-accent-bg);
    color: var(--wp-box-accent-text);
    border-color: var(--wp-box-accent-border);
  }

  #wp-demo-box .wp-close-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    color: var(--wp-box-text-tertiary);
    padding: 0;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    flex-shrink: 0;
  }

  #wp-demo-box .wp-close-btn:hover {
    background: var(--wp-box-error-bg);
    color: var(--wp-box-error);
    border-color: rgba(220, 38, 38, 0.15);
  }

  #wp-demo-box .wp-close-btn svg {
    width: 13px;
    height: 13px;
  }

  /* Reload-to-picker button shares the close-button shell, accent hover */
  #wp-demo-box .wp-reload-btn:hover {
    background: var(--wp-box-accent-bg);
    color: var(--wp-box-accent-text);
    border-color: var(--wp-box-accent-border);
  }
  
  #wp-demo-box .wp-body {
    padding: 12px 16px;
    max-height: 220px;
    overflow-y: auto;
    scrollbar-width: none;
  }
  #wp-demo-box .wp-body::-webkit-scrollbar { display: none; }
  
  #wp-demo-box .wp-suggestion-text {
    font-size: 13px;
    line-height: 1.65;
    color: var(--wp-box-text-primary);
    word-break: break-word;
    background: var(--wp-box-bg-secondary);
    border: 1px solid var(--wp-box-border-soft);
    border-radius: 8px;
    padding: 12px 20px;
    transition: none; /* Avoid transitions during streaming */
  }
  
  #wp-demo-box .wp-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-top: 1px solid var(--wp-box-border-soft);
    background: var(--wp-box-bg-secondary);
  }
  
  #wp-demo-box .wp-stats {
    font-size: 11px;
    color: var(--wp-box-text-secondary);
    letter-spacing: 0.01em;
    font-weight: normal;
  }
  
  #wp-demo-box .wp-actions {
    display: flex;
    gap: 6px;
  }
  
  #wp-demo-box .wp-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    border: 1px solid transparent;
  }
  
  #wp-demo-box .wp-btn-dismiss {
    background: var(--wp-box-btn-secondary-bg);
    color: var(--wp-box-btn-secondary-text);
    border: 1px solid var(--wp-box-border);
  }
  
  #wp-demo-box .wp-btn-dismiss:hover {
    background: var(--wp-box-bg-tertiary);
    color: var(--wp-box-text-primary);
    border-color: var(--wp-box-border);
  }
  
  #wp-demo-box .wp-btn-accept {
    background: var(--wp-box-btn-primary-bg);
    color: var(--wp-box-btn-primary-text) !important;
    border: 1px solid transparent;
    box-shadow: var(--wp-box-shadow-sm);
  }
  
  #wp-demo-box .wp-btn-accept:hover {
    opacity: 0.88;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  }

  .wp-streaming::after {
    content: "▍";
    display: inline-block;
    color: var(--wp-box-accent);
    animation: wp-blink 0.7s step-end infinite;
    margin-left: 1px;
  }
  
  @keyframes wp-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
  }

  @keyframes wp-word-in {
    from { opacity: 0; transform: translateY(2px); }
    to   { opacity: 1; transform: translateY(0);   }
  }
  
  #wp-demo-box .wp-stream-word {
    display: inline;
    animation: wp-word-in 100ms ease-out forwards;
  }

  /* Zoom scale for the result surfaces (Ctrl+scroll / − +) */
  #wp-demo-box { --wp-box-zoom-scale: 1; }

  /* "Add a custom mode" button under the picker */
  #wp-demo-box .wp-add-custom-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 8px;
    padding: 8px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    color: var(--wp-box-text-secondary);
    background: transparent;
    border: 1px dashed var(--wp-box-border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
  }
  #wp-demo-box .wp-add-custom-btn svg { width: 14px; height: 14px; }
  #wp-demo-box .wp-add-custom-btn:hover {
    color: var(--wp-box-accent);
    border-color: var(--wp-box-accent-border);
    background: var(--wp-box-accent-bg);
  }

  /* Preset chooser (simulated custom-mode picker) */
  #wp-demo-box .wp-preset-hint {
    font-size: 12px;
    line-height: 1.5;
    color: var(--wp-box-text-secondary);
    margin-bottom: 12px;
  }
  #wp-demo-box .wp-preset-list { display: flex; flex-direction: column; gap: 8px; }
  #wp-demo-box .wp-preset-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    font-family: inherit;
    color: var(--wp-box-text-primary);
    background: var(--wp-box-bg-secondary);
    border: 1px solid var(--wp-box-border-soft);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
  }
  #wp-demo-box .wp-preset-btn:hover {
    border-color: var(--wp-box-accent-border);
    background: var(--wp-box-accent-bg);
  }
  #wp-demo-box .wp-preset-name { font-size: 13px; font-weight: 700; }
  #wp-demo-box .wp-preset-desc { font-size: 11px; color: var(--wp-box-text-tertiary); margin-left: 8px; flex: 1; }
  #wp-demo-box .wp-preset-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 12px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    color: var(--wp-box-text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
  }
  #wp-demo-box .wp-preset-back svg { width: 14px; height: 14px; }
  #wp-demo-box .wp-preset-back:hover { color: var(--wp-box-text-primary); }

  /* Result view tabs + zoom (1:1 with overlay.css) */
  #wp-demo-box .wp-view-tabs-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--wp-box-border-soft);
    margin-bottom: 10px;
  }
  #wp-demo-box .wp-view-tabs { display: flex; gap: 2px; }
  #wp-demo-box .wp-view-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 600;
    font-family: inherit;
    color: var(--wp-box-text-tertiary);
    cursor: pointer;
  }
  #wp-demo-box .wp-view-tab:hover { color: var(--wp-box-text-primary); }
  #wp-demo-box .wp-view-tab.active {
    color: var(--wp-box-accent);
    border-bottom-color: var(--wp-box-accent);
  }
  #wp-demo-box .wp-zoom-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: -1px;
    padding-bottom: 4px;
  }
  #wp-demo-box .wp-zoom-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--wp-box-text-tertiary);
    margin-right: 4px;
    user-select: none;
  }
  #wp-demo-box .wp-zoom-btn {
    background: var(--wp-box-bg-hover);
    border: 1px solid var(--wp-box-border-soft);
    border-radius: 4px;
    color: var(--wp-box-text-primary);
    cursor: pointer;
    width: 20px; height: 20px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 600; line-height: 1;
    padding: 0;
    transition: all 0.2s ease;
    user-select: none;
  }
  #wp-demo-box .wp-zoom-btn:hover { background: var(--wp-box-border); color: var(--wp-box-accent); }

  /* Clean tab: raw editable textarea (matches product — no markdown render) */
  #wp-demo-box .wp-suggestion-text.wp-clean-mode {
    background: transparent;
    border: none;
    padding: 0;
  }
  #wp-demo-box .wp-clean-edit {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    resize: none;      /* demo: read-only result, not resizable */
    cursor: default;
    min-height: 110px;
    font-family: inherit;
    font-size: calc(13px * var(--wp-box-zoom-scale, 1));
    line-height: 1.6;
    color: var(--wp-box-text-primary);
    background: var(--wp-box-bg-input);
    border: 1px solid var(--wp-box-border);
    border-radius: 8px;
    padding: 10px 12px;
    outline: none;
  }
  #wp-demo-box .wp-clean-edit:focus {
    border-color: var(--wp-box-accent);
    box-shadow: 0 0 0 2px var(--wp-box-accent-bg);
  }

  /* Side-by-side columns */
  #wp-demo-box .wp-side { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  #wp-demo-box .wp-side-col {
    border: 1px solid var(--wp-box-border-soft);
    border-radius: 8px;
    padding: 8px 10px;
    background: var(--wp-box-bg-secondary);
    white-space: pre-wrap;
    word-break: break-word;
    font-size: calc(12px * var(--wp-box-zoom-scale, 1));
    line-height: 1.55;
  }
  #wp-demo-box .wp-side-title {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--wp-box-text-tertiary);
    margin-bottom: 6px;
  }
  /* Inline-diff surface honours zoom too */
  #wp-demo-box .wp-suggestion-text:not(.wp-clean-mode) { font-size: calc(13px * var(--wp-box-zoom-scale, 1)); }

  /* Copy button (Explain result) */
  #wp-demo-box .wp-btn-copy {
    background: var(--wp-box-btn-secondary-bg);
    color: var(--wp-box-text-primary);
    border: 1px solid var(--wp-box-border);
  }
  #wp-demo-box .wp-btn-copy:hover { background: var(--wp-box-bg-tertiary); border-color: var(--wp-box-border); }

  /* Explain hint under the editor */
  .demo-explain-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 1.5rem;
    text-align: center;
    color: var(--wp-text-tertiary);
    font-size: 0.95rem;
  }
  .demo-explain-hint svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--wp-accent); }
  .demo-explain-hint strong { color: var(--wp-text-secondary); }

  /* Mobile-only "Explain this" pill (touch fallback for the shortcut) */
  .demo-explain-pill {
    position: absolute;
    z-index: 60;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: var(--wp-accent);
    border: none;
    border-radius: 100px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
    cursor: pointer;
  }
  [data-theme='dark'] .demo-explain-pill { color: #000; }
  .demo-explain-pill svg { width: 14px; height: 14px; }
  /* The "not in the real product" disclaimer shown with the pill */
  .demo-explain-pill-note {
    display: block;
    margin-top: 1rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--wp-text-tertiary);
    font-style: italic;
  }

/* --- Section Shared --- */
.section-title {
    text-align: center;
    font-family: var(--wp-font-serif);
    font-size: 3rem;
    margin-bottom: 5rem;
    letter-spacing: -0.02em;
}

/* --- Setup Section --- */
.setup-section {
    padding: 6rem 0;
    margin-bottom: 4rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.step-card {
    text-align: center;
    padding: 2rem;
}

.step-number {
    font-family: var(--wp-font-serif);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--wp-accent);
    opacity: 0.3;
    margin-bottom: 1rem;
    line-height: 1;
}

.step-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.step-card p {
    color: var(--wp-text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

/* --- Features Section --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    margin-bottom: 8rem;
}

.feature-card {
    padding: 3rem;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.feature-card:hover { 
    transform: translateY(-8px);
    border-color: var(--wp-accent);
}

.feature-icon {
    color: var(--wp-accent);
    background: var(--wp-bg-secondary);
    width: 50px; height: 50px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px;
    margin-bottom: 0.5rem;
}

.feature-card h3 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.01em; }
.feature-card p { color: var(--wp-text-secondary); font-size: 1.1rem; line-height: 1.7; }

/* --- FAQ Section --- */
.faq-section {
    padding: 8rem 0;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.faq-item {
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
}

.faq-question {
    width: 100%;
    background: transparent;
    border: none;
    color: inherit;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-weight: 700;
    font-size: 1.1rem;
}

.faq-icon {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

/* Grid-rows technique: animates open to ANY content height
   (the old max-height:200px clipped long answers on mobile) */
.faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-answer-inner {
    overflow: hidden;
    min-height: 0;
}

.faq-item.active .faq-answer {
    grid-template-rows: 1fr;
}

.faq-answer p {
    color: var(--wp-text-secondary);
    line-height: 1.7;
    padding: 0 2rem 1.75rem;
}

/* --- Technical & Privacy --- */
.info-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    padding: 8rem 0;
    border-top: 1px solid var(--wp-border);
}

.info-block h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--wp-text-tertiary);
    margin-bottom: 3rem;
    font-weight: 800;
}

.info-list { list-style: none; }
.info-list li { margin-bottom: 2rem; display: flex; gap: 18px; }
.info-list li svg { flex-shrink: 0; margin-top: 4px; color: var(--wp-success); }
.info-list li strong { display: block; margin-bottom: 0.4rem; font-size: 1.1rem; font-weight: 700; }
.info-list li span { color: var(--wp-text-secondary); font-size: 1rem; }

/* --- Footer --- */
footer {
    padding: 6rem 0;
    border-top: 1px solid var(--wp-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--wp-text-tertiary);
    font-size: 0.9rem;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--wp-text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--wp-text-primary);
}

.theme-toggle {
    background: var(--wp-glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--wp-glass-border);
    border-radius: 12px;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    /* <button> elements don't inherit page color; set it explicitly so the
       currentColor icon stays visible in both themes (white-ish in dark). */
    color: var(--wp-text-primary);
}
.theme-toggle:hover { transform: rotate(15deg) scale(1.1); color: var(--wp-text-primary); }

/* --- Modal --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 90%;
    max-width: 650px;
    max-height: 80vh;
    border-radius: 24px;
    padding: 3rem;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.visible .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.modal-header h2 {
    font-family: var(--wp-font-serif);
    font-size: 2rem;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 2rem;
    color: var(--wp-text-tertiary);
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--wp-text-primary);
}

.modal-body h3 {
    margin: 2rem 0 1rem;
    font-size: 1.2rem;
}

.modal-body p {
    color: var(--wp-text-secondary);
    margin-bottom: 1.5rem;
}

.modal-body ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--wp-text-secondary);
}

.modal-body li {
    margin-bottom: 0.8rem;
}

/* --- Responsive Updates --- */
@media (max-width: 768px) {
    .features-grid, .steps-grid, .info-section { grid-template-columns: 1fr; gap: 3rem; }
    h1 { font-size: 3rem; }
    .hero p { font-size: 1.15rem; }
    .section-title { font-size: 2.2rem; margin-bottom: 3rem; }
    header.hero { padding: 6rem 0 4rem; }
    /* Hero CTAs: stack as compact, single-line pills so they don't dominate.
       Side-by-side forced two-line wrapping, which made them look oversized. */
    .hero-cta { flex-direction: column; align-items: center; gap: 0.7rem; }
    .btn {
        padding: 0.7rem 1.6rem;
        font-size: 0.9rem;
        white-space: nowrap;
        width: auto;
    }
    /* Break the nav out of the container padding so it's a clean,
       full-bleed sticky bar (no side gutters / hard-cut card edges) */
    nav {
        margin: 0 -1.5rem;
        top: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: none;
        border-bottom: 1px solid var(--wp-glass-border);
        padding: 1rem 1.5rem;
    }
    /* Keep only the logo + install CTA in the nav on small screens */
    .nav-links { gap: 1rem; }
    .nav-links a:not(.btn-install) { display: none; }
    .demo-content { padding: 24px; min-height: 0; }
    #demo-textarea { font-size: 1.1rem; height: 240px; }
    /* The hidden box must not reserve layout space on mobile
       (opacity:0 alone left a ~350px blank void in the demo) */
    #wp-demo-box { display: none; position: relative; top: 0; right: 0; width: 100%; margin-top: 2rem; transform: none; }
    #wp-demo-box.visible { display: block; }
    .feature-card { padding: 2rem; }
    .setup-section { padding: 4rem 0; margin-bottom: 2rem; }
    .faq-section, .info-section { padding: 4rem 0; }
    footer { flex-direction: column; gap: 2rem; text-align: center; padding: 4rem 0; align-items: center; }
    /* Center the stacked footer content (flexbox otherwise left-aligns it) */
    .footer-left { align-items: center; }
    .footer-links { justify-content: center; flex-wrap: wrap; }
    /* Static ambience on mobile — animated 80px blurs are GPU-expensive */
    .blob { animation: none; }
}

/* --- Very small phones (≤400px): keep the nav on a single tidy row --- */
@media (max-width: 400px) {
    nav { padding: 0.9rem 1rem; margin: 0 -1.5rem; }
    .logo { font-size: 1rem; gap: 8px; }
    .logo img { width: 24px; height: 24px; }
    .btn-install { padding: 0.55rem 0.9rem; font-size: 0.8rem; }
    h1 { font-size: 2.4rem; }
    .btn { padding: 0.65rem 1.4rem; font-size: 0.88rem; }
}

/* ── Anchor offset for the sticky nav ── */
#features, #how-it-works, #faq, #technical, #architecture {
    scroll-margin-top: 110px;
}

/* ── Keyboard focus visibility ── */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--wp-accent);
    outline-offset: 3px;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .blob { animation: none; }
    #WriteCrisp-suggestion-indicator.wp-indicator-visible { animation: none; }
    .wp-streaming::after { animation: none; }
    #wp-demo-box .wp-stream-word { animation: none; }
    #wp-demo-box,
    .feature-card,
    .btn,
    .btn-install,
    .faq-answer,
    .theme-toggle,
    .demo-refresh-btn { transition: none; }
}

/* ── Floating Suggestion Indicator (1:1 with Extension) ── */
#WriteCrisp-suggestion-indicator {
  position: absolute;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px 6px 10px;
  font-family: var(--wp-font-sans);
  font-size: 12px;
  font-weight: 600;
  color: #B45309;
  background: #FAF9F6;
  border: 1.5px solid rgba(217, 119, 6, 0.3);
  border-radius: 100px;
  cursor: pointer;
  box-shadow: 0 2px 12px -2px rgba(217, 119, 6, 0.15);
  opacity: 0;
  transform: translateY(4px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease, background 0.15s ease,
              border-color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
  white-space: nowrap;
}

#WriteCrisp-suggestion-indicator.wp-indicator-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  animation: wp-indicator-breath 2.4s ease-in-out infinite;
}

#WriteCrisp-suggestion-indicator:hover {
  background: rgba(217, 119, 6, 0.08);
  border-color: rgba(217, 119, 6, 0.5);
  box-shadow: 0 2px 16px -2px rgba(217, 119, 6, 0.25);
  animation: none;
}

#WriteCrisp-suggestion-indicator:active {
  transform: translateY(0) scale(0.97);
}

#WriteCrisp-suggestion-indicator .wp-indicator-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: #D97706;
}

#WriteCrisp-suggestion-indicator .wp-indicator-label {
  letter-spacing: 0.01em;
}

@keyframes wp-indicator-breath {
  0%, 100% {
    box-shadow: 0 2px 12px -2px rgba(217, 119, 6, 0.15),
                0 0 0 0 rgba(217, 119, 6, 0);
  }
  50% {
    box-shadow: 0 2px 16px -2px rgba(217, 119, 6, 0.25),
                0 0 0 4px rgba(217, 119, 6, 0.08);
  }
}

/* Dark theme overrides for indicator */
[data-theme="dark"] #WriteCrisp-suggestion-indicator {
  color: #FBBF24;
  background: #1A1A1A;
  border-color: rgba(245, 158, 11, 0.3);
  box-shadow: 0 2px 12px -2px rgba(245, 158, 11, 0.2);
}

[data-theme="dark"] #WriteCrisp-suggestion-indicator.wp-indicator-visible {
  animation: wp-indicator-breath-dark 2.4s ease-in-out infinite;
}

[data-theme="dark"] #WriteCrisp-suggestion-indicator:hover {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 2px 16px -2px rgba(245, 158, 11, 0.3);
  animation: none;
}

[data-theme="dark"] #WriteCrisp-suggestion-indicator .wp-indicator-icon {
  color: #F59E0B;
}

@keyframes wp-indicator-breath-dark {
  0%, 100% {
    box-shadow: 0 2px 12px -2px rgba(245, 158, 11, 0.2),
                0 0 0 0 rgba(245, 158, 11, 0);
  }
  50% {
    box-shadow: 0 2px 16px -2px rgba(245, 158, 11, 0.3),
                0 0 0 4px rgba(245, 158, 11, 0.1);
  }
}

/* ── Visual Diff Highlighting ── */
.wp-diff-added {
  color: #065F46 !important;
  background: rgba(5, 150, 105, 0.1) !important;
  border-bottom: 1.5px dashed rgba(5, 150, 105, 0.4) !important;
  text-decoration: none !important;
  padding: 0 2px !important;
  border-radius: 2px !important;
}

.wp-diff-removed {
  color: #991B1B !important;
  background: rgba(220, 38, 38, 0.08) !important;
  text-decoration: line-through !important;
  text-decoration-color: rgba(220, 38, 38, 0.5) !important;
  opacity: 0.7 !important;
  padding: 0 2px !important;
  border-radius: 2px !important;
}

/* Dark theme overrides for diff */
[data-theme="dark"] .wp-diff-added {
  color: #6EE7B7 !important;
  background: rgba(52, 211, 153, 0.12) !important;
  border-bottom-color: rgba(52, 211, 153, 0.4) !important;
}

[data-theme="dark"] .wp-diff-removed {
  color: #FCA5A5 !important;
  background: rgba(248, 113, 113, 0.1) !important;
  text-decoration-color: rgba(248, 113, 113, 0.5) !important;
}

/* ══════════════════════════════════════════════════════════
   Desktop download buttons (hero row) + download page
   ══════════════════════════════════════════════════════════ */

/* --- Hero download row --- */
.hero-downloads {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.hero-downloads-label {
    font-size: 0.9rem;
    color: var(--wp-text-tertiary);
    letter-spacing: 0.01em;
}
.download-row {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Own-SVG platform buttons — theme-consistent glass pills, neutral glyphs
   (no trademarked OS logos) so they inherit the accent/text colours. */
.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1.3rem;
    border-radius: var(--wp-radius);
    text-decoration: none;
    color: var(--wp-text-primary);
    background: var(--wp-glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--wp-glass-border);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.download-btn:hover {
    transform: translateY(-3px);
    border-color: var(--wp-accent);
    box-shadow: var(--wp-shadow-premium);
}
.download-btn-icon {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    color: var(--wp-accent);
}
.download-btn-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    text-align: left;
    font-weight: 700;
    font-size: 1rem;
}
.download-btn-text small {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--wp-text-tertiary);
    letter-spacing: 0.02em;
}
/* JS marks the visitor's own OS button (script.js) */
.download-btn.is-user-os {
    border-color: var(--wp-accent);
    box-shadow: 0 0 0 1px var(--wp-accent) inset;
}

/* --- Download page --- */
.download-hero {
    text-align: center;
    padding: 7rem 0 3rem;
}
.download-hero h1 {
    font-family: var(--wp-font-serif);
    font-size: 3.5rem;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}
.download-hero p {
    font-size: 1.25rem;
    color: var(--wp-text-secondary);
    max-width: 640px;
    margin: 0 auto;
}
.download-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 3rem 0 5rem;
}
.download-card {
    padding: 2.5rem 2rem;
    border-radius: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.download-card:hover {
    transform: translateY(-8px);
    border-color: var(--wp-accent);
}
.download-card-icon {
    color: var(--wp-accent);
    background: var(--wp-bg-secondary);
    width: 64px; height: 64px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 16px;
    margin-bottom: 0.5rem;
}
.download-card-icon svg { width: 32px; height: 32px; }
.download-card h3 { font-size: 1.5rem; font-weight: 700; }
.download-card .download-card-meta {
    color: var(--wp-text-tertiary);
    font-size: 0.85rem;
    min-height: 1.2em;
}
.download-card .btn {
    margin-top: 0.75rem;
    width: 100%;
    text-align: center;
}
.download-note {
    max-width: 720px;
    margin: 0 auto 5rem;
    text-align: center;
    color: var(--wp-text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}
.download-note a { color: var(--wp-accent); text-decoration: none; font-weight: 600; }
.download-note a:hover { text-decoration: underline; }

/* --- Per-OS dedicated install page --- */
.install-meta {
    color: var(--wp-text-tertiary);
    font-size: 0.9rem;
    margin-top: 1rem;
}
.install-cta { margin-top: 2rem; }
.install-cta .btn { font-size: 1.1rem; padding: 1rem 2.5rem; }
/* Installer not published yet: looks like the button, but inert */
.btn-soon { display: inline-block; opacity: 0.55; cursor: not-allowed; }
.btn-soon:hover { transform: none; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08); }
.install-body { max-width: 820px; margin: 3rem auto 4rem; }

/* Accent-tinted callout for the must-read pre-install / permission notes */
.install-callout {
    display: flex;
    gap: 1rem;
    padding: 1.5rem 1.75rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    background: var(--wp-accent-bg, rgba(217, 119, 6, 0.08));
    border: 1px solid var(--wp-accent-border, rgba(217, 119, 6, 0.25));
}
.install-callout-icon {
    flex-shrink: 0;
    color: var(--wp-accent);
    margin-top: 2px;
}
.install-callout-icon svg { width: 22px; height: 22px; }
.install-callout h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--wp-text-primary);
}
.install-callout p, .install-callout li {
    color: var(--wp-text-secondary);
    font-size: 1rem;
    line-height: 1.65;
}
.install-callout ul { padding-left: 1.2rem; margin-top: 0.4rem; }
.install-callout li { margin-bottom: 0.3rem; }
.install-callout a { color: var(--wp-accent); text-decoration: none; font-weight: 600; }
.install-callout a:hover { text-decoration: underline; }

.install-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--wp-text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    transition: transform 0.2s, color 0.2s;
}
.install-back:hover { transform: translateX(-4px); color: var(--wp-text-primary); }

/* ══════════════════════════════════════════════════════════
   Guide page — combined Desktop / Chrome tabs
   ══════════════════════════════════════════════════════════ */
.guide-hero {
    text-align: center;
    padding: 7rem 0 2rem;
}
.guide-hero h1 {
    font-family: var(--wp-font-serif);
    font-size: 3.5rem;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}
.guide-hero p {
    font-size: 1.2rem;
    color: var(--wp-text-secondary);
    max-width: 620px;
    margin: 0 auto;
}
.guide-tabs {
    display: inline-flex;
    gap: 0.4rem;
    padding: 0.4rem;
    border-radius: 100px;
    margin: 2.5rem auto 0;
}
.guide-tabs-wrap { text-align: center; }
.guide-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--wp-text-secondary);
    font-family: inherit;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.25s ease;
}
.guide-tab svg { width: 18px; height: 18px; }
.guide-tab:hover { color: var(--wp-text-primary); }
.guide-tab.active {
    background: var(--wp-accent);
    color: #ffffff;
}
[data-theme="dark"] .guide-tab.active { color: #000000; }

.guide-panel { display: none; max-width: 820px; margin: 3rem auto 5rem; }
.guide-panel.active { display: block; }

.guide-step {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    border-radius: 20px;
    margin-bottom: 1.5rem;
}
.guide-step-num {
    flex-shrink: 0;
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px;
    background: var(--wp-accent-bg, rgba(217,119,6,0.08));
    color: var(--wp-accent);
    font-family: var(--wp-font-serif);
    font-size: 1.4rem;
    font-weight: 700;
}
.guide-step-body h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
}
.guide-step-body p {
    color: var(--wp-text-secondary);
    font-size: 1.02rem;
    line-height: 1.7;
    margin-bottom: 0.6rem;
}
.guide-step-body p:last-child { margin-bottom: 0; }
.guide-step-body ul {
    color: var(--wp-text-secondary);
    padding-left: 1.2rem;
    line-height: 1.7;
}
.guide-step-body li { margin-bottom: 0.4rem; }
.guide-step-body a { color: var(--wp-accent); text-decoration: none; font-weight: 600; }
.guide-step-body a:hover { text-decoration: underline; }

/* Inline keyboard-key badge for shortcuts */
kbd, .wp-kbd {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    font-family: var(--wp-font-sans);
    font-size: 0.85em;
    font-weight: 600;
    line-height: 1.4;
    color: var(--wp-text-primary);
    background: var(--wp-bg-secondary);
    border: 1px solid var(--wp-border);
    border-bottom-width: 2px;
    border-radius: 6px;
    white-space: nowrap;
}

/* Anchor offsets for new pages under the sticky nav */
#download-grid, #guide-top { scroll-margin-top: 110px; }

/* --- Responsive: downloads + guide --- */
@media (max-width: 768px) {
    .download-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .download-hero { padding: 5rem 0 2rem; }
    .download-hero h1, .guide-hero h1 { font-size: 2.4rem; }
    .guide-hero { padding: 5rem 0 1.5rem; }
    .download-row { gap: 0.75rem; }
    .download-btn { padding: 0.6rem 1rem; gap: 0.6rem; }
    .guide-tabs { display: flex; }
    .guide-tab { padding: 0.6rem 1.1rem; font-size: 0.9rem; }
    .guide-step { padding: 1.5rem; gap: 1rem; }
}
