:root {
    --bg: #08121d;
    --bg-soft: #0d1b2a;
    --panel: rgba(15, 31, 47, 0.92);
    --panel-2: rgba(11, 25, 39, 0.9);
    --text: #eaf6ff;
    --muted: #96b6cc;
    --line: rgba(104, 195, 255, 0.18);
    --accent: #39c7ff;
    --accent-2: #6df1ff;
    --danger: #ff6978;
    --shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
    --radius: 22px;
    --radius-sm: 14px;
    --container: 1240px;
    --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background:
        radial-gradient(circle at top, rgba(57, 199, 255, 0.10), transparent 26%),
        linear-gradient(180deg, #07111b 0%, #08121d 100%);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
iframe { border: 0; }

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(18px);
    background: rgba(6, 14, 22, 0.78);
    border-bottom: 1px solid var(--line);
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 78px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}
.brand strong {
    display: block;
    font-size: 1rem;
    line-height: 1.15;
}
.brand small {
    display: block;
    color: var(--muted);
    margin-top: 2px;
}
.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(57, 199, 255, 0.16), rgba(109, 241, 255, 0.24));
    border: 1px solid rgba(109, 241, 255, 0.32);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.02) inset;
    font-weight: 800;
    letter-spacing: 0.06em;
}
.brand-image-mark {
    overflow: hidden;
    padding: 0;
    background: rgba(4, 12, 19, 0.92);
}
.brand-image-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}
.site-nav a {
    padding: 12px 16px;
    border-radius: 999px;
    color: var(--muted);
    transition: 0.2s ease;
}
.site-nav a:hover,
.site-nav a.active {
    color: var(--text);
    background: rgba(57, 199, 255, 0.10);
}
.nav-toggle {
    display: none;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 14px;
}

.site-main { padding-bottom: 48px; }

.hero-section { padding: 28px 0 10px; }
.hero-card {
    position: relative;
    min-height: 420px;
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid var(--line);
    background: #07111b;
    box-shadow: var(--shadow);
}
.hero-image {
    width: 100%;
    height: 420px;
    object-fit: cover;
    object-position: center;
    transform: scale(0.95);
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(3, 8, 13, 0.82) 0%, rgba(3, 8, 13, 0.45) 42%, rgba(3, 8, 13, 0.62) 100%),
        linear-gradient(180deg, rgba(3, 8, 13, 0.10) 0%, rgba(3, 8, 13, 0.66) 100%);
}
.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    padding: 42px;
    max-width: 690px;
}
.hero-content h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.04;
}
.hero-copy, .section-copy, .meta-copy, .rich-copy, .panel p, .doc-entry p {
    color: var(--muted);
    line-height: 1.7;
}
.hero-actions, .meta-row, .inline-actions, .filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    font: inherit;
}
.btn-primary {
    color: #041018;
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    font-weight: 700;
}
.btn-secondary {
    color: var(--text);
    background: rgba(57, 199, 255, 0.08);
    border-color: var(--line);
}
.btn-danger {
    background: rgba(255, 105, 120, 0.12);
    border-color: rgba(255, 105, 120, 0.28);
    color: #ffd5da;
}
.btn-small {
    min-height: 36px;
    padding: 0 12px;
    font-size: 0.92rem;
}
.text-link {
    color: var(--accent-2);
    font-weight: 600;
}

.section-block,
.page-hero { padding: 26px 0; }
.compact-hero { padding-top: 26px; }

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}
.section-heading h1,
.section-heading h2 {
    margin: 4px 0 0;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
}
.eyebrow {
    margin: 0;
    color: var(--accent-2);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    font-weight: 700;
}

.panel {
    background: linear-gradient(180deg, var(--panel), var(--panel-2));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
}
.intro-panel { font-size: 1.03rem; }

.tool-grid,
.card-grid,
.sponsor-grid,
.stats-grid {
    display: grid;
    gap: 18px;
}
.tool-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.card-grid,
.sponsor-grid,
.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.large-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.tool-card,
.sponsor-card {
    background: linear-gradient(180deg, rgba(16, 35, 53, 0.95), rgba(8, 20, 31, 0.92));
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 22px;
    transition: transform 0.18s ease, border-color 0.18s ease;
}
.tool-card:hover,
.sponsor-card:hover {
    transform: translateY(-3px);
    border-color: rgba(109, 241, 255, 0.34);
}
.tool-card img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    margin-bottom: 14px;
}
.tool-card h3,
.sponsor-card h3,
.news-card h2,
.panel h3,
.doc-entry h3,
.article-panel h1 {
    margin: 0;
}
.tool-card p,
.sponsor-card p { margin: 8px 0 0; }

.two-col,
.admin-two-col {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 22px;
}

.stack-sm > * + *,
.stack-md > * + *,
.stack-lg > * + * {
    margin-top: 14px;
}
.stack-md > * + * { margin-top: 18px; }
.stack-lg > * + * { margin-top: 24px; }

