/* =========================================================
   Randolph Co. Ramblings
   style.css
   ========================================================= */

/* ---------- palette ---------- */
:root {
  --page-bg:      #999999;
  --content-bg:   #fffdf7;
  --ink:          #333333;
  --link:         #000000;
  --link-visited: #006699;
  --link-hover:   #cc9900;
  --menu-bg:      #8a8a8a;
  --menu-bg-hi:   #6f6f6f;
  --menu-ink:     #ffffff;
  --rule:         #7a7a7a;
  --site-max:     1000px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 12px 32px;
  background: var(--page-bg) url("img/graygrid2.gif");
  font-family: Verdana, Arial, Helvetica, sans-serif;
  font-size: 12px;
  color: var(--ink);
}

a         { color: var(--link); text-decoration: none; }
a:visited { color: var(--link-visited); }
a:hover,
a:focus   { color: var(--link-hover); text-decoration: underline; }

img { border: 0; }

h1 { font-size: 22px; margin: 0 0 12px; color: #000; }
h2 { font-size: 16px; margin: 0 0 8px; color: #000; }

/* ---------- 1000px centered shell ---------- */
.shell {
  max-width: var(--site-max);
  margin: 0 auto;
}

table.layout {
  width: 100%;
  max-width: var(--site-max);
  margin: 0 auto;
  border: 0;
  border-collapse: collapse;
}

/* ---------- masthead ---------- */
.masthead td { padding: 8px 6px; vertical-align: middle; }
.masthead .logo   { width: 150px; }
.masthead .banner { text-align: center; }
.masthead .banner img,
.masthead .logo img { max-width: 100%; height: auto; }
.masthead .promo  { width: 130px; text-align: center; }

/* ---------- main columns ---------- */
.sidebar {
  width: 238px;
  vertical-align: top;
  padding: 0 12px 0 0;
}

.content {
  vertical-align: top;
  background: var(--content-bg);
  padding: 24px 32px 32px;
}

/* ---------- left menu ---------- */
.mainmenu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mainmenu li { margin: 0 0 1px; }

.mainmenu a {
  display: block;
  padding: 8px 12px;
  min-height: 31px;
  background: var(--menu-bg);
  border-left: 4px solid transparent;
  color: var(--menu-ink);
  font-size: 12px;
  font-weight: bold;
  letter-spacing: .02em;
  text-decoration: none;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}

.mainmenu a:visited { color: var(--menu-ink); }

.mainmenu a:hover,
.mainmenu a:focus {
  background: var(--menu-bg-hi);
  border-left-color: var(--link-hover);
  color: var(--link-hover);
  text-decoration: none;
}

.mainmenu a:focus-visible {
  outline: 2px solid var(--link-hover);
  outline-offset: 1px;
}

/* current page — matches the content panel so the tab reads as attached */
.mainmenu a[aria-current="page"] {
  background: var(--content-bg);
  border-left-color: #000;
  color: #000;
}

.mainmenu .flag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 5px;
  background: var(--link-hover);
  color: #000;
  font-size: 9px;
  text-transform: uppercase;
  vertical-align: 1px;
}

@media (prefers-reduced-motion: reduce) {
  .mainmenu a { transition: none; }
}

/* ---------- sidebar notes ---------- */
.sidenote {
  margin: 18px 2px;
  color: #ffffff;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}
.sidenote strong { color: #ffffff; }

/* ---------- content bits ---------- */
.intro { font-size: 13px; line-height: 1.6; color: #000; }

.callout {
  margin: 24px 0;
  padding: 18px 0;
  border-top: 3px solid var(--rule);
  border-bottom: 3px solid var(--rule);
  text-align: center;
  line-height: 1.6;
  color: #000;
}
.callout .lead {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: bold;
  letter-spacing: .25em;
}

.colophon {
  margin-top: 24px;
  text-align: right;
  font-size: 10px;
  color: #444;
}

/* ---------- posts ---------- */
.post {
  padding: 0 0 20px;
  margin: 0 0 26px;
  border-bottom: 3px double #999;
}

.post-title {
  margin: 0 0 4px;
  font-size: 17px;
  line-height: 1.3;
  color: #000;
}
.post-title a { color: #000; }
.post-title a:hover { color: var(--link-hover); }

.post-meta {
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e0e0e0;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #888;
}

.post-body { font-size: 13px; line-height: 1.7; color: #333; }
.post-body p:first-child { margin-top: 0; }
.post-body p:last-child  { margin-bottom: 0; }
.post-body blockquote {
  margin: 16px 0;
  padding: 2px 0 2px 16px;
  border-left: 3px solid #ddd;
  color: #555;
  font-style: italic;
}
.post-body img { max-width: 100%; height: auto; }

.post-figure { margin: 16px 0; }
.post-figure figcaption {
  margin-top: 6px;
  font-size: 10px;
  color: #777;
}

/* ---------- page navigation ---------- */
.post-nav {
  overflow: hidden;
  margin: 4px 0 22px;
  padding: 0 35px;
  font-size: 13px;
}

.post-nav a          { color: #00309c; text-decoration: underline; }
.post-nav a:visited  { color: #551a8b; }
.post-nav a:hover    { color: #cc0000; }

.pn-prev { float: left; }
.pn-next { float: right; }

/* =========================================================
   Interior-page helpers — not used on the index yet.
   Kept for About Me / The Homeplace / Pictures.
   ========================================================= */

.panel {
  background: #ffffff;
  padding: 16px 20px;
  margin: 0 0 18px;
  color: #555555;
  line-height: 1.6;
}
.panel h2 {
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 13px;
  color: #666;
}

.two-col {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
  margin: 24px 0;
}
.two-col .col { flex: 1 1 260px; min-width: 240px; }

.signature { margin: 0; font-size: 12px; line-height: 1.6; color: #000; }
.signature .role  { font-weight: bold; }
.signature .aside { color: #666666; font-size: 11px; }

/* ---------- small screens ---------- */
@media (max-width: 720px) {
  .masthead td,
  .sidebar,
  .content { display: block; width: auto; }
  .sidebar { padding: 0 0 16px; }
  .content { padding: 18px; }
}

@media (max-width: 560px) {
  .pn-prev, .pn-next { float: none; display: block; text-align: center; }
  .pn-prev { margin-bottom: 8px; }
}

/* ---------- exact-size images, no scaling ---------- */
.exact img {
  max-width: none;
  width: auto;
  height: auto;
}

.exact {                 /* narrow screens scroll rather than shrink */
  overflow-x: auto;
}

/* year headings between tables */
.year-head {
  margin: 30px 0 6px;
  padding-bottom: 6px;
  border-bottom: 3px double #999;
  font-size: 16px;
  color: #000;
}
.year-head:first-of-type { margin-top: 24px; }

/* ---------- archive listing ---------- */
.archive {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 8px;
}

.archive td {
  padding: 10px 8px;
  vertical-align: top;
  border-bottom: 1px solid #e0e0e0;
}

/* faint striping, same trick a 2002 table would use */
.archive tr:nth-child(even) td { background: #f7f4ea; }

.a-date {
  width: 74px;
  font-size: 12px;
  font-weight: bold;
  color: #000;
  white-space: nowrap;
}

.a-entry a {
  font-size: 14px;
  font-weight: bold;
  line-height: 1.35;
}

.a-note {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.55;
  color: #555;
}

/* ---------- the Tape flag, outside the menu ---------- */
/* .mainmenu .flag already exists; this is the standalone version. */
.flag {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 6px;
  background: var(--link-hover);
  color: #000;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: .06em;
  text-transform: uppercase;
  vertical-align: 1px;
}

/* ---------- small screens ---------- */
@media (max-width: 560px) {
  .archive td { display: block; border-bottom: 0; padding: 4px 8px; }
  .archive tr { display: block; border-bottom: 1px solid #e0e0e0; }
  .archive tr:nth-child(even) td { background: transparent; }
  .archive tr:nth-child(even)    { background: #f7f4ea; }
  .a-date { width: auto; padding-top: 10px; }
  .a-entry { padding-bottom: 10px; }
}

/* =========================================================
   ADDITIONS — single post pages
   Append to style.css, after the archive additions.
   ========================================================= */

/* on a single-post page the title is the h1, so the article
   doesn't need its closing rule */
.content > .post:only-of-type { border-bottom: 0; margin-bottom: 0; }

/* ---------- intercept slip ---------- */
/* Metadata strip under the byline on posts carrying tape material. */
.slip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin: 0 0 18px;
  padding: 12px 16px;
  background: #f7f4ea;
  border-left: 4px solid var(--link-hover);
}

.slip span {
  font-size: 13px;
  font-weight: bold;
  color: #000;
  line-height: 1.4;
}

.slip em {
  display: block;
  font-style: normal;
  font-weight: normal;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #777;
}

/* ---------- groups block ---------- */
.groups {
  margin: 20px 0;
  background: #ffffff;
  border: 1px solid #ccc;
  border-left: 4px solid var(--link-hover);
}

.g-head {
  margin: 0;
  padding: 9px 14px;
  border-bottom: 1px solid #e0e0e0;
  background: #f7f4ea;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #555;
}

.g-body {
  padding: 14px;
  counter-reset: grp;
  overflow-x: auto;
}

.g-row {
  position: relative;
  padding-left: 38px;
  font-family: "Courier New", Courier, monospace;
  font-size: 15px;
  line-height: 1.85;
  letter-spacing: .06em;
  color: #000;
  white-space: pre;
}

/* Row numbers are CSS-generated so they don't land in the clipboard
   when somebody selects the block and copies it. Keep it that way. */
.g-row::before {
  counter-increment: grp 5;
  content: counter(grp);
  position: absolute;
  left: 0;
  width: 24px;
  text-align: right;
  font-size: 11px;
  letter-spacing: 0;
  color: #aaa;
}

.g-note {
  margin: 0;
  padding: 0 14px 12px;
  font-size: 12px;
  color: #555;
}

/* ---------- files on this page ---------- */
.materials {
  margin: 24px 0 22px;
  padding: 14px 18px;
  background: #f7f4ea;
}

.materials h2 {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #555;
}

.materials ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.materials li {
  padding: 5px 0;
  font-size: 13px;
}

.materials li + li { border-top: 1px solid #e4e0d4; }

.materials .m-size {
  margin-left: 8px;
  font-size: 11px;
  color: #777;
}

/* ---------- small screens ---------- */
@media (max-width: 560px) {
  .slip { gap: 10px 20px; padding: 10px 12px; }
  .g-row { font-size: 13px; letter-spacing: .02em; }
}

/* =========================================================
   ADDITION — index page

   ========================================================= */

.more-link {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: bold;
}