/**
 * Failed to minify the file using clean-css v5.3.2. Serving the original version.
 * Original file: /npm/taks-custom-base-css@1.3.4/taks-custom-base.css
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
/*! TAK's Custom Base.css v1.3.4 | MIT License | github.com/tak-dcxi/taks-custom-base-css */

/* ======================================================
//
// MARK: # TAK's Custom Base.css
// Made by TAK - https: //www.tak-dcxi.com/
// This CSS is built based on Normalize.css. (https: //necolas.github.io/normalize.css/)
// It aims to normalize styles for better cross-browser compatibility, remove default browser styling, and enhance usability and accessibility for all users."
//
// ====================================================== */

/* ======================================================
// MARK: ## Universal
// ------------------------------------------------------ */
*,
::before,
::after {
  /* Ensure padding and borders are included within the dimensions of the element. */
  box-sizing: border-box;

  /* Prevent inline elements from extending beyond their container's bounds. */
  min-inline-size: 0;

  /* Remove any default borders. */
  border-width: 0;

  /* Set a default border style of solid for easy border additions. */
  border-style: solid;
}

/* ======================================================
// MARK: ## Document and Body Elements
// ------------------------------------------------------ */
:where(:root, body) {
  /* Prevent scrolling along the inline axis (usually horizontal) for root and body. */
  overflow-inline: clip;

  @supports not (overflow-inline: clip) {
    /* Prevent horizontal scrolling for root and body in browsers that don't support `overflow-inline`. */
    overflow-x: clip;
  }
}

:where(:root) {
  /* Specify a safe font-family for the default Gothic typeface. */
  font-family: 'Helvetica Neue', arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'BIZ UDPGothic', meiryo, sans-serif;

  /* Normalize font-style. */
  font-style: unset;

  /* Normalize font-style. */
  font-weight: 400;

  /* From an accessibility perspective, the line spacing within a paragraph should be at least 1.5 times the text size. (https://waic.jp/translations/WCAG21/#visual-presentation) */
  line-height: 1.5;

  /* Align text to the start of the element, accommodating left-to-right and right-to-left languages. */
  text-align: start;

  /* Remove leading white space for a cleaner text alignment. */
  text-spacing-trim: trim-start;

  /* Use the browser's default method to determine word breaking. */
  word-break: initial;

  /* Apply strict line breaking rules to enhance readability in languages that require it. */
  line-break: strict;

  /* Allow long words to be broken and wrapped at any point to prevent overflow. */
  overflow-wrap: anywhere;

  /* Automatically insert hyphens where appropriate for better text flow and alignment. */
  hyphens: auto;

  /* Prevent mobile browsers from scaling text sizes automatically. */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;

  /* Preventing the layout shift caused by scrollbars. */
  scrollbar-gutter: stable;

  /* Allow animations and transitions of intrinsic sizing keywords. */
  interpolate-size: allow-keywords;

  /* Eliminate the tap highlight color on mobile devices for a cleaner interface. */
  -webkit-tap-highlight-color: transparent;

  &:has(:where(:modal)) {
    /* Prevent scrolling of the document when a modal is open. */
    overflow: hidden;
  }
}

:where(body) {
  /* Ensures the body element occupies at least 100% of the viewport's block size. */
  min-block-size: 100svb;

  /* Reset default margin. */
  margin: unset;
}

/* ======================================================
// MARK: ## Custom Properties
// ------------------------------------------------------ */

/* ------------------------------------------------------
// MARK: ### colors
*/

/*
  Define a custom property to use as a background color that remains visible in forced colors mode.
  This is useful when using `background-color: currentColor` as a foreground color,
  such as in pseudo-elements.

  Example usage:
  ```
  .button::after {
    content: '';
    justify-self: end;
    mask-image: url(...);
    inline-size: 1em;
    aspect-ratio: 1;
    background-color: var(--background-current);
    color: red;
  }
*/

@property --background-current {
  syntax: 'currentColor | CanvasText';
  inherits: true;
  initial-value: currentColor;
}

:where(:root) {
  @media (forced-colors: active) {
    /* Set the default background color to the forced color mode background. */
    --background-current: CanvasText;
  }
}

/* ------------------------------------------------------
// MARK: ### easing function
*/

@property --ease-in-sine {
  syntax: '*';
  inherits: false;
  initial-value: cubic-bezier(0.47, 0, 0.745, 0.715);
}

@property --ease-out-sine {
  syntax: '*';
  inherits: false;
  initial-value: cubic-bezier(0.39, 0.575, 0.565, 1);
}

