        :root {
            --primary: #FF471A;
;
            --primary-hover: #e03a10;
            --bg-body: #F5EFED;
            --text-main: #332724;
            --text-muted: #736865;
            --border-light: #d1d5db;
            --success: #528C46;
            --success-bg: #f0fdf4;
            --error: #D95757;
            --error-bg: #fef2f2;
            --glass-bg: linear-gradient(157deg, rgba(26, 22, 21, 0.05) 0%, rgba(26, 22, 21, 0) 40%), var(--bg-secondary, #FFFDFC);
            --glass-border: 1px solid var(--depth-border, #FFF);
            --glass-shadow: 
                0 -0.5px 0 0 rgba(101, 52, 40, 0.50) inset,
                -32px -32px 40px 0 rgba(101, 52, 40, 0.04),
                40px 40px 40px 0 rgba(101, 52, 40, 0.30),
                120px 120px 80px 0 rgba(40, 12, 5, 0.05),
                240px 120px 250px 0 rgba(40, 12, 5, 0.15);
               --background-active: rgba(234, 226, 225);
                --muted: #000000;
        }

        @font-face {
            font-family: "Plus Jakarta Sans";
            src: url("Plus_Jakarta_Sans/static/PlusJakartaSans-Regular.ttf") format("truetype");
            font-weight: 400;
            font-style: normal;
        }

        @font-face {
            font-family: "Plus Jakarta Sans";
            src: url("Plus_Jakarta_Sans/static/PlusJakartaSans-Bold.ttf") format("truetype");
            font-weight: 700;
            font-style: normal;
        }

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

      body {
    font-family: "Plus Jakarta Sans", sans-serif;
    background: var(--bg-body);
    min-height: 100vh;
    padding-right: 10px;
    padding-left: 40px;
    color: var(--text-main);
}
body {
    margin-top: 0 !important;
}

.glass-panel {
  gap: 24px;
  padding: 24px;
  padding-bottom: 0;
  border-radius: 16px;
  border: 1px solid var(--elevation-border, #ffffff); 
  background-color: var(--bg-secondary, rgba(255, 255, 255, 0.8));
  background-image: var(--elevation-bg-gradient);
  box-shadow: 
    0 1px 3px 0 rgba(0, 0, 0, 0.1), 
    0 1px 2px -1px rgba(0, 0, 0, 0.1),
    1px 1px 1px 0 rgba(101, 52, 40, 0.08), 
    1px 1px 0 0 rgba(40, 12, 5, 0.05);
  --elevation-border: rgba(255, 255, 255, 0.3);
  --elevation-bg-gradient: linear-gradient(157deg, rgba(26, 22, 21, 0.05) 0%, rgba(26, 22, 21, 0) 40%);
    overflow: hidden;
    
}

.panel {
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    z-index: 10;
}


        .header {
            text-align: left;
            margin-bottom: 2rem;
        }

        .header h1 {
            font-size: 2.5rem;
            margin-bottom: 0.5rem;
        }

        .header p {
            color: var(--text-muted);
            font-size: 1rem;
        }

        .input-group {
            margin-bottom: 1.5rem;
        }

        .input-group label {
            display: block;
            font-size: 0.875rem;
            font-weight: 500;
            margin-bottom: 0.5rem;
        }

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

        .input-row input {
            flex: 1;
            padding: 0.75rem 1rem;
            border: 1px solid #BFB5B2;
            border-radius: 8px;
            font-size: 1rem;
            font-family: inherit;
            width: 821;
            height: 40;
            opacity: 1;
            border-width: 1px;
            gap: 8px;
            padding-right: 16px;
            padding-left: 16px;
            background-color: transparent;
        

        }

        .input-row input:focus {
            outline: none;
            border-color: var(--text-muted);
            box-shadow: 0 0 0 4px rgba(230, 227, 226, 0.1);
        }

        .btn {
            padding: 0.75rem 1.5rem;
            border: none;
            border-radius: 8px;
            font-size: 1rem;
            font-weight: 500;
            font-family: inherit;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            transition: background-color 0.2s;
        }

        .btn-primary {
            background-color: var(--primary);
            color: white;
            width: 139;
height: 40;
opacity: 1;
border-radius: 999px;
gap: 12px;
padding-right: 24px;
padding-left: 24px;

        }

.btn-primary:hover:not(:disabled) {
            background-color: var(--primary-hover);
        }

.btn-primary:disabled {
            background-color: #9ca3af;
            cursor: not-allowed;
        }

   .btn-secondary {
  display: inline-flex;    
  align-items: center;     
  justify-content: center; 
  background-color: transparent;
  width: 280px;          
  height: 32px;           
  padding: 0 16px;       
  gap: 8px;
  border-radius: 999px;
  border: 1px solid var(--content-primary, #332724);
font-weight: 700;
font-style: Bold;
font-size: 13px;
line-height: 20px;
letter-spacing: 0%;


}
.btn-secondary:hover {
background: var(--content-primary, #332724);
color: #F2E9E6;

}
.btn-secondary:active {
    background-color: #332F2E; 
    border-color: #332F2E;
    color: #ffffff;
}
        .scraper-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 0.6rem;
        }
        .chip {
            padding: 0.5rem 1rem;
            border: 1px solid #e5e7eb;
            border-radius: 20px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
            background-color: white;
            color: var(--text-main);
            font-family: inherit;
            display: inline-flex;
            align-items: center;
            font-family: "Plus Jakarta Sans", sans-serif;
        }
        .chip:hover { 
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        }
        .chip.active { 
            background-color: #574C49;
            color: white;
        }
        .alert {
            padding: 1rem;
            border-radius: 8px;
            margin-bottom: 2rem;
            display: flex;
            align-items: start;
            gap: 0.75rem;
        }

       .alert-error {
    color: #d85555;
    font-size: .8125rem;
    text-align: left;
    margin-left: 0;
    padding-left: 0;
}


        .summary-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1rem;
            margin-bottom: 1.5rem;
        }

        .summary-card { 
            padding: 1rem; 
            border-radius: 8px; 
        }
        .summary-card .label { 
            font-size: 0.875rem; 
            color: var(--text-muted); 
            margin-bottom: 0.25rem; 
        }
        .summary-card .value { 
            font-size: 1.5rem; 
            font-weight: bold; 
        }
        
        .summary-card.orange .value { 
            font-size: 0.875rem; 
            word-break: break-all; 
        }
        .summary-card.green { background-color: #dcfce7; }
        .summary-card.green .value { color: var(--success); }
        .summary-card.blue { background-color: #dbeafe; }
        .summary-card.blue .value { color: #2563eb; }
        .summary-card.red { background-color: var(--error-bg); }
        .summary-card.red .value { color: var(--error); }

        .scraper-list h4 {
            font-size: 0.875rem;
            font-weight: 600;
            margin-bottom: 0.5rem;
        }

        .scraper-list ul {
            list-style: none;
            padding: 0;
            margin: 0;
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
        }

        .scraper-list li {
            font-size: 0.875rem;
            padding: 0.25rem 0.75rem;
            border-radius: 9999px;
            background-color: white;
            border: 1px solid transparent;
        }

        .scraper-list.success li { color: var(--success); border-color: var(--success); }
        .scraper-list.failed li { color: var(--error); border-color: var(--error); }

        .hidden { 
            display: none !important; 
        }

        .loading-spinner {
            display: inline-block;
            width: 1rem;
            height: 1rem;
            border: 2px solid #ffffff;
            border-top-color: transparent;
            border-radius: 50%;
            animation: spin 0.6s linear infinite;
        }

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

        .scraper-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

        .scraper-card {
    min-width: 0;  
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    opacity: 1;
    border-radius: 16px;
    border: 1px solid var(--content-quaternary, #BFB5B2);
}

        .scraper-card-inactive {
            background: rgb(235, 233, 233);
            border-radius: 12px;
            padding: 1.5rem;
            display: flex;
            flex-direction: column;
            gap: 1rem;
            transition: all 0.2s;
        }

        .scraper-card:hover {
            background: var(--bg-tertiary, #EBE3E1);

        }

        .scraper-card-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .scraper-card-name {
            font-size: 1.125rem;
            font-weight: 600;
            color: var(--text-main);
        }

        .scraper-card-status {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.875rem;
            font-weight: 500;
        }

        .scraper-card-status.success {
            color: var(--success);
        }

        .scraper-card-status.failed {
            color: var(--error);
        }

        .scraper-card-status.inactive {
            color: #6d6a6a;
        }

        .scraper-card-status.loading {
            color: var(--text-muted);
        }

        .status-indicator {
            width: 0.5rem;
            height: 0.5rem;
            border-radius: 50%;
        }

        .status-indicator.success {
            background-color: var(--success);
        }

        .status-indicator.failed {
            background-color: var(--error);
        }

    .status-indicator.inactive {
    background-color: #6d6a6a;
}  

        .status-indicator.failed {
            background-color: var(--error);
        }

        .status-indicator.loading {
            background-color: var(--text-muted);
            animation: pulse 1.5s ease-in-out infinite;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.3; }
        }

        .scraper-card-time {
            display: flex;
            flex-direction: column;
            gap: 0.25rem;
        }

        .scraper-card-time-label {
            font-size: 0.75rem;
            color: var(--text-muted);
            text-transform: uppercase;
            font-weight: 600;
            letter-spacing: 0.5px;
        }

        .scraper-card-time-value {
            font-size: 1.25rem;
            font-weight: 700;
            color: var(--text-main);
        }

        .scraper-card-actions {
            display: flex;
            gap: 0.5rem;
            margin-top: auto;
        }

      .scraper-card-actions .btn-secondary {
            flex: 1;
            text-align: center;
            justify-content: center;
        }
        .scraper-card.loading .scraper-card-actions {
            opacity: 0.5;
            pointer-events: none;
        }

        .card-loading-indicator {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            color: var(--text-muted);
            font-size: 0.875rem;
        }

        .card-loading-indicator .spinner {
            width: 1rem;
            height: 1rem;
            border: 2px solid #d1d5db;
            border-top-color: var(--primary);
            border-radius: 50%;
            animation: spin 0.6s linear infinite;
        }

       .tooltip-container {
        vertical-align: super;
    position: relative;
    display: inline-flex; /* Changed to inline-flex for better alignment */
    align-items: center;
}

.tooltip-icon {
    display: inline-block;
    color: #9ca3af; /* Slightly softer gray */
    transition: all 0.2s ease;
    margin-left: 4px; /* Space between text and icon */
    vertical-align: middle;
}


.tooltip-text {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    /* Positioning to the right */
    left: 100%; 
    top: 50%;
    transform: translateY(-50%) translateX(10px); /* 10px gap from icon */
    
    /* Modern Styling */
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px); /* Modern glass effect */
    color: #1f2937;
    padding: 10px 14px;
    border-radius: 8px; /* Rounder corners */
    font-size: 13px;
    line-height: 1.4;
    font-weight: 500;
    white-space: normal; /* Allow text to wrap if long */
    width: 220px; /* Defined width for better tooltips */
    z-index: 1000;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    pointer-events: none;
    
    /* Modern soft shadow */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(229, 231, 235, 1);
}


.tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
    transform: translateY(-50%) translateX(15px); /* Slight slide-in animation */
}

@keyframes autoGrow {
    0% { width: 0%; }
    100% { width: 90%; }
}


    .accordion-content {
        display: grid;
        grid-template-rows: 0fr;
        transition: grid-template-rows 300ms ease-in-out;
    }

    .accordion-content.open {
        grid-template-rows: 1fr;
    }

    .accordion-inner {
        overflow: hidden;
    }

  .chevron {
    /* 1. Reset and clickability */
    display: inline-block;
    cursor: pointer;
    pointer-events: auto !important; /* Forces the icon to be clickable */
    
    /* 2. Sizing and Animation */
    width: 14px; 
    height: 14px; 
    margin-left: 4px; 
    transition: transform 100ms ease-in-out;

    /* 3. The "Higher than Middle" Fix */
    /* Using relative positioning allows you to nudge it precisely */
    position: relative;
    top: -2px; /* Adjust this to move it higher or lower than the text top */
    vertical-align: middle; 
}

.chevron.rotate {
    /* Keep the rotation centered on the icon */
    transform: rotate(180deg);
}

/* Ensure the parent doesn't swallow the click if you only want the icon clickable */
.parent-container-class {
    pointer-events: none;
}

.parent-container-class .chevron {
    pointer-events: auto;
}

    .header-row {
        cursor: pointer;
        display: flex;
        align-items: center;
        padding: 0px 0;
        user-select: none;
    }
    
    .select-btn-row {
        display: flex; 
        justify-content: flex-end; 
        margin-bottom: 8px;
    }

    @media (min-width: 768px) {
    .heading-xs {
        font-size: 24px;
    }
}

/* ── Mobile layout ────────────────────────────────────────────────────────────
   Phone-sized screens. Stack the side-by-side panels, drop the cards grid to
   a single column, let the URL input + button wrap, and shrink the body
   padding so glass panels reach the edges. `!important` is needed against the
   inline `style="..."` attributes set by updateSummaryPanel.                  */
@media (max-width: 768px) {
    body {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .panel { padding: 1rem; }
    .glass-panel { padding: 1rem; }

    .input-row { flex-direction: column; gap: 0.75rem; }
    .input-row input,
    .input-row .btn { width: 100%; }

    .scraper-cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .scraper-card { padding: 1rem; }

    .scraper-chips { flex-wrap: wrap; }

    /* Summary panel: the inline grid sets `1fr 1fr` and ±2rem margins; */
    /* override to a single column on mobile.                            */
    .summary-outer  { margin: 0 !important; }
    .summary-grid   { grid-template-columns: 1fr !important; gap: 1rem !important; }
    .summary-grid > .glass-panel {
        margin: 0 0 1rem 0 !important;
    }

    /* Detailed-results heading shrinks. */
    .heading-xs { font-size: 18px; }
}

@media (max-width: 480px) {
    body {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    .glass-panel { padding: 0.75rem; }
    .scraper-card { padding: 0.75rem; }
}
