@font-face {
  font-family: Figtree;
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("./fonts/figtree-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: Figtree;
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("./fonts/figtree-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  color-scheme: light;
  font-family: Figtree;
  font-synthesis: none;
  color: var(--ink);
  --ink: #242b31;
  --text: #454f59;
  --muted: #5e6873;
  --line: #e0e4e8;
  --field: #bcc4cc;
  --surface: #f1f2f4;
  --sidebar: #ffffff;
  --paper: #ffffff;
  --subtle: #f6f7f8;
  --hover: #ebedf0;
  --nav-active: #e0e4e8;
  --focus: #53727c;
  --sage: #e6f0ea;
  --sage-ink: #315947;
  --blue: #e7eff8;
  --blue-ink: #325c7e;
  --peach: #faede4;
  --peach-ink: #784728;
  --amber: #f8edcf;
  --amber-ink: #684f1f;
  --red: #f8e7e4;
  --red-ink: #873d37;
  --teal: #e6efef;
  --teal-ink: #355c5b;
  --action: #30343a;
  --action-hover: #23262b;
  --action-ink: #ffffff;
  --notice: #406956;
  --error-notice: #8e423c;
  --chart-track: #dce4ee;
  --chart-progress: #167dac;
  --login-start: #d3e6db;
  --backdrop: #17232a66;
  --panel-shadow: 0 1px 2px #192b3410, 0 6px 20px #192b3406;
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23515b66' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  --page-gutter: clamp(22px, 3.4vw, 52px);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #edf1f5;
  --text: #c7cfd8;
  --muted: #a6b2be;
  --line: #3b434d;
  --field: #5f6c7a;
  --surface: #191c21;
  --sidebar: #20242a;
  --paper: #252a31;
  --subtle: #2d333b;
  --hover: #313740;
  --nav-active: #363e48;
  --focus: #9bc8d2;
  --sage: #293d36;
  --sage-ink: #b8ddca;
  --blue: #293b50;
  --blue-ink: #b7d8f4;
  --peach: #47372f;
  --peach-ink: #f1c5a9;
  --amber: #453b28;
  --amber-ink: #f1d490;
  --red: #48302f;
  --red-ink: #ffc3bc;
  --teal: #2a3d40;
  --teal-ink: #bae0de;
  --action: #dce0e6;
  --action-hover: #eef0f3;
  --action-ink: #282c32;
  --notice: #305244;
  --error-notice: #783a36;
  --chart-track: #3c4654;
  --chart-progress: #78c6ee;
  --login-start: #22322d;
  --backdrop: #080a0dbb;
  --panel-shadow: 0 1px 2px #0003, 0 7px 20px #0002;
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23c7cfd8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
}

.shell-top {
  align-items: center;
  flex-wrap: nowrap;
  padding: clamp(22px, 3.3vw, 49px) var(--page-gutter) clamp(19px, 2.6vw, 36px);
}

.page-title { min-width: 0 }
.page-title .employee-greeting {
  padding: 0;
  margin-bottom: 5px;
  font-size: .9375rem;
  font-weight: 650;
  color: var(--muted);
  letter-spacing: 0;
}

.page-title #heading {
  min-height: 0;
  font-size: clamp(1.65rem, 3.15vw, 2.625rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.045em;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.header-tools { display: flex; align-items: center; gap: 12px; flex: 0 0 auto }
select { background-image: var(--select-chevron) }
.appearance-control { position: relative; z-index: 2; color: var(--muted) }
.appearance-control summary {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  list-style: none;
  cursor: pointer;
}
.appearance-control summary::-webkit-details-marker { display: none }
.appearance-control summary:hover, .appearance-control[open] summary { background: var(--hover); color: var(--ink) }
.appearance-control summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px }
.appearance-control svg { width: 18px; height: 18px }
.appearance-options {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  display: grid;
  width: 142px;
  gap: 2px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: var(--panel-shadow);
}
.appearance-options button {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  padding: 6px 9px;
  background: transparent;
  color: var(--text);
  font-size: .875rem;
  text-align: left;
}
.appearance-options button:hover { background: var(--hover) }
.appearance-options button[aria-pressed="true"] { background: var(--sage); color: var(--sage-ink); font-weight: 750 }
.login-screen { position: relative }
.login-appearance { position: absolute; z-index: 1; top: 14px; right: clamp(16px, 4vw, 42px) }
.login-screen:has(.login-appearance) { padding-top: max(72px, 6vw) }

#main { padding: clamp(20px, 2.4vw, 34px) var(--page-gutter) }
.panel, .module-card { box-shadow: var(--panel-shadow) }
.panel-head h2, .module-card h3, .dialog-head h2 { font-weight: 750 }
.module-card { min-height: 244px; gap: 0 }
.module-icon { margin-bottom: 18px }
.module-card > p { margin: 8px 0 22px }
.module-card .button, .primary { font-weight: 750 }
#hub-navigation button[aria-current="page"],
#hub-navigation .section-active,
#time-off-navigation button[aria-current="page"],
.signs-toolbar nav button[aria-current="page"] { font-weight: 750 }
#time-off-navigation button[aria-current="page"] { background: var(--sage); color: var(--sage-ink) }
.leave-balance-ring { font-weight: 750 }
.cal-holiday { background: var(--amber); color: var(--amber-ink) }
.cal-colour-0 { background: var(--sage); color: var(--sage-ink) }
.cal-colour-1 { background: var(--blue); color: var(--blue-ink) }
.cal-colour-2 { background: var(--subtle); color: var(--text) }
.cal-colour-3 { background: var(--teal); color: var(--teal-ink) }
.cal-colour-4 { background: var(--peach); color: var(--peach-ink) }
.cal-colour-5 { background: var(--nav-active); color: var(--text) }

@media (max-width: 760px) {
  :root { --page-gutter: 18px }
  .shell-top { padding-top: max(22px, env(safe-area-inset-top, 0px)); gap: 10px }
  .header-tools, .login-appearance { display: none }
  .login-screen:has(.login-appearance) { padding-top: 24px }
  .module-card { min-height: 214px }
  .module-card .button { min-height: 44px }
}

@media print {
  .sign-print { --ink: #111 }
}
