:root {
  color-scheme: light;
  --bg: #F7F7F5;
  --surface: #FFFFFF;
  --text: #2C2C2A;
  --text-2: #5F5E5A;
  --border: #E4E2DA;
  --accent: #185FA5;
  --on-accent: #FFFFFF;
  --danger: #A32D2D;
  --danger-bg: #FCEBEB;
  --ok-bg: #EAF3DE;
  --ok-text: #27500A;
  --warn-bg: #FAEEDA;
  --warn-text: #633806;
  --coral: #FAECE7;
  --coral-text: #712B13;
  --holiday: var(--coral);
  --holiday-text: var(--coral-text);
  --weekend: #F1EFE8;
  --leave: #F1EFE8;
  --leave-text: #444441;
  --muted: #76756F;
  --rule: #C9C7BE;
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%235F5E5A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --mail-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2376756F' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.75' y='4.75' width='14.5' height='10.5' rx='2'/%3E%3Cpath d='m3.5 6 6.5 5 6.5-5'/%3E%3C/svg%3E");

  --amber: #FAEEDA;  --amber-text: #633806;  --amber-solid: #854F0B;
  --teal: #E1F5EE;   --teal-text: #085041;   --teal-solid: #0F6E56;
  --purple: #EEEDFE; --purple-text: #3C3489; --purple-solid: #534AB7;
  --pink: #FBEAF0;   --pink-text: #72243E;   --pink-solid: #993556;
  --blue: #E6F1FB;   --blue-text: #0C447C;   --blue-solid: #185FA5;
  --red: #FCEBEB;    --red-text: #791F1F;
  --green: #EAF3DE;  --green-text: #27500A;
  --on-solid: #FFFFFF;
}

/* The chosen public holiday colour. Everything holiday-coloured reads these two tokens. */
.holiday-green { --holiday: var(--green); --holiday-text: var(--green-text); }
.holiday-red { --holiday: var(--red); --holiday-text: var(--red-text); }
.holiday-pink { --holiday: var(--pink); --holiday-text: var(--pink-text); }
.holiday-blue { --holiday: var(--blue); --holiday-text: var(--blue-text); }
.holiday-amber { --holiday: var(--amber); --holiday-text: var(--amber-text); }
.holiday-teal { --holiday: var(--teal); --holiday-text: var(--teal-text); }
.holiday-purple { --holiday: var(--purple); --holiday-text: var(--purple-text); }
.holiday-grey { --holiday: var(--leave); --holiday-text: var(--leave-text); }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.5 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

h1, h2 { font-weight: 500; line-height: 1.25; margin: 0; }
h1 { font-size: 22px; }
h2 { font-size: 15px; }
strong { font-weight: 500; }
p { margin: 0; }
a { color: var(--accent); }
ul { list-style: none; margin: 0; padding: 0; }

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

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

/* Layout */

.topbar {
  display: flex; align-items: center; gap: 24px;
  max-width: 1528px; margin: 0 auto; padding: 12px 24px;
  border-bottom: 1px solid var(--border);
}
.brand { font-weight: 500; font-size: 15px; color: var(--text); text-decoration: none; }
.topnav { display: flex; gap: 4px; flex: 1; }
.topnav a { padding: 6px 12px; border-radius: 8px; color: var(--text-2); text-decoration: none; white-space: nowrap; }
.topnav a:hover { background: var(--weekend); }
.topnav a[aria-current] { color: var(--text); background: var(--weekend); font-weight: 500; }

.page { max-width: 1528px; margin: 0 auto; padding: 24px; }
.section { margin-top: 24px; }
.section > h2 { margin-bottom: 8px; }

.tabs { display: none; }

.subtabs { display: flex; gap: 4px; margin: 12px 0 0; overflow-x: auto; border-bottom: 1px solid var(--border); }
.subtabs a { padding: 8px 12px; color: var(--text-2); text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subtabs a[aria-current] { color: var(--text); font-weight: 500; border-bottom-color: var(--accent); }

.project-filter { display: flex; width: fit-content; max-width: 100%; margin: 8px 0 12px; overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.project-filter a { padding: 4px 12px; font-size: 13px; color: var(--text-2); text-decoration: none; white-space: nowrap; }
.project-filter a + a { border-left: 1px solid var(--border); }
.project-filter a[aria-current] { background: var(--weekend); color: var(--text); font-weight: 500; }
.project-heading { margin: 20px 0 8px; }


.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.list { overflow: hidden; }
.list > * + * { border-top: 1px solid var(--border); }
.list-row { display: block; padding: 12px 16px; color: var(--text); text-decoration: none; }

.sub { color: var(--text-2); }
.meta { color: var(--text-2); font-size: 13px; }
.optional { color: var(--text-2); font-weight: 400; }
.tag { display: inline-block; padding: 0 6px; border-radius: 6px; font-size: 13px; background: var(--weekend); color: var(--text-2); }

.notice, .alert { padding: 8px 12px; border-radius: 8px; margin-bottom: 16px; }
.notice { background: var(--ok-bg); color: var(--ok-text); }
.alert { background: var(--danger-bg); color: var(--danger); }
.alert a { color: inherit; }

/* Controls */

button, .btn, .btn-primary, input, select {
  font: inherit; color: inherit; border-radius: 8px;
}
button, .btn, .btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 36px; padding: 6px 14px;
  background: var(--surface); border: 1px solid var(--border);
  text-decoration: none; cursor: pointer;
}
button:hover, .btn:hover { background: var(--weekend); }
.btn-primary, button.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 500; }
.btn-primary:hover, button.btn-primary:hover { background: var(--accent); filter: brightness(0.92); }
.btn-danger { color: var(--danger); }
.btn-link, button.btn-link { background: none; border: none; padding: 4px 0; min-height: 0; color: var(--accent); text-decoration: underline; }
.btn-link:hover, button.btn-link:hover { background: none; }
.btn-link-danger, button.btn-link-danger { color: var(--danger); }
.logout { flex: none; }
.logout .btn-logout { min-height: 32px; padding: 4px 12px; }
button.btn-logout, button.btn-reset { background: var(--danger); border-color: var(--danger); color: var(--surface); font-weight: 500; }
button.btn-logout:hover, button.btn-reset:hover { background: var(--danger); filter: brightness(0.92); }

