:root {
    --font-family: 'Montserrat', sans-serif;
    --font-weight: 300;
    --link-color: #00aaff;
    --link-deco: none;
    --link-weight: 100;
    --letter-spacing: 0px;
    --behnke-basic-scale: 0.85;
    --fs-small: calc(0.75 * var(--behnke-smallest-font-size));
}

.hidden {
    display: none;
}

html, body, *  {
    font-family: var(--font-family);
    font-weight: var(--font-weight);
    letter-spacing: var(--letter-spacing);; 
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

h1 {
	font-size: var(--behnke-header-font-size) !important;
	color: var(--behnke-design);
	margin: 2rem 0 1rem;
	padding-bottom: calc(0.25 * var(--behnke-basic));
	border-bottom: calc(0.1 * var(--behnke-basic)) solid var(--behnke-medium-gray);
	font-weight: 500;
}

h2 {
	font-size: var(--behnke-big-font-size);
	font-weight: 400;
	color: var(--behnke-black);
}

h3 {
	font-size: var(--behnke-bigger-font-size);
	font-weight: 300;
	color: var(--behnke-medium-black);
}

h4, h5, h6 {
    font-size: var(--behnke-medium-font-size);
}

strong {
	font-weight: 500;
	font-size: calc(1.075 * var(--behnke-normal-font-size));
}

a {
	color: var(--link-color);
	text-decoration: var(--link-deco);
	font-weight: var(--link-weight);
	transition: color 0.15s ease;
}

a:focus,
a:hover {
    color: var(--behnke-design);
}

p {
    font-size: var(--behnke-normal-font-size);
	margin-bottom: var(--behnke-normal-font-size);
    font-family: var(--font-family);
    font-weight: var(--font-weight);
    letter-spacing: var(--letter-spacing);
}

/*
 *  Design of Table Elements
 */

table {
    border-collapse: collapse;
    width: auto;
    max-width: 100%;
    background-color: transparent;
    font-size: calc(0.9 * var(--behnke-normal-font-size));
}

thead {
    background-color: transparent;
    text-align: left;
}

thead th {
    padding: calc(0.4 * var(--behnke-basic)) calc(0.75 * var(--behnke-basic));
    font-weight: 600;
    color: var(--behnke-design);
    border-bottom: 2px solid var(--behnke-design);
}

tbody tr {
    border-bottom: 1px solid var(--behnke-medium-gray);
    transition: background-color 0.15s ease-in-out;
}

tbody tr:hover {
    background-color: var(--behnke-hover);
}

tbody td {
    padding: calc(0.4 * var(--behnke-basic)) calc(0.75 * var(--behnke-basic));
    vertical-align: top;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 640px) {
    thead {
        display: none;
    }

    tbody td {
        display: block;
        text-align: right;
        position: relative;
    }

    tbody td::before {
        content: attr(data-label);
        float: left;
        text-transform: uppercase;
    }

    tbody tr {
        margin-bottom: calc(2 * var(--behnke-basic));
        display: block;
        border-bottom: 2px solid #e5e7eb;
    }
}

/* ── Page footer (feedback + related + prev/next + meta bar) ───────────── */

/* On a short article the trailing block (feedback widget, related links,
   prev/next, meta bar) would otherwise float in the middle of a half-empty
   viewport. Make .wiki-main a flex column when this footer is present and
   push the footer to the very bottom of the scroll container, so the meta
   line always sits in the last row of the page. Mirrors the home-hint
   pattern in WikiHome.css; scoped via :has() so other pages are untouched. */
.wiki-main:has(> .wiki-page-footer) {
    display: flex;
    flex-direction: column;
}

/* The page footer groups everything below the article body — feedback,
   related pages, prev/next and the meta line — into one cohesive band, the
   way most wikis close out a page. `margin-top: auto` pins it to the bottom
   of the scroll container on short pages; the top border marks where the
   article ends and the footer chrome begins. The sections are spaced by a
   single `gap`, so each one drops its own top margin (below). */
.wiki-page-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: calc(1.75 * var(--behnke-basic));
    margin-bottom: var(--behnke-basic);
    padding: calc(1.75 * var(--behnke-basic));
    border: 1px solid var(--behnke-light-gray, #e5e7eb);
    border-radius: calc(1 * var(--behnke-basic));
    /* A subtle neutral footer surface that sets the whole closing block apart
       from the white article. Interactive elements (feedback, related and
       prev/next cards) sit on it as white cards; help text and the meta line
       read as plain footer chrome. */
    background: #f5f6f8;
}

.wiki-page-footer > * {
    margin-top: 0;
}

/* ── Page meta bar (last modified + views) ─────────────────────────────── */

.wiki-page-meta {
    display: flex;
    flex-wrap: wrap;
    gap: calc(0.75 * var(--behnke-basic));
    align-items: center;
    margin-top: calc(2.5 * var(--behnke-basic));
    padding-top: calc(0.75 * var(--behnke-basic));
    border-top: 1px solid #dcdfe4;
    font-size: 0.78rem;
    color: #6b7280;
}

.wiki-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
}

.wiki-meta-icon {
    flex-shrink: 0;
    vertical-align: middle;
    opacity: 0.7;
}

@media print {
    .wiki-page-meta { display: none; }
}
