/* Components. Values come from tokens.css; no colours or fonts are defined here. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: var(--font-sans);
  font-size: 100%;
  line-height: 1.5;
  color: var(--ink);
  background: var(--page);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--turquoise-text);
  text-underline-offset: 0.15em;
}
a:hover {
  color: var(--blue);
}

:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -4rem;
  padding: var(--space-2) var(--space-4);
  background: var(--surface);
  color: var(--blue);
  font-weight: 600;
  z-index: 10;
}
.skip-link:focus {
  top: var(--space-2);
}

/* --- Headings (handbook 1.5: semibold capitals, line spacing equal to size) --- */

h1,
h2,
h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--blue);
  text-transform: uppercase;
  margin: 0;
}
h1 {
  font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3rem);
  line-height: 1;
  letter-spacing: 0.005em;
}
h2 {
  font-size: 1.25rem;
  line-height: 1.1;
  margin-bottom: var(--space-4);
}
h3 {
  font-size: 1rem;
  line-height: 1.2;
  margin-bottom: var(--space-2);
}

.eyebrow {
  margin: 0 0 var(--space-2);
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--coral-text);
}
.eyebrow a {
  color: inherit;
  text-decoration: none;
}
.eyebrow a:hover {
  text-decoration: underline;
}
.eyebrow .sep {
  margin: 0 var(--space-2);
  color: var(--blue-40);
}

.subline {
  margin: var(--space-2) 0 0;
  font-size: 1.25rem;
  color: var(--blue-80);
}

.prose {
  font-family: var(--font-serif);
  font-weight: 350;
  max-width: 42rem;
}

.muted {
  color: var(--ink-soft);
}

/* --- Page frame --- */

.topbar {
  background: var(--blue);
  color: var(--on-dark);
}
.topbar-inner {
  max-width: var(--width);
  margin: 0 auto;
  padding: var(--space-3) var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex-wrap: wrap;
}
.brand {
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--on-dark);
  text-decoration: none;
  margin-right: auto;
}
.brand:hover {
  color: var(--on-dark);
  text-decoration: underline;
}
.topbar a,
.topbar button {
  color: var(--on-dark);
}
.topbar-nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  font-size: 0.9375rem;
}
.topbar form {
  display: inline-flex;
  gap: var(--space-1);
  margin: 0;
}
.lang button {
  background: none;
  border: 1px solid transparent;
  padding: 0.1rem 0.4rem;
  font: inherit;
  cursor: pointer;
  border-radius: var(--radius);
}
.lang button[aria-current="true"] {
  border-color: var(--on-dark);
  font-weight: 600;
}
.lang button:hover,
.linklike:hover {
  text-decoration: underline;
}
.linklike {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}

.page {
  flex: 1;
  width: 100%;
  max-width: var(--width);
  margin: 0 auto;
  padding: var(--space-7) var(--space-5) var(--space-8);
}

.page-head {
  margin-bottom: var(--space-6);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-5);
  flex-wrap: wrap;
}
.page-head .actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.footer {
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.8125rem;
}
.footer-inner {
  max-width: var(--width);
  margin: 0 auto;
  padding: var(--space-4) var(--space-5);
}

/* --- Tabs --- */