.theme-switch { display: inline-flex; flex: none; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.theme-switch button { min-height: 28px; padding: 2px 8px; font-size: 13px; color: var(--text-2); background: none; border: none; border-radius: 0; }
.theme-switch button + button { border-left: 1px solid var(--border); }
.theme-switch button:hover { background: var(--weekend); }
.theme-switch button:focus-visible { outline-offset: -2px; }
.theme-switch button[aria-pressed='true'] { background: var(--weekend); color: var(--text); font-weight: 500; }
.theme-switch + .meta { margin-top: 8px; }

input, select { width: 100%; min-height: 36px; padding: 6px 10px; background: var(--surface); border: 1px solid var(--border); }
select { appearance: none; padding-right: 32px; background-image: var(--chevron); background-repeat: no-repeat; background-position: right 10px center; background-size: 12px; }
input[type='radio'], input[type='checkbox'] { width: auto; min-height: 0; }
input.short { display: block; max-width: 90px; }

label { display: block; font-size: 13px; color: var(--text-2); }
label input, label select { margin-top: 4px; color: var(--text); font-size: 15px; }
label.check { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
label.check input { margin: 0; }

.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 12px; }
.fields .wide { grid-column: 1 / -1; }
.inline-form { display: flex; gap: 8px; align-items: center; max-width: 480px; }
.inline-form select { flex: 1; min-width: 0; }
.inline-form button { flex: none; white-space: nowrap; }

.form-card { padding: 12px 16px; margin-top: 8px; }
.form-card > summary, .off-list > summary { cursor: pointer; font-weight: 500; }
.form-card[open] > summary { margin-bottom: 12px; }
.form-card form + form { margin-top: 12px; }
.form-card > summary .chip { margin-right: 4px; }

/* Add sits at the right of the heading, and its form opens under it */

.add-wrap { position: relative; }
.add-wrap > h1, .add-wrap > h2 { display: flex; align-items: center; min-height: 36px; padding-right: 150px; }
.add-toggle { position: absolute; top: 0; right: 0; min-height: 36px; white-space: nowrap; list-style: none; cursor: pointer; }
.add-toggle::-webkit-details-marker { display: none; }
.add-form:not([open]) .add-open, .add-form[open] .add-closed { display: none; }
.add-form > form { margin-bottom: 8px; border-color: var(--accent); }
.off-list { padding: 12px 16px; margin-top: 8px; }
.off-list .sub { margin-top: 8px; }

.pager { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); text-decoration: none; font-size: 20px; line-height: 1;
}
/* Both arrows sit before the title, so they stay put whichever month or day is showing */

