/* neat.style v1.0.0 — drop-in styles for raw HTML */
/* https://github.com/ayshptk/neat */

:root {
  --text: #2e3138;
  --text-light: #5a5e68;
  --bg: #fff;
  --bg-subtle: #f4f5f7;
  --bg-hover: #eaedf0;
  --border: #d1d5db;
  --accent: #3b6cf5;
  --accent-hover: #2b56d4;
  --accent-text: #fff;
  --code-bg: #f0f2f5;
  --mark-bg: #fef08a;
  --shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .06);
  --radius: 6px;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;
  --line-height: 1.7;
  --measure: 72ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e1e3e8;
    --text-light: #9ca0ab;
    --bg: #181a20;
    --bg-subtle: #22252d;
    --bg-hover: #2a2d36;
    --border: #3a3d46;
    --accent: #6b93f7;
    --accent-hover: #8dadf9;
    --accent-text: #181a20;
    --code-bg: #22252d;
    --mark-bg: #854d0e;
    --shadow: 0 1px 3px rgba(0, 0, 0, .24), 0 1px 2px rgba(0, 0, 0, .18);
  }
}

/* ---- Reset & Base ---- */

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

html {
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  scroll-behavior: smooth;
}

body {
  margin: 0 auto;
  padding: 2rem 1.5rem;
  max-width: var(--measure);
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: var(--line-height);
  color: var(--text);
  background: var(--bg);
  overflow-wrap: break-word;
}

/* ---- Typography ---- */

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 2em 0 0.6em;
  line-height: 1.25;
  font-weight: 700;
  color: var(--text);
}

h1 {
  font-size: 2.25em;
  margin-top: 0;
  letter-spacing: -.03em;
}

h2 {
  font-size: 1.65em;
  letter-spacing: -.02em;
}

h3 {
  font-size: 1.3em;
}

h4 {
  font-size: 1.1em;
}

h5 {
  font-size: 1em;
}

h6 {
  font-size: .9em;
  color: var(--text-light);
}

p {
  margin: 0 0 1.25em;
}

small {
  font-size: 0.875em;
  color: var(--text-light);
}

b,
strong {
  font-weight: 700;
}

/* ---- Links ---- */

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color .15s;
}

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

/* ---- Lists ---- */

ul,
ol {
  margin: 0 0 1.25em;
  padding-left: 1.75em;
}

li {
  margin-bottom: .3em;
}

li>ul,
li>ol {
  margin-top: .3em;
  margin-bottom: 0;
}

dt {
  font-weight: 700;
  margin-top: .75em;
}

dd {
  margin-left: 1.5em;
  margin-bottom: .5em;
}

/* ---- Blockquote ---- */

blockquote {
  margin: 1.5em 0;
  padding: .75em 1.25em;
  border-left: 4px solid var(--accent);
  background: var(--bg-subtle);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-light);
}

blockquote>*:last-child {
  margin-bottom: 0;
}

/* ---- Code ---- */

code,
kbd,
samp {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

code {
  padding: .15em .35em;
  background: var(--code-bg);
  border-radius: 4px;
}

pre {
  margin: 1.5em 0;
  padding: 1.1em 1.25em;
  background: var(--code-bg);
  border-radius: var(--radius);
  overflow-x: auto;
  line-height: 1.5;
}

pre code {
  padding: 0;
  background: none;
  font-size: .92em;
}

kbd {
  padding: .15em .4em;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--bg-subtle);
}

/* ---- Horizontal Rule ---- */

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5em 0;
}

/* ---- Images & Media ---- */

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

figure {
  margin: 1.5em 0;
}

figcaption {
  margin-top: .5em;
  font-size: 0.9em;
  color: var(--text-light);
  text-align: center;
}

/* ---- Tables ---- */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: .95em;
}

thead {
  border-bottom: 2px solid var(--border);
}

th {
  text-align: left;
  padding: .65em .75em;
  font-weight: 700;
}

td {
  padding: .65em .75em;
}

