/* ===================== THEME ===================== */

:root,
[data-theme="light"] {
    --bg: #f8f9fa;
    --bg-elev: #ffffff;
    --fg: #28313b;
    --fg-muted: #6b7280;
    --fg-soft: #9ca3af;
    --accent: #0074e4;
    --accent-dark: #005bb5;
    --border: #e5e7eb;
    --border-soft: #f1f3f5;
    --ok: #10b981;
    --warn: #f59e0b;
    --err: #ef4444;
    --unknown: #9ca3af;
    --header-bg: rgba(255, 255, 255, 0.92);
    --header-border: #e5e7eb;
    --radius: 6px;
    --maxw: 1140px;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] {
    --bg: #0d1117;
    --bg-elev: #161b22;
    --fg: #e6edf3;
    --fg-muted: #8b949e;
    --fg-soft: #6e7681;
    --accent: #4f9cf9;
    --accent-dark: #3d87e0;
    --border: #30363d;
    --border-soft: #21262d;
    --ok: #3fb950;
    --warn: #d29922;
    --err: #f85149;
    --unknown: #6e7681;
    --header-bg: rgba(13, 17, 23, 0.85);
    --header-border: #30363d;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

body {
    overflow-x: clip; /* clip nerozbíjí position: sticky, hidden ano */
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

p { margin: 0 0 16px; }

img { max-width: 100%; height: auto; }

.container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
}

/* ===================== HEADER ===================== */

.site-header {
    border-bottom: 1px solid var(--header-border);
    padding: 14px 0;
    position: sticky;
    top: 0;
    background: var(--header-bg);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
}

.logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-img {
    display: block;
    height: 28px;
    width: auto;
}

.logo-dark { display: none; }
[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: block; }

/* Nav */
.nav {
    display: flex;
    gap: 20px;
    flex: 1;
}

.nav a {
    color: var(--fg-muted);
    font-size: 14px;
    font-weight: 500;
}

.nav a:hover { color: var(--accent); text-decoration: none; }

/* Status pill */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 13px;
    color: var(--fg-muted);
    background: var(--bg-elev);
    transition: border-color .15s;
    flex-shrink: 0;
    white-space: nowrap;
    height: 32px;
}

.status-pill:hover {
    border-color: var(--accent);
    text-decoration: none;
}

.status-pill .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--unknown);
    flex-shrink: 0;
}

.status-ok .dot { background: var(--ok); }
.status-warn .dot { background: var(--warn); }
.status-err .dot { background: var(--err); }
.status-unknown .dot { background: var(--unknown); }

/* Theme toggle */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--fg-muted);
    cursor: pointer;
    transition: border-color .15s, color .15s;
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.theme-toggle svg { display: block; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Burger toggle — skrytý na desktopu */
.nav-toggle {
    display: none;
    background: none;
    border: 0;
    padding: 6px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border-radius: var(--radius);
    flex-shrink: 0;
}

.nav-toggle:hover { background: var(--border-soft); }

.nav-toggle-bar {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--fg);
    border-radius: 2px;
    transition: transform .2s, opacity .2s;
}

body.nav-open .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
body.nav-open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}
body.nav-open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ===================== MAIN ===================== */

.site-main { padding: 56px 0 96px; }

.hero { padding: 24px 24px 40px; }

.hero h1 {
    font-size: clamp(28px, 5.5vw, 44px);
    line-height: 1.15;
    margin: 0 0 20px;
    letter-spacing: -0.03em;
    color: var(--fg);
    font-weight: 700;
}

.lead {
    font-size: 18px;
    color: var(--fg-muted);
    max-width: 640px;
    margin-bottom: 28px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 14px;
    transition: background .15s;
}

.btn:hover {
    background: var(--accent-dark);
    text-decoration: none;
    color: #fff;
}

.stats-bar { margin-bottom: 48px; }

