/* ============================================================
   1. ROOT VARIABLES & THEMES
   ============================================================ */
:root {
    /* 🌟 THE FOXIX PREMIUM ORANGE BRAND PALETTE */
    --primary-color: #ff7300;
    /* Core Fierce Thunder Orange */
    --primary-dark: #cc5c00;
    /* Deep Shadow Amber Hover */
    --primary-light: #ff8c33;
    /* Balanced Soft Bright Accent */
    --secondary-color: #ff9c26;
    /* Light Sun Secondary Accent */
    --accent-color: #ffa842;
    /* Radiant Highlight Tone */

    /* Default Light Mode Base Surfaces */
    --bg-primary: #fdf0e0;
    /* Soft Premium Bone White background */
    --bg-secondary: #fef5ec;
    /* Structural card background layer */
    --bg-tertiary: #e5e7eb;
    /* Tool inner wells / blocks */
    --text-primary: #0f172a;
    /* Deep slate charcoal text (super crisp) */
    --text-secondary: #475569;
    /* Classy slate secondary text descriptions */
    --text-tertiary: #94a3b8;
    /* Subtle utility details / placeholders */
    --border-color: #e2e8f0;
    /* Clean hairline separation borders */

    /* Glass Panels - Light Mode Accent Tones */
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 115, 0, 0.08);

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 6px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 10px 25px rgba(255, 115, 0, 0.06);
    --shadow-xl: 0 20px 40px rgba(15, 23, 42, 0.12);

    /* Spacing (Untouched) */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;

    /* Border Radius (Untouched) */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;

    /* Transitions (Untouched) */
    --transition-fast: 0.2s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;

    /* Font (Untouched) */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
}

/* 🌙 Premium Space Dark Mode Override */
body.dark-mode {
    --bg-primary: #0b0f17;
    /* High-end Deep Cyber Space Black */
    --bg-secondary: #09101F;
    /* Sleek card containers panels */
    --bg-tertiary: #1e293b;
    /* Focused dark active tabs / inner fields */
    --text-primary: #f8fafc;
    /* Clear high-contrast clean ice white */
    --text-secondary: #94a3b8;
    /* Clean soft description details text */
    --text-tertiary: #64748b;
    /* Understated muted tags / shortcuts labels */
    --border-color: #1e293b;
    /* Midnight slate element divider borders */

    /* Glass Panels - Dark Mode Accent Glows */
    --glass-bg: rgba(11, 15, 23, 0.8);
    --glass-border: rgba(255, 115, 0, 0.15);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.6);
}

/* ============================================================
   2. GLOBAL STYLES
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color var(--transition-normal), color var(--transition-normal);
    overflow-x: hidden;
}

/* Prevent layout shift on scrollbar */
html {
    overflow-y: scroll;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

h1 {
    font-size: var(--font-size-4xl);
}

h2 {
    font-size: var(--font-size-3xl);
}

h3 {
    font-size: var(--font-size-2xl);
}

h4 {
    font-size: var(--font-size-xl);
}

p {
    line-height: 1.6;
    color: var(--text-secondary);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* ============================================================
   4. BUTTONS
   ============================================================ */

.btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(255, 115, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 115, 0, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-card {
    background-color: var(--primary-color);
    color: white;
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-lg);
}

.btn-card:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

#sub-btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: inline-block;
    text-align: center;
}

/* ============================================================
   5. NAVBAR
   ============================================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    transition: all var(--transition-fast);
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: var(--font-size-xl);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-img {
    height: 40px;
    /* Sets a perfect, clean size inside the navbar */
    width: auto;
    /* Maintains your logo's exact aspect ratio */
    object-fit: contain;
    display: block;
}

.logo-icon {
    font-size: var(--font-size-2xl);
}

.nav-links {
    display: flex;
    gap: var(--spacing-2xl);
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
    transition: color var(--transition-fast);
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transition: width var(--transition-normal);
}

.nav-link:hover::after {
    width: 100%;
}

.navbar-actions {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: var(--font-size-xl);
    transition: transform var(--transition-normal);
}

.theme-toggle:hover {
    transform: rotate(20deg) scale(1.1);
}

.tool-search {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    width: 200px;
    transition: all var(--transition-normal);
}

.tool-search:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 115, 0, 0.1);
}

.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: var(--spacing-xs);
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: var(--radius-sm);
    transition: all var(--transition-normal);
}

/* ============================================================
   13. FOOTER
   ============================================================ */

.footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: var(--spacing-3xl) 0 var(--spacing-2xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-2xl);
    margin-bottom: var(--spacing-3xl);
}