.video-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
    overflow: hidden;
    background: #050a0f;
    border: 1px solid var(--line);
}
.video-embed iframe {
    width: 100%;
    height: 100%;
}
.video-embed.wide {
    margin-bottom: 18px;
}
.tutorial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 20px;
}

.news-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 18px;
    background: linear-gradient(180deg, var(--panel), var(--panel-2));
    border: 1px solid var(--line);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.news-card.compact {
    grid-template-columns: 1fr;
}
.news-thumb img {
    width: 100%;
    height: 100%;
    min-height: 210px;
    object-fit: cover;
}
.news-card-body { padding: 22px; }
.news-card-body p { margin: 10px 0 0; color: var(--muted); }
.meta-line {
    color: var(--muted);
    font-size: 0.92rem;
}
.tag,
.filter-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(109, 241, 255, 0.2);
    background: rgba(57, 199, 255, 0.09);
    color: var(--accent-2);
    font-size: 0.84rem;
    font-weight: 700;
}
.tag.alt {
    background: rgba(255,255,255,0.08);
    color: var(--text);
}
.filter-pill.active {
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    color: #041018;
    border-color: transparent;
}

.doc-group-panel {
    padding: 26px;
}
.doc-group-heading {
    margin-bottom: 18px;
}
.doc-group-title {
    display: flex;
    align-items: center;
    gap: 18px;
}
.doc-group-title img {
    width: 70px;
    height: 70px;
    object-fit: contain;
}
.doc-entry {
    padding: 20px;
    border-radius: 18px;
    border: 1px solid rgba(109, 241, 255, 0.12);
    background: rgba(8, 20, 31, 0.62);
}
.doc-entry-top {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}
.rich-copy { white-space: pre-wrap; }
.article-shell { max-width: 960px; }
.article-panel { padding: 26px; }
.article-image {
    width: 100%;
    max-width: var(--news-featured-image-width, 760px);
    margin: 22px auto;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: rgba(3, 13, 22, 0.72);
}
.article-image img {
    display: block;
    width: 100%;
    max-height: var(--news-featured-image-max-height, 360px);
    object-fit: var(--news-featured-image-fit, contain);
}
.article-excerpt {
    font-size: 1.08rem;
    color: #cfe8f8;
}

.logo-fallback {
    width: 76px;
    height: 76px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    background: rgba(57, 199, 255, 0.12);
    border: 1px solid var(--line);
    font-size: 1.35rem;
    font-weight: 800;
}
.sponsor-card img {
    width: 100%;
    max-width: 180px;
    height: 82px;
    object-fit: contain;
    margin-bottom: 14px;
}
.empty-state {
    text-align: center;
    border: 1px dashed rgba(109, 241, 255, 0.25);
    border-radius: 22px;
    padding: 28px;
    background: rgba(8, 20, 31, 0.55);
}
.empty-state.large { padding: 44px 24px; }

.site-footer {
    margin-top: 40px;
    border-top: 1px solid var(--line);
    background: rgba(5, 12, 19, 0.8);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.8fr 1fr;
    gap: 24px;
    padding: 30px 0 42px;
}
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li + li { margin-top: 8px; }
.footer-links a { color: var(--muted); }

.login-body, .admin-body {
    min-height: 100vh;
}
.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}
.login-card {
    width: min(520px, 100%);
    background: linear-gradient(180deg, var(--panel), var(--panel-2));
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 30px;
    box-shadow: var(--shadow);
}
.login-card h1 { margin: 8px 0 10px; }

.form-panel h2,
.panel h2 {
    margin-top: 0;
}
.form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.form-row label {
    font-weight: 600;
}
.form-row input,
.form-row textarea,
.form-row select {
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(109, 241, 255, 0.16);
    background: rgba(4, 12, 19, 0.85);
    color: var(--text);
    padding: 14px 16px;
    font: inherit;
}
.form-row small {
    color: var(--muted);
}
.form-grid {
    align-items: start;
}
.checkbox-row,
.meta-row label {
    color: var(--text);
}
.checkbox-row input,
.meta-row input {
    margin-right: 8px;
}

.alert {
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 18px;
    border: 1px solid transparent;
}
.alert.success {
    background: rgba(78, 218, 148, 0.12);
    border-color: rgba(78, 218, 148, 0.25);
    color: #b8f0cf;
}
.alert.error {
    background: rgba(255, 105, 120, 0.12);
    border-color: rgba(255, 105, 120, 0.25);
    color: #ffd2d7;
}

.admin-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}
.admin-sidebar {
    padding: 24px 18px;
    border-right: 1px solid var(--line);
    background: rgba(5, 12, 19, 0.88);
    position: sticky;
    top: 0;
    height: 100vh;
}
.admin-brand { margin-bottom: 26px; }
.admin-nav {
    display: grid;
    gap: 8px;
}
.admin-nav a {
    color: var(--muted);
    padding: 12px 14px;
    border-radius: 14px;
}
.admin-nav a:hover {
    background: rgba(57, 199, 255, 0.08);
    color: var(--text);
}
.admin-content {
    padding: 28px;
}
.admin-header {
    margin-bottom: 18px;
}
.admin-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.stat-panel h2 {
    font-size: 2rem;
    margin: 12px 0 8px;
}
.admin-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(109, 241, 255, 0.1);
}
.admin-list-item:last-child { border-bottom: 0; }
.image-preview {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: rgba(4, 12, 19, 0.9);
}
.image-preview img {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
}