@property --ease-in-out-sine {
  syntax: '*';
  inherits: false;
  initial-value: cubic-bezier(0.445, 0.05, 0.55, 0.95);
}

@property --ease-in-quad {
  syntax: '*';
  inherits: false;
  initial-value: cubic-bezier(0.55, 0.085, 0.68, 0.53);
}

@property --ease-out-quad {
  syntax: '*';
  inherits: false;
  initial-value: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@property --ease-in-out-quad {
  syntax: '*';
  inherits: false;
  initial-value: cubic-bezier(0.455, 0.03, 0.515, 0.955);
}

@property --ease-in-cubic {
  syntax: '*';
  inherits: false;
  initial-value: cubic-bezier(0.55, 0.055, 0.675, 0.19);
}

@property --ease-out-cubic {
  syntax: '*';
  inherits: false;
  initial-value: cubic-bezier(0.215, 0.61, 0.355, 1);
}

@property --ease-in-out-cubic {
  syntax: '*';
  inherits: false;
  initial-value: cubic-bezier(0.645, 0.045, 0.355, 1);
}

@property --ease-in-quart {
  syntax: '*';
  inherits: false;
  initial-value: cubic-bezier(0.895, 0.03, 0.685, 0.22);
}

@property --ease-out-quart {
  syntax: '*';
  inherits: false;
  initial-value: cubic-bezier(0.165, 0.84, 0.44, 1);
}

@property --ease-in-out-quart {
  syntax: '*';
  inherits: false;
  initial-value: cubic-bezier(0.77, 0, 0.175, 1);
}

@property --ease-in-quint {
  syntax: '*';
  inherits: false;
  initial-value: cubic-bezier(0.755, 0.05, 0.855, 0.06);
}

@property --ease-out-quint {
  syntax: '*';
  inherits: false;
  initial-value: cubic-bezier(0.23, 1, 0.32, 1);
}

@property --ease-in-out-quint {
  syntax: '*';
  inherits: false;
  initial-value: cubic-bezier(0.86, 0, 0.07, 1);
}

@property --ease-in-expo {
  syntax: '*';
  inherits: false;
  initial-value: cubic-bezier(0.95, 0.05, 0.795, 0.035);
}

@property --ease-out-expo {
  syntax: '*';
  inherits: false;
  initial-value: cubic-bezier(0.19, 1, 0.22, 1);
}

@property --ease-in-out-expo {
  syntax: '*';
  inherits: false;
  initial-value: cubic-bezier(1, 0, 0, 1);
}

@property --ease-in-circ {
  syntax: '*';
  inherits: false;
  initial-value: cubic-bezier(0.6, 0.04, 0.98, 0.335);
}

@property --ease-out-circ {
  syntax: '*';
  inherits: false;
  initial-value: cubic-bezier(0.075, 0.82, 0.165, 1);
}

@property --ease-in-out-circ {
  syntax: '*';
  inherits: false;
  initial-value: cubic-bezier(0.785, 0.135, 0.15, 0.86);
}

@property --ease-in-back {
  syntax: '*';
  inherits: false;
  initial-value: cubic-bezier(0.6, -0.28, 0.735, 0.045);
}

@property --ease-out-back {
  syntax: '*';
  inherits: false;
  initial-value: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@property --ease-in-out-back {
  syntax: '*';
  inherits: false;
  initial-value: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ------------------------------------------------------
// MARK: ### triangle shapes
*/

/*
Example usage:
```
.tooltip::after {
  --_size: 16px;

  content: '';
  position: absolute;
  inset-inline: 0;
  inset-block-start: 100%;
  clip-path: var(--shape-triangle-bottom);
  inline-size: var(--_size);
  block-size: calc(var(--_size) / 2 * tan(60deg));
  margin-inline: auto;
  background-color: inherit;
}
```
*/

@property --shape-triangle-top {
  syntax: '*';
  inherits: false;
  initial-value: polygon(50% 0, 100% 100%, 0 100%);
}

@property --shape-triangle-bottom {
  syntax: '*';
  inherits: false;
  initial-value: polygon(0 0, 100% 0, 50% 100%);
}

@property --shape-triangle-right {
  syntax: '*';
  inherits: false;
  initial-value: polygon(0 0, 100% 50%, 0 100%);
}

@property --shape-triangle-left {
  syntax: '*';
  inherits: false;
  initial-value: polygon(0 50%, 100% 0, 100% 100%);
}

@property --shape-triangle-lower-left {
  syntax: '*';
  inherits: false;
  initial-value: polygon(0 0, 100% 100%, 0 100%);
}

@property --shape-triangle-upper-left {
  syntax: '*';
  inherits: false;
  initial-value: polygon(0 0, 100% 0, 0 100%);
}

@property --shape-triangle-lower-right {
  syntax: '*';
  inherits: false;
  initial-value: polygon(100% 0, 100% 100%, 0 100%);
}

@property --shape-triangle-upper-right {
  syntax: '*';
  inherits: false;
  initial-value: polygon(0 0, 100% 0, 100% 100%);
}

/* ------------------------------------------------------
// MARK: ### chevron icons
*/

/*
The chevron icon is borrowed from Basicons (https://basicons.xyz/).

Example usage:
```
.button::after {
  content: '';
  justify-self: end;
  mask-image: var(--icon-chevron-right);
  inline-size: 1em;
  aspect-ratio: 1;
  background-color: var(--background-current);
}
```
*/

/* single chevron icons */
@property --icon-chevron-up {
  syntax: '<url>';
  inherits: false;
  initial-value: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m4 16 8-8 8 8" /></svg>');
}

@property --icon-chevron-right {
  syntax: '<url>';
  inherits: false;
  initial-value: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M8 4L16 12L8 20" /></svg>');
}

@property --icon-chevron-down {
  syntax: '<url>';
  inherits: false;
  initial-value: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M4 8L12 16L20 8" /></svg>');
}

@property --icon-chevron-left {
  syntax: '<url>';
  inherits: false;
  initial-value: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M16 4L8 12L16 20" /></svg>');
}

/* double chevron icons */
@property --icon-chevrons-up {
  syntax: '<url>';
  inherits: false;
  initial-value: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M17 18L12 13L7 18M17 11L12 6L7 11" /></svg>');
}

@property --icon-chevrons-right {
  syntax: '<url>';
  inherits: false;
  initial-value: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M6 7L11 12L6 17M13 7L18 12L13 17" /></svg>');
}

@property --icon-chevrons-down {
  syntax: '<url>';
  inherits: false;
  initial-value: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M17 6L12 11L7 6M17 13L12 18L7 13" /></svg>');
}

@property --icon-chevrons-left {
  syntax: '<url>';
  inherits: false;
  initial-value: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M18 7L13 12L18 17M11 7L6 12L11 17" /></svg>');
}

/* ------------------------------------------------------
// MARK: ### launch link icon
*/

/*
The chevron icon is borrowed from Basicons (https://basicons.xyz/).

Example usage:
```
.button[target="_blank"]::after {
  content: '' / '別ウインドウで開きます';
  justify-self: end;
  mask-image: var(--icon-launch-link);
  inline-size: 1em;
  aspect-ratio: 1;
  background-color: var(--background-current);
}
```
*/

@property --icon-launch-link {
  syntax: '<url>';
  inherits: false;
  initial-value: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M17 2H22V7" /><path d="M21 13V19C21 20.1046 20.1046 21 19 21H5C3.89543 21 3 20.1046 3 19V5C3 3.89543 3.89543 3 5 3H11" /><path d="M13 11L21.5 2.5" /></svg>');
}

/* ------------------------------------------------------
// MARK: ### leading trim
*/

/*
You can use the `--leading-trim` custom property to adjust the vertical spacing of text elements.
This helps in achieving more consistent and visually pleasing typography across different languages and font styles.

@see https://www.tak-dcxi.com/article/use-line-height-trim-as-css-variable

Example usage:
```
p {
  margin-block: var(--leading-trim);
}

.button {
  padding-block: calc(1.5em + var(--leading-trim));
}
```
*/

@property --leading-trim {
  syntax: '*';
  inherits: false;
  initial-value: calc((1em - 1lh) / 2);
}

:where(:lang(en)) {
  /* This ensures that the vertical space is evenly distributed, improving the visual balance of text. */
  --leading-trim: calc((1cap - 1lh) / 2);
}

/* ------------------------------------------------------
// MARK: ### hover state
*/

/*
You can use these custom properties to easily switch between hover and non-hover styles.
The var() function will use the first non-empty value, allowing you to define both states in one line.

Example usage:
```
.button {
  --_background-lighten: var(--is-hover-false, 0%) var(--is-hover-true, 20%);

  background-color: color-mix(in sRGB, var(--background-button), #fff var(--_background-lighten));
}
```
*/

:where(:any-link, :enabled, summary) {
  /* Define custom properties for hover state on interactive elements. Default state: `--is-hover-true` is empty, `--is-hover-false` has a value. */
  --is-hover-true: ;
  --is-hover-false: initial;

  @media (any-hover: hover) {
    &:where(:hover) {
      /* Set hover state for actual hover, but only on devices that support hover. Hover state: `--is-hover-true` has a value, `--is-hover-false` is empty. */
      --is-hover-true: initial;
      --is-hover-false: ;
    }
  }

  &:where(:focus-visible) {
    /* Set hover state for focus-visible state. Focus-visible state: `--is-hover-true` has a value, `--is-hover-false` is empty. */
    --is-hover-true: initial;
    --is-hover-false: ;
  }
}

/* ======================================================
// MARK: ## Sections
// ------------------------------------------------------ */
:where(h1, h2, h3, h4, h5, h6) {
  /* Reset default margin. */
  margin-block: unset;

  /* Reset default font-size. */
  font-size: unset;
}

:where(search) {
  /* Render the `search` element consistently. */
  display: block flow;
}

/* ======================================================
// MARK: ## Grouping content
// ------------------------------------------------------ */
:where(p, blockquote, figure, pre, address, ul, ol, dl) {
  /* Reset default margin-block. */
  margin-block: unset;
}

:where(blockquote, figure) {
  /* Reset default margin-inline. */
  margin-inline: unset;
}

:where(address):where(:lang(ja)) {
  /* Reset font style for specific Japanese language elements. */
  font-style: unset;
}

:where(ul, ol) {
  /* Remove default padding-inline-start. */
  padding-inline-start: unset;

  /* In Safari, using 'list-style: none' causes the list not to be announced by screen readers, so use 'list-style-type: ""' to hide markers without affecting accessibility. */
  list-style-type: '';
}

:where(dt) {
  /* Make definition terms bolder. */
  font-weight: 700;
}

:where(dd) {
  /* Remove default indentation. */
  margin-inline-start: unset;
}

:where(hr) {
  /* Sets the thickness of the top border of the <hr> element to 1px. */
  border-block-start-width: 1px;
}

:where(pre) {
  /* Sets the tab character width to 2 spaces for better readability in preformatted text. */
  tab-size: 2;

  @media print {
    /* Allow text within <pre> elements to wrap when printing. */
    white-space: pre-wrap;
  }
}

/* ======================================================
// MARK: ## Text-level semantics
// ------------------------------------------------------ */
:where(b, strong) {
  /* Enhance the weight of bold elements for emphasis. */
  font-weight: 700;
}

:where(em):where(:lang(ja)) {
  /* Enhance the weight of bold elements for emphasis. */
  font-weight: 700;
}

:where(i, cite, em, dfn, var):where(:lang(ja)) {
  /* Reset font style for specific Japanese language elements. */
  font-style: unset;
}

:where(small) {
  /* Set the font size to 1em (same as the parent element). */
  font-size: 1em;

  /* Set the font weight to 400. */
  font-weight: 400;
}

:where(code, kbd, samp) {
	/* Set the monospace font using Tailwind as a reference(@see https://tailwindcss.com/docs/font-family). Specifying 'serif' is a countermeasure for Chrome's 13px issue. */
	font-family: ui-monospace, sfmono-regular, menlo, monaco, consolas, 'Liberation Mono', 'Courier New', serif;

	/* Reset font size to ensure consistent appearance across different devices. */
	font-size: unset;
}

:where(cite, dfn) {
  --_quotation-start: '“';
  --_quotation-end: '”';

  &::before {
    /* Inserts an opening quotation mark before the content of <cite> and <dfn> elements, defaulting to a double quote unless overridden. */
    content: var(--_quotation-start);
  }

  &::after {
    /* Inserts a closing quotation mark after the content of <cite> and <dfn> elements, defaulting to a double quote unless overridden. */
    content: var(--_quotation-end);
  }

  &:where(:lang(ja)) {
    /* Overrides the default opening quotation mark with the Japanese opening quote for <cite> and <dfn> elements in Japanese. */
    --_quotation-start: '「';
    --_quotation-end: '」';
  }
}

:where(var) {
  /* Sets the font family to serif for <var> elements, enhancing the typographic distinction of variable names in technical content. */
  font-family: serif;

  &:where(:lang(ja)) {
    /* Resets the font family for <var> elements in Japanese content. */
    font-family: unset;
  }
}

:where(mark) {
  @media (forced-colors: none) {
    /* Remove any default background colors. */
    background-color: unset;

    /* Reset text color to default or inherited value. */
    color: unset;

    /* Applies an underline to the text to highlight it. */
    text-decoration-line: underline;

    /* Sets the color of the underline using a mix of the 'Mark' color and transparency. */
    text-decoration-color: oklch(from #ff0 l c h / 50%);

    /* Specifies the thickness of the underline. */
    text-decoration-thickness: 0.4em;

    /* Adjusts the position of the underline closer to the text. */
    text-underline-offset: -0.2em;

    /* Ensures the underline is not broken by descenders in characters like g, j, p, q, and y. */
    text-decoration-skip-ink: none;
  }
}

/* ======================================================
// MARK: ## Links
// ------------------------------------------------------ */
:where(:any-link) {
  /* Remove any default background colors. */
  background-color: unset;

  /* Reset text color to default or inherited value. */
  color: unset;

  /* Remove underline from links. */
  text-decoration-line: none;

  /* Set the thickness of the text decoration based on the font metrics. */
  text-decoration-thickness: from-font;

  /* Position the underline slightly away from the text for enhanced legibility. */
  text-underline-offset: 0.25em;

  /* Adjust underline to skip over descenders for better readability. */
  text-decoration-skip-ink: auto;
}

/* ======================================================
// MARK: ## Edits
// ------------------------------------------------------ */
:where(ins):not(:where(.adsbygoogle)) {
  /* Use a dashed line for underlining inserted content, making it distinctly visible. */
  text-decoration-style: dashed;

  /* Position the underline slightly away from the text for enhanced legibility. */
  text-underline-offset: 0.4em;

  /* Adjust underline to skip over descenders for better readability. */
  text-decoration-skip-ink: auto;
}

:where(del) {
  /* Apply a double line through the text for deleted content, enhancing visibility. */
  text-decoration-style: double;
}

/* ======================================================
// MARK: ## Embedded content
// ------------------------------------------------------ */
:where(img, picture, svg, video, canvas, audio, iframe, embed, object) {
  /* Set elements to display as block-level flow containers, suitable for complex layouts. */
  display: block flow;

  /* Limits the maximum size inline to prevent overflow. */
  max-inline-size: 100%;

  /* Automatically adjusts the block size based on content. */
  block-size: auto;
}

/* ======================================================
// MARK: ## Tabular data
// ------------------------------------------------------ */
:where(table) {
  /* Collapses border for a more compact table design. */
  border-collapse: collapse;
}

:where(caption) {
  /* Aligns the caption text to the start of the element. */
  text-align: start;
}

:where(td, th) {
  /* Removes default padding from table cells and headers. */
  padding: unset;

  /* Aligns content of table cells to the top. */
  vertical-align: top;
}

:where(th) {
  /* Makes table header text bold. */
  font-weight: 700;

  /* Aligns header text to the start of the cell. */
  text-align: start;
}

/* ======================================================
// MARK: ## Forms
// ------------------------------------------------------ */
:where(button, input, select, textarea),
::file-selector-button {
  /* Remove default padding. */
  padding: unset;

  /* Apply a transparent border for forced colors mode. */
  border: 1px solid transparent;

  /* Resets border-radius to default. */
  border-radius: unset;

  /* Removes default background color. */
  background-color: unset;

  /* Removes default text color. */
  color: unset;

  /* Resets font settings to inherit from parent. */
  font: unset;

  /* Centers the element vertically within its line box. */
  vertical-align: middle;

  /* Resets letter-spacing to default. */
  letter-spacing: unset;

  /* Resets text alignment to default. */
  text-align: unset;

  /* Resets text transformation to default. */
  text-transform: unset;
}

:where([type='radio' i], [type='checkbox' i]) {
  /* Remove default margin. */
  margin: unset;
}

:where([type='file' i]) {
  /* Default cursor for file input fields. */
  cursor: unset;
}

:where(textarea) {
  /* Remove default margin in Firefox. */
  margin-block: unset;

  /* Allows resizing of textarea vertically only. */
  resize: block;
}

:where(button),
::file-selector-button {
  /* Set the inline-size of the button to match the content's inline-size exactly. */
  inline-size: fit-content;

  /* Optimizes touch interaction for buttons. */
  touch-action: manipulation;
}

:where(button)::-moz-focus-inner {
  /* Remove the inner padding in Firefox. */
  padding: unset;
}

:where(button, label[for], select, [role='tab'], [role='button'], [role='option']),
::file-selector-button {
  /* Indicate clickable elements with a pointer cursor. */
  cursor: pointer;
}

:where(select):where(:disabled) {
  /* Keep the opacity of disabled selects consistent with other disabled elements. */
  opacity: inherit;
}

:where(fieldset) {
  /* Remove default margin-inline. */
  margin-inline: unset;

  /* Remove default padding. */
  padding: unset;
}

:where(legend) {
  /* Remove default padding-inline. */
  padding-inline: unset;
}

:where(optgroup) {
  /* Resets font settings to inherit from parent. */
  font: unset;
}

::placeholder {
  /* Normalize the opacity of placeholder text to fully opaque in Firefox, where it might be set to less by default. */
  opacity: unset;
}

::picker(select) {
  /* Render the `: :picker(select)` pseudo element consistently. */
  display: block flow;

  /* Remove default padding. */
  padding: unset;
}

/* ======================================================
// MARK: ## Interactive elements
// ------------------------------------------------------ */
:where(summary) {
  /* Eliminate the default marker from details summary for a cleaner disclosure widget. */
  display: block flow;

  /* Indicate clickable elements with a pointer cursor. */
  cursor: pointer;
}

::-webkit-details-marker {
  /* Hide the default disclosure marker to allow for custom styling. */
  display: none;
}

:where(dialog, [popover]) {
  /* Resets overflow property. */
  overflow: unset;

  /* Resets the inline size property. */
  inline-size: unset;

  /* Resets the block size property. */
  block-size: unset;

  /* Resets the max inline size limit. */
  max-inline-size: unset;

  /* Resets the max block size limit. */
  max-block-size: unset;

  /* Removes default padding. */
  padding: unset;

  /* Removes default background color. */
  background-color: unset;

  /* Resets color to default. */
  color: unset;
}

:where(dialog:not([open], [popover]), [popover]:not(:popover-open)) {
  /* Hide the dialog element and popover element when it is not open. */
  display: none !important;
}

::backdrop {
  /* Remove default backdrop color for a clearer view of the underlying content. */
  background-color: unset;
}

/* ======================================================
// MARK: ## Focus styles
// ------------------------------------------------------ */
:where(:-moz-focusring) {
  /* Improve outlines for Firefox and unify style with input elements and buttons. */
  outline: auto;
}

:where(:focus-visible) {
  /* Slightly offset focus outline for better visibility without overlapping text. */
  outline-offset: 2px;
}

:where(:focus):not(:where(:focus-visible)) {
  /* Hide focus outline unless element is explicitly focus-visible to reduce visual clutter. */
  outline: none;
}

[tabindex='-1']:focus-visible {
  /* Ensure that programmatically focused elements do not show an outline unless they are naturally focusable. */
  outline: none !important;
}

/* ======================================================
// MARK: ## Misc
// ------------------------------------------------------ */
:where(:disabled, [aria-disabled='true']) {
  /* Show default cursor for disabled elements to reflect their non-interactive state. */
  cursor: default;
}

[hidden]:not([hidden='until-found']) {
  /* Ensure elements intended to be hidden are not displayed, enhancing clarity and layout control. */
  display: none !important;
}

/* ======================================================
// MARK: ## Reduced Motion
// ------------------------------------------------------ */
/* Target all elements that don't have the 'data-safe-animation' attribute. */
:not([data-safe-animation]) {
  &,
  &::before,
  &::after,
  &::backdrop {
    @media (prefers-reduced-motion: reduce) {
      /* Disable animations and transitions for users who prefer reduced motion. */
      background-attachment: unset !important;
      scroll-behavior: unset !important;
      transition-delay: unset !important;
      transition-duration: 1ms !important;
      animation-duration: 1ms !important;
      animation-delay: unset !important;
      animation-iteration-count: unset !important;
      view-transition-name: none !important;
    }
  }
}

/* ======================================================
// MARK: ## Utility Classes
// ------------------------------------------------------ */
/* Create a pseudo-element to adjust the vertical space above and below an element. */
.leading-trim {
  &::before,
  &::after {
    content: '';
    display: block flow;
    inline-size: 0;
    block-size: 1px;
  }

  &::before {
    margin-block-end: var(--leading-trim);
  }

  &::after {
    margin-block-start: var(--leading-trim);
  }
}

/* Hide content visually but keep it accessible to screen readers. */
.visually-hidden {
  position: fixed !important;
  inset: 0 !important;
  contain: strict !important;
  visibility: initial !important;
  inline-size: 4px !important;
  block-size: 4px !important;
  margin: unset !important;
  padding: unset !important;
  border: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
