:root {
    --ink: #102a43;
    --muted: #627d98;
    --line: #d9e2ec;
    --soft-line: #eaf0f5;
    --paper: #ffffff;
    --canvas: #f5f8fb;
    --blue: #1769e0;
    --blue-dark: #0b4eac;
    --blue-soft: #eaf3ff;
    --green: #14825f;
    --green-soft: #e9f8f2;
    --amber: #a85c00;
    --amber-soft: #fff6e5;
    --red: #b42318;
    --red-soft: #fff0ee;
    --shadow: 0 24px 60px rgba(16, 42, 67, 0.08);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 13% 4%, rgba(23, 105, 224, 0.08), transparent 26rem),
        linear-gradient(180deg, #fbfdff 0, var(--canvas) 32rem);
}

button, input { font: inherit; }

.site-header {
    max-width: 1120px;
    margin: 0 auto;
    padding: 22px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 750;
    letter-spacing: -0.02em;
}

.brand > span:last-child span { color: var(--blue); }

.brand-mark {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: white;
    background: linear-gradient(145deg, var(--blue), #4d9aff);
    box-shadow: 0 7px 18px rgba(23, 105, 224, 0.24);
}

.header-badge {
    padding: 7px 11px;
    color: var(--blue-dark);
    background: var(--blue-soft);
    border: 1px solid #cfe2ff;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

main { max-width: 980px; margin: 0 auto; padding: 64px 28px 70px; }
.intro { max-width: 690px; margin: 0 auto 34px; text-align: center; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 16px;
    color: var(--blue-dark);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.intro h1 {
    margin: 0;
    color: #0a2540;
    font-size: clamp(2.35rem, 6vw, 4.2rem);
    line-height: 1.02;
    letter-spacing: -0.052em;
}

.intro p {
    max-width: 610px;
    margin: 19px auto 0;
    color: var(--muted);
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    line-height: 1.65;
}

.analyzer-shell {
    padding: 13px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--soft-line);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.drop-zone {
    min-height: 228px;
    padding: 34px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    text-align: center;
    border: 1.5px dashed #aac6e8;
    border-radius: 15px;
    background: linear-gradient(180deg, #fbfdff, #f5faff);
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.drop-zone:hover, .drop-zone:focus-visible, .drop-zone.is-dragging {
    outline: none;
    border-color: var(--blue);
    background: #eef6ff;
}
.drop-zone.is-dragging { transform: scale(0.995); }

.drop-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    color: var(--blue);
    background: white;
    border: 1px solid #d7e7fa;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(23, 105, 224, 0.1);
}

.drop-zone strong { display: block; margin-bottom: 5px; font-size: 1.12rem; }
.drop-zone span { color: var(--muted); }
.drop-zone .link-text { color: var(--blue); font-weight: 700; }
.drop-zone small { color: #829ab1; }

.analysis-status {
    min-height: 228px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-align: left;
}

.analysis-status strong, .analysis-status span { display: block; }
.analysis-status span { margin-top: 5px; color: var(--muted); font-size: 0.9rem; }

.status-spinner {
    width: 34px;
    height: 34px;
    border: 3px solid #dceaff;
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 800ms linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
.error-box { padding: 22px; color: var(--red); background: var(--red-soft); border-radius: 13px; }

.trust-panel {
    margin: 24px auto 0;
    padding: 15px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    color: #28566f;
    font-size: 0.87rem;
}

.trust-panel strong, .trust-panel span { display: block; }
.trust-panel span { margin-top: 2px; color: var(--muted); }
.trust-icon { color: var(--green); }

.value-grid {
    margin-top: 56px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--line);
}

.value-grid article { padding: 27px 28px 0 0; }
.value-grid article + article { padding-left: 28px; border-left: 1px solid var(--line); }
.value-number { color: var(--blue); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; }
.value-grid h2 { margin: 9px 0 7px; font-size: 1rem; }
.value-grid p { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.55; }
.results { margin-top: 28px; }

.report-hero,
.report-section {
    background: var(--paper);
    border: 1px solid #e1eaf2;
    border-radius: 18px;
    box-shadow: 0 16px 44px rgba(16, 42, 67, 0.055);
}

.report-hero { padding: 26px; }

.report-title-row,
.section-heading,
.modal-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
}

.report-title-row h2 { margin: 11px 0 4px; font-size: clamp(1.25rem, 3vw, 1.7rem); letter-spacing: -0.025em; overflow-wrap: anywhere; }
.report-title-row p, .section-heading p { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.55; }

.report-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
}

.report-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-danger { color: var(--red); background: var(--red-soft); }
.status-warning { color: var(--amber); background: var(--amber-soft); }
.status-good { color: var(--green); background: var(--green-soft); }

.report-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.button,
.text-button,
.icon-button,
.report-tabs button {
    border: 0;
    cursor: pointer;
}

.button {
    min-height: 39px;
    padding: 9px 13px;
    border-radius: 9px;
    font-size: 0.8rem;
    font-weight: 750;
    transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}
.button:hover { transform: translateY(-1px); }
.button:focus-visible, .text-button:focus-visible, .report-tabs button:focus-visible, .icon-button:focus-visible { outline: 3px solid rgba(23, 105, 224, 0.24); outline-offset: 2px; }
.button.primary { color: #fff; background: var(--blue); box-shadow: 0 7px 16px rgba(23, 105, 224, 0.18); }
.button.primary:hover { background: var(--blue-dark); }
.button.secondary { color: #315b78; background: #fff; border: 1px solid #cbd8e6; }
.button.ghost { color: var(--muted); background: transparent; }
.button:disabled { cursor: wait; opacity: 0.65; }
.small-button { white-space: nowrap; }

.summary-grid,
.privacy-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-top: 24px;
}

.metric-card {
    min-width: 0;
    padding: 15px;
    background: #f6f9fc;
    border: 1px solid #edf2f6;
    border-radius: 12px;
}
.metric-card strong, .metric-card span, .metric-card small { display: block; }
.metric-card strong { font-size: 1.27rem; letter-spacing: -0.025em; }
.metric-card span { margin-top: 3px; color: #526d82; font-size: 0.77rem; font-weight: 700; }
.metric-card small { margin-top: 5px; color: #829ab1; font-size: 0.68rem; overflow-wrap: anywhere; }

.report-tabs {
    position: sticky;
    top: 0;
    z-index: 5;
    margin: 18px 0;
    padding: 6px;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    background: rgba(245, 248, 251, 0.92);
    border: 1px solid #dfe8ef;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}
.report-tabs button { padding: 9px 14px; color: var(--muted); background: transparent; border-radius: 8px; font-size: 0.8rem; font-weight: 750; white-space: nowrap; }
.report-tabs button.is-active { color: var(--blue-dark); background: white; box-shadow: 0 3px 10px rgba(16, 42, 67, 0.08); }

.tab-panel { display: none; }
.tab-panel.is-active { display: block; }
.panel-stack { display: grid; gap: 18px; }
.report-section { padding: 25px; }
.section-heading { margin-bottom: 18px; }
.section-heading h2, .modal-heading h2 { margin: 3px 0 0; font-size: 1.15rem; letter-spacing: -0.02em; }
.section-heading p { max-width: 610px; margin-top: 6px; }
.kicker { color: var(--blue); font-size: 0.65rem; font-weight: 850; letter-spacing: 0.11em; text-transform: uppercase; }
.section-count { color: var(--muted); font-size: 0.73rem; }

.issue-list { display: grid; gap: 9px; }
.issue-card { position: relative; padding: 16px 17px 16px 22px; display: flex; gap: 13px; background: #fbfdff; border: 1px solid #e4ecf3; border-radius: 12px; overflow: hidden; }
.issue-marker { position: absolute; inset: 0 auto 0 0; width: 4px; }
.severity-blocker .issue-marker { background: var(--red); }
.severity-warning .issue-marker { background: #e59a28; }
.severity-opportunity .issue-marker { background: var(--blue); }
.issue-copy { min-width: 0; }
.issue-meta { display: flex; gap: 7px; color: #829ab1; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; }
.issue-meta span + span::before { content: "·"; margin-right: 7px; }
.issue-card h3 { margin: 5px 0 4px; font-size: 0.9rem; }
.issue-card p { margin: 0; color: var(--muted); font-size: 0.8rem; line-height: 1.5; }
.issue-card small { display: block; margin-top: 6px; color: var(--blue-dark); font-size: 0.7rem; }

.empty-state { padding: 25px; text-align: center; color: var(--green); background: var(--green-soft); border-radius: 12px; }
.empty-state strong, .empty-state span { display: block; }
.empty-state span { margin-top: 5px; color: #4b7467; font-size: 0.8rem; }

.weight-summary { padding: 8px 0 1px; }
.weight-bar { height: 16px; display: flex; overflow: hidden; background: #dfe7ee; border-radius: 999px; }
.weight-bar span { min-width: 0; }
.weight-media { background: var(--blue); }
.weight-embed { background: #8265d8; }
.weight-legend { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 17px; color: var(--muted); font-size: 0.73rem; }
.weight-legend span { display: inline-flex; align-items: center; gap: 6px; }
.weight-legend i { width: 8px; height: 8px; border-radius: 50%; }
.legend-media { background: var(--blue); }
.legend-embed { background: #8265d8; }
.legend-other { background: #d1dbe4; }

.slide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.slide-card { background: #fbfdff; border: 1px solid #e1eaf2; border-radius: 12px; }
.slide-card[open] { background: #fff; border-color: #b8d2ee; box-shadow: 0 10px 25px rgba(16, 42, 67, 0.07); }
.slide-card summary { padding: 13px; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 11px; cursor: pointer; list-style: none; }
.slide-card summary::-webkit-details-marker { display: none; }
.slide-number { width: 34px; height: 34px; display: grid; place-items: center; color: var(--blue-dark); background: var(--blue-soft); border-radius: 8px; font-size: 0.76rem; font-weight: 850; }
.slide-card-main { min-width: 0; }
.slide-card-main strong, .slide-card-main span { display: block; }
.slide-card-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.8rem; }
.slide-card-main span { margin-top: 3px; color: var(--muted); font-size: 0.68rem; }
.slide-issue-count { min-width: 23px; height: 23px; padding: 0 6px; display: grid; place-items: center; color: #526d82; background: #e7eef4; border-radius: 999px; font-size: 0.66rem; font-weight: 800; }
.slide-issue-count.is-high { color: var(--red); background: var(--red-soft); }
.slide-detail { padding: 0 14px 14px; }
.slide-heat { height: 5px; overflow: hidden; background: #e6edf3; border-radius: 999px; }
.slide-heat span { display: block; height: 100%; background: linear-gradient(90deg, #70aafa, var(--blue)); border-radius: inherit; }
.slide-detail dl { margin: 13px 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.slide-detail dl div { padding: 7px 9px; background: #f6f9fb; border-radius: 7px; }
.slide-detail dt { color: #829ab1; font-size: 0.62rem; }
.slide-detail dd { margin: 2px 0 0; font-size: 0.72rem; font-weight: 700; }
.mini-heading { display: block; margin: 11px 0 5px; font-size: 0.68rem; }
.slide-detail ul { margin: 0; padding-left: 17px; color: var(--muted); font-size: 0.69rem; }
.slide-detail li { padding: 2px 0; }
.slide-detail li span { float: right; }

.privacy-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 0; }
.metadata-list { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid #e3ebf2; border-radius: 11px; background: #e3ebf2; }
.metadata-list div { min-width: 0; padding: 12px; background: #fff; }
.metadata-list dt { color: #829ab1; font-size: 0.67rem; text-transform: capitalize; }
.metadata-list dd { margin: 4px 0 0; overflow-wrap: anywhere; font-size: 0.78rem; font-weight: 700; }
.danger-section { border-color: #f5c5be; background: #fffafa; }

.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.font-chip { padding: 9px 11px; display: inline-flex; align-items: baseline; gap: 7px; background: #f3f7fb; border: 1px solid #e1e9f0; border-radius: 9px; }
.font-chip strong { font-size: 0.76rem; }
.font-chip small { color: #829ab1; font-size: 0.62rem; }
.muted-copy { color: var(--muted); font-size: 0.82rem; }

.table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid #e1e9f0; border-radius: 11px; }
table { width: 100%; border-collapse: collapse; font-size: 0.73rem; }
th { padding: 10px 12px; color: #627d98; background: #f5f8fb; font-size: 0.64rem; letter-spacing: 0.04em; text-align: left; text-transform: uppercase; }
td { padding: 11px 12px; vertical-align: top; border-top: 1px solid #e7edf2; }
.path-cell { min-width: 230px; max-width: 430px; overflow-wrap: anywhere; color: #486581; }
.row-flag { display: inline-block; margin-left: 7px; padding: 2px 5px; color: var(--amber); background: var(--amber-soft); border-radius: 4px; font-size: 0.56rem; font-weight: 800; }
.text-button { padding: 3px; color: var(--blue); background: transparent; font-size: 0.7rem; font-weight: 800; }

.modal { width: min(620px, calc(100% - 28px)); padding: 0; border: 0; border-radius: 18px; box-shadow: 0 35px 90px rgba(10, 37, 64, 0.28); }
.modal::backdrop { background: rgba(10, 37, 64, 0.52); backdrop-filter: blur(4px); }
.modal-card { padding: 25px; }
.modal-card-wide { width: min(760px, 100%); }
.modal-heading h2 { font-size: 1.3rem; }
.modal-card > p { margin: 9px 0 21px; color: var(--muted); font-size: 0.82rem; line-height: 1.55; }
.icon-button { width: 34px; height: 34px; color: var(--muted); background: #f1f5f8; border-radius: 50%; font-size: 1.35rem; }
.check-row { padding: 12px 0; display: flex; align-items: flex-start; gap: 11px; border-top: 1px solid #e8eef3; cursor: pointer; }
.check-row input { margin-top: 3px; accent-color: var(--blue); }
.check-row strong, .check-row small { display: block; }
.check-row strong { font-size: 0.82rem; }
.check-row small { margin-top: 3px; color: var(--muted); font-size: 0.7rem; line-height: 1.45; }
.modal-caution { margin-top: 13px; padding: 11px; color: var(--red); background: var(--red-soft); border-radius: 8px; font-size: 0.74rem; }
.modal-actions { margin-top: 21px; display: flex; justify-content: flex-end; gap: 8px; }
.compare-names { margin: 21px 0 0; display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--muted); font-size: 0.74rem; }
.compare-names span { max-width: 42%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compare-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.compare-detail { margin-top: 20px; padding-top: 4px; border-top: 1px solid #e6edf3; }
.compare-detail h3 { margin: 15px 0 5px; font-size: 0.78rem; }
.compare-detail p, .compare-detail ul { margin: 0; color: var(--muted); font-size: 0.75rem; }

footer {
    padding: 24px;
    color: #829ab1;
    text-align: center;
    font-size: 0.78rem;
    border-top: 1px solid var(--soft-line);
}

@media (max-width: 700px) {
    .site-header { padding: 18px 20px; }
    main { padding: 44px 16px 52px; }
    .intro { margin-bottom: 27px; }
    .analyzer-shell { padding: 8px; border-radius: 17px; }
    .drop-zone { min-height: 210px; padding: 25px 18px; }
    .trust-panel { align-items: flex-start; }
    .value-grid { grid-template-columns: 1fr; margin-top: 38px; }
    .value-grid article, .value-grid article + article { padding: 20px 4px; border-left: 0; border-bottom: 1px solid var(--line); }
    .header-badge { display: none; }
    .report-title-row, .section-heading { flex-direction: column; }
    .report-actions { justify-content: flex-start; }
    .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .summary-grid .metric-card:last-child { grid-column: 1 / -1; }
    .privacy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .slide-grid { grid-template-columns: 1fr; }
    .metadata-list { grid-template-columns: 1fr; }
    .report-section, .report-hero { padding: 18px; }
    .report-tabs { top: 0; border-radius: 9px; }
    .compare-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
