* {
    box-sizing: border-box;
}

:root {
    --bg: #e8ebef;
    --surface: #ffffff;
    --text: #263240;
    --muted: #6e7a89;
    --body-bg: #e8ebef;
    --navbar-bg: rgba(255, 255, 255, 0.84);
    --navbar-text: #465364;
    --dropdown-bg: #ffffff;
    --dropdown-text: #333333;
    --overlay: rgba(0, 0, 0, 0.35);
    --footer-text: #6e7a89;
    --input-bg: #ffffff;
    --input-border: #ccd3dc;
    --code-bg: #272b30;
    --code-text: #f7f7f7;
    --blockquote-bg: #fafafa;
    --border: rgba(0, 0, 0, 0.08);
    --brand: #ff9a43;
    --brand-dark: #ff7b45;
    --shadow-soft: 0 24px 60px -28px rgba(20, 28, 38, 0.28), 0 18px 32px -24px rgba(20, 28, 38, 0.18);
    --shadow-card: 0 18px 38px -28px rgba(20, 28, 38, 0.28);
    --container: 1180px;
    --font-body: "Manrope", "Helvetica Neue", Arial, sans-serif;
    --font-heading: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
}

:root[data-theme="dark"] {
    --bg: #10141b;
    --surface: #171d25;
    --text: #e6edf5;
    --muted: #97a5b6;
    --body-bg: #090b0f;
    --navbar-bg: rgba(16, 20, 27, 0.84);
    --navbar-text: #d6deea;
    --dropdown-bg: #202731;
    --dropdown-text: #e6edf5;
    --overlay: rgba(0, 0, 0, 0.5);
    --footer-text: #95a2b3;
    --input-bg: #141920;
    --input-border: #2c3440;
    --code-bg: #0f1318;
    --code-text: #edf2f7;
    --blockquote-bg: #171c24;
    --border: rgba(255, 255, 255, 0.08);
    --shadow-soft: 0 24px 60px -28px rgba(0, 0, 0, 0.62), 0 18px 32px -24px rgba(0, 0, 0, 0.45);
    --shadow-card: 0 18px 38px -28px rgba(0, 0, 0, 0.58);
}

html {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    background: var(--body-bg);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--brand);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: min(var(--container), calc(100% - 30px));
    margin: 0 auto;
}

.wrapper {
    min-height: 100vh;
    background: var(--bg);
}

.header {
    position: relative;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--navbar-bg);
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px -24px rgba(0, 0, 0, 0.35);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
    gap: 1.5rem;
}

.navbar-brand-wrap {
    flex: 0 0 auto;
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
}

.navbar-brand-text {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--navbar-text);
}

.navbar-brand img {
    width: auto;
    height: 50px;
    object-fit: contain;
}

.nav-shell {
    display: flex;
    align-items: center;
    gap: 1.15rem;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.nav-shell > a,
.dropdown-trigger {
    display: inline-flex;
    align-items: center;
    min-height: 70px;
    color: var(--navbar-text);
    font-weight: 700;
}

.theme-toggle {
    width: 42px;
    height: 42px;
    padding: 0;
    min-height: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--navbar-text);
    border: 1px solid var(--border);
    box-shadow: none;
    border-radius: 999px;
}

.theme-toggle:hover {
    color: var(--brand);
    border-color: rgba(255, 154, 67, 0.35);
}

.theme-icon {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.theme-icon-moon {
    display: none;
}

:root[data-theme="dark"] .theme-icon-sun {
    display: none;
}

:root[data-theme="dark"] .theme-icon-moon {
    display: inline;
}

.nav-shell > a.active,
.nav-shell > a:hover,
.dropdown-trigger:hover {
    color: var(--brand);
}

.nav-dropdown {
    position: relative;
}

.dropdown-trigger::after {
    content: "";
    display: inline-block;
    margin-left: 0.5rem;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% - 10px);
    left: 0;
    min-width: 210px;
    padding: 0.7rem 0;
    background: var(--dropdown-bg);
    border-radius: 14px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 0.85rem 1.25rem;
    font-size: 13px;
    color: var(--dropdown-text);
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background: rgba(255, 154, 67, 0.1);
    color: var(--brand);
}

.hero-banner {
    position: relative;
    min-height: 560px;
    padding-top: 70px;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-small {
    min-height: 380px;
}

.hero-post {
    min-height: 460px;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 34%),
        linear-gradient(180deg, rgba(9, 12, 18, 0.22) 0%, var(--overlay) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
}

.hero-title-wrap {
    max-width: 760px;
    margin: 0 auto;
}

.hero-title-wrap-post {
    max-width: 980px;
}

.hero-title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(3.1rem, 6vw, 4.85rem);
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -0.05em;
    text-wrap: balance;
}

