/* Summit7 archive: shared stylesheet. Recreates the 2012 rt_diametric look with modern CSS. */
@font-face {
  font-family: "Novecento Wide";
  src: url("../fonts/novecentowide-normal-webfont.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Novecento Wide";
  src: url("../fonts/novecentowide-demibold-webfont.woff") format("woff");
  font-weight: 600; font-style: normal; font-display: swap;
}

:root {
  --accent: #55a4f2;          /* original preset blue, decorative use */
  --link: #1f6fbf;            /* darker blue for text: 5.1:1 on white */
  --link-hover: #124f8c;
  --text: #3f3d3a;            /* original #4c4a47, a little darker for contrast */
  --heading: #4c4a47;
  --muted: #6b6965;
  --rule: #dedede;
  --paper: #ffffff;
  --footer-bg: #e8edf7;
  --focus: #e0761b;
  --radius: 4px;
  --shadow: 0 1px 3px rgb(0 0 0 / .15);
  --font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "Novecento Wide", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --container: 64rem;
  --gap: clamp(1rem, 3vw, 2.5rem);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  min-height: 100vh;
  display: flex; flex-direction: column;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
iframe { max-width: 100%; border: 0; }
a { color: var(--link); font-weight: 600; text-decoration-thickness: from-font; text-underline-offset: .15em; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); overflow-wrap: anywhere; }
a:hover { color: var(--link-hover); text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--heading); color: #fff; padding: .6rem 1rem; border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; color: #fff; }

.container { width: min(100% - 2 * var(--gap), var(--container)); margin-inline: auto; }

/* ---------- header: menu on white with the ripped paper edge ---------- */
.site-header {
  position: relative; z-index: 2;
  background: #fff;
  padding-bottom: .25rem;
}
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 58px;
  background: url("../img/ripped-paper-divider.png") center top / auto 58px repeat-x;
  margin-top: -1px;
  pointer-events: none;
}
.site-header::before { content: ""; position: absolute; inset: 0 0 -1px 0; background: linear-gradient(#fff 60%, #fbfbfb); z-index: -1; }
.site-nav { width: min(100% - 2rem, var(--container)); margin-inline: auto; padding-top: .75rem; }
.site-nav .menu {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1.4rem;
}
.site-nav .menu a {
  display: block; padding: .6rem .2rem;
  font-family: var(--font-display); font-weight: 400; font-size: .8rem; letter-spacing: .04em;
  text-transform: uppercase; color: #111; text-decoration: none;
}
.site-nav .menu a:hover, .site-nav .menu a[aria-current="page"] { color: var(--link); }
.site-nav .menu a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }
.nav-toggle {
  display: none; align-items: center; gap: .6rem;
  margin: 0 auto; padding: .6rem 1rem;
  font: 600 .85rem/1 var(--font-display); letter-spacing: .06em; text-transform: uppercase;
  color: var(--heading); background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; position: relative; content: "";
}
.nav-toggle-bars::before { position: absolute; top: -6px; }
.nav-toggle-bars::after { position: absolute; top: 6px; }

/* ---------- main layout ---------- */
.site-main { flex: 1; padding-block: 5rem 2rem; }
.layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(14rem, 1fr); gap: var(--gap); align-items: start; }
.content { min-width: 0; }

/* headings: two tone, first word in the accent colour */
h1, h2, h3, h4 { color: var(--heading); line-height: 1.25; margin: 0 0 .75em; }
.entry-title, .module-title, .content > h1, .paneltitle, .panelsubtitle {
  font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .01em;
  text-shadow: 1px 1px 0 rgb(0 0 0 / .06);
}
.entry-title { font-size: clamp(1.3rem, 1rem + 1.3vw, 1.65rem); }
.entry-title a { color: inherit; text-decoration: none; }
.entry-title .accent, .module-title .accent { font-weight: 400; color: var(--link); }
.content > h1 { font-size: clamp(1.3rem, 1rem + 1.3vw, 1.65rem); }
.module-title { font-size: 1.1rem; margin-bottom: .9rem; }
.entry-meta { color: var(--muted); font-size: .875rem; margin-top: -.5rem; }
.entry { margin-bottom: 2.5rem; }
.entry + .entry { padding-top: 2.5rem; border-top: 1px solid var(--rule); }
.entry-body::after { content: ""; display: table; clear: both; }
.entry-body h2, .entry-body h3 { font-size: 1.1rem; }