.footer-section h4 {
    margin-bottom: var(--spacing-lg);
    color: var(--text-primary);
}

.footer-section p {
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: var(--spacing-md);
}

.footer-section a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.footer-section a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

/* Ensure the link container handles the inline SVG properly */
.social-links a.insta-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Match the exact vector stroke to your white text color */
.insta-icon {
    width: 18px;
    /* Micro-adjusted to match the visual height of text icons */
    height: 18px;
    stroke: currentColor;
    /* Automatically forces the SVG color to match 'white' from your parent class */
    transition: transform var(--transition-normal);
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    transition: all var(--transition-normal);
}

.social-links a:hover {
    transform: translateY(-3px);
    background: var(--primary-dark);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid var(--border-color);
    padding-top: var(--spacing-2xl);
}

.footer-bottom p {
    margin: var(--spacing-md) 0;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

/* ============================================================
   12. NEWSLETTER SECTION
   ============================================================ */

.newsletter {
    padding: var(--spacing-3xl) 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.newsletter-content {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-content h2 {
    color: white;
    margin-bottom: var(--spacing-md);
}

.newsletter-content p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--spacing-2xl);
}

.newsletter-form {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.newsletter-form input {
    flex: 1;
    padding: var(--spacing-md) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-base);
}

.newsletter-form button {
    padding: var(--spacing-md) var(--spacing-2xl);
    background-color: white;
    color: var(--primary-color);
    font-weight: 600;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.newsletter-form button:hover {
    transform: scale(1.05);
}

.form-message {
    font-size: var(--font-size-sm);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.form-message.show {
    opacity: 1;
}

/* ============================================================
   6. PREMIUM SIDEBAR UTILITY ELEMENTS
   ============================================================ */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
  margin-top: 30px;
}

.premium-card {
  /* 🌐 Uses your dynamic container colors */
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl);
  text-align: center;
  box-shadow: var(--shadow-xl);
  animation: fadeInUp 0.6s ease-out;
  /* 🌐 Switches hairline colors seamlessly */
  border: 2px solid var(--border-color);
}

.premium-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  color: white;
}

.premium-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  color: var(--primary-color);
}

.merge-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border: none;
  padding: var(--spacing-lg) var(--spacing-2xl);
  border-radius: var(--radius-xl);
  font-size: var(--font-size-lg);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.merge-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.explore-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border: none;
  padding: var(--spacing-lg) var(--spacing-2xl);
  border-radius: var(--radius-xl);
  font-size: var(--font-size-lg);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  width: 100%;
  box-shadow: var(--shadow-lg);
  margin-top: 20px;
}

.explore-btn:hover {
  transform: translateY(-2px);
}

.features-list {
  list-style: none;
  margin-top: var(--spacing-lg);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.features-list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 14px;
  font-size: var(--font-size-sm);
  color: var(--text-primary);
}

.features-list li::before {
  content: '✓';
  color: var(--primary-color);
  font-weight: bold;
  font-size: var(--font-size-lg);
}

.features-list li a {
  /* 🌐 Dynamic link shift */
  color: var(--text-secondary);
  text-decoration: underline dotted;
}

.features-list li a:hover {
  font-weight: bold;
  transform: translateY(-2px);
}

.features-list li:hover {
  transform: translateY(-2px);
  border-color: var(--primary-color);
}

/* ============================================================
   9. TOOL EXPLANATION SECTION
   ============================================================ */

.tool-explanation {
    padding: var(--spacing-3xl) 0 var(--spacing-2xl);
}

.tool-explanation .container {
    background: linear-gradient(135deg, rgba(255, 115, 0, 0.08), rgba(255, 156, 38, 0.03));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    position: relative;
    overflow: hidden;
}

.tool-explanation .container::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
}

.tool-explanation h2 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-lg);
    text-align: center;
    font-size: clamp(1.5rem, 2.2vw, 2rem);
}

.tool-explanation p {
    max-width: 900px;
    margin: 0 auto var(--spacing-lg);
    text-align: center;
    font-size: 1.05rem;
    color: var(--text-secondary);
}

.tool-explanation strong {
    color: var(--primary-dark);
}

/* ============================================================
   10. FAQ SECTION
   ============================================================ */

.faq {
    padding: var(--spacing-3xl) 0;
    background-color: var(--bg-secondary);
}

.faq-container {
    max-width: 700px;
    margin: 0 auto;
}

.faq-item {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.faq-item:hover {
    border-color: var(--primary-color);
}

.faq-question {
    width: 100%;
    padding: var(--spacing-lg);
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition-normal);
}

.faq-question:hover {
    color: var(--primary-color);
}

