/* --- Global & Typography (Mobile-First) --- */
:root {
    --brand-dark: #1e1e1e;
    --brand-light: #cccccc;
    --brand-green: #388E3C; /* accessible green */
    --brand-green-hover: #2E7D32; /* A darker shade for hover */
    --brand-gray: #3a3a3a;
    --brand-darker: #0d0d0d;
}
body { background-color: var(--brand-dark); color: var(--brand-light); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; line-height: 1.7; margin: 0; padding: 0; }
body.nav-open { overflow: hidden; }
.container { padding: 0 20px; max-width: 800px; margin: 0 auto; }
h1, h2, h3 { color: var(--brand-green); border-bottom: 1px solid var(--brand-gray); padding-bottom: 8px; margin-top: 2em; line-height: 1.3; }
a { color: var(--brand-green); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--brand-green-hover); }
img { max-width: 100%; height: auto; }
.text-center { text-align: center; }

/* --- Keybinding Styles --- */
kbd { display: inline-block; background-color: #414868; color: #c0caf5; border: 1px solid #565f89; border-bottom: 2px solid #565f89; border-radius: 4px; padding: 3px 6px; font-family: 'Fira Code', 'Roboto Mono', monospace; font-size: 0.85em; font-weight: bold; line-height: 1; white-space: nowrap; box-shadow: 0 1px 1px rgba(0,0,0,0.2); }

/* --- Main Navigation --- */
.main-nav { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; background-color: #2a2a2a; border-bottom: 1px solid var(--brand-gray); }
.logo-link img { height: 32px; width: auto; vertical-align: middle; }
.nav-links { display: none; }
.menu-toggle { background: none; border: 1px solid var(--brand-gray); border-radius: 4px; padding: 8px; cursor: pointer; z-index: 1001; }
.menu-toggle .bar { display: block; width: 22px; height: 2px; background-color: var(--brand-light); margin: 4px 0; transition: all 0.3s ease-in-out; }
body.nav-open .menu-toggle .bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.nav-open .menu-toggle .bar:nth-child(2) { opacity: 0; }
body.nav-open .menu-toggle .bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* --- Mobile Overlay Menu --- */
.overlay-menu { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(30, 30, 30, 0.98); backdrop-filter: blur(10px); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 1000; transform: translateY(-100%); transition: transform 0.3s cubic-bezier(0.25, 0.1, 0.25, 1); }
body.nav-open .overlay-menu { transform: translateY(0); }
.overlay-menu a { color: var(--brand-light); font-size: 1.8em; font-weight: bold; margin: 20px 0; opacity: 0; transform: translateY(20px); transition: opacity 0.3s ease, transform 0.3s ease; }
body.nav-open .overlay-menu a { opacity: 1; transform: translateY(0); transition-delay: 0.2s; }

/* --- Code Blocks & Placeholders --- */
.code-block { position: relative; margin: 1.5em 0; }
pre { background-color: var(--brand-darker); border: 1px solid var(--brand-gray); border-radius: 4px; padding: 1.5em 1em 1em 1em; overflow-x: auto; font-family: 'Fira Code', 'Roboto Mono', monospace; font-size: 0.9em; }
code { background-color: #333333; padding: 3px 6px; border-radius: 4px; font-family: 'Fira Code', 'Roboto Mono', monospace; }
.copy-button { position: absolute; top: 10px; right: 10px; background-color: var(--brand-gray); color: var(--brand-light); border: none; padding: 5px 10px; border-radius: 4px; font-size: 0.8em; cursor: pointer; transition: background-color 0.2s ease; }
.copy-button:hover { background-color: var(--brand-green); }
.placeholder { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 200px; background-color: var(--brand-darker); border: 2px dashed var(--brand-gray); border-radius: 5px; margin: 2em 0; text-align: center; color: #777; /* Improved Contrast */ font-size: 0.9em; padding: 20px; box-sizing: border-box; }

/* --- CTA Button (Accessible & Interactive) --- */
.cta-button { display: inline-block; background-color: var(--brand-green); color: #ffffff; padding: 15px 30px; text-decoration: none; font-size: 1.1em; font-weight: bold; border-radius: 5px; margin-top: 20px; border: none; border-bottom: 3px solid var(--brand-green-hover); transition: all 0.15s ease-out; }
.cta-button:hover { background-color: var(--brand-green-hover); color: #ffffff; transform: translateY(-2px); text-decoration: none; border-bottom: 4px solid #1B5E20; }
.cta-button:active { transform: translateY(1px); border-bottom: 2px solid #1B5E20; transition: all 0.05s ease-in; }
/* --- Button Group for Multiple CTAs --- */
.button-group {
    display: flex;
    flex-wrap: wrap; /* Allows buttons to stack on mobile */
    gap: 15px; /* Creates consistent spacing between buttons */
    justify-content: center; /* Centers the buttons within the card */
    margin-bottom: 1em;
}

/* Make buttons in a group take up available space */
.button-group .cta-button {
    flex-grow: 1;
    margin-top: 0; /* Override the default top margin */
}

/* Secondary "Ghost" Button Style */
.cta-button--secondary {
    background-color: transparent;
    color: var(--brand-green);
    border: 2px solid var(--brand-green);
    border-bottom: 2px solid var(--brand-green); /* Remove 3D effect for flat design */
}

.cta-button--secondary:hover {
    background-color: var(--brand-green);
    color: #ffffff;
    border-color: var(--brand-green);
}

.cta-button--secondary:active {
    background-color: var(--brand-green-hover);
    border-color: var(--brand-green-hover);
    transform: translateY(0); /* No "push down" effect for ghost buttons */
}
/* --- Footer --- */
footer { text-align: center; padding: 40px 20px; margin-top: 60px; border-top: 1px solid var(--brand-gray); font-size: 0.9em; color: #999; /* Improved Contrast */ }
footer a { margin: 0 10px; }

/* --- Blog-Specific Styles --- */
.blog-posts article { border-bottom: 1px solid var(--brand-gray); padding-bottom: 1.5em; margin-bottom: 2em; }
.blog-posts h2 { border: none; margin-top: 0; margin-bottom: 0.2em; }
.blog-posts h2 a { color: var(--brand-light); }
.post-meta { font-size: 0.8em; color: #888; margin-top: 0; }
.community-card { background-color: var(--brand-darker); border: 1px solid var(--brand-gray); border-radius: 5px; padding: 1.5em; margin-bottom: 1.5em; text-align: left; }
.community-card h3 { margin-top: 0; border: none; }
.community-card p { margin-bottom: 1.5em; }

/* --- Desktop Styles --- */
@media (min-width: 768px) {
    body { font-size: 18px; }
    .menu-toggle { display: none; }
    .nav-links { display: flex; align-items: center; }
    .nav-links a { margin-left: 30px; }
    .logo-link img { height: 36px; }
}

/* Styles for the feature list */
.feature-category {
    margin-bottom: 2em;
}

.feature-list {
    list-style: none;
    padding-left: 0;
}

.feature-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--brand-gray);
}

.feature-list strong {
    color: var(--brand-light);
}

/* Styles specific to the cheatsheet tables */
.cheatsheet-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2em;
}

.cheatsheet-table th,
.cheatsheet-table td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid var(--brand-gray);
}

.cheatsheet-table th {
    color: var(--brand-light);
}

/* --- Definition List Styles for Taxonomies --- */
.definition-list dt { 
    font-weight: bold;
    color: var(--brand-light);
    margin-top: 1em;
}

.definition-list dd { 
    margin-left: 1.5em;
    padding-left: 1em;
    border-left: 2px solid var(--brand-gray);
}