.image-preview.social-share-preview img {
    display: block;
    width: 100%;
    max-height: none;
    height: auto;
    object-fit: contain;
}

.image-preview.small img {
    max-width: 220px;
    max-height: 140px;
}
.icon-preview img {
    max-width: 92px;
    max-height: 92px;
    object-fit: contain;
}
.image-preview.brand-icon-preview {
    width: 112px;
    height: 112px;
    display: grid;
    place-items: center;
    padding: 10px;
}
.image-preview.brand-icon-preview img {
    width: 80px;
    height: 80px;
    max-height: none;
    object-fit: cover;
    border-radius: 18px;
}
.filter-row {
    margin-top: 18px;
}
.article-copy {
    margin-top: 22px;
}

@media (max-width: 1040px) {
    .two-col, .admin-two-col, .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .admin-sidebar {
        position: static;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .hero-content {
        position: absolute;
        max-width: 100%;
        padding: 28px;
    }

    .news-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 840px) {
    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 82px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 16px;
        border-radius: 20px;
        border: 1px solid var(--line);
        background: rgba(5, 12, 19, 0.96);
        box-shadow: var(--shadow);
    }

    .site-nav.open {
        display: flex;
    }

    .hero-card {
        min-height: 470px;
    }

    .hero-image {
        height: 470px;
        transform: scale(1.05);
    }

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


/* Road Constructor documentation-page additions */
.tool-detail-panel { padding: 28px; }
.doc-group-title.large img { width: 92px; height: 92px; }
.doc-group-title h1 { margin: 4px 0 0; font-size: clamp(2rem, 4vw, 3.2rem); }
.vertical-actions { display: flex; flex-direction: column; align-items: stretch; min-width: 230px; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.tool-detail-hero .section-copy { max-width: 780px; }
@media (max-width: 860px) {
    .doc-entry-top { flex-direction: column; }
    .vertical-actions { width: 100%; }
    .two-col, .admin-two-col { grid-template-columns: 1fr; }
}

/* v1.0.3 documentation page refinements */
.tool-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}
.tool-card {
    min-height: 300px;
}
.tool-card p {
    font-size: 0.98rem;
    line-height: 1.35;
}
.tool-content-panel {
    max-width: 1040px;
    margin: 0 auto;
}
.guide-content-grid,
.guide-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}
.guide-section,
.guide-section-card {
    background: rgba(8, 20, 31, 0.38);
    border: 1px solid rgba(109, 241, 255, 0.13);
    border-radius: 20px;
    padding: 22px;
}
.guide-section + .guide-section {
    margin-top: 22px;
}
.guide-section h2,
.tool-content-panel h2 {
    margin-top: 0;
    color: var(--accent-2);
}
.tool-content-panel h3 {
    margin-top: 22px;
    color: var(--text);
}
.tool-content-panel ul,
.tool-content-panel ol,
.rich-copy ul,
.rich-copy ol {
    padding-left: 22px;
    color: var(--muted);
    line-height: 1.7;
}
.tool-content-panel li + li,
.rich-copy li + li {
    margin-top: 6px;
}
.rich-copy a {
    color: var(--accent-2);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.rich-copy img {
    max-width: 100%;
    height: auto;
    border-radius: 18px;
    border: 1px solid var(--line);
    margin: 16px 0;
}
.rich-copy iframe {
    width: 100%;
    min-height: 360px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: #050a0f;
}
.slim-actions {
    min-width: 180px;
}

/* Lightweight admin WYSIWYG editor */
.rc-editor-shell {
    border: 1px solid rgba(109, 241, 255, 0.16);
    background: rgba(4, 12, 19, 0.82);
    border-radius: 16px;
    overflow: hidden;
}
.rc-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    border-bottom: 1px solid rgba(109, 241, 255, 0.12);
    background: rgba(57, 199, 255, 0.06);
}
.rc-editor-toolbar button {
    min-height: 32px;
    border: 1px solid rgba(109, 241, 255, 0.18);
    border-radius: 10px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    padding: 0 10px;
    font: inherit;
    font-size: 0.88rem;
}
.rc-editor-toolbar button:hover {
    border-color: rgba(109, 241, 255, 0.42);
    background: rgba(57, 199, 255, 0.12);
}
.rc-editor-area {
    min-height: 190px;
    max-height: 520px;
    overflow: auto;
    padding: 14px 16px;
    outline: none;
    color: var(--text);
    line-height: 1.65;
}
.rc-editor-area:focus {
    box-shadow: 0 0 0 2px rgba(57, 199, 255, 0.22) inset;
}
.rc-editor-area a { color: var(--accent-2); text-decoration: underline; }
.rc-editor-area img { max-width: 100%; height: auto; border-radius: 12px; margin: 10px 0; cursor: pointer; resize: both; overflow: auto; }
.rc-editor-area img.rc-editor-selected-image { outline: 2px solid var(--accent); outline-offset: 4px; }
textarea.rc-editor-source {
    display: none;
}