.faq-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    transition: transform var(--transition-normal);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 var(--spacing-lg) 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal), padding var(--transition-normal);
    margin-bottom: 0;
    white-space: normal;
}

.faq-item.active .faq-answer {
    padding-bottom: var(--spacing-lg);
}

.faq-item.active .faq-answer p {
    display: block;
}

.faq-answer p {
    margin: 0;
    line-height: 1.8;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

/* ============================================================
   11. BLOG SECTION
   ============================================================ */

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.section-header h2 {
    margin-bottom: 10px;
}

.section-header p {
    text-align: center;
    color: var(--text-secondary);
}

.blog {
    padding: var(--spacing-3xl) 0;
}

.blog-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: var(--spacing-3xl);
    width: 100%;
    margin-top: var(--spacing-xl);
    /* 🌐 Fix: Prevents the left box from stretching vertically */
    align-items: start;
}

.blog-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    padding: var(--spacing-2xl);
    transition: all var(--transition-normal);
    cursor: pointer;

    /* 🌐 Fix: Structural Sizing Locks */
    width: 100%;
    /* Allows it to completely fill its 350px grid track */
    max-width: 350px;
    /* Hard-locks its horizontal growth ceiling */
    height: auto;
    /* Snaps its height perfectly around its text content */
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.blog-image {
    font-size: 3rem;
    margin-bottom: var(--spacing-lg);
}

.blog-card h3 {
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.blog-card p {
    margin-bottom: var(--spacing-lg);
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.blog-date {
    font-weight: 500;
}

.blog-category {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

/* ============================================================
   MAIN BLOG CONTAINER
   ============================================================ */

.main-blog {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    padding: var(--spacing-2xl);
    transition: all var(--transition-normal);
    width: 100%;

    /* Scrollable */
    height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Scrollbar */

.main-blog::-webkit-scrollbar {
    width: 8px;
}

.main-blog::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 10px;
}

.main-blog::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.main-blog::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ============================================================
   BLOG TYPOGRAPHY
   ============================================================ */

.main-blog h2 {
    margin-bottom: 25px;
    line-height: 1.4;
}

.main-blog h3 {
    margin-top: 35px;
    margin-bottom: 18px;
    line-height: 1.4;
}

.main-blog h4 {
    margin-top: 25px;
    margin-bottom: 12px;
    line-height: 1.4;
}

.main-blog p {
    margin-bottom: 18px;
    line-height: 1.9;
}

.main-blog ul {
    margin: 18px 0 25px 30px;
}

.main-blog li {
    margin-bottom: 10px;
    line-height: 1.8;
}

.main-blog strong {
    color: var(--text-primary);
}

.main-blog a {
    color: var(--primary-color);
}

.main-blog a:hover {
    color: var(--primary-dark);
}

/* ============================================================
   AI DETECTOR HERO + WORKSPACE
   ============================================================ */

.bg-glow {
    position: fixed;
    top: -200px;
    right: -150px;
    width: 460px;
    height: 460px;
    background: radial-gradient(circle,
            rgba(255, 115, 0, 0.12) 0%,
            rgba(255, 115, 0, 0.05) 42%,
            transparent 76%);
    pointer-events: none;
    z-index: -1;
}

header {
    text-align: center;
    margin-top: 120px;
    margin-bottom: var(--spacing-3xl);
}

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);

    background: linear-gradient(135deg,
            var(--primary-color),
            var(--secondary-color));

    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-section .subtitle {
    max-width: 750px;
    margin: 0 auto;
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
}

/* ============================================================
   DETECTOR WORKSPACE LAYOUT
   ============================================================ */

.detector-shell {
    max-width: 1700px;
    padding: 5.25rem 1rem 2.5rem;
    position: relative;
    z-index: 2;
}

.detector-app-shell {
    display: grid;
    grid-template-columns: minmax(0, 0.62fr) minmax(0, 0.38fr);
    gap: 0.9rem;
    align-items: stretch;
    width: 100%;
    padding: 0.2rem;
    border: 1px solid var(--border-color);
    border-radius: 1.35rem;
    background: linear-gradient(135deg, var(--glass-bg), rgba(255, 255, 255, 0.06));
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.main-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.62fr) minmax(0, 0.38fr);
    gap: 1rem;
    margin-bottom: 0;
    align-items: stretch;
}

/* ============================================================
   DETECTOR PANELS
   ============================================================ */

.input-card,
.results-card,
.detector-panel {
    background: var(--bg-secondary);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-color);
    border-radius: 1.05rem;
    padding: 0.8rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.results-card {
    position: sticky;
    top: 6.25rem;
    align-self: flex-start;
    max-height: calc(100vh - 7.25rem);
    overflow-y: auto;
    scrollbar-gutter: stable;
}

.input-card,
.results-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.input-card:hover,
.results-card:hover,
.detector-panel:hover {
    border-color: rgba(255, 115, 0, 0.33);
    transform: translateY(-1px);
}

.workspace-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.workspace-editor {
    gap: 0.9rem;
}

.workspace-header,
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.05rem 0 0.2rem;
}

