/* New integrated design */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(180deg, #0a0a0a 0%, #0f0f0f 100%);
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

/* Title Bar Section */
.title-bar {
    background: linear-gradient(180deg, rgba(26, 26, 26, 0.95) 0%, rgba(20, 20, 20, 0.95) 100%);
    backdrop-filter: blur(10px);
    padding: 24px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(42, 42, 42, 0.6);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.shield-icon {
    width: 32px;
    height: 32px;
    background-color: transparent;
    border-radius: 4px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text h1 {
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.logo-text p {
    font-size: 14px;
    color: #a0a0a0;
    font-weight: 400;
    line-height: 1.2;
}

.scanner-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid rgba(74, 74, 74, 0.5);
    border-radius: 24px;
    background: rgba(59, 130, 246, 0.08);
    transition: all 0.3s ease;
}

.scanner-badge:hover {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

.grid-icon {
    width: 16px;
    height: 16px;
    position: relative;
}

.grid-icon::before {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background-color: #3b82f6;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: -6px 0 0 #3b82f6, 6px 0 0 #3b82f6, 0 -6px 0 #3b82f6, 0 6px 0 #3b82f6;
}

.grid-icon::after {
    display: none;
}

.scanner-badge span {
    font-size: 14px;
    color: #ffffff;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Instruction Section */
.instruction-section {
    padding: 100px 40px 70px;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease-out;
}

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

.instruction-section h2 {
    font-size: 52px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 28px;
    letter-spacing: -1px;
}

.instruction-section h2 .blue-text {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.instruction-section h2 .white-text {
    color: #ffffff;
}

.instruction-section p {
    font-size: 19px;
    color: #b0b0b0;
    line-height: 1.7;
    font-weight: 400;
    max-width: 700px;
    margin: 0 auto;
}

/* Search Section */
.search-section {
    padding: 0 40px 80px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.search-section--store {
    padding-bottom: 32px;
}

.search-section-label {
    margin-bottom: 14px;
}

.search-section-tip {
    margin-top: 14px;
}

/* Chrome Web Store search (dataset) */
.store-search-wrap {
    position: relative;
}

.store-search-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(10, 10, 10, 0.8);
    border: 1.5px solid rgba(74, 74, 74, 0.5);
    border-radius: 16px;
    padding: 14px 20px;
    transition: all 0.2s ease;
}

.store-search-input-wrap:focus-within {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.store-search-chrome-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: contain;
}

.store-search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 16px;
    outline: none;
    font-family: inherit;
}

.store-search-input::placeholder {
    color: #6a6a6a;
}

.store-search-results {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 8px;
    background: rgba(18, 18, 20, 0.98);
    border: 1px solid rgba(42, 42, 42, 0.6);
    border-radius: 14px;
    max-height: 320px;
    overflow-y: auto;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.store-search-result-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    cursor: pointer;
    transition: background 0.15s ease;
    border-radius: 10px;
    margin: 6px;
}

.store-search-result-item:hover,
.store-search-result-item:focus {
    background: rgba(59, 130, 246, 0.12);
    outline: none;
}

.store-search-result-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    flex-shrink: 0;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.06);
}

.store-search-result-icon-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.08);
    display: none;
}

.store-search-result-icon-placeholder.store-search-result-icon-visible {
    display: inline-block;
}

.store-search-result-text {
    flex: 1;
    min-width: 0;
}

.store-search-result-title {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.store-search-result-meta {
    font-size: 12px;
    color: #a0a0a0;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.store-search-result-message {
    padding: 16px 18px;
    color: #a0a0a0;
    font-size: 14px;
}

.search-container {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(20, 20, 20, 0.95) 100%);
    border-radius: 28px;
    padding: 20px;
    border: 1px solid rgba(42, 42, 42, 0.6);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.02);
    transition: all 0.3s ease;
}

.search-container:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(59, 130, 246, 0.1);
}

