/* Accessible global defaults, typography and responsive page foundations. */
/* System font fallbacks avoid blocking requests and support Vietnamese, English, and Japanese. */
:root {
  color-scheme: dark;
  font-family: "Inter", "Be Vietnam Pro", "Noto Sans JP", system-ui, "Segoe UI", "Hiragino Sans", "Yu Gothic", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 100%;
  line-height: 1.7;
  color: var(--text-on-dark);
  background: var(--bg-dark);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
  background: var(--bg-dark);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  font-size: clamp(1rem, .96rem + .16vw, 1.125rem);
  line-height: 1.7;
  overflow-wrap: break-word;
  background: var(--bg-dark);
  color: var(--text-on-dark);
}

html[lang="ja"] body,
html[lang="ja"] :is(h1, h2, h3, h4, p, li, a, button) {
  word-break: keep-all;
  line-break: strict;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

img,
video {
  height: auto;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
  cursor: pointer;
}

button:disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
}

a {
  color: var(--green-400);
  text-decoration-thickness: .08em;
  text-underline-offset: .2em;
}

a:hover {
  color: var(--green-300);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: var(--focus);
  outline-offset: 3px;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  color: var(--text-on-dark);
  font-weight: 600;
  line-height: 1.2;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 1.7rem + 4vw, 4.2rem);
  letter-spacing: -.045em;
}

h2 {
  font-size: clamp(2rem, 1.5rem + 2.5vw, 3.25rem);
  letter-spacing: -.035em;
}

h3 {
  font-size: clamp(1.25rem, 1.1rem + .8vw, 1.75rem);
}

p {
  color: var(--muted-on-dark);
}

ul,
ol {
  margin: 0;
  padding-inline-start: 1.25em;
}

hr {
  height: 1px;
  margin: var(--space-5) 0;
  border: 0;
  background: var(--line-dark);
}

::selection {
  color: var(--black-950);
  background: rgba(181, 229, 127, .85);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
