:root {
    --bg: #eef2f7;
    --bg-card: #ffffff;
    --bg-soft: #e3eaf2;
    --bg-soft-2: #f4f7fb;
    --text: #0f172a;
    --text-muted: #334155;
    --text-faint: #64748b;
    --border: #cbd5e1;
    --border-soft: #dde5ee;
    --blue: #1f4db8;
    --blue-strong: #173f96;
    --map-accent: #ad5d2a;
    --community-accent: #b63730;
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 26px;
    --radius-xl: 32px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05), 0 10px 24px rgba(15, 23, 42, 0.06);
    --shadow: 0 3px 10px rgba(15, 23, 42, 0.06), 0 18px 46px rgba(15, 23, 42, 0.10);
    --shadow-strong: 0 18px 40px rgba(2, 6, 23, 0.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: "Inter", system-ui, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(31, 77, 184, 0.10), transparent 28%),
        radial-gradient(circle at top right, rgba(182, 55, 48, 0.08), transparent 24%),
        linear-gradient(180deg, #f7fafc 0%, #edf2f7 100%);
    color: var(--text);
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; height: auto; display: block; }

.wrap {
    width: min(100% - 32px, 1160px);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(247, 250, 252, 0.92);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 72px;
}

.nejdenet-logo {
    display: inline-flex;
    align-items: flex-end;
    font-size: 31px;
    letter-spacing: -0.05em;
    white-space: nowrap;
    flex: 0 0 auto;
}

.wifi-icon { width: 0.88em; height: 0.88em; transform: scaleX(-1) rotate(45deg) translateY(-0.02em); margin-right: 0.03em; }
.arc { fill: none; stroke-width: 5; stroke-linecap: round; }
.arc-blue { stroke: var(--blue); }
.arc-orange { stroke: var(--map-accent); }
.arc-red { stroke: var(--community-accent); }
.text-nejde, .box-net { font-size: 1em; font-weight: 800; line-height: 1; }
.box-net { display: inline-flex; align-items: center; justify-content: center; margin: 0 0.05em; padding: 0.045em 0.18em 0.065em; border-radius: 0.15em; background: #0f172a; color: #fff; }
.text-cz { font-size: 0.47em; font-weight: 700; color: var(--blue-strong); margin-left: 0.03em; transform: translateY(-0.02em); }
.cursor { display: inline-block; width: 0.24em; height: 0.08em; margin-left: 0.06em; background: var(--map-accent); border-radius: 999px; transform: translateY(-0.05em); }

.site-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.site-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid transparent;
    transition: background .14s ease, border-color .14s ease, transform .14s ease;
}
.site-nav a:hover, .site-nav a.is-active { background: rgba(255, 255, 255, 0.98); border-color: rgba(15, 23, 42, 0.12); }

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,.88);
}

.site-main { padding: 28px 0 44px; }
.page-shell, .card, .stack-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 251, 253, 0.98));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.page-shell { padding: 26px; }
.card, .stack-card { padding: 20px; }

.page-grid { display: grid; gap: 20px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.three-col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.kicker, .pill, .chip, .meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    min-height: 30px;
    padding: 0 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.kicker { background: rgba(182, 55, 48, 0.08); color: var(--community-accent); letter-spacing: .08em; text-transform: uppercase; }
.pill, .chip, .meta-chip { background: var(--bg-soft-2); color: var(--text-muted); font-size: 12px; font-weight: 700; }
.meta-chip--soft { background: rgba(15,23,42,.05); }
.meta-chip--danger { background: rgba(182,55,48,.10); color: var(--community-accent); }

h1, h2, h3 { margin: 0; letter-spacing: -0.04em; }
h1 { font-size: clamp(2.25rem, 5vw, 4rem); line-height: .98; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.1rem; }
p { margin: 0; color: var(--text-muted); }

.button, .button-secondary, .button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 800;
    transition: transform .14s ease, border-color .14s ease, background .14s ease;
}

.button {
    background: var(--text);
    color: #fff;
    border: 1px solid var(--text);
    box-shadow: var(--shadow-sm);
}
.button-secondary {
    background: rgba(255,255,255,.96);
    color: var(--text);
    border: 1px solid rgba(15,23,42,.12);
}
.button-link {
    min-height: auto;
    padding: 0;
    border-radius: 0;
    color: var(--blue-strong);
}
.button:hover, .button-secondary:hover, .button-link:hover { transform: translateY(-1px); }

