@font-face {
  font-family: 'Proza Libre';
  src: url('../Proza_Libre/ProzaLibre-Regular.ttf') format('truetype');
  font-weight: 400;
}

@font-face {
  font-family: 'Proza Libre';
  src: url('../Proza_Libre/ProzaLibre-Medium.ttf') format('truetype');
  font-weight: 500;
}

@font-face {
  font-family: 'Proza Libre';
  src: url('../Proza_Libre/ProzaLibre-SemiBold.ttf') format('truetype');
  font-weight: 600;
}

@font-face {
  font-family: 'Proza Libre';
  src: url('../Proza_Libre/ProzaLibre-Bold.ttf') format('truetype');
  font-weight: 700;
}

:root {
  /* --- Waxwing tokens (provided) --- */
  --frost: #F6F4F2;
  --feather: #FFFFFF;
  --perch: #EFECEA;
  --divider: #D8D3CF;
  --mask: #1E1B1C;
  --slope: #4B4446;
  --mist: #7A7473;
  --haze: #B9B3B0;

  --taupe: #705647;
  --yellow: #F4C400;
  --berry: #D03049;
  --cinnamon: #C06B2F;
  --ice-500: #5B7C99;
  --ice-700: #49637A;
  --olive: #A7B66A;

  /* --- System semantics (derived) --- */
  --bg: var(--frost);
  --surface: var(--feather);
  --surface-2: var(--perch);
  --border: color-mix(in srgb, var(--divider) 92%, var(--mask));

  --text: var(--mask);
  --text-2: var(--slope);
  --text-3: var(--mist);
  --disabled: var(--haze);

  --primary: var(--taupe);
  --primary-contrast: var(--feather);

  --info: var(--ice-500);
  --info-strong: var(--ice-700);
  --success: var(--olive);
  --warning: var(--yellow);
  --danger: var(--berry);

  --focus: var(--yellow);

  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 16px;

  --shadow-sm: 0 1px 0 rgba(30, 27, 28, 0.04), 0 10px 22px rgba(30, 27, 28, 0.06);
  --shadow-md: 0 1px 0 rgba(30, 27, 28, 0.04), 0 16px 40px rgba(30, 27, 28, 0.10);

  --ring: 0 0 0 3px color-mix(in srgb, var(--focus) 40%, transparent);

  --font: 'Proza Libre', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

:root[data-theme='dark'] {
  --frost: #191617;
  --feather: #242021;
  --perch: #2D2728;
  --divider: #474041;
  --mask: #F4EFEC;
  --slope: #D0C6C0;
  --mist: #A09692;
  --haze: #6E6561;

  --taupe: #C8A691;
  --yellow: #F1C94A;
  --berry: #E46A7C;
  --cinnamon: #E39B66;
  --ice-500: #8CB6D9;
  --ice-700: #A5CAE7;
  --olive: #B7CD7A;

  --border: color-mix(in srgb, var(--divider) 86%, var(--mask));
  --primary-contrast: #1E1B1C;
  --shadow-sm: 0 1px 0 rgba(0, 0, 0, 0.2), 0 14px 28px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 1px 0 rgba(0, 0, 0, 0.22), 0 22px 52px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  position: relative;
  isolation: isolate;
  font-family: var(--font);
  color: var(--text);
  background: transparent;
}

:root[data-theme='dark'] html {
  background: var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(1600px 600px at 12% -10%, color-mix(in srgb, var(--warning) 18%, transparent), transparent 50%),
    radial-gradient(1400px 600px at 88% 0%, color-mix(in srgb, var(--info) 14%, transparent), transparent 55%),
    var(--bg);
}

:root[data-theme='dark'] body::before {
  background:
    radial-gradient(1600px 600px at 12% -10%, color-mix(in srgb, var(--warning) 12%, transparent), transparent 52%),
    radial-gradient(1400px 600px at 88% 0%, color-mix(in srgb, var(--info) 18%, transparent), transparent 58%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 88%, black), var(--bg));
}

a {
  color: inherit;
}

aside {
  margin-left: 16px;
}

.skip {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transform: translateY(-140%);
  transition: transform 160ms ease;
  z-index: 50;
}

