:root {
    --bg: #f5f5f7;
    --surface: #ffffff;
    --text: #1d1d1f;
    --text-secondary: #86868b;
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --border: #e8e8ed;
    --danger: #ff3b30;
    --success: #34c759;

    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --nav-h: 56px;
    --pad: 20px;
    --gap: 16px;
    --r: 20px;
    --r-sm: 12px;
    --r-pill: 999px;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
    --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 16px; }
h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; margin-bottom: 12px; }
h3 { font-size: 18px; font-weight: 600; line-height: 1.35; margin-bottom: 8px; }
p { margin-bottom: 16px; }
p:last-child { margin-bottom: 0; }
.text-muted { color: var(--text-secondary) !important; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding-inline: var(--pad); }

.layout-grid {
    display: grid;
    gap: var(--gap);
    padding-top: calc(var(--nav-h) + var(--gap));
    padding-bottom: var(--gap);
    align-items: start;
}
@media (min-width: 768px) {
    .layout-grid { grid-template-columns: 1fr 300px; gap: 24px; }
    h1 { font-size: 34px; }
    h2 { font-size: 26px; }
}

.topnav {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--nav-h);
    background: rgba(245,245,247,0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    z-index: 1000;
    border-bottom: 0.5px solid rgba(0,0,0,0.08);
    display: flex; align-items: center;
}
.topnav .container { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.topnav-brand { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.topnav-menu { display: none; gap: 4px; }
.topnav-menu a {
    font-size: 14px; font-weight: 500; color: var(--text-secondary);
    padding: 8px 16px; border-radius: var(--r-pill);
    transition: all 0.2s var(--ease);
}
.topnav-menu a:hover { color: var(--text); background: rgba(0,0,0,0.04); }
.topnav-toggle { display: flex; background: none; border: none; cursor: pointer; padding: 8px; border-radius: var(--r-sm); color: var(--text); }

@media (min-width: 768px) { .topnav-menu { display: flex; } .topnav-toggle { display: none; } }

.mobile-menu {
    position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0;
    background: rgba(245,245,247,0.95);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    z-index: 999;
    transform: translateX(-100%);
    transition: transform 0.35s var(--ease);
    padding: var(--pad);
    display: flex; flex-direction: column; gap: 2px;
}
.mobile-menu.active { transform: translateX(0); }
.mobile-menu a {
    font-size: 17px; font-weight: 500; padding: 14px 16px;
    border-radius: var(--r-sm); color: var(--text);
    transition: background 0.2s var(--ease);
}
.mobile-menu a:hover { background: rgba(0,0,0,0.04); }

.content-area { display: flex; flex-direction: column; gap: var(--gap); }
.sidebar { display: flex; flex-direction: column; gap: var(--gap); }

.card {
    background: var(--surface);
    border-radius: var(--r);
    padding: var(--pad);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.card.lift:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.content-body { font-size: 17px; line-height: 1.7; color: #333; }
.content-body p { margin-bottom: 20px; }
.content-meta { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; display: flex; gap: 12px; flex-wrap: wrap; }

.footer-wrapper { padding-bottom: var(--gap); }
.footer-card { background: var(--surface); border-radius: var(--r); padding: 40px var(--pad); box-shadow: var(--shadow-sm); }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
.footer-col h2 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-secondary); margin-bottom: 16px; font-weight: 600; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 14px; color: var(--text-secondary); transition: color 0.2s var(--ease); }
.footer-col a:hover { color: var(--accent); }
.footer-copy { margin-top: 32px; padding-top: 24px; border-top: 0.5px solid var(--border); font-size: 13px; color: var(--text-secondary); text-align: center; }