:root {
  --font-family: 'ALS Sirius', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', Arial;
  --clr-text: #1C1C1C;
  --clr-brand: #07b700;
  --clr-white: #ffffff;
  --clr-bg: #cfe8ff;
  --clr-muted: #969696;
  --clr-tile-icon-bg: #f9fbfa;
  --clr-scroll-track: #F7F9FE;
  --clr-scroll-thumb: #d1d5db;
  --clr-scroll-thumb-hover: #9ca3af;
  --radius-modal: 16px;
  --radius-mobile: 14px;
  --radius-category: 24px;
  --radius-round: 9999px;
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.1);
  --shadow-sm-hover: 0 2px 5px #18274b1f, 0 2px 8px #18274b1f;
  --shadow-modal: 0 20px 50px rgba(0,0,0,.25);
  --space-xxs: 4px;
  --space-xs: 8px;
  --space-s: 10px;
  --space-m: 12px;
  --space-l: 16px;
  --space-xl: 20px;
  --space-2xl: 24px;
  --space-3xl: 32px;
  --space-4xl: 40px;
  --fs-base: 16px;
  --fs-title: 20px;
  --lh-base: 1.6;
  --lh-title: 1.3;
  --fs-title-category: 32px;
  --lh-title-category: 1.25;
  --btn-gap: var(--space-s);
  --btn-padding: var(--space-m) var(--space-3xl);
  --btn-radius: 10px;
  --btn-fs: 16px;
  --modal-w: 652px;
  --modal-padding: var(--space-4xl);
  --modal-padding-mobile: 34px;
  --modal-outset: 32px;
  --categories-height: 684px;
  --tile-gap: var(--space-2xl);
  --tile-padding: var(--space-2xl);
  --tile-radius: 24px;
  --tile-min-h: 84px;
  --tile-margin: var(--space-xl);
  --tile-icon-size: 28px;
  --tile-icon-pad: var(--space-xs);
  --backdrop-blur: 5px;
  --scrollbar-w: 8px;
  --safe-top: env(safe-area-inset-top);
  --safe-right: env(safe-area-inset-right);
  --safe-bottom: env(safe-area-inset-bottom);
  --safe-left: env(safe-area-inset-left);
  --dur-fast: .2s;
  --ease-standard: ease;
}
@font-face { font-family: 'ALS_Sirius'; src: url('fonts/ALS_Sirius_Regular_0.95.ttf'); font-weight: normal; font-style: normal; }
@font-face { font-family: 'ALS_Sirius'; src: url('fonts/ALS_Sirius_Regular_0.95.ttf'); font-weight: 400; font-style: normal; }
@font-face { font-family: 'ALS_Sirius'; src: url('fonts/ALS_Sirius_Medium_1.6.ttf'); font-weight: 500; font-style: normal; }
@font-face { font-family: 'ALS_Sirius'; src: url('fonts/ALS_Sirius_Bold_0.95.ttf'); font-weight: 700; font-style: normal; }

*, *::before, *::after { box-sizing: border-box; }
html, body {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overscroll-behavior: none;
}
body {
  margin: 0;
  font-family: var(--font-family);
  color: var(--clr-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--clr-bg) url('img/bg.png') center / cover no-repeat fixed;
  padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
}

.center {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: max(16px, var(--safe-top)) max(16px, var(--safe-right)) max(16px, var(--safe-bottom)) max(16px, var(--safe-left));
  backdrop-filter: blur(var(--backdrop-blur));
  -webkit-backdrop-filter: blur(var(--backdrop-blur));
  overscroll-behavior: contain;
}

.modal {
  position: relative;
  width: var(--modal-w);
  max-width: calc(100vw - var(--modal-outset));
  background: var(--clr-white);
  border-radius: var(--radius-modal);
  box-shadow: var(--shadow-modal);
  padding: var(--modal-padding);
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - var(--modal-outset));
}

.modal > .content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal.categories {
  border-radius: var(--radius-category);
  display: flex;
  flex-direction: column;
  max-height: min(var(--categories-height), calc(100dvh - var(--modal-outset)));
}

.categories > .title {
  font-size: var(--fs-title-category);
  line-height: var(--lh-title-category);
}

.categories > .content {
  overflow-y: auto;
  margin-left: -20px;
  margin-right: -36px;
  flex: 1 1 auto;
  min-height: 0;
}

a.tile { text-decoration: none; color: var(--clr-text); }
a.tile > .tile__cta { text-decoration: none; color: var(--clr-muted); }

.tile {
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: var(--tile-padding);
  gap: var(--tile-gap);
  border-radius: var(--tile-radius);
  background: var(--clr-white);
  box-shadow: var(--shadow-sm);
  min-height: var(--tile-min-h);
  min-width: 0;
  margin: var(--tile-margin);
}

.tile:hover { transition: background var(--dur-fast) var(--ease-standard); box-shadow: var(--shadow-sm-hover); }
.tile:hover .tile__cta-text { color: var(--clr-text); transition: color var(--dur-fast) var(--ease-standard); }
.tile:hover .tile__cta img { filter: brightness(0) saturate(100%) invert(10%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(95%) contrast(95%); transition: filter var(--dur-fast) var(--ease-standard); }

.tile__left { display: flex; align-items: center; gap: 12px; flex: 1 1 auto; min-width: 0; }
.tile__icon {
  width: var(--tile-icon-size);
  height: var(--tile-icon-size);
  flex-shrink: 0;
  padding: var(--tile-icon-pad);
  border-radius: var(--radius-round);
  background: var(--clr-tile-icon-bg);
  box-sizing: content-box;
}
.tile__texts { flex: 1 1 auto; min-width: 0; overflow: hidden; }
.tile__title { margin: 0; font-weight: 500; font-size: 20px; line-height: 28px; word-break: break-word; }
.tile__subtitle { margin: 4px 0 0; font-weight: 400; font-size: 16px; line-height: 24px; }
.tile__cta { display: inline-flex; color: var(--clr-muted); }

.title { margin: 0 0 12px 0; font-size: var(--fs-title); line-height: var(--lh-title); font-weight: 700; }
p { margin: 0 0 12px 0; font-size: var(--fs-base); line-height: var(--lh-base); font-weight: 400; }
a.link { color: var(--clr-brand); font-weight: 400; }

.modal > .btn {
  align-self: flex-start;
  width: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--btn-gap);
  margin-top: var(--space-m);
  padding: var(--btn-padding);
  border: 0;
  cursor: pointer;
  background: var(--clr-brand);
  color: var(--clr-white);
  font-weight: 400;
  font-size: var(--btn-fs);
  border-radius: var(--btn-radius);
  box-shadow: none;
  text-decoration: none;
}

.content::-webkit-scrollbar { width: var(--scrollbar-w); background: var(--clr-scroll-track); border-radius: var(--radius-round); }
.content::-webkit-scrollbar-track { background: transparent; }
.content::-webkit-scrollbar-thumb { background: var(--clr-scroll-thumb); border-radius: var(--radius-round); transition: background var(--dur-fast) var(--ease-standard); }
.content::-webkit-scrollbar-thumb:hover { background: var(--clr-scroll-thumb-hover); }
.content::-webkit-scrollbar-button { display: none; width: 0; height: 0; }

@media (max-width: 1024px) {
  .tile__title, .tile__subtitle { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tile__cta { margin-left: 8px; width: 24px; height: 24px; font-size: 0; background: center / 24px 24px no-repeat url("icons/chevron-right.svg"); flex-shrink: 0; }
  .tile__cta img { display: none; }
  .modal.categories { max-height: min(var(--categories-height), calc(100dvh - var(--modal-outset))); }
}

@media (max-height: 1024px) and (orientation: landscape) {
  .modal.categories { max-height: min(100dvh, var(--categories-height)); }
}

@media (max-width: 480px) {
  .categories > .title { font-size: 20px; margin-bottom: 10px; }
  .categories > .content { margin-left: -30px; margin-right: -32px; min-height: 0; overflow-y: auto; }
  .categories { max-height: min(80dvh, var(--categories-height)); }
  .modal { width: 92vw; border-radius: var(--radius-mobile); padding: var(--modal-padding-mobile); }
  .title { font-size: 20px; margin-bottom: 10px; }
  p { font-size: 16px; line-height: 1.7; }
  .btn { display: flex; width: 100%; justify-content: center; padding: 14px 16px; font-size: 16px; border-radius: 12px; }
  .modal.categories { max-height: min(80dvh, var(--categories-height)); }
  .modal > .btn { align-self: stretch; width: 100%; justify-content: center; }
  .tile__title { font-size: 14px; line-height: 24px; }
  .tile__subtitle { font-size: 12px; line-height: 18px; }
}

@media (max-height: 480px) and (orientation: landscape) {
  .categories > .title { font-size: 20px; margin-bottom: 10px; }
  .categories > .content { margin-left: -30px; margin-right: -32px; min-height: 0; overflow-y: auto; }
  .modal { max-width: calc(100dvw - 32px); max-height: 80dvh; padding: 16px 32px; }
  .content { height: auto; overflow-y: auto; }
  .title { font-size: 18px; margin-bottom: 10px; }
  p { margin-bottom: 10px; }
  .modal.categories { max-height: min(80dvh, var(--categories-height)); }
}