.hero-subtitle {
    display: inline-block;
    margin-top: 1rem;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 1rem;
    padding: 0.35rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-copy {
    max-width: 42rem;
    margin: 1rem auto 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.05rem;
}

.main {
    position: relative;
}

.main-raised {
    margin: -60px 30px 0;
    border-radius: 24px 24px 0 0;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.section {
    padding: 82px 0;
}

.section-heading {
    margin-bottom: 3rem;
}

.section-title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.04em;
}

.section-title.centered {
    text-align: center;
}

.section-intro {
    margin: 0.9rem auto 0;
    max-width: 760px;
    color: var(--muted);
    font-size: 1.02rem;
}

.section-intro.centered {
    text-align: center;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.guide-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: end;
    margin: 0 auto 2.5rem;
    max-width: 860px;
}

.guide-search-field {
    display: grid;
}

.guide-search input[type="search"] {
    width: 100%;
    padding: 1rem 1.15rem;
    border: 1px solid var(--input-border);
    border-radius: 16px;
    background: var(--input-bg);
    color: var(--text);
    box-shadow: var(--shadow-card);
    font-size: 1rem;
}

.guide-search-actions {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.tag-cloud,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.tag-cloud {
    margin: 0 auto 2rem;
    max-width: 860px;
}

.tag-row {
    margin: 0 0 1rem;
}

.article-tags {
    margin: 0 0 1.4rem;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 92%, var(--bg) 8%);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.tag-pill:hover,
.tag-pill.active {
    color: #fff;
    background: var(--brand);
    border-color: var(--brand);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.2rem 2rem;
}

.blog-card {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 1));
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

:root[data-theme="dark"] .blog-card {
    background: linear-gradient(180deg, rgba(26, 32, 42, 0.95), rgba(23, 29, 37, 1));
}

.blog-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 154, 67, 0.28);
    box-shadow: 0 26px 50px -30px rgba(255, 123, 69, 0.26);
}

.blog-card-content {
    padding: 1.5rem 1.4rem 1.6rem;
}

.blog-card-title {
    margin: 0 0 1rem;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.blog-card-text {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
}

.read-more {
    display: inline-flex;
    margin-top: 1rem;
    color: var(--brand);
    font-weight: 700;
}

.narrow {
    width: min(850px, calc(100% - 30px));
}

.article-card {
    padding: 0 10px 10px;
}

.error-card {
    padding: 2.4rem;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: color-mix(in srgb, var(--surface) 92%, var(--bg) 8%);
    box-shadow: var(--shadow-card);
}

.error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 2rem;
}

.error-page .main {
    padding: 56px 0 90px;
}

.error-page .section {
    padding: 0;
}

.error-section .narrow {
    width: min(760px, calc(100% - 30px));
}

.post-page .article-section {
    padding-top: 64px;
}

.post-page .hero-title {
    font-size: clamp(2.35rem, 5vw, 4.2rem);
    line-height: 1.12;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem 1.5rem;
    margin-bottom: 2rem;
    color: #999;
    font-size: 13px;
    text-transform: uppercase;
}

.article-lead {
    margin: 0 0 2rem;
    font-size: 1.15rem;
    color: var(--muted);
}

.personalization-panel {
    margin: 0 0 2rem;
    padding: 1.35rem;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: color-mix(in srgb, var(--surface) 90%, var(--bg) 10%);
    box-shadow: var(--shadow-card);
}

.personalization-head h2 {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
}

.personalization-head p {
    margin: 0;
    color: var(--muted);
}

.personalization-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1.2rem;
}

.related-posts {
    margin-top: 4rem;
}

.related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.richtext {
    font-size: 17px;
    color: var(--text);
}

.richtext p,
.richtext ul,
.richtext ol,
.richtext pre,
.richtext blockquote,
.richtext figure,
.richtext table {
    margin: 0 0 1.4rem;
}

.richtext h1,
.richtext h2,
.richtext h3,
.richtext h4 {
    margin: 2.2rem 0 1rem;
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.richtext h2 {
    font-size: 2rem;
}

.richtext h3 {
    font-size: 1.5rem;
}

.richtext ul,
.richtext ol {
    padding-left: 1.4rem;
}

.richtext pre {
    padding: 1rem 1.2rem;
    border-radius: 4px;
    background: var(--code-bg);
    color: var(--code-text);
    overflow: auto;
    font-size: 14px;
}

.richtext code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.code-block {
    position: relative;
    margin: 0 0 1.4rem;
}

.code-block pre {
    margin: 0;
    padding-top: 3.35rem;
}

.code-copy-button {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    z-index: 1;
    min-height: auto;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface) 18%, var(--code-bg) 82%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: none;
    font-size: 11px;
}

.code-copy-button:hover {
    background: var(--brand);
}

.richtext img {
    border-radius: 3px;
    box-shadow: var(--shadow-card);
}

.lead {
    font-size: 1.12em;
    color: var(--muted);
}