.tabs {
  display: flex;
  gap: var(--space-5);
  flex-wrap: wrap;
  margin: 0 0 var(--space-6);
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--line);
}
.tabs a {
  display: block;
  padding: var(--space-2) 0;
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.tabs a:hover {
  border-bottom-color: var(--blue-40);
}
.tabs a[aria-current="page"] {
  border-bottom-color: var(--coral);
  font-weight: 600;
}

/* --- Panels, tiles, info boxes --- */

.section {
  margin-bottom: var(--space-7);
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-5);
  background: var(--surface);
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.tile {
  display: block;
  height: 100%;
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--line);
  border-left: 4px solid var(--turquoise);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  background: var(--surface);
}
.tile:hover {
  background: var(--blue-05);
  border-left-color: var(--coral);
  color: var(--ink);
}
.tile strong {
  display: block;
  color: var(--blue);
  font-weight: 600;
  font-size: 1.0625rem;
}
.tile span {
  display: block;
  margin-top: var(--space-1);
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.infobox {
  padding: var(--space-4) var(--space-5);
  background: var(--blue);
  color: var(--on-dark);
  border-radius: var(--radius);
}
.infobox h3 {
  color: var(--on-dark);
}
.infobox a {
  color: var(--on-dark);
}
.infobox--light {
  background: var(--turquoise-10);
  color: var(--ink);
}
.infobox--light h3 {
  color: var(--blue);
}
.infobox--light a {
  color: var(--turquoise-text);
}

/* --- Tree on the start page --- */

.tree-org {
  margin-bottom: var(--space-7);
}
.tree-space {
  margin: var(--space-5) 0 0;
  padding-left: var(--space-5);
  border-left: 2px solid var(--blue-20);
}
.tree-space h3 a {
  color: var(--blue);
  text-decoration: none;
}
.tree-space h3 a:hover,
.tree-org h2 a:hover {
  text-decoration: underline;
}
.tree-org h2 a {
  color: var(--blue);
  text-decoration: none;
}

/* --- Tables (handbook 2.1: blue header row, tinted alternating rows) --- */

.table-wrap {
  overflow-x: auto;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.table th {
  background: var(--blue);
  color: var(--on-dark);
  text-align: left;
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: var(--space-2) var(--space-3);
  white-space: nowrap;
}
.table td {
  padding: var(--space-2) var(--space-3);
  vertical-align: top;
  border-bottom: 1px solid var(--blue-10);
}
.table tbody tr:nth-child(even) td {
  background: var(--blue-05);
}
.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.table .actions {
  text-align: right;
  white-space: nowrap;
}
.table form {
  display: inline;
}

.indent-1 {
  padding-left: 1.5rem !important;
}
.indent-2 {
  padding-left: 3rem !important;
}
.indent-3 {
  padding-left: 4.5rem !important;
}
.indent-4 {
  padding-left: 6rem !important;
}
.indent-5 {
  padding-left: 7.5rem !important;
}
.indent-6 {
  padding-left: 9rem !important;
}

/* --- Badges --- */

.badge {
  display: inline-block;
  padding: 0.05rem 0.5rem;
  border-radius: 1rem;
  background: var(--blue-10);
  color: var(--blue);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
}
.badge--create {
  background: var(--turquoise-10);
}
.badge--delete {
  background: var(--coral-10);
  color: var(--coral-text);
}

/* --- Buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.5rem 1rem;
  border: 2px solid var(--blue);
  border-radius: var(--radius);
  background: var(--blue);
  color: var(--on-dark);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover {
  background: var(--blue-80);
  border-color: var(--blue-80);
  color: var(--on-dark);
}
.btn--secondary {
  background: transparent;
  color: var(--blue);
}
.btn--secondary:hover {
  background: var(--blue-10);
  border-color: var(--blue);
  color: var(--blue);
}
.btn--danger {
  background: transparent;
  border-color: var(--coral);
  color: var(--coral-text);
}
.btn--danger:hover {
  background: var(--coral-10);
  border-color: var(--coral);
  color: var(--coral-text);
}
.btn--small {
  padding: 0.2rem 0.6rem;
  font-size: 0.875rem;
  border-width: 1px;
}

/* --- Forms --- */

.form {
  max-width: 34rem;
}
.form--inline {
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-4);
}
.form--inline .field {
  margin: 0;
  flex: 1 1 14rem;
}
.field {
  margin-bottom: var(--space-5);
}
.field label,
.form label {
  display: block;
  margin-bottom: var(--space-1);
  font-weight: 600;
  color: var(--blue);
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--blue-60);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
textarea {
  resize: vertical;
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: var(--focus);
  outline-offset: 0;
  border-color: var(--blue);
}
.help,
.helptext {
  display: block;
  margin-top: var(--space-1);
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.errorlist {
  margin: var(--space-1) 0 0;
  padding: 0;
  list-style: none;
  color: var(--coral-text);
  font-size: 0.875rem;
  font-weight: 500;
}
.field--error input,
.field--error select,
.field--error textarea {
  border-color: var(--coral);
  border-width: 2px;
}
.form-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  align-items: center;
}
.required {
  color: var(--coral-text);
}

/* --- Messages --- */

.messages {
  margin: 0 0 var(--space-5);
  padding: 0;
  list-style: none;
}
.message {
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-2);
  border-left: 4px solid var(--turquoise);
  background: var(--turquoise-10);
  border-radius: var(--radius);
}
.message--error {
  border-left-color: var(--coral);
  background: var(--coral-10);
}

/* --- Empty states and spheres (handbook 1.5) --- */

