/* ==========================================================================
   BASE STYLES — CSS Reset, Body, Typography, Utilities
   ADHD Screening Portal — base.css

   Table of Contents:
   1. Modern CSS Reset
   2. Root & Body
   3. Container
   4. Typography — Headings
   5. Typography — Body Text
   6. Typography — Links
   7. Typography — Lists
   8. Typography — Misc (code, kbd, mark)
   9. Media (img, video, svg)
   10. Form Element Normalization
   11. Accessibility — Focus Visible
   12. Accessibility — Motion Preferences
   13. Utility Classes
   14. Scrollbar Styling
   ========================================================================== */


/* ==========================================================================
   1. MODERN CSS RESET
   ========================================================================== */

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

/* Prevent font size inflation on iOS */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  scroll-behavior: smooth;
  tab-size: 4;
}

/* Remove default list styles when a list has a role attribute */
ul[role="list"],
ol[role="list"] {
  list-style: none;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  line-height: var(--leading-normal);
}

/* Balance text wrapping on headings */
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

/* Improve readability with max-width on paragraphs */
p, li, figcaption {
  text-wrap: pretty;
  max-width: 72ch;
}

/* Remove default button styles */
button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
}

/* Remove underline from anchor */
a {
  color: inherit;
  text-decoration: none;
}

/* Make images easier to work with */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

/* Inherit fonts for inputs and buttons */
input, button, textarea, select {
  font: inherit;
  color: inherit;
}

/* Remove textarea resize handle vertical-only */
textarea {
  resize: vertical;
}

/* Avoid text overflows */
p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* Create a root stacking context */
#root,
#__next,
#app {
  isolation: isolate;
}

/* Remove table default borders */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* HR reset */
hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin-block: var(--space-6);
}

/* Fieldset reset */
fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

/* Legend */
legend {
  padding: 0;
}

/* Dialog reset */
dialog {
  padding: 0;
  border: none;
  background: none;
  max-width: 100%;
  max-height: 100%;
}

/* Remove details arrow in some browsers */
details > summary {
  cursor: pointer;
  list-style: none;
}

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


/* ==========================================================================
   2. ROOT & BODY
   ========================================================================== */

:root {
  color-scheme: light;
  font-size: 16px;
}

[data-theme="dark"] {
  color-scheme: dark;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-normal);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-body);

  /* Smooth rendering */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
  text-rendering: optimizeLegibility;

  /* Dark mode transition */
  transition:
    background-color var(--duration-normal) var(--ease-in-out),
    color var(--duration-normal) var(--ease-in-out);

  /* Safe area insets for notch devices */
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* Subtle background texture/gradient for depth */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(14, 165, 233, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 90%, rgba(99, 102, 241, 0.05) 0%, transparent 55%);
  pointer-events: none;
  z-index: var(--z-below);
}

[data-theme="dark"] body::before {
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(56, 189, 248, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 90%, rgba(129, 140, 248, 0.07) 0%, transparent 55%);
}

/* Main content wrapper — accounts for fixed nav */
#app,
#root,
.app-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: var(--spacing-nav-height);
}

main {
  flex: 1;
}


/* ==========================================================================
   3. CONTAINER
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--spacing-page-x);
}

.container-sm  { max-width: var(--container-sm);  margin-inline: auto; padding-inline: var(--spacing-page-x); }
.container-md  { max-width: var(--container-md);  margin-inline: auto; padding-inline: var(--spacing-page-x); }
.container-lg  { max-width: var(--container-lg);  margin-inline: auto; padding-inline: var(--spacing-page-x); }
.container-2xl { max-width: var(--container-2xl); margin-inline: auto; padding-inline: var(--spacing-page-x); }

/* Full-bleed section with contained inner */
.section {
  padding-block: var(--spacing-section-y);
}

.section-sm {
  padding-block: clamp(2rem, 5vw, 4rem);
}

.section-lg {
  padding-block: clamp(4rem, 10vw, 8rem);
}


/* ==========================================================================
   4. TYPOGRAPHY — HEADINGS
   ========================================================================== */

h1, .h1 {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-6xl));
  font-weight: var(--weight-extrabold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-primary);
}

h2, .h2 {
  font-size: clamp(var(--text-2xl), 3.5vw, var(--text-4xl));
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-primary);
}

h3, .h3 {
  font-size: clamp(var(--text-xl), 2.5vw, var(--text-2xl));
  font-weight: var(--weight-bold);
  line-height: var(--leading-snug);
  color: var(--color-text-primary);
}

h4, .h4 {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
  color: var(--color-text-primary);
}

h5, .h5 {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
}

