:root {
  --bg: #f5f2ed;
  --surface: #ffffff;
  --text: #171412;
  --muted: #56504b;
  --accent: #d77c00;
  --accent-dark: #b16300;
  --border: rgba(23, 20, 18, 0.12);
  --link-blue: #0066cc;
  --link-blue-hover: #0052a3;
  font-family: "Inter", "Roboto", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
  
*,
*::before,
*::after {
  box-sizing: border-box;
}
  
html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background-color: var(--bg);
  color: var(--text);
  user-select: none;
}
  
body {
  font-size: clamp(1rem, 0.9rem + 0.4vw, 1.2rem);
  line-height: 1.7;
  letter-spacing: 0.01em;
}
  
body[data-page-type="landing"] {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}
  
a {
  color: var(--link-blue);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 102, 204, 0.35);
  transition: color 0.15s ease, border-color 0.15s ease;
}
  
a:hover,
a:focus-visible {
  color: var(--link-blue-hover);
  border-bottom-color: var(--link-blue-hover);
}
  
main.content {
  max-width: 720px;
  margin: 3.5rem auto;
  padding: 3rem 2.5rem 4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
  
main.content p {
  margin: 0 0 1.4rem;
}
  
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text);
  margin: 2.4rem 0 1.1rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.45rem;
}
  
h1:first-of-type,
h2:first-of-type,
h3:first-of-type {
  margin-top: 0;
}
  
strong {
  font-weight: 600;
}
  
em {
  font-style: italic;
}
  
ul,
ol {
  margin: 1.4rem 0;
  padding-right: 1.6rem;
  padding-left: 1.6rem;
}
  
li + li {
  margin-top: 0.5rem;
}
  
blockquote {
  margin: 1.8rem 0;
  padding: 1.1rem 1.5rem;
  background-color: rgba(215, 124, 0, 0.08);
  border-right: 4px solid var(--accent);
  border-radius: 8px;
  color: var(--muted);
}
  
table {
  width: 100%;
  border-collapse: collapse;
  margin: 2.2rem 0;
  font-size: 0.96em;
  background: #faf8f4;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
  
table th,
table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: right;
}
  
table th {
  background: rgba(215, 124, 0, 0.12);
  font-weight: 600;
}
  
img {
  max-width: 100%;
  display: block;
  margin: 1.8rem auto;
  border-radius: 10px;
  border: 1px solid var(--border);
}
  
.nav-controls {
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
  gap: 1rem;
}
  
.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  padding: 0.65rem 1.5rem;
  border-radius: 6px;
  border: 1px solid rgba(23, 20, 18, 0.2);
  background: #f4efe7;
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
  
.nav-button.primary {
  background: var(--accent);
  color: #fffdf8;
  border-color: transparent;
}
  
.nav-button:hover,
.nav-button:focus-visible {
  background: #ebe4dc;
}
  
.nav-button.primary:hover,
.nav-button.primary:focus-visible {
  background: var(--accent-dark);
}
  
.nav-button.disabled {
  cursor: not-allowed;
  background: #f1ece5;
  color: rgba(23, 20, 18, 0.35);
  border-color: rgba(23, 20, 18, 0.12);
}
  
.nav-button.disabled:hover,
.nav-button.disabled:focus-visible {
  background: #f1ece5;
}
  
body[data-page-type="landing"] main.content {
  text-align: center;
  padding: 3rem 2.5rem;
}
  
.landing-logo {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent-dark);
  margin-bottom: 0.5rem;
}
  
.landing-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 1rem;
  font-weight: 600;
}
  
.landing-description {
  color: var(--muted);
  margin-bottom: 2.2rem;
}
  
form#passwordForm {
  display: grid;
  gap: 0.9rem;
}
  
label {
  text-align: right;
  font-weight: 600;
  color: var(--text);
}
  
input[type="password"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  border: 1px solid rgba(23, 20, 18, 0.2);
  background: #fffdf8;
  color: var(--text);
  font-size: 1rem;
  user-select: auto;
}
  
input[type="password"]:focus {
  outline: 2px solid rgba(215, 124, 0, 0.35);
  outline-offset: 2px;
}
  
button[type="submit"] {
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  border: none;
  background: var(--accent);
  color: #fffdf8;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background-color 0.15s ease;
  user-select: none;
}
  
button[type="submit"]:hover,
button[type="submit"]:focus-visible {
  background: var(--accent-dark);
}
  
.error-message {
  min-height: 1.1rem;
  color: #c2463a;
  font-size: 0.95rem;
}
  
footer.landing-footer {
  margin-top: 2.2rem;
  font-size: 0.86rem;
  color: var(--muted);
}
  
.toc-entry {
  display: block;
  color: var(--text);
  margin-bottom: 0.6rem;
  border-bottom: none;
}
  
input,
button {
  font-family: inherit;
}
  
input,
button,
textarea {
  user-select: auto;
}
  
@media (max-width: 640px) {
  main.content {
    margin: 2rem auto;
    padding: 2.2rem 1.75rem 3rem;
  }
  
  .nav-controls {
    flex-direction: column-reverse;
    gap: 0.7rem;
  }
  
  .nav-button {
    width: 100%;
  }
}