.empty {
  position: relative;
  overflow: hidden;
  min-height: 15rem;
  padding: var(--space-7) var(--space-6);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.empty > :not(.spheres) {
  position: relative;
  max-width: 30rem;
}
.empty p {
  margin: var(--space-3) 0 var(--space-5);
}

.spheres {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.sphere {
  position: absolute;
  border-radius: 50%;
  aspect-ratio: 1;
}
/* Filled sphere with coral outline, bleeding off the bottom edge. */
.sphere--fill {
  width: 22rem;
  right: 8%;
  bottom: -13rem;
  background: var(--turquoise-30);
  border: 4px solid var(--coral);
}
/* Dot-pattern sphere overlapping the filled one. */
.sphere--dots {
  width: 17rem;
  right: -2rem;
  bottom: -3rem;
  background-image: radial-gradient(var(--turquoise) 1.1px, transparent 1.4px);
  background-size: 11px 11px;
}
/* Outline sphere, bleeding off the right edge. */
.sphere--outline {
  width: 9rem;
  right: -4rem;
  top: 1.5rem;
  border: 3px solid var(--blue-80);
}

/* --- Sign-in and other pages without the app frame --- */

.auth {
  position: relative;
  overflow: hidden;
  flex: 1;
  display: flex;
  align-items: center;
  padding: var(--space-7) var(--space-5);
}
.auth-card {
  position: relative;
  width: 100%;
  max-width: 27rem;
  margin: 0 auto 0 max(0px, calc((100% - var(--width)) / 2));
  padding: var(--space-6);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.auth-card h1 {
  font-size: 2rem;
  margin-bottom: var(--space-5);
}
.auth-card form p,
.auth-card form > div {
  margin: 0 0 var(--space-4);
}
.auth .sphere--fill {
  width: 38rem;
  right: 6%;
  bottom: -20rem;
}
.auth .sphere--dots {
  width: 30rem;
  right: -6rem;
  bottom: 2rem;
}
.auth .sphere--outline {
  width: 16rem;
  right: -7rem;
  top: 3rem;
}

/* --- Audit log --- */

.changes {
  margin: 0;
  font-size: 0.875rem;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0 var(--space-3);
}
.changes dt {
  font-weight: 600;
  color: var(--blue);
}
.changes dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.changes del {
  color: var(--coral-text);
}
.changes ins {
  text-decoration: none;
}

.pagination {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  margin-top: var(--space-5);
}

/* --- Page parts used by the KPI pages --- */

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4) var(--space-5);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}
.section-head h2 {
  margin-bottom: 0;
}
.section-head .actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  align-items: center;
}
.section-head .actions form {
  margin: 0;
}
h2.title {
  font-size: 1.75rem;
  margin-bottom: var(--space-3);
}
h3.spaced {
  margin-top: var(--space-6);
}
.count {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-soft);
}
.code {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--blue);
  white-space: nowrap;
}

.subnav {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin: calc(-1 * var(--space-3)) 0 var(--space-6);
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}
.subnav a {
  display: block;
  padding: 0.15rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  color: var(--blue);
  text-decoration: none;
}
.subnav a:hover {
  background: var(--blue-10);
}
.subnav a[aria-current="page"] {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--on-dark);
}

.filters {
  margin-bottom: var(--space-5);
}
.filters .field {
  flex: 0 1 11rem;
}
.section-head .filters {
  margin-bottom: 0;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: var(--space-6);
}
.two-col h3 {
  margin-bottom: var(--space-3);
}

.deflist {
  margin: 0 0 var(--space-6);
  display: grid;
  grid-template-columns: minmax(7rem, max-content) 1fr;
  gap: var(--space-2) var(--space-4);
  font-size: 0.9375rem;
}
.deflist dt {
  font-weight: 600;
  color: var(--blue);
}
.deflist dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.deflist dd > :first-child {
  margin-top: 0;
}
.deflist dd > :last-child {
  margin-bottom: 0;
}
.deflist--compact {
  margin-bottom: 0;
  font-size: 0.875rem;
}

.badge--draft,
.badge--muted,
.badge--tag {
  background: transparent;
  border: 1px solid var(--blue-40);
}
.badge--active {
  background: var(--turquoise-10);
}
.badge--archived {
  background: var(--blue-10);
  color: var(--ink-soft);
}
.badge--alert,
.badge--overdue {
  background: var(--coral-10);
  color: var(--coral-text);
}

/* --- Check results --- */

.checks {
  margin-top: var(--space-5);
}
.findings {
  margin: 0;
  padding: 0;
  list-style: none;
}
.finding {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-top: 1px solid var(--blue-10);
  font-size: 0.9375rem;
}
.finding-level {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
}
.finding--error .finding-level {
  color: var(--coral-text);
}
.finding--warning .finding-level {
  color: var(--warn);
}

/* --- Long forms --- */

.form--wide {
  max-width: 44rem;
}
.fieldset {
  margin: 0 0 var(--space-6);
  padding: var(--space-5) var(--space-5) 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.fieldset legend {
  padding: 0 var(--space-2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--blue);
}
.field .label {
  display: block;
  margin-bottom: var(--space-1);
  font-weight: 600;
  color: var(--blue);
}
.field--check label,
label.check {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  font-weight: 500;
}
label.check {
  margin-top: var(--space-2);
  font-size: 0.9375rem;
  color: var(--ink);
}
.checklist > div {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: var(--space-1) var(--space-4);
}
.checklist--stacked > div {
  grid-template-columns: 1fr;
  gap: var(--space-2);
}
.checklist--stacked label {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.checklist--stacked label:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-05);
}
.choice-text {
  display: grid;
  gap: var(--space-1);
}
input[type="radio"] {
  accent-color: var(--blue);
}
.checklist label {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  font-weight: 400;
  color: var(--ink);
}
input[type="checkbox"] {
  accent-color: var(--blue);
}
input:disabled,
select:disabled {
  background: var(--blue-05);
  color: var(--ink-soft);
}
.kinds {
  margin: var(--space-3) 0 0;
  font-size: 0.875rem;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--space-1) var(--space-3);
  color: var(--ink-soft);
}
.kinds dt {
  font-weight: 600;
  color: var(--blue);
}
.kinds dd {
  margin: 0;
}

/* --- Entering values --- */