.stats-bar-inner {
    padding: 16px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    color: var(--fg-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: baseline;
}

.stats-item strong {
    color: var(--fg);
    font-weight: 600;
}

.stats-sep { color: var(--fg-soft); }

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin: 48px 0 16px;
    flex-wrap: wrap;
}

.section-header h2 {
    margin: 0;
    font-size: 22px;
    letter-spacing: -0.02em;
    color: var(--fg);
    font-weight: 700;
}

.section-more {
    font-size: 14px;
    color: var(--accent);
    white-space: nowrap;
}

h2 {
    font-size: 22px;
    letter-spacing: -0.02em;
    color: var(--fg);
    font-weight: 700;
}

h3 {
    font-size: 14px;
    color: var(--fg-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.pipeline {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    flex-wrap: wrap;
    margin: 0;
}

.pipeline li {
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-elev);
    font-size: 13px;
    color: var(--fg-muted);
    font-weight: 500;
}

.page-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.page-header h1 { margin: 0; font-size: 32px; font-weight: 700; }

.post-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.post-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.post-item:first-child { padding-top: 4px; }

.post-item-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.post-title {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--fg);
}

.post-title:hover { color: var(--accent); }

.post-source,
.post-meta {
    color: var(--fg-muted);
    font-size: 13px;
}

.post-meta { margin-top: 2px; }

.post-summary {
    color: var(--fg-muted);
    font-size: 14px;
    margin: 8px 0 0;
    max-width: 800px;
}

.muted { color: var(--fg-muted); }
.small { font-size: 13px; }

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    line-height: 1.7;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.badge-category {
    background: rgba(0, 116, 228, 0.08);
    color: var(--accent);
    text-transform: lowercase;
    letter-spacing: 0;
    font-weight: 500;
}

[data-theme="dark"] .badge-category {
    background: rgba(79, 156, 249, 0.15);
}

.badge-ok { background: rgba(16, 185, 129, 0.12); color: var(--ok); }
.badge-off { background: rgba(156, 163, 175, 0.15); color: var(--unknown); }

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin: 32px 0 0;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.page-btn {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--fg);
    font-size: 14px;
    font-weight: 500;
    background: var(--bg-elev);
    transition: border-color .15s, color .15s;
    white-space: nowrap;
}

.page-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}

.page-btn.disabled {
    opacity: 0.4;
    color: var(--fg-muted);
    cursor: not-allowed;
    border-color: var(--border);
}

.page-info {
    color: var(--fg-muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
}

.post-detail-head { margin-bottom: 24px; }

.post-detail-head h1 {
    font-size: clamp(24px, 4.5vw, 32px);
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin: 0 0 12px;
    color: var(--fg);
    font-weight: 700;
}

.ai-box {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-elev);
    padding: 24px 28px;
    margin: 24px 0;
}

.ai-box-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.ai-box-head h2 {
    margin: 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--fg-muted);
    font-weight: 700;
}

.ai-summary {
    font-size: 16px;
    line-height: 1.7;
    margin: 0 0 20px;
    color: var(--fg);
}

.key-points {
    margin: 8px 0 20px;
    padding-left: 20px;
}

.key-points li {
    margin-bottom: 6px;
    color: var(--fg);
}

.meta-grid {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 6px 20px;
    margin: 16px 0;
    font-size: 14px;
}
.meta-grid dt { color: var(--fg-muted); }
.meta-grid dd { margin: 0; color: var(--fg); word-break: break-word; }

.ai-attribution {
    color: var(--fg-muted);
    font-size: 12px;
    margin: 20px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 32px 0 0;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 14px;
    transition: background .15s;
}

.btn-primary:hover {
    background: var(--accent-dark);
    text-decoration: none;
    color: #fff;
}

.btn-primary .icon { font-size: 13px; opacity: 0.85; }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--fg-muted);
    font-size: 14px;
    font-weight: 500;
    background: var(--bg-elev);
    transition: border-color .15s, color .15s;
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}