.search-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(10, 10, 10, 0.8);
    border: 1.5px solid rgba(74, 74, 74, 0.5);
    border-radius: 16px;
    padding: 18px 24px;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.search-bar-wrapper:focus-within {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), 0 4px 12px rgba(0, 0, 0, 0.3);
    background: rgba(10, 10, 10, 0.95);
}

.chrome-logo {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: contain;
}

.separator {
    width: 1px;
    height: 24px;
    background-color: #4a4a4a;
}

.search-icon {
    width: 20px;
    height: 20px;
    color: #3b82f6;
    flex-shrink: 0;
    position: relative;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.search-bar-wrapper:focus-within .search-icon {
    opacity: 1;
}

.search-icon::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid currentColor;
    border-radius: 50%;
    top: 0;
    left: 0;
}

.search-icon::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 2px;
    background-color: currentColor;
    transform: rotate(45deg);
    bottom: 2px;
    right: 2px;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 16px;
    outline: none;
    font-family: inherit;
    font-weight: 400;
    letter-spacing: 0.2px;
}

.search-input:focus {
    color: #ffffff;
}

.search-input::placeholder {
    color: #6a6a6a;
}

.scan-button {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    padding: 18px 36px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    letter-spacing: 0.3px;
}

.scan-button:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.scan-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.arrow-icon {
    width: 16px;
    height: 16px;
    border-right: 2px solid #ffffff;
    border-top: 2px solid #ffffff;
    transform: rotate(45deg);
}

.fast-secure-text {
    text-align: center;
    color: #b0b0b0;
    font-size: 15px;
    margin-top: 20px;
    font-weight: 400;
}

/* TEMPORARY_SAMPLE_RESULTS: delete this block when VM is available (see index.html + app.js) */
.sample-results-wrap {
    text-align: center;
    margin-top: 12px;
}

.sample-results-dropdown-wrap {
  position: relative;
}

.sample-results-dropdown {
  left: center;
  right: center;
  min-width: 320px;
}

.sample-results-btn {
    background: transparent;
    border: 1px solid rgba(100, 100, 100, 0.6);
    color: #a0a0a0;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
}
.sample-results-btn:hover {
    color: #fff;
    border-color: rgba(140, 140, 140, 0.8);
}
.sample-results-hint {
    margin-left: 8px;
    color: #666;
    font-size: 12px;
    letter-spacing: 0.2px;
}
/* /TEMPORARY_SAMPLE_RESULTS */

/* Results Section */
.results-section {
    padding: 5px 40px 80px;
    text-align: center;
}

.results-link {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: #ffffff;
    font-size: 26px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 12px 24px;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.results-link:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.document-icon {
    width: 24px;
    height: 24px;
    position: relative;
}

.document-icon::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 22px;
    border: 2px solid #ffffff;
    border-radius: 2px;
    top: 0;
    left: 0;
}

.document-icon::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 1.5px;
    background-color: #ffffff;
    top: 6px;
    left: 4px;
    box-shadow: 0 3px 0 #ffffff, 0 6px 0 #ffffff, 0 9px 0 #ffffff;
}

@media (max-width: 768px) {
    .title-bar {
        padding: 20px 24px;
    }

    .instruction-section {
        padding: 80px 24px 50px;
    }

    .ml-page { padding: 0 24px 60px; }
    .ml-page-hero { padding: 50px 24px 32px; }
    .ml-gallery { grid-template-columns: 1fr; }

    .instruction-section h2 {
        font-size: 36px;
        letter-spacing: -0.5px;
    }

    .instruction-section p {
        font-size: 17px;
    }

    .search-section {
        padding: 0 24px 60px;
    }

    .search-container {
        padding: 28px;
        border-radius: 24px;
    }

    .search-bar-wrapper {
        flex-wrap: wrap;
        padding: 16px 20px;
    }

    .scan-button {
        width: 100%;
        justify-content: center;
        padding: 16px 32px;
    }

    .logo-text h1 {
        font-size: 22px;
    }

    .scanner-badge {
        padding: 8px 14px;
    }

}
/* --- Make Google CSE readable on dark UI --- */
.gsc-control-cse,
.gsc-control-cse * {
  font-family: inherit !important;
}

