:root {
    color-scheme: light;
    --surface: #ffffff;
    --surface-muted: #f6f8fb;
    --line: #dfe5ee;
    --line-soft: #edf1f6;
    --text: #0f172a;
    --muted: #64748b;
    --subtle: #94a3b8;
    --accent: #1d4ed8;
    --accent-dark: #1e40af;
    --success: #15803d;
    --danger: #b91c1c;
}

* {
    box-sizing: border-box;
}

.app-body {
    background:
        linear-gradient(180deg, #f8fafc 0%, #eef3f9 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(248, 250, 252, 0.92);
    backdrop-filter: blur(18px);
}

.app-header__inner {
    width: min(100%, 1120px);
    margin: 0 auto;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.eyebrow {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
    margin: 0 0 7px;
    text-transform: uppercase;
}

.app-title {
    color: var(--text);
    font-size: clamp(1.45rem, 2vw, 2rem);
    font-weight: 760;
    line-height: 1.05;
    margin: 0;
}

.app-subtitle {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.35;
    margin: 7px 0 0;
}

.app-tabs {
    background: #e8eef6;
    border: 1px solid #d7e0ec;
    border-radius: 999px;
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    flex-shrink: 0;
}

.app-tab {
    align-items: center;
    border-radius: 999px;
    color: var(--muted);
    display: inline-flex;
    font-size: 0.88rem;
    font-weight: 700;
    justify-content: center;
    min-height: 34px;
    padding: 0 15px;
    text-decoration: none;
    transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.app-tab:hover {
    color: var(--text);
}

.app-tab--active {
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
    color: var(--text);
}

.page-shell {
    width: min(100%, 1120px);
    margin: 0 auto;
    padding: 24px 20px 56px;
}

.list-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.list-toolbar {
    align-items: center;
    background: #fbfcfe;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 16px 18px;
}

.section-title {
    color: var(--text);
    font-size: 1rem;
    font-weight: 760;
    line-height: 1.2;
    margin: 0;
}

.section-subtitle {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.35;
    margin: 4px 0 0;
}

.list-stack {
    background: var(--surface);
}

.list-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    padding: 16px 18px;
    position: relative;
    transition: background-color 160ms ease, opacity 180ms ease, transform 180ms ease;
}

.list-row + .list-row {
    border-top: 1px solid var(--line-soft);
}

.list-row--expanded {
    background: var(--surface-muted);
}

.row-content {
    min-width: 0;
}

.row-meta {
    align-items: center;
    color: var(--subtle);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.75rem;
    font-weight: 700;
    gap: 8px;
    line-height: 1.2;
    margin-bottom: 8px;
}

.status-pill {
    align-items: center;
    background: #eef2f7;
    border: 1px solid #dce4ee;
    border-radius: 999px;
    color: var(--muted);
    display: inline-flex;
    font-size: 0.7rem;
    font-weight: 800;
    min-height: 22px;
    padding: 0 8px;
    text-transform: uppercase;
}

.status-pill--done {
    background: #ecfdf3;
    border-color: #bbf7d0;
    color: var(--success);
}

.row-title {
    color: var(--text);
    font-size: 1rem;
    font-weight: 730;
    line-height: 1.35;
    margin: 0;
}

.row-title a {
    color: inherit;
    text-decoration: none;
    transition: color 160ms ease;
}

.row-title a:hover {
    color: var(--accent);
}

.row-summary {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 7px 0 0;
}

.row-actions {
    align-items: flex-start;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.primary-action,
.secondary-action,
.ghost-action,
.danger-action {
    align-items: center;
    border-radius: 7px;
    display: inline-flex;
    font-size: 0.84rem;
    font-weight: 760;
    justify-content: center;
    line-height: 1;
    min-height: 36px;
    padding: 0 12px;
    text-decoration: none;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, opacity 160ms ease;
    white-space: nowrap;
}

.primary-action {
    background: var(--accent);
    border: 1px solid var(--accent);
    color: #ffffff;
}

.primary-action:hover {
    background: var(--accent-dark);
}

.primary-action--done {
    background: var(--success);
    border-color: var(--success);
}

.secondary-action,
.ghost-action {
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--text);
}

.secondary-action:hover,
.ghost-action:hover {
    background: #f1f5f9;
    border-color: #ccd6e3;
}

.danger-action {
    background: #fff5f5;
    border: 1px solid #fecaca;
    color: var(--danger);
}

.danger-action:hover {
    background: #fee2e2;
}

.danger-action--solid {
    background: var(--danger);
    border-color: var(--danger);
    color: #ffffff;
}

.danger-action--solid:hover {
    background: #991b1b;
}

.primary-action:disabled,
.danger-action:disabled,
.is-loading {
    cursor: not-allowed;
    opacity: 0.64;
}

.row-detail {
    border-top: 1px solid var(--line);
    grid-column: 1 / -1;
    margin-top: 2px;
    padding-top: 14px;
}

.analysis-content {
    color: #334155;
    font-size: 0.92rem;
    line-height: 1.85;
}

.inline-loader,
.inline-error {
    align-items: center;
    color: var(--muted);
    display: flex;
    font-size: 0.88rem;
    font-weight: 700;
    gap: 9px;
    margin-bottom: 10px;
}

.inline-error {
    color: var(--danger);
    margin: 10px 0 0;
}

.loader-dot {
    animation: pulse 900ms ease-in-out infinite;
    background: var(--accent);
    border-radius: 999px;
    display: inline-flex;
    height: 9px;
    width: 9px;
}

.delete-confirm {
    align-items: center;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    color: #9a3412;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.9rem;
    font-weight: 760;
    gap: 8px;
    margin-top: 14px;
    padding: 10px;
}

.list-state {
    color: var(--muted);
    padding: 48px 20px;
    text-align: center;
}

.list-state--error {
    background: #fff8f8;
}

.state-title {
    color: var(--text);
    font-size: 1rem;
    font-weight: 760;
    margin: 0;
}

.state-copy {
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 6px auto 0;
    max-width: 360px;
}

.skeleton-row {
    cursor: default;
}

.skeleton-line,
.skeleton-pill {
    animation: shimmer 1.25s linear infinite;
    background: linear-gradient(90deg, #eef2f7 0%, #f8fafc 45%, #eef2f7 90%);
    background-size: 220% 100%;
    border-radius: 999px;
}

.skeleton-meta {
    height: 12px;
    margin-bottom: 12px;
    width: 150px;
}

.skeleton-title {
    height: 18px;
    margin-bottom: 10px;
    width: min(620px, 86%);
}

.skeleton-summary {
    height: 13px;
    width: min(760px, 96%);
}

.skeleton-pill {
    height: 36px;
    width: 96px;
}

.is-removing {
    opacity: 0;
    transform: translateY(-4px);
}

.news-summary {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@keyframes shimmer {
    0% {
        background-position: 120% 0;
    }
    100% {
        background-position: -120% 0;
    }
}

@keyframes pulse {
    0%,
    100% {
        opacity: 0.35;
        transform: scale(0.82);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 720px) {
    .app-header__inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
        padding: 16px;
    }

    .app-tabs {
        width: 100%;
    }

    .app-tab {
        flex: 1;
    }

    .page-shell {
        padding: 16px 12px 40px;
    }

    .list-panel {
        border-radius: 8px;
    }

    .list-toolbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 14px;
    }

    .secondary-action {
        width: 100%;
    }

    .list-row {
        display: block;
        padding: 15px 14px;
    }

    .row-actions {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
        margin-top: 13px;
        width: 100%;
    }

    .primary-action,
    .ghost-action,
    .danger-action {
        width: 100%;
    }

    .row-detail {
        margin-top: 14px;
    }
}
