/* Center Markdown Tables (requires md_in_html extension) */
.center-table {
    text-align: center;
}

.md-typeset .center-table :is(td,th):not([align]) {
    /* Reset alignment for table cells */
    text-align: initial;
}

.md-typeset table:not([class]) {
    font-size: 0.78rem;
}

.md-typeset img {
    max-width: 100%;
    height: auto;
}
/* Wider content area */
.md-grid {
    max-width: 1600px;
}

/* Slightly smaller CKM matrix */
.ckm-matrix mjx-container {
    font-size: 95% !important;
}

/* Main page title */
.md-typeset h1 {
    font-weight: 500;
    letter-spacing: -0.025em;
    margin-bottom: 1.2rem;
}

/* Section titles */
.md-typeset h2 {
    font-weight: 500;
    border-bottom: 1px solid var(--md-default-fg-color--lightest);
    padding-bottom: 0.45rem;
    margin-top: 2.2rem;
    margin-bottom: 0.9rem;
}

.md-typeset h3 {
    font-weight: 500;
}

/* Scientific tables */
.md-typeset table:not([class]) {
    border: 1px solid var(--md-default-fg-color--lightest);
    border-radius: 6px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}

.md-typeset table:not([class]) th {
    background-color: var(--md-code-bg-color);
    font-weight: 600;
}

.md-typeset table:not([class]) tbody tr:nth-child(even) {
    background-color: var(--md-code-bg-color);
}

.md-typeset table:not([class]) td {
    border-bottom: 1px solid var(--md-default-fg-color--lightest);
}

/* UTfit colour palette - light mode */
[data-md-color-scheme="default"] {
    --md-primary-fg-color: #245A81;
    --md-accent-fg-color: #245A81;
}

/* UTfit colour palette - dark mode */
[data-md-color-scheme="slate"] {
    --md-primary-fg-color: #245A81;
    --md-accent-fg-color: #79B8E0;
}