.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(220px, 0.9fr);
    gap: 2rem;
    align-items: center;
}

.about-logo {
    margin: 0;
    display: flex;
    justify-content: center;
}

.about-logo img {
    width: min(240px, 100%);
    height: auto;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 1.8rem 0;
}

.feature-card,
.cta-card {
    padding: 1.25rem 1.35rem;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: color-mix(in srgb, var(--surface) 92%, var(--bg) 8%);
    box-shadow: var(--shadow-card);
}

.feature-card h3,
.cta-card h3 {
    margin-top: 0;
    margin-bottom: 0.7rem;
    font-size: 1.15rem;
}

.feature-card p,
.cta-card p {
    margin-bottom: 0;
}

.cta-card {
    margin-top: 2rem;
}

.link-list {
    display: grid;
    gap: 0.85rem;
    margin: 1.5rem 0 0;
}

.link-list a {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    width: fit-content;
    font-weight: 700;
}

.contact-list {
    display: grid;
    gap: 1rem;
    margin: 1.6rem 0;
}

.contact-item {
    padding: 1rem 1.15rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: color-mix(in srgb, var(--surface) 94%, var(--bg) 6%);
}

.contact-item strong {
    display: block;
    margin-bottom: 0.25rem;
}

.wp-block-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    align-items: start;
}

.wp-block-column {
    min-width: 0;
}

.richtext blockquote {
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--brand);
    color: var(--muted);
    background: var(--blockquote-bg);
}

.pagination-wrap {
    margin-top: 3rem;
}

.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.pagination .page-link,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 0.9rem;
    border-radius: 30px;
    color: #999;
    background: transparent;
}

.pagination .page-link.active,
.pagination .page-link:hover {
    background: var(--brand);
    color: #fff;
}

.site-footer {
    padding: 38px 0 46px;
    background: transparent;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--footer-text);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.notice,
.auth-card,
.admin-shell,
.stats-card,
.table-wrap,
.editor-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
}

.notice,
.auth-card,
.stats-card,
.editor-card {
    padding: 1.5rem;
}

.auth-wrap,
.admin-wrap {
    padding: 7rem 0 3rem;
}

.auth-card {
    width: min(480px, calc(100% - 30px));
    margin: 0 auto;
}

.form-grid {
    display: grid;
    gap: 1rem;
}

label {
    display: grid;
    gap: 0.35rem;
    font-weight: 500;
}

label span {
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
}

label small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="datetime-local"],
textarea,
select {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid var(--input-border);
    border-radius: 4px;
    background: var(--input-bg);
    color: var(--text);
}

textarea {
    min-height: 10rem;
    resize: vertical;
}

.button,
button,
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.25rem;
    border: 0;
    border-radius: 4px;
    background: var(--brand);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 2px 2px 0 rgba(255, 154, 67, 0.16), 0 3px 1px -2px rgba(255, 123, 69, 0.22), 0 1px 5px 0 rgba(255, 154, 67, 0.14);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.04em;
}

.button.secondary {
    background: color-mix(in srgb, var(--surface) 70%, var(--text) 30%);
    box-shadow: none;
}

.button.danger {
    background: #d32f2f;
    box-shadow: none;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.errors {
    color: #d32f2f;
    padding-left: 1.2rem;
}

.admin-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1.5rem;
}

.admin-shell {
    padding: 1.25rem;
}

.admin-shell a {
    color: var(--text);
}

.admin-shell a:hover {
    color: var(--brand);
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.stats-card strong {
    display: block;
    margin-top: 0.25rem;
    font-size: 2rem;
}

.table-wrap {
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
    color: var(--text);
}

th {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--muted);
}

td a {
    color: var(--text);
}

td a:hover {
    color: var(--brand);
}

.actions,
.meta-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.inline-form {
    display: inline;
}

@media (max-width: 991px) {
    .guide-search {
        grid-template-columns: 1fr;
    }

    .blog-grid {
        grid-template-columns: 1fr 1fr;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .admin-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .navbar {
        position: static;
    }

    .navbar-inner,
    .nav-shell,
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-shell > a,
    .dropdown-trigger {
        min-height: auto;
        padding: 0.4rem 0;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 0 0 0.5rem 1rem;
    }

    .hero-banner {
        min-height: 420px;
        padding-top: 2rem;
    }

    .hero-small {
        min-height: 280px;
    }

    .hero-post {
        min-height: 360px;
    }

    .main-raised {
        margin: -40px 10px 0;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .about-grid,
    .wp-block-columns {
        grid-template-columns: 1fr;
    }

    .error-card {
        padding: 1.4rem;
        border-radius: 18px;
    }

    .hero-copy {
        font-size: 0.96rem;
    }

    .error-actions {
        flex-direction: column;
    }

    .error-actions .button {
        width: 100%;
    }
}