.workspace-title-group {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.workspace-eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 0;
}

.workspace-header h3,
.dashboard-header h3 {
    margin-bottom: 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.workspace-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
}

.workspace-stats span {
    font-size: 0.74rem;
    color: var(--text-secondary);
    background: rgba(255, 115, 0, 0.08);
    border: 1px solid rgba(255, 115, 0, 0.16);
    border-radius: 999px;
    padding: 0.3rem 0.55rem;
}

.dashboard-status {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.3rem 0.6rem;
}

.dashboard-intro {
    padding: 0.15rem 0 0.35rem;
}

.dashboard-intro p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ============================================================
   INPUT PANEL
   ============================================================ */

#textInput {
    width: 100%;
    min-height: 72vh;
    max-height: 78vh;
    resize: vertical;

    background: var(--bg-primary);
    color: var(--text-primary);

    border: 1px solid var(--border-color);
    border-radius: 0.95rem;

    padding: 0.95rem 1rem;

    font-size: 0.96rem;
    line-height: 1.65;

    transition: all var(--transition-normal);
}

#textInput:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255, 115, 0, 0.16);
}

#textInput::placeholder {
    color: var(--text-tertiary);
}

#textInput::selection {
    background: rgba(255, 115, 0, 0.24);
    color: var(--text-primary);
}

.editor-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
}

.editor-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
}

.btn-clear {
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-secondary);
    padding: 0.9rem 1rem;
    border-radius: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    min-width: 92px;
}

.btn-clear:hover {
    background: rgba(255, 115, 0, 0.08);
    color: var(--primary-color);
    border-color: rgba(255, 115, 0, 0.22);
}

/* ============================================================
   ANALYZE ACTION
   ============================================================ */

.btn-analyze {
    width: auto;
    margin-top: 0;
    border: none;
    border-radius: 1rem;
    padding: 0.85rem 1.2rem;
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
    min-width: 180px;
    position: relative;
    overflow: hidden;
}

.btn-analyze:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(255, 115, 0, 0.22);
}

.btn-analyze:disabled {
    opacity: 0.8;
    cursor: not-allowed;
    transform: none;
}

.btn-analyze.btn-loading {
    background: linear-gradient(135deg, #ff8b23, #f97316);
}

.btn-analyze.btn-complete {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.btn-analyze.btn-loading::after,
.btn-analyze.btn-complete::after {
    content: '';
    position: absolute;
    right: 1rem;
    top: 50%;
    width: 1rem;
    height: 1rem;
    margin-top: -0.5rem;
    border-radius: 50%;
}

.btn-analyze.btn-loading::after {
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-right-color: transparent;
    animation: button-spinner 0.7s linear infinite;
}

.btn-analyze.btn-complete::after {
    background: rgba(255, 255, 255, 0.5);
}

@keyframes button-spinner {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================================
   DASHBOARD SHELL
   ============================================================ */

.workspace-dashboard {
    min-height: 100%;
}

.dashboard-shell {
    display: grid;
    gap: 0.45rem;
    height: 100%;
    margin-top: 0.5rem;
}

.dashboard-section {
    border-top: 1px solid var(--border-color);
    padding: 0.6rem 0 0.7rem;
    background: transparent;
    min-height: 0;
}

.dashboard-section:first-of-type {
    border-top: none;
    padding-top: 0.25rem;
}

.dashboard-section--placeholder {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.section-copy {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.section-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
}

.dashboard-section h4 {
    margin-bottom: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.dashboard-section p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.45;
}

.dashboard-section .section-description {
    margin-top: 0.15rem;
    color: var(--text-tertiary);
    font-size: 0.76rem;
}

.dashboard-section--overall {
    padding-top: 0.4rem;
}

.detector-hero {
    padding: 3.2rem 0 0.9rem;
}

.detector-hero__grid {
    display: flex;
    justify-content: center;
}

.detector-hero__content {
    width: min(100%, 850px);
    margin: 0 auto;
    display: grid;
    gap: 0.65rem;
    align-items: center;
    text-align: center;
    margin-top: 40px !important; 
}

.detector-hero__eyebrow {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 0;
    justify-self: center;
}

.detector-hero h1 {
    font-size: clamp(2.05rem, 3.1vw, 2.85rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--primary-color);
    margin-bottom: 0;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.detector-hero__subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.detector-hero__copy {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 620px;
    margin-bottom: 0.25rem;
}

.detector-hero__badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.15rem;
}

.detector-hero__badges span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 115, 0, 0.08);
    color: var(--primary-color);
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid rgba(255, 115, 0, 0.12);
}

.detector-hero__cta {
    width: fit-content;
    margin-top: 0.35rem;
}

.detector-hero__visual {
    display: flex;
    justify-content: center;
}

.hero-visual-card {
    position: relative;
    width: min(100%, 470px);
    aspect-ratio: 1 / 1;
    border-radius: 1.8rem;
    background: linear-gradient(145deg, rgba(255, 241, 224, 0.95), rgba(255, 247, 238, 0.8));
    border: 1px solid rgba(255, 115, 0, 0.16);
    box-shadow: 0 24px 60px rgba(255, 115, 0, 0.14);
    overflow: hidden;
}

.hero-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 115, 0, 0.18);
}