.entry {
  margin-bottom: var(--space-4);
  border: 1px solid var(--line);
  border-left: 4px solid var(--turquoise);
  border-radius: var(--radius);
  background: var(--surface);
}
.entry--overdue {
  border-left-color: var(--coral);
}
.entry--current {
  border-left-color: var(--blue-40);
}
.entry--saved {
  border-left-color: var(--ok);
}
.entry-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4) var(--space-6);
  flex-wrap: wrap;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--blue-10);
}
.entry-head h3 {
  margin: 0;
  font-size: 1.0625rem;
}
.entry-head h3 a {
  color: var(--blue);
  text-decoration: none;
}
.entry-head h3 a:hover {
  text-decoration: underline;
}
.entry-meta,
.tile-meta {
  margin: 0 0 var(--space-1);
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.entry-history {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.9375rem;
}
.entry-history strong {
  font-variant-numeric: tabular-nums;
  color: var(--blue);
}
.entry-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-5) var(--space-6);
  padding: var(--space-4) var(--space-5) var(--space-5);
}
.entry-guide .prose {
  font-size: 0.9375rem;
}
.entry-guide .prose > :first-child {
  margin-top: 0;
}
.entry-form .field {
  margin-bottom: var(--space-4);
}
.entry-value {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}
.entry-value input {
  max-width: 12rem;
  font-size: 1.125rem;
  font-variant-numeric: tabular-nums;
}
.unit {
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--ink-soft);
}
.entry-error,
.entry-warning {
  margin: 0 0 var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-left: 4px solid var(--coral);
  background: var(--coral-10);
  border-radius: var(--radius);
}
.entry-error {
  font-weight: 500;
}
.entry-warning ul {
  margin: var(--space-1) 0 var(--space-3);
  padding-left: 1.2rem;
}
.entry-warning .field {
  margin-bottom: var(--space-2);
}
.entry-result p {
  margin: 0 0 var(--space-2);
}

/* Rows of KPIs that are counted from a list */
.entry-count {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin: 0 0 var(--space-3);
}
.entry-count strong {
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
  color: var(--blue);
}
.itemlist {
  margin-bottom: var(--space-4);
  font-size: 0.9375rem;
}
.itemlist summary,
.withdraw summary {
  cursor: pointer;
  color: var(--blue);
}
.itemlist ul {
  margin: var(--space-2) 0 0;
  padding: 0;
  list-style: none;
}
.itemlist li {
  display: flex;
  gap: var(--space-1) var(--space-4);
  flex-wrap: wrap;
  padding: var(--space-1) 0;
  border-bottom: 1px solid var(--blue-10);
}
.itemlist-day {
  font-variant-numeric: tabular-nums;
}
.entry-confirm {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--blue-10);
}
.entry-confirm p,
.entry-more {
  margin: var(--space-3) 0;
}
.is-withdrawn .cell-data {
  color: var(--ink-soft);
  text-decoration: line-through;
}
.withdraw form {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-2);
  min-width: 14rem;
}

/* Alerts */
.plainlist {
  margin: 0;
  padding: 0;
  list-style: none;
}
.plainlist li {
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--blue-10);
}
form.inline {
  display: inline;
}

/* --- Analysis --- */

.kpi-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.kpi-tile {
  display: flex;
  flex-direction: column;
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  border-radius: var(--radius);
  background: var(--surface);
}
.kpi-tile h3 {
  margin-bottom: var(--space-3);
  text-transform: none;
  font-size: 1.0625rem;
}
.kpi-tile h3 a {
  color: var(--blue);
  text-decoration: none;
}
.kpi-tile h3 a:hover {
  text-decoration: underline;
}
.tile-line {
  margin: var(--space-1) 0 0;
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.tile-foot {
  margin-top: auto;
  padding-top: var(--space-3);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-3);
}
/* Large key figures in coral, as in the handbook's fact sheets (2.1). */
.figure {
  margin: 0;
  font-size: 2.25rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--coral);
  font-variant-numeric: tabular-nums;
}
.figure .unit {
  font-size: 1rem;
}
.figure--plain {
  color: var(--blue);
  font-size: 1.75rem;
}
.figure--none {
  color: var(--blue-40);
}
.figures {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5) var(--space-7);
  margin: 0;
}
.figures dt {
  margin-bottom: var(--space-1);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--blue);
}
.figures dd {
  margin: 0;
  max-width: 22rem;
}
.status {
  font-weight: 600;
}
.status--ok {
  color: var(--ok);
}
.status--miss {
  color: var(--coral-text);
}
.status--none {
  font-weight: 400;
  color: var(--ink-soft);
}

/* --- Charts (drawn in analysis/charts.py and kpi_tags.sparkline) --- */

