.test-site-banner {
  margin: 0;
  padding: 0.75em 1.25em;
  background-color: #ffeb3b;
  color: #1a1a1a;
  border-bottom: 2px solid #f9a825;
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
}

.test-site-banner code {
  background-color: rgba(0, 0, 0, 0.08);
  color: inherit;
}

.md-grid {
  max-width: initial;
}

@font-face {
  font-family: 'Intel One Mono';
  src: url('../fonts/IntelOneMono/IntelOneMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

.cheatsheet-section {
    margin-bottom: 2em;
}

#searchInput {
    width: 100%;
    font-size: 16px;
    padding: 12px 20px;
    margin-bottom: 24px;
    border: 1px solid var(--md-default-fg-color--lighter);
    border-radius: 4px;
    background-color: var(--md-default-bg-color);
    color: var(--md-default-fg-color);
}

.cheatsheet-grid {
    display: grid;
    grid-template-columns: auto auto auto;
    gap: 1em;
    align-items: stretch;
    margin-bottom: 1em;
}

.cheatsheet-grid div, .cheatsheet-grid pre {
    background-color: var(--md-code-bg-color);
    padding: 0.5em;
    border-radius: 5px;
    overflow-x: auto;
}

/* Downloads page: platform tables */
#download-links table {
    border-collapse: collapse;
    margin-bottom: 1.5em;
    width: 100%;
}
#download-links table th,
#download-links table td {
    border: 1px solid var(--md-default-fg-color--lightest, #eee);
    padding: 0.4em 0.75em;
    text-align: left;
}
#download-links table th {
    background-color: var(--md-default-fg-color--lightest, #eee);
}
#download-links table tbody tr:hover {
    background-color: var(--md-default-fg-color--lightest, #fafafa);
}
#download-links h4 { margin-top: 1em; }
#download-links h4:first-of-type { margin-top: 0; }
#download-links .downloads-repo-note { margin: 0.25em 0 0.75em 0; opacity: 0.9; }

/* Homepage hero download CTA */
#hero-download {
    margin: 1.25em 0 1.5em 0;
    padding: 1.25em 1.5em;
    border-radius: 0.5em;
    background-color: var(--md-code-bg-color);
    border: 1px solid var(--md-default-fg-color--lightest, #eee);
}
.hero-download-version {
    margin: 0 0 0.75em 0;
    opacity: 0.9;
}
.hero-download-actions {
    margin: 0 0 0.5em 0;
}
.hero-download-button {
    font-size: 1.05em;
}
.hero-download-file {
    margin: 0;
    font-size: 0.85em;
    opacity: 0.75;
    font-family: var(--md-code-font, monospace);
}
.hero-download-error,
.download-links-error {
    margin: 0;
}

.hero-download-loading,
.download-links-loading {
    margin: 0;
    opacity: 0.85;
    font-style: italic;
}
.download-links-fallback p {
    margin: 0 0 0.75em 0;
}
.download-links-fallback p:last-child {
    margin-bottom: 0;
}

.download-noscript-note {
    margin: 0.75em 0 0 0;
    padding: 0.75em 1em;
    border-left: 0.2em solid var(--md-accent-fg-color, #526cfe);
    background-color: var(--md-default-fg-color--lightest, #f5f5f5);
    font-size: 0.9em;
    opacity: 0.95;
}

/* Homepage hero: tagline as the title, text left and animation right */
.md-typeset .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: start;
    margin-bottom: 1.5rem;
}
@media screen and (max-width: 45em) {
    .md-typeset .hero { grid-template-columns: 1fr; gap: 1rem; }
}
.md-typeset .hero-text > :first-child { margin-top: 0; }
.md-typeset h1.hero-title {
    margin: 0 0 1.2rem 0;
    font-size: 1.9em;
    line-height: 1.25;
    font-weight: 400;
    letter-spacing: normal;
    color: var(--md-default-fg-color--light);
}
.md-typeset .hero-text > p:first-of-type {
    font-size: 1.1em;
}
.md-typeset .hero-media img {
    display: block;
    width: 100%;
    border-radius: 0.3rem;
    box-shadow: var(--md-shadow-z2);
}
.md-typeset .hero-secondary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5em 1em;
    margin: 0;
}
.md-typeset .hero-secondary .md-button { margin: 0; }
.md-typeset .hero-secondary-links { opacity: 0.85; }
.md-typeset .hero .hero-download { margin-top: 0; }

