:root {
    --bg: #fafafa;
    --surface: #ffffff;
    --text: #0f172a;
    --muted: #475569;
    --border: #e2e8f0;
    --accent: #0f172a;
    --accent-hover: #334155;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navigace */
header {
    padding: 32px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.logo {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
    text-decoration: none;
    color: var(--text);
}

nav {
    display: flex;
    gap: 24px;
}

nav a {
    text-decoration: none;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--text);
}

/* Hero sekce s prostorem pro fotku */
.hero {
    padding: 80px 0 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-text {
    flex: 1;
}

.profile-photo {
    width: 180px;
    height: 180px;
    border-radius: 16px;
    object-fit: cover;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    background: var(--border);
    padding: 4px 12px;
    border-radius: 99px;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 560px;
    margin-bottom: 32px;
}

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

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--accent);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
}

.btn-secondary {
    background-color: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--text);
}

/* Sekce */
section {
    padding: 56px 0;
    border-top: 1px solid var(--border);
}

h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.section-desc {
    color: var(--muted);
    margin-bottom: 32px;
}

/* Obrázky v článcích nebo galerii */
.content-img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin: 24px 0;
    display: block;
}

/* Karty pilířů */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.card h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.card p {
    font-size: 0.92rem;
    color: var(--muted);
}

/* Archiv Analytika seznam */
.archive-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.archive-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 20px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s;
}

.archive-item:hover {
    border-color: var(--text);
}

.archive-item h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.archive-item p {
    font-size: 0.9rem;
    color: var(--muted);
}

.archive-date {
    font-size: 0.85rem;
    color: var(--muted);
    white-space: nowrap;
}

/* Patička */
footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.9rem;
    color: var(--muted);
}

footer a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
}

@media (max-width: 650px) {
    .hero {
        flex-direction: column-reverse;
        align-items: flex-start;
        padding: 48px 0;
        gap: 24px;
    }
    .profile-photo {
        width: 120px;
        height: 120px;
    }
    .archive-item {
        flex-direction: column;
        gap: 8px;
    }
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

/* Doplnění do :root (přidej --accent-text: #ffffff;) */
:root {
    --accent-text: #ffffff;
}

/* Barvy pro tmavý režim */
[data-theme="dark"] {
    --bg: #0b0f19;
    --surface: #111827;
    --text: #f8fafc;
    --muted: #94a3b8;
    --border: #1e293b;
    --accent: #f8fafc;
    --accent-hover: #cbd5e1;
    --accent-text: #0f172a;
}

/* Tlačítko přepínače v navigaci */
.theme-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.theme-btn:hover {
    border-color: var(--text);
}

/* Plynulé posouvání při kliknutí na odkazy v menu */
html {
    scroll-behavior: smooth;
}

/* Oprava barvy textu na hlavním tlačítku v obou režimech */
.btn-primary {
    background-color: var(--accent);
    color: var(--accent-text);
}

/* Lepší čitelnost sekundárního tlačítka v tmavém režimu */
[data-theme="dark"] .btn-secondary:hover {
    background-color: #1e293b;
}


/* Styly pro články v /archiv */
.article-content {
    padding: 48px 0 64px;
    max-width: 680px;
}

.back-link {
    display: inline-block;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 32px;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--text);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 16px;
}

.article-meta .badge {
    margin-bottom: 0;
}

.article-content h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 20px;
}

.article-lead {
    font-size: 1.15rem;
    color: var(--muted);
    margin-bottom: 40px;
    line-height: 1.65;
}

.article-content h2 {
    margin-top: 40px;
    margin-bottom: 16px;
    font-size: 1.35rem;
}

.article-content p {
    margin-bottom: 20px;
    color: var(--text);
}

.article-content ul {
    margin: 0 0 24px 20px;
}

.article-content li {
    margin-bottom: 10px;
}

.article-content a {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article-content blockquote {
    border-left: 3px solid var(--text);
    padding: 12px 20px;
    margin: 28px 0;
    background: var(--surface);
    border-radius: 0 8px 8px 0;
    color: var(--muted);
    font-style: italic;
}

html[data-theme="dark"] .btn-primary {
    background-color: #f8fafc;
    color: #0f172a;
}


/* Hypoteční kalkulačka */
.calc-header {
    padding: 48px 0 24px;
}

.calc-header h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 48px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
}