.sparkline {
  flex: none;
  overflow: visible;
}
.sparkline polyline {
  fill: none;
  stroke: var(--blue-60);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sparkline circle {
  fill: var(--blue-60);
}
.sparkline .sparkline-last {
  fill: var(--coral);
  stroke: var(--surface);
  stroke-width: 1.5;
}
.chart-figure {
  margin: 0;
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.chart-figure figcaption {
  margin-top: var(--space-2);
  font-size: 0.875rem;
}
.chart {
  display: block;
  width: 100%;
  height: auto;
}
.chart text {
  font-family: var(--font-sans);
  font-size: 12px;
  fill: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.chart .chart-value {
  font-size: 13px;
  font-weight: 600;
  fill: var(--ink);
}
.chart-grid {
  stroke: var(--blue-10);
  stroke-width: 1;
}
.chart-baseline {
  stroke: var(--blue-40);
  stroke-width: 1;
}
.chart-bar {
  fill: var(--blue);
}
.chart-bar:hover,
.chart-dot:hover {
  fill: var(--turquoise);
}
.chart-line {
  fill: none;
  stroke: var(--blue);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chart-dot {
  fill: var(--blue);
  stroke: var(--surface);
  stroke-width: 2;
}
.chart-target {
  stroke: var(--coral);
  stroke-width: 1.5;
  stroke-dasharray: 6 4;
}
.chart-target-band {
  fill: var(--coral-10);
}
.chart .chart-target-label {
  fill: var(--coral-text);
  font-weight: 600;
}

@media (max-width: 40rem) {
  .entry-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .finding {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .page {
    padding: var(--space-5) var(--space-4) var(--space-7);
  }
  .spheres {
    opacity: 0.5;
  }
  .auth-card {
    margin: 0 auto;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .tile,
  .btn {
    transition:
      background-color 120ms ease,
      border-color 120ms ease;
  }
}

/* --- Collection pages --- */

.pagelinks {
  margin: var(--space-3) 0 0;
  font-size: 0.9375rem;
}
.secret {
  display: block;
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 0.875rem;
  overflow-wrap: anywhere;
  user-select: all;
}

/* --- Sidebar layout --- */

.topbar-inner {
  max-width: none;
}

.shell,
.single {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.shell {
  display: grid;
  grid-template-columns: 16rem minmax(0, 1fr);
  align-items: start;
}
.shell > .page {
  max-width: 90rem;
  margin: 0;
  padding-left: var(--space-7);
}

.sidebar {
  position: sticky;
  top: 0;
  max-height: 100vh;
  overflow-y: auto;
  align-self: stretch;
  background: var(--blue-05);
  border-right: 1px solid var(--line);
  padding: var(--space-5) 0 var(--space-6);
}
.sidebar-head {
  padding: 0 var(--space-5) var(--space-4);
  border-bottom: 1px solid var(--line);
}
.sidebar-trail ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  margin: 0 0 var(--space-3);
  padding: 0;
  list-style: none;
  font-size: 0.8125rem;
}
.sidebar-trail li + li::before {
  content: "›";
  margin-right: var(--space-1);
  color: var(--blue-40);
}
.chip {
  display: inline-block;
  padding: 0.1rem var(--space-2);
  border-radius: 999px;
  background: var(--blue-10);
  color: var(--blue);
  text-decoration: none;
}
.chip:hover {
  background: var(--blue-20);
  color: var(--blue);
  text-decoration: none;
}
.sidebar-level {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--coral-text);
}
.sidebar-title {
  display: block;
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.25;
  color: var(--blue);
  text-decoration: none;
}
.sidebar-title:hover {
  text-decoration: underline;
}
.sidebar-toggle {
  display: none;
}
.sidebar-group {
  margin-top: var(--space-4);
}
.sidebar-label {
  margin: 0 0 var(--space-1);
  padding: 0 var(--space-5);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.sidebar-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.sidebar-nav li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  border-left: 4px solid transparent;
  color: var(--blue);
  text-decoration: none;
}
.sidebar-nav li a:hover {
  background: var(--blue-10);
}
.sidebar-nav li a[aria-current="page"] {
  border-left-color: var(--blue);
  background: var(--blue-10);
  font-weight: 600;
}
.sidebar-count {
  min-width: 1.5rem;
  padding: 0 var(--space-2);
  border-radius: 999px;
  background: var(--coral-text);
  color: var(--on-dark);
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: center;
}
.sidebar-switch {
  margin: var(--space-5) 0 0;
  padding: var(--space-4) var(--space-5) 0;
  border-top: 1px solid var(--line);
}
.btn--block {
  display: block;
  text-align: center;
}

@media (max-width: 56rem) {
  .shell {
    display: flex;
    flex-direction: column;
  }
  .shell > .page {
    padding-left: var(--space-5);
  }
  .sidebar {
    position: static;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: var(--space-4) 0;
  }
  .sidebar-head {
    border-bottom: 0;
    padding-bottom: 0;
  }
  .js .sidebar-toggle {
    display: block;
    margin: var(--space-3) var(--space-5) 0;
    padding: var(--space-2) var(--space-4);
    border: 1px solid var(--blue);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--blue);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
  }
  .js .sidebar:not(.sidebar--open) .sidebar-nav {
    display: none;
  }
}

/* --- What a list feeds --- */

.feeds {
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-left: 4px solid var(--turquoise);
  background: var(--turquoise-10);
}
.feeds p {
  margin: 0;
}
.feeds ul {
  margin: var(--space-2) 0 0;
  padding-left: var(--space-5);
}

/* --- Dashboard --- */

.attention {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
.attention li > * {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  height: 100%;
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  color: var(--ink);
  text-decoration: none;
}
.attention a:hover {
  background: var(--blue-05);
}
.attention .figure {
  font-size: 2rem;
}
.section-foot {
  margin: var(--space-4) 0 0;
}
.input--narrow {
  width: 5rem;
}

/* --- KPIs worked out per row of a lasting list --- */

.entry-rows {
  grid-column: 1 / -1;
}
.rowtable td {
  vertical-align: top;
}
.rowtable-inputs {
  display: flex;
  gap: var(--space-2);
}
.rowtable-inputs input {
  width: 7rem;
  font-variant-numeric: tabular-nums;
}
.rowtable-inputs input[name$="-rows"],
.input--short {
  width: 5rem;
  max-width: 5rem;
}
.rowtable .is-error td {
  background: var(--coral-10);
}
.field-error {
  display: block;
  color: var(--coral-text);
  font-size: 0.875rem;
}

/* --- Search and more filters --- */

.filters .field--grow {
  flex: 1 1 16rem;
}
.more-filters {
  flex-basis: 100%;
}
.more-filters summary {
  cursor: pointer;
  color: var(--turquoise-text);
  font-weight: 600;
}
.more-filters-body {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-4);
  margin-top: var(--space-3);
}
.more-filters-body .field {
  margin: 0;
  flex: 0 1 11rem;
}
/* --- Deleting an organization, space or project --- */

/* Filled red-orange for the one irreversible action. The darker coral keeps
   white text above 4.5:1. */
.btn--danger-solid,
.btn--danger-solid:hover {
  background: var(--coral-text);
  border-color: var(--coral-text);
  color: var(--on-dark);
}
.btn--danger-solid:hover {
  filter: brightness(0.9);
}

.danger-zone {
  max-width: 48rem;
  margin-top: var(--space-7);
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--coral);
  border-left-width: 4px;
  border-radius: var(--radius);
}
.danger-zone h2,
.danger-zone h3 {
  margin-top: 0;
  color: var(--coral-text);
}
.danger-zone-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.danger-zone-row p {
  margin: 0;
}

.dialog {
  width: min(36rem, calc(100vw - 2rem));
  padding: var(--space-5) var(--space-6);
  border: 1px solid var(--line);
  border-top: 4px solid var(--coral);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}
.dialog h2 {
  margin-top: 0;
}
.dialog .form {
  max-width: none;
  margin-top: var(--space-5);
}
.dialog::backdrop {
  background: color-mix(in srgb, var(--ink) 55%, transparent);
}

/* --- Links for one person each (collection/link_list.html, link_form.html) --- */

.newlink .secret {
  margin-bottom: 0;
}
.linktable td {
  vertical-align: top;
}
.linktable-kpis[title] {
  cursor: help;
  text-decoration: underline dotted;
  text-underline-offset: 0.2em;
}
.kpichoice {
  margin-bottom: var(--space-4);
}
.kpichoice-folder {
  margin: 0 0 var(--space-2);
  font-weight: 600;
  color: var(--blue);
}
.itemlist-edit {
  margin-left: auto;
  font-size: 0.875rem;
}
.copy-button[hidden] {
  display: none;
}

/* --- People and rights (orgs/space_people.html, space_person.html, project_team.html) --- */

.filters .field--grow {
  flex: 1 1 18rem;
}
.people-summary-item {
  white-space: nowrap;
}
.access-form {
  max-width: 56rem;
}
.access-form .fieldset .table-wrap {
  margin-bottom: var(--space-3);
}
.access-form .fieldset > .help,
.access-form .fieldset > .muted {
  margin-bottom: var(--space-5);
}
.rights-grid tbody th {
  background: transparent;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
  white-space: normal;
  border-bottom: 1px solid var(--blue-10);
  vertical-align: middle;
}
.rights-grid tbody tr:nth-child(even) th {
  background: var(--blue-05);
}
.rights-grid-col {
  text-align: center !important;
  white-space: normal !important;
  min-width: 7rem;
}
.rights-grid-note {
  display: block;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
}
.rights-grid .rights-grid-cell {
  padding: 0;
  text-align: center;
  vertical-align: middle;
}
/* The whole cell ticks the box: a bigger target than the box alone. */
.rights-grid-box {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 2.75rem;
  cursor: pointer;
}
.rights-grid-box:hover {
  background: var(--blue-10);
}
.rights-grid-box input {
  width: 1.15rem;
  height: 1.15rem;
}
.rights-grid td.rights-grid-presets {
  white-space: nowrap;
  vertical-align: middle;
}
.rights-grid-presets .btn + .btn {
  margin-left: var(--space-1);
}
.grantlist li {
  margin-bottom: var(--space-1);
}

/* --- Values to Enter (collection/collect.html) --- */

.todo-head {
  margin-bottom: var(--space-5);
}
.todo-head h1 {
  margin-bottom: var(--space-2);
}
.todo-summary {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin: 0;
  color: var(--ink-soft);
}
.todo-summary strong {
  color: var(--blue);
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
}
.todo-summary-item--late strong {
  color: var(--coral-text);
}
.todo-filters {
  margin-bottom: var(--space-3);
}
/* Search fields look like the other text fields (also in the KPI catalogue). */
input[type="search"] {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--blue-60);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
.todo-scope {
  margin: 0 0 var(--space-6);
  font-size: 0.875rem;
}
.todo-group {
  margin-top: var(--space-6);
}
.todo-group-head {
  margin-bottom: var(--space-3);
  padding-left: var(--space-3);
  border-left: 4px solid var(--turquoise);
}
.todo-group--overdue .todo-group-head {
  border-left-color: var(--coral);
}
.todo-group--upcoming .todo-group-head,
.todo-group--anytime .todo-group-head {
  border-left-color: var(--blue-40);
}
.todo-group-head h2 {
  margin-bottom: var(--space-1);
}
.todo-group-head p {
  margin: 0;
  font-size: 0.9375rem;
}
.todo-continued {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--ink-soft);
}

/* The same columns in every group, so the tables line up. */
.todo-table {
  table-layout: fixed;
}
.todo-col-code {
  width: 7.5rem;
}
.todo-col-period {
  width: 10rem;
}
.todo-col-due {
  width: 10.5rem;
}
.todo-col-last {
  width: 10rem;
}
.todo-col-action {
  width: 11rem;
}

/* Each line is a tbody of its own (the line and its form slot), so the
   stripes go by tbody rather than by row. */
.todo-table tbody tr:nth-child(even) td {
  background: none;
}
.todo-table tbody:nth-of-type(even) .todo-row td {
  background: var(--blue-05);
}
.todo-table .todo-row td {
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
  vertical-align: middle;
}
.todo-table .todo-name a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}
.todo-table .todo-name a:hover {
  text-decoration: underline;
}
.todo-sub {
  display: block;
  margin-top: 0.125rem;
  font-size: 0.8125rem;
  color: var(--ink-soft);
}
.todo-name {
  overflow-wrap: anywhere;
}
.todo-late {
  color: var(--coral-text);
  font-weight: 600;
}
.todo-last .unit {
  font-size: 0.8125rem;
}
.todo-table .actions .btn {
  width: 100%;
  justify-content: center;
}
.todo-table tbody.todo--saved .todo-row td {
  background: var(--turquoise-10);
}
.badge--saved {
  background: var(--surface);
  border: 1px solid var(--ok);
  color: var(--ok);
}
.todo-table tbody tr.todo-slot td {
  padding: var(--space-2) var(--space-3) var(--space-5);
  background: var(--blue-05);
  border-bottom: 2px solid var(--blue-20);
}
.todo-slot .entry {
  margin: 0;
}

/* --- The tabs of a list --- */

.list-head .title {
  margin-bottom: var(--space-1);
}
.list-head .tabs {
  margin-top: var(--space-4);
}
.inline-form {
  display: inline-flex;
  gap: var(--space-2);
}

/* --- Page heads, tabs of one thing, pagination (ui-nav) --- */

/* Every page below an overview: eyebrow (optional), title, short description, actions. */
.page-title {
  font-size: 1.75rem;
  line-height: 1.1;
}
.page-intro {
  margin: var(--space-3) 0 0;
  max-width: 42rem;
  font-family: var(--font-serif);
  font-weight: 350;
  color: var(--ink-soft);
}
.page-head .actions {
  align-items: center;
}
.page-head .actions form {
  margin: 0;
}
.page-head + nav > .tabs {
  margin-top: calc(-1 * var(--space-2));
}
.page-head .badges {
  margin: var(--space-3) 0 0;
}
.tabs .tab-count {
  margin-left: var(--space-1);
  color: var(--ink-soft);
  font-weight: 400;
}

/* A list with nothing in it yet: says so and what to do, without the spheres. */
.empty-line {
  margin: 0;
  padding: var(--space-5);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--ink-soft);
}

