/* SquidScanner — shared readable typography (matches AI report) */
:root {
    --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, Verdana, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --font-size-body: 1.05rem;
    --line-height-body: 1.65;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: var(--font-size-body);
    line-height: var(--line-height-body);
    font-weight: 400;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-body);
}

p, li, label, span, td, th, dd, dt,
input, textarea, select, button,
.btn, .form-control, .form-select, .dropdown-menu {
    font-family: inherit;
}

pre, code, kbd, samp, .font-mono {
    font-family: var(--font-mono);
}

.ai-report-content,
.ai-tool-analysis {
    font-family: var(--font-body);
    line-height: 1.72;
}

.ai-report-content {
    font-size: 1.13rem;
}

.ai-tool-analysis {
    font-size: 0.95rem;
    line-height: 1.55;
}

.ai-report-content p,
.ai-tool-analysis p {
    margin: 0 0 0.75em;
}

.ai-report-content p:last-child,
.ai-tool-analysis p:last-child {
    margin-bottom: 0;
}

.ai-report-content strong,
.ai-tool-analysis strong {
    color: #ffb3ff;
    font-weight: 700;
}

.ai-report-content em,
.ai-tool-analysis em {
    font-style: italic;
    color: #e8b8ff;
}

.ai-report-content ul,
.ai-tool-analysis ul,
.ai-report-content ol,
.ai-tool-analysis ol {
    margin: 0.5em 0 0.75em;
    padding-left: 1.5em;
}

.ai-report-content li,
.ai-tool-analysis li {
    margin: 0.25em 0;
}

.ai-report-content h1,
.ai-report-content h2,
.ai-report-content h3,
.ai-report-content h4,
.ai-tool-analysis h1,
.ai-tool-analysis h2,
.ai-tool-analysis h3,
.ai-tool-analysis h4 {
    color: #ff66cc;
    font-weight: 700;
    margin: 0.75em 0 0.4em;
    line-height: 1.3;
}

.ai-report-content h1:first-child,
.ai-report-content h2:first-child,
.ai-report-content h3:first-child,
.ai-report-content h4:first-child,
.ai-tool-analysis h1:first-child,
.ai-tool-analysis h2:first-child,
.ai-tool-analysis h3:first-child,
.ai-tool-analysis h4:first-child {
    margin-top: 0;
}

.ai-report-content code,
.ai-tool-analysis code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: rgba(0, 255, 157, 0.08);
    padding: 0.1em 0.35em;
    border-radius: 3px;
    color: #00ff9d;
}

.ai-report-content pre,
.ai-tool-analysis pre {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid #00ff9d33;
    border-radius: 6px;
    padding: 10px 12px;
    overflow-x: auto;
    margin: 0.5em 0 0.75em;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
}

.ai-report-content pre code,
.ai-tool-analysis pre code {
    background: none;
    padding: 0;
    color: #00f0ff;
}

/* Keep AI markdown (tables, long URLs, package names) inside the report card */
.ai-report {
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.ai-report-content {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.ai-report-content a,
.ai-tool-analysis a {
    overflow-wrap: anywhere;
    word-break: break-all;
}

.ai-report-content img,
.ai-tool-analysis img {
    max-width: 100%;
    height: auto;
}

.ai-table-scroll {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0.75em 0;
    border: 1px solid rgba(255, 0, 170, 0.22);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.22);
}

.ai-report-content table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    margin: 0;
}

.ai-report-content th,
.ai-report-content td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 0, 170, 0.14);
    vertical-align: top;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 14rem;
}

.ai-report-content thead th {
    color: #ffb3ff;
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 767px) {
    .ai-report {
        padding: 0.85rem !important;
    }

    .ai-report-content {
        font-size: 0.95rem;
        line-height: 1.55;
    }

    .ai-report-content h1,
    .ai-report-content h2,
    .ai-report-content h3,
    .ai-report-content h4 {
        font-size: 1.05rem;
        line-height: 1.35;
    }

    .ai-report-content ul,
    .ai-report-content ol {
        padding-left: 1.15em;
    }

    .ai-report-content th,
    .ai-report-content td {
        font-size: 0.74rem;
        padding: 6px 8px;
        max-width: 10rem;
    }

    .ai-report-content pre {
        padding: 8px;
        font-size: 0.78rem;
    }
}