tbody tr {
  border-bottom: 1px solid var(--border);
}

tbody tr:hover {
  background: var(--bg-subtle);
}

/* ---- Forms ---- */

label {
  display: block;
  margin-bottom: .35em;
  font-weight: 600;
  font-size: .95em;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
textarea,
select {
  display: block;
  width: 100%;
  padding: .55em .75em;
  margin-bottom: 1em;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}

textarea {
  resize: vertical;
  min-height: 6em;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235a5e68' d='M6 8.825a.7.7 0 0 1-.5-.206L1.706 4.825a.707.707 0 1 1 1-1L6 7.12l3.294-3.294a.707.707 0 1 1 1 1L6.5 8.619a.7.7 0 0 1-.5.206z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75em center;
  padding-right: 2.25em;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--accent);
  margin-right: .4em;
  vertical-align: middle;
}

input[type="color"] {
  height: 2.5em;
  padding: .25em;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}

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

fieldset {
  margin: 1.5em 0;
  padding: 1em 1.25em;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

legend {
  font-weight: 700;
  padding: 0 .35em;
}

/* ---- Buttons ---- */

button,
input[type="submit"],
input[type="reset"],
input[type="button"] {
  display: inline-block;
  padding: .6em 1.2em;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--accent-text);
  background: var(--accent);
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
}

button:hover,
input[type="submit"]:hover,
input[type="reset"]:hover,
input[type="button"]:hover {
  background: var(--accent-hover);
}

button:focus-visible,
input[type="submit"]:focus-visible,
input[type="reset"]:focus-visible,
input[type="button"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button:active,
input[type="submit"]:active {
  transform: translateY(1px);
}

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

/* ---- Details / Summary ---- */

details {
  margin: 1em 0;
  padding: .75em 1em;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

summary {
  cursor: pointer;
  font-weight: 600;
}

summary:hover {
  color: var(--accent);
}

details[open]>summary {
  margin-bottom: .5em;
}

/* ---- Dialog / Modal ---- */

dialog {
  padding: 1.5em;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--bg);
  color: var(--text);
  max-width: min(90vw, 50ch);
}

dialog::backdrop {
  background: rgba(0, 0, 0, .45);
}

/* ---- Semantic Sections ---- */

header {
  margin-bottom: 2em;
}

footer {
  margin-top: 3em;
  padding-top: 1.5em;
  border-top: 1px solid var(--border);
  font-size: .9em;
  color: var(--text-light);
}

nav {
  margin-bottom: 1.5em;
}

nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .25em .75em;
}

nav a {
  text-decoration: none;
  font-weight: 500;
}

nav a:hover {
  text-decoration: underline;
}

main {
  min-height: 60vh;
}

section {
  margin-bottom: 2em;
}

aside {
  padding: 1em 1.25em;
  background: var(--bg-subtle);
  border-radius: var(--radius);
  margin: 1.5em 0;
  font-size: .95em;
}

/* ---- Inline elements ---- */

mark {
  background: var(--mark-bg);
  padding: .05em .2em;
  border-radius: 3px;
}

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

sup,
sub {
  font-size: .75em;
  line-height: 0;
}

/* ---- Progress & Meter ---- */

progress {
  appearance: none;
  width: 100%;
  height: .6em;
  border: none;
  border-radius: 99px;
  background: var(--bg-subtle);
  overflow: hidden;
}

progress::-webkit-progress-bar {
  background: var(--bg-subtle);
  border-radius: 99px;
}

progress::-webkit-progress-value {
  background: var(--accent);
  border-radius: 99px;
}

progress::-moz-progress-bar {
  background: var(--accent);
  border-radius: 99px;
}

meter {
  width: 100%;
  height: .6em;
}

/* ---- Print ---- */

@media print {
  body {
    max-width: none;
    padding: 0;
    background: #fff;
    color: #000;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  pre,
  blockquote {
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }

  h1,
  h2,
  h3 {
    page-break-after: avoid;
  }

  img {
    page-break-inside: avoid;
  }
}