@media (max-width: 1080px) {
    .tool-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 680px) {
    .tool-grid,
    .guide-content-grid,
    .guide-two-col {
        grid-template-columns: 1fr;
    }
    .tool-card {
        min-height: 0;
    }
}

/* v1.0.5 layout polish */
.tool-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}
.tool-card {
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 20px 20px 22px;
}
.tool-card img {
    margin-bottom: 12px;
}
.tool-card h3 {
    margin-bottom: 6px;
}
.tool-card p {
    margin: 0;
    line-height: 1.42;
}
.guide-content-grid,
.guide-two-col {
    align-items: stretch;
}
.guide-content-grid .guide-section,
.guide-content-grid .guide-section + .guide-section,
.guide-two-col .guide-section-card {
    margin-top: 0;
}
.guide-section,
.guide-section-card {
    height: 100%;
}
.tutorial-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}
.tutorial-card {
    height: 100%;
    padding: 18px;
}
.tutorial-card h3 {
    margin-top: 4px;
}
.tutorial-card .video-embed {
    margin-bottom: 14px;
}
@media (max-width: 1100px) {
    .tool-grid,
    .tutorial-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 700px) {
    .tool-grid,
    .tutorial-grid,
    .guide-content-grid,
    .guide-two-col {
        grid-template-columns: 1fr;
    }
}


/* v1.0.6 documentation guide button polish */
.doc-group-panel .doc-entry-top {
    align-items: center;
    margin-bottom: 0;
}
.doc-guide-actions {
    min-width: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
}
.btn-guide {
    min-width: 128px;
    min-height: 56px;
    padding: 0 24px;
    font-size: 1.02rem;
    line-height: 1;
    font-weight: 800;
    text-align: center;
    box-shadow: 0 8px 24px rgba(57, 199, 255, 0.15);
}
@media (max-width: 860px) {
    .doc-guide-actions {
        width: 100%;
        min-width: 0;
        align-self: auto;
        justify-content: flex-start;
    }
    .btn-guide {
        width: 100%;
    }
}


/* v1.0.7 sponsor removal, hero, documentation and tool editor polish */
.hero-card { min-height: 420px; }
.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: none;
}
.hero-overlay {
    background:
        linear-gradient(90deg, rgba(3, 8, 13, 0.12) 0%, rgba(3, 8, 13, 0.34) 42%, rgba(3, 8, 13, 0.90) 100%),
        linear-gradient(180deg, rgba(3, 8, 13, 0.08) 0%, rgba(3, 8, 13, 0.58) 100%);
}
.hero-content {
    left: auto;
    right: 0;
    width: min(620px, 52%);
    max-width: none;
    align-items: flex-end;
    text-align: right;
}
.hero-copy { max-width: 560px; }
.hero-actions { justify-content: flex-end; }
.documentation-top-grid,
.documentation-duplicate-grid { display: none !important; }
.doc-group-panel { padding: 26px 34px; }
.doc-entry-top { min-height: 136px; }
.doc-group-title { flex: 1; }
.doc-guide-actions { align-self: stretch; }
.guide-two-col { align-items: start; }
.guide-two-col > .guide-section-card { align-self: start; margin-top: 0 !important; }
.guide-section-card { min-height: 0; }
@media (max-width: 1040px) {
    .hero-content {
        width: 100%;
        padding: 28px;
        align-items: flex-start;
        text-align: left;
    }
    .hero-actions { justify-content: flex-start; }
    .hero-overlay {
        background: linear-gradient(90deg, rgba(3, 8, 13, 0.84) 0%, rgba(3, 8, 13, 0.56) 58%, rgba(3, 8, 13, 0.42) 100%);
    }
}


/* v1.0.8 tool guide page spacing cleanup */
.guide-section-card.rich-copy {
    white-space: normal;
}
.guide-two-col {
    align-items: start;
}
.guide-section-card {
    padding: 22px 24px 24px;
}
.guide-section-card .guide-label {
    display: inline-block;
    margin: 0 0 12px;
}
.guide-section-card > h2 {
    display: none;
}
.guide-section-card p:first-of-type {
    margin-top: 0;
}
.guide-section-card p:last-child {
    margin-bottom: 0;
}
.guide-section-card .guide-label + p,
.guide-section-card .guide-label + ul,
.guide-section-card .guide-label + ol,
.guide-section-card .guide-label + h1,
.guide-section-card .guide-label + h2,
.guide-section-card .guide-label + h3 {
    margin-top: 0;
}
.guide-section-card .guide-label + h2 {
    display: none;
}
.guide-section-card br:first-child {
    display: none;
}


