/* A11yGuides.com: Shared Stylesheet
   WCAG 2.2 AA compliant. Warm retro colour scheme.
   ------------------------------------------------- */

/* Box model reset */
*, *::before, *::after {
  box-sizing: border-box;
}

/* ── Skip link (WCAG SC 2.4.1) ── */
.skip-link {
  position: absolute;
  top: -3.5rem;
  left: 0;
  z-index: 1000;
  padding: 0.5rem 1rem;
  background: #5c2d1e;
  color: #f5e6c8;
  font-family: Verdana, Arial, sans-serif;
  font-size: 1rem;
  font-weight: bold;
  text-decoration: underline;
  border-bottom: 3px solid #8b3a0f;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid #e8d4a8;
  outline-offset: 0;
}

/* ── Page body & wrapper ── */
body {
  margin: 0;
  padding: 0.75rem 0;
  background: #c8b49a; /* warm tan browser chrome */
  font-family: Verdana, Geneva, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: #2c1a0e;
}

.page-wrapper {
  max-width: 760px;
  margin: 0 auto;
  background: #fdf6e3;
  border: 1px solid #a08060;
  box-shadow: 3px 3px 8px rgba(60, 30, 10, 0.35);
}

/* ── Site header / banner ── */
.site-header {
  background: #5c2d1e;
  padding: 1rem 1.25rem 0.875rem;
  border-bottom: 4px solid #8b3a0f;
}

.site-header .site-name {
  display: inline-block;
  font-family: Verdana, Geneva, Arial, sans-serif;
  font-size: 1.875rem;
  font-weight: bold;
  color: #f5e6c8;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.site-header .site-name:focus {
  outline: 3px solid #e8d4a8;
  outline-offset: 3px;
  background-color: transparent;
}

.site-header .tagline {
  display: block;
  margin-top: 0.2rem;
  font-family: Verdana, Arial, sans-serif;
  font-size: 0.8125rem;
  font-style: italic;
  color: #e8d4a8;
}

/* ── Primary navigation ── */
.site-nav {
  background: #4a2318;
  border-bottom: 2px solid #3a1a10;
}

.site-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
}

.site-nav a {
  display: block;
  padding: 0.5rem 0.875rem;
  font-family: Verdana, Arial, sans-serif;
  font-size: 0.8125rem;
  font-weight: bold;
  color: #f5e6c8;
  text-decoration: none;
  border-right: 1px solid #6b3828;
}

/* Keep visited nav links readable on dark background */
.site-nav a:visited {
  color: #f5e6c8;
}

.site-nav a:hover,
.site-nav a:focus {
  background: #e8d4a8;
  color: #2c1a0e;
  text-decoration: underline;
  outline: none;
}

.site-nav a[aria-current="page"] {
  background: #3a1a10;
  color: #f5e6c8;
}

/* ── Breadcrumb ── */
.breadcrumb {
  padding: 0.4rem 1.25rem;
  background: #f0e4cc;
  border-bottom: 1px solid #c8a870;
  font-family: Verdana, Arial, sans-serif;
  font-size: 0.8125rem;
  color: #5c3a1e;
}

.breadcrumb ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.breadcrumb li + li::before {
  content: "›";
  margin-right: 0.25rem;
  color: #8b6040;
}

.breadcrumb a {
  color: #8b3a0f;
}

.breadcrumb a:visited {
  color: #6b4c2a;
}

.breadcrumb [aria-current="page"] {
  color: #3d1f12;
  font-weight: bold;
}

/* ── Main content area ── */
main {
  padding: 1.375rem 1.5rem 2rem;
}

main h1 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-family: Verdana, Geneva, Arial, sans-serif;
  font-size: 1.625rem;
  font-weight: bold;
  color: #5c2d1e;
  border-bottom: 2px solid #8b3a0f;
  padding-bottom: 0.375rem;
  line-height: 1.3;
}

main h2 {
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  font-family: Verdana, Geneva, Arial, sans-serif;
  font-size: 1.25rem;
  color: #5c2d1e;
  border-bottom: 1px solid #c8a870;
  padding-bottom: 0.25rem;
}

main h3 {
  margin-top: 1.25rem;
  margin-bottom: 0.375rem;
  font-family: Verdana, Arial, sans-serif;
  font-size: 1rem;
  color: #4a2318;
}

/* ── Global link styles ── */
a {
  color: #8b3a0f;
  text-decoration: underline;
}

a:visited {
  color: #6b4c2a;
}

a:hover {
  color: #5c2d1e;
  text-decoration: underline;
}

a:focus {
  outline: 3px solid #8b3a0f;
  outline-offset: 2px;
  background-color: #fef3d8;
}

/* ── Guide list (home page) ── */
.guide-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.guide-list li {
  margin-bottom: 0.75rem;
  padding: 0.875rem 1rem;
  background: #fef8ee;
  border: 1px solid #c8a870;
  border-left: 4px solid #8b3a0f;
}

.guide-list li a {
  font-size: 1.0625rem;
  font-weight: bold;
}

.guide-desc {
  display: block;
  margin-top: 0.25rem;
  font-family: Verdana, Arial, sans-serif;
  font-size: 0.875rem;
  color: #4a2318;
}

/* ── Info box ── */
.info-box {
  border: 2px solid #c8a870;
  background: #fef3d8;
  padding: 0.875rem 1rem;
  margin: 1.5rem 0;
  font-family: Verdana, Arial, sans-serif;
  font-size: 0.875rem;
}

.info-box p:first-child,
.info-box h2 + p {
  margin-top: 0;
}