.skip:focus {
  transform: translateY(0);
  outline: none;
  box-shadow: var(--shadow-sm), var(--ring);
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 18px;
}

.page {
  padding: 18px 0 48px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar__inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand__mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
}

.brand__icon {
  width: 64px;
  height: 64px;
  display: block;
  translate: -8px -4px;
  filter: drop-shadow(0 1px 0 rgba(30, 27, 28, 0.25));
}

:root[data-theme='dark'] .brand__icon {
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.35));
}

.brand__name {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand__tag {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  padding: 14px 0 6px;
}

h1 {
  margin: 10px 0 8px;
  font-size: 34px;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.lead {
  margin: 0 0 14px;
  color: var(--text-2);
  line-height: 1.55;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.section {
  margin-top: 22px;
}

.section__head {
  margin: 12px 0 12px;
}

.section__head h1 {
  margin: 0;
}

.section__head h2 {
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

/* When a section contains multiple cards, keep a consistent vertical gap between them. */
.section>.card+.card {
  margin-top: 14px;
}

.grid {
  display: grid;
  gap: 14px;
}

.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 16px;
}

.card--normal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 16px;

}

.card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.card__title {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card__subtitle {
  font-size: 13px;
  color: var(--text-3);
  margin-top: 3px;
}

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

.badge {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  user-select: none;
}

.badge--info {
  background: color-mix(in srgb, var(--info) 16%, var(--surface));
  border-color: color-mix(in srgb, var(--info) 32%, var(--border));
}

.badge--warn {
  background: color-mix(in srgb, var(--warning) 22%, var(--surface));
  border-color: color-mix(in srgb, var(--warning) 38%, var(--border));
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  transition: transform 90ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.btn:active {
  transform: translateY(0.5px);
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--ring), var(--shadow-sm);
}

.btn--sm {
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 12.5px;
}

.btn--primary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.btn--primary::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--warning);
}

.btn--primary:hover {
  background: color-mix(in srgb, var(--surface-2) 65%, var(--surface));
}

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

.btn--secondary:hover {
  background: color-mix(in srgb, var(--surface-2) 65%, var(--surface));
}

.btn--ghost {
  background: transparent;
  border-color: var(--border);
}

.btn--ghost:hover {
  background: var(--surface-2);
}

.btn--info {
  background: var(--info-strong);
  color: var(--feather);
  border-color: color-mix(in srgb, var(--info-strong) 70%, var(--mask));
}

.btn--info:hover {
  background: color-mix(in srgb, var(--info-strong) 92%, black);
}

.btn--success {
  background: var(--success);
  color: var(--mask);
  border-color: color-mix(in srgb, var(--success) 68%, var(--mask));
}

.btn--success:hover {
  background: color-mix(in srgb, var(--success) 90%, black);
}

.btn--warn {
  background: var(--warning);
  color: var(--mask);
  border-color: color-mix(in srgb, var(--warning) 70%, var(--mask));
}

.btn--warn:hover {
  background: color-mix(in srgb, var(--warning) 88%, black);
}

.btn--danger {
  background: var(--danger);
  color: var(--feather);
  border-color: color-mix(in srgb, var(--danger) 70%, var(--mask));
}

.btn--danger:hover {
  background: color-mix(in srgb, var(--danger) 90%, black);
}

.btn[disabled],
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.link {
  color: var(--info-strong);
  font-weight: 600;
  text-decoration: none;
}

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

.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* Utility classes (kebab-case) */
.m-0 {
  margin: 0;
}

.mt-0 {
  margin-top: 0;
}

.mb-0 {
  margin-bottom: 0;
}

.mt-12 {
  margin-top: 12px;
}

.mt-14 {
  margin-top: 14px;
}

.mt-16 {
  margin-top: 16px;
}

.mt-24 {
  margin-top: 24px;
}

.mt-32 {
  margin-top: 32px;
}

.mb-10 {
  margin-bottom: 10px;
}

.mb-12 {
  margin-bottom: 12px;
}

.mb-8 {
  margin-bottom: 8px;
}

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

.font-600 {
  font-weight: 600;
}

.font-700 {
  font-weight: 700;
}

.fs-12-5 {
  font-size: 12.5px;
}

.opacity-0 {
  opacity: 0;
}

.ml-10 {
  margin-left: 10px;
}

.va-middle {
  vertical-align: middle;
}

.p-12 {
  padding: 12px;
}

.p-14 {
  padding: 14px;
}

.pb-2 {
  padding-bottom: 2px;
}

.bg-surface-2 {
  background: var(--surface-2);
}

.bg-perch {
  background: var(--perch);
}

.mx-auto {
  margin-inline: auto;
}

.max-w-640 {
  max-width: 640px;
}

.max-w-760 {
  max-width: 760px;
}

.w-256 {
  width: 256px;
}

.h-256 {
  height: 256px;
}

.min-w-140 {
  min-width: 140px;
}

.min-w-260 {
  min-width: 260px;
}

.min-w-340 {
  min-width: 340px;
}

.display-contents {
  display: contents;
}

.display-inline {
  display: inline;
}

.inline-flex {
  display: inline-flex;
}

.flex {
  display: flex;
}

.flex-1 {
  flex: 1;
}

.justify-between {
  justify-content: space-between;
}

.justify-end {
  justify-content: flex-end;
}

.justify-center {
  justify-content: center;
}

.items-end {
  align-items: flex-end;
}

.items-center {
  align-items: center;
}

.self-end {
  align-self: end;
}

.gap-8 {
  gap: 8px;
}

.gap-12 {
  gap: 12px;
}

.gap-14 {
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
}

.label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

.help {
  font-size: 12px;
  color: var(--text-3);
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
  transition: box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--text-3);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  box-shadow: var(--ring);
  border-color: color-mix(in srgb, var(--focus) 55%, var(--border));
}

