/* The layout of the site. The colors are custom properties set by the theme
   (pycal_dashboard/theme.py): the pycal blue and yellow by default, changed with the
   COLOR_... settings (docs/reference/settings.rst). */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  background: var(--surface);
  color: var(--text);
}
a { color: var(--primary); }
a:hover { color: var(--primary-hover); }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
h1, h2, h3 { line-height: 1.2; overflow-wrap: anywhere; }  /* long names such as dashboard.pycal.org wrap on phones */
.wrap { max-width: 64rem; margin: 0 auto; padding: 0 1rem; }
.muted { color: var(--text-muted); }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: .5rem; background: var(--surface); padding: .5rem; z-index: 10; }

.nav { background: var(--nav); color: var(--nav-text); border-bottom: .3rem solid var(--accent); }
.nav-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding-top: .6rem; padding-bottom: .6rem; }
.nav a, .nav .link-button { color: var(--nav-text); text-decoration: none; }
.nav a:hover, .nav .link-button:hover { text-decoration: underline; color: var(--nav-text); }
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1.15rem; }
.menu { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; list-style: none; margin: 0; padding: 0; }
.menu form { margin: 0; }
.handle { opacity: .85; }
.link-button { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }

main.wrap { padding-top: 1.5rem; padding-bottom: 2rem; min-height: 60vh; }
.footer { border-top: 1px solid var(--border); background: var(--surface-tint); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; padding-top: 1rem; padding-bottom: 1rem; }
.table-wrap { overflow-x: auto; }
.footer small a { color: inherit; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem; list-style: none; margin: 0; padding: 0; }
/* The menu of the colors, like the switch of the documentation: a dropdown with icons, without JavaScript. */
.icon { display: inline-block; vertical-align: -.2em; flex: none; }
.theme-menu { position: relative; }
/* The menu of the account in the top bar, without JavaScript. */
.account-menu { position: relative; }
.account-menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .4rem; padding: .3rem .6rem; border: 1px solid color-mix(in srgb, var(--nav-text) 50%, transparent); border-radius: .4rem; color: var(--nav-text); }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary::after { content: "▾"; font-size: .8em; }
.account-menu summary:hover, .account-menu[open] summary { background: color-mix(in srgb, var(--nav-text) 18%, transparent); }
.account-menu ul { position: absolute; right: 0; top: calc(100% + .35rem); z-index: 20; min-width: 13rem; list-style: none; margin: 0; padding: .3rem; background: var(--surface); border: 1px solid var(--border); border-radius: .5rem; box-shadow: 0 .4rem 1.2rem rgba(0, 0, 0, .2); }
.nav .account-menu ul a, .account-menu ul button { display: flex; align-items: center; gap: .4rem; width: 100%; box-sizing: border-box; padding: .45rem .6rem; border: 0; border-radius: .3rem; background: none; color: var(--text); font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.nav .account-menu ul a:hover, .account-menu ul button:hover { background: var(--surface-tint); text-decoration: none; color: var(--text); }
.account-menu form { margin: 0; }
.account-menu .menu-heading { padding: .2rem .6rem; color: var(--text-muted); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
/* the heading links to the Django admin for staff: it keeps the look of a heading */
.nav .account-menu ul .menu-heading a { display: inline; width: auto; padding: 0; border-radius: 0; color: inherit; font: inherit; text-decoration: none; }
.nav .account-menu ul .menu-heading a:hover { background: none; color: var(--text); text-decoration: underline; }
.account-menu .separator { height: 1px; margin: .3rem .2rem; background: var(--border); }
.count { display: inline-block; min-width: 1.3em; padding: 0 .35em; border-radius: 1em; background: var(--accent); color: var(--accent-text); font-size: .8em; font-weight: 700; text-align: center; }
.github-link { display: inline-flex; align-items: center; gap: .35em; }
.github-link .github-mark { width: 1em; height: 1em; }
.github-user { display: inline-flex; align-items: center; gap: .35em; text-decoration: none; }
.github-user:hover span:first-of-type { text-decoration: underline; }
.avatar { border-radius: 50%; background: var(--surface-tint); flex: none; }
.github-link-icon { color: var(--text-muted); text-decoration: none; padding: .1em; border-radius: .25em; vertical-align: middle; }
.github-link-icon:hover, .github-link-icon:focus-visible { color: var(--primary); background: var(--surface-tint); }
h1 .github-link-icon .github-mark { width: .75em; height: .75em; }
.theme-menu summary { list-style: none; display: flex; align-items: center; padding: .3rem .45rem; border: 1px solid color-mix(in srgb, var(--nav-text) 50%, transparent); border-radius: .4rem; color: var(--nav-text); font-weight: 400; }
.theme-menu summary::-webkit-details-marker { display: none; }
.theme-menu summary:hover, .theme-menu[open] summary { background: color-mix(in srgb, var(--nav-text) 18%, transparent); }
.theme-menu summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-menu form { position: absolute; right: 0; top: calc(100% + .35rem); z-index: 20; display: flex; flex-direction: column; min-width: 11rem; padding: .3rem; background: var(--surface); border: 1px solid var(--border); border-radius: .5rem; box-shadow: 0 .4rem 1.2rem rgba(0, 0, 0, .2); }
.theme-menu button { display: flex; align-items: center; gap: .55rem; width: 100%; white-space: nowrap; padding: .45rem .6rem; border: 0; border-radius: .3rem; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.theme-menu button:hover, .theme-menu button:focus-visible { background: var(--surface-tint); }
.theme-menu button[aria-pressed="true"] { color: var(--primary); font-weight: 700; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: .5rem; padding: 1rem 1.25rem; margin: 0 0 1rem; }
.card.narrow { max-width: 32rem; margin: 2rem auto; }
.card h2:first-child, .card h1:first-child { margin-top: 0; }
.columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1rem; }
.hero { border-left: .4rem solid var(--accent); background: var(--surface-tint); padding: 1.25rem 1.5rem; border-radius: .5rem; margin-bottom: 1.5rem; }
.hero .lead { font-size: 1.15rem; }
.stats { color: var(--text-muted); margin-bottom: 0; }

.button {
  display: inline-block; padding: .5rem 1rem; border-radius: .4rem; border: 1px solid var(--primary);
  background: var(--primary); color: var(--surface); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.button:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--surface); }
.nav .button-accent, .button-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.nav .button-accent:hover { color: var(--accent-text); text-decoration: none; filter: brightness(.95); }
.button-small { padding: .2rem .6rem; font-size: .9rem; }
.button-quiet { background: transparent; color: var(--primary); }
.button-quiet:hover { color: var(--surface); }
form.inline { display: inline; }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: 1rem; }
input[type="email"], input:not([type]) { font: inherit; padding: .35rem .5rem; border: 1px solid var(--border); border-radius: .3rem; background: var(--surface); color: var(--text); }