/* content helpers mapped from the old inline styles */
.ta-center { text-align: center; }
.ta-right { text-align: right; }
.text-lg { font-size: 1.2rem; }
.text-sm { font-size: .8rem; }
.text-red { color: #c00; }
img.float-left { float: left; margin: .3rem 1.25rem .75rem 0; }
img.float-right { float: right; margin: .3rem 0 .75rem 1.25rem; }
img.center { display: block; margin: .5rem auto 1rem; }
.entry-body img, .module-body img { border-radius: 2px; }
.entry-body a.lightbox img, .entry-body img.float-left, .entry-body img.float-right {
  padding: 3px; background: #fff; border: 1px solid #d7d7d7; box-shadow: var(--shadow);
}
a.lightbox { display: inline-block; font-weight: inherit; max-width: 100%; }
a.lightbox:has(img.float-left) { float: left; margin: .3rem 1.25rem .75rem 0; }
a.lightbox:has(img.float-right) { float: right; margin: .3rem 0 .75rem 1.25rem; }
a.lightbox:has(img.center) { display: block; width: fit-content; margin: .5rem auto 1rem; }
a.lightbox img.float-left, a.lightbox img.float-right, a.lightbox img.center { float: none; margin: 0; }
img.file-icon { vertical-align: middle; margin-right: .25rem; padding: 0; border: 0; box-shadow: none; }

table.layout-table { border-collapse: collapse; width: 100%; margin-bottom: 1rem; }
table.layout-table td { vertical-align: top; padding: 0 .75rem .75rem 0; }
table.layout-table img { max-width: none; }
table.layout-table td > ul { margin: 0; }
table.layout-table td:has(> .tick) { width: 2.5rem; text-align: center; }
.tick { display: inline-block; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--link); position: relative; vertical-align: middle; }
.tick::after { content: ""; position: absolute; left: .45rem; top: .22rem; width: .3rem; height: .6rem; border: solid #fff; border-width: 0 .17rem .17rem 0; transform: rotate(45deg); }
table:not(.layout-table) { border-collapse: collapse; width: 100%; margin-bottom: 1rem; }
table:not(.layout-table) th, table:not(.layout-table) td { border: 1px solid var(--rule); padding: .4rem .6rem; text-align: left; }

.readon {
  display: inline-block; padding: .5rem 1.1rem; margin-top: .25rem;
  font: 400 .9rem/1.2 var(--font-body); color: #fff;
  background: linear-gradient(#3d93e6, #1f6fbf); border: 1px solid #1b63ab; border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .3), var(--shadow);
}
a:has(> .readon) { text-decoration: none; }
a:hover > .readon { background: linear-gradient(#2f84d6, #175ea6); }

/* home page */
.content-top { margin-bottom: 2rem; }
.content-top .module-title { font-size: 1.05rem; }
.content-bottom { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1.5rem; align-items: center; margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--rule); }
.content-bottom .layout-table, .content-bottom p { margin: 0; }
.content-bottom .layout-table td { padding: 0; }
.paneltitle { display: block; font-size: clamp(1.6rem, 1rem + 2.4vw, 2.2rem); text-align: center; margin-bottom: .1rem; }
.panelsubtitle { display: block; font-weight: 400; font-size: clamp(1rem, .8rem + 1.2vw, 1.4rem); letter-spacing: .08em; text-align: center; color: var(--heading); }

/* sidebar */
.sidebar .module { margin-bottom: 2.25rem; }
.sidebar .module-body { font-size: .9rem; }
.sidebar a, .content-top a { text-decoration: none; }
.sidebar a:hover, .content-top a:hover { text-decoration: underline; }
.side-menu { list-style: none; margin: 0; padding: 0; }
.side-menu li { margin: 0; }
.side-menu a { display: block; padding: .3rem 0 .3rem 1rem; position: relative; font-size: .92rem; line-height: 1.35; text-decoration: none; }
.side-menu a::before { content: ""; position: absolute; left: .2rem; top: .85em; width: 5px; height: 5px; border-radius: 50%; background: #9a9895; }
.side-menu a:hover { text-decoration: underline; }
.side-menu a[aria-current="page"] { color: var(--heading); }
.side-menu ul { list-style: none; padding-left: 1rem; margin: 0; }
.sidebar ul:not(.side-menu) { padding-left: 1.1rem; }
.sidebar li { margin-bottom: .35rem; }
.content ul ul { margin-top: .25rem; }

/* pagination */
.pagination { margin: 2rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--rule); text-align: center; }
.pagination p { color: var(--muted); font-size: .9rem; margin-bottom: .5rem; }
.pagination ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; }
.pagination a, .pagination span { display: inline-block; min-width: 2.5rem; padding: .45rem .7rem; border: 1px solid var(--rule); border-radius: var(--radius); text-decoration: none; font-size: .9rem; }
.pagination .current { background: var(--link); border-color: var(--link); color: #fff; font-weight: 600; }
.pagination .disabled { color: #767470; }

/* gallery grid */
.gallery-grid { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(10rem, 45%), 1fr)); gap: 3px; }
.gallery-grid li { margin: 0; }
.gallery-grid a { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #eee; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease, filter .4s ease; }
.gallery-grid a:hover img, .gallery-grid a:focus-visible img { transform: scale(1.04); filter: brightness(1.05); }
.gallery-grid a:focus-visible { outline-offset: -3px; }

/* slideshow (a swipeable strip without JS) */
.slideshow { position: relative; margin: 1rem 0 1.5rem; background: #111; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.slides { list-style: none; margin: 0; padding: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: thin; }
.slide { flex: 0 0 100%; scroll-snap-align: start; }
.slide figure { margin: 0; }
.slide img { display: block; width: 100%; aspect-ratio: 59 / 35; object-fit: contain; background: #111; }
.slide figcaption { color: #f2f2f2; font-size: .9rem; line-height: 1.45; padding: .6rem 1rem .7rem; min-height: 3.6em; background: #222; }
.slideshow-controls { display: flex; justify-content: center; align-items: center; gap: .5rem; padding: .5rem; background: #1a1a1a; border-top: 1px solid #333; }
.slideshow-controls button { font: 600 .8rem/1 var(--font-body); color: #fff; background: rgb(0 0 0 / .5); border: 1px solid rgb(255 255 255 / .6); border-radius: var(--radius); padding: .5rem .8rem; cursor: pointer; }
.slideshow-controls button:hover { background: rgb(0 0 0 / .75); }
.slideshow-controls .count { color: #fff; font-size: .8rem; min-width: 4.5rem; text-align: center; }
.js .slides { overflow: hidden; scrollbar-width: none; }

/* lightbox */
.lightbox-dialog { padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox-dialog::backdrop { background: rgb(10 10 10 / .9); }
.lightbox-dialog figure { margin: 0; height: 100%; display: grid; place-items: center; grid-template-rows: 1fr auto; padding: 3.5rem 4.5rem 1rem; }
.lightbox-dialog img { max-width: 100%; max-height: calc(100vh - 7rem); object-fit: contain; box-shadow: 0 4px 30px rgb(0 0 0 / .5); background: #fff; }
.lightbox-dialog figcaption { color: #eee; text-align: center; padding-top: .6rem; font-size: .9rem; }
.lightbox-dialog button { position: absolute; font: 600 1.1rem/1 var(--font-body); color: #fff; background: rgb(0 0 0 / .55); border: 1px solid rgb(255 255 255 / .5); border-radius: var(--radius); padding: .6rem .9rem; cursor: pointer; }
.lightbox-dialog button:hover { background: rgb(0 0 0 / .85); }
.lightbox-dialog .lb-close { top: 1rem; right: 1rem; }
.lightbox-dialog .lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-dialog .lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }

/* guest book archive */
.gb-entry { border: 1px solid #e6e6e6; border-left: 5px solid #c8dff9; border-radius: var(--radius); margin-bottom: 1.5rem; overflow: hidden; }
.gb-title { font: 600 1rem/1.3 var(--font-body); margin: 0; padding: .6rem 1rem; background: #c8dff9; color: #1d1c1a; }
.gb-body { padding: 1rem 1rem 0; }
.gb-date { padding: 0 1rem .75rem; margin: 0; color: var(--muted); font-size: .85rem; }

/* footer: ripped paper on the soft blue band */
.site-footer {
  position: relative; margin-top: 3rem; padding: 4.5rem 0 2.25rem;
  background: var(--footer-bg) url("../img/noise.png");
  color: var(--muted); font-size: .95rem;
}
.site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 58px;
  background: url("../img/ripped-paper-divider.png") center top / auto 58px repeat-x;
}
.site-footer p { margin: 0; }

/* 404 */
.notfound { padding: 1rem 0; }

/* ---------- responsive ---------- */
@media (max-width: 52rem) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { border-top: 1px solid var(--rule); padding-top: 2rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0 var(--gap); }
}
@media (max-width: 40rem) {
  body { font-size: .975rem; }
  .site-main { padding-top: 4rem; }
  .js .nav-toggle { display: inline-flex; }
  .site-nav { text-align: center; }
  .js .site-nav .menu { display: none; flex-direction: column; gap: 0; margin-top: .5rem; }
  .js .site-nav.open .menu { display: flex; }
  .site-nav .menu a { padding: .65rem .5rem; font-size: .85rem; }
  img.float-left, img.float-right, a.lightbox:has(img.float-left), a.lightbox:has(img.float-right) { float: none; display: block; width: fit-content; margin: .5rem auto 1rem; }
  table.layout-table, table.layout-table tbody, table.layout-table tr, table.layout-table td { display: block; width: 100%; }
  table.layout-table td { padding-right: 0; }
  table.layout-table img { max-width: 100%; }
  .lightbox-dialog figure { padding: 3.5rem .5rem 4.5rem; }
  .lightbox-dialog .lb-prev, .lightbox-dialog .lb-next { top: auto; bottom: 1rem; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html, .slides { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
@media print {
  .site-header, .sidebar, .site-footer::before, .skip-link, .slideshow-controls { display: none; }
  .layout { display: block; }
}

/* data tables scroll sideways on small screens instead of breaking the layout */
.table-scroll { overflow-x: auto; margin-bottom: 1rem; }
.table-scroll table { margin-bottom: 0; min-width: 32rem; }
.table-scroll th { background: #f3f6fb; }

/* ---------- remembrance notice band (top of every page, not sticky) ---------- */
.site-notice {
  background: var(--footer-bg);
  border-bottom: 1px solid #d5dcea;
  color: var(--text);
  font-size: .8125rem; line-height: 1.45;
  text-align: center;
  padding: .45rem 1rem;
}
.site-notice p { margin: 0; max-width: var(--container); margin-inline: auto; text-wrap: balance; }
.site-notice a { color: var(--link-hover); }   /* 7.1:1 on the band colour */
.site-notice a:hover { color: var(--heading); }
@media print { .site-notice { background: none; border: 0; } }

/* ---------- The Final Chapter (figures, summit table, home teaser) ---------- */
.chapter-figure { margin: 1.25rem auto 1.75rem; max-width: 26rem; }
.chapter-figure img { display: block; width: 100%; height: auto; border-radius: 2px; box-shadow: var(--shadow); }
.chapter-figure figcaption { color: var(--muted); font-size: .875rem; line-height: 1.45; padding-top: .5rem; text-align: center; }
.final-chapter blockquote { margin: 1rem 0 1.5rem; padding: .25rem 0 .25rem 1rem; border-left: 3px solid var(--accent); font-style: italic; }
.final-chapter caption { caption-side: top; text-align: left; font-weight: 600; padding-bottom: .4rem; }
.final-chapter .table-scroll table { min-width: 28rem; }
.chapter-teaser .teaser-image { float: left; width: 190px; margin: .3rem 1.25rem .75rem 0; }
.chapter-teaser .teaser-image img { display: block; width: 100%; height: auto; border-radius: 2px; box-shadow: var(--shadow); }
@media (max-width: 40rem) { .chapter-teaser .teaser-image { float: none; display: block; width: min(100%, 20rem); margin: .5rem auto 1rem; } }
/* ten menu items: keep the desktop menu on one line, as before */
@media (min-width: 60rem) { .site-nav .menu { gap: .25rem .8rem; } .site-nav .menu a { font-size: .76rem; } }