.textarea {
  resize: vertical;
  min-height: 88px;
}

.select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-3) 50%),
    linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.inputgroup {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}

.inputgroup__prefix {
  padding: 10px 10px;
  background: var(--surface-2);
  color: var(--text-2);
  border-right: 1px solid var(--border);
  font-weight: 600;
}

.inputgroup .input {
  border: none;
  border-radius: 0;
}

.inputgroup:focus-within {
  box-shadow: var(--ring);
  border-color: color-mix(in srgb, var(--focus) 55%, var(--border));
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  user-select: none;
  color: var(--text-2);
}

.check input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  user-select: none;
  color: var(--text-2);
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch__track {
  width: 42px;
  height: 26px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  position: relative;
  transition: background 160ms ease, border-color 160ms ease;
}

.switch__track::after {
  content: "";
  width: 20px;
  height: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 3px;
  transform: translateY(-50%);
  transition: left 160ms ease, background 160ms ease, border-color 160ms ease;
}

.switch input:checked+.switch__track {
  background: color-mix(in srgb, var(--primary) 30%, var(--surface-2));
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
}

.switch input:checked+.switch__track::after {
  left: 19px;
  background: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 65%, var(--mask));
}

.switch input:focus-visible+.switch__track {
  box-shadow: var(--ring);
}

.switch__label {
  font-weight: 600;
}

.tablewrap {
  overflow: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
}

.table thead th {
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
  text-align: left;
  font-size: 12.5px;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
}

.table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 65%, transparent);
}

.table tbody tr:nth-child(even) {
  background: var(--surface-2);
}

.table tbody tr:hover {
  background: color-mix(in srgb, var(--primary) 7%, var(--surface-2));
}

.table .right {
  text-align: right;
}

/* Discreet tables: no borders and no background colors (useful inside cards). */
.tablewrap--discreet {
  border: 0;
  border-radius: 0;
  overflow: visible;
}

.table--discreet {
  background: transparent;
}

.table--discreet thead th {
  background: transparent;
  border-bottom: 0;
}

.table--discreet tbody td {
  border-bottom: 0;
}

.table--discreet tbody tr:nth-child(even) {
  background: transparent;
}

.table--discreet tbody tr:hover {
  background: transparent;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  font-weight: 600;
}

.pill--info {
  background: color-mix(in srgb, var(--info) 18%, var(--surface));
  border-color: color-mix(in srgb, var(--info) 32%, var(--border));
  color: var(--text);
}