h6, .h6 {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-normal);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
}

/* Gradient text variant for hero headings */
.text-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.display-heading {
  font-size: clamp(var(--text-4xl), 7vw, var(--text-7xl));
  font-weight: var(--weight-black);
  line-height: var(--leading-none);
  letter-spacing: var(--tracking-tighter);
}

.section-title {
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  font-weight: var(--weight-bold);
  text-align: center;
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-size: clamp(var(--text-base), 2vw, var(--text-lg));
  color: var(--color-text-secondary);
  text-align: center;
  max-width: 56ch;
  margin-inline: auto;
  margin-bottom: var(--space-12);
}


/* ==========================================================================
   5. TYPOGRAPHY — BODY TEXT
   ========================================================================== */

p {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text-primary);
}

p + p {
  margin-top: var(--space-4);
}

.lead {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  font-weight: var(--weight-normal);
  max-width: 65ch;
}

.text-sm    { font-size: var(--text-sm);   }
.text-xs    { font-size: var(--text-xs);   }
.text-lg    { font-size: var(--text-lg);   }
.text-xl    { font-size: var(--text-xl);   }
.text-2xl   { font-size: var(--text-2xl);  }

.text-muted    { color: var(--color-text-secondary); }
.text-tertiary { color: var(--color-text-tertiary);  }
.text-primary  { color: var(--color-primary);        }
.text-accent   { color: var(--color-accent);         }
.text-success  { color: var(--color-success);        }
.text-warning  { color: var(--color-warning);        }
.text-danger   { color: var(--color-danger);         }

.font-normal   { font-weight: var(--weight-normal);   }
.font-medium   { font-weight: var(--weight-medium);   }
.font-semibold { font-weight: var(--weight-semibold); }
.font-bold     { font-weight: var(--weight-bold);     }

.leading-tight   { line-height: var(--leading-tight);   }
.leading-normal  { line-height: var(--leading-normal);  }
.leading-relaxed { line-height: var(--leading-relaxed); }

blockquote {
  border-left: 3px solid var(--color-primary);
  padding-left: var(--space-4);
  margin-block: var(--space-6);
  color: var(--color-text-secondary);
  font-style: italic;
}


/* ==========================================================================
   6. TYPOGRAPHY — LINKS
   ========================================================================== */

a {
  color: var(--color-text-link);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--color-text-link-hover);
}

/* Inline link with underline */
.link-inline {
  color: var(--color-text-link);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(14, 165, 233, 0.40);
  transition: var(--transition-fast);
}

.link-inline:hover {
  text-decoration-color: var(--color-primary);
  color: var(--color-primary-dark);
}


/* ==========================================================================
   7. TYPOGRAPHY — LISTS
   ========================================================================== */

ul.list-disc {
  list-style: disc;
  padding-left: var(--space-5);
}

ol.list-decimal {
  list-style: decimal;
  padding-left: var(--space-5);
}

.list-disc li,
.list-decimal li {
  line-height: var(--leading-relaxed);
  padding-left: var(--space-1);
}

.list-disc li + li,
.list-decimal li + li {
  margin-top: var(--space-2);
}

/* Custom checkmark list */
.list-check {
  list-style: none;
  padding-left: 0;
}

.list-check li {
  padding-left: var(--space-6);
  position: relative;
  line-height: var(--leading-relaxed);
}

.list-check li + li {
  margin-top: var(--space-2);
}

.list-check li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 1.1em;
  height: 1.1em;
  background: var(--color-primary-subtle);
  border-radius: var(--radius-full);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230EA5E9'%3E%3Cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3E%3C/svg%3E");
  background-size: 80%;
  background-repeat: no-repeat;
  background-position: center;
}


/* ==========================================================================
   8. TYPOGRAPHY — MISC
   ========================================================================== */

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--color-bg-muted);
  color: var(--color-primary-dark);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

pre {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  overflow-x: auto;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
}

kbd {
  font-family: var(--font-mono);
  font-size: 0.8em;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-strong);
  border-bottom-width: 2px;
  border-radius: var(--radius-sm);
  padding: 0.1em 0.4em;
  color: var(--color-text-secondary);
}

mark {
  background: rgba(14, 165, 233, 0.20);
  color: var(--color-primary-dark);
  border-radius: var(--radius-xs);
  padding: 0 0.2em;
}

[data-theme="dark"] mark {
  background: rgba(56, 189, 248, 0.20);
  color: var(--color-primary-light);
}

abbr[title] {
  text-decoration: underline dotted;
  cursor: help;
}

small {
  font-size: var(--text-sm);
}

strong, b {
  font-weight: var(--weight-semibold);
}