.notice {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(15,23,42,.10);
    background: rgba(255,255,255,.86);
    color: var(--text);
}
.notice--success { border-color: rgba(15,118,110,.16); background: rgba(240,253,250,.94); }
.notice--error { border-color: rgba(182,55,48,.16); background: rgba(254,242,242,.96); }

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
    gap: 18px;
}
.hero__copy, .hero__aside, .stack, .thread-list, .reply-list, .form-grid { display: grid; gap: 14px; }

.section-link {
    display: grid;
    gap: 10px;
    min-height: 100%;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: rgba(255,255,255,.92);
    box-shadow: 0 12px 24px rgba(15,23,42,.05);
    transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.section-link:hover, .thread-row:hover, .sidebar-list a:hover, .table-card:hover {
    transform: translateY(-1px);
    border-color: rgba(15,23,42,.16);
    box-shadow: 0 18px 30px rgba(15,23,42,.08);
}

.thread-row {
    display: grid;
    gap: 12px;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(15,23,42,.10);
    background: rgba(255,255,255,.94);
    transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}

.thread-row__head, .thread-meta, .toolbar, .inline-actions, .sidebar-list, .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.thread-row__head { justify-content: space-between; align-items: flex-start; }
.thread-meta { color: var(--text-faint); font-size: 12px; font-weight: 700; }
.thread-meta strong { color: var(--text); }
.thread-copy { color: var(--text-muted); font-size: 14px; }

.sidebar-list { display: grid; gap: 10px; align-items: stretch; }
.sidebar-list a, .sidebar-list div {
    display: block;
    padding: 14px 15px;
    border-radius: 16px;
    border: 1px solid rgba(15,23,42,.08);
    background: rgba(255,255,255,.9);
    font-size: 14px;
    color: var(--text);
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.field-grid--single { grid-template-columns: 1fr; }

.field { display: grid; gap: 6px; }
.field label {
    color: var(--text-faint);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.input, .textarea, .select {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid rgba(15,23,42,.14);
    border-radius: 14px;
    background: #fff;
    color: var(--text);
}
.textarea { min-height: 168px; resize: vertical; }
.help-text { color: var(--text-faint); font-size: 12px; }

.form-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.form-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.thread-detail {
    display: grid;
    gap: 18px;
}
.post, .reply, .table-card {
    padding: 20px;
    border-radius: 22px;
    border: 1px solid rgba(15,23,42,.10);
    background: rgba(255,255,255,.96);
    box-shadow: 0 12px 24px rgba(15,23,42,.05);
}
.post__body, .reply__body {
    color: var(--text);
    line-height: 1.7;
}
.post__body blockquote, .reply__body blockquote {
    margin: 0;
    padding-left: 14px;
    border-left: 3px solid var(--border);
    color: var(--text-muted);
}

.reply {
    display: grid;
    gap: 12px;
}
.reply__head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.details-card {
    border: 1px solid rgba(15,23,42,.10);
    border-radius: 20px;
    background: rgba(255,255,255,.92);
    overflow: hidden;
}
.details-card summary {
    list-style: none;
    cursor: pointer;
    padding: 16px 18px;
    font-weight: 800;
}
.details-card summary::-webkit-details-marker { display: none; }
.details-card__body {
    padding: 0 18px 18px;
    display: grid;
    gap: 12px;
}

.table-card {
    display: grid;
    gap: 10px;
}
.table-card__meta {
    color: var(--text-faint);
    font-size: 12px;
}

.site-footer {
    margin-top: 28px;
    padding: 20px 0 32px;
    border-top: 1px solid rgba(15,23,42,.08);
    background: rgba(255,255,255,.68);
}
.site-footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.site-footer__links { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); }
.site-footer__copy { font-size: 12px; color: var(--text-muted); }

@media (max-width: 980px) {
    .two-col, .three-col, .hero, .field-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .wrap { width: min(100% - 24px, 1160px); }
    .site-nav {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        padding: 12px 20px 18px;
        background: rgba(244,245,247,.98);
        border-bottom: 1px solid rgba(15,23,42,.08);
        flex-direction: column;
        align-items: stretch;
    }
    .site-nav.open { display: flex; }
    .site-nav a { min-height: 46px; justify-content: space-between; background: rgba(255,255,255,.76); border-color: rgba(15,23,42,.08); }
    .mobile-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .page-shell, .card, .stack-card, .post, .reply, .thread-row, .table-card { padding: 18px; }
    .toolbar, .inline-actions, .form-actions, .pagination { flex-direction: column; align-items: stretch; }
    .button, .button-secondary { width: 100%; }
}
