/* === Base page styling === */
:root {
  color-scheme: light;
  --paper-bg: #f4f0e8;
  --text-color: #1e1e1e;
  --accent: #0078e7;
  --accent-hover: #005bb5;
  --border-color: #ddd3c3;
  --heading-color: #222;
  --code-bg: #faf7f2;
}

html {
  background-color: #ddd;
}

body {
  background: var(--paper-bg);
  color: var(--text-color);
  font-family: system-ui, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,
               "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  margin: 2rem auto;
  max-width: 800px;
  padding: 2rem;
  line-height: 1.65;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* === Headings === */
h1, h2, h3, h4 {
  color: var(--heading-color);
  line-height: 1.2;
  margin-top: 2em;
  margin-bottom: 0.6em;
}
h1 { font-size: 2.2em; border-bottom: 2px solid var(--border-color); padding-bottom: .2em; }
h2 { font-size: 1.6em; border-bottom: 1px solid var(--border-color); padding-bottom: .2em; }

/* === Links === */
a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
a:hover {
  text-decoration: underline;
}

/* === Code blocks & inline code === */
pre, code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--code-bg);
  border-radius: 6px;
}
code {
  padding: 0.15em 0.3em;
  font-size: 0.95em;
}
pre {
  padding: 1em;
  overflow-x: auto;
  border: 1px solid var(--border-color);
  font-size: 0.95em;
}

/* === Lists === */
ul, ol {
  margin-left: 1.4em;
}

/* === Horizontal rule === */
hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 2.5em 0;
}

/* === Blockquotes === */
blockquote {
  border-left: 4px solid var(--accent);
  padding-left: 1em;
  color: #444;
  margin: 1.5em 0;
  background: rgba(0,0,0,0.03);
}

/* === Tables === */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.5em 0;
}
th, td {
  border: 1px solid var(--border-color);
  padding: 0.5em 0.8em;
}
th {
  background: rgba(0,0,0,0.05);
  text-align: left;
}

/* === Button-like links === */
a.button-link {
  display: inline-block;
  background: var(--accent);
  color: white !important;
  padding: 0.6em 1.3em;
  border-radius: 0.5em;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s, transform 0.1s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
a.button-link:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}
a.button-link:active {
  transform: translateY(0);
  box-shadow: 0 2px 3px rgba(0,0,0,0.15);
}

/* === Footer text === */
footer {
  margin-top: 3em;
  font-size: 0.9em;
  color: #555;
  text-align: center;
}
