:root {
  color-scheme: light;
  --ink: #25213f;
  --muted: #6d6981;
  --navy: #211c4b;
  --navy-light: #342d68;
  --lavender: #efedf7;
  --paper: #f7f6fa;
  --line: #dfddea;
  --white: #fff;
  --coral: #f0445c;
  --coral-dark: #d92f4b;
  --error: #8c2f3c;
  --error-bg: #fff0f2;
  --shadow: 0 18px 50px rgba(33, 28, 75, .07);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 86% 0%, rgba(229, 224, 245, .58), transparent 34rem),
    var(--paper);
}

.page {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 28px;
}

.masthead {
  position: relative;
  margin: 0 calc(50% - 50vw) 26px;
  padding: 38px max(20px, calc((100vw - 1120px) / 2));
  background: linear-gradient(115deg, var(--navy), var(--navy-light) 72%, #49316c);
  color: var(--white);
}
.brand-lockup { display: flex; align-items: center; gap: 16px; }
.brand-mark { display: block; width: 56px; height: 56px; flex: 0 0 auto; }
.brand-lockup h1 { margin-top: 11px; }
.brand-lockup .lede { margin-top: 0; }
.language-switch {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  position: absolute;
  top: 16px;
  right: max(20px, calc((100vw - 1120px) / 2));
}
.language-switch button {
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, .36);
  border-radius: 999px;
  background: transparent;
  color: #e3e0f0;
  font: inherit;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
}
.language-switch button:hover,
.language-switch button[aria-pressed="true"] {
  border-color: var(--white);
  background: var(--white);
  color: var(--navy);
}
.language-switch button:focus-visible {
  outline: 3px solid #f6a0ad;
  outline-offset: 2px;
}
.eyebrow, .step {
  margin: 0;
  color: #d7d0f2;
  font-size: .73rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.step { color: var(--coral-dark); }
h1 {
  margin: 11px 0 10px;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: -.045em;
}
.lede { max-width: 660px; margin: 0; color: #e3e0f0; font-size: 1.05rem; line-height: 1.6; }

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 22px;
  padding: 15px 18px;
  border: 1px solid #ded9ef;
  border-radius: 12px;
  background: var(--lavender);
  color: #39335f;
}
.privacy-note p { margin: 0; line-height: 1.5; font-size: .92rem; }
.privacy-icon { padding-top: 2px; color: var(--coral); font-size: .8rem; }

.panel, .results {
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow);
}
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.section-heading h2 { margin: 5px 0 0; font-size: 1.45rem; letter-spacing: -.025em; }

