body {
    font-family: system-ui, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-page);
    color: var(--text-primary);
}

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

a:visited {
    color: var(--text-nav-link);
}

.NavBar {
    background-color: var(--bg-nav);
    padding: 0.75em 1em;
    border-bottom: 2px solid var(--border-nav);
    text-align: center;
}

.NavBar a {
    color: var(--text-nav-link);
    text-decoration: none;
    margin: 0 0.75em;
    font-weight: bold;
}

.NavBar a:hover {
    text-decoration: underline;
}

.PageWrapper {
    max-width: 900px;
    margin: 2em auto;
    padding: 1em;
    background-color: var(--bg-card);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

.PagePanel {
    margin-bottom: 1.5em;
    padding: 1em;
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

/* The PHP the server is running (mg #759), right of the admin greeting. */
.PagePanel .PhpVersion {
    float: right;
}

.fix {
    font-size: 0.85em;
    text-align: right;
    color: var(--text-muted);
}

.OmgAlertBanner {
    background-color: var(--alert-warn-bg);
    border: 1px solid var(--alert-warn-border);
    border-radius: 6px;
    padding: 1em 1.2em;
    margin-bottom: 1.5em;
    color: var(--alert-warn-text);
}

.OmgAlertBanner ul {
    margin: 0.5em 0 0.8em 0;
    padding-left: 1.4em;
}

.OmgAlertContext {
    font-weight: bold;
    font-size: 0.9em;
    font-family: monospace;
}

.OmgAlertTime {
    font-size: 0.85em;
    color: var(--alert-warn-text);
}

.OmgDismissButton {
    background-color: var(--alert-warn-border);
    border: 1px solid var(--alert-warn-border);
    border-radius: 4px;
    padding: 0.3em 0.9em;
    cursor: pointer;
    font-size: 0.9em;
    color: var(--text-primary);
}

.OmgDismissInline {
    display: inline;
    margin-left: 0.4em;
}

.OmgDismissOne {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1em;
    color: var(--alert-warn-text);
    padding: 0 0.3em;
    line-height: 1;
}

.OmgDismissOne:hover {
    color: var(--alert-warn-text);
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 1.5em 1.75em;
    margin-bottom: 1.5em;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-field {
    display: block;
    margin-bottom: 1.4em;
}

.form-row {
    display: flex;
    gap: 1.25em;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-bottom: 0;
}

.form-row > .form-field {
    flex: 1 1 220px;
    min-width: 0;
}

.form-row > .form-field select,
.form-row > .form-field input,
.form-row > .form-field textarea {
    max-width: none;
}

.form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5em;
    color: var(--text-primary);
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="password"],
.form-field textarea,
.form-field select {
    display: block;
    width: 100%;
    max-width: 640px;
    box-sizing: border-box;
    padding: 0.5em 0.6em;
    font-family: inherit;
    font-size: 1em;
    color: var(--text-primary);
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.form-field textarea {
    min-height: 8em;
    resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    outline: 2px solid var(--info);
    outline-offset: -1px;
    border-color: var(--info);
}

.form-actions {
    margin-top: 1.5em;
    display: flex;
    gap: 0.75em;
    align-items: center;
}

.issue-date {
    color: var(--text-faint);
    font-size: 0.85em;
    font-variant-numeric: tabular-nums;
    margin-left: 0.5em;
}

.issue-priority {
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.1em 0.5em;
    border-radius: 3px;
    font-weight: 600;
}

.issue-priority-low    { background-color: var(--border-light); color: var(--text-faint); }
.issue-priority-normal { background-color: var(--border-light); color: var(--text-secondary); }
.issue-priority-high   { background-color: var(--alert-warn-bg, #fee); color: var(--alert-warn-text, #900); }

.sub-issue-count {
    color: var(--text-faint);
    font-weight: normal;
    font-size: 0.8em;
}

.issue-parent {
    margin: 0 0 0.6em;
    font-size: 0.9em;
    color: var(--text-muted);
}

.issue-parent-status {
    color: var(--text-faint);
}

.sub-issue-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em 1.2em;
    margin-bottom: 0.8em;
    font-size: 0.9em;
    color: var(--text-muted);
}

.sub-issue-filter label {
    cursor: pointer;
}

.issue-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.issue-table th,
.issue-table td {
    text-align: left;
    padding: 0.4em 0.6em;
    border-bottom: 1px solid var(--border-light);
}

.issue-table td.issue-date {
    margin-left: 0;
    white-space: nowrap;
}

.sortable-table th button {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
}

.sortable-table th[aria-sort="ascending"] button::after  { content: " ▲"; }
.sortable-table th[aria-sort="descending"] button::after { content: " ▼"; }

.issue-table td.issue-subs {
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.issue-table tr.issue-row-closed td {
    color: var(--text-faint);
}

@media (max-width: 600px) {
    .issue-table .hide-narrow {
        display: none;
    }
}


/* /profile/devices/: one card per signed-in browser */
.DeviceList {
    list-style: none;
    margin: 1em 0;
    padding: 0;
}

.Device {
    margin-bottom: 0.75em;
    padding: 0.75em;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.Device.current {
    border-color: var(--text-nav-link);
}

.DeviceName {
    font-weight: bold;
}

/* The name is a link only so it can be clicked to rename; it should read as a name. */
.DeviceNameLink {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted var(--text-muted);
    cursor: text;
}

.DeviceNameLink:hover {
    border-bottom-style: solid;
    color: var(--text-nav-link);
}

.DeviceRename {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5em;
    align-items: center;
    font-weight: normal;
}

/* An author display rule beats the browser's [hidden] rule, so restate it. */
.DeviceRename[hidden] {
    display: none;
}

.DeviceRename input[type="text"] {
    width: 18em;
    max-width: 100%;
    padding: 0.3em 0.5em;
    font-size: 1em;
    color: var(--text-primary);
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.DeviceRenameCancel {
    font-size: 0.9em;
    color: var(--text-muted);
}

.DeviceBadge {
    margin-left: 0.5em;
    padding: 0.1em 0.5em;
    font-size: 0.8em;
    font-weight: normal;
    color: var(--text-on-accent);
    background-color: var(--text-nav-link);
    border-radius: 4px;
}

.DeviceMeta {
    margin: 0.25em 0 0.5em;
    font-size: 0.9em;
    color: var(--text-muted);
}

/* DreamHost inventory (mg #775): notes about what layer 2 could add. */
.L2Note {
    margin: 1em 0 0.5em;
    padding: 0.6em 1em;
    border: 2px dashed var(--border-color);
    border-radius: 6px;
    background: var(--bg-muted);
    font-size: 0.9em;
}

.L2Note::before {
    content: "Layer 2 possibility (a note, not built)";
    display: block;
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.L2Mock {
    opacity: 0.8;
}

/* Site standards: which sites have done each written-up step. Calm on
   purpose. The only marks are a checkmark, an info circle and a face. */
/* Each block is a row of tiles, each only as wide as its summary, so the
   board does not spend a full line on a few words. An open site takes the
   whole line, since its step table needs the room. */
.StdBlock {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.4em;
    min-height: 2.4em;
    margin: 0.2em 0 0.4em;
}

.StdItem {
    display: flex;
    align-items: flex-start;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: var(--bg-card);
}

.StdItem:has(> details[open]) {
    flex-basis: 100%;
}

.StdItem.sortable-ghost {
    opacity: 0.4;
}

.StdHandle {
    padding: 0.4em 0.1em 0.4em 0.4em;
    color: var(--text-muted);
    cursor: grab;
    user-select: none;
}

.StdEmpty {
    margin: 0.4em 0;
    color: var(--text-muted);
    font-size: 0.9em;
}

.StdBlock:has(> .StdItem) > .StdEmpty {
    display: none;
}

.StdOrderNote {
    margin: 0.2em 0;
    color: var(--text-muted);
}

.StdSite {
    flex: 1;
    padding: 0.4em 0.8em 0.4em 0.3em;
}

.StdSite > summary {
    cursor: pointer;
}

.StdMark {
    display: inline-block;
    width: 1.4em;
    text-align: center;
}

.StdMark--check {
    color: var(--success);
    font-weight: bold;
}

.StdMark--info {
    color: var(--info);
}

.StdSummary,
.StdNote {
    margin-left: 0.6em;
    color: var(--text-muted);
    font-size: 0.9em;
}

/* The steps that are Rob's to make: a paw print and a soft yellow, so his
   moves stand out from an agent's at a glance. A highlight, not a warning. */
.StdYours {
    padding: 0 0.3em;
    border-radius: 3px;
    background: #fff1a8;
    color: #3b3000;
    font-weight: bold;
}

[data-theme="dark"] .StdYours {
    background: #6b5a00;
    color: #fff8d6;
}

.StdSteps {
    margin: 0.6em 0 0.2em 1.4em;
    border-collapse: collapse;
}

.StdSteps th {
    padding: 0.15em 1.2em 0.15em 0;
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
    font-weight: normal;
    color: var(--text-muted);
}

.StdSteps td {
    padding: 0.15em 0;
    vertical-align: top;
}

.StdTick {
    display: inline-block;
    width: 1.2em;
    color: var(--success);
}

.StdWhy,
.StdHowTo {
    margin: 0.2em 0 0.4em 1.2em;
    font-size: 0.9em;
}

.StdWhy p {
    margin: 0.2em 0;
}

.StdFoot {
    margin: 0.4em 0 0 1.4em;
    color: var(--text-muted);
}

.StdHost {
    margin: 0.8em 0 0.2em;
    font-size: 0.95em;
    font-weight: normal;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

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