
:root {
    --bg: #020617;
    --bg-soft: #050A1A;
    --bg-elevated: #0B1022;
    --accent: #f5b841;
    --accent-strong: #ffd46b;
    --accent-soft: rgba(245, 184, 65, 0.12);
    --text: #f9fafb;
    --muted: #9ca3af;
    --border: #1f2937;
    --danger: #f97373;
    --radius: 12px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #111827 0, #020617 55%, #000 100%);
    color: var(--text);
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--accent-strong);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

header {
    border-bottom: 1px solid var(--border);
    background: rgba(3, 7, 18, 0.92);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.topbar {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0.8rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-

.logo {
    font-weight: 700;
    letter-spacing: 0.06em;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.logo-text {
    font-size: 1.1rem;
    line-height: 1;
}

.logo span {
    color: var(--accent);
}

.tagline {
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link-header {
    color: var(--muted);
    font-size: 0.9rem;
    transition: color 0.2s ease;
    text-decoration: none;
    padding: 0.4rem 0;
    border-bottom: 2px solid transparent;
}

.nav-link-header:hover {
    color: var(--accent-strong);
    text-decoration: none;
}

.nav-link-header.active {
    color: var(--accent-strong);
    border-bottom-color: var(--accent);
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.mobile-menu-btn:hover {
    background: rgba(15,23,42,0.9);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-menu.open {
    max-height: 500px;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.6rem;
    border-radius: 999px;
    border: 1px solid var(--accent);
    background: linear-gradient(135deg, var(--accent), #f97316);
    color: #111827;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 10px 26px rgba(0,0,0,0.6);
    
    transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.06s ease;
    max-width: 100%;
    text-align: center;
}

.btn-cta:hover {
    text-decoration: none;
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(0,0,0,0.7);
}

.hero-banner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.hero-link {
    display: block;
    margin-top: 1.5rem;
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(245, 184, 65, 0.3);
}

.hero-img {
    width: 100%;
    height: auto;
    display: block;
    border: 2px solid var(--border);
    border-radius: var(--radius);
}

.layout {
    max-width: 1240px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 2.5rem;
    flex: 1 0 auto;
}

.content {
    background: var(--bg-soft);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 1.75rem 1.6rem 2.2rem;
    width: 100%;
}

.author-block {
    background: var(--bg-elevated);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 1.5rem;
    margin-top: 2.5rem;
}

.author-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.author-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
}

.author-info h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--text);
}

.author-info p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.author-bio {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--muted);
    margin-bottom: 1rem;
}

.author-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(15,23,42,0.9);
    border: 1px solid var(--border);
    color: var(--accent-strong);
    transition: all 0.2s ease;
    text-decoration: none;
}

.social-link:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.post-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.toc {
    background: var(--bg-elevated);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 1.25rem;
    margin-bottom: 2rem;
}

.toc h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    color: var(--accent-strong);
}

.toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc li {
    margin-bottom: 0.4rem;
}

.toc a {
    color: var(--muted);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s ease;
    display: block;
    padding: 0.3rem 0;
}

.toc a:hover {
    color: var(--accent-strong);
    text-decoration: none;
    padding-left: 0.5rem;
}

.sidebar {
    display: none;
}

h1 {
    font-size: clamp(2rem, 3vw, 2.5rem);
    margin: 0 0 0.6rem;
}

h2 {
    font-size: 1.4rem;
    margin: 1.9rem 0 0.6rem;
}

h3 {
    font-size: 1.1rem;
    margin: 1.25rem 0 0.4rem;
}

p {
    font-size: 0.98rem;
    line-height: 1.7;
    margin: 0.45rem 0 0.75rem;
    color: #e5e7eb;
}

.intro-muted {
    color: var(--muted);
    font-size: 0.94rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(15,23,42,0.9);
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.8rem;
}

.pill strong {
    color: var(--accent-strong);
}

.grid-two {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 1.25rem;
    margin: 1.4rem 0 0.6rem;
}

.card-soft {
    background: var(--bg-elevated);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 1rem 1rem;
    font-size: 0.95rem;
}

.card-soft ul {
    margin: 0.25rem 0;
    padding-left: 1.1rem;
}

.card-soft li {
    margin-bottom: 0.3rem;
}

figure {
    margin: 0;
}

figure img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid var(--border);
    display: block;
    object-fit: cover;
    min-height: 280px;
}