.messages { margin-bottom: 1rem; }
.message { border-left: .3rem solid var(--primary); background: var(--surface-tint); padding: .6rem .9rem; border-radius: .3rem; }
.message-success { border-color: var(--success); }
.message-warning { border-color: var(--warning); }
.message-error { border-color: var(--danger); }
.error h1 { color: var(--danger); }

/* The pages of errors: the status large in the blue of the logo, underlined in its yellow. */
.status-page { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1rem 2.5rem; max-width: 52rem; margin: 2rem auto; padding: 1.5rem 1.75rem; background: var(--surface-tint); border-left: .4rem solid var(--accent); border-radius: .5rem; }
.status-page.error { border-left-color: var(--danger); }
.status-code { margin: 0; font-size: clamp(3.5rem, 12vw, 6rem); font-weight: 800; line-height: 1; color: var(--brand); letter-spacing: -.03em; border-bottom: .35rem solid var(--accent); }
.status-page.error .status-code { border-bottom-color: var(--danger); }
.status-text { flex: 1 1 20rem; min-width: 0; }
.status-text h1 { margin-top: 0; }
.status-text .lead { font-size: 1.1rem; }
.status-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.copy-details { margin: 1rem 0; }
.copy-details label { display: block; margin: .4rem 0; font-size: .9rem; }
textarea.copy { width: 100%; box-sizing: border-box; font: .85rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: .3rem; padding: .5rem; resize: vertical; }
form.stacked label { display: block; font-weight: 600; margin-bottom: .2rem; }
form.stacked input:not([type="hidden"]) { width: 100%; max-width: 26rem; box-sizing: border-box; }
form.stacked small { display: block; color: var(--text-muted); margin-top: .2rem; }
.status-help { color: var(--text-muted); font-size: .95rem; margin-bottom: 0; }
.detail code { white-space: pre-wrap; word-break: break-word; }

.badge { display: inline-block; font-size: .8rem; font-weight: 600; padding: .05rem .5rem; border-radius: 1rem; border: 1px solid currentColor; }
.badge-success { color: var(--success); }
.badge-warning { color: var(--warning); }
.badge-error { color: var(--danger); }
.badge.muted { color: var(--text-muted); }  /* optional: gray */
.badge-strong { color: var(--text); }  /* mandatory: black on light backgrounds */
.badges { display: inline-flex; flex-wrap: wrap; gap: .3rem; vertical-align: middle; font-weight: 400; }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: .4rem .5rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.list { padding-left: 1.2rem; }
.list.to-sign { padding-left: 0; }
.facts th { width: 8rem; white-space: nowrap; color: var(--text-muted); font-weight: 600; }
.list li { margin: .3rem 0; }
.steps li { margin: .4rem 0; }
/* a numbered list that is a card: room for the numbers inside its border */
ol.card, ul.card { padding-left: 2.75rem; }