.month-pager h1, .month-pager h2 { order: 1; margin-left: 4px; font-size: 22px; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .pager { margin-bottom: 0; }
.toolbar .project-filter { margin: 0; }
.staff-toolbar { margin-top: 24px; }
.back-link { margin-bottom: 8px; }
.back-link a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.back-link a:hover { text-decoration: underline; }
.back-link a::before { content: ''; flex: none; width: 7px; height: 7px; border-bottom: 1.5px solid; border-left: 1.5px solid; transform: rotate(45deg); }
.day-summary { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.day-summary a { flex: none; font-weight: 500; text-decoration: none; }

/* Chips and swatches */

.chip {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 22px; padding: 0 5px; border-radius: 6px;
  font-size: 12px; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums;
  background: transparent; color: var(--muted);
}
.sw-amber { background: var(--amber); color: var(--amber-text); }
.sw-teal { background: var(--teal); color: var(--teal-text); }
.sw-purple { background: var(--purple); color: var(--purple-text); }
.sw-pink { background: var(--pink); color: var(--pink-text); }
.sw-blue { background: var(--blue); color: var(--blue-text); }
.sw-red { background: var(--red); color: var(--red-text); }
.sw-green { background: var(--green); color: var(--green-text); }
.sw-coral { background: var(--coral); color: var(--coral-text); }
.sw-grey { background: var(--leave); color: var(--leave-text); }
.chip-ph { background: var(--holiday); color: var(--holiday-text); }
.chip-nw { box-shadow: inset 0 0 0 1px var(--text-2); color: var(--text-2); }
.chip-off { color: var(--muted); font-weight: 400; }

/* Overtime is solid in its shift's colour, so it stands out from the pale shifts around it */
.ot-amber { --solid: var(--amber-solid); }
.ot-teal { --solid: var(--teal-solid); }
.ot-purple { --solid: var(--purple-solid); }
.ot-pink { --solid: var(--pink-solid); }
.ot-blue { --solid: var(--blue-solid); }
.ot { background: var(--solid); color: var(--on-solid); }
.ot .tail { --tail: var(--on-solid); }
.ot .earned-mark { color: inherit; }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 0; border: none; }
.swatches legend { font-size: 13px; color: var(--text-2); padding: 0; margin-bottom: 4px; }
.swatch { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; font-size: 13px; cursor: pointer; }
.swatch input { margin: 0; }
.swatch.sw-amber { color: var(--amber-text); }
.swatch.sw-teal { color: var(--teal-text); }
.swatch.sw-purple { color: var(--purple-text); }
.swatch.sw-pink { color: var(--pink-text); }
.swatch.sw-blue { color: var(--blue-text); }

/* Today */

.holiday-banner { background: var(--holiday); color: var(--holiday-text); padding: 8px 12px; border-radius: 8px; margin-top: 12px; }
.holiday-banner .tag { background: transparent; color: inherit; padding: 0; }
.day-group { padding: 12px 16px; margin-top: 12px; }
.day-group h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.count { margin-left: auto; color: var(--text-2); font-weight: 400; }

/* Anyone at work right now breathes slowly */

@keyframes breathe { 0%, 100% { opacity: .12; } 50% { opacity: 1; } }
@keyframes breathe-dot { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
.is-on-now { position: relative; border-color: var(--accent); }
.is-on-now::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; box-shadow: 0 0 12px 2px color-mix(in srgb, var(--accent) 45%, transparent); pointer-events: none; animation: breathe 4s ease-in-out infinite; }
.is-working-now::before { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 10px 1px currentColor; pointer-events: none; animation: breathe 4s ease-in-out infinite; }
.on-now { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: var(--accent); font-size: 13px; }
.on-now::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: breathe-dot 4s ease-in-out infinite; }
.person { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; min-height: 34px; }
.list > .person { padding: 10px 16px; }
.person strong { display: block; }
.person .meta { display: block; }
.list .backup { padding: 10px 16px; }
.balance-more .backup + .backup { border-top: 1px solid var(--border); }
.backup-actions { display: flex; align-items: center; gap: 16px; flex: none; }
button.backup-more { display: block; width: 100%; min-height: 0; padding: 10px 16px; border: none; border-top: 1px solid var(--border); border-radius: 0; background: none; color: var(--accent); text-align: left; }
.day-group .person .meta { text-align: right; }
.nobody { color: var(--danger); padding: 4px 0; }
.empty { padding: 24px; margin-top: 12px; }
.empty h2 { font-size: 18px; margin-bottom: 4px; }
.empty .btn-primary { margin-top: 12px; }

/* Month */

.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 12px 0; font-size: 13px; color: var(--text-2); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }

.roster-wrap { overflow: auto; max-height: calc(100vh - 220px); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.roster { width: 100%; min-width: calc(140px + 31 * 33px); table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 13px; font-variant-numeric: tabular-nums; }
.roster th, .roster td { padding: 0; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); background: var(--surface); }
.roster tbody tr:last-child > * { border-bottom: none; }
.roster tr > *:last-child { border-right: none; }

.roster thead th { position: sticky; top: 0; z-index: 2; font-weight: 400; color: var(--text-2); }
.roster thead th a { display: block; min-width: 33px; padding: 8px 0; color: inherit; text-decoration: none; text-align: center; line-height: 1.3; }
.roster thead th span { display: block; font-size: 12px; }

.roster .name-col { position: sticky; left: 0; z-index: 1; width: 140px; min-width: 140px; max-width: 140px; padding: 0 10px; text-align: left; font-weight: 400; color: var(--text); }
.roster .name-col span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roster thead .name-col { z-index: 3; color: var(--text-2); }

.roster .is-weekend { background: var(--weekend); }
.roster thead .is-holiday { background: var(--holiday); color: var(--holiday-text); }
.roster td.is-holiday .cell-off { background: var(--holiday); color: var(--holiday-text); }
.roster .people-on .is-holiday { background: var(--holiday); color: var(--holiday-text); }
/* A bar on a public holiday's date, so it still reads when the column is full of shift colours. */
.roster thead .is-holiday { box-shadow: inset 0 4px 0 var(--holiday-text); }
/* Today's header is filled, so its date stays in line with the rest. A holiday bar still shows on top. */
.roster thead th.is-today { background: var(--accent); color: var(--on-accent); }
.cell-vacant, .chip-vacant { color: var(--danger); background: transparent; outline: 1.5px dashed var(--danger); outline-offset: -3px; text-decoration: none; }
.roster .day-filler { border-color: transparent; }
.roster .next-month { opacity: .4; }
.roster .month-edge { border-left: 2px solid var(--muted); }
.roster thead .next-date { padding: 8px 0; line-height: 1.3; text-align: center; }
.next-month .cell:hover { outline: none; }
.next-month .cell-ph { background: var(--holiday); color: var(--holiday-text); }
.roster .people-on > * { height: 36px; text-align: center; font-weight: 500; font-size: 12px; }
.roster .people-on .name-col { text-align: left; }
.roster .people-on .is-nobody { background: var(--danger-bg); color: var(--danger); }
.attention { color: var(--danger); }
.roster thead .is-today a { font-weight: 600; }