/* Homepage: feature cards with screenshots (one <div class="feature-card"> each),
   three per row on wide screens, images shown whole */
.md-typeset .feature-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    margin: 1em 0;
}
.md-typeset .feature-card {
    padding: 0 0.8rem 0.6rem 0.8rem;
    border: 0.05rem solid var(--md-default-fg-color--lightest);
    border-radius: 0.2rem;
    overflow: hidden;
}
.md-typeset .feature-card > p:first-child {
    margin: 0 -0.8rem 0.6rem -0.8rem;
}
.md-typeset .feature-card img {
    display: block;
    width: 100%;
    height: 10rem;
    object-fit: contain;          /* show the whole picture, no cropping */
    object-position: center;
    padding: 0.4rem;
    box-sizing: border-box;
    background-color: #ffffe5;
}
.md-typeset .feature-card h3 {
    margin: 0 0 0.5em 0;
    font-size: 1em;
    font-weight: 700;
    letter-spacing: normal;
}
.md-typeset .feature-card > p:last-child > a:only-child::before {
    content: "→ ";
}
@media screen and (max-width: 60em) {
    .md-typeset .feature-cards { grid-template-columns: repeat(2, 1fr); }
}
@media screen and (max-width: 30em) {
    .md-typeset .feature-cards { grid-template-columns: 1fr; }
}
/* Homepage: comparison table, highlight the PythonSCAD column */
.compare-table th:last-child,
.compare-table td:last-child {
    background-color: rgba(83, 109, 254, 0.08);
}
.compare-table th:last-child {
    color: var(--md-primary-fg-color);
}
[data-md-color-scheme="slate"] .compare-table th:last-child {
    color: var(--md-accent-fg-color);
}
[data-md-color-scheme="slate"] .compare-table th:last-child,
[data-md-color-scheme="slate"] .compare-table td:last-child {
    background-color: rgba(83, 109, 254, 0.15);
}

/* Homepage: "Made for real workflows" as a compact, full-width list */
.md-typeset .workflow-table .md-typeset__table {
    display: block;
    width: 100%;
}
.md-typeset .workflow-table table:not([class]) {
    display: table;
    width: 100%;
    border: none;
    font-size: 0.75rem;
}
.md-typeset .workflow-table table:not([class]) thead {
    display: none;
}
.md-typeset .workflow-table table:not([class]) td {
    padding: 0.6em 1em;
    vertical-align: baseline;
    border-top: 0.05rem solid var(--md-default-fg-color--lightest);
}
.md-typeset .workflow-table table:not([class]) tr:first-child td {
    border-top: none;
}
.md-typeset .workflow-table table:not([class]) td:first-child {
    width: 16em;
    font-weight: 600;
}
.md-typeset .workflow-table td:first-child .twemoji {
    color: var(--md-primary-fg-color);
    margin-right: 0.4em;
}
[data-md-color-scheme="slate"] .md-typeset .workflow-table td:first-child .twemoji {
    color: var(--md-accent-fg-color);
}
.md-typeset .workflow-table td:last-child a {
    margin-left: 0.3em;
    white-space: nowrap;
}
.md-typeset .workflow-table td:last-child a::after {
    content: " →";
}
.md-typeset .workflow-table td:last-child a[target="_blank"]::after {
    content: "";
}
.md-typeset .workflow-table table:not([class]) tbody tr:hover {
    background-color: transparent;
    box-shadow: none;
}
@media screen and (max-width: 45em) {
    .md-typeset .workflow-table table:not([class]) tr,
    .md-typeset .workflow-table table:not([class]) td {
        display: block;
        width: auto;
    }
    .md-typeset .workflow-table table:not([class]) td {
        border-top: none;
        padding: 0.15em 0;
    }
    .md-typeset .workflow-table table:not([class]) tr {
        padding: 0.7em 0;
        border-top: 0.05rem solid var(--md-default-fg-color--lightest);
    }
    .md-typeset .workflow-table table:not([class]) tr:first-child {
        border-top: none;
    }
}

/* Homepage (sidebars hidden): keep a comfortable reading width on wide screens */
.md-content__inner:has(.hero) {
    max-width: min(68rem, calc(100% - 2.4rem));
    margin-left: auto;
    margin-right: auto;
}
@media screen and (max-width: 30em) {
    .md-typeset h1.hero-title { font-size: 1.5em; }
}
