/* The salon panel (ADR-044, point 2; stage 2a): mobile first, right to
   left, large touch targets, readable contrast in light and dark. Local
   files only (the vendored Vazirmatn of the admin UI); no inline style, no
   script. The base of stages 2b to 7: tokens, the shell, cards, banners,
   forms, buttons, steps and states. */

@font-face {
  font-family: "Vazirmatn";
  src: url("/static/vendor/vazirmatn/33.0.3/Vazirmatn-wght.woff2") format("woff2-variations"),
       url("/static/vendor/vazirmatn/33.0.3/Vazirmatn-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f7f4f1;
  --surface: #ffffff;
  --surface-muted: #f1ece7;
  --text: #2a2230;
  --text-muted: #5f5566;
  --border: #e2d9d1;
  --brand: #7a2e5c;
  --brand-strong: #5e2147;
  --brand-contrast: #ffffff;
  --focus: #1f6feb;
  --success-bg: #e6f4ea;
  --success-text: #1e5b2e;
  --success-line: #9fd3ae;
  --info-bg: #e8f0fb;
  --info-text: #1f4a7a;
  --info-line: #a9c4ea;
  --warning-bg: #fdf3dc;
  --warning-text: #6b4a00;
  --warning-line: #e8cd84;
  --danger-bg: #fbe9e9;
  --danger-text: #8a1c1c;
  --danger-line: #ecaaaa;
  --radius: 16px;
  --radius-small: 12px;
  --shadow: 0 1px 2px rgb(42 34 48 / 6%), 0 4px 16px rgb(42 34 48 / 6%);
  --tap: 52px;
  --gutter: 16px;
  --max: 640px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17131a;
    --surface: #221c26;
    --surface-muted: #2a232f;
    --text: #f2ecf4;
    --text-muted: #c5bacb;
    --border: #3b3241;
    --brand: #e59ac6;
    --brand-strong: #f2b8d9;
    --brand-contrast: #2a1020;
    --focus: #7ab3ff;
    --success-bg: #183222;
    --success-text: #b6e8c4;
    --success-line: #2e5c3d;
    --info-bg: #172638;
    --info-text: #bcd6f5;
    --info-line: #2f4a6b;
    --warning-bg: #332812;
    --warning-text: #f3dc9e;
    --warning-line: #5f4b1d;
    --danger-bg: #3a1a1c;
    --danger-text: #f6c2c2;
    --danger-line: #6e2c30;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%);
    color-scheme: dark;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.75;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--brand);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  inset-inline-start: var(--gutter);
  top: -100px;
  background: var(--surface);
  color: var(--text);
  padding: 12px 16px;
  border-radius: var(--radius-small);
  z-index: 10;
}

.skip-link:focus {
  top: 8px;
}

/* The test-environment banner of the Display sender (ADR-045, point 4). */
.test-banner {
  background: var(--warning-bg);
  color: var(--warning-text);
  border-bottom: 2px solid var(--warning-line);
  padding: 10px var(--gutter);
  text-align: center;
  font-size: 15px;
}

.test-banner strong {
  margin-inline-end: 8px;
}

/* Header. */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 10px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  min-height: var(--tap);
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.brand-name {
  font-weight: 800;
  font-size: 18px;
}

.brand-sub {
  font-size: 13px;
  color: var(--text-muted);
}

.topbar-salon {
  margin: 0;
  max-width: 50%;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Content. */
.page {
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px var(--gutter) 24px;
}

.page:focus {
  outline: none;
}

.is-member .page {
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}

.footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 8px var(--gutter) 20px;
}

.is-member .footer {
  display: none;
}

.title {
  font-size: 24px;
  line-height: 1.5;
  margin: 4px 0 4px;
  font-weight: 800;
}

.lead {
  margin: 0 0 16px;
  color: var(--text-muted);
}