.cell {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 100%; min-width: 33px; height: 42px; min-height: 0; padding: 0; border: none; border-radius: 0;
  font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums;
}
.cell:hover { outline: 2px solid var(--text-2); outline-offset: -2px; }
.cell:focus-visible { outline-offset: -2px; }
button.cell { background: transparent; }
button.cell.sw-amber { background: var(--amber); }
button.cell.sw-teal { background: var(--teal); }
button.cell.sw-purple { background: var(--purple); }
button.cell.sw-pink { background: var(--pink); }
button.cell.sw-blue { background: var(--blue); }
button.cell.sw-red { background: var(--red); }
button.cell.sw-green { background: var(--green); }
button.cell.sw-coral { background: var(--coral); }
button.cell.sw-grey { background: var(--leave); }
button.cell.ot { background: var(--solid); }
button.cell.cell-ph { background: var(--holiday); color: var(--holiday-text); }
.cell-nw { color: var(--text-2); box-shadow: inset 0 0 0 1px var(--text-2); }
.cell-off { color: var(--muted); font-weight: 400; }
button.cell.cell-ro, .next-month .cell-ro, .chip-ro { background: var(--leave); color: var(--leave-text); }
.earned-mark { position: absolute; right: 3px; bottom: 1px; font-size: 9px; font-weight: 500; line-height: 1.2; color: var(--ok-text); }
.earned-key { color: var(--ok-text); font-weight: 500; }
.tag-earned { background: var(--ok-bg); color: var(--ok-text); font-weight: 400; }
.is-changed::after { content: ''; position: absolute; top: 3px; right: 3px; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.tail { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: color-mix(in srgb, var(--tail) 45%, transparent); }
.tail.is-now { width: 4px; background: var(--tail); animation: tail-pulse 2s ease-in-out infinite; }
@keyframes tail-pulse { 50% { opacity: 0.3; } }
.tail-amber { --tail: var(--amber-text); }
.tail-teal { --tail: var(--teal-text); }
.tail-purple { --tail: var(--purple-text); }
.tail-pink { --tail: var(--pink-text); }
.tail-blue { --tail: var(--blue-text); }
.tail-key { position: relative; display: inline-block; width: 30px; height: 22px; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.project-block + .project-block { margin-top: 28px; }
.project-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 8px; }
.project-block .project-heading { margin: 0; }
.project-heading .meta { font-weight: 400; }
.shift-legend { margin: 0 0 0 auto; }
.project-block .holiday-list { margin-top: 8px; font-size: 13px; }
.project-block .holiday-list li { padding: 2px 0; }

/* On a phone, days run down the page, so nothing scrolls sideways */

.roster-down { display: none; }
.roster-days { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 12px; font-variant-numeric: tabular-nums; }
.roster-days th, .roster-days td { padding: 0; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); background: var(--surface); }
.roster-days tr > *:last-child { border-right: none; }
.roster-days tbody tr:last-child > * { border-bottom: none; }
.roster-days .week-start > * { border-top: 1px solid var(--muted); }
.roster-days thead th { position: sticky; top: 0; z-index: 2; height: 40px; padding: 0 4px; overflow: hidden; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.roster-days .date-col { width: 44px; padding: 0; scroll-margin-top: 40px; }
.roster-days .date-col a { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 46px; color: var(--text); line-height: 1.15; text-decoration: none; }
.date-number { font-size: 15px; font-weight: 500; }
.date-day { font-size: 10px; font-weight: 400; color: var(--text-2); }
.roster-days tbody .is-weekend { background: var(--weekend); }
.roster-days tbody .is-holiday { background: var(--holiday); }
.roster-days tbody .has-holiday { box-shadow: inset 4px 0 0 var(--holiday-text); }
.roster-days .is-holiday a, .roster-days .is-holiday .date-day { color: var(--holiday-text); }
.roster-days tbody .is-wrong { background: var(--danger-bg); }
.roster-days .is-wrong a, .roster-days .is-wrong .date-day { color: var(--danger); }
/* Today's date is filled, like its header on a computer. A problem that day shows as a red bar on the right. */
.roster-days tbody .date-col.is-today { background: var(--accent); }
.roster-days .date-col.is-today a, .roster-days .date-col.is-today .date-day { color: var(--on-accent); }
.roster-days tbody .date-col.is-today.is-wrong { box-shadow: inset -4px 0 0 var(--danger); }
.roster-days tbody .date-col.is-today.is-wrong.has-holiday { box-shadow: inset 4px 0 0 var(--holiday-text), inset -4px 0 0 var(--danger); }

/* The key under the Month tables */

.reset-card { max-width: 560px; margin-top: 12px; }
.reset-card h2 { margin: 12px 0 4px; font-size: 13px; color: var(--text-2); }
.reset-card h2:first-child { margin-top: 0; }
.reset-line { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.reset-card form { margin-top: 12px; }
.reset-card .form-hint { margin-top: 12px; }
.key { margin-top: 28px; padding: 16px 20px 20px; }
.key > h2 { margin-bottom: 16px; }
.key-groups { display: grid; grid-template-columns: repeat(5, auto); justify-content: space-between; gap: 24px 32px; }
.key-shifts li { white-space: nowrap; }
.key-hours { margin-left: 4px; }
.key h3 { margin-bottom: 12px; color: var(--text-2); font-size: 13px; font-weight: 500; }
.key ul { display: grid; gap: 10px; }
.key li { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.key .chip, .key .tail-key { flex: none; width: 32px; min-width: 32px; height: 22px; padding: 0; }
@media (max-width: 1239px) {
  .key-groups { grid-template-columns: repeat(3, auto); }
  .key-shifts li { white-space: normal; }
}

.still-on { margin: 0 0 12px; font-size: 13px; color: var(--text-2); }
.still-on strong { color: var(--text); }

.holiday-list li { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 4px 0; }
.holiday-date { min-width: 56px; color: var(--text-2); font-variant-numeric: tabular-nums; }

dialog {
  width: min(460px, calc(100vw - 32px)); padding: 20px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 40px rgb(0 0 0 / 0.25);
}
dialog[open] { animation: fade 120ms ease-out; }
dialog::backdrop { background: rgb(0 0 0 / 0.4); }
dialog h2 { font-size: 18px; }
@keyframes fade { from { opacity: 0; } }
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; margin-top: 12px; }
.options button { justify-content: flex-start; min-height: 44px; text-align: left; }
.options button[hidden] { display: none; }
.dialog-foot { display: flex; justify-content: space-between; margin-top: 12px; }

/* Staff */

.staff-row { padding: 12px 16px; scroll-margin: 8px 0 80px; }
.staff-main { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; }
.staff-who { flex: 1; min-width: 0; }
.staff-main strong { display: block; }
.staff-main a { flex: none; }
.staff-main a[aria-expanded='true']::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-top: 1.5px solid; border-left: 1.5px solid; transform: translateY(1px) rotate(45deg); }
.staff-editor { display: grid; grid-template-rows: 0fr; margin: 0 -16px; background: var(--bg); transition: grid-template-rows 200ms ease-out, margin 200ms ease-out; }
.staff-editor.is-open { grid-template-rows: 1fr; margin: 12px -16px -12px; }
.staff-editor-clip { min-height: 0; overflow: hidden; }
.staff-editor-body { padding: 12px 16px; border-top: 1px solid var(--border); }
.staff-editor-body:focus { outline: none; }
.staff-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.staff-cards > .form-card { display: flex; flex-direction: column; min-width: 0; margin-top: 0; }
.staff-cards h2 { margin-bottom: 8px; }
.staff-cards form { display: flex; flex: 1; flex-direction: column; }
.staff-cards form[hidden] { display: none; }
.staff-cards .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 0; }
.staff-cards .fields-single { grid-template-columns: minmax(0, 1fr); }
.staff-cards .form-hint { margin: 8px 0 0; }
.field-note { display: block; margin-top: 4px; }
.fields .check { align-self: end; min-height: 36px; margin-bottom: 0; }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; }
.staff-cards > .staff-calendar { display: none; grid-column: 1 / -1; }
.staff-page { display: grid; gap: 12px; margin-top: 12px; }
.staff-page > * { min-width: 0; }
.staff-month { margin-top: 0; }
.staff-month .chips { margin-top: 8px; }
.staff-row > .notice, .staff-row > .alert { margin-bottom: 12px; }
.fold-toggle { display: none; }
.calendar { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 2px; }
.calendar th { padding: 0 0 4px; font-size: 13px; font-weight: 400; color: var(--text-2); text-align: center; }
.calendar td { position: relative; padding: 4px; border-radius: 6px; vertical-align: top; }
.calendar .is-weekend { background: var(--weekend); }
.calendar-top { display: flex; align-items: center; gap: 4px; }
.calendar-date { flex: none; width: 22px; height: 22px; border-radius: 50%; font-size: 13px; line-height: 22px; text-align: center; color: var(--text-2); font-variant-numeric: tabular-nums; }
.calendar .chip { display: flex; width: 100%; min-width: 0; margin-top: 2px; padding: 0; }
.calendar .is-holiday .calendar-date { background: var(--holiday); color: var(--holiday-text); }
.calendar .is-today .calendar-date { background: var(--accent); color: var(--on-accent); font-weight: 500; }
.calendar .is-other .calendar-date { background: none; color: var(--muted); font-weight: 400; }
.calendar .is-other .chip { background: none; box-shadow: none; color: var(--muted); font-weight: 400; }
.calendar .is-other .home-mark { display: none; }
.calendar .is-earned { background: var(--ok-bg); }
.calendar .is-earned .chip-off, .calendar .is-earned .calendar-date { color: var(--ok-text); }
.calendar .earned-mark { position: static; font-size: 13px; }
.balance { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.balance div { padding: 8px 12px; border-radius: 8px; background: var(--weekend); font-size: 13px; color: var(--text-2); }
.balance strong { display: block; font-size: 22px; font-weight: 500; line-height: 1.25; color: var(--text); }
.balance .has-left { background: var(--ok-bg); color: var(--ok-text); }
.balance .has-left strong { color: inherit; }
.balance-day { padding: 8px 0; border-top: 1px solid var(--border); }
.balance-day span { display: block; }
[data-show-all][hidden] { display: none; }
.balance-hint { margin-top: 8px; }
.form-actions { display: flex; gap: 8px; }
.home-mark { position: absolute; top: 2px; left: 4px; width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chip-off .home-mark { position: static; width: 14px; height: 14px; stroke-width: 2.4; }
.home-option { width: 100%; margin-top: 12px; color: var(--accent); border-color: var(--accent); font-weight: 500; }
.home-option[hidden] { display: none; }
.leaving { color: var(--danger); }
.form-hint { margin-bottom: 12px; }
.chips { display: grid; grid-template-columns: repeat(auto-fill, 32px); gap: 4px; margin-top: 8px; }
.chips li { min-width: 0; text-align: center; }
.chips .chip { width: 100%; min-width: 0; padding: 0; font-size: 11px; }
.chip-day { display: block; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.chips .is-weekend { border-radius: 6px; background: var(--weekend); }
.chips .is-today .chip-day { color: var(--accent); font-weight: 500; }
.chips .is-today .chip-date { width: 20px; margin: 0 auto; border-radius: 50%; background: var(--accent); color: var(--on-accent); line-height: 20px; }
.chips .is-holiday .chip-date { width: 20px; margin: 0 auto; border-radius: 50%; background: var(--holiday); color: var(--holiday-text); line-height: 20px; }
.chips .is-earned { border-radius: 6px; background: var(--ok-bg); }
.chips .is-earned .chip-day, .chips .is-earned .chip-off { color: var(--ok-text); }
.chips .is-earned .chip-date { width: auto; background: none; white-space: nowrap; }
.chip-earned { margin-left: 2px; font-size: 11px; font-weight: 500; }

/* Settings */

.colour-row { margin: 0 0 12px; padding: 0; border: none; }
.colour-row legend { padding: 0; margin-bottom: 6px; }
.dots { display: flex; flex-wrap: wrap; gap: 8px; }
.dot { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 1px solid currentColor; border-radius: 50%; cursor: pointer; }
.dot input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; opacity: 0; cursor: pointer; }
.dot:has(input:checked)::after { content: '\2713'; font-size: 15px; font-weight: 500; line-height: 1; }
.dot:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

.slots { display: grid; grid-template-columns: repeat(auto-fill, 84px); gap: 8px 6px; margin-bottom: 8px; }
.slot { text-align: center; }
.slot select { text-align: center; text-align-last: center; padding: 6px 18px 6px 4px; background-position: right 5px center; }
.slot-note { margin-bottom: 8px; }
.slot-buttons { display: flex; gap: 8px; margin-bottom: 12px; }
.slot-buttons[hidden], [data-day1][hidden] { display: none; }

.subtabs + .toolbar { margin-top: 16px; margin-bottom: 8px; }
.holiday-used { font-size: 13px; }
.year-filter { margin-left: auto; }
.holiday-month { margin: 16px 0 6px; color: var(--text-2); font-size: 13px; font-weight: 500; }
.holiday-row { padding: 10px 16px; }
.holiday-summary { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: baseline; gap: 12px; cursor: pointer; list-style: none; }
.holiday-summary::-webkit-details-marker { display: none; }
.holiday-summary .holiday-date { white-space: nowrap; }
.holiday-edit { color: var(--accent); font-size: 13px; }
.holiday-row:not([open]) .edit-open, .holiday-row[open] .edit-closed { display: none; }
.tag-replacement { background: var(--holiday); color: var(--holiday-text); }
details.holiday-row form { margin-top: 12px; }

/* Requests */

.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--danger); color: var(--surface); font-size: 12px; font-weight: 500; line-height: 1;
}
.tab-icon { position: relative; display: inline-flex; }
.tab-icon .badge { position: absolute; top: -6px; left: 14px; }