/* v1.0.9 single User Guide tool page layout */
.guide-single {
    display: block;
    width: 100%;
}
.guide-user-card {
    width: 100%;
    max-width: none;
    padding: 30px 38px 34px;
}
.guide-user-card .guide-label {
    color: #ffffff;
    font-size: 1.02rem;
    letter-spacing: 0.18em;
    margin-bottom: 18px;
}
.guide-user-card.rich-copy {
    max-width: none;
}
.guide-user-card.rich-copy p,
.guide-user-card.rich-copy ul,
.guide-user-card.rich-copy ol {
    max-width: 980px;
}
.guide-user-card.rich-copy h1,
.guide-user-card.rich-copy h2,
.guide-user-card.rich-copy h3,
.guide-user-card.rich-copy h4 {
    color: #ffffff;
    margin-top: 22px;
}
@media (max-width: 760px) {
    .guide-user-card {
        padding: 24px 22px 28px;
    }
}

/* v1.0.10 hero image vibrancy pass */
.hero-card {
    background: #040b12;
}
.hero-image {
    filter: saturate(1.18) contrast(1.08) brightness(1.08);
}
.hero-overlay {
    background:
        linear-gradient(90deg, rgba(3, 8, 13, 0.00) 0%, rgba(3, 8, 13, 0.03) 48%, rgba(3, 8, 13, 0.38) 100%);
}
.hero-content h1,
.hero-content .eyebrow,
.hero-copy,
.hero-actions {
    text-shadow: 0 3px 14px rgba(0, 0, 0, 0.68);
}
@media (max-width: 1040px) {
    .hero-overlay {
        background:
            linear-gradient(90deg, rgba(3, 8, 13, 0.58) 0%, rgba(3, 8, 13, 0.32) 58%, rgba(3, 8, 13, 0.18) 100%);
    }
}


/* v1.0.12 admin editor image upload and resize polish */
.rc-editor-toolbar button:nth-last-child(n) {
    white-space: nowrap;
}
.rc-editor-area img.rc-content-image {
    display: inline-block;
    max-width: 100%;
    height: auto;
}

.action-row.centered {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 18px 0;
}

/* v1.0.19 admin upload diagnostics */
.diagnostic-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.diagnostic-grid > div {
    background: rgba(4, 16, 32, 0.55);
    border: 1px solid rgba(125, 211, 252, 0.18);
    border-radius: 14px;
    padding: 14px;
}

.diagnostic-grid strong,
.diagnostic-grid code {
    display: block;
}

.diagnostic-grid code {
    margin-top: 8px;
    white-space: normal;
    word-break: break-word;
}

.diagnostic-list {
    margin: 0;
    padding-left: 22px;
    color: #cbd5e1;
}

.diagnostic-list li + li {
    margin-top: 6px;
}

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

/* v1.0.20 upload path normalisation diagnostics */
.diagnostic-grid small {
    display: block;
    margin-top: 8px;
    color: #93c5fd;
    word-break: break-word;
}

.form-row.full-span {
    grid-column: 1 / -1;
}

/* v1.0.22 admin editor text colour control */
.rc-editor-colour-control {
    min-height: 32px;
    border: 1px solid rgba(109, 241, 255, 0.18);
    border-radius: 10px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    padding: 0 8px;
    font: inherit;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}
.rc-editor-colour-control:hover {
    border-color: rgba(109, 241, 255, 0.42);
    background: rgba(57, 199, 255, 0.12);
}
.rc-editor-colour-control input[type="color"] {
    width: 26px;
    height: 24px;
    padding: 0;
    border: 1px solid rgba(109, 241, 255, 0.28);
    border-radius: 7px;
    background: transparent;
    cursor: pointer;
}

/* RoadConstructorWeb_v.02 - card label/title spacing polish */
.panel .tag + h2,
.panel .tag + h3,
.panel .meta-row + h2,
.panel .meta-row + h3,
.news-card-body > .tag + h2,
.news-card-body > .tag + h3,
.news-card-body .meta-row + h2,
.news-card-body .meta-row + h3 {
    margin-top: 18px;
}

/* RoadConstructorWeb_v.03 - homepage hero secondary CTA colour match */
.hero-actions .btn-secondary {
    color: #041018;
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    border-color: transparent;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(57, 199, 255, 0.15);
}
.hero-actions .btn-secondary:hover,
.hero-actions .btn-secondary:focus-visible {
    color: #041018;
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    border-color: transparent;
}

/* RoadConstructorWeb_v.04 - main navigation button colour polish */
.site-nav a {
    color: var(--text);
    background: rgba(57, 199, 255, 0.12);
    border: 1px solid rgba(109, 241, 255, 0.20);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
    font-weight: 600;
}
.site-nav a:hover,
.site-nav a:focus-visible {
    color: #041018;
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    border-color: transparent;
}
.site-nav a.active {
    color: #041018;
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(255, 255, 255, 0.72);
    box-shadow: 0 10px 26px rgba(255, 255, 255, 0.12);
}
.site-nav a.active:hover,
.site-nav a.active:focus-visible {
    color: #041018;
    background: #ffffff;
    border-color: rgba(255, 255, 255, 0.85);
}


/* RoadConstructorWeb_v.05 - editable header brand icon */
.brand-image-mark {
    flex: 0 0 46px;
}