.form-group input:focus {
    outline: none;
    border-color: var(--text);
}

.calc-summary {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
}

.summary-label {
    font-size: 0.85rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.summary-value {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.ltv-box {
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 0.88rem;
}

.ltv-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.ltv-ok { border-color: #16a34a; background: rgba(22, 163, 74, 0.08); }
.ltv-warn { border-color: #d97706; background: rgba(217, 119, 6, 0.1); }
.ltv-danger { border-color: #dc2626; background: rgba(220, 38, 38, 0.1); }

.summary-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.92rem;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.summary-details div {
    display: flex;
    justify-content: space-between;
}

.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: right;
}

.schedule-table th,
.schedule-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.schedule-table th:first-child,
.schedule-table td:first-child {
    text-align: left;
}

.schedule-table th {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--bg);
}

@media (max-width: 700px) {
    .calc-grid {
        grid-template-columns: 1fr;
    }
}

/* Graf poměru jistiny a úroků */
.ratio-chart {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ratio-bar {
    display: flex;
    height: 12px;
    border-radius: 99px;
    overflow: hidden;
    background: var(--border);
}

.bar-principal {
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.bar-interest {
    background-color: #ef4444;
    transition: width 0.3s ease;
}

.ratio-legend {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--muted);
}

.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
}

.dot-principal { background-color: var(--accent); }
.dot-interest { background-color: #ef4444; }

/* Rozšířená patička s právním disclaimerem */
.site-footer {
    padding: 40px 0 48px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--muted);
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
}

.footer-disclaimer {
    font-size: 0.78rem;
    line-height: 1.55;
    color: var(--muted);
    opacity: 0.85;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.footer-disclaimer p {
    margin-bottom: 8px;
}

.footer-disclaimer p:last-child {
    margin-bottom: 0;
}

/* Zarovnání loga v hlavičce */
.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.logo:hover .logo-icon {
    transform: translateY(-1px);
}

/* =========================================
   HRA: FINANČNÍ REIGNS
   ========================================= */
.hidden {
    display: none !important;
}

.game-shell {
    padding: 28px 0 48px;
    max-width: 580px;
    margin: 0 auto;
}

.game-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.game-topbar .badge {
    margin-bottom: 0;
}

.best-score {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
}

/* 4 ukazatele */
.meters-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.meter-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.meter-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.meter-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--muted);
}

.impact-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text);
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.15s ease;
}

.impact-dot.active {
    opacity: 0.85;
    transform: scale(1);
}

.impact-dot.large {
    transform: scale(1.5);
}

.meter-track {
    height: 6px;
    background: var(--border);
    border-radius: 99px;
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 0.35s ease, background-color 0.35s ease;
}