/* Pagination reads as small buttons, not as loose words. */
.pagination a {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--blue-40);
  border-radius: var(--radius);
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
}
.pagination a:hover {
  background: var(--blue-10);
}
.pagination {
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
}

/* Change log: the kind of record under its name. */
.record-type {
  display: block;
  font-size: 0.875rem;
}

.sidebar-group + .sidebar-group {
  margin-top: var(--space-5);
}

/* --- Requests (collection/request_*.html, public/request*.html) --- */

.requestchoice td:first-child {
  width: 2.5rem;
}
.requestchoice select {
  max-width: 100%;
}
.request-form .entry {
  margin-bottom: var(--space-5);
}
.request-done-list {
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

/* --- Notifications (notify/_bell.html, notification_list.html, settings.html) --- */

.bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: var(--space-1);
  border-radius: var(--radius);
  text-decoration: none;
}
.bell:hover {
  background: var(--blue-80);
}
.bell:focus-visible {
  outline: var(--focus);
}
.bell-icon {
  fill: currentColor;
}
.bell-count {
  min-width: 1.25rem;
  margin-left: var(--space-1);
  padding: 0 0.35rem;
  border-radius: 1rem;
  /* The darker coral: white on the pure accent misses AA contrast at this size. */
  background: var(--coral-text);
  color: var(--on-dark);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.25rem;
  text-align: center;
}
.notice-list {
  margin: 0 0 var(--space-6);
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.notice {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-5);
  padding: var(--space-5) var(--space-4);
  border-bottom: 1px solid var(--line);
  border-left: 4px solid transparent;
}
/* Unread is also said in words ("New"), not by the edge alone. */
.notice--unread {
  border-left-color: var(--coral);
  background: var(--blue-05);
}
.notice-main {
  min-width: 0;
  max-width: 48rem;
}
.notice-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-1);
  font-size: 0.875rem;
}
.notice-subject {
  margin: 0 0 var(--space-2);
  font-size: 1.0625rem;
  line-height: 1.35;
  text-transform: none;
  letter-spacing: normal;
}
.notice-body {
  margin: 0;
  color: var(--ink-soft);
}
.badge--new {
  background: var(--coral-10);
  color: var(--coral-text);
  font-weight: 600;
}
.notify-grid-help {
  display: block;
  margin-top: var(--space-1);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--ink-soft);
}
.notify-timing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: var(--space-5);
  max-width: 48rem;
}
.notify-timing .fieldset {
  margin: 0;
  padding-bottom: var(--space-4);
}
.notify-settings .form-actions {
  margin-bottom: var(--space-7);
}
.notify-matrix .form {
  margin-bottom: var(--space-5);
}
.notify-matrix-id {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 600;
}
.notify-matrix-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: var(--space-4) 0 var(--space-5);
}
.notify-matrix-change summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 600;
  margin-bottom: var(--space-4);
}
/* === Quick Add (quickadd/*.html) ========================================== */