@media (max-width: 40rem) {
  .table, .table tbody, .table tr, .table td { display: block; }
  .table thead { display: none; }
}

/* Policy pages keep long Markdown readable and choices usable without scripts. */
details { margin: .75rem 0; }
summary { cursor: pointer; font-weight: 600; }
input[type="radio"], input[type="checkbox"] { margin-right: .35rem; }
select { font: inherit; padding: .4rem; max-width: 100%; }

/* The dashboard: the numbers at the top, and lists of issues and pull requests. */
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: .2rem; text-underline-offset: .35rem; }
.lead { font-size: 1.1rem; }
.stats-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .75rem; list-style: none; padding: 0; margin: 0 0 1.5rem; }
.stats-tiles li { background: var(--surface-tint); border: 1px solid var(--border); border-top: .3rem solid var(--brand); border-radius: .5rem; padding: .75rem 1rem; color: var(--text-muted); }
.stats-tiles a { display: block; color: inherit; text-decoration: none; }
.stats-tiles a:hover strong { color: var(--primary-hover); }
.stats-tiles strong { display: block; font-size: 1.9rem; line-height: 1.1; color: var(--primary); }
.items { list-style: none; padding: 0; margin: 0; }
.item { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; padding: .55rem 0; border-bottom: 1px solid var(--border); }
.item:last-child { border-bottom: 0; }
.item-title { font-weight: 600; overflow-wrap: anywhere; }
.item-meta { flex: 1 1 100%; font-size: .9rem; }
.labels { display: inline-flex; flex-wrap: wrap; gap: .25rem; }
.label { display: inline-block; font-size: .78rem; padding: 0 .5rem; border-radius: 1rem; background: var(--surface-tint); border: 1px solid var(--border); color: var(--text); }
.badge-open, .badge-done, .badge-success { color: var(--success); }
.badge-draft, .badge-closed, .badge-ignored { color: var(--text-muted); }
.badge-merged { color: var(--merged); }
.badge-failed, .badge-refused { color: var(--danger); }
.empty { font-style: italic; }
.people { padding-left: 1.5rem; }
.people li { margin: .3rem 0; }
.pages { display: flex; gap: 1rem; align-items: center; margin: 1rem 0; }
.days { margin: 0; }
.days label { font-weight: 600; }
.card-title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.card-title h1, .card-title h2 { margin-top: 0; }
.facts-list { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; }
.facts-list dt { color: var(--text-muted); font-weight: 600; }
.facts-list dd { margin: 0; overflow-wrap: anywhere; }
label.check { display: block; font-weight: 400; margin: .25rem 0; }
.choice-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .75rem; }
label.choice { display: block; font-weight: 400; border: 1px solid var(--border); border-radius: .4rem; padding: .6rem .8rem; cursor: pointer; }
label.choice:has(input:checked) { border-color: var(--primary); background: var(--surface-tint); }
label.choice small { display: block; color: var(--text-muted); margin-top: .2rem; }
fieldset { border: 1px solid var(--border); border-radius: .4rem; padding: .5rem .8rem; }
pre.code { white-space: pre-wrap; background: var(--surface-tint); padding: .75rem; border-radius: .3rem; overflow-x: auto; }
.help-link { display: inline-flex; align-items: center; justify-content: center; margin-left: .25em; padding: .1em; border-radius: .25em; color: var(--primary); line-height: 1; text-decoration: none; vertical-align: -.1em; }
.help-link .book { width: 1.1em; height: 1.1em; }
.help-link:hover, .help-link:focus-visible { background: var(--surface-tint); color: var(--primary-hover); text-decoration: none; }
.log { list-style: none; padding: 0; display: grid; gap: .75rem; }
.log > li > p { margin: 0 0 .25rem; }
.addresses li { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.addresses .address { overflow-wrap: anywhere; font-weight: 600; }

/* projects: tabs of a project, the progress of an update, the forms */
.tabs { display: flex; flex-wrap: wrap; gap: .25rem 1rem; list-style: none; padding: 0; margin: 0 0 1rem; border-bottom: 1px solid var(--border); }
.tabs a { display: inline-block; padding: .4rem 0; text-decoration: none; }
.tabs a[aria-current="page"] { font-weight: 700; color: var(--text); border-bottom: .2rem solid var(--accent); }
.heading-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; }
.heading-row h1 { margin: .5rem 0; }
.progress { width: 100%; max-width: 32rem; height: 1rem; accent-color: var(--primary); }
.project-list { list-style: none; padding: 0; margin: 0; }
.project-list li { padding: .75rem 0; border-bottom: 1px solid var(--border); }
.project-list h2 { font-size: 1.15rem; margin: 0 0 .25rem; }
.project-list p { margin: .2rem 0; }
form.stacked textarea { width: 100%; max-width: 40rem; box-sizing: border-box; font: inherit; padding: .35rem .5rem; border: 1px solid var(--border); border-radius: .3rem; background: var(--surface); color: var(--text); }
form.stacked fieldset { border: 1px solid var(--border); border-radius: .3rem; }
.numeric { text-align: right; white-space: nowrap; }
.choices { list-style: none; padding: 0; columns: 18rem; }
.choices li { margin: .2rem 0; break-inside: avoid; }