figure figcaption {
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: var(--muted);
}

ul, ol {
    padding-left: 1.15rem;
}

li {
    margin-bottom: 0.35rem;
}

.note {
    font-size: 0.85rem;
    color: var(--muted);
}

.label {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    border: 1px solid var(--border);
    color: var(--muted);
    margin-bottom: 0.4rem;
}

.label.good {
    border-color: #16a34a;
    color: #bbf7d0;
}

.label.bad {
    border-color: var(--danger);
    color: #fecaca;
}

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

.table-wrapper {
    overflow-x: auto;
    margin: 1rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

th, td {
    border: 1px solid var(--border);
    padding: 0.5rem 0.6rem;
    text-align: left;
}

th {
    background: var(--bg-elevated);
}

footer {
    border-top: 1px solid var(--border);
    padding: 1.3rem 1.25rem 2rem;
    font-size: 0.8rem;
    color: var(--muted);
}

.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.footer-links a {
    color: var(--muted);
}

.footer-links a:hover {
    color: var(--accent-strong);
}

@media (max-width: 900px) {
    .nav-links {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
    }
    .mobile-menu {
        display: flex;
    }
    .author-header {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .content {
        padding: 1.4rem 1.1rem 2rem;
    }
    .topbar {
        padding: 0.6rem 1rem;
    }
    .logo-img {
        width: 40px;
        height: 40px;
    }
    .logo-text {
        font-size: 0.95rem;
    }
    .post-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}


/* === Typographic tuning === */
html {
    font-size: 17px;
}

@media (max-width: 640px) {
    html {
        font-size: 16px;
    }
}

h1 {
    font-size: clamp(2.2rem, 3.3vw, 2.8rem);
    line-height: 1.2;
}

h2 {
    font-size: clamp(1.5rem, 2.4vw, 2rem);
}

p {
    font-size: 1.02rem;
    line-height: 1.8;
}

/* === Header & navigation layout === */
header {
    border-bottom: 1px solid var(--border);
    background: rgba(3, 7, 18, 0.95);
    backdrop-filter: blur(18px);
    position: sticky;
    top: 0;
    z-index: 40;
}

.header-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.logo-img {
    width: 96px;
    height: 96px;
    object-fit: contain;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 1rem;
}

.main-nav a {
    color: var(--muted);
    text-decoration: none;
    padding: 0.45rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--accent-strong);
    border-bottom-color: var(--accent);
}

.hamburger {
    display: none;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.96);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--text);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

header .btn-cta {
    margin-left: 1rem;
    font-size: 0.95rem;
    padding-inline: 1.7rem;
}

/* === Layout with sidebar === */
.page-main {
    padding: 1.75rem 1.25rem 2.5rem;
}

.sidebar-wrapper {
    max-width: 1240px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 3.1fr) minmax(260px, 1.4fr);
    gap: 1.75rem;
    align-items: flex-start;
}

.content-wrapper {
    min-width: 0;
}

/* override old sidebar rule */
.sidebar {
    display: block;
    max-width: 340px;
    width: 100%;
    position: sticky;
    top: 96px;
}

.sidebar__box {
    background: var(--bg-elevated);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 1.4rem 1.5rem;
}

.sidebar .toc {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
}

.sidebar .toc h3,
.sidebar .toc .toc-title {
    margin-top: 0;
    margin-bottom: 0.9rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.sidebar .toc ul,
.sidebar .toc nav {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.sidebar .toc li,
.sidebar .toc a {
    font-size: 0.94rem;
}

.sidebar .toc a {
    display: block;
    padding: 0.25rem 0;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.15s ease, padding-left 0.15s ease;
}

.sidebar .toc a:hover {
    color: var(--accent-strong);
    padding-left: 0.3rem;
}

/* CTA block */
.cta-block {
    margin: 2rem 0 1.5rem;
    padding: 1.6rem 1.7rem;
    background: var(--bg-elevated);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.cta-block h2 {
    margin: 0 0 0.5rem;
    font-size: 1.35rem;
}

.cta-block p {
    margin: 0.3rem 0 0.8rem;
}

.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.9rem;
}

.cta-btn-primary,
.cta-btn-secondary,
.cta-btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.4rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
}

.cta-btn-primary {
    background: linear-gradient(135deg, var(--accent), #f97316);
    color: #111827;
    border-color: var(--accent);
    box-shadow: 0 10px 26px rgba(0,0,0,0.6);
}

.cta-btn-secondary {
    background: rgba(15,23,42,0.95);
    color: var(--accent-strong);
    border-color: var(--accent-soft);
}

.cta-btn-ghost {
    background: transparent;
    color: var(--muted);
    border-color: var(--border);
}

.cta-btn-primary:hover {
    transform: translateY(-1px);
}

.cta-btn-secondary:hover,
.cta-btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent-strong);
}