.info-box p:last-child {
  margin-bottom: 0;
}

.info-box h2 {
  margin: 0 0 0.5rem;
  font-family: Verdana, Arial, sans-serif;
  font-size: 0.875rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5c2d1e;
  border: none;
  padding-bottom: 0;
}

/* ── Note / warning box ── */
.note-box {
  border: 1px solid #a07030;
  background: #fef8ee;
  padding: 0.875rem 1rem;
  margin: 1.25rem 0;
  font-family: Verdana, Arial, sans-serif;
  font-size: 0.875rem;
  color: #3d1f12;
}

.note-box p:first-child { margin-top: 0; }
.note-box p:last-child  { margin-bottom: 0; }

/* ── "On this page" TOC ── */
.on-this-page {
  border: 1px solid #c8a870;
  background: #fef8ee;
  padding: 0.875rem 1rem;
  margin-bottom: 1.5rem;
  font-family: Verdana, Arial, sans-serif;
  font-size: 0.875rem;
}

.on-this-page p {
  margin: 0 0 0.5rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.8125rem;
  color: #5c2d1e;
}

.on-this-page ol {
  margin: 0;
  padding-left: 1.5rem;
  line-height: 1.8;
}

/* ── Code blocks ── */
code {
  background: #f0e4cc;
  border: 1px solid #c8a870;
  padding: 0.1em 0.35em;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9em;
  color: #3d1f12;
}

pre {
  background: #f5ead4;
  border: 1px solid #c8a870;
  border-left: 4px solid #8b3a0f;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1rem 0;
  line-height: 1.5;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.875rem;
}

/* ── Definition list ── */
dl.term-list {
  margin: 1rem 0;
}

dl.term-list dt {
  font-weight: bold;
  color: #5c2d1e;
  margin-top: 0.875rem;
  font-family: Verdana, Geneva, Arial, sans-serif;
  font-size: 0.9375rem;
}

dl.term-list dd {
  margin-left: 1.5rem;
  font-size: 0.9375rem;
}

/* ── Data table ── */
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-family: Verdana, Arial, sans-serif;
  font-size: 0.875rem;
  margin: 1rem 0;
}

table.data-table caption {
  text-align: left;
  font-weight: bold;
  margin-bottom: 0.375rem;
  color: #5c2d1e;
}

table.data-table th {
  background: #5c2d1e;
  color: #f5e6c8;
  padding: 0.5rem 0.75rem;
  text-align: left;
  border: 1px solid #4a2318;
}

table.data-table td {
  padding: 0.45rem 0.75rem;
  border: 1px solid #c8a870;
  vertical-align: top;
}

table.data-table tbody tr:nth-child(even) {
  background: #fef3d8;
}

/* ── Horizontal rule ── */
hr {
  border: none;
  border-top: 1px solid #c8a870;
  margin: 1.75rem 0;
}

/* ── Prev/next guide navigation ── */
.guide-nav {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #c8a870;
  font-family: Verdana, Arial, sans-serif;
  font-size: 0.875rem;
}

.guide-nav a {
  font-weight: bold;
}

/* ── Site footer ── */
.site-footer {
  background: #3d1f12;
  color: #f5e6c8;
  padding: 0.875rem 1.5rem;
  font-family: Verdana, Arial, sans-serif;
  font-size: 0.8125rem;
  border-top: 4px solid #8b3a0f;
  line-height: 1.7;
}

.site-footer p {
  margin: 0 0 0.25rem;
}

.site-footer p:last-child {
  margin-bottom: 0;
}

.footer-rule {
  border: none;
  border-top: 1px solid #6b3828;
  margin: 0.625rem 0;
}

.footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-meta p {
  margin: 0;
  flex: 1;
  text-align: center;
}

.footer-meta p:first-child {
  text-align: left;
}

.footer-meta p:last-child {
  display: flex;
  justify-content: flex-end;
  flex: 1;
}

.site-footer a {
  color: #f5e6c8;
  text-decoration: underline;
}

/* Keep footer visited links readable on dark background */
.site-footer a:visited {
  color: #f5e6c8;
}

.site-footer a:hover {
  color: #e8d4a8;
}

.site-footer a:focus {
  outline: 3px solid #e8d4a8;
  background: transparent;
}

/* ── Visitor counter badge ── */
.visitor-counter {
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  margin: 0.375rem 0 0;
  border: 1px solid #6b3828;
  border-radius: 3px;
  overflow: hidden;
  line-height: 1;
  font-family: Verdana, Geneva, Arial, sans-serif;
  font-size: 0.75rem;
  font-weight: bold;
}

.visitor-label {
  display: inline-block;
  padding: 0.3rem 0.5rem;
  background: #4a2318;
  color: #e8d4a8;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-right: 1px solid #6b3828;
}

.visitor-count {
  display: inline-block;
  padding: 0.3rem 0.6rem;
  background: #8b3a0f;
  color: #fdf6e3;
  min-width: 2rem;
  text-align: center;
}

/* ── Responsive / reflow (WCAG SC 1.4.10) ── */
@media (max-width: 500px) {
  body {
    padding: 0;
  }

  .page-wrapper {
    border: none;
    box-shadow: none;
  }

  .site-header .site-name {
    font-size: 1.5rem;
  }

  main {
    padding: 1rem;
  }

  .guide-nav {
    flex-direction: column;
  }
}

/* Ensure focus rings always visible (WCAG SC 2.4.7) */
:focus-visible {
  outline: 3px solid #8b3a0f;
  outline-offset: 2px;
}