/* Status */
.status-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-elev);
    font-size: 17px;
    margin: 24px 0;
}

.status-banner .dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.status-banner.status-ok { border-color: rgba(16, 185, 129, 0.3); }
.status-banner.status-ok .dot { background: var(--ok); }
.status-banner.status-warn { border-color: rgba(245, 158, 11, 0.3); }
.status-banner.status-warn .dot { background: var(--warn); }
.status-banner.status-err { border-color: rgba(239, 68, 68, 0.3); }
.status-banner.status-err .dot { background: var(--err); }
.status-banner.status-unknown .dot { background: var(--unknown); }

.component-list {
    list-style: none;
    padding: 0;
}

.component {
    display: grid;
    grid-template-columns: 16px 1fr auto 2fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.component .dot { width: 10px; height: 10px; border-radius: 50%; }
.component.status-ok .dot { background: var(--ok); }
.component.status-warn .dot { background: var(--warn); }
.component.status-err .dot { background: var(--err); }
.component.status-unknown .dot { background: var(--unknown); }

.component-name { font-weight: 600; color: var(--fg); }
.component-msg { font-size: 13px; }
.component-latency { font-size: 12px; }

.server-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--border);
    overflow: hidden;
}

.server-item {
    background: var(--bg-elev);
    padding: 20px;
    text-align: left;
}

.server-item .stat-value { font-size: 22px; font-weight: 700; }

/* Tables */
.table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-elev);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 640px;
}

.table th,
.table td {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table th {
    color: var(--fg-muted);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--bg);
}

.table tr:last-child td { border-bottom: none; }

/* About */
.about-page { max-width: var(--maxw); }

.about-header {
    margin-bottom: 56px;
    max-width: 780px;
}

.about-header h1 {
    font-size: clamp(24px, 4.5vw, 34px);
    line-height: 1.25;
    letter-spacing: -0.025em;
    margin: 0 0 24px;
    color: var(--fg);
    font-weight: 700;
}

.about-lead {
    font-size: 17px;
    color: var(--fg-muted);
    line-height: 1.7;
    max-width: 720px;
}

.about-section {
    margin: 56px 0 0;
    padding-top: 40px;
    border-top: 1px solid var(--border);
    max-width: 780px;
}

.about-section h2 {
    font-size: 22px;
    letter-spacing: -0.02em;
    color: var(--fg);
    font-weight: 700;
    margin: 0 0 8px;
}

.about-subtitle {
    color: var(--fg-muted);
    font-size: 16px;
    margin: 0 0 20px;
}

.about-section p {
    color: var(--fg);
    font-size: 16px;
    line-height: 1.75;
    margin: 0 0 16px;
}

.process-list {
    list-style: none;
    padding: 0;
    margin: 24px 0 0;
}

.process-step {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.process-step:last-child { border-bottom: none; }

.process-num {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 13px;
    color: var(--fg-soft);
    font-weight: 600;
    min-width: 28px;
    padding-top: 4px;
    flex-shrink: 0;
}

.process-body h3 {
    margin: 0 0 4px;
    font-size: 15px;
    color: var(--fg);
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
}

.process-body p {
    margin: 0;
    font-size: 15px;
    color: var(--fg-muted);
    line-height: 1.6;
}

.notice {
    margin: 24px 0 0;
    padding: 16px 20px;
    border-left: 3px solid var(--accent);
    background: rgba(0, 116, 228, 0.04);
    font-size: 15px;
    line-height: 1.65;
    color: var(--fg);
}

[data-theme="dark"] .notice {
    background: rgba(79, 156, 249, 0.08);
}

.notice strong { color: var(--fg); }

.about-links {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.about-links li a {
    font-size: 14px;
    font-weight: 500;
}

.fact-list {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px 24px;
}

.fact-list li {
    font-size: 14px;
    color: var(--fg-muted);
    padding: 8px 0;
    border-bottom: 1px solid var(--border-soft);
}

.fact-list li::before {
    content: "—";
    color: var(--fg-soft);
    margin-right: 8px;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
    margin: 24px 0 0;
    padding: 24px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.tech-col h3 {
    margin: 0 0 10px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--fg-muted);
    font-weight: 700;
}

.tech-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tech-col li {
    font-size: 14px;
    color: var(--fg);
    padding: 3px 0;
    line-height: 1.5;
}

.author-card {
    margin: 24px 0 0;
    padding: 20px 24px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-width: 400px;
}

.author-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--fg);
}

