:root {
    --bg: #111;
    --panel: #151515;
    --ink: #eaeaea;
    --muted: #a8a8a8;
    --line: #262626;
    --accent: #ff6a00;
    --accent-2: #ff842b;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    --radius: 14px;

    --btn-fg: #111;
    --btn-grad-1: var(--accent);
    --btn-grad-2: var(--accent-2);
    --btn-grad-1-hover: #ff7a1f;
    --btn-grad-2-hover: #ffa366;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    color: var(--ink);
    font: 16px/1.45 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
}

.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 40px 20px 64px;
}

.header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

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

.logo {
    flex: none;
}

.titles h1 {
    margin: 0;
    font-size: 26px;
    line-height: 1.2;
}

.titles .sub {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 14px;
    max-width: 520px;
}

.lang-btn {
    flex: none;
    background: var(--panel);
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 14px;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.lang-btn:hover {
    color: var(--ink);
    border-color: var(--accent);
}

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}

.check-form {
    display: flex;
    gap: 10px;
}

.check-form__input {
    flex: 1;
    min-width: 0;
    background: var(--bg);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px 14px;
    font: 15px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.check-form__input:focus {
    outline: none;
    border-color: var(--accent);
}

.check-form__input::placeholder {
    color: #666;
}

.btn-accent {
    flex: none;
    border: 0;
    border-radius: 10px;
    padding: 12px 22px;
    color: var(--btn-fg);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(135deg, var(--btn-grad-1), var(--btn-grad-2));
}

.btn-accent:hover {
    background: linear-gradient(135deg, var(--btn-grad-1-hover), var(--btn-grad-2-hover));
}

.btn-accent[disabled] {
    opacity: .6;
    cursor: default;
}

.status {
    margin: 12px 2px 0;
    color: var(--muted);
    font-size: 14px;
    min-height: 20px;
}

.status:empty {
    display: none;
}

.status.error {
    color: #ff6b6b;
}

.page-line {
    margin: 18px 2px 6px;
    color: var(--muted);
    font-size: 14px;
    word-break: break-all;
}

.page-line b {
    color: var(--ink);
    font-weight: 600;
}

.summary {
    margin: 6px 2px 18px;
    font-size: 15px;
    font-weight: 700;
}

.summary--ok {
    color: #7ee787;
}

.summary--warn {
    color: #e3b341;
}

.summary--bad {
    color: #ff6b6b;
}

.section {
    border: 1px solid var(--line);
    border-radius: 10px;
    margin-bottom: 14px;
    overflow: hidden;
}

.section__title {
    margin: 0;
    padding: 12px 16px;
    font-size: 15px;
    background: rgba(255, 255, 255, .03);
    border-bottom: 1px solid var(--line);
}

.section__body {
    padding: 12px 16px 14px;
}

.messages {
    list-style: none;
    margin: 0;
    padding: 0;
}

.message {
    padding: 5px 0 5px 24px;
    position: relative;
    font-size: 14px;
}

.message::before {
    position: absolute;
    left: 2px;
    font-weight: 700;
}

.message--error::before {
    content: "✗";
    color: #ff6b6b;
}

.message--warning::before {
    content: "⚠";
    color: #e3b341;
}

.message--ok::before {
    content: "✓";
    color: #5aa66a;
}

.message--ok {
    color: var(--muted);
}

.section__icons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.section__icon {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.section__icon img {
    max-width: 64px;
    max-height: 64px;
}

.section__icon figcaption {
    color: var(--muted);
    font-size: 12px;
}

.scores {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.score {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    background: rgba(255, 255, 255, .02);
}

.score__value {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.1;
}

.score__label {
    color: var(--muted);
    font-size: 12px;
    margin-top: 4px;
}

.score--ok .score__value {
    color: #7ee787;
}

.score--warn .score__value {
    color: #e3b341;
}

.score--bad .score__value {
    color: #ff6b6b;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.metric {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
}

.metric__label {
    color: var(--muted);
    font-size: 12px;
}

.metric__value {
    font-size: 17px;
    font-weight: 700;
    margin-top: 2px;
}

.metric--ok .metric__value {
    color: #7ee787;
}

.metric--warn .metric__value {
    color: #e3b341;
}

.metric--bad .metric__value {
    color: #ff6b6b;
}

.section__counts {
    float: right;
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
}

.finding__where,
.note {
    color: var(--muted);
    font-size: 12px;
}

.finding__where {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    word-break: break-all;
}

.note {
    margin: 10px 0 0;
}

.opportunity {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 5px 0;
    font-size: 14px;
}

.opportunity__saving {
    flex: none;
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

@media (max-width: 560px) {
    .container {
        padding-top: 24px;
    }

    .check-form {
        flex-direction: column;
    }

    .btn-accent {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