.hero-ring--outer {
    inset: 12%;
    border-width: 2px;
}

.hero-ring--inner {
    inset: 24%;
    border-width: 1px;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 136, 36, 0.96), rgba(255, 115, 0, 0.22));
    filter: blur(1px);
}

.hero-orb--one {
    width: 72px;
    height: 72px;
    top: 16%;
    left: 18%;
}

.hero-orb--two {
    width: 48px;
    height: 48px;
    bottom: 20%;
    right: 16%;
}

.hero-panel {
    position: absolute;
    display: grid;
    gap: 0.2rem;
    padding: 0.7rem 0.8rem;
    border-radius: 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.hero-panel span {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.hero-panel strong {
    font-size: 1rem;
    color: var(--text-primary);
}

.hero-panel--top {
    top: 18%;
    right: 12%;
}

.hero-panel--bottom {
    bottom: 18%;
    left: 12%;
}

.overall-result-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    padding: 1.1rem 1.15rem;
    border: 1px solid var(--border-color);
    border-radius: 1.2rem;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
    box-shadow: var(--shadow-md);
}

.overall-result-visual {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.overall-progress-ring {
    --progress: 0;
    --progress-color: var(--primary-color);
    width: 118px;
    height: 118px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: conic-gradient(var(--progress-color) calc(var(--progress) * 1%), var(--bg-tertiary) 0);
    padding: 12px;
    transition: background 0.75s ease;
}

.overall-progress-core {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 0.8px var(--border-color);
    padding: 0.35rem;
    text-align: center;
    overflow: hidden;
}

.overall-progress-value {
    font-size: clamp(1.1rem, 2.4vw, 1.35rem);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    display: block;
    width: 100%;
    text-align: center;
}

.overall-progress-label {
    margin-top: 0.25rem;
    font-size: 0.50rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    text-align: center;
    line-height: 1.3;
    max-width: 100%;
}

.overall-result-copy {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-width: 0;
    flex: 1;
}

.overall-result-topline {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 0.2rem;
}

.risk-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: white;
    background: #22c55e;
}

.risk-badge--medium {
    background: #f59e0b;
}

.risk-badge--high {
    background: #f97316;
}

.risk-badge--critical {
    background: #ef4444;
}

.overall-result-meta {
    font-size: 0.74rem;
    color: var(--text-tertiary);
    font-weight: 600;
}

.overall-result-card h4 {
    margin-bottom: 0;
    font-size: 1.02rem;
    color: var(--text-primary);
}

.overall-result-card p {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.overall-result-support {
    display: grid;
    gap: 0.35rem;
    margin-top: 0.2rem;
    padding: 0.8rem 0.95rem;
    border-radius: 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
}

.overall-verdict-title {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.overall-verdict-copy {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.signal-score-grid,
.stats-grid {
    display: grid;
    gap: 0.6rem;
    margin-top: 0.4rem;
}

.signal-score-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.signal-score-card,
.stat-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.95rem;
    min-height: 108px;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast), opacity var(--transition-fast);
    opacity: 0;
    animation: fadeInUp 0.22s ease forwards;
}

.signal-score-card:nth-child(1) { animation-delay: 0.04s; }
.signal-score-card:nth-child(2) { animation-delay: 0.08s; }
.signal-score-card:nth-child(3) { animation-delay: 0.12s; }

.stat-card:nth-child(1) { animation-delay: 0.06s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.14s; }
.stat-card:nth-child(4) { animation-delay: 0.18s; }
.stat-card:nth-child(5) { animation-delay: 0.22s; }

.signal-score-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.signal-score-card strong,
.stat-card strong {
    font-size: 1rem;
    color: var(--text-primary);
}

.signal-score-card span {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-color);
}

.signal-score-card small,
.stat-card-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: none;
    color: var(--text-tertiary);
}

