/* Reset and base styles */
* {
  box-sizing: border-box;
}

:root {
  --color-primary: #2d5016;
  --color-success: #33bb33;
  --color-warning: #ff00ba;
  --color-danger: #ff4500;
  --color-accent: #d97706;
  --color-text: #111827;
  --color-text-muted: #6b7280;
  --color-border: #e5e7eb;
  --color-bg: #ffffff;
  --color-bg-alt: #f9fafb;
}

body {
  margin: 0;
  padding: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

/* Layout */
.container {
  max-width: 1400px;
  margin: 0 auto;
}

main {
  max-width: 50rem;
  margin: 0 auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  line-height: 1.2;
  font-weight: 700;
}

h1 {
  font-size: 2em;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.5em;
  margin-bottom: 0.875rem;
  color: var(--color-primary);
}

h3 {
  font-size: 1.25em;
  margin-bottom: 0.75rem;
}

h1 a, h2 a, h3 a, h4 a {
  text-decoration: none;
  color: inherit;
}

h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover {
  text-decoration: underline;
}

p {
  margin-bottom: 1rem;
}

/* Links */
a {
  color: var(--color-primary);
  text-decoration: underline;
}

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

/* Navigation */
nav {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.95rem;
}

nav li {
  display: inline;
}

nav a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
}

nav a:hover {
  text-decoration: underline;
  color: var(--color-accent);
}

nav em {
  color: var(--color-text);
  font-style: normal;
  font-weight: 700;
}

/* Forms */
form {
  margin: 1.5rem 0;
}

label {
  font-weight: 700;
}

input[type="text"],
input[type="number"],
input[type="email"],
select,
textarea {
  font-family: inherit;
  font-size: 1em;
  padding: 0.5rem;
  border: 2px solid var(--color-border);
  border-radius: 6px;
  background: white;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-success);
  box-shadow: 0 0 0 3px rgba(51, 187, 51, 0.1);
}

button,
input[type="submit"] {
  display: inline-block;
  background: var(--color-danger);
  color: white;
  padding: 14px 28px;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  font-family: inherit;
  border: none;
  cursor: pointer;
  margin: 10px 5px;
  transition: all 0.2s;
  font-size: 1em;
}

button:hover,
input[type="submit"]:hover {
  background: #ff5722;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Definition lists */
dl {
  margin: 1rem 0;
}

dt {
  font-weight: bold;
  color: var(--color-primary);
  margin-top: 0.75rem;
}

dd {
  margin-left: 0;
  margin-bottom: 0.5rem;
  padding-left: 1rem;
}

/* Result lists - optimized for copy/paste */
.results {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  list-style: none;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.8;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.results li {
  margin: 0;
  padding: 0.25rem 0;
}

.results strong {
  font-weight: 700;
  color: var(--color-primary);
  min-width: 7rem;
  display: inline-block;
}

code, kbd {
  background: var(--color-bg-alt);
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-family: ui-monospace, "SF Mono", Monaco, "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
}

kbd {
  border: 1px solid var(--color-border);
}

pre {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 1rem;
  overflow-x: auto;
  font-family: ui-monospace, "SF Mono", Monaco, "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
  margin: 1rem 0;
}

/* Utility classes */
.notice {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: 6px;
  padding: 1rem;
  margin: 1rem 0;
}

.notice a {
  color: var(--color-primary);
  font-weight: 600;
}

/* Ad container */
.raised {
  margin: 2rem 0;
}

/* Footer */
footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 2px solid var(--color-border);
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

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

/* Horizontal rules */
hr {
  border: none;
  border-top: 2px solid var(--color-border);
  margin: 2rem 0;
}

/* Status indicators (for potential use) */
.up {
  background-color: var(--color-success);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-weight: bold;
}

.degraded {
  background-color: var(--color-warning);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-weight: bold;
}

.down {
  background-color: var(--color-danger);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-weight: bold;
}

/* Responsive */
@media (max-width: 767px) {
  body {
    padding: 10px;
  }

  h1 {
    font-size: 1.3em;
  }

  nav {
    padding: 0.625rem 0.875rem;
  }

  nav ul {
    font-size: 0.85rem;
    gap: 0.5rem 1rem;
  }

  .results {
    padding: 1rem;
    font-size: 0.875rem;
  }

  button,
  input[type="submit"] {
    display: block;
    width: 100%;
    margin: 10px 0;
  }
}