.author-role {
    font-size: 14px;
    color: var(--fg-muted);
    margin: 2px 0 12px;
}

.author-link { font-size: 14px; }

.status-table {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 10px 24px;
    margin: 24px 0 0;
    padding: 20px 24px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
}

.status-table dt {
    color: var(--fg-muted);
    font-weight: 500;
}

.status-table dd {
    margin: 0;
    color: var(--fg);
    font-weight: 500;
}

.status-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.status-inline .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--unknown);
}

.status-inline.status-ok .dot { background: var(--ok); }
.status-inline.status-warn .dot { background: var(--warn); }
.status-inline.status-err .dot { background: var(--err); }
.status-inline.status-unknown .dot { background: var(--unknown); }

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    background: var(--bg-elev);
    padding: 48px 0 32px;
    font-size: 14px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col-brand { max-width: 300px; }

.footer-logo {
    font-size: 18px;
    font-weight: 700;
    color: var(--fg);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.footer-desc {
    color: var(--fg-muted);
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
}

.footer-col h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--fg-muted);
    font-weight: 700;
    margin: 0 0 12px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col li { margin-bottom: 6px; }

.footer-col a {
    color: var(--fg);
    font-size: 14px;
}

.footer-col a:hover { color: var(--accent); }

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--fg-muted);
}

.footer-disclaimer {
    color: var(--fg-soft);
    font-size: 12px;
    max-width: 560px;
    text-align: right;
}

/* Error pages */
.error-page {
    text-align: center;
    padding: 64px 24px 96px;
    max-width: 560px;
    margin: 0 auto;
}

.error-code {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 88px;
    font-weight: 700;
    color: var(--fg-soft);
    letter-spacing: -0.05em;
    line-height: 1;
    margin: 0 0 16px;
}

.error-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 12px;
    letter-spacing: -0.02em;
    color: var(--fg);
}

.error-message {
    font-size: 16px;
    color: var(--fg-muted);
    margin: 0 0 32px;
    line-height: 1.7;
}

.error-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===================== RESPONSIVE ===================== */

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
    .footer-col-brand { grid-column: 1 / -1; max-width: none; }

    /* Burger menu */
    .nav-toggle {
        display: flex;
    }

    .nav {
        position: absolute;
        top: calc(100% + 14px);
        left: -24px;
        right: -24px;
        background: var(--bg-elev);
        border-top: 1px solid var(--border);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        gap: 0;
        padding: 8px 0;
        display: none;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
        z-index: 99;
    }

    [data-theme="dark"] .nav {
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    }

    body.nav-open .nav { display: flex; }

    .nav a {
        padding: 14px 24px;
        font-size: 15px;
        color: var(--fg);
        border-bottom: 1px solid var(--border-soft);
    }

    .nav a:last-child { border-bottom: none; }

    .nav a:hover {
        color: var(--accent);
        background: var(--border-soft);
    }

    /* Pushed to right on mobile since nav is hidden */
    .theme-toggle { margin-left: auto; }
}