.gsc-control-cse {
  background: transparent !important;
  border: none !important;
}

.gsc-input-box {
  background: #0a0a0a !important;
  border: 1px solid #4a4a4a !important;
}

.gsc-input-box input {
    color: #ffffff !important;
}

.gsc-results .gsc-webResult {
  background: transparent !important;
}

.gsc-webResult .gsc-result {
  background: transparent !important;
}

.gsc-webResult .gsc-result a {
  color: #3b82f6 !important;
}

/* --- CSE autocomplete dropdown  --- */
.gsc-completion-container {
  background: #ffffff !important;
  border: 1px solid #2a2a2a !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6) !important;
}

.gsc-completion-container table,
.gsc-completion-container tr,
.gsc-completion-container td {
  background: transparent !important;
}

.gsc-completion-container .gsc-completion-title {
  color: #ffffff !important;
}

.gsc-completion-container .gsc-completion-snippet,
.gsc-completion-container .gsc-completion-url {
  color: #a0a0a0 !important;
}

.gsc-completion-container .gsc-completion-selected {
  background: rgba(59,130,246,0.18) !important; /* blue highlight */
}

/*  the CSE input text is white */
.gsc-input-box input.gsc-input,
.gsc-input-box input.gsc-input:focus {
    color: #000000 !important;
}

/* Some CSE themes use this wrapper */
.gsc-input {
    color: #ffffff !important;
}

/* --- Logo icon --- */
.shield-icon{
  width: 32px;
  height: 32px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius: 8px;
  background: transparent;
  border: none;
}
/* --- Tabs --- */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid #2a2a2a;
}

.tab {
    background: transparent;
    border: none;
    color: #a0a0a0;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    border-radius: 8px 8px 0 0;
    letter-spacing: 0.2px;
}

.tab:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.03);
}

.tab.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
    background: rgba(59, 130, 246, 0.08);
}

.tab-panels {
    background: rgba(10, 10, 10, 0.8);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(42, 42, 42, 0.6);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tab-panel {
  display: none;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  color: #ffffff;
}

.tab-panel.active {
  display: block;
}

/* Summary tab: risk score, level, metadata (not monospace) */
#tab-summary {
  white-space: normal;
  font-family: inherit;
}

.summary-empty,
.summary-loading {
  color: #a0a0a0;
  margin: 0;
}

.summary-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.summary-score-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.summary-score {
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
  min-width: 64px;
  text-align: center;
}