.pill--success {
  background: color-mix(in srgb, var(--success) 28%, var(--surface));
  border-color: color-mix(in srgb, var(--success) 45%, var(--border));
  color: var(--text);
}

.pill--warn {
  background: color-mix(in srgb, var(--warning) 24%, var(--surface));
  border-color: color-mix(in srgb, var(--warning) 42%, var(--border));
  color: var(--text);
}

.pill--danger {
  background: color-mix(in srgb, var(--danger) 20%, var(--surface));
  border-color: color-mix(in srgb, var(--danger) 42%, var(--border));
  color: var(--danger);
}

.alert {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: var(--surface);
}

.alert__title {
  font-weight: 700;
  margin-bottom: 4px;
}

.alert__body {
  color: var(--text-2);
  line-height: 1.45;
}

.alert--info {
  border-color: color-mix(in srgb, var(--info) 35%, var(--border));
  background: color-mix(in srgb, var(--info) 10%, var(--surface));
}

.alert--success {
  border-color: color-mix(in srgb, var(--success) 45%, var(--border));
  background: color-mix(in srgb, var(--success) 14%, var(--surface));
}

.alert--warn {
  border-color: color-mix(in srgb, var(--warning) 45%, var(--border));
  background: color-mix(in srgb, var(--warning) 14%, var(--surface));
}

.alert--danger {
  border-color: color-mix(in srgb, var(--danger) 45%, var(--border));
  background: color-mix(in srgb, var(--danger) 10%, var(--surface));
}

.progress {
  margin-top: 10px;
  height: 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--divider) 62%, var(--surface));
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--divider) 72%, var(--mask));
}

.progress__bar {
  height: 100%;
  background: linear-gradient(90deg, color-mix(in srgb, var(--primary) 86%, black), var(--primary));
}

.kpi__value {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.kpi__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  min-width: 120px;
  min-height: 80px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.tile__title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-3);
}

.tile__value {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.tile--sm {
  min-width: 100px;
  min-height: 72px;
  padding: 10px 12px;
}

.tile--sm .tile__value {
  font-size: 28px;
}

.tile--interactive {
  text-decoration: none;
  cursor: pointer;
  transition: transform 90ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.tile--interactive:hover {
  background: color-mix(in srgb, var(--surface-2) 65%, var(--surface));
}

.tile--interactive:active {
  transform: translateY(0.5px);
}

.tile--interactive:focus-visible {
  outline: none;
  box-shadow: var(--ring), var(--shadow-sm);
}

.tile--disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.tile--info {
  background: color-mix(in srgb, var(--info) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--info) 32%, var(--border));
}

.tile--success {
  background: color-mix(in srgb, var(--success) 14%, var(--surface));
  border-color: color-mix(in srgb, var(--success) 45%, var(--border));
}

.tile--warn {
  background: color-mix(in srgb, var(--warning) 14%, var(--surface));
  border-color: color-mix(in srgb, var(--warning) 45%, var(--border));
}

.tile--danger {
  background: color-mix(in srgb, var(--danger) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--danger) 45%, var(--border));
}

.spark {
  height: 86px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  align-items: end;
  gap: 6px;
  margin-top: 12px;
}

.spark__bar {
  border-radius: 8px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--info) 30%, var(--surface)), color-mix(in srgb, var(--primary) 20%, var(--surface-2)));
  border: 1px solid color-mix(in srgb, var(--divider) 70%, var(--mask));
}

