:root {
    color-scheme: light;
    --ink: #172033;
    --muted: #657086;
    --line: #dfe4ec;
    --panel: #ffffff;
    --soft: #f4f7fb;
    --accent: #4a55d6;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--soft);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
}

.wrap {
    width: min(1120px, calc(100% - 32px));
    margin-inline: auto;
}

.site-header {
    background: #10172a;
    color: white;
    padding: 44px 0 36px;
}

.header-inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.eyebrow {
    margin: 0 0 8px;
    color: #aeb8ff;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .12em;
}

h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.05;
}

.subtitle {
    margin: 12px 0 0;
    color: #cbd3e4;
}

.status {
    display: grid;
    gap: 5px;
    color: #cbd3e4;
    font-size: .88rem;
    text-align: right;
}

.controls {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(180px, 1fr);
    gap: 16px;
    margin: 28px 0 22px;
    padding: 18px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
}

.controls label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
}

input, select {
    width: 100%;
    border: 1px solid #cbd3df;
    border-radius: 10px;
    background: white;
    color: var(--ink);
    font: inherit;
    padding: 11px 12px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.card {
    display: flex;
    flex-direction: column;
    min-height: 265px;
    padding: 20px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(26, 38, 66, .05);
}

.card[hidden] { display: none; }

.meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: .75rem;
}

.badge {
    padding: 4px 8px;
    background: #edf0ff;
    color: #3c47b9;
    border-radius: 999px;
    font-weight: 800;
}

.card h2 {
    margin: 16px 0 10px;
    font-size: 1.1rem;
    line-height: 1.35;
}

.card h2 a {
    color: inherit;
    text-decoration: none;
}

.card h2 a:hover { color: var(--accent); }

.card p {
    margin: 0 0 18px;
    color: #4f5b70;
    font-size: .91rem;
}

.card time {
    margin-top: auto;
    color: var(--muted);
    font-size: .78rem;
}

.empty, .diagnostics {
    margin: 25px 0;
    padding: 22px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 16px;
}

.hidden { display: none; }

.diagnostics summary {
    cursor: pointer;
    font-weight: 800;
}

.diagnostics li { margin: 8px 0; }

.footer {
    padding: 34px 0 50px;
    color: var(--muted);
    font-size: .82rem;
}

code {
    padding: 2px 5px;
    background: #eef1f6;
    border-radius: 5px;
}

@media (max-width: 850px) {
    .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
    .header-inner { align-items: flex-start; flex-direction: column; }
    .status { text-align: left; }
    .controls, .news-grid { grid-template-columns: 1fr; }
}
