* {
    box-sizing: border-box;
}

:root {
    color-scheme: light dark;
    --light: #fff;
    --lesslight: #efefef;
    --dark: #404040;
    --moredark: #000;
    --link: royalblue;
    border-top: 5px solid var(--dark);
    line-height: 1.5em;
    font-family: system-ui, sans-serif;
    font-size: 16px;
    color: var(--dark);
}

h1 {
    line-height: 1em;
}

button, input, textarea {
    font-size: 1em; /* Override browser default font shrinking*/
}

input {
    border: 1px solid var(--dark);
    background-color: var(--lesslight);
    border-radius: .25em;
    padding: .5em;
}

pre {
    background-color: var(--lesslight);
    margin: 0.5em 0 0.5em 0;
    padding: 0.5em;
    overflow: auto;
}

code {
    background-color: var(--lesslight);
}

blockquote {
    border-left: 0.25rem solid var(--dark);
    padding-left: 1rem;
}

body {
    background-color: var(--light);
    margin: 0;
    max-width: 800px;
    padding: 0 20px 20px 20px;
    margin-left: auto;
    margin-right: auto;
}

a {
    outline: none;
    color: var(--dark);
}

a:hover {
    text-decoration-color: var(--link);
}

img {
    max-width: 100%;
    height: auto;
}

button, .button, input[type=submit] {
    display: inline-block;
    background-color: var(--dark);
    color: var(--light);
    text-align: center;
    padding: .5em;
    border-radius: .25em;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.button a {
    text-decoration: none;
}

button:hover, .button:hover, input[type=submit]:hover {
    color: var(--lesslight);
    background-color: var(--moredark);
}

/* Add a margin between side-by-side buttons */
button + button, .button + .button, input[type=submit] + input[type=submit] {
    margin-left: 1em;
}

.center {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.breathe {
    margin-top: 3em;
}

input.center {
    display: block;
    margin-top: 1em;
}

.bordered {
    border: 3px solid;
}

.home {
    display: inline-block;
    background-color: var(--dark);
    color: var(--light);
    margin-top: 20px;
    padding: 5px 10px 5px 10px;
    text-decoration: none;
    font-weight: bold;
}


.revhistory {
  background-color: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  font-size: 0.875rem;
  color: #555;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Force override of inline styles from DocBook */
.revhistory > table[style] {
  border: none !important;
  border-style: none !important;
  border-width: 0 !important;
  border-color: transparent !important;
  border-collapse: collapse !important;
  background: none !important;
}

/* Reset all default styles and reapply clean layout */
.revhistory table {
  all: unset;
  display: table;
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  color: #555;
}

.revhistory th,
.revhistory td {
  text-align: left;
  padding: 0.25rem 0.5rem;
}

/* Remove border after version/date row */
.revhistory tr:nth-child(even) td {
  border-bottom: none;
}

/* Add border only after description row */
.revhistory tr:nth-child(odd) td {
  border-bottom: 1px solid #ddd;
}

.revhistory tr:first-child th {
    font-weight: 600;
    color: #333;
    padding: 0.25rem 0.5rem;
    border-bottom: 2px solid #ccc;
}

/* Header row styling */
.revhistory th {
  font-weight: 600;
  color: #333;
}

.variablelist .term {
    display: inline-block;
    background-color: #f2f2f2;
    font-weight: 500;
    font-size: 0.95rem;
    color: #2c3e50;
    padding: 0.25rem 0.5rem;
    margin: 0.25rem;
    border-radius: 6px;
}

/* Desktop sizes */
@media (min-width: 600px) {
    ol.twocol {
        column-count: 2;
    }
    
    .row {
        display: flex;
        flex-direction: row;
        padding: 0;
        width: 100%;
    }

    /* Make everything in a row a column */
    .row > * {
        display: block;
        flex: 1 1 auto;
        max-width: 100%;
        width: 100%;
    }

    .row > *:not(:last-child) {
        margin-right: 10px;
    }
}

/* Dark mode overrides (confusingly inverse) */
@media (prefers-color-scheme: dark) {
    :root {
        --light: #222;
        --lesslight: #333;
        --dark: #eee;
        --moredark: #fefefe;
    }
    /* This fixes an odd blue then white shadow on FF in dark mode */
    *:focus {
        outline: var(--light);
        box-shadow: 0 0 0 .25em var(--link);
    }
    .button a {
        color: var(--light);
    }
}

/* Printing */
@media print {
    .home {
        display: none;
    }
}