/* RoadConstructorWeb_v.07 - clearer animated panel border pass */
@property --rc-border-orbit {
    syntax: "<angle>";
    inherits: false;
    initial-value: 0deg;
}

@keyframes rcBorderOrbit {
    to { --rc-border-orbit: 360deg; }
}

.hero-card,
.panel,
.tool-card,
.sponsor-card,
.news-card,
.doc-group-panel,
.guide-section-card,
.guide-user-card,
.tutorial-card,
.article-panel,
.tool-detail-panel,
.tool-content-panel,
.login-card,
.stat-panel {
    --rc-panel-fill: linear-gradient(180deg, var(--panel), var(--panel-2));
    --rc-panel-border-flow: conic-gradient(
        from var(--rc-border-orbit),
        rgba(109, 241, 255, 0.76),
        rgba(57, 199, 255, 0.16) 14%,
        rgba(255, 255, 255, 0.18) 30%,
        rgba(57, 199, 255, 0.70) 50%,
        rgba(109, 241, 255, 0.12) 72%,
        rgba(109, 241, 255, 0.76)
    );
    border: 2px solid transparent !important;
    background: var(--rc-panel-fill) padding-box, var(--rc-panel-border-flow) border-box;
    animation: rcBorderOrbit 16s linear infinite;
}

.hero-card {
    --rc-panel-fill: #07111b;
    border-width: 2px !important;
    box-shadow: 0 0 0 1px rgba(109, 241, 255, 0.05), 0 18px 48px rgba(0, 0, 0, 0.24);
}
.tool-card,
.sponsor-card {
    --rc-panel-fill: linear-gradient(180deg, rgba(16, 35, 53, 0.95), rgba(8, 20, 31, 0.92));
}
.news-card,
.login-card {
    --rc-panel-fill: linear-gradient(180deg, var(--panel), var(--panel-2));
}

@media (prefers-reduced-motion: reduce) {
    .hero-card,
    .panel,
    .tool-card,
    .sponsor-card,
    .news-card,
    .doc-group-panel,
    .guide-section-card,
    .guide-user-card,
    .tutorial-card,
    .article-panel,
    .tool-detail-panel,
    .tool-content-panel,
    .login-card,
    .stat-panel {
        animation: none;
    }
}

/* RoadConstructorWeb_v.08 - thicker button and pill borders */
.site-nav a,
.btn,
.tag,
.filter-pill,
.nav-toggle,
.rc-editor-toolbar button {
    border-width: 2px !important;
}

.site-nav a {
    border-color: rgba(109, 241, 255, 0.36);
}
.site-nav a:hover,
.site-nav a:focus-visible {
    border-color: rgba(109, 241, 255, 0.82);
}
.site-nav a.active {
    border-color: rgba(255, 255, 255, 0.95);
}

.btn-primary {
    border-color: rgba(186, 249, 255, 0.58);
}
.btn-secondary {
    border-color: rgba(109, 241, 255, 0.36);
}
.btn-danger {
    border-color: rgba(255, 105, 120, 0.42);
}
.btn:hover,
.btn:focus-visible {
    filter: brightness(1.04);
}
.hero-actions .btn-secondary,
.hero-actions .btn-secondary:hover,
.hero-actions .btn-secondary:focus-visible {
    border-color: rgba(186, 249, 255, 0.58);
}

.tag,
.filter-pill {
    border-color: rgba(109, 241, 255, 0.38);
    box-shadow: 0 0 0 1px rgba(109, 241, 255, 0.04) inset;
}
.tag.alt {
    border-color: rgba(255, 255, 255, 0.32);
}
.filter-pill.active {
    border-color: rgba(186, 249, 255, 0.72);
}
.rc-editor-toolbar button {
    border-color: rgba(109, 241, 255, 0.30);
}



/* RoadConstructorWeb_v.09 - news article body rich-text layout fix */
.article-copy,
.article-copy p,
.article-copy li,
.article-copy blockquote,
.article-copy h1,
.article-copy h2,
.article-copy h3,
.article-copy h4 {
    white-space: normal;
}
.article-copy p {
    max-width: none;
    margin: 0 0 20px;
}
.article-copy p:last-child {
    margin-bottom: 0;
}
.article-copy p:empty {
    display: none;
}
.article-copy img {
    margin: 16px 0 24px;
}
.article-copy > *:first-child {
    margin-top: 0;
}
.article-copy > * + * {
    margin-top: 18px;
}

/* RoadConstructorWeb_v.10 - news listing card layout fix */
.news-card.no-thumb {
    grid-template-columns: 1fr;
}
.news-card.no-thumb .news-card-body {
    width: 100%;
}
.news-card.no-thumb .news-card-body h2 {
    max-width: 980px;
}
.news-card.no-thumb .news-card-body p {
    max-width: 980px;
}
.news-card.no-thumb .text-link {
    display: inline-flex;
    margin-top: 10px;
}