.eyebrow {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.salon-name {
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* Cards. */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin: 0 0 16px;
}

.card-narrow {
  max-width: 460px;
  margin-inline: auto;
}

.card-muted {
  background: var(--surface-muted);
  box-shadow: none;
}

.card-title {
  margin: 0 0 12px;
  font-size: 18px;
}

/* Status banners. */
.banner {
  border-radius: var(--radius-small);
  border: 1px solid;
  border-inline-start-width: 6px;
  padding: 12px 14px;
  margin: 0 0 16px;
}

.banner p {
  margin: 0;
}

.banner p + p {
  margin-top: 6px;
}

.banner-title {
  font-weight: 800;
  font-size: 17px;
}

.banner-reason {
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.banner-reason-label {
  font-weight: 700;
}

.banner-meta {
  font-size: 14px;
  opacity: 0.85;
}

.banner-success { background: var(--success-bg); color: var(--success-text); border-color: var(--success-line); }
.banner-info { background: var(--info-bg); color: var(--info-text); border-color: var(--info-line); }
.banner-warning { background: var(--warning-bg); color: var(--warning-text); border-color: var(--warning-line); }
.banner-danger { background: var(--danger-bg); color: var(--danger-text); border-color: var(--danger-line); }

/* Steps of a guided flow. */
.steps {
  list-style: none;
  display: flex;
  gap: 8px;
  padding: 0;
  margin: 0 0 16px;
}

.step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
  border-top: 4px solid var(--border);
  padding-top: 8px;
}

.step-dot {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface-muted);
  font-weight: 700;
  font-size: 14px;
}

.step.is-current {
  color: var(--text);
  font-weight: 700;
  border-top-color: var(--brand);
}

.step.is-current .step-dot,
.step.is-done .step-dot {
  background: var(--brand);
  color: var(--brand-contrast);
}

.step.is-done {
  border-top-color: var(--brand);
}

/* Forms. */
.form {
  margin: 0;
}

.field {
  margin: 0 0 16px;
}

.label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

.input {
  width: 100%;
  min-height: var(--tap);
  padding: 10px 14px;
  font: inherit;
  font-size: 20px;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-small);
}

.input:focus {
  border-color: var(--focus);
  outline: none;
  box-shadow: 0 0 0 3px rgb(31 111 235 / 25%);
}

.input[aria-invalid="true"] {
  border-color: var(--danger-text);
}

.input-ltr,
.input-code {
  direction: ltr;
  text-align: center;
  letter-spacing: 0.06em;
}

.input-code {
  font-size: 28px;
  letter-spacing: 0.4em;
  font-variant-numeric: tabular-nums;
}

.input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.hint,
.hint-block {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--text-muted);
}

.hint-block {
  margin: 0 0 12px;
}

.aside {
  margin: 16px 0 0;
  font-size: 15px;
  color: var(--text-muted);
  text-align: center;
}

/* Buttons. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 10px 20px;
  font: inherit;
  font-weight: 700;
  font-size: 17px;
  border-radius: var(--radius-small);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.button-block {
  width: 100%;
}

.button-primary {
  background: var(--brand);
  color: var(--brand-contrast);
}

.button-primary:hover {
  background: var(--brand-strong);
}

.button-secondary {
  background: var(--surface);
  color: var(--brand);
  border-color: var(--brand);
}

.button-danger {
  background: var(--surface);
  color: var(--danger-text);
  border-color: var(--danger-line);
}

.button-quiet {
  background: transparent;
  color: var(--brand);
  padding-inline: 8px;
}

.button + .button,
form + .button {
  margin-top: 10px;
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
}

.actions-row form {
  margin: 0;
}

.divider {
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

/* Facts (label and value). */
.facts {
  margin: 0;
}

.fact {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.fact:last-child {
  border-bottom: 0;
}

.fact dt {
  color: var(--text-muted);
}

.fact dd {
  margin: 0;
  font-weight: 700;
  text-align: end;
  overflow-wrap: anywhere;
}

.number,
.code-shown {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.code-shown {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.2em;
}

.checklist {
  margin: 0;
  padding-inline-start: 20px;
}

.checklist li + li {
  margin-top: 4px;
}

/* A state page: one clear message and one clear action. */
.state {
  text-align: center;
}

.state .lead {
  margin-bottom: 12px;
}

.state p {
  margin: 0 0 16px;
}

.state-mark {
  width: 64px;
  height: 64px;
  margin: 4px auto 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 800;
}

.state-mark-danger { background: var(--danger-bg); color: var(--danger-text); }
.state-mark-warning { background: var(--warning-bg); color: var(--warning-text); }
.state-mark-info { background: var(--info-bg); color: var(--info-text); }

/* Navigation: a bottom tab bar on phones, under the header on wide screens. */
.tabbar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  justify-content: space-around;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 4px 8px calc(4px + env(safe-area-inset-bottom));
}

.tab {
  flex: 1;
  max-width: 160px;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-small);
}