.summary-risk-low { color: #22c55e; }
.summary-risk-medium { color: #eab308; }
.summary-risk-high { color: #fca5a5; } 
.summary-risk-critical { color: #ef4444; }

.summary-score-label {
  font-size: 12px;
  color: #a0a0a0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.summary-level {
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
}

.summary-level-low { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.summary-level-medium { background: rgba(234, 179, 8, 0.2); color: #eab308; }
.summary-level-high { background: rgba(255, 190, 190, 0.348); color: #fca5a5; } 
.summary-level-critical { background: rgba(239, 68, 68, 0.35); color: #ef4444; }
.summary-level-safe { background: rgba(34, 197, 94, 0.2); color: #22c55e; }

.summary-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: flex-start;
}

.summary-left {
  flex: 1;
  min-width: 0;
}

.summary-right {
  flex: 0 0 auto;
}

.summary-guide {
  background: rgba(10, 10, 10, 0.6);
  border: 1px solid rgba(42, 42, 42, 0.6);
  border-radius: 14px;
  padding: 16px;
  min-width: 200px;
}

.summary-guide-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #808080;
  margin: 0 0 12px;
  font-weight: 600;
}

.summary-guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.summary-guide-table th,
.summary-guide-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(42, 42, 42, 0.5);
}

.summary-guide-table th {
  color: #808080;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.summary-guide-table tbody tr:last-child td {
  border-bottom: none;
}

.summary-guide-row.summary-guide-safe td:first-child { color: #198e44; font-weight: 500; }
.summary-guide-row.summary-guide-low td:first-child { color: #22c55e; font-weight: 500; }
.summary-guide-row.summary-guide-medium td:first-child { color: #eab308; font-weight: 500; }
.summary-guide-row.summary-guide-high td:first-child { color: #fca5a5; font-weight: 500; }
.summary-guide-row.summary-guide-critical td:first-child { color: #ef4444; font-weight: 500; } 

.summary-guide-table td:last-child {
  color: #a0a0a0;
}

.summary-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-meta-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: baseline;
}

.summary-meta-label {
  font-size: 12px;
  color: #808080;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.summary-meta-label-recommendation {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.summary-meta-value {
  font-size: 14px;
  color: #e5e5e5;
}

/* Manifest tab: permission bars with click-to-expand descriptions */
#tab-manifest.manifest-tab,
#tab-html.manifest-tab,
#tab-css.manifest-tab,
#tab-js.manifest-tab,
#tab-ml.manifest-tab {
  white-space: normal;
  font-family: inherit;
}

/* ML Prediction tab */
.ml-prediction-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-bottom: 20px;
}

.ml-prediction-label {
  font-size: 28px;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 12px;
}

.ml-label-benign {
  background: rgba(34, 197, 94, 0.25);
  color: #22c55e;
}

.ml-label-malicious {
  background: rgba(239, 68, 68, 0.25);
  color: #ef4444;
}

.ml-label-unknown {
  background: rgba(100, 100, 100, 0.25);
  color: #a0a0a0;
}

.ml-prediction-sublabel {
  font-size: 13px;
  color: #808080;
}

.ml-tab-content .summary-meta-row {
  margin-bottom: 8px;
}

.ml-learn-more-wrap {
  margin: 24px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(42, 42, 42, 0.6);
}

.ml-learn-more {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 600;
}

.ml-learn-more:hover {
  text-decoration: underline;
}

.manifest-empty {
  color: #a0a0a0;
  margin: 0;
}

.manifest-section {
  margin-bottom: 24px;
}

.manifest-section:last-child {
  margin-bottom: 0;
}

.manifest-section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #808080;
  margin-bottom: 10px;
  font-weight: 600;
}

.manifest-permission-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.manifest-permission-bar {
  border: 1px solid rgba(42, 42, 42, 0.8);
  border-radius: 10px;
  background: rgba(30, 30, 30, 0.8);
  cursor: pointer;
  overflow: hidden;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.manifest-permission-bar:hover {
  background: rgba(45, 45, 45, 0.9);
  border-color: rgba(70, 70, 70, 0.9);
}

/* Risky permission (has description in app – known sensitive permission) */
.manifest-permission-bar.manifest-permission-risky {
  background: rgba(234, 234, 12, 0.12);
  border-color: rgba(234, 234, 12, 0.35);
}

.manifest-permission-bar.manifest-permission-risky:hover {
  background: rgba(234, 234, 12, 0.18);
  border-color: rgba(234, 234, 12, 0.5);
}

/* Security policy: green when present, red when absent */
.manifest-permission-bar.manifest-csp-present {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.35);
}

.manifest-permission-bar.manifest-csp-present:hover {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.5);
}

.manifest-permission-bar.manifest-csp-absent {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
}

.manifest-permission-bar.manifest-csp-absent:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.5);
}

.manifest-permission-bar .manifest-permission-label {
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 500;
  color: #e5e5e5;
  display: flex;
  align-items: center;
}

.manifest-permission-bar .manifest-permission-label::after {
  content: "";
  margin-left: auto;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #808080;
  transition: transform 0.2s ease;
}

.manifest-permission-bar.expanded .manifest-permission-label::after {
  transform: rotate(180deg);
}

.manifest-permission-bar .manifest-permission-desc {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  font-size: 13px;
  color: #a0a0a0;
  line-height: 1.5;
  padding: 0 14px;
}

.manifest-permission-bar.expanded .manifest-permission-desc {
  max-height: 120px;
  padding: 0 14px 14px;
  padding-top: 0;
  margin-top: -4px;
}

.manifest-permission-bar.manifest-host .manifest-permission-label {
  font-family: ui-monospace, monospace;
  font-size: 13px;
}

.manifest-policy-status {
  margin: 0;
  font-size: 14px;
  color: #e5e5e5;
}

.navlinks {
  display: flex;              
  justify-content: center;    
  gap: 24px;                  
  margin-top: 10px;           
}

.navlinks a {
  color: white;               
  text-decoration: none;
  font-weight: 500;
}

.navlinks a:hover {
  text-decoration: underline;
}

.navlinks a.active {
  font-weight: bold;
}

/* ML documentation page (ml.html) – consistent with homepage */
.ml-page {
  padding: 0 40px 80px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.ml-page-hero {
  padding: 60px 40px 40px;
}

.ml-page-hero-sub {
  font-size: 19px;
  color: #b0b0b0;
  line-height: 1.7;
  max-width: 700px;
  margin: 0 auto 24px;
}

.ml-toc {
  background: rgba(26, 26, 26, 0.8);
  border: 1px solid rgba(42, 42, 42, 0.6);
  border-radius: 16px;
  padding: 18px 24px;
  margin-top: 20px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.ml-toc b { color: #e5e5e5; }
.ml-toc a { color: #3b82f6; text-decoration: none; margin-right: 14px; margin-bottom: 6px; display: inline-block; }
.ml-toc a:hover { text-decoration: underline; }

.ml-cards {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 24px;
}

.ml-card {
  background: rgba(10, 10, 10, 0.8);
  border: 1px solid rgba(42, 42, 42, 0.6);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.ml-card h2 {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 12px;
  letter-spacing: -0.3px;
}

.ml-card p,
.ml-card .muted {
  color: #b0b0b0;
  font-size: 15px;
  line-height: 1.65;
  margin: 0 0 14px;
}

.ml-card p:last-child,
.ml-card .muted:last-child { margin-bottom: 0; }

.ml-card ul {
  margin: 0 0 14px 20px;
  padding: 0;
  color: #b0b0b0;
  font-size: 15px;
  line-height: 1.7;
}

.ml-card ul li { margin-bottom: 6px; }

.ml-card code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 6px;
  border-radius: 4px;
  color: #c0c0c0;
}

.ml-two {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

@media (min-width: 700px) {
  .ml-two { grid-template-columns: 1fr 1fr; }
}

.ml-two .ml-card {
  margin: 0;
  padding: 18px;
}

.ml-two .ml-card h2 { font-size: 16px; margin-bottom: 8px; }

.ml-kpi {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.ml-pill {
  background: rgba(26, 26, 26, 0.9);
  border: 1px solid rgba(42, 42, 42, 0.6);
  border-radius: 12px;
  padding: 12px 14px;
}

.ml-pill .label { font-size: 12px; color: #808080; text-transform: uppercase; letter-spacing: 0.04em; }
.ml-pill .value { font-size: 16px; font-weight: 700; color: #e5e5e5; margin-top: 4px; }

.ml-note {
  border-left: 3px solid #3b82f6;
  background: rgba(59, 130, 246, 0.08);
  padding: 12px 16px;
  border-radius: 0 10px 10px 0;
  color: #b0b0b0;
  font-size: 14px;
  margin-top: 16px;
}

.ml-note b { color: #e5e5e5; }

.ml-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(42, 42, 42, 0.6);
  border-radius: 12px;
  padding: 14px;
  color: #c0c0c0;
  overflow-x: auto;
  margin-top: 10px;
}

.ml-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.ml-gallery figure {
  margin: 0;
  border: 1px solid rgba(42, 42, 42, 0.6);
  border-radius: 14px;
  background: rgba(10, 10, 10, 0.6);
  padding: 12px;
  overflow: hidden;
}

.ml-gallery figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.ml-gallery figcaption {
  margin-top: 10px;
  color: #ffffff;
  font-size: 13px;
  text-align: center;
}

.ml-page-back {
  margin: 32px 0 0;
  padding-top: 24px;
  border-top: 1px solid rgba(42, 42, 42, 0.5);
}

.ml-page-back a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
}

.ml-page-back a:hover { text-decoration: underline; }