:root {
    --background: #f5f7fa;
    --text: #172033;
    --muted: #6b7280;
    --accent: #617a3a;
    --accent-hover: #4e6430;
    --border: #dde1e7;
}

* { box-sizing: border-box; }

html {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--background);
}

body { min-width: 320px; min-height: 100vh; margin: 0; }
button, a { font: inherit; }

[hidden] { display: none !important; }

.page {
    width: min(100% - 40px, 820px);
    margin-inline: auto;
    padding: 36px 0 64px;
}

.hero {
    margin-bottom: 34px;
}

.brand {
    display: block;
    width: 100%;
    text-decoration: none;
}

.brand-logo {
    display: grid;
    width: 100%;
}

.brand-logo-image {
    grid-area: 1 / 1;
    display: block;
    width: 100%;
    height: auto;
}

.brand-logo-image-accent {
    animation: logo-accent-pulse 2.8s ease-in-out infinite alternate;
}

@keyframes logo-accent-pulse {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .brand-logo-image-accent {
        animation: none;
        opacity: 1;
    }
}

.tagline {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.admin-controls {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 10px;
}

.admin-controls button,
.admin-login-form input {
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    font-size: 0.9rem;
}

.admin-login-form {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 20;
    display: grid;
    width: min(320px, calc(100vw - 40px));
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(23, 32, 51, 0.16);
}

.admin-login-form input {
    width: 100%;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    display: grid;
    width: 32px;
    min-height: 32px !important;
    padding: 0 !important;
    place-items: center;
    transform: translateY(-50%);
    border: 0 !important;
    color: var(--muted) !important;
    background: transparent !important;
    cursor: pointer;
}

.password-toggle[aria-pressed="true"] {
    color: var(--accent) !important;
}

.auth-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.admin-login-form button,
.admin-logout-button {
    cursor: pointer;
    color: #fff;
    background: var(--accent) !important;
    border-color: var(--accent) !important;
}

.admin-login-form .password-toggle {
    background: transparent !important;
    border-color: transparent !important;
    color: var(--muted) !important;
}

.user-menu {
    position: relative;
    margin-left: auto;
}

.user-menu-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    color: #172033 !important;
    background: #fff !important;
    border-color: var(--border) !important;
}

.user-avatar {
    color: var(--accent);
    font-size: 0.85rem;
}

.user-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 20;
    display: grid;
    width: min(240px, calc(100vw - 40px));
    gap: 7px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(23, 32, 51, 0.16);
}

.user-menu-label,
.user-menu-name,
.user-menu-role {
    margin: 0;
}

.user-menu-label {
    color: var(--muted);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.user-menu-name {
    font-weight: 800;
}

.user-menu-role {
    color: var(--muted);
    font-size: 0.84rem;
}

.user-menu-admin-button {
    margin-top: 4px;
}

.editor-admin-panel {
    margin: 16px 0 20px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid rgba(97, 122, 58, 0.18);
    border-radius: 8px;
}

.editor-admin-panel[hidden] {
    display: none;
}

.editor-admin-panel-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 0.9fr);
    gap: 12px;
    align-items: start;
}

.editor-admin-panel h2,
.editor-admin-panel p {
    margin: 0;
}

.editor-admin-panel h2 {
    font-size: 1rem;
    line-height: 1.25;
}