.tab-icon {
  width: 26px;
  height: 26px;
  fill: currentcolor;
}

.tab[aria-current="page"] {
  color: var(--brand);
  font-weight: 800;
  background: var(--surface-muted);
}

@media (min-width: 720px) {
  body {
    font-size: 16px;
  }

  .tabbar {
    position: static;
    justify-content: center;
    gap: 8px;
    border-top: 0;
    border-bottom: 1px solid var(--border);
    padding: 4px var(--gutter);
  }

  .tab {
    flex: 0 1 auto;
    flex-direction: row;
    min-height: 48px;
    padding: 0 16px;
    gap: 8px;
    font-size: 15px;
  }

  .tab-icon {
    width: 20px;
    height: 20px;
  }

  .is-member .page {
    padding-bottom: 24px;
  }

  .is-member .footer {
    display: block;
  }

  .page {
    padding-top: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* Stage 2b: registration, the registration checklist, legal texts and
   notifications. */

.tab {
  position: relative;
}

.badge {
  position: absolute;
  inset-block-start: 4px;
  inset-inline-end: 18%;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-contrast);
  background: var(--brand);
  border-radius: 11px;
}

select.input {
  font-size: 18px;
}

.textarea {
  min-height: 96px;
  font-size: 18px;
  line-height: 1.6;
  resize: vertical;
}

.fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.label-small {
  margin-top: 10px;
  font-size: 15px;
  font-weight: 400;
  color: var(--text-muted);
}

.optional {
  font-weight: 400;
  color: var(--text-muted);
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.choice input[type="checkbox"] {
  width: 26px;
  height: 26px;
  flex: none;
  margin: 2px 0 0;
  accent-color: var(--brand);
}

.choice label {
  font-size: 17px;
  line-height: 1.7;
}

.link-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: grid;
  gap: 8px;
}

.link-list a {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 14px;
  color: var(--brand-strong);
  font-weight: 600;
  background: var(--surface-muted);
  border-radius: var(--radius-small);
}

.actions-steps {
  justify-content: space-between;
  margin-top: 8px;
}

.actions-steps .button-primary {
  flex: 1;
  max-width: 260px;
}

.step-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.facts-compact {
  margin-top: 12px;
}

.checklist-items {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  gap: 12px;
}

.item {
  padding: 14px;
  border: 1px solid var(--border);
  border-inline-start: 6px solid var(--border);
  border-radius: var(--radius-small);
}

.item.is-done {
  border-inline-start-color: var(--success-line);
}

.item.is-todo {
  border-inline-start-color: var(--brand);
}

.item.is-soon {
  background: var(--surface-muted);
}

.item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.item-title {
  margin: 0;
  font-size: 18px;
}

.tag {
  display: inline-block;
  padding: 2px 10px;
  font-size: 14px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.legal-text p {
  white-space: pre-line;
  line-height: 1.9;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 16px;
}

.filter-group {
  display: flex;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.chip[aria-current="true"] {
  color: var(--brand-contrast);
  background: var(--brand);
  border-color: var(--brand);
}

.chip:focus-visible,
.link-list a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.form-inline {
  margin: 0 0 16px;
}

.notice-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.notice.is-unread {
  border-inline-start: 6px solid var(--brand);
}

.notice .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-inline-end: 8px;
  vertical-align: middle;
  background: var(--brand);
  border-radius: 50%;
}

.notice-body {
  white-space: pre-line;
}

/* Stage 3a: the salon's data (hub, section editors, services, the price
   tool, the changes and the history). No script: the fields that follow a
   choice are shown with :has() where the browser knows it, and are all shown
   where it does not (the server reads only the chosen ones). */

.tab {
  text-align: center;
  line-height: 1.4;
}

@media (max-width: 400px) {
  .tab {
    font-size: 12.5px;
  }
}

.icon {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.banner-brand {
  background: var(--surface);
  color: var(--text);
  border-color: var(--brand);
}

.banner .button {
  margin-top: 12px;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.back::before {
  content: "→";
}

.back:hover {
  text-decoration: underline;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
}

.tag-success { color: var(--success-text); background: var(--success-bg); border-color: var(--success-line); }
.tag-info { color: var(--info-text); background: var(--info-bg); border-color: var(--info-line); }
.tag-warning { color: var(--warning-text); background: var(--warning-bg); border-color: var(--warning-line); }
.tag-danger { color: var(--danger-text); background: var(--danger-bg); border-color: var(--danger-line); }
.tag-brand { color: var(--brand); border-color: var(--brand); font-weight: 600; }
.tag-muted { background: var(--surface-muted); }

.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 0 0 16px;
}

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 104px;
  padding: 14px 10px;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.tile .icon {
  width: 30px;
  height: 30px;
  color: var(--brand);
}

.tile:hover {
  border-color: var(--brand);
}

.progress-line {
  margin: 0 0 16px;
}

.progress-text {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  color: var(--text-muted);
}

.progress {
  width: 100%;
  height: 10px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: var(--border);
  accent-color: var(--brand);
}

.progress::-webkit-progress-bar {
  background: var(--border);
}

.progress::-webkit-progress-value {
  background: var(--brand);
  border-radius: 999px;
}

.progress::-moz-progress-bar {
  background: var(--brand);
}

.hub,
.days,
.service-list,
.check-list,
.rows {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hub {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.hub-card {
  margin: 0;
  scroll-margin-top: 16px;
}

.hub-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.hub-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  color: var(--brand);
  background: var(--surface-muted);
  border-radius: 14px;
}

.hub-names .card-title,
.hub-names .hint {
  margin: 0;
}

.summary {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}

.summary li {
  padding: 4px 0;
}

.summary li + li {
  border-top: 1px dashed var(--border);
}

.summary-empty {
  margin: 0 0 12px;
  color: var(--text-muted);
}

.summary-label {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
}

.summary-draft {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: var(--surface-muted);
  border-inline-start: 4px solid var(--brand);
  border-radius: var(--radius-small);
}

.summary-draft .summary {
  margin: 0;
}

.card-notice {
  border-color: var(--warning-line);
  border-inline-start: 6px solid var(--warning-line);
}

.save-bar {
  position: sticky;
  bottom: calc(76px + env(safe-area-inset-bottom));
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 16px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgb(42 34 48 / 14%);
}

.save-bar .button-primary {
  flex: 1;
  max-width: 320px;
}

.save-bar .button + .button,
.toolbar .button + .button,
.service-actions .button + .button {
  margin-top: 0;
}

fieldset[disabled] .input,
fieldset[disabled] .segmented label,
fieldset[disabled] .choice {
  opacity: 0.75;
}

.segmented {
  position: relative;
  display: flex;
  margin-bottom: 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius-small);
  overflow: hidden;
}

.segmented input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.segmented label {
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 48px;
  padding: 6px 8px;
  text-align: center;
  font-weight: 600;
  cursor: pointer;
}

.segmented label + input + label {
  border-inline-start: 1px solid var(--border);
}

.segmented input:checked + label {
  color: var(--brand-contrast);
  background: var(--brand);
}

.segmented input:focus-visible + label {
  outline: 3px solid var(--focus);
  outline-offset: -3px;
}

.choice {
  min-height: 48px;
  align-items: center;
}

.choice input[type="radio"] {
  width: 24px;
  height: 24px;
  flex: none;
  margin: 0;
  accent-color: var(--brand);
}

.choice label {
  flex: 1;
  padding: 8px 0;
}

.choice-small {
  min-height: 44px;
}

.choice-small label {
  font-size: 15px;
}

.day-name {
  padding: 0;
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 800;
}

.interval {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
  margin-bottom: 8px;
}

.interval .choice {
  grid-column: 1 / -1;
}

.interval .label-small {
  display: block;
  margin: 0 0 4px;
}

.input-time {
  direction: ltr;
  text-align: center;
  font-size: 18px;
  padding: 10px 6px;
}

.more > summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
  font-weight: 600;
  color: var(--brand);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
}

.toolbar .button-primary {
  flex: 1 1 160px;
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.filter-form .field {
  margin-bottom: 12px;
}

.filter-form .input,
.filter-row .input {
  font-size: 17px;
}

.filter-form .actions-row {
  margin-top: 0;
  justify-content: flex-end;
}

.count {
  margin: 0 0 12px;
}

.group-title {
  margin: 16px 0 8px;
  font-size: 18px;
}

.service-list {
  display: grid;
  gap: 12px;
}

.service {
  margin: 0;
  padding: 16px;
}

.service-name {
  margin: 0 0 4px;
  font-size: 18px;
  overflow-wrap: anywhere;
}

.service-price {
  margin: 0;
}

.old-price {
  margin-inline-end: 8px;
  color: var(--text-muted);
}

.service-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.service-actions .button-secondary {
  flex: 1;
}

.button-remove {
  color: var(--danger-text);
}

.row-line {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.row-name {
  display: block;
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
  margin-bottom: 12px;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.price-table th,
.price-table td {
  padding: 10px 8px;
  text-align: start;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.price-table tbody th {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.change {
  margin: 0 0 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.change:last-child {
  border-bottom: 0;
}

.change dt {
  font-weight: 700;
}

.change dd {
  margin: 4px 0 0;
  padding: 6px 10px;
  border-radius: 8px;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.change .change-field {
  padding: 4px 0 0;
  font-size: 14px;
  color: var(--text-muted);
}

.change-old {
  color: var(--danger-text);
  background: var(--danger-bg);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.change-new {
  color: var(--success-text);
  background: var(--success-bg);
  font-weight: 600;
}

.change-title {
  margin: 8px 0 4px;
  font-size: 16px;
}

.submit-box {
  margin: 0 0 16px;
}

.discard {
  margin-bottom: 16px;
}

.history-row {
  margin: 0;
  padding: 14px 16px;
}

.history-name {
  margin: 0;
  font-weight: 700;
}

.kind-one,
.kind-from {
  display: none;
}

/* The FAQ's list (Issue #88): each question with its answer and its steps. */
.faq-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.faq-question {
  font-size: 17px;
}

.faq-place {
  color: var(--text-muted);
}

.faq-answer {
  white-space: pre-line;
}

.faq-actions form {
  display: inline-flex;
  gap: 8px;
}

@supports selector(:has(*)) {
  .any-kind {
    display: none;
  }

  .price-form:not(:has(input[value="range"]:checked)) .amount-max,
  .price-form:not(:has(input[value="fixed"]:checked, input[value="range"]:checked, input[value="from"]:checked)) .amount-min,
  .price-form:not(:has(input[value="fixed"]:checked, input[value="range"]:checked, input[value="from"]:checked)) .amount-hint {
    display: none;
  }

  .price-form:has(input[value="fixed"]:checked) .kind-one,
  .price-form:has(input[value="range"]:checked) .kind-from,
  .price-form:has(input[value="from"]:checked) .kind-from {
    display: inline;
  }

  .price-form:not(:has(input[value="range"]:checked)) .filter-row {
    grid-template-columns: 1fr;
  }

  .hours-form:not(:has(#known-yes:checked)) .days,
  .day:not(:has(input[value="open"]:checked)) .intervals {
    display: none;
  }

  .ai-form:not(:has(#deposit-amount:checked)) .deposit-amount,
  .ai-form:not(:has(#deposit-percent:checked)) .deposit-percent,
  .price-tool:not(:has(#scope-category:checked)) .scope-category,
  .price-tool:not(:has(#scope-selected:checked)) .scope-selected,
  .price-tool:not(:has(#mode-percent:checked)) .mode-percent,
  .price-tool:not(:has(#mode-amount:checked)) .mode-amount {
    display: none;
  }
}

@media (max-width: 719px) {
  .wide-only {
    display: none;
  }
}

@media (min-width: 720px) {
  .tiles {
    grid-template-columns: repeat(3, 1fr);
  }

  .save-bar {
    bottom: 12px;
  }

  .interval {
    grid-template-columns: 1fr 1fr auto;
    align-items: end;
  }

  .interval .choice {
    grid-column: auto;
  }
}

@media (max-width: 519px) {
  .price-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .price-table tr {
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
  }

  .price-table th,
  .price-table td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
    border: 0;
  }

  .price-table td::before {
    content: attr(data-label);
    color: var(--text-muted);
    font-size: 14px;
  }
}