.quick-status:empty {
  display: none;
}
.quick-toast {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-5);
  margin-bottom: var(--space-5);
  padding: var(--space-4) var(--space-5);
  border-left: 4px solid var(--ok);
  border-radius: var(--radius);
  background: var(--turquoise-10);
}
.quick-toast p {
  margin: 0;
}
.quick-toast form {
  margin: 0;
}
.quick-toast .btn {
  min-height: 2.75rem;
}
.quick-toast--undone,
.quick-toast--late {
  border-left-color: var(--blue);
  background: var(--blue-05);
}
.quick-toast--error {
  border-left-color: var(--coral);
  background: var(--coral-10);
}
.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}
.quick-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
/* An open form takes the whole row, so its fields have room. */
.quick-card:has(.quick-form) {
  grid-column: 1 / -1;
}
.quick-card > form {
  margin: 0;
}
.quick-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 6rem;
  padding: var(--space-4) var(--space-5);
  border: 2px solid var(--blue);
  border-radius: var(--radius);
  background: var(--blue);
  color: var(--on-dark);
  font: inherit;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.quick-btn:hover {
  background: var(--blue-80);
  border-color: var(--blue-80);
}
.quick-btn:focus-visible {
  outline: var(--focus);
  outline-offset: 3px;
}
.quick-btn:disabled {
  cursor: progress;
  background: var(--blue-60);
  border-color: var(--blue-60);
}
/* A button that asks something first: lighter, and marked with an ellipsis. */
.quick-btn--asks {
  background: var(--surface);
  color: var(--blue);
}
.quick-btn--asks::after {
  content: "…";
  margin-left: var(--space-1);
}
.quick-btn--asks:hover,
.quick-btn--asks[aria-expanded="true"] {
  background: var(--blue-10);
  border-color: var(--blue);
}
.quick-count {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.quick-form {
  margin-top: var(--space-2);
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-top: 4px solid var(--turquoise);
  border-radius: var(--radius);
  background: var(--surface);
  max-width: 40rem;
}
.quick-form input,
.quick-form select,
.quick-form .btn {
  min-height: 2.75rem;
}
.quick-day {
  margin-bottom: var(--space-5);
}
.quick-day summary {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--blue);
  font-weight: 600;
  cursor: pointer;
}
.quick-day .field {
  margin: var(--space-2) 0 0;
  max-width: 14rem;
}
.quick-boards .tile {
  min-height: 6rem;
}
.quick-modes {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
}
.quick-modes label {
  min-height: 2.75rem;
  align-items: center;
}
.quick-preset {
  margin-top: var(--space-2);
  max-width: 24rem;
}
.js .quick-choose {
  display: none;
}
.quick-choose {
  margin-top: var(--space-2);
}
@media (max-width: 40rem) {
  .quick-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
  }
  .quick-btn {
    min-height: 5rem;
    font-size: 1.0625rem;
    padding: var(--space-3);
  }
  .quick-form {
    padding: var(--space-4);
  }
}

/* === End of Quick Add ===================================================== */