/* RoadConstructorWeb_v.13 - manual Discord send controls and responsive mobile hero */
.discord-manual-panel {
    margin-top: 22px;
    padding: 18px;
    border-radius: 20px;
    border: 2px solid rgba(109, 241, 255, 0.24);
    background: rgba(6, 18, 30, 0.52);
}
.discord-manual-panel h3 {
    margin: 0 0 8px;
}
.discord-manual-panel .inline-actions {
    margin-top: 12px;
}
.btn:disabled,
.btn[disabled] {
    opacity: 0.48;
    cursor: not-allowed;
    filter: grayscale(0.25);
}

@media (max-width: 760px) {
    .hero-section {
        padding-top: 18px;
    }
    .hero-card {
        min-height: 0 !important;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        border-radius: 24px;
    }
    .hero-image {
        position: relative !important;
        inset: auto !important;
        display: block;
        width: 100%;
        height: auto !important;
        aspect-ratio: 2047 / 877;
        object-fit: contain !important;
        object-position: center center !important;
        background: #040b12;
    }
    .hero-overlay {
        display: none !important;
    }
    .hero-content {
        position: relative !important;
        inset: auto !important;
        width: 100% !important;
        max-width: none !important;
        padding: 24px 20px 26px !important;
        align-items: flex-start !important;
        text-align: left !important;
        gap: 14px;
        background: linear-gradient(180deg, rgba(7, 17, 27, 0.98), rgba(9, 24, 38, 0.96));
    }
    .hero-content h1 {
        font-size: clamp(1.9rem, 9vw, 2.75rem);
        line-height: 1.06;
    }
    .hero-copy {
        max-width: none;
    }
    .hero-actions {
        justify-content: flex-start !important;
        width: 100%;
    }
    .hero-actions .btn {
        flex: 1 1 100%;
        min-width: 0;
    }
}


/* RoadConstructorWeb_v.14 - editable homepage hero extra button */
.hero-extra-action {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    margin: 2px 0 0;
}
.btn-hero-extra {
    color: #041018;
    background: linear-gradient(135deg, #ffffff, var(--accent-2) 48%, var(--accent));
    border-color: rgba(186, 249, 255, 0.72) !important;
    font-weight: 800;
    min-height: 44px;
    padding: 0 22px;
    box-shadow: 0 10px 26px rgba(57, 199, 255, 0.18);
}
.btn-hero-extra:hover,
.btn-hero-extra:focus-visible {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

@media (max-width: 1040px) {
    .hero-extra-action {
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .hero-extra-action {
        justify-content: flex-start;
        width: 100%;
    }
    .btn-hero-extra {
        width: 100%;
    }
}

/* RoadConstructorWeb_v.15 - hero extra button alignment and pulse polish */
@keyframes rcHeroExtraPulse {
    0%, 100% {
        transform: translateY(0) scale(1);
        box-shadow: 0 10px 26px rgba(57, 199, 255, 0.20), 0 0 0 0 rgba(109, 241, 255, 0.30);
    }
    50% {
        transform: translateY(-1px) scale(1.018);
        box-shadow: 0 14px 34px rgba(57, 199, 255, 0.30), 0 0 0 8px rgba(109, 241, 255, 0.00);
    }
}

@media (min-width: 1041px) {
    .hero-content {
        gap: 12px;
        padding-top: 30px;
        padding-bottom: 30px;
    }
    .hero-content h1 {
        margin-bottom: 0;
    }
    .hero-copy {
        margin-bottom: 2px;
    }
    .hero-extra-action {
        justify-content: flex-end;
        width: 100%;
        margin: 10px 0 2px;
        padding-right: 0;
    }
    .hero-actions {
        width: 100%;
        justify-content: flex-end;
        align-items: center;
        gap: 12px;
        margin-top: 0;
    }
    .hero-actions .btn,
    .btn-hero-extra {
        min-height: 42px;
        line-height: 1;
    }
    .btn-hero-extra {
        min-width: 206px;
        padding: 0 24px;
    }
}

.btn-hero-extra {
    animation: rcHeroExtraPulse 2.6s ease-in-out infinite;
    will-change: transform, box-shadow;
}
.btn-hero-extra:hover,
.btn-hero-extra:focus-visible {
    animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
    .btn-hero-extra {
        animation: none;
    }
}

@media (max-width: 760px) {
    .hero-extra-action {
        margin: 4px 0 2px;
    }
    .btn-hero-extra {
        animation: none;
    }
}


/* RoadConstructorWeb_v.16 - move homepage hero CTAs below hero image */
.hero-below-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    width: min(920px, 100%);
    margin: 14px auto 0;
    padding: 0 10px;
}
.hero-below-actions .btn {
    min-height: 48px;
    padding: 0 26px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 10px 28px rgba(57, 199, 255, 0.17);
}
.hero-below-actions .btn-secondary,
.hero-below-actions .btn-secondary:hover,
.hero-below-actions .btn-secondary:focus-visible {
    color: #041018;
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    border-color: rgba(186, 249, 255, 0.58);
    font-weight: 800;
}
.hero-below-actions .btn-hero-extra {
    min-width: 210px;
}
@media (min-width: 1041px) {
    .hero-content {
        padding-bottom: 42px;
    }
}
@media (max-width: 760px) {
    .hero-below-actions {
        width: 100%;
        margin-top: 14px;
        padding: 0;
        gap: 10px;
    }
    .hero-below-actions .btn {
        flex: 1 1 100%;
        width: 100%;
        min-width: 0;
    }
}


/* RoadConstructorWeb_v.18 - controllable news article featured image sizing */
.article-image {
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.20);
}
@media (max-width: 720px) {
    .article-image {
        max-width: 100%;
    }
    .article-image img {
        max-height: min(var(--news-featured-image-max-height, 360px), 58vh);
    }
}

/* v.20 WYSIWYG clean paste tools */
.rc-editor-toolbar button:nth-child(1),
.rc-editor-toolbar button:nth-child(2) {
    border-color: rgba(109, 241, 255, 0.42);
    background: rgba(57, 199, 255, 0.13);
}
.rc-editor-toolbar button:nth-child(1):hover,
.rc-editor-toolbar button:nth-child(2):hover {
    border-color: rgba(109, 241, 255, 0.78);
    background: rgba(57, 199, 255, 0.22);
}
.rc-clean-paste-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(1, 8, 14, 0.78);
    backdrop-filter: blur(8px);
}
.rc-clean-paste-dialog {
    width: min(760px, 100%);
    border: 2px solid rgba(109, 241, 255, 0.42);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(12, 31, 46, 0.98), rgba(4, 13, 21, 0.98));
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
    padding: 22px;
}
.rc-clean-paste-dialog h3 {
    margin: 0 0 8px;
    color: var(--text);
}
.rc-clean-paste-dialog p {
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.55;
}
.rc-clean-paste-dialog textarea {
    width: 100%;
    min-height: 280px;
    resize: vertical;
    border: 2px solid rgba(109, 241, 255, 0.22);
    border-radius: 16px;
    background: rgba(0, 8, 14, 0.9);
    color: var(--text);
    padding: 14px;
    line-height: 1.55;
    font: inherit;
}
.rc-clean-paste-dialog textarea:focus {
    outline: none;
    border-color: rgba(109, 241, 255, 0.65);
    box-shadow: 0 0 0 3px rgba(57, 199, 255, 0.18);
}
.rc-clean-paste-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
}
.rc-clean-paste-actions button {
    border: 2px solid rgba(109, 241, 255, 0.34);
    border-radius: 999px;
    background: rgba(12, 49, 68, 0.9);
    color: var(--text);
    padding: 10px 16px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}
