/* ===== Reset & sane defaults ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: #1f2933;
  background-color: #f8fafc;
}

/* ===== Layout ===== */
main {
  max-width: 70ch;
  margin: 3rem auto;
  padding: 0 1.25rem;
}

/* ===== Headings ===== */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.25;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.4rem; }

/* ===== Text ===== */
p {
  margin: 1rem 0;
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ===== Lists ===== */
ul, ol {
  padding-left: 1.25rem;
  margin: 1rem 0;
}

/* ===== Images ===== */
img {
  max-width: 100%;
  display: block;
  border-radius: 6px;
}

/* ===== Buttons ===== */
button {
  font: inherit;
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 6px;
  background: #2563eb;
  color: white;
  cursor: pointer;
}

button:hover {
  background: #1d4ed8;
}

/* ===== Forms ===== */
input, textarea, select {
  font: inherit;
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #2563eb;
}

/* ===== Code ===== */
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #e5e7eb;
  padding: 0.2em 0.4em;
  border-radius: 4px;
}