.stat-card-meta {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.74rem;
    color: var(--text-secondary);
}

.stat-card--placeholder,
.signal-score-card--placeholder {
    opacity: 0.85;
}

.checklist-list {
    display: grid;
    gap: 0.3rem;
    margin-top: 0.15rem;
    padding-left: 0;
}

.checklist-list li {
    list-style: none;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.checklist-list li::before {
    content: '✔';
    flex-shrink: 0;
    color: #16a34a;
    font-weight: 700;
    margin-top: 0.08rem;
}

.checklist-list--recommendations li {
    padding: 0.38rem 0.5rem;
    background: var(--bg-primary);
    border-radius: 0.8rem;
    border: 1px solid var(--border-color);
    min-height: 2rem;
    align-items: center;
}

.checklist-list--recommendations li .recommendation-icon {
    margin-right: 0.45rem;
    display: inline-flex;
}

.dashboard-section-body--scroll {
    display: grid;
    gap: 0.35rem;
    margin-top: 0.35rem;
    max-height: 260px;
    overflow-y: auto;
    padding-right: 0.15rem;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--bg-primary);
}

.dashboard-section-body--scroll::-webkit-scrollbar {
    width: 8px;
}

.dashboard-section-body--scroll::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 999px;
}

.dashboard-section-body--scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 115, 0, 0.82);
    border-radius: 999px;
    border: 2px solid var(--bg-primary);
}

.sentence-card {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 0.55rem 0.75rem;
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
    text-align: left;
    cursor: pointer;
    opacity: 0;
    animation: fadeInUp 0.22s ease forwards;
}

.sentence-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    border-color: rgba(255, 115, 0, 0.18);
}

.sentence-card:nth-child(1) { animation-delay: 0.04s; }
.sentence-card:nth-child(2) { animation-delay: 0.08s; }
.sentence-card:nth-child(3) { animation-delay: 0.12s; }
.sentence-card:nth-child(4) { animation-delay: 0.16s; }
.sentence-card:nth-child(5) { animation-delay: 0.2s; }

.sentence-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.sentence-card-index {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sentence-card-score {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.sentence-preview {
    font-size: 0.88rem;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 0.3rem;
}

.sentence-card-details {
    display: grid;
    gap: 0.3rem;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.22s ease, opacity 0.22s ease, margin-top 0.22s ease;
}

.sentence-card--active .sentence-card-details {
    max-height: 220px;
    opacity: 1;
    margin-top: 0.35rem;
}

.sentence-explanation {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

.sentence-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.1rem;
}

.sentence-dots li {
    list-style: none;
    font-size: 0.72rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.2rem 0.45rem;
}

.sentence-card-action {
    font-size: 0.72rem;
    color: var(--primary-color);
    font-weight: 700;
}

.sentence-card--active {
    border-color: rgba(255, 115, 0, 0.28);
    background: linear-gradient(135deg, rgba(255, 115, 0, 0.10), var(--bg-secondary));
    box-shadow: 0 12px 28px rgba(255, 115, 0, 0.11);
}

.sentence-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
}

.sentence-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3rem;
    padding: 0.24rem 0.5rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    color: white;
    background: #22c55e;
}

.sentence-badge--medium {
    background: #f59e0b;
}

.sentence-badge--high {
    background: #f97316;
}

.sentence-badge--critical {
    background: #ef4444;
}

.sentence-risk-label {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sentence-preview {
    font-size: 0.82rem;
    color: var(--text-primary);
    line-height: 1.45;
    margin-bottom: 0.35rem;
}

.sentence-card-details {
    display: grid;
    gap: 0.35rem;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.25s ease, opacity 0.25s ease, margin-top 0.25s ease;
}

.sentence-card--active .sentence-card-details {
    max-height: 180px;
    opacity: 1;
    margin-top: 0.4rem;
}

.sentence-explanation {
    font-size: 0.76rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.sentence-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.1rem;
}

.sentence-dots li {
    list-style: none;
    font-size: 0.72rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.24rem 0.5rem;
}

.sentence-card-action {
    font-size: 0.74rem;
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: 0.01em;
}

.sentence-empty-state,
.sentence-loading-state {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1rem;
    border: 1px dashed rgba(255, 115, 0, 0.2);
    border-radius: 0.95rem;
    background: var(--bg-primary);
}

.sentence-empty-state .empty-icon,
.sentence-loading-state .empty-icon {
    font-size: 1.2rem;
}

.sentence-loading-state .skeleton-row {
    height: 0.6rem;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255, 115, 0, 0.16), rgba(255, 115, 0, 0.08));
}