.rc-clean-paste-actions button[data-action="insert"] {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #041017;
    border-color: rgba(255,255,255,0.55);
}
.rc-clean-paste-actions button:hover {
    transform: translateY(-1px);
}

/* v.21 WYSIWYG paste paragraph spacing polish */
.rc-editor-area p,
.rc-editor-area ul,
.rc-editor-area ol {
    margin: 0 0 1rem;
}
.rc-editor-area h2,
.rc-editor-area h3 {
    margin: 1.2rem 0 0.7rem;
}
.rich-copy p {
    margin: 0 0 1rem;
}
.rich-copy ul,
.rich-copy ol {
    margin-top: 0.4rem;
    margin-bottom: 1rem;
}

/* RoadConstructorWeb_v.23 - tool guide page tabs / admin guide sections */
.tool-guide-tabs {
    display: grid;
    gap: 22px;
}

.tool-guide-tab-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: flex-start;
    padding: 14px;
    border: 2px solid rgba(109, 241, 255, 0.22);
    border-radius: 24px;
    background: rgba(6, 17, 28, 0.64);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.18);
}

.tool-guide-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border: 2px solid rgba(109, 241, 255, 0.28);
    border-radius: 999px;
    background: rgba(12, 30, 47, 0.92);
    color: var(--text);
    font-weight: 800;
    font-size: 0.95rem;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.tool-guide-tab:hover,
.tool-guide-tab:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(109, 241, 255, 0.86);
    color: #ffffff;
}

.tool-guide-tab.active {
    border-color: rgba(255, 255, 255, 0.9);
    background: linear-gradient(135deg, rgba(57, 199, 255, 0.95), rgba(109, 241, 255, 0.78));
    color: #05111c;
    box-shadow: 0 14px 34px rgba(57, 199, 255, 0.24);
}

.tool-guide-tab-panels {
    display: grid;
    gap: 22px;
}

.tool-guide-tabs.js-tabs-ready .tool-tab-panel {
    display: none;
}

.tool-guide-tabs.js-tabs-ready .tool-tab-panel.active {
    display: block;
}

.tool-tab-panel {
    scroll-margin-top: 110px;
}

.guide-section-admin-panel h3 {
    margin: 0 0 12px;
    color: var(--accent-2);
}

.admin-section-divider {
    height: 1px;
    margin: 22px 0;
    background: linear-gradient(90deg, transparent, rgba(109, 241, 255, 0.42), transparent);
}

@media (max-width: 700px) {
    .tool-guide-tab-list {
        display: grid;
        grid-template-columns: 1fr;
    }

    .tool-guide-tab {
        width: 100%;
        justify-content: flex-start;
    }
}