.fill-high { background-color: #16a34a; }
.fill-mid  { background-color: #d97706; }
.fill-low  { background-color: #dc2626; }

.meter-num {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
}

/* Swipovací karta */
.card-stage {
    position: relative;
    margin-bottom: 20px;
    overflow: hidden;
    padding: 6px 2px;
}

.game-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px 24px;
    min-height: 270px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    user-select: none;
    touch-action: none;
    cursor: grab;
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.04);
}

.game-card:active {
    cursor: grabbing;
}

.game-card.is-event {
    border-color: #d97706;
}

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

.card-tag {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.event-tag {
    font-size: 0.75rem;
    font-weight: 600;
    color: #d97706;
    background: rgba(217, 119, 6, 0.12);
    padding: 3px 10px;
    border-radius: 99px;
}

.card-title {
    font-size: 1.45rem;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.card-text {
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 24px;
}

.swipe-hint {
    font-size: 0.78rem;
    color: var(--muted);
    opacity: 0.7;
    text-align: center;
}

.swipe-overlay {
    position: absolute;
    top: 16px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    background: var(--accent);
    color: var(--accent-text);
    max-width: 75%;
}

.swipe-left { left: 16px; }
.swipe-right { right: 16px; }

/* Tlačítka voleb */
.choice-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.choice-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 14px 16px;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.choice-dir {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
}

/* Zpětná vazba po tahu */
.feedback-box {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.feedback-deltas {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.delta-pill {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 99px;
}

.delta-pos {
    background: rgba(22, 163, 74, 0.14);
    color: #16a34a;
}

.delta-neg {
    background: rgba(220, 38, 38, 0.14);
    color: #dc2626;
}

.feedback-text {
    font-size: 0.96rem;
    color: var(--text);
}

.full-width {
    width: 100%;
    text-align: center;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

/* Závěrečné vyhodnocení */
.summary-card {
    padding: 32px 24px;
}

.summary-title {
    font-size: 1.7rem;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}

.summary-desc {
    color: var(--muted);
    margin-bottom: 24px;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}

.stat-pill {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-pill span {
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
}

.stat-pill strong {
    font-size: 0.98rem;
}

.recs-block {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    margin-bottom: 24px;
}

.recs-block h3 {
    font-size: 1rem;
    margin-bottom: 12px;
}

.recs-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cta-block {
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

.cta-block p {
    font-size: 0.92rem;
    color: var(--muted);
    margin-bottom: 14px;
}

@media (max-width: 560px) {
    .meters-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .summary-stats {
        grid-template-columns: 1fr;
    }
    .choice-actions {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   HRA: OBRANA PORTFOLIA (TOWER DEFENSE)
   ========================================= */
.td-shell {
    padding: 24px 0 48px;
}

.td-hud {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.td-stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.td-stat span {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    font-weight: 600;
}

.td-stat strong {
    font-size: 1.05rem;
}

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

.td-ctrl-right {
    display: flex;
    gap: 8px;
}

.td-ctrl-btn {
    padding: 9px 14px;
    font-size: 0.88rem;
    border-width: 1px;
    cursor: pointer;
    font-family: inherit;
}

.td-ctrl-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.td-toast {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 12px;
    min-height: 1.4em;
}

.td-canvas-wrap {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg);
    margin-bottom: 14px;
}

#gameCanvas {
    width: 100%;
    height: auto;
    aspect-ratio: 10 / 7;
    display: block;
    touch-action: manipulation;
    cursor: crosshair;
}

.td-inspector {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 18px;
    margin-bottom: 14px;
}

.insp-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.insp-info span {
    font-size: 0.85rem;
    color: var(--muted);
}

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

.td-dock {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.td-tower-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: border-color 0.15s, transform 0.15s;
}

.td-tower-btn.active {
    border-color: var(--text);
    box-shadow: 0 0 0 1px var(--text);
}

.td-tower-btn.unaffordable {
    opacity: 0.5;
}

.td-tower-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.td-tower-meta {
    display: flex;
    flex-direction: column;
}

.td-tower-meta strong {
    font-size: 0.9rem;
}

.td-tower-meta small {
    font-size: 0.76rem;
    color: var(--muted);
}

.td-tower-cost {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
    margin-top: auto;
}

@media (max-width: 640px) {
    .td-hud,
    .td-dock {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =========================================
   CHYTRÁ HLAVIČKA A HAMBURGER MENU
   ========================================= */
header {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 28px 0;
}

.logo {
    order: 1;
    white-space: nowrap;
    flex-shrink: 0;
}

#main-nav {
    order: 2;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 20px;
    white-space: nowrap;
}

.header-controls {
    order: 3;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.theme-btn,
.menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    min-width: 36px;
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 6px;
    padding: 0 10px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    transition: border-color 0.2s;
}

/* Na dostatečně široké obrazovce je hamburger schovaný */
.menu-btn {
    display: none;
}

.menu-btn:hover {
    border-color: var(--text);
}

/* Aktivuje se v JS jen tehdy, když se odkazy nevejdou na řádek */
header.is-compact {
    flex-wrap: wrap;
    padding: 20px 0;
}

header.is-compact .header-controls {
    order: 2;
}

header.is-compact .menu-btn {
    display: inline-flex;
}

header.is-compact #main-nav {
    order: 3;
    flex-basis: 100%;
    margin: 0;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

header.is-compact #main-nav.open {
    display: flex;
}

header.is-compact #main-nav a {
    padding: 13px 4px;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
}

header.is-compact #main-nav a:last-child {
    border-bottom: none;
}    }

    #main-nav a:last-child {
        border-bottom: none;
    }
}