em, i {
  font-style: italic;
}

sub, sup {
  font-size: 0.75em;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sup { top: -0.5em;    }
sub { bottom: -0.25em; }


/* ==========================================================================
   9. MEDIA
   ========================================================================== */

img {
  height: auto;
  max-width: 100%;
  object-fit: cover;
}

svg {
  flex-shrink: 0;
}

/* Responsive video embed */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;  /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-xl);
}

.video-wrapper iframe,
.video-wrapper video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Icon sizing helpers */
.icon-xs  { width: 1rem;    height: 1rem;    }
.icon-sm  { width: 1.25rem; height: 1.25rem; }
.icon-md  { width: 1.5rem;  height: 1.5rem;  }
.icon-lg  { width: 2rem;    height: 2rem;    }
.icon-xl  { width: 2.5rem;  height: 2.5rem;  }
.icon-2xl { width: 3rem;    height: 3rem;    }


/* ==========================================================================
   10. FORM ELEMENT NORMALIZATION
   ========================================================================== */

/* Remove default browser form styles */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

/* Select reset */
select {
  -webkit-appearance: none;
  appearance: none;
}

/* Checkbox/radio base */
[type="checkbox"],
[type="radio"] {
  accent-color: var(--color-primary);
}


/* ==========================================================================
   11. ACCESSIBILITY — FOCUS VISIBLE
   ========================================================================== */

/* Remove default outline — only show for keyboard navigation */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Interactive elements */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 3px;
  border-radius: var(--radius-md);
  box-shadow: var(--btn-focus-ring);
}

/* Input focus */
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  border-color: var(--color-border-focus);
  box-shadow: var(--input-focus-ring);
}

/* Skip to content link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: var(--z-max);
  background: var(--color-primary);
  color: white;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  transition: top var(--duration-fast);
}

.skip-link:focus {
  top: var(--space-4);
  outline: 2px solid white;
  outline-offset: 2px;
}


/* ==========================================================================
   12. ACCESSIBILITY — MOTION PREFERENCES
   (Full declarations are in animations.css; minimal guard here)
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  body {
    transition: none;
  }
}


/* ==========================================================================
   13. UTILITY CLASSES
   ========================================================================== */

/* --- Visibility --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sr-only-focusable:not(:focus):not(:focus-within) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden         { display: none !important;       }
.invisible      { visibility: hidden;              }
.opacity-0      { opacity: 0;                      }
.opacity-50     { opacity: 0.5;                    }
.opacity-75     { opacity: 0.75;                   }

@media (max-width: 767px)  { .hide-mobile  { display: none !important; } }
@media (min-width: 768px)  { .hide-desktop { display: none !important; } }
@media (min-width: 1024px) { .hide-lg      { display: none !important; } }

/* --- Text Alignment --- */
.text-left    { text-align: left;    }
.text-center  { text-align: center;  }
.text-right   { text-align: right;   }

/* --- Display --- */
.block          { display: block;        }
.inline-block   { display: inline-block; }
.inline         { display: inline;       }
.flex           { display: flex;         }
.inline-flex    { display: inline-flex;  }
.grid           { display: grid;         }
.hidden         { display: none;         }

/* --- Flex Utilities --- */
.flex-col     { flex-direction: column;  }
.flex-row     { flex-direction: row;     }
.flex-wrap    { flex-wrap: wrap;         }
.flex-1       { flex: 1 1 0%;           }
.flex-auto    { flex: 1 1 auto;         }
.flex-none    { flex: none;             }
.items-start  { align-items: flex-start; }
.items-center { align-items: center;     }
.items-end    { align-items: flex-end;   }
.justify-start  { justify-content: flex-start;    }
.justify-center { justify-content: center;        }
.justify-end    { justify-content: flex-end;      }
.justify-between{ justify-content: space-between; }
.gap-2  { gap: var(--space-2);  }
.gap-3  { gap: var(--space-3);  }
.gap-4  { gap: var(--space-4);  }
.gap-6  { gap: var(--space-6);  }
.gap-8  { gap: var(--space-8);  }

/* --- Grid Utilities --- */
.grid-cols-1 { grid-template-columns: var(--grid-cols-1); }
.grid-cols-2 { grid-template-columns: var(--grid-cols-2); }
.grid-cols-3 { grid-template-columns: var(--grid-cols-3); }
.grid-cols-4 { grid-template-columns: var(--grid-cols-4); }

