:root {
  --primary: #5c68eb;
  --primary-accent: color-mix(in srgb, var(--primary), white 30%);
  --bg: #efefef;
  --surface: #fafafa;
  --text: #131313;
  --muted: #555555;
  --border: rgba(0, 0, 0, 0.08);
  --font-family: "Inter", "Helvetica Neue", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", monospace;
  --max-width: 74ch;
  --radius: 5px;
  --line-height: 1.7;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #6b75e6;
    --primary-accent: color-mix(in srgb, var(--primary), black 20%);
    --bg: #131313;
    --surface: #1c1c1c;
    --text: #efefef;
    --muted: #9aa3ad;
    --border: rgba(255, 255, 255, 0.08);
  }
}

html[data-theme="dark"] {
  --primary: #6b75e6;
  --primary-accent: color-mix(in srgb, var(--primary), black 20%);
  --bg: #131313;
  --surface: #1c1c1c;
  --text: #efefef;
  --muted: #9aa3ad;
  --border: rgba(255, 255, 255, 0.08);
}

html[data-theme="light"] {
  --primary: #5c68eb;
  --primary-accent: color-mix(in srgb, var(--primary), white 30%);
  --bg: #efefef;
  --surface: #fafafa;
  --text: #131313;
  --muted: #555555;
  --border: rgba(0, 0, 0, 0.08);
}

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

html {
  font-family: var(--font-family);
  line-height: var(--line-height);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: background 0.25s ease, color 0.25s ease;
}

main,
header,
footer,
section {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  scroll-margin-top: 4rem;
}

header {
  text-align: center;
  padding: 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

footer {
  text-align: center;
  padding: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 2rem;
}

section {
  margin-bottom: 2.5rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 2rem 0 0.75rem;
  font-weight: 600;
  line-height: 1.2;
}

h1 {
  font-size: 2.3rem;
}

h2 {
  font-size: 1.8rem;
}

h3 {
  font-size: 1.4rem;
}

h4 {
  font-size: 1.15rem;
}

p {
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

small {
  font-size: 0.9em;
  color: var(--muted);
}

strong {
  font-weight: 600;
}

a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--primary-accent);
}

blockquote {
  margin: 1.5rem 0;
  padding: 0.5rem 1rem;
  border-left: 4px solid var(--primary);
  background: var(--surface);
  border-radius: calc(var(--radius) / 2);
  color: var(--muted);
}

code,
kbd,
samp {
  font-family: var(--mono);
  font-size: 0.95em;
  background: var(--surface);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}

pre {
  overflow: auto;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  background: var(--surface);
  margin: 1.5rem 0;
  font-family: var(--mono);
  font-size: 0.95rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.97rem;
}

th,
td {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

thead th {
  color: var(--muted);
  font-weight: 600;
}

label {
  display: block;
  margin: 0.6rem 0 0.4rem;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.96rem;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="month"],
input[type="week"],
input[type="datetime-local"],
select,
textarea {
  width: 100%;
  padding: 0.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  margin-bottom: 1.25rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus {
  outline: none;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary), transparent 70%);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

input[type="color"] {
  padding: 0;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  height: 2rem;
  width: 2.5rem;
  cursor: pointer;
}

input[type="file"] {
  border: 1px dashed var(--border);
  padding: 0.25rem;
  background: var(--surface);
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  color: var(--muted);
}

input[type="file"]:hover {
  border-color: var(--primary);
  cursor: pointer;
}

input[type="checkbox"],
input[type="radio"] {
  width: 1rem;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

p>input[type="checkbox"],
p>input[type="radio"] {
  display: inline-block;
}

p>label[for] {
  display: inline;
  margin-right: 1rem;
}

button,
input[type="submit"],
input[type="button"] {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--primary);
  background: var(--primary);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}

button[type="reset"] {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

button[type="reset"]:hover {
  background: var(--border);
}

button:hover {
  background: var(--primary-accent);
}

button:active {
  transform: translateY(1px);
}

button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem;
  margin-bottom: 1.5rem;
}

legend {
  color: var(--muted);
  padding: 0 0.5rem;
  font-weight: 600;
}

progress,
meter {
  width: 100%;
  height: 0.5rem;
  border-radius: var(--radius);
  appearance: none;
  -webkit-appearance: none;
  margin: 0.5rem 0;
  background-color: var(--surface);
  overflow: hidden;
}

progress::-webkit-progress-bar {
  background: var(--surface);
  border-radius: var(--radius);
}

progress::-webkit-progress-value {
  background: var(--primary);
  border-radius: var(--radius);
}

progress::-moz-progress-bar {
  background: var(--primary);
  border-radius: var(--radius);
}

meter::-webkit-meter-bar {
  background: var(--surface);
  border-radius: var(--radius);
}

meter::-webkit-meter-optimum-value {
  background: var(--primary);
  border-radius: var(--radius);
}

meter::-webkit-meter-suboptimum-value {
  background: color-mix(in srgb, var(--primary), white 40%);
  border-radius: var(--radius);
}

meter::-webkit-meter-even-less-good-value {
  background: color-mix(in srgb, var(--primary), black 25%);
  border-radius: var(--radius);
}

meter::-moz-meter-bar {
  background: var(--primary);
  border-radius: var(--radius);
}

output {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: var(--primary-accent);
  color: var(--text);
  border-radius: var(--radius);
  font-weight: 600;
}

details {
  margin: 1.5rem 0;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: background 0.2s ease, border-color 0.2s ease;
}

summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-family);
  outline: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

summary::marker {
  content: "";
}

summary::before {
  content: "";
  display: inline-block;
  width: 0.45em;
  height: 0.45em;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  margin-right: 0.5rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

details[open] summary::before {
  transform: rotate(225deg);
  border-color: var(--primary);
}

details[open] {
  border-color: var(--primary-accent);
  background: color-mix(in srgb, var(--surface), var(--primary-accent) 7%);
}

hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 2rem 0;
}

img,
video,
iframe,
figure,
figcaption {
  display: block;
  max-width: 100%;
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

img,
video,
iframe {
  width: 100%;
}

caption,
figcaption {
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.5rem;
}

iframe {
  border: 1px solid var(--border);
  background: var(--surface);
}
