:root {
    color-scheme: light dark;
    --fg: #1a1a1a;
    --bg: #fafafa;
    --accent: #2f6fed;
    --border: #ddd;
}

@media (prefers-color-scheme: dark) {
    :root {
        --fg: #eee;
        --bg: #14161a;
        --border: #333;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--fg);
    background: var(--bg);
}

.site-header {
    padding: 1.5rem;
}

.brand {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--fg);
}

.brand span {
    color: var(--accent);
}

main {
    max-width: 640px;
    margin: 0 auto;
    padding: 1rem 1.5rem 4rem;
}

.tagline {
    opacity: 0.8;
}

.tabs {
    display: flex;
    gap: 0.5rem;
    margin: 1.5rem 0 1rem;
}

.tab {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--fg);
    border-radius: 8px;
    cursor: pointer;
}

.tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.result {
    display: block;
    width: 100%;
    padding: 1rem;
    font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
    font-size: 1.25rem;
    word-break: break-all;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

button {
    font-family: inherit;
}

.copy {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--fg);
    cursor: pointer;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1.25rem 0;
}

.options input[type="range"] {
    width: 100%;
}

.primary {
    width: 100%;
    padding: 0.85rem;
    border: none;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
}

.primary:disabled {
    background: var(--border);
    color: var(--fg);
    opacity: 0.6;
    cursor: not-allowed;
}

.strength {
    margin-bottom: 1rem;
}

.strength__bar {
    height: 6px;
    border-radius: 3px;
    background: var(--border);
    overflow: hidden;
}

.strength__fill {
    height: 100%;
    border-radius: 3px;
    background: #d92626;
    transition: width 0.2s ease, background-color 0.2s ease;
}

.strength[data-score="1"] .strength__fill { background: #e07b1a; }
.strength[data-score="2"] .strength__fill { background: #e0c31a; }
.strength[data-score="3"] .strength__fill { background: #8bc22c; }
.strength[data-score="4"] .strength__fill { background: #1fa855; }

.strength__label {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    opacity: 0.75;
}

.error-message {
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
    color: #d92626;
}

.error-message:empty {
    display: none;
}

.site-footer {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding: 2rem 0;
    font-size: 0.9rem;
}

.site-footer a {
    color: inherit;
}

.legal h2 {
    margin-top: 1.5rem;
}

.article-list__item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.article-list__excerpt {
    opacity: 0.8;
}

.pagination {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.article__disclosure {
    display: inline-block;
    padding: 0.4rem 0.75rem;
    margin-bottom: 1rem;
    border-radius: 6px;
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    font-size: 0.85rem;
}

.article__content {
    line-height: 1.6;
}

.article__backlink {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    opacity: 0.85;
}

.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    max-width: 640px;
    margin: 0 auto;
    padding: 1rem 1.25rem;
    background: var(--fg);
    color: var(--bg);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.cookie-banner__actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.cookie-banner__actions button {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid var(--bg);
    background: transparent;
    color: var(--bg);
    cursor: pointer;
}

#cookie-consent-accept {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
