/* www.gammon.com.au - shared stylesheet for the modernized static
   pages. Same visual language as the forum archive (archive.css) and
   the function/doc references (functions.css). */

:root {
  --box-border: #b8a070;
  --code-bg:    #FFE4B5;
  --tip-bg:     #EEE8AA;
  --accent:     #CD5C5C;
  --muted:      #666;
}

* { box-sizing: border-box; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  margin: 0 auto;
  padding: 0 1rem 2rem;
  max-width: 62rem;
  color: #222;
  background: #fff;
}

a         { color: #1a5276; }
a:visited { color: #6c3483; }

code, pre, tt {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
}

/* legacy pages use <pre> for code and terminal captures */
pre {
  background: var(--code-bg);
  border: 1px solid var(--box-border);
  padding: 0.6em 1em;
  margin: 0.5em 0;
  font-size: 0.88em;
  line-height: 1.35;
  overflow: auto;
}

img { max-width: 100%; height: auto; }

hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 1.5em 0;
}

blockquote {
  border-left: 3px solid var(--box-border);
  margin: 0.75em 0;
  padding: 0.25em 1em;
  background: #faf7f0;
}

/* ---- chrome ---------------------------------------------------- */

.site-header {
  border-bottom: 2px solid var(--accent);
  padding: 0.75rem 0;
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: baseline;
  justify-content: space-between;
}

.breadcrumbs { font-size: 0.9rem; }

.site-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #ccc;
  color: var(--muted);
  font-size: 0.85rem;
}

h1 { font-size: 1.5rem; line-height: 1.3; margin-bottom: 0.25rem; }

h2 {
  font-size: 1.15rem;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.15em;
  margin: 1.5em 0 0.5em;
}

h3 { font-size: 1.05rem; margin: 1.25em 0 0.4em; }

/* previous / next / up doc-sequence navigation */
.pagenav {
  margin: 2rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid #ddd;
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
}

/* ---- legacy tables ---------------------------------------------- */

/* old pages carry border=1 / cellpadding attributes; soften them */
table[border] {
  border-collapse: collapse;
  margin: 0.75rem 0;
}

table[border] th, table[border] td {
  border: 1px solid #ccc;
  padding: 0.35rem 0.6rem;
  vertical-align: top;
}

table[border] th { background: #f5f0e6; }

/* ---- search boxes (search hub / listing pages) ------------------- */

.fn-search input[type=search] {
  font: inherit;
  padding: 0.25em 0.5em;
  border: 1px solid var(--box-border);
  border-radius: 4px;
}

.fn-meta { color: var(--muted); font-size: 0.9rem; margin-top: 0; }