.sentence-loading-state .skeleton-row.short {
    width: 72%;
}

.placeholder-row {
    height: 0.55rem;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255, 115, 0, 0.16), rgba(255, 115, 0, 0.08));
}

.placeholder-row.short {
    width: 72%;
}

@media (max-width: 1100px) {
    .detector-app-shell {
        grid-template-columns: 1fr;
    }

    .detector-shell {
        padding: 6.5rem 0.75rem 2rem;
    }

    .results-card {
        position: static;
        max-height: none;
        overflow: visible;
    }
}

@media (max-width: 768px) {
    .workspace-header,
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .workspace-stats {
        justify-content: flex-start;
    }

    .editor-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .editor-actions {
        justify-content: stretch;
    }

    .btn-analyze,
    .btn-clear {
        width: 100%;
        min-width: 0;
    }

    .overall-result-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .signal-score-card,
    .stat-card {
        min-height: auto;
    }

    .signal-score-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sentence-card {
        padding: 0.8rem;
    }

    #textInput {
        min-height: 360px;
    }
}

/* ============================================================
   RESULTS PANEL
   ============================================================ */

.placeholder-text {
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
}

.score-container {
    display: none;
}

.result-dashboard {
    display: grid;
    gap: 1.1rem;
}

.dashboard-top-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.result-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-2xl);
    padding: 1.1rem 1.15rem;
    box-shadow: var(--shadow-sm);
}

.signals-card,
.sentence-card {
    grid-column: 1 / -1;
}

.section-header-card {
    margin-bottom: 1rem;
}

.section-header-card h3 {
    margin-bottom: 0.35rem;
    font-size: 1.15rem;
}

.section-header-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.overall-layout {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.5rem;
    align-items: center;
}

.percentage-circle {
    width: 220px;
    height: 220px;
    margin: 0 auto;
    border-radius: 50%;
    border: 10px solid var(--primary-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all var(--transition-normal);
    background: radial-gradient(circle, transparent 55%, rgba(255, 115, 0, 0.06) 100%);
}

.percentage-value {
    font-size: 3.35rem;
    font-weight: 800;
    color: var(--text-primary);
}

.percentage-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 8px;
}

.verdict-details {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.verdict-chip {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 115, 0, 0.12);
    color: var(--primary-color);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.verdict-details h2 {
    margin-bottom: 0;
    font-size: 1.55rem;
}

.verdict-details p {
    color: var(--text-secondary);
    margin: 0;
}

.summary-content {
    color: var(--text-secondary);
    line-height: 1.75;
    font-size: 1rem;
}

.empty-state,
.loading-state {
    max-width: 460px;
    padding: 2rem;
    border-radius: var(--radius-2xl);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.empty-state-icon,
.loading-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 1rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 115, 0, 0.12);
    color: var(--primary-color);
    font-size: 1.35rem;
}

.empty-state h3,
.loading-state h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.empty-state p,
.loading-state p {
    margin: 0;
    color: var(--text-secondary);
}

.empty-state-subtitle {
    margin-top: 0.35rem !important;
    color: var(--text-tertiary) !important;
}

.loading-message {
    font-weight: 600;
    color: var(--text-primary) !important;
}

.loading-steps {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ============================================================
   RESULT COMPONENTS
   ============================================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.stat-item {
    text-align: left;
    padding: 1.15rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.stat-item:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 115, 0, 0.28);
    box-shadow: var(--shadow-sm);
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.stat-item h4 {
    margin-bottom: 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.stat-value {
    display: block;
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--primary-color);
}

.stat-item p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.5;
    margin: 0;
}

/* ============================================================
   SENTENCE ANALYSIS COMPONENT
   ============================================================ */

.sentence-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.sentence-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    background: var(--bg-primary);
    border-left: 4px solid #10b981;
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    line-height: 1.6;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.sentence-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.sentence-item p {
    margin: 0;
    color: var(--text-primary);
    flex: 1;
}

.sentence-probability {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.25rem;
    padding: 0.4rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #10b981;
    background: rgba(16, 185, 129, 0.12);
    flex-shrink: 0;
}

.sentence-item.warning {
    border-left-color: #f59e0b;
}

.sentence-item.warning .sentence-probability {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.14);
}

.sentence-item.suspicious {
    border-left-color: #ef4444;
}

.sentence-item.suspicious .sentence-probability {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.14);
}

/* ============================================================
   INLINE NOTIFICATION
   ============================================================ */