.status { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.status-waiting { background: var(--warn-bg); color: var(--warn-text); }
.status-ok { background: var(--ok-bg); color: var(--ok-text); }
.status-no { background: var(--danger-bg); color: var(--danger); }
.status-neutral { background: var(--weekend); color: var(--text-2); }

.gap-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; color: var(--text); text-decoration: none; }
.gap-row:hover { background: var(--weekend); }
.gap-main { flex: 1; min-width: 0; }
.gap-main strong, .gap-main .meta { display: block; }
.gap-action { color: var(--accent); white-space: nowrap; }

.suggestion { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.suggestion-main { flex: 1; min-width: 0; }
.suggestion-main strong, .suggestion-main .meta { display: block; }
.suggestion-actions { display: flex; gap: 8px; }
.meta.warn { color: var(--warn-text); font-weight: 500; }
.rank {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 24px; height: 24px; border-radius: 50%; background: var(--weekend); color: var(--text-2); font-size: 13px; font-weight: 500;
}
.left-out { color: var(--text-2); }
.left-out li { padding: 2px 0; }

.timeline { list-style: none; margin: 0; padding: 12px 16px; }
.timeline li { padding: 6px 0 6px 16px; border-left: 2px solid var(--border); }
.timeline strong, .timeline .meta { display: block; }

.needs-cover {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-top: 4px; padding: 8px 10px; border-radius: 8px;
  background: var(--warn-bg); color: var(--warn-text); text-decoration: none; font-weight: 500;
}
.needs-cover .meta { color: inherit; font-weight: 400; }

.needs-cover-cell { position: relative; }
.needs-cover-cell::before {
  content: ''; position: absolute; z-index: 1; left: 0; bottom: 0;
  border-left: 9px solid var(--danger); border-top: 9px solid transparent;
}

.dialog-link { margin-top: 12px; }
a.dialog-link:not(.btn-primary) { display: inline-block; }
a.dialog-link[hidden] { display: none; }

.btn-wide { width: 100%; margin-top: 8px; min-height: 44px; }

/* Login */

.login { max-width: 400px; margin: 10vh auto 0; padding: 24px; }
/* Montserrat, saved in the app, is close to the logo's own lettering. Licence: fonts/montserrat-OFL.txt. */
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/montserrat-600.woff2") format('woff2'); }
.login .brand { margin-bottom: 56px; text-align: center; font-family: 'Montserrat', system-ui, sans-serif; font-weight: 600; font-size: 20px; letter-spacing: 0.04em; }
/* The Workshift icon leads, with the same rounded corners as on an iPhone. */
.login-icon { display: block; width: 72px; height: 72px; margin: 0 auto 12px; border-radius: 16px; overflow: hidden; box-shadow: 0 0 0 1px var(--border), 0 4px 12px rgb(0 0 0 / 8%); }
.login-icon svg { display: block; width: 100%; height: 100%; }
.login-icon .icon-bg { fill: #F7F7F5; }
.login-icon .icon-past { fill: #2C2C2A; }
.login-icon .icon-future { fill: #DCD9D0; }
.login-icon .icon-next { fill: #F7931E; }
/* Rifhan signs the foot of the card. */
.login-foot { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); }
.login-foot a { display: inline-block; margin-top: 8px; padding: 4px 8px; font-size: 13px; }
.login-foot img { display: block; width: 96px; height: auto; margin: 0 auto; }
.login-foot .logo-white { display: none; }
.login { text-align: center; }
.login h1, .login .sub { text-wrap: balance; }
.login form label { text-align: left; }
/* An envelope in the email box stands in for the word Email, which only screen readers get.
   16px text stops iPhones zooming in on the box. */
.login input[type='email'] { min-height: 44px; margin-top: 0; padding-left: 40px; font-size: 16px; background: var(--surface) var(--mail-icon) no-repeat 12px center / 20px; }
.login .sub { margin-top: 4px; }
.login form { margin-top: 20px; }
.login .btn-primary { width: 100%; margin-top: 12px; min-height: 44px; }
/* The last line of text, such as a link to start again, sits a little apart. */
.login p:last-child, .login p:has(+ .login-foot) { margin-top: 12px; }

/* Reports */

.report-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; margin-top: 12px; }
.report-form .fields { margin-bottom: 0; }
.report-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.report-actions { display: flex; gap: 8px; }
.report-project .project-heading { margin: 24px 0 0; color: var(--accent); }
.report-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 12px 0; }
.report-tiles .report-tile-holiday { background: var(--holiday); color: var(--holiday-text); }
.report-tile-holiday strong { color: inherit; }
.report-section { margin: 16px 0 8px; font-size: 15px; font-weight: 500; color: var(--accent); }
.report-holidays { margin-bottom: 12px; }
.report-table-wrap { overflow-x: auto; border-color: var(--rule); }
.report-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.report-table th, .report-table td { padding: 6px 8px; border: 1px solid var(--rule); text-align: left; vertical-align: top; }
.report-table thead th { background: var(--blue); color: var(--blue-text); font-weight: 500; }
.report-table tbody th { color: var(--text); font-weight: 400; white-space: nowrap; }
.report-table tr > :first-child { border-left: 0; }
.report-table tr > :last-child { border-right: 0; }
.report-table thead tr:first-child > * { border-top: 0; }
.report-table tbody tr:last-child > * { border-bottom: 0; }
.report-numbers th, .report-numbers td { text-align: center; }
.report-table .report-name { text-align: left; white-space: nowrap; }
.report-table .report-sum, .report-total td, .report-table .report-total th { font-weight: 500; }
.report-total td, .report-table .report-total th { background: var(--weekend); }
.report-days { table-layout: fixed; }
.report-days .report-date { width: 108px; }
.report-date-parts { display: inline-grid; grid-template-columns: 30px 18px auto; column-gap: 4px; }
.report-date-parts > :nth-child(2) { text-align: right; }
.report-days td { overflow-wrap: break-word; }
.report-days .is-weekend > * { background: var(--weekend); }
.report-days .is-holiday > * { background: var(--holiday); color: var(--holiday-text); }
.report-note { color: var(--text-2); }
.report-day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.report-cards .is-holiday { background: var(--holiday); color: var(--holiday-text); }
.report-cards .is-holiday .meta { color: inherit; }
.report-cards { display: none; }
.report-cards h3 { margin: 0 0 4px; font-size: 15px; font-weight: 500; }
.report-line { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--border); }
.report-line .meta { text-align: right; }

/* Wide enough for a whole month of equal chips on one line */

@media (min-width: 1000px) {
  .chips { grid-template-columns: repeat(31, minmax(0, 1fr)); gap: 2px; }
}

/* Tablets: tighter, so everything in the top bar still fits on one line */

@media (max-width: 959px) {
  .topbar { gap: 8px; padding: 12px 16px; }
  .topbar .brand { display: none; }
  .topnav { margin-left: -8px; }
  .topnav a { padding: 6px 8px; }
}

/* Phones */

@media (max-width: 767px) {
  input, select, button { font-size: 16px; }
  label input, label select { font-size: 16px; }

  .report-form { grid-template-columns: minmax(0, 1fr); }
  .report-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-holidays { display: block; }
  .report-table-wrap:not(.report-holidays) { display: none; }
  .report-cards { display: grid; gap: 8px; }
  .report-cards .form-card { margin-top: 0; }
  .staff-tally { order: 3; flex-basis: 100%; }
  .chips { display: none; }
  .staff-editor-body { padding: 8px; }
  .staff-cards { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .staff-cards .fields { grid-template-columns: minmax(0, 1fr); }
  .staff-cards > .staff-calendar { display: flex; }
  .staff-month { display: none; }
  .back-link { margin-bottom: 0; }
  .back-link a { min-height: 44px; }
  .fold-heading { display: none; }
  .fold-toggle { display: flex; align-items: center; justify-content: flex-start; gap: 8px; width: 100%; min-height: 44px; padding: 0; background: none; border: 0; font-size: 15px; font-weight: 500; text-align: left; }
  .fold-toggle::before { content: ''; flex: none; width: 7px; height: 7px; border-top: 1.5px solid; border-right: 1.5px solid; transform: rotate(45deg); }
  .fold-toggle[aria-expanded='true']::before { transform: rotate(135deg); }
  .fold.is-folded .fold-body { display: none; }
  .calendar td { padding: 2px; }

  .topbar { padding: 12px 16px; }
  .topnav { display: none; }
  .logout { display: none; }
  .topbar .theme-switch { display: none; }

  .page { padding: 16px 16px calc(84px + env(safe-area-inset-bottom)); }

  .tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
    display: grid; grid-template-columns: repeat(4, 1fr);
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--surface); border-top: 1px solid var(--border);
  }
  .tabs a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-height: 56px; color: var(--text-2); text-decoration: none; font-size: 12px;
  }
  .tabs a[aria-current] { color: var(--accent); font-weight: 500; }
  .tabs svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

  button, .btn, .btn-primary { min-height: 44px; }
  button.btn-link { min-height: 0; padding: 8px 0; }
  .list .backup { flex-direction: column; align-items: flex-start; gap: 0; }
  .backup-actions a { padding: 8px 0; }
  .theme-switch { display: grid; grid-template-columns: repeat(3, 1fr); }
  .theme-switch button { min-height: 44px; font-size: 15px; }
  .icon-btn { width: 44px; height: 44px; }
  input, select { min-height: 44px; }

  .add-wrap > h1, .add-wrap > h2 { min-height: 44px; }
  .add-toggle { min-height: 44px; }

  .toolbar { display: block; }
  .toolbar .project-filter { margin-top: 8px; }
  .month-pager { justify-content: space-between; flex-wrap: nowrap; }
  .month-pager h1, .month-pager h2 { order: 0; margin-left: 0; font-size: clamp(16px, 5.2vw, 20px); text-align: center; }
  .month-pager .icon-btn { flex: none; }
  .project-filter { flex-wrap: wrap; width: 100%; overflow: visible; }
  .project-filter a { flex: 1; padding: 8px 12px; text-align: center; }

  .roster-wrap { display: none; }
  .roster-down { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: clip; }
  .cell { min-width: 0; height: 46px; min-height: 46px; }

  dialog { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 12px 12px 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }

  .inline-form { flex-direction: column; align-items: stretch; }
  .slots { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .legend { font-size: 12px; }
  .key { padding: 16px; }
  .key-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
  .key-groups > .key-shifts { grid-column: 1 / -1; }
  .shift-legend { margin-left: 0; }
  .subtabs { display: grid; grid-template-columns: repeat(2, 1fr); overflow: visible; }
  .subtabs a { padding: 8px 6px; font-size: 14px; text-align: center; }
  .subtabs a:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .dots { gap: 5px; }
  .dot { width: 29px; height: 29px; }
  .suggestion { flex-wrap: wrap; }
  .suggestion-main { flex-basis: calc(100% - 36px); }
  .suggestion-actions { flex-basis: 100%; }
  .suggestion-actions form { flex: 1; }
  .suggestion-actions button { width: 100%; }
  .gap-row .gap-action { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  dialog[open], .tail.is-now, .is-on-now::before, .on-now::before, .is-working-now::before { animation: none; }
  .staff-editor { transition: none; }
}

/* Printing. Dark mode's colours would print as pale text on white paper, and a phone's cards
   would split the table, so these win over both. */

@page { size: A4 landscape; margin: 12mm; }

@media print {
  :root:root { color-scheme: light; --bg: #FFFFFF; --surface: #FFFFFF; --text: #000000; --text-2: #444444; --border: #999999; --rule: #777777; --weekend: #EEEEEE; }
  body { background: #FFFFFF; }
  .topbar, .tabs, .report-form, .report-actions, .notice, .alert { display: none !important; }
  .page { max-width: none; margin: 0; padding: 0; }
  .report-head { margin-top: 0; }
  .report-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .report-table-wrap { display: block !important; overflow: visible; }
  .report-cards { display: none !important; }
  .report-table thead { display: table-header-group; }
  .report-table tr { break-inside: avoid; }
  .report-project + .report-project { break-before: page; }
  body { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* The privacy policy: one readable column, with the language switch at the top. */
.policy { max-width: 680px; margin: 0 auto; padding: 16px 0 32px; line-height: 1.5; }
.policy-brand { display: flex; align-items: center; gap: 10px; }
.policy-brand .login-icon { width: 36px; height: 36px; margin: 0; border-radius: 9px; }
.policy-brand .brand { margin: 0; font-family: 'Montserrat', system-ui, sans-serif; font-weight: 600; font-size: 17px; letter-spacing: 0.04em; }
.lang-switch { display: inline-flex; margin-top: 24px; padding: 3px; border-radius: 22px; background: var(--border); }
.lang-switch a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; border-radius: 19px; color: var(--text); font-size: 14px; text-decoration: none; }
.lang-switch a[aria-current='page'] { background: var(--surface); font-weight: 600; box-shadow: 0 1px 4px rgb(0 0 0 / 12%); }
.policy h1 { margin: 28px 0 0; font-size: 28px; line-height: 1.2; }
.policy .updated { margin: 6px 0 0; font-size: 14px; color: var(--text-2); }
.policy h2 { margin: 28px 0 0; font-size: 17px; font-weight: 600; line-height: 1.3; }
.policy p, .policy ul { margin: 8px 0 0; font-size: 15px; }
.policy ul { padding-left: 20px; list-style: disc; }
.policy li + li { margin-top: 6px; }
.policy .login-foot { margin-top: 36px; text-align: center; }