.editor-admin-kicker {
    color: var(--accent);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.editor-admin-panel-header > p,
.editor-trait-groups p {
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.45;
}

.editor-trait-groups {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.editor-trait-groups details {
    padding: 9px 10px;
    border: 1px solid var(--border);
    border-radius: 7px;
}

.editor-trait-groups summary {
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 800;
}

.editor-trait-groups p {
    margin-top: 7px;
}

.daily-briefing:not(.is-visible) {
    display: none !important;
}

.daily-briefing {
    margin-bottom: 20px;
    padding: 18px 0 20px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.daily-briefing-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.daily-briefing-kicker,
.daily-briefing-status,
.daily-briefing-meta {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.daily-briefing h1 {
    margin: 2px 0 0;
    color: var(--text);
    font-size: 1.28rem;
    line-height: 1.15;
}

.daily-briefing-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.daily-briefing-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    min-width: 0;
    padding: 0 0 11px;
    border-bottom: 1px solid rgba(203, 210, 220, 0.68);
}

.daily-briefing-link {
    display: grid;
    gap: 5px;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.daily-briefing-link strong {
    color: var(--text);
    font-size: 0.96rem;
    line-height: 1.25;
}

.daily-briefing-link span:last-child {
    color: #69717f;
    font-size: 0.84rem;
    line-height: 1.45;
}

.daily-briefing-confirmation {
    display: grid;
    grid-column: 1 / -1;
    gap: 6px;
    margin: -3px 0 0;
    color: #63734a;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.35;
}

.daily-comparison-button {
    justify-self: start;
    padding: 0;
    color: var(--accent);
    font-size: inherit;
    font-weight: 800;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.daily-source-comparison {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 8px 0 0;
    list-style: none;
    border-top: 1px solid rgba(203, 210, 220, 0.68);
}

.daily-source-comparison a {
    display: grid;
    gap: 2px;
    color: inherit;
    text-decoration: none;
}

.daily-source-comparison strong { color: var(--text); }
.daily-source-comparison span { color: var(--muted); font-weight: 500; }

.daily-ranking {
    display: grid;
    gap: 9px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(203, 210, 220, 0.68);
}

.daily-ranking-kicker {
    margin: 0;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.daily-ranking-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
}

.daily-ranking-item {
    display: grid;
    gap: 3px;
}

.daily-ranking-item span,
.daily-ranking-item small {
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.35;
}

.daily-ranking-item strong {
    color: var(--text);
    font-size: 0.92rem;
}

.daily-briefing-hooks {
    display: inline-flex;
    gap: 2px;
    padding-top: 20px;
}

.daily-briefing-hooks .bait-hook {
    width: 15px;
    height: 15px;
}
.main-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.main-category-button {
    min-height: 36px;
    padding: 7px 13px;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
}

.main-category-button:hover {
    color: var(--text);
    border-color: #bfc5cf;
}

.main-category-button-primary {
    color: #4e7131;
    background: #f3f7ed;
    border-color: #cad9b7;
}

.main-category-button-primary:hover {
    border-color: #9fb87d;
}

.main-category-button-primary.is-active {
    background: #617a3a;
    border-color: #617a3a;
}
.main-category-button.is-active {
    color: #ffffff;
    background: var(--text);
    border-color: var(--text);
}

.feed-controls {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
}

.feed-controls-label {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 650;
}

.headline-toggle {
    display: inline-flex;
    padding: 3px;
    background: #e9ecf1;
    border-radius: 10px;
}

.toggle-option {
    min-height: 34px;
    padding: 6px 13px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    background: transparent;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
    transition: color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.toggle-option:hover {
    color: var(--text);
}

.toggle-option.is-active {
    color: var(--text);
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(23, 32, 51, 0.12);
}

.toggle-option:focus-visible {
    outline: 3px solid rgba(97, 122, 58, 0.28);
    outline-offset: 2px;
}

.toggle-option[data-mode="original"] {
    color: #ad4850;
}

.toggle-option[data-mode="debaited"] {
    color: #4e7131;
}

.toggle-option[data-mode="original"].is-active {
    color: #ffffff;
    background: #bd4a52;
    box-shadow: 0 2px 7px rgba(189, 74, 82, 0.27);
}

.toggle-option[data-mode="debaited"].is-active {
    color: #ffffff;
    background: #617a3a;
    box-shadow: 0 2px 7px rgba(97, 122, 58, 0.3);
}

.news-feed {
    border-top: 1px solid var(--border);
}

.news-item {
    padding: 25px 0 27px;
    border-bottom: 1px solid var(--border);
}

.news-meta {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.news-meta span {
    margin-inline: 0.35em;
    color: #a2a8b2;
}

.headline-label {
    margin: 0 0 6px;
    color: #949aa5;
    font-size: 0.8rem;
}

.news-title {
    margin: 0;
    font-size: clamp(1.35rem, 3.5vw, 1.75rem);
    letter-spacing: -0.025em;
    line-height: 1.22;
    transition: opacity 130ms ease, transform 130ms ease;
}

.headline-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: start;
}

.item-debait-button {
    min-height: 36px;
    margin-top: 2px;
    padding: 7px 11px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 750;
    white-space: nowrap;
    background: rgba(97, 122, 58, 0.08);
    border: 1px solid rgba(97, 122, 58, 0.16);
    border-radius: 8px;
    cursor: pointer;
    transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.item-debait-button:hover {
    color: #ffffff;
    background: var(--accent);
    border-color: var(--accent);
}

.item-debait-button[aria-expanded="true"] {
    color: var(--muted);
    font-weight: 650;
    background: transparent;
    border-color: var(--border);
}

.item-debait-button[aria-expanded="true"]:hover {
    color: var(--text);
    background: #e9ecf1;
    border-color: #cfd4dc;
}

.item-debait-button:focus-visible {
    outline: 3px solid rgba(97, 122, 58, 0.25);
    outline-offset: 2px;
}

.item-debait-button:disabled,
.item-debait-button:disabled:hover {
    color: #8c939e;
    font-weight: 650;
    background: transparent;
    border-color: var(--border);
    cursor: not-allowed;
}

.analysis-status {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    align-items: center;
    margin-top: 3px;
    color: #8c939e;
    font-size: 0.78rem;
    font-weight: 650;
}

.headline-row > .analysis-status {
    justify-content: flex-end;
    max-width: 190px;
    text-align: right;
}

.retry-analysis-button {
    padding: 0;
    color: var(--accent);
    font-size: inherit;
    font-weight: 750;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.retry-analysis-button:hover {
    color: var(--accent-hover);
}

.retry-analysis-button:focus-visible {
    outline: 3px solid rgba(97, 122, 58, 0.25);
    outline-offset: 3px;
    border-radius: 2px;
}

.unavailable-title {
    color: var(--muted);
    font-weight: 650;
}

.bait-rating {
    display: flex;
    align-items: center;
    margin-top: 18px;
    color: var(--muted);
    font-size: 0.68rem;
}




.bait-hooks {
    display: inline-flex;
    gap: 7px;
    align-items: center;
}

.bait-hook {
    display: block;
    width: 37px;
    height: 37px;
    object-fit: contain;
    opacity: 1;
    transition: opacity 160ms ease, filter 160ms ease;
}

.bait-hook.is-muted {
    filter: grayscale(1) saturate(0);
    opacity: 0.1;
}

.bait-score {
    display: none;
}

.news-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
    align-items: center;
    margin-top: 20px;
}

.summary-button,
.show-original-button,
.source-link {
    color: var(--muted);
    font-size: 0.94rem;
    font-weight: 650;
    text-decoration: none;
}

.summary-button,
.show-original-button {
    padding: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.summary-button:hover,
.show-original-button:hover,
.source-link:hover {
    color: var(--accent);
}

.summary-button:focus-visible,
.show-original-button:focus-visible,
.source-link:focus-visible {
    outline: 3px solid rgba(97, 122, 58, 0.25);
    outline-offset: 3px;
    border-radius: 2px;
}

.debait-reveal,
.original-reveal {
    min-height: 0;
}

.debait-result {
    margin-top: 15px;
    padding: 11px 14px 12px;
    background: rgba(97, 122, 58, 0.025);
    border-left: 2px solid rgba(97, 122, 58, 0.48);
    border-radius: 0 6px 6px 0;
    animation: content-reveal 160ms ease-out both;
}

.result-label,
.original-result-label {
    margin: 0 0 6px;
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.result-label {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.result-title {
    margin: 0;
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    letter-spacing: -0.015em;
    line-height: 1.35;
}

.original-result {
    margin-top: 11px;
    padding: 8px 0 1px 13px;
    border-left: 2px solid var(--border);
    animation: content-reveal 160ms ease-out both;
}

.original-result-label {
    color: #949aa5;
    font-size: 0.68rem;
}

.original-result-title {
    margin: 0;
    color: #777e89;
    font-size: 0.94rem;
    font-weight: 600;
    line-height: 1.45;
}

.summary-block {
    margin-top: 18px;
}

.summary-label {
    margin: 0 0 6px;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.summary {
    width: 100%;
    margin: 0;
    padding: 11px 13px;
    color: #555d6b;
    font-size: 0.9rem;
    line-height: 1.65;
    background: rgba(97, 122, 58, 0.035);
    border: 0;
    border-radius: 6px;
}

.ai-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 8px 0 0;
}

.edit-ai-button,
.reanalyze-ai-button {
    margin: 8px 0 0;
    padding: 6px 10px;
    border: 1px solid rgba(97, 122, 58, 0.28);
    border-radius: 999px;
    color: var(--accent);
    background: rgba(97, 122, 58, 0.06);
    font-size: 0.76rem;
    font-weight: 800;
    cursor: pointer;
}

.ai-admin-actions .edit-ai-button,
.ai-admin-actions .reanalyze-ai-button {
    margin: 0;
}

.reanalyze-ai-button {
    color: #7b4f14;
    background: rgba(196, 121, 38, 0.08);
    border-color: rgba(196, 121, 38, 0.28);
}

.ai-content-editor-panel {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid rgba(97, 122, 58, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.82);
}

.ai-content-editor {
    display: grid;
    gap: 10px;
}

.ai-content-editor h3 {
    margin: 0;
    font-size: 0.92rem;
}

.ai-content-editor label {
    display: grid;
    gap: 5px;
    color: #364025;
    font-size: 0.78rem;
    font-weight: 800;
}

.ai-content-editor textarea,
.ai-content-editor select {
    width: 100%;
    padding: 9px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    background: #fff;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 400;
    line-height: 1.45;
}

.ai-content-editor textarea {
    resize: vertical;
}

.ai-content-editor-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ai-content-editor-actions button {
    padding: 8px 12px;
    border: 1px solid var(--accent);
    border-radius: 8px;
    color: #fff;
    background: var(--accent);
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
}

.ai-content-editor-actions .cancel-ai-edit-button {
    color: var(--muted);
    background: #fff;
    border-color: var(--border);
}

.article-comment {
    margin-top: 13px;
}

.article-comment-body {
    margin-top: 8px;
    padding: 12px 14px;
    background: rgba(97, 122, 58, 0.07);
    border-left: 3px solid var(--accent);
    border-radius: 0 7px 7px 0;
}

.article-comment-body blockquote {
    margin: 0;
    color: #3f4d2a;
    font-size: 0.92rem;
    font-style: italic;
    line-height: 1.55;
    text-align: center;
}

.comment-author,
.comment-editor-hint {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
}

.comment-author {
    text-align: center;
}

.reveal-editor-comment-button,
.edit-comment-button,
.cancel-comment-button,
.comment-save-button {
    margin-top: 9px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--accent);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
}

.comment-editor textarea {
    display: block;
    box-sizing: border-box;
    width: 100%;
    margin-top: 7px;
    padding: 9px;
    resize: vertical;
    border: 1px solid rgba(97, 122, 58, 0.35);
    border-radius: 5px;
    color: #364025;
    font: inherit;
    line-height: 1.45;
}

.comment-editor-actions {
    display: flex;
    gap: 16px;
}

.reveal-editor-comment-button {
    padding: 7px 11px;
    border: 1px solid rgba(97, 122, 58, 0.24);
    border-radius: 999px;
    background: rgba(97, 122, 58, 0.06);
}

.comment-save-button { color: #416e29; }
.cancel-comment-button { color: var(--muted); }

.user-comments {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(97, 122, 58, 0.18);
}

.user-comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 9px;
}

.user-comments-header h3 {
    margin: 0;
    font-size: 0.88rem;
}

.user-comments-header span {
    min-width: 26px;
    padding: 3px 8px;
    border-radius: 999px;
    color: #3f4d2a;
    background: rgba(97, 122, 58, 0.12);
    font-size: 0.74rem;
    font-weight: 800;
    text-align: center;
}

.user-comments-list {
    display: grid;
    gap: 8px;
}

.user-comment {
    padding: 9px 10px;
    border: 1px solid rgba(97, 122, 58, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.65);
}

.user-comment-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted);
    font-size: 0.74rem;
}

.user-comment-meta strong {
    color: #2f3c20;
    font-size: 0.78rem;
}

.user-comment p,
.user-comments-empty,
.user-comment-login-hint {
    margin: 5px 0 0;
    color: #475569;
    font-size: 0.84rem;
    line-height: 1.5;
}

.user-comments-empty,
.user-comment-login-hint {
    margin: 0;
    color: var(--muted);
}

.user-comment-form {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.user-comment-form textarea {
    width: 100%;
    padding: 9px;
    resize: vertical;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font: inherit;
    font-size: 0.86rem;
    line-height: 1.45;
}

.user-comment-form button {
    justify-self: end;
    padding: 8px 13px;
    border: 1px solid var(--accent);
    border-radius: 8px;
    color: #fff;
    background: var(--accent);
    font-size: 0.84rem;
    font-weight: 800;
    cursor: pointer;
}

.editor-comment-review {
    margin-top: 9px;
    padding: 10px;
    border-left: 3px solid var(--accent);
    border-radius: 0 8px 8px 0;
    background: rgba(97, 122, 58, 0.07);
}

.editor-comment-review-label {
    margin: 0 0 6px;
    color: #3f4d2a;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.comment-bait-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.comment-bait-rating .bait-hook {
    width: 18px;
    height: 18px;
}

.editor-comment-review blockquote {
    margin: 0;
    color: #3f4d2a;
    font-size: 0.86rem;
    font-style: italic;
    line-height: 1.5;
    text-align: center;
}

.review-user-comment-button {
    margin-top: 8px;
    padding: 6px 10px;
    border: 1px solid rgba(97, 122, 58, 0.28);
    border-radius: 999px;
    color: var(--accent);
    background: rgba(97, 122, 58, 0.06);
    font-size: 0.74rem;
    font-weight: 800;
    cursor: pointer;
}

@media (max-width: 520px) {
    .editor-admin-panel-header,
    .editor-trait-groups,
    .comment-traits {
        grid-template-columns: 1fr;
    }

    .page {
        width: calc(100% - 36px);
        padding-top: 26px;
    }

    .hero { margin-bottom: 27px; }
    .news-item { padding: 22px 0 24px; }

    .headline-row {
        grid-template-columns: 1fr;
        gap: 13px;
    }

    .item-debait-button {
        justify-self: start;
    }

    .headline-row > .analysis-status {
        justify-content: flex-start;
        max-width: none;
        text-align: left;
    }

    .bait-hook {
        width: 34px;
        height: 34px;
    }

    .feed-controls {
        align-items: stretch;
        flex-direction: column;
        gap: 9px;
    }

    .headline-toggle {
        display: flex;
    }

    .toggle-option {
        flex: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .toggle-option,
    .news-title,
    .refresh-button span { transition: none; }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.feed-tools {
    margin-bottom: 14px;
}

.search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.news-search,
.filters-toggle {
    min-height: 46px;
    border: 1px solid var(--border);
    border-radius: 9px;
}

.news-search {
    width: 100%;
    min-width: 0;
    padding: 10px 14px;
    color: var(--text);
    font-size: 0.95rem;
    background: #ffffff;
    outline: 0;
}

.news-search::placeholder {
    color: #949aa5;
}

.news-search:focus {
    border-color: rgba(97, 122, 58, 0.6);
    box-shadow: 0 0 0 3px rgba(97, 122, 58, 0.12);
}

.filters-toggle {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    justify-content: center;
    padding: 9px 15px;
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 750;
    background: #ffffff;
    cursor: pointer;
}

.filters-toggle:hover {
    border-color: #bfc5cf;
}

.filter-count {
    min-width: 19px;
    padding: 2px 5px;
    color: #ffffff;
    font-size: 0.65rem;
    line-height: 1.25;
    background: var(--accent);
    border-radius: 999px;
}

.filters-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 19px 24px;
    margin-top: 10px;
    padding: 17px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.filters-panel[hidden] {
    display: none;
}

.filter-group {
    min-width: 0;
    padding: 0;
    margin: 0;
    border: 0;
}

.filter-group legend {
    padding: 0;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 750;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.filter-choice,
.active-filter-chip {
    min-height: 31px;
    padding: 5px 10px;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 650;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
}

.filter-choice:hover,
.active-filter-chip:hover {
    color: var(--text);
    border-color: #bfc5cf;
}

.filter-choice.is-active {
    color: #ffffff;
    background: #617a3a;
    border-color: #617a3a;
    box-shadow: 0 2px 7px rgba(97, 122, 58, 0.24);
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 9px 14px;
    align-items: center;
    margin-top: 11px;
}

.active-filters[hidden] {
    display: none;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.active-filter-chip {
    color: var(--accent);
    background: rgba(97, 122, 58, 0.06);
    border-color: rgba(97, 122, 58, 0.16);
}

.clear-filters {
    padding: 4px 0;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 650;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.clear-filters:hover {
    color: var(--accent);
}

.filters-toggle:focus-visible,
.main-category-button:focus-visible,
.filter-choice:focus-visible,
.active-filter-chip:focus-visible,
.clear-filters:focus-visible,
.refresh-button:focus-visible {
    outline: 3px solid rgba(97, 122, 58, 0.25);
    outline-offset: 2px;
}

.top-stories {
    margin: 12px 0 14px;
    padding: 16px 0 14px;
    border-top: 1px solid rgba(203, 210, 220, 0.72);
    border-bottom: 1px solid rgba(203, 210, 220, 0.72);
}

.top-stories-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}

.top-stories-heading p {
    margin: 0;
    color: var(--accent);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0;
}

.top-stories-heading h2 {
    margin: 0;
    color: var(--text);
    font-size: 1.05rem;
    line-height: 1.2;
}

.top-stories-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid rgba(203, 210, 220, 0.58);
}

.top-story { min-width: 0; padding: 12px 14px 0 0; }
.top-story + .top-story { padding-left: 14px; border-left: 1px solid rgba(203, 210, 220, 0.58); }
.top-story a { color: inherit; text-decoration: none; }
.top-story-meta { display: block; margin-bottom: 6px; color: var(--muted); font-size: 0.67rem; font-weight: 700; }
.top-story-confirmation { color: var(--accent); }
.top-story h3 { margin: 0; color: var(--text); font-size: 0.92rem; line-height: 1.32; }

@media (max-width: 640px) {
    .top-stories-list { grid-template-columns: 1fr; }
    .top-story { padding: 11px 0 0; }
    .top-story + .top-story { padding-left: 0; border-left: 0; border-top: 1px solid rgba(203, 210, 220, 0.58); }
}

.feed-status-bar {
    display: flex;
    gap: 10px 18px;
    align-items: center;
    min-height: 28px;
    margin-bottom: 8px;
}

.feed-status,
.debaited-count {
    margin: 0;
    color: #8a919d;
    font-size: 0.72rem;
}

.debaited-count {
    color: var(--accent);
    font-weight: 700;
}

.feed-refresh-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 0 auto;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 650;
}

.feed-refresh-spinner {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(97, 122, 58, 0.24);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 650ms linear infinite;
}

.feed-refresh-indicator.is-result .feed-refresh-spinner {
    animation: none;
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: inset 0 0 0 3px var(--surface);
}

.news-item {
    animation: news-enter 180ms ease both;
}

.news-title.is-switching {
    opacity: 0;
    transform: translateY(3px);
}

.news-item.is-read .news-title {
    color: #343c4b;
}

.new-badge {
    margin-left: 8px;
    padding: 2px 6px;
    color: var(--accent);
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    background: rgba(97, 122, 58, 0.1);
    border-radius: 999px;
}

.empty-feed {
    margin: 0;
    padding: 36px 0;
    color: var(--muted);
    text-align: center;
}

.search-highlight {
    padding: 0 0.08em;
    color: inherit;
    background: rgba(97, 122, 58, 0.13);
    border-radius: 3px;
}

.filter-empty-state {
    padding: 42px 0;
    text-align: center;
}

.filter-empty-title,
.filter-empty-copy {
    margin: 0;
}

.filter-empty-title {
    color: var(--text);
    font-size: 1rem;
    font-weight: 750;
}

.filter-empty-copy {
    margin-top: 7px;
    color: var(--muted);
    font-size: 0.82rem;
}

.empty-clear-button,
.show-more-button {
    min-height: 36px;
    padding: 7px 13px;
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 700;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
}

.empty-clear-button {
    margin-top: 16px;
}

.show-more-row {
    display: flex;
    justify-content: center;
    padding: 22px 0 0;
}

.empty-clear-button:hover,
.show-more-button:hover {
    border-color: #bfc5cf;
}

.empty-clear-button:focus-visible,
.show-more-button:focus-visible {
    outline: 3px solid rgba(97, 122, 58, 0.25);
    outline-offset: 2px;
}

@keyframes news-enter {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes content-reveal {
    from {
        opacity: 0;
        transform: translateY(-3px);
    }
}

@media (max-width: 520px) {
    .daily-briefing-header {
        display: grid;
        align-items: start;
        gap: 6px;
    }

    .daily-briefing-list,
    .daily-ranking-list {
        grid-template-columns: 1fr;
    }

    .daily-briefing-item {
        grid-template-columns: 1fr;
    }

    .daily-briefing-hooks {
        padding-top: 0;
    }
.main-categories {
        gap: 7px;
        margin-bottom: 16px;
    }

    .main-category-button {
        min-height: 34px;
        padding: 6px 11px;
    }

    .search-row,
    .filters-panel {
        grid-template-columns: 1fr;
    }

    .filters-toggle {
        width: 100%;
    }

    .filters-panel {
        gap: 17px;
        padding: 15px;
    }

    .show-more-button {
        width: 100%;
    }

    .feed-status-bar {
        flex-wrap: wrap;
    }

    .debaited-count {
        order: 3;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .news-item {
        animation: none;
    }

    .item-debait-button {
        transition: none;
    }

    .bait-hook {
        transition: none;
    }

    .debait-result,
    .original-result {
        animation: none;
    }
}


/* Kolorystyczne akcenty sekcji i interakcji. */
.hero {
    padding: 18px 20px 20px;
    background:
        radial-gradient(circle at 12% 15%, rgba(125, 154, 76, 0.2), transparent 36%),
        radial-gradient(circle at 88% 20%, rgba(203, 174, 92, 0.16), transparent 42%),
        linear-gradient(125deg, #ffffff 0%, #f7f8f1 100%);
    border: 1px solid rgba(97, 122, 58, 0.12);
    border-radius: 20px;
}

.main-category-button {
    transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.main-category-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(23, 32, 51, 0.09);
}

.main-category-button[data-section="all"].is-active {
    background: var(--text);
    border-color: var(--text);
}

.main-category-button[data-section="games"].is-active {
    background: #617a3a;
    border-color: #617a3a;
}

.main-category-button[data-section="film"].is-active {
    background: #d15589;
    border-color: #d15589;
}

.main-category-button[data-section="tech"].is-active {
    background: #138f95;
    border-color: #138f95;
}

.main-category-button[data-section="lifestyle"].is-active {
    background: #de7d36;
    border-color: #de7d36;
}

.news-item {
    --section-accent: #617a3a;
    padding-left: 16px;
    border-left: 3px solid var(--section-accent);
    transition: background-color 160ms ease, border-color 160ms ease;
}

.news-item[data-section="film"] { --section-accent: #d15589; }
.news-item[data-section="tech"] { --section-accent: #138f95; }
.news-item[data-section="lifestyle"] { --section-accent: #de7d36; }

.news-item:hover {
    background: linear-gradient(90deg, color-mix(in srgb, var(--section-accent) 7%, transparent), transparent 42%);
}

.item-debait-button {
    color: #ffffff;
    background: linear-gradient(135deg, #617a3a, #7e8f48);
    border-color: transparent;
    box-shadow: 0 4px 10px rgba(97, 122, 58, 0.18);
}

.item-debait-button:hover {
    background: linear-gradient(135deg, #4e6430, #5d7138);
    border-color: transparent;
    box-shadow: 0 6px 16px rgba(97, 122, 58, 0.28);
    transform: translateY(-1px);
}

.news-search:focus {
    border-color: #617a3a;
    box-shadow: 0 0 0 4px rgba(97, 122, 58, 0.14), 0 8px 22px rgba(97, 122, 58, 0.08);
}

.new-badge {
    color: #18794e;
    background: rgba(45, 178, 108, 0.14);
    box-shadow: inset 0 0 0 1px rgba(45, 178, 108, 0.2);
}

.bait-hook:not(.is-muted).bait-hook-1 { filter: sepia(1) saturate(4) hue-rotate(4deg); }
.bait-hook:not(.is-muted).bait-hook-2 { filter: sepia(1) saturate(5) hue-rotate(345deg); }
.bait-hook:not(.is-muted).bait-hook-3 { filter: sepia(1) saturate(6) hue-rotate(328deg); }
.bait-hook:not(.is-muted).bait-hook-4,
.bait-hook:not(.is-muted).bait-hook-5 { filter: sepia(1) saturate(7) hue-rotate(305deg); }

@media (prefers-reduced-motion: reduce) {
    .main-category-button,
    .news-item,
    .item-debait-button {
        transition: none;
    }

    .main-category-button:hover,
    .item-debait-button:hover {
        transform: none;
    }
}

.comment-traits {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 13px;
    margin-top: 12px;
}

.comment-trait {
    display: grid;
    gap: 5px;
    color: #4f5d39;
    font-size: 0.76rem;
    font-weight: 700;
}

.comment-trait span {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.comment-trait input {
    width: 100%;
    accent-color: var(--accent);
}

.generate-comment-variants-button,
.keep-old-comment-button,
.choose-comment-variant-button {
    margin-top: 9px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--accent);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
}

.keep-old-comment-button {
    color: var(--muted);
}

.comment-variants {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.comment-variant {
    padding: 10px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(97, 122, 58, 0.22);
    border-radius: 7px;
}

.comment-variant p,
.comment-editor-error {
    margin: 0;
}

.comment-variant p {
    color: #3f4d2a;
    font-size: 0.86rem;
    line-height: 1.45;
}

.comment-editor-error {
    margin-top: 8px;
    color: #ad4850;
    font-size: 0.76rem;
    font-weight: 700;
}

.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.admin-tab {
    min-height: 34px;
    padding: 7px 12px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 7px;
    cursor: pointer;
}

.admin-tab.is-active {
    color: #ffffff;
    background: var(--text);
    border-color: var(--text);
}

.calibration-progress {
    margin: 12px 0;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 800;
}

.calibration-summary {
    display: grid;
    gap: 6px;
    margin: 0 0 12px;
    padding: 11px;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.45;
    background: rgba(97, 122, 58, 0.04);
    border: 1px solid rgba(97, 122, 58, 0.18);
    border-radius: 7px;
}

.calibration-summary p {
    margin: 0;
}

.calibration-summary strong {
    color: var(--text);
}

.calibration-score-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.calibration-form {
    display: grid;
    gap: 12px;
    max-width: 760px;
}

.calibration-article,
.calibration-rating {
    margin: 0;
    padding: 12px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 7px;
}

.calibration-article {
    display: grid;
    gap: 8px;
}

.calibration-article p,
.calibration-article h3 {
    margin: 0;
}

.calibration-article a,
.calibration-article h3 {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.35;
}

.calibration-article > p:not(.calibration-meta):not(.calibration-label) {
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.5;
}

.calibration-meta,
.calibration-label {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.calibration-hooks {
    color: #c57d18;
}

.calibration-rating {
    display: grid;
    gap: 8px;
}

.calibration-rating legend,
.calibration-note {
    color: #4f5d39;
    font-size: 0.8rem;
    font-weight: 800;
}

.calibration-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.calibration-choices label {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 7px 9px;
    color: var(--text);
    font-size: 0.8rem;
    background: rgba(97, 122, 58, 0.04);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
}

.calibration-note {
    display: grid;
    gap: 6px;
}

.calibration-note textarea {
    width: 100%;
    padding: 9px;
    color: var(--text);
    font: inherit;
    font-size: 0.86rem;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 6px;
    resize: vertical;
}

.calibration-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.calibration-next-button {
    min-height: 34px;
    padding: 7px 11px;
    color: var(--text);
    font-size: 0.76rem;
    font-weight: 800;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 7px;
    cursor: pointer;
}

.calibration-empty {
    margin: 0;
    padding: 12px;
    color: var(--muted);
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 7px;
}
.editor-admin-view[hidden] {
    display: none;
}

.editor-settings-status {
    min-height: 18px;
    margin-top: 10px;
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 750;
}

.editor-settings-layout {
    display: grid;
    grid-template-columns: minmax(170px, 0.45fr) minmax(0, 1fr);
    gap: 14px;
    margin-top: 12px;
}

.editor-category-list {
    display: grid;
    gap: 7px;
    align-content: start;
}

.editor-category-button {
    display: grid;
    gap: 3px;
    width: 100%;
    padding: 9px 10px;
    text-align: left;
    color: var(--text);
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 7px;
    cursor: pointer;
}

.editor-category-button span {
    color: var(--muted);
    font-size: 0.72rem;
}

.editor-category-button.is-active {
    border-color: rgba(97, 122, 58, 0.55);
    box-shadow: inset 3px 0 0 var(--accent);
}

.editor-trait-toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.editor-trait-toolbar h3 {
    margin: 0;
    font-size: 0.95rem;
}

.editor-add-trait-button,
.editor-save-settings-button {
    min-height: 34px;
    padding: 7px 11px;
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 800;
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 7px;
    cursor: pointer;
}

.editor-trait-list {
    display: grid;
    gap: 10px;
}

.editor-trait-form {
    display: grid;
    gap: 9px;
    padding: 11px;
    background: rgba(97, 122, 58, 0.035);
    border: 1px solid rgba(97, 122, 58, 0.18);
    border-radius: 7px;
}

.editor-trait-form label,
.editor-module-picker {
    display: grid;
    gap: 5px;
    margin: 0;
    color: #4f5d39;
    font-size: 0.76rem;
    font-weight: 750;
}

.editor-trait-form input[type="text"],
.editor-trait-form input:not([type]),
.editor-trait-form textarea {
    width: 100%;
    padding: 8px;
    color: var(--text);
    font: inherit;
    font-size: 0.82rem;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 6px;
}

.editor-strength-field span {
    display: flex;
    justify-content: space-between;
}

.editor-module-picker {
    padding: 0;
    border: 0;
}

.editor-module-picker legend {
    padding: 0;
    margin-bottom: 5px;
}

.editor-module-picker label,
.editor-enabled-field {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    margin-right: 9px;
}

@media (max-width: 520px) {
    .admin-tabs,
    .editor-trait-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .editor-settings-layout {
        grid-template-columns: 1fr;
    }

    .editor-category-list {
        grid-template-columns: 1fr 1fr;
    }
}


@media (max-width: 560px) {
    .admin-controls {
        justify-content: flex-start;
    }

    .admin-login-form {
        left: 0;
        right: auto;
        width: min(100%, calc(100vw - 40px));
    }

    .user-menu {
        margin-left: 0;
    }

    .user-menu-panel {
        left: 0;
        right: auto;
    }
}

.operations-repair-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    margin-top: 12px;
}

.operations-repair-button {
    min-height: 34px;
    padding: 7px 11px;
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 800;
    background: #7b4f14;
    border: 1px solid #7b4f14;
    border-radius: 7px;
    cursor: pointer;
}

.operations-repair-button:disabled {
    cursor: default;
    opacity: 0.45;
}

.operations-repair-status {
    margin: 0;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.operations-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin: 16px 0;
}

.operation-metric {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    padding: 12px;
}

.operation-metric span,
.operation-source-meta {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.operation-metric strong {
    display: block;
    margin-top: 4px;
    color: var(--ink);
    font-size: 1.25rem;
}

.operations-source-list {
    display: grid;
    gap: 10px;
}

.operation-expansion {
    margin-bottom: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-left: 4px solid #c49a2c;
    border-radius: 8px;
    background: #ffffff;
}

.operation-expansion.is-ready {
    border-left-color: #5f8f3a;
}

.operation-expansion strong {
    display: block;
    color: var(--text);
    font-size: 0.86rem;
}

.operation-expansion p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.45;
}
.operation-source {
    border: 1px solid var(--border);
    border-left: 4px solid #a8b0a0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    padding: 12px;
}

.operation-source-healthy { border-left-color: #5f8f3a; }
.operation-source-degraded { border-left-color: #c49a2c; }
.operation-source-down { border-left-color: #b65252; }

.operation-source-name {
    margin: 0 0 4px;
    color: var(--ink);
    font-weight: 800;
}

.operation-status {
    display: inline-block;
    margin: 8px 0;
    color: var(--ink);
    font-size: 0.78rem;
    letter-spacing: 0;
}

.operation-error {
    margin: 8px 0 0;
    color: #8b3030;
    font-size: 0.84rem;
}
.account-login-button, .account-auth-form .auth-submit-button, .user-menu-panel-button, .user-dashboard-tab.is-active { color: #fff; background: var(--accent); border-color: var(--accent); }
.account-auth-form { position: absolute; top: calc(100% + 8px); right: 0; z-index: 20; display: grid; width: min(320px, calc(100vw - 40px)); gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: #fff; box-shadow: 0 18px 45px rgba(23,32,51,.16); }
.account-auth-form label { display: grid; gap: 5px; color: var(--muted); font-size: .82rem; font-weight: 700; }
.account-auth-form input { min-height: 42px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; font: inherit; }
.account-auth-tabs, .user-dashboard-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.account-auth-tab, .user-dashboard-tab { min-height: 36px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer; }
.account-auth-tab.is-active { color: var(--accent); border-color: var(--accent); font-weight: 800; }
.account-auth-note, .user-dashboard-copy, .user-dashboard-status { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.45; }
.user-dashboard { margin: 16px 0 22px; padding: 16px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.user-dashboard-header { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.user-dashboard-header h2, .user-dashboard-kicker { margin: 0; }
.user-dashboard-kicker { color: var(--muted); font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.user-dashboard-close { min-width: 36px; min-height: 36px; border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer; font-size: 1.4rem; line-height: 1; }
.user-dashboard-view { margin-top: 16px; }
.feed-preferences-form { display: grid; gap: 10px; }
.feed-preferences-form label { display: flex; align-items: center; gap: 9px; }
.saved-articles-list { display: grid; gap: 10px; }
.saved-article { padding: 12px; border-left: 3px solid var(--accent); background: #f8faf7; }
.saved-article p, .saved-article h3, .saved-article span { margin: 0; }
.saved-article p { color: var(--muted); font-size: .75rem; font-weight: 800; }
.saved-article h3 { margin-top: 5px; font-size: 1rem; }
.saved-article a { color: var(--text); text-decoration: none; }
.saved-article span { display: block; margin-top: 6px; color: var(--muted); font-size: .86rem; line-height: 1.4; }
.danger-button { min-height: 42px; padding: 9px 12px; color: #8b3030; border: 1px solid #d9aaaa; border-radius: 8px; background: #fff; cursor: pointer; }
@media (max-width: 560px) { .account-auth-form { left: 0; right: auto; } }

.account-register-button { min-height: 42px; padding: 9px 12px; color: var(--accent); border: 1px solid var(--accent); border-radius: 8px; background: #fff; cursor: pointer; }

.user-dashboard-actions { display: flex; gap: 8px; align-items: center; }
.dashboard-logout-button { min-height: 36px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; color: var(--muted); background: #fff; cursor: pointer; font-size: .85rem; font-weight: 700; }
.admin-dashboard-logout-button { margin-left: auto; }

.account-login-button { color: #fff !important; background: var(--accent) !important; border: 1px solid var(--accent) !important; }
.account-auth-close { min-height: 38px; padding: 7px 10px; color: var(--muted); border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer; }

.header-logout-button { min-height: 42px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; color: var(--muted); background: #fff; cursor: pointer; }

.site-footer {
    margin-top: 44px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.55;
}

.site-footer p { margin: 0; }

.site-footer a,
.cookie-notice-open {
    color: var(--accent-hover);
    font-weight: 750;
}

.cookie-notice-open {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    text-decoration: underline;
}

.cookie-notice {
    position: fixed;
    z-index: 100;
    right: max(20px, env(safe-area-inset-right));
    bottom: max(20px, env(safe-area-inset-bottom));
    left: max(20px, env(safe-area-inset-left));
    display: flex;
    width: min(680px, calc(100vw - 40px));
    gap: 18px;
    align-items: end;
    justify-content: space-between;
    margin-inline: auto;
    padding: 16px;
    color: var(--text);
    background: #ffffff;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    box-shadow: 0 18px 44px rgba(23, 32, 51, 0.18);
}

.cookie-notice h2,
.cookie-notice p { margin: 0; }

.cookie-notice h2 { font-size: 0.95rem; }

.cookie-notice p {
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.45;
}

.cookie-notice-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 10px;
    align-items: center;
}

.cookie-notice-actions a {
    color: var(--accent-hover);
    font-size: 0.82rem;
    font-weight: 750;
}

.cookie-notice-actions button {
    min-height: 38px;
    padding: 8px 12px;
    color: #ffffff;
    font-size: 0.84rem;
    font-weight: 800;
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 7px;
    cursor: pointer;
}

.legal-page {
    min-height: 100vh;
    padding: 36px 20px 64px;
}

.legal-container {
    width: min(100%, 760px);
    margin: 0 auto;
}

.legal-brand {
    color: var(--accent-hover);
    font-weight: 850;
    text-decoration: none;
}

.legal-container h1 {
    margin: 28px 0 8px;
    font-size: clamp(1.75rem, 5vw, 2.4rem);
}

.legal-updated,
.legal-container p,
.legal-container li {
    color: var(--muted);
    line-height: 1.6;
}

.legal-container section {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.legal-container h2 { margin: 0; font-size: 1.15rem; }
.legal-container a { color: var(--accent-hover); }

@media (max-width: 600px) {
    .cookie-notice {
        display: grid;
        gap: 12px;
        align-items: stretch;
    }

    .cookie-notice-actions { justify-content: space-between; }
}