/* the pull requests of a project: a table whose columns the checkboxes of "Display" show and hide
   with CSS alone; without the column Status, the colour of the first cell tells it */
.table-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; }
.table-head h2 { margin: 0; }
.per-page { display: flex; align-items: center; gap: .4rem; margin-left: auto; }
.columns-choice { margin: .75rem 0; }
.columns-choice summary { cursor: pointer; }
.columns-checks { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: .5rem 0 0; }
.columns-checks label.check { display: inline-flex; gap: .3rem; align-items: center; }
.pull-requests .col-link { width: 1%; white-space: nowrap; }
.pull-requests .col-number, .pull-requests .col-created { white-space: nowrap; }
.pull-requests .col-step { white-space: nowrap; }
.pull-requests .col-step img, .pull-badge img { display: block; height: 20px; width: auto; max-width: none; }
.pull-table:has(#column-status:not(:checked)) .col-status,
.pull-table:has(#column-title:not(:checked)) .col-title,
.pull-table:has(#column-step:not(:checked)) .col-step,
.pull-table:has(#column-organization:not(:checked)) .col-organization,
.pull-table:has(#column-repository:not(:checked)) .col-repository,
.pull-table:has(#column-number:not(:checked)) .col-number,
.pull-table:has(#column-creator:not(:checked)) .col-creator,
.pull-table:has(#column-created:not(:checked)) .col-created { display: none; }
/* the icon that links GitHub only while no title or number links the pull request */
.pull-table:has(#column-title:checked) .col-link,
.pull-table:has(#column-number:checked) .col-link { display: none; }
/* without the column of the status, the row starts with its color */
.pull-table:has(#column-status:not(:checked)) tr[data-status] { border-left: .3rem solid transparent; }
.pull-table:has(#column-status:not(:checked)) tr[data-status="open"] { border-left-color: var(--success); }
.pull-table:has(#column-status:not(:checked)) tr[data-status="merged"] { border-left-color: var(--merged); }
.pull-table:has(#column-status:not(:checked)) tr[data-status="closed"] { border-left-color: var(--danger); }
.pagination { display: flex; gap: 1rem; align-items: center; margin-top: 1rem; }

/* the proposals of a field, such as the people to share a project with */
.completion-field { position: relative; display: inline-block; }
.completion { position: absolute; z-index: 10; left: 0; top: 100%; min-width: 100%; max-height: 18rem; overflow-y: auto; margin: .2rem 0 0; padding: .25rem 0; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: .4rem; box-shadow: 0 .3rem 1rem rgba(0, 0, 0, .15); }
.completion li { display: flex; align-items: center; gap: .4rem; padding: .35rem .7rem; cursor: pointer; white-space: nowrap; }
.completion li[aria-selected="true"], .completion li:hover { background: var(--surface-tint); }

/* the update of a project, at the bottom of its overview */
.update-line { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-top: 1.5rem; padding-top: .75rem; border-top: 1px solid var(--border); font-size: .9rem; }

/* Markdown that people typed, and the field that edits it */
.markdown > :first-child { margin-top: 0; }
.markdown > :last-child { margin-bottom: 0; }
.markdown pre { overflow-x: auto; padding: .5rem .75rem; background: var(--surface-tint); border-radius: .3rem; }
.markdown blockquote { margin: .5rem 0; padding-left: .8rem; border-left: .25rem solid var(--border); color: var(--text-muted); }
.markdown-field { margin: 0 0 1rem; }
.markdown-field label { display: block; }
.markdown-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem; margin: .25rem 0; }
.markdown-bar markdown-toolbar { display: flex; flex-wrap: wrap; gap: .25rem; }
.markdown-bar button[aria-pressed="true"] { background: var(--surface-tint); }
.markdown-field textarea { width: 100%; }
.markdown-preview { min-height: 6rem; padding: .5rem .75rem; border: 1px solid var(--border); border-radius: .3rem; }

/* the red area that deletes an account */
.danger-zone { border: 2px solid var(--danger); background: var(--danger-bg); margin-top: 1.5rem; }
.danger-zone h2 { color: var(--danger); }
.button-danger { background: var(--danger); border-color: var(--danger); color: var(--surface); }
.button-danger:hover, .button-danger:focus-visible { background: var(--text); border-color: var(--text); color: var(--surface); }

/* a notice at the top of a page that can be clicked away, such as of failed updates */
.notice { position: relative; padding: .75rem 2.75rem .75rem 1rem; margin: 0 0 1rem; border-radius: .4rem; border: 1px solid var(--border); }
.notice h2 { font-size: 1.05rem; margin: 0 0 .4rem; }
.notice-error { border-color: var(--danger); background: var(--danger-bg); }
.notice-close { position: absolute; top: .4rem; right: .4rem; font-size: 1.2rem; line-height: 1; }

/* text only for screen readers, such as the header of a column of icons */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* hidden means hidden, also for elements whose class sets their display, such as buttons */
[hidden] { display: none !important; }

/* the columns of conditions of the table of pull requests: their menus, results and states */
.pull-requests .col-condition { white-space: nowrap; }
.pull-requests th.col-condition[draggable="true"] { cursor: grab; }
.pull-requests th.col-condition.dragged-over { outline: 2px dashed var(--primary); }
.pull-requests .col-add { width: 1%; position: sticky; right: 0; background: var(--surface); }  /* + stays in reach */
.pull-requests th.col-condition { vertical-align: bottom; position: relative; }  /* holds its text for screen readers */
.condition-head { display: block; white-space: nowrap; font-weight: 600; }
.condition-tools { display: flex; align-items: center; gap: .2rem; margin-top: .2rem; }
.icon-button { display: inline-flex; align-items: center; padding: .15rem .3rem; }
.icon.gear { width: 1rem; height: 1rem; }
.toggle { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6rem; height: 1.6rem; border: 1px solid var(--border); border-radius: .3rem; font-weight: 700; text-decoration: none; color: var(--text-muted); background: var(--surface); opacity: .55; }
.toggle[aria-pressed="true"] { opacity: 1; }
.toggle-yes[aria-pressed="true"] { color: var(--success); border-color: var(--success); background: var(--success-bg); }
.toggle-no[aria-pressed="true"] { color: var(--danger); border-color: var(--danger); background: var(--danger-bg); }
.label-chip.label-absent { text-decoration: line-through; }
.column-menu { display: inline-block; position: static; margin: 0; }
.column-menu > summary { list-style: none; }
.column-menu > summary::-webkit-details-marker { display: none; }
.column-menu[open] > .menu-panel { position: fixed; z-index: 20; left: 50%; top: 4rem; transform: translateX(-50%); width: min(26rem, calc(100vw - 2rem)); max-height: calc(100vh - 6rem); overflow-y: auto; padding: 1rem; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: .5rem; box-shadow: 0 .5rem 2rem rgba(0, 0, 0, .25); font-weight: 400; text-align: left; white-space: normal; }
.condition-form fieldset { margin: 0 0 .75rem; }
.condition-form .choice-row { display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.condition-form input[name="label"] { width: 100%; }
.group-fields { display: none; }
.condition-form:has(.group-select option[value="labels"]:checked) .fields-labels,
.condition-form:has(.group-select option[value="branch"]:checked) .fields-branch,
.condition-form:has(.group-select option[value="ci"]:checked) .fields-ci,
.condition-form:has(.group-select option[value="status"]:checked) .fields-status,
.condition-form:has(.group-select option[value="reviews"]:checked) .fields-reviews,
.condition-form:has(.group-select option[value="author"]:checked) .fields-author { display: block; }
.menu-close { float: right; margin: -.4rem -.4rem .4rem .5rem; font-size: 1.2rem; line-height: 1; }
.menu-actions { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin: .5rem 0 0; padding-top: .5rem; border-top: 1px solid var(--border); }
/* a checkbox that looks like a switch, on or off */
/* the switch of the site, one partial (_switch.html) everywhere: on and off, with a thick border
   that only changes its color, so that the knob stays in place */
label.switch { display: flex; align-items: center; gap: .6rem; margin: .45rem 0; cursor: pointer; }
label.switch input { appearance: none; box-sizing: border-box; position: relative; flex: none; width: 3.2rem; height: 1.8rem; margin: 0; border: 3px solid var(--text-muted); border-radius: 1rem; background: var(--surface-tint); cursor: pointer; transition: background .15s, border-color .15s; }
label.switch input::after { content: ""; position: absolute; top: calc(50% - .6rem); left: .15rem; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--text-muted); transition: left .15s, background .15s; }
label.switch input:checked { background: var(--success); border-color: var(--text); }
label.switch input:checked::after { left: calc(100% - 1.35rem); background: var(--surface); }
label.switch input:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
/* also in a form of fields one below the other, whose labels and fields are wider */
form.stacked label.switch { display: flex; font-weight: 600; margin: .45rem 0; }
form.stacked label.switch input { width: 3.2rem; max-width: none; }
.result { display: inline-block; min-width: 1.2em; font-weight: 700; text-align: center; }
.result-yes { color: var(--success); }
.result-no { color: var(--danger); }
.result-unknown { color: var(--text-muted); }
.label-chip { display: inline-block; padding: 0 .5rem; border: 1px solid var(--label); border-radius: 1rem; background: color-mix(in srgb, var(--label) 25%, var(--surface)); color: var(--text); font-size: .85rem; }
.state-open, .state-up_to_date, .state-passing { color: var(--success); }
.state-closed, .state-conflict, .state-failing { color: var(--danger); }
.state-merged, .state-auto_merge { color: var(--merged); }
.state-outdated { color: var(--warning); }

/* the table of pull requests stays a table on phones: it scrolls in its frame, its header with
   + and the gears stays, and so do the columns that people choose */
@media (max-width: 40rem) {
  .table.pull-requests { display: table; }
  .table.pull-requests thead { display: table-header-group; }
  .table.pull-requests tbody { display: table-row-group; }
  .table.pull-requests tr { display: table-row; }
  .table.pull-requests th, .table.pull-requests td { display: table-cell; }
  .pull-table:has(#column-status:not(:checked)) .col-status,
  .pull-table:has(#column-title:not(:checked)) .col-title,
  .pull-table:has(#column-step:not(:checked)) .col-step,
  .pull-table:has(#column-organization:not(:checked)) .col-organization,
  .pull-table:has(#column-repository:not(:checked)) .col-repository,
  .pull-table:has(#column-number:not(:checked)) .col-number,
  .pull-table:has(#column-creator:not(:checked)) .col-creator,
  .pull-table:has(#column-created:not(:checked)) .col-created,
  .pull-table:has(#column-title:checked) .col-link,
  .pull-table:has(#column-number:checked) .col-link { display: none; }
}

/* the saved filters of a project, and the page that saves one */
.table-title { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.table-title h2 { margin: 0; }
.filters { display: grid; gap: 1rem; list-style: none; margin: 0; padding: 0; }
.filter-conditions tr.off td:not(.switch-cell) { opacity: .45; }
.filter-conditions tr:has(input[name="on"]:not(:checked)) td:not(.switch-cell) { opacity: .45; }
.filter-conditions tr:has(input[name="on"]:checked) td { opacity: 1; }
.filter-conditions .condition-name { font-weight: 400; vertical-align: middle; }
.filter-conditions .switch-cell { width: 4.2rem; min-width: 4.2rem; position: relative; vertical-align: middle; }
.filter-actions { display: inline-flex; flex-wrap: wrap; gap: .4rem; }
.filter-details > summary { margin: .5rem 0; }
.opposite { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin-left: .4rem; color: var(--text-muted); }
.save-buttons { display: flex; flex-wrap: wrap; gap: .5rem; }

/* notifications: the count in the menu, and the list */
.count-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 1.3em; height: 1.3em; padding: 0 .3em; border-radius: 1em; background: var(--accent); color: var(--accent-text); font-size: .8em; font-weight: 700; }
.notifications { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.notification.unread { border-left: .3rem solid var(--accent); }
.notification-title { font-size: 1.1rem; margin: 0 0 .5rem; }
.notification-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 .5rem; }
.permission-groups { margin: 0 0 .5rem; padding-left: 1.2rem; }
.permission-groups ul { margin: .2rem 0 .4rem; padding-left: 1.2rem; }
.permission-groups .permission-name { font-weight: 600; }
.notification-meta { margin: 0; font-size: .9rem; }
.link-button { border: 0; padding: 0; background: none; color: var(--primary); font: inherit; text-decoration: underline; cursor: pointer; }

/* notifications: the count in the menu, and the list */
.count-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 1.3em; height: 1.3em; padding: 0 .3em; border-radius: 1em; background: var(--accent); color: var(--accent-text); font-size: .8em; font-weight: 700; }
.notifications { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.notification.unread { border-left: .3rem solid var(--accent); }
.notification-title { font-size: 1.1rem; margin: 0 0 .5rem; }
.notification-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 .5rem; }
.permission-groups { margin: 0 0 .5rem; padding-left: 1.2rem; }
.permission-groups ul { margin: .2rem 0 .4rem; padding-left: 1.2rem; }
.permission-groups .permission-name { font-weight: 600; }
.notification-meta { margin: 0; font-size: .9rem; }
.notifications .link-button { color: var(--primary); text-decoration: underline; }

/* the steps of a project: the bar of steps from left to right, and the step below it */
.step-bar { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: .75rem 0; padding: 0; counter-reset: step; }
.step-item { display: flex; align-items: center; gap: .4rem; }
.step-box { display: flex; align-items: center; gap: .3rem; margin: 0; padding: .4rem .5rem; border: 2px solid var(--border); border-radius: .5rem; background: var(--surface); }
.step-item[draggable="true"] .step-box { cursor: grab; }
.step-item.current .step-box { border-color: var(--primary); background: var(--surface-tint); }
.step-move:disabled { opacity: .35; cursor: not-allowed; }
.steps-tools { display: inline-flex; align-items: center; gap: .4rem; margin-left: auto; }
.step-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0 0 .5rem; }
form.stacked .step-actions fieldset { flex: 1 1 18rem; padding: .5rem .75rem; }
.step-action-list dt { font-weight: 600; margin-top: .4rem; }
.step-action-list dd { margin: .1rem 0 0 1rem; }
.step-item.dragged-over .step-box { outline: 2px dashed var(--primary); }
.step-item + .step-item::before { content: "→"; margin-right: .3rem; color: var(--text-muted); }
.step-item a { text-decoration: none; display: inline-flex; flex-direction: column; line-height: 1.2; }
.step-item .step-name { font-weight: 600; }
.step-conditions { list-style: none; padding: 0; margin: 0 0 1rem; }
.step-conditions > li { padding: .5rem 0; border-bottom: 1px solid var(--border); }
.condition-edit > summary { font-weight: 400; }
.condition-edit .pencil { margin-left: .3rem; color: var(--primary); }
.condition-description { margin: .3rem 0 0 1rem; color: var(--text-muted); }
.template-preview { margin: .5rem 0 1rem; padding: .5rem .75rem; border-left: .25rem solid var(--border); }

/* the menu Variables of the editor of Markdown: a click inserts the variable */
.variables-menu { position: relative; display: inline-block; margin: 0; }
.variables-menu > summary { list-style: none; }
.variables-menu > summary::-webkit-details-marker { display: none; }
.variables-list { position: absolute; z-index: 15; left: 0; top: calc(100% + .25rem); min-width: 18rem; max-width: calc(100vw - 2rem); margin: 0; padding: .3rem; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: .4rem; box-shadow: 0 .4rem 1.2rem rgba(0, 0, 0, .2); }
.variables-list button { display: block; width: 100%; padding: .35rem .5rem; border: 0; border-radius: .3rem; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.variables-list button:hover, .variables-list button:focus-visible { background: var(--surface-tint); }
.variables-group { padding: .4rem .5rem .1rem; color: var(--text-muted); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.variables-list { max-height: 60vh; overflow-y: auto; }

/* the step saves itself: the status at the bottom of the form */
.save-status { display: inline-flex; align-items: center; gap: .4rem; color: var(--text-muted); }
.save-status[data-state="saving"]::before { content: ""; width: 1em; height: 1em; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
.save-status[data-state="saved"] { color: var(--success); }
.save-status[data-state="failed"] { color: var(--danger); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .save-status[data-state="saving"]::before { animation: none; } }

/* something loads, such as the numbers of a filter */
.loading { display: inline-block; width: 1em; height: 1em; vertical-align: middle; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@media (prefers-reduced-motion: reduce) { .loading { animation-duration: 3s; } }
.filters-add { display: flex; justify-content: flex-end; margin: 0 0 1rem; }

/* the page of a pull request: the bar of its steps, each with a square for each task */
.pull-head h2 a { font-weight: 400; font-size: .9em; }
.pull-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.pull-badge { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .5rem 1rem; margin: .5rem 0; }
.pull-badge details { flex: 1 1 16rem; }
.pull-badge input { width: 100%; font-family: var(--mono, monospace); font-size: .85rem; }
.progress-bar { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 1rem 0 0; padding: 0; }
.progress-step { flex: 1 1 9rem; min-width: 0; }
.progress-step > a { display: flex; flex-direction: column; align-items: center; gap: .35rem; height: 100%; padding: .5rem .6rem; border: 2px solid var(--border); border-radius: .5rem; background: var(--surface); color: var(--text); text-decoration: none; text-align: center; }
.progress-step > a:hover, .progress-step > a:focus-visible { background: var(--surface-tint); }
/* past steps green with a check mark; the current one yellow when partly done, red when
   nothing is done; future steps gray, without numbers; the chosen step has a background */
.progress-step[data-stage="past"] > a { border-color: var(--success); }
.progress-step[data-stage="past"] .progress-check { color: var(--success); font-weight: 700; }
.progress-step[data-stage="current"] > a { border-color: var(--danger); }
.progress-step[data-stage="current"][data-partial] > a { border-color: var(--warning); }
.progress-step[data-stage="future"] > a { color: var(--text-muted); }
.progress-step[data-stage="future"] .square, .progress-step[data-stage="outside"] .square { background: var(--border); }
.progress-step > a[aria-current="step"] { background: var(--surface-tint); font-weight: 600; }
/* a step with its color: the background, stronger when it is chosen */
.progress-step > a[style*="--step-color"] { background: color-mix(in srgb, var(--step-color) 30%, var(--surface)); }
.progress-step > a[style*="--step-color"][aria-current="step"] { background: color-mix(in srgb, var(--step-color) 65%, var(--surface)); }
.progress-title { font-weight: 600; overflow-wrap: anywhere; }
.progress-tasks { display: flex; align-items: center; justify-content: center; gap: .4rem; flex-wrap: wrap; }
.progress-count { font-variant-numeric: tabular-nums; color: var(--text-muted); font-size: .85rem; }
.squares { display: inline-flex; flex-wrap: wrap; gap: .2rem; }
.square { width: .8rem; height: .8rem; border-radius: .15rem; background: var(--danger); }
.square-done { background: var(--success); }
.square-unknown { background: var(--border); }
.progress-here { color: var(--primary); font-weight: 600; }
/* outside of the usual steps: all of them gray */
.progress-bar[data-outside] .progress-step > a { border-color: var(--border); color: var(--text-muted); }
.progress-bar[data-outside] .square { background: var(--border); }

/* the tasks of the step shown: to do first and open, done closed */
.tasks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.task { border: 1px solid var(--border); border-left-width: .3rem; border-radius: .4rem; padding: .4rem .7rem; }
.task-todo { border-left-color: var(--danger); }
.task-done { border-left-color: var(--success); }
.task > summary { display: flex; align-items: baseline; gap: .5rem; cursor: pointer; }
.task-summary p { display: inline; margin: 0; }
.task-mark { flex: none; font-weight: 700; }
.task-mark-todo { padding: 0 .35rem; border-radius: .25rem; background: var(--danger); color: var(--surface); font-size: .75rem; letter-spacing: .04em; }
.task-mark-done { color: var(--success); }
.task-mark-unknown { color: var(--text-muted); }
.task-done .task-summary { color: var(--text-muted); }
.task-body { margin: .4rem 0 0 0; }

/* the colors of steps: a background in the bars */
.step-box[style*="--step-color"] { background: color-mix(in srgb, var(--step-color) 35%, var(--surface)); }
.step-item.current .step-box[style*="--step-color"] { background: color-mix(in srgb, var(--step-color) 65%, var(--surface)); }
form.stacked fieldset.step-colors { display: flex; flex-wrap: wrap; gap: .35rem; border: 0; padding: 0; margin: .5rem 0 1rem; }
.step-colors legend { font-weight: 600; margin-bottom: .3rem; padding: 0; }
form.stacked label.color-choice { display: inline-flex; margin: 0; cursor: pointer; }
.color-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.swatch { display: inline-block; width: 1.8rem; height: 1.8rem; border-radius: .4rem; border: 2px solid var(--border); background: var(--swatch); }
.swatch-none { background: repeating-linear-gradient(45deg, var(--surface), var(--surface) 4px, var(--border) 4px, var(--border) 6px); }
.color-choice input:checked + .swatch { border-color: var(--text); box-shadow: 0 0 0 2px var(--primary); }
.color-choice input:focus-visible + .swatch { outline: 3px solid var(--primary); outline-offset: 2px; }
.step-head { margin-bottom: .5rem; }
.step-visible { margin: .5rem 0 1rem; }
.step-visible small { display: block; }
form.stacked .step-visible label.switch { font-weight: 400; }

/* the buttons of a condition on the page of saving a filter */
.condition-buttons { display: inline-flex; flex-wrap: wrap; gap: .3rem; }
.filter-conditions .condition-actions { width: 1%; white-space: nowrap; }
.comparison-row { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.comparison-row input[type="number"] { width: 6rem; }
.condition-form small { display: block; margin-top: .3rem; }

/* the tab PR Message: the preview, the scope */
.message-preview { margin: 1rem 0; padding: .75rem 1rem; border: 1px solid var(--border); border-radius: .5rem; background: var(--surface-tint); }
.message-preview .markdown-tabs { display: flex; gap: .3rem; margin-bottom: .5rem; }
.message-preview [aria-selected="true"] { font-weight: 700; border-color: var(--primary); }
.message-markdown { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; font-size: .9rem; }
form.stacked fieldset.message-scope { display: flex; flex-direction: column; gap: .2rem; padding: .5rem .75rem; }
.scope-listed { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.scope-listed input[name="listed"] { flex: 1 1 14rem; width: auto; }
.scope-not-preferred { padding: .2rem .5rem; border-radius: .4rem; background: color-mix(in srgb, var(--danger) 12%, var(--surface)); }
.scope-not-preferred small { display: block; color: var(--text-muted); }
.message-review { margin: 0 0 .75rem; }
.message-review > summary { list-style: none; display: inline-flex; }
.message-review > summary::-webkit-details-marker { display: none; }
.message-review[open] { padding: .5rem .75rem; border: 1px solid var(--border); border-radius: .4rem; background: var(--surface); }
.example-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.example-nav [aria-disabled="true"] { opacity: .35; pointer-events: none; }
.message-missing { color: var(--danger); }
/* the pages of editing the message, in their order */
.message-flow { display: flex; flex-wrap: wrap; gap: .3rem; list-style: none; margin: 0 0 1rem; padding: 0; counter-reset: none; }
.message-flow li { padding: .25rem .6rem; border: 1px solid var(--border); border-radius: 1rem; color: var(--text-muted); }
.message-flow li[aria-current="step"] { border-color: var(--primary); background: var(--surface-tint); color: var(--text); font-weight: 600; }
.message-flow a { text-decoration: none; }