.swatches {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.swatch {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
}

.swatch__chip {
  height: 52px;
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.swatch__meta {
  padding: 10px;
  display: grid;
  gap: 4px;
}

.swatch__name {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.01em;
}

.swatch__hex {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  color: var(--text-3);
}

.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.95em;
  padding: 0 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.prose {
  color: var(--text-2);
  line-height: 1.55;
}

.footer {
  margin-top: 22px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: min(360px, calc(100vw - 32px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 12px;
}

.toast__title {
  font-weight: 800;
  letter-spacing: -0.01em;
}

.toast__body {
  color: var(--text-2);
  margin-top: 2px;
}

.modal {
  border: none;
  padding: 0;
  background: transparent;

  /* Allow custom dropdown menus (absolute-positioned) to render outside the dialog's
     normal flow without being clipped. */
  overflow: visible;
}

.modal::backdrop {
  background: rgba(30, 27, 28, 0.38);
  backdrop-filter: blur(4px);
}

:root[data-theme='dark'] .modal::backdrop {
  background: rgba(0, 0, 0, 0.56);
}

.modal__panel {
  width: min(560px, calc(100vw - 32px));
  margin: 10vh auto 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 14px;

  /* Prevent clipping of dropdown menus within the modal content. */
  overflow: visible;
}

.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.modal__title {
  font-weight: 800;
  letter-spacing: -0.02em;
}

.modal__subtitle {
  font-size: 13px;
  color: var(--text-3);
  margin-top: 3px;
}

.modal__body {
  padding: 12px 0;
  display: grid;
  gap: 12px;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.iconbtn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;

  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.iconbtn:hover {
  background: var(--surface-2);
}

.iconbtn:disabled,
.iconbtn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

.iconbtn--ghost {
  background: transparent;
}

.iconbtn--ghost:hover {
  background: var(--surface-2);
}

.iconbtn--primary {
  border-color: var(--yellow);
  border-width: 3px;
}

.iconbtn--primary:hover {
  background: color-mix(in srgb, var(--primary) 92%, black);
}

.iconbtn--primary .material-symbols-outlined {
  color: var(--primary-contrast);
}

.iconbtn--danger {
  border-color: var(--danger);
  border-width: 3px;
}

.iconbtn--danger:hover {
  background: color-mix(in srgb, var(--danger) 90%, black);
}

.iconbtn--danger .material-symbols-outlined {
  color: var(--feather);
}

.iconbtn .material-symbols-outlined {
  font-size: 20px;
  line-height: 1;
  color: var(--text-2);
}

.iconbtn--sm {
  width: 30px;
  height: 30px;
  border-radius: 10px;
}

.iconbtn--sm .material-symbols-outlined {
  font-size: 18px;
}

.iconbtn:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

/* Overflow menu ("...") */
.menu {
  position: relative;
  display: inline-block;
}

.menu>summary {
  list-style: none;
}

.menu>summary::-webkit-details-marker {
  display: none;
}

.menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  bottom: auto;
  min-width: 180px;
  padding: 6px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  z-index: 40;
  max-height: min(60vh, calc(100vh - 24px));
  overflow: auto;
  overscroll-behavior: contain;
}

.menu.menu--up .menu__panel {
  top: auto;
  bottom: calc(100% + 6px);
}

.menu__item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}

.menu__item:hover {
  background: var(--surface-2);
}

.menu__item:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.menu__item[disabled],
.menu__item:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.menu__item .material-symbols-outlined {
  font-size: 18px;
  line-height: 1;
  color: var(--text-2);
}

.menu__section {
  display: grid;
  gap: 8px;
  padding: 8px 10px 10px;
  margin: 4px 0;
  border-top: 1px solid color-mix(in srgb, var(--border) 75%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 75%, transparent);
}

.menu__section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.menu__section-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-2);
}

.menu__section-meta {
  font-size: 12px;
  color: var(--text-3);
}

.menu__option-list {
  display: grid;
  gap: 6px;
}

.menu__option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.menu__option:hover {
  background: var(--surface-2);
}

.menu__option--active {
  background: color-mix(in srgb, var(--primary) 14%, var(--surface));
  border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
}

.menu__option:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.menu__option .material-symbols-outlined {
  font-size: 18px;
  line-height: 1;
  color: var(--text-2);
}

.year-table {
  --year-table-month-col: clamp(58px, 8vw, 80px);
  --year-table-total-day-cols: 31;
  --year-table-day-col: calc((100% - var(--year-table-month-col)) / var(--year-table-total-day-cols));
  display: grid;
  gap: 0;
  margin: 24px 0;
}

.year-table__month {
  display: grid;
  grid-template-columns: var(--year-table-month-col) repeat(31, minmax(0, var(--year-table-day-col)));
  border: 1px solid var(--border);
  overflow: hidden;
  border-top: none;
  width: 100%;
}

.year-table.year-table--with-month-end .year-table__month {
  grid-template-columns: var(--year-table-month-col) repeat(31, minmax(0, var(--year-table-day-col))) minmax(0, var(--year-table-day-col));
}

.year-table__month:first-child {
  border-top: 1px solid var(--border);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.year-table__month:last-child {
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.year-table__header {
  background: var(--surface-2);
}

.year-table__month-label {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.year-table__day-header {
  width: 100%;
  aspect-ratio: 1;
  min-height: 22px;
  font-weight: 600;
  font-size: 11px;
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.year-table__grid {
  display: contents;
}

.year-table__cell {
  width: 100%;
  aspect-ratio: 1;
  min-height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  cursor: default;
  transition: background-color 0.2s ease;
  background: hsl(from var(--taupe) h s calc(l + (10 - var(--intensity)) * 3%));
  color: var(--text);
}

.year-table__cell--disabled {
  background: var(--surface-2);
  color: var(--disabled);
  cursor: not-allowed;
}

.year-table__cell:hover {
  box-shadow: var(--shadow-sm);
  transform: scale(1.05);
}

/* Year summary statuses */
.year-table__cell.year-table__cell--nonwork {
  background: var(--surface-2);
  color: var(--text-3);
}

.year-table__cell.year-table__cell--dayoff-vacation {
  background: color-mix(in srgb, var(--success) 60%, var(--surface));
}

.year-table__cell.year-table__cell--dayoff-paid {
  background: color-mix(in srgb, var(--warning) 60%, var(--surface));
}

.year-table__cell.year-table__cell--dayoff-unpaid {
  background: color-mix(in srgb, var(--info) 60%, var(--surface));
}

/* Navigation tree styles */
.nav-tree {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 0 16px 0 0;
}

.nav-tree__item {
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.nav-tree__item:last-child {
  border-bottom: none;
}

.nav-tree__item:first-child {
  border-top: none;
}

.nav-tree__link,
.nav-tree__toggle {
  display: block;
  padding: 10px 12px;
  color: var(--text);
  text-decoration: none;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  transition: background-color 0.2s ease;
  text-align: left;
  width: 100%;
}

.nav-tree__link:hover,
.nav-tree__toggle:hover {
  background-color: var(--surface-2);
}

.nav-tree__item--active .nav-tree__link {
  background-color: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
  font-weight: 500;
}

.nav-tree__toggle {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  font-weight: 500;
}

.nav-tree__toggle-icon {
  flex-shrink: 0;
  color: var(--text-2);
}

.nav-tree__item--expanded .nav-tree__toggle-icon {
  transform: rotate(90deg);
}

.nav-tree__toggle::after {
  content: '';
  display: none;
}

.nav-tree__item--expanded .nav-tree__toggle::after {
  display: none;
}

.nav-tree__children {
  display: none;
  flex-direction: column;
  margin-left: 0;
  padding-left: 0;
  border-top: 1px solid var(--border);
}

.nav-tree__item--expanded .nav-tree__children {
  display: flex;
}

.nav-tree__children .nav-tree__item {
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.nav-tree__children .nav-tree__item:last-child {
  border-bottom: none;
}

.nav-tree__children .nav-tree__link {
  padding-left: 28px;
  font-size: 14px;
  color: var(--text-2);
}

.nav-tree__children .nav-tree__link:hover {
  background-color: var(--surface-2);
  color: var(--text);
}

.nav-tree__children .nav-tree__item--active .nav-tree__link {
  color: var(--primary);
  font-weight: 500;
}

/* Breadcrumbs styles */
.breadcrumbs {
  display: flex;
  gap: 8px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
}

.breadcrumbs__item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumbs__item:not(:last-child)::after {
  content: '›';
  color: var(--text-3);
}

.breadcrumbs__link {
  color: var(--info);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumbs__link:hover {
  color: var(--info-strong);
  text-decoration: underline;
}

.breadcrumbs__current {
  color: var(--text);
  font-weight: 500;
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
  }

  [style*="display: flex; gap: 24px;"] {
    flex-direction: column;
    gap: 0;
  }

  [style*="width: 240px;"] {
    width: 100%;
    margin-bottom: 24px;
  }
}

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

.year-table__month-end-header {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.year-table__month-end-cell {
  font-variant-numeric: tabular-nums;
  font-size: 10px;
}