/* Gammon Forum static archive stylesheet.
   Modernized replacement for the old inline-styled forum pages;
   keeps the familiar colours of quote/code/template boxes. */

:root {
  --box-border: #b8a070;
  --quote-bg:   #FFEBCD;
  --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; }

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

.site-header {
  border-bottom: 2px solid var(--accent);
  padding: 0.75rem 0;
  margin-bottom: 1rem;
}

.breadcrumbs { font-size: 0.9rem; }

.archive-notice {
  background: var(--tip-bg);
  border: 1px solid var(--box-border);
  border-left: 8px solid var(--accent);
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  margin: 0.75rem 0 0;
}

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

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

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

/* ---- posts ------------------------------------------------------ */

.post {
  border: 1px solid #ddd;
  border-radius: 4px;
  margin: 1.25rem 0;
}

.post-header {
  background: #f5f0e6;
  border-bottom: 1px solid #ddd;
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: baseline;
}

.post-author    { font-weight: bold; }
.post-country   { color: var(--muted); }
.post-role      { color: var(--accent); font-style: italic; }
.post-date      { color: var(--muted); margin-left: auto; }
.post-permalink { color: var(--muted); text-decoration: none; }
.post-permalink:hover { text-decoration: underline; }

.post-body {
  padding: 0.75rem 1rem;
  overflow-wrap: break-word;
}

/* browsers default p/ul/ol to 1em top+bottom margins, which reads as
   double-spacing on old posts; tighten within post content */
.post-body p          { margin: 0.5em 0; }
.post-body ul,
.post-body ol         { margin: 0.4em 0; padding-left: 1.6em; }
.post-body li         { margin: 0.15em 0; }
.post-body ul ul,
.post-body ol ol,
.post-body ul ol,
.post-body ol ul      { margin: 0.1em 0; }

.post-amended {
  border-top: 1px dashed #ddd;
  padding: 0.3rem 0.9rem;
  font-size: 0.8rem;
  font-style: italic;
  color: var(--muted);
}

/* ---- post content (forum-code output) --------------------------- */

.quote {
  margin: 1em 2.5em;
  background: var(--quote-bg);
  border: 1px solid var(--box-border);
  padding: 0.75em 1em;
  font-size: 0.92em;
}

.quote > .quote { margin: 1em; }

.tip {
  margin: 1em 2.5em;
  background: var(--tip-bg);
  border: 1px solid var(--box-border);
  padding: 0.75em 1em;
  font-size: 0.92em;
}

.codetag {
  margin: 1em 1.5em;
  background: var(--code-bg);
  border: 1px solid var(--box-border);
  padding: 0 1em 2px;
  font-size: 0.88em;
  overflow: auto;
}

.codetag pre { line-height: 1.35; }

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

.template {
  margin: 1em 1.5em;
  background: var(--tip-bg);
  border: 1px solid var(--box-border);
  border-left: 10px solid var(--accent);
  padding: 0.75em 1em;
  font-size: 0.92em;
  overflow: hidden;    /* contain the floated icon */
}

.template-icon { float: left; margin: 0 0.75em 0.5em 0; }
.template-text { overflow: hidden; }

.heading {
  display: block;
  border-bottom: 1px solid #aaa;
  font-size: 1.4em;
  padding: 0.5em 0 0.17em;
}

.fancyquote {
  padding-top: 3px;
  overflow: hidden;
  font-size: 0.9em;
  line-height: 1.5;
  color: #454545;
  margin-left: 2em;
}

.fancyquote:before, .fancyquote:after {
  font-family: Georgia, "Times New Roman", serif;
  display: block;
  font-size: 50px;
  color: #9F9F9F;
}

.fancyquote:before { float: left;  margin: 10px 15px 0 0; content: "\201C"; }
.fancyquote:after  { float: right; margin: 10px 0 0 15px; content: "\201D"; }

/* ---- section / topic / thread listings -------------------------- */

.forum-list {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 0.75rem 0 1.5rem;
}

.forum-list th {
  text-align: left;
  background: #f5f0e6;
  border-bottom: 2px solid var(--box-border);
  padding: 0.35rem 0.6rem;
}

.forum-list td {
  border-bottom: 1px solid #eee;
  padding: 0.35rem 0.6rem;
  vertical-align: top;
}

.forum-list tr:hover td { background: #faf7f0; }

.forum-list .num { text-align: right; white-space: nowrap; width: 1%; }

/* last column is the "Last post" date + poster; don't let it wrap into
   tall rows - the Subject column is the one that should flex */
.forum-list td:last-child,
.forum-list th:last-child { white-space: nowrap; width: 1%; }

.topic-desc { color: var(--muted); font-size: 0.85em; }

/* images in old posts were sized for smaller screens; never overflow */
.post-body img, .post-body iframe { max-width: 100%; height: auto; }

/* pandoc-rendered markdown code blocks */
.post-body div.sourceCode {
  background: var(--code-bg);
  border: 1px solid var(--box-border);
  padding: 0 1em;
  margin: 1em 1.5em;
  font-size: 0.88em;
  overflow: auto;
}