.acquire-instructions {
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.5;
}
.acquire-instructions strong { color: var(--ink); }
.bookmarklet-help {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fcfbfe;
  color: var(--ink);
  font-size: .85rem;
  line-height: 1.5;
}
.bookmarklet-help summary { font-weight: 700; cursor: pointer; }
.bookmarklet-help ol { margin: 10px 0; padding-left: 22px; color: var(--muted); }
.bookmarklet-help li + li { margin-top: 5px; }
.bookmarklet-help label { display: block; margin-bottom: 5px; font-weight: 700; }
.bookmarklet-drag {
  display: inline-flex;
  margin: 0 0 10px;
  padding: 8px 12px;
  border: 1px dashed #aaa4c9;
  border-radius: 7px;
  background: var(--lavender);
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
  cursor: grab;
}
.bookmarklet-drag:hover { border-color: var(--navy-light); background: #e6e2f2; }
.bookmarklet-drag:focus-visible { outline: 3px solid rgba(52, 45, 104, .3); outline-offset: 2px; }
.bookmarklet-drag:active { cursor: grabbing; }
.bookmarklet-code {
  display: block;
  width: 100%;
  min-height: 76px;
  padding: 8px;
  border: 1px solid #d5d2e1;
  border-radius: 7px;
  background: var(--white);
  color: var(--ink);
  font: .75rem/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
  resize: vertical;
}

.file-picker {
  display: flex;
  min-height: 92px;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border: 1.5px dashed #aaa4c9;
  border-radius: 12px;
  background: #fcfbfe;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
}
.file-picker:hover, .file-picker:focus-within { border-color: var(--navy-light); background: #f6f4fb; }
.file-picker.is-dragging { border-color: var(--coral); background: #fff1f3; box-shadow: 0 0 0 3px rgba(240, 68, 92, .14); }
.file-picker:active { transform: translateY(1px); }
.file-picker-mark {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: var(--lavender);
  color: var(--navy-light);
  font-size: 1.45rem;
  font-weight: 700;
}
.file-picker-copy { display: grid; gap: 4px; }
.file-picker-copy strong { font-size: .98rem; }
.file-picker-copy span, .field small { color: var(--muted); font-size: .82rem; }
#schedule-file {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}
#schedule-file:focus-visible + * { outline: 3px solid #aaa1d3; }
.file-name { margin: 10px 0 0; color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; }
.field { display: grid; align-content: start; gap: 8px; }
.field label { font-size: .88rem; font-weight: 750; }
input[type="text"], select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #d5d2e1;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
input[type="text"]:focus, select:focus { outline: 3px solid rgba(52, 45, 104, .16); border-color: var(--navy-light); }
select:disabled { color: #858197; background: #f5f4f8; }
.field small { line-height: 1.4; }

.message {
  margin: 20px 0 0;
  padding: 14px 17px;
  border: 1px solid #ded9ef;
  border-radius: 10px;
  background: var(--lavender);
  color: #39335f;
  line-height: 1.5;
}
.message.error { border-color: #efc8c0; background: var(--error-bg); color: var(--error); }

.results { margin-top: 24px; }
.results-heading { align-items: center; }
.summary-pill {
  margin: 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--lavender);
  color: var(--navy);
  font-size: .8rem;
  font-weight: 750;
  white-space: nowrap;
}
.validation { display: grid; gap: 8px; margin: -4px 0 18px; }
.validation p { margin: 0; color: #514c6a; font-size: .87rem; line-height: 1.4; }
.validation p::before { content: "✓"; margin-right: 8px; color: var(--coral); font-weight: 800; }
.downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.download-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 14px;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(110deg, #f47b70, var(--coral) 72%);
  color: white;
  font: inherit;
  font-size: .87rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.download-link:hover { background: linear-gradient(110deg, var(--coral), var(--coral-dark) 72%); }
.download-link:focus-visible { outline: 3px solid #f6a0ad; outline-offset: 2px; }
.download-link span { opacity: .8; font-size: .76rem; font-weight: 500; }
.empty-downloads { color: var(--muted); font-size: .9rem; }

.table-shell { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.table-scroll { overflow: auto; max-height: 540px; }
table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; font-size: .78rem; }
th, td { min-width: 64px; padding: 9px 8px; border-right: 1px solid #eeedf3; border-bottom: 1px solid #eeedf3; text-align: center; }
thead th { position: sticky; top: 0; z-index: 2; background: #f0eef7; color: #514c6a; font-weight: 750; }
th.employee-col { position: sticky; left: 0; z-index: 3; min-width: 190px; text-align: left; }
thead th.employee-col { z-index: 4; background: #f0eef7; }
tbody th.employee-col { background: white; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tr > :last-child { border-right: 0; }
td.shift { color: var(--navy-light); font-weight: 750; }
td.no-shift { color: #c1becc; }
.table-hint { margin: 10px 0 0; color: var(--muted); font-size: .78rem; }
footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 4px 0;
  color: #777387;
  font-size: .77rem;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 680px) {
  .page { width: min(100% - 24px, 1120px); }
  .masthead { padding: 64px max(12px, calc((100vw - 1120px) / 2)) 30px; }
  .brand-lockup { gap: 12px; }
  .brand-mark { width: 44px; height: 44px; }
  .brand-lockup h1 { font-size: clamp(1.7rem, 8vw, 2.4rem); }
  .language-switch { top: 12px; right: 12px; }
  .settings-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; }
  .results-heading { flex-direction: column; }
  footer { flex-direction: column; }
  th.employee-col { min-width: 160px; }
}
