/* Settings: a grouped menu beside each settings page; on a phone, the Settings home page is the menu. */
.settings { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: var(--space-8); align-items: start; }
.settings__menu { position: sticky; top: calc(56px + var(--space-6)); display: flex; flex-direction: column; gap: var(--space-1); }
.settings__menu ul { list-style: none; padding: 0; margin: 0 0 var(--space-3); display: flex; flex-direction: column; gap: 1px; }
.settings__group { font-size: var(--text-xs); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-tertiary); padding: 0 var(--space-3); margin: 0 0 var(--space-1); }
.settings__link { display: block; padding: 6px var(--space-3); border-radius: var(--radius); color: var(--text-secondary); text-decoration: none; font-size: var(--text-sm); font-weight: 500; }
.settings__link:hover { background: var(--surface-muted); color: var(--text); }
.settings__link[aria-current="page"] { background: var(--surface-muted); color: var(--text); font-weight: 600; }

.settings__home { display: grid; grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr)); gap: var(--space-6); }
.settings__home h2 { font-size: var(--text-sm); color: var(--text-secondary); }

.labour__holidays-header { margin-top: var(--space-2); }
.labour__holidays-title { font-size: var(--text-sm); color: var(--text-secondary); margin: 0 var(--space-2) 0 0; }
.holidays { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: var(--space-1) var(--space-6); margin: 0; }
.holidays div { display: flex; align-items: baseline; gap: var(--space-3); font-size: var(--text-sm); }
.holidays dt { flex: 0 0 6.5rem; color: var(--text-secondary); }
.holidays dd { flex: 1; min-width: 0; margin: 0; }
/* A holiday added here: its badge and Delete, under the name. */
.holidays__local { display: flex; align-items: center; gap: var(--space-2); white-space: nowrap; }

/* A rule's citation or a holiday's name, linked to the official text it comes from: in the color of the words around
   it, with a quiet underline that darkens on hover. */
.source-link { color: inherit; text-decoration-color: var(--border-strong); }
.source-link:hover { text-decoration-color: currentColor; }

/* What a rule pack's update changed in a rule changed here, under the rule, with Dismiss for admins. */
.labour__pack-changes { margin-top: var(--space-1); }
.labour__pack-changes p { margin: 0; }
.labour__pack-changes form { align-self: flex-start; }

/* Labor rules → All: a line for each jurisdiction, by country, that opens to its rules and holidays. */
.labour__jurisdiction { padding: var(--space-3) var(--space-4); }
.labour__jurisdiction + .labour__jurisdiction { border-top: 1px solid var(--border); }
.labour__jurisdiction summary {
  display: flex; align-items: center; gap: var(--space-2); list-style: none; cursor: pointer; font-weight: 500;
  &::-webkit-details-marker { display: none; }
  &::before { content: "›" / ""; display: inline-block; width: var(--space-3); text-align: center; color: var(--text-tertiary); transition: transform .15s ease; }
}
.labour__jurisdiction details[open] > summary { margin-bottom: var(--space-3); }
.labour__jurisdiction details[open] > summary::before { transform: rotate(90deg); }

@media (max-width: 768px) {
  .settings { grid-template-columns: minmax(0, 1fr); } /* (1fr can't shrink below a wide table: the page would scroll sideways) */
  .settings__menu { display: none; }
}

/* Settings → Connections → Add a connection: what to connect, above its form. */
.connection-kind { margin-block-end: var(--space-4); }

/* Settings → Licence → the licence agreement, also open to anyone signed out (setting up links it). */
.agreement { max-width: 46rem; }
.agreement h2 { margin-top: var(--space-3); }
.agreement ul, .agreement ol { padding-left: var(--space-5); display: flex; flex-direction: column; gap: var(--space-2); }

/* Settings → Exceptions (#482): an auto-approve limit means something only for a kind that waits for review. */
.exception-type:has(select[name$="[counts_when_reported]"] option[value="true"]:checked) .exception-type__auto-approve { display: none; }