.inline-notification {
    min-height: 1.2rem;
    margin-top: 0.4rem;
    margin-bottom: 0.7rem;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.inline-notification.success {
    color: #10b981;
}

.inline-notification.warning {
    color: var(--primary-color);
}

.inline-notification.error {
    color: #ef4444;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 992px) {
    .main-grid {
        grid-template-columns: 1fr;
    }

    #textInput {
        min-height: 320px;
    }
}

@media (max-width: 768px) {
    .dashboard-top-row {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-top-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .main-blog {
        height: 400px;
        max-height: 400px;

        overflow-y: auto;
        overflow-x: hidden;

        -webkit-overflow-scrolling: touch;
    }

    .main-blog h2 {
        font-size: 1.5rem;
    }

    .main-blog h3 {
        font-size: 1.3rem;
    }

    .main-blog h4 {
        font-size: 1.1rem;
    }

    .main-blog p {
        line-height: 1.8;
    }

    .main-blog ul {
        margin-left: 22px;
    }

    /* Layout Alignment for Mobile Header Row */
    .navbar-content {
        display: flex;
        justify-content: flex-start;
        /* Aligns hamburger and logo to the left */
        align-items: center;
        gap: var(--spacing-md);
        position: relative;
    }

    .hamburger {
        display: flex;
    }

    /* Force menu items to hide vertically, NOT show horizontally */
    .nav-links {
        display: none !important;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--glass-bg);
        backdrop-filter: blur(10px);
        flex-direction: column !important;
        gap: var(--spacing-lg);
        padding: var(--spacing-lg);
        border-bottom: 1px solid var(--glass-border);
        align-items: flex-start;
        width: 100%;
        z-index: 999;
    }

    .nav-links.active {
        display: flex !important;
    }

    .tool-search {
        display: none !important;
    }

    .navbar-actions {
        margin-left: auto;
        display: flex;
        align-items: center;
    }

    /* Preserving your original layout updates below */
    .main-container {
        grid-template-columns: 1fr !important;
        padding: var(--spacing-md) !important;
        /* Reduces outer margin gaps */
        gap: var(--spacing-xl) !important;
        margin-top: 80px !important;
        /* Gives perfect breathing space below navbar */
    }

    /* FIXED: Removes the padding compressing the card from both sides */
    .merge-section {
        padding: 0 !important;
        /* Stops the squishing side forces completely */
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Reduces inner padding slightly for mobile so input area looks vast */
    .tool-header {
        padding: var(--spacing-lg) var(--spacing-md) !important;
    }

    .mode-content {
        padding: var(--spacing-lg) var(--spacing-md) !important;
    }

    /* Makes action buttons look sleek stacked on top of each other on mobile devices */
    .button-action-row {
        flex-direction: column !important;
        gap: var(--spacing-sm) !important;
    }

    .action-btn {
        width: 100% !important;
        /* Full width tap target buttons */
    }

    .section-title {
        font-size: var(--font-size-2xl) !important;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: var(--font-size-base);
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-stats {
        flex-direction: column;
        gap: var(--spacing-lg);
    }

    .illustration {
        display: none;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .testimonial-card {
        flex: 0 0 100%;
    }

    .slider-nav {
        width: 35px;
        height: 35px;
        font-size: var(--font-size-base);
    }

    .newsletter-form {
        flex-direction: column;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        max-height: 90vh;
    }

    .tool-actions {
        flex-direction: column;
    }

    .hero {
        padding: var(--spacing-2xl) 0;
        min-height: auto;
    }

    /* ============================================================
     BLOG SECTION - UNIFIED FULL WIDTH SYSTEM
     ============================================================ */
    .blog {
        width: 100% !important;
        padding: var(--spacing-2xl) 0 !important;
        display: block !important;
    }

    .blog .container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 var(--spacing-md) !important;
        box-sizing: border-box !important;
    }

    .blog-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: var(--spacing-xl) !important;
        width: 100% !important;
    }

    .blog-card,
    .main-blog {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }

    .main-blog {
        padding: var(--spacing-lg) !important;
        background: var(--bg-secondary) !important;
        border: 1px solid var(--border-color) !important;
        border-radius: var(--radius-xl) !important;
    }

    h1 {
        font-size: var(--font-size-2xl);
    }

    h2 {
        font-size: var(--font-size-xl);
    }

    .tools-section {
        padding: var(--spacing-2xl) 0;
    }

    .why-choose-us,
    .testimonials,
    .faq,
    .blog,
    .newsletter,
    .footer {
        padding: var(--spacing-2xl) 0;
    }

    header {
        margin-top: 100px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .percentage-circle {
        width: 180px;
        height: 180px;
    }

    .percentage-value {
        font-size: 2.3rem;
    }
}