/* Responsive tweaks */
@media (max-width: 1024px) {
    .sidebar-wrapper {
        grid-template-columns: minmax(0, 1.8fr) minmax(240px, 1.2fr);
        gap: 1.25rem;
    }

    .logo-img {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 900px) {
    .sidebar-wrapper {
        display: block;
    }

    .sidebar {
        position: static;
        max-width: none;
        margin-top: 1.25rem;
    }

    .header-container {
        gap: 0.75rem;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        right: 1.25rem;
        left: 1.25rem;
        margin-top: 0.5rem;
        padding: 0.75rem 1rem;
        background: var(--bg-elevated);
        border-radius: var(--radius);
        border: 1px solid var(--border);
        box-shadow: 0 20px 40px rgba(0,0,0,0.85);
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
        display: none;
        z-index: 45;
    }

    .main-nav.active {
        display: flex;
    }

    .hamburger {
        display: inline-flex;
    }

    header .btn-cta {
        margin-left: auto;
        padding-inline: 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 640px) {
    .logo-img {
        width: 68px;
        height: 68px;
    }

    header .btn-cta {
        display: none;
    }

    .page-main {
        padding-inline: 1rem;
    }
}


/* Footer ratings / external checks */
.footer-ratings {
    margin-top: 0.9rem;
    font-size: 0.85rem;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.footer-ratings a {
    color: var(--muted);
    text-decoration: underline;
    text-decoration-style: dotted;
}

.footer-ratings a:hover {
    color: var(--accent-strong);
}

/* Extra mobile tuning */
body {
    max-width: 100%;
    overflow-x: hidden;
}

@media (max-width: 640px) {
    .content {
        padding: 1.25rem 1.1rem 1.8rem;
    }

    table {
        display: block;
        width: 100%;
        overflow-x: auto;
    }
}


/* Content images: full-width, centered, responsive */
.content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.1rem auto;
}

/* Highlighted image right after H1 */
.page-hero {
    margin: 1.2rem 0 1.6rem;
}


/* === Mobile refinements === */

/* Center article figures and limit width similar to reference layout */

.content figure,
.page-main figure {
    max-width: 100%;
    margin: 1.4rem auto;
}

.page-hero {
    margin: 1.2rem auto 1.6rem;
}

@media (max-width: 768px) {
  .header-left {
    flex: 1 1 100%;
    justify-content: space-between;
  }
  .main-nav {
    flex-wrap: wrap;
    justify-content: flex-start;
    row-gap: 0.25rem;
    column-gap: 1rem;
    font-size: 0.82rem;
  }
}

/* Strong centering for content images and figures on all devices */
.content figure,
.page-main figure {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}


.content figure img,
.page-main figure img {
    display: block;
    margin-left: auto;
    margin-right: auto;
}


@media (max-width: 768px) {
    .grid-two {
        grid-template-columns: minmax(0, 1fr);
    }
}


/* Stack grid-two blocks on mobile so image and text do not squeeze */
@media (max-width: 768px) {
    .grid-two {
        grid-template-columns: minmax(0, 1fr);
    }
}

}
}


@media (max-width: 768px) {
    .grid-two {
        grid-template-columns: minmax(0, 1fr);
    }
}


/* Homepage intro section: image should not be side-by-side on desktop */
#cosa-e-dolly {
    display: block;
}

#cosa-e-dolly > div {
    max-width: 100%;
    margin-bottom: 1.4rem;
}

#cosa-e-dolly figure {
    margin-top: 1.2rem;
    margin-bottom: 0.8rem;
}

#cosa-e-dolly img {
    width: 100%;
    height: auto;
    display: block;
}