@media (max-width: 720px) {
    .container { padding: 0 16px; }
    .site-main { padding: 32px 0 64px; }

    .site-header { padding: 12px 0; }
    .header-inner { gap: 10px; }

    .nav {
        left: -16px;
        right: -16px;
    }

    .nav a {
        padding: 14px 20px;
    }

    .hero { padding: 16px 16px 32px; }
    .lead { font-size: 16px; margin-bottom: 24px; }

    .stats-bar-inner {
        flex-direction: column;
        gap: 4px;
        font-size: 14px;
        padding: 14px 0;
    }
    .stats-sep { display: none; }
    .stats-item { display: block; }
    .stats-item strong { display: inline-block; min-width: 32px; }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin: 40px 0 16px;
    }

    .post-item-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .post-title { font-size: 16px; }
    .post-summary { font-size: 13px; }

    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }
    .page-info { order: -1; width: 100%; }

    .ai-box { padding: 18px 18px; }
    .ai-summary { font-size: 15px; }
    .meta-grid {
        grid-template-columns: 1fr;
        gap: 2px 0;
    }
    .meta-grid dt {
        margin-top: 10px;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }
    .meta-grid dd { margin-bottom: 4px; }

    .detail-actions { flex-direction: column; align-items: stretch; }
    .btn-primary,
    .btn-secondary { width: 100%; }

    .component {
        grid-template-columns: 16px 1fr;
        gap: 6px 12px;
        padding: 14px 0;
    }
    .component .dot { grid-row: 1 / -1; margin-top: 6px; }
    .component-name { font-size: 15px; }
    .component-status { font-size: 13px; grid-column: 2; }
    .component-msg { grid-column: 2; font-size: 12px; }
    .component-latency { grid-column: 2; font-size: 11px; }

    .server-grid { grid-template-columns: repeat(2, 1fr); }
    .server-item { padding: 16px; }
    .server-item .stat-value { font-size: 20px; }

    .table { font-size: 13px; }
    .table th,
    .table td { padding: 10px 12px; }

    .about-header { margin-bottom: 40px; }
    .about-section { margin-top: 40px; padding-top: 32px; }
    .about-section p { font-size: 15px; }
    .about-lead { font-size: 16px; }

    .process-step { gap: 14px; padding: 16px 0; }
    .process-body h3 { font-size: 14px; }
    .process-body p { font-size: 14px; }

    .tech-grid { grid-template-columns: 1fr; gap: 20px; padding: 20px; }

    .fact-list { grid-template-columns: 1fr; }

    .author-card { padding: 16px 20px; }

    .status-table {
        grid-template-columns: 1fr;
        gap: 4px 0;
        padding: 16px 18px;
    }
    .status-table dt {
        margin-top: 10px;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }
    .status-table dt:first-child { margin-top: 0; }
    .status-table dd { margin-bottom: 4px; font-size: 15px; }

    .site-footer { padding: 32px 0 24px; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; margin-bottom: 24px; }
    .footer-col-brand { grid-column: auto; }
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .footer-disclaimer { text-align: left; font-size: 11px; }

    .error-page { padding: 32px 16px 64px; }
    .error-code { font-size: 64px; }
    .error-title { font-size: 20px; }
    .error-actions { flex-direction: column; }
    .error-actions a { width: 100%; justify-content: center; }
}

@media (max-width: 420px) {
    .container { padding: 0 14px; }
    .site-header { padding: 10px 0; }

    .logo-img { height: 24px; }

    .status-pill {
        font-size: 12px;
        padding: 5px 10px;
        height: 30px;
    }
    .status-pill .dot { width: 7px; height: 7px; }

    .theme-toggle { width: 30px; height: 30px; }
    .nav-toggle { width: 32px; height: 32px; padding: 4px; }

    .nav {
        left: -14px;
        right: -14px;
    }
    .nav a { padding: 14px 18px; }

    .hero h1 { font-size: 26px; }
    .lead { font-size: 15px; }

    .post-title { font-size: 15px; }
    .post-summary { font-size: 13px; }

    .ai-box { padding: 16px 14px; }
    .ai-summary { font-size: 14px; }

    .server-grid { grid-template-columns: 1fr; }

    .page-btn { padding: 7px 12px; font-size: 13px; }
}