/* --- Spacing --- */
.m-0  { margin: 0; }
.mx-auto { margin-inline: auto; }
.mt-2  { margin-top: var(--space-2); }
.mt-4  { margin-top: var(--space-4); }
.mt-6  { margin-top: var(--space-6); }
.mt-8  { margin-top: var(--space-8); }
.mb-2  { margin-bottom: var(--space-2); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-6  { margin-bottom: var(--space-6); }
.mb-8  { margin-bottom: var(--space-8); }
.p-0   { padding: 0; }
.p-4   { padding: var(--space-4); }
.p-6   { padding: var(--space-6); }
.p-8   { padding: var(--space-8); }
.px-4  { padding-inline: var(--space-4); }
.py-4  { padding-block: var(--space-4); }
.py-8  { padding-block: var(--space-8); }

/* --- Width / Height --- */
.w-full  { width: 100%;  }
.h-full  { height: 100%; }
.w-auto  { width: auto;  }
.min-w-0 { min-width: 0; }

/* --- Overflow --- */
.overflow-hidden { overflow: hidden; }
.overflow-auto   { overflow: auto;   }
.truncate        { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Position --- */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed    { position: fixed;    }
.sticky   { position: sticky;   }

/* --- Border Radius --- */
.rounded-sm   { border-radius: var(--radius-sm);   }
.rounded      { border-radius: var(--radius-md);   }
.rounded-lg   { border-radius: var(--radius-lg);   }
.rounded-xl   { border-radius: var(--radius-xl);   }
.rounded-2xl  { border-radius: var(--radius-2xl);  }
.rounded-full { border-radius: var(--radius-full); }

/* --- Shadow --- */
.shadow-sm  { box-shadow: var(--shadow-sm);  }
.shadow     { box-shadow: var(--shadow-md);  }
.shadow-lg  { box-shadow: var(--shadow-lg);  }
.shadow-xl  { box-shadow: var(--shadow-xl);  }
.shadow-glow{ box-shadow: var(--shadow-glow); }
.no-shadow  { box-shadow: none !important;   }

/* --- Background --- */
.bg-transparent { background: transparent;             }
.bg-primary     { background: var(--color-primary);    }
.bg-card        { background: var(--color-bg-card);    }
.bg-muted       { background: var(--color-bg-muted);   }

/* --- Divider --- */
.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin-block: var(--space-6);
}

.divider-primary {
  border-top-color: var(--color-border-primary);
}

/* --- Pointer Events --- */
.pointer-events-none { pointer-events: none; }
.pointer-events-auto { pointer-events: auto; }

/* --- User Select --- */
.select-none { user-select: none;   }
.select-all  { user-select: all;    }
.select-text { user-select: text;   }

/* --- Cursor --- */
.cursor-pointer  { cursor: pointer;  }
.cursor-default  { cursor: default;  }
.cursor-not-allowed { cursor: not-allowed; }

/* --- Transition helper --- */
.transition        { transition: var(--transition-normal); }
.transition-fast   { transition: var(--transition-fast);   }
.transition-colors { transition: var(--transition-color);  }

/* --- Aspect Ratio --- */
.aspect-square { aspect-ratio: 1 / 1;   }
.aspect-video  { aspect-ratio: 16 / 9;  }

/* --- Backdrop --- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur) var(--glass-saturate);
  -webkit-backdrop-filter: var(--glass-blur) var(--glass-saturate);
  border: 1px solid var(--glass-border);
}

.glass-heavy {
  background: var(--glass-bg-heavy);
  backdrop-filter: var(--glass-blur-heavy) var(--glass-saturate);
  -webkit-backdrop-filter: var(--glass-blur-heavy) var(--glass-saturate);
  border: 1px solid var(--glass-border);
}

/* --- Info / Notice boxes --- */
.notice {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-4);
  border-radius: var(--radius-xl);
  border: 1px solid currentColor;
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

.notice-info    { background: var(--color-info-subtle);    color: var(--color-info);    border-color: rgba(6,182,212,0.25); }
.notice-success { background: var(--color-success-subtle); color: var(--color-success); border-color: rgba(16,185,129,0.25); }
.notice-warning { background: var(--color-warning-subtle); color: var(--color-warning); border-color: rgba(245,158,11,0.25); }
.notice-danger  { background: var(--color-danger-subtle);  color: var(--color-danger);  border-color: rgba(239,68,68,0.25); }

.notice svg {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.1em;
}


/* ==========================================================================
   14. SCROLLBAR STYLING
   ========================================================================== */

/* Webkit */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--color-border-strong);
  border-radius: var(--radius-full);
  transition: background var(--duration-fast);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-tertiary);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-border-strong) transparent;
}

/* Horizontal scroll fade */
.scroll-fade-right {
  -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
  mask-image: linear-gradient(to right, black 85%, transparent 100%);
}
