/* Deliberately modelled on the fixed-width Dover-Kent archive pages. */

html {
  min-width: 780px;
  background: #ffff99;
}

body {
  width: 750px;
  margin: 8px auto 30px;
  padding: 0;
  color: #000;
  background: #fff;
  border: 1px solid #000;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.22;
}

body::before {
  content: "FOLKESTONE LOCAL ARCHIVES";
  display: block;
  padding: 5px 2px;
  border-bottom: 1px solid #000;
  background: #ffff00;
  font-family: "Times New Roman", Times, serif;
  font-size: 42px;
  font-weight: bold;
  line-height: 1;
  text-align: center;
}

h1, h2, h3 {
  font-family: "Times New Roman", Times, serif;
  color: #000;
  text-align: center;
}

h1 {
  margin: 0;
  padding: 7px 4px;
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
  background: #66ccff;
  font-size: 32px;
  line-height: 1.05;
}

h2 {
  margin: 0;
  padding: 5px;
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
  background: #ffff00;
  font-size: 25px;
  text-decoration: underline;
}

h3 {
  margin: 8px 0 3px;
  font-size: 20px;
  text-align: left;
}

p {
  margin: 7px 8px;
  text-align: justify;
}

a:link {
  color: #3333ff;
  text-decoration: underline;
}

a:active {
  color: #ff3300;
}

a:visited {
  color: #cc33ff;
}

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

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

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-family: "Times New Roman", Times, serif;
}

th, td {
  padding: 4px;
  border: 1px solid #000;
  text-align: left;
  vertical-align: top;
}

th {
  background: #ffff00;
  font-size: 18px;
  text-align: center;
}

.subtitle {
  margin: 0;
  padding: 5px;
  border-bottom: 1px solid #000;
  background: #ffccff;
  font-family: "Times New Roman", Times, serif;
  font-size: 18px;
  font-style: normal;
  font-weight: bold;
  text-align: center;
}

.updated {
  margin: 0;
  padding: 3px;
  border-bottom: 1px solid #000;
  background: #66ff33;
  font-family: "Times New Roman", Times, serif;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
}

.centre {
  text-align: center;
}

.small, figcaption {
  font-family: "Times New Roman", Times, serif;
  font-size: 14px;
}

.archive-nav {
  margin: 0;
  padding: 9px 4px;
  border-bottom: 1px solid #000;
  background: #ffccff;
  font-family: "Times New Roman", Times, serif;
  font-size: 19px;
  font-weight: bold;
  text-align: center;
}

.notice {
  margin: 0;
  padding: 8px;
  border: 0;
  border-bottom: 1px solid #000;
  background: #ffff00;
  font-family: "Times New Roman", Times, serif;
  font-size: 17px;
  text-align: center;
}

marquee {
  display: block;
  padding: 5px 0;
  border-bottom: 1px solid #000;
  background: #000;
  color: #ffff00;
  font-family: "Times New Roman", Times, serif;
  font-size: 18px;
  font-weight: bold;
}

.bear-dossier {
  background: #ffffcc;
}

.bear-dossier td {
  background: #ffffcc;
}

.bear-picture {
  width: 190px;
  background: #ffcc00 !important;
  text-align: center;
  vertical-align: middle;
}

.bear-picture img {
  width: 180px;
  height: 180px;
  border: 2px solid #000;
  object-fit: cover;
}

.dossier-title {
  margin: 0;
  padding: 4px;
  background: #ffcc00;
  font-family: "Times New Roman", Times, serif;
  font-size: 22px;
  font-weight: bold;
  text-align: center;
}

.register-intro {
  margin: 0;
  padding: 6px 10px;
  border-bottom: 1px solid #000;
  background: #ffccff;
  font-family: "Times New Roman", Times, serif;
  font-size: 15px;
  font-weight: bold;
  text-align: center;
}

.register-table {
  table-layout: fixed;
}

.register-table th {
  background: #66ccff;
}

.register-table td {
  text-align: center;
  vertical-align: middle;
}

.register-table th:nth-child(1) { width: 190px; }
.register-table th:nth-child(2) { width: 190px; }
.register-table th:nth-child(4) { width: 50px; }

.status-barred {
  background: #ff0066 !important;
  color: #000;
  font-weight: bold;
}

.status-review {
  background: #ffff00 !important;
  font-weight: bold;
}

.status-suspended {
  background: #ff9933 !important;
  font-weight: bold;
}

.status-warning {
  background: #ccff99 !important;
  font-weight: bold;
}

.archive-table {
  table-layout: fixed;
}

.archive-table th:nth-child(1),
.archive-table td:nth-child(1) {
  width: 190px;
}

.archive-table th:nth-child(2),
.archive-table td:nth-child(2) {
  width: 155px;
  text-align: center;
}

.archive-table tbody tr:nth-child(odd) td:nth-child(2) {
  background: #ccffff;
}

.archive-table tbody tr:nth-child(even) td:nth-child(2) {
  background: #ccff99;
}

.archive-table tbody tr:nth-child(3n) td:nth-child(2) {
  background: #ffcc00;
}

.venue-photo {
  width: 184px;
  margin: 0 auto;
  text-align: center;
}

.venue-photo img {
  display: block;
  width: 180px;
  height: 120px;
  margin: 2px auto;
  border: 1px solid #000;
  object-fit: cover;
}

.venue-photo img.portrait {
  height: 170px;
}

figcaption {
  margin: 3px 1px 5px;
  text-align: center;
}

.bear-note {
  color: #006600;
  font-family: "Times New Roman", Times, serif;
  font-style: italic;
}

.facts {
  width: 100%;
  margin: 0;
}

.facts th {
  width: 170px;
  background: #66ccff;
  text-align: left;
}

.facts tr:nth-child(2) th,
.facts tr:nth-child(2) td {
  background: #ccff99;
}

.facts tr:nth-child(3) th,
.facts tr:nth-child(3) td {
  background: #ffcc00;
}

.file-box {
  margin: 0;
  padding: 7px 10px;
  border: 0;
  background: #ffffcc;
}

.stamp {
  display: inline-block;
  padding: 2px 5px;
  border: 2px solid #cc0000;
  color: #cc0000;
  font-weight: bold;
  letter-spacing: 0.04em;
}

.archive-gallery {
  width: 100%;
  margin: 0;
  padding: 0;
  background: #ffffcc;
  text-align: center;
}

.archive-gallery figure {
  margin: 0;
  padding: 0 0 8px;
  border-bottom: 1px solid #000;
  background: #ffffcc;
}

.archive-gallery img {
  display: block;
  width: auto;
  height: auto;
  max-width: 748px;
  max-height: 760px;
  margin: 0 auto;
  border: 0;
}

.archive-gallery img.programme-scan {
  max-height: none;
}

.archive-gallery img.shepway-watch-badge {
  max-width: 440px;
  max-height: none;
}

.club-reenactment {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: #ffffcc;
}

.club-reenactment figure {
  margin: 0;
  padding: 7px;
  border-bottom: 1px solid #000;
  background: #ffffcc;
}

.club-reenactment figure + figure {
  border-left: 1px solid #000;
}

.club-reenactment img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 310px;
  margin: 0 auto;
  border: 1px solid #000;
}

.club-reenactment figcaption {
  padding-top: 4px;
  text-align: left;
}

.watch-records {
  table-layout: fixed;
}

.watch-records th:nth-child(1),
.watch-records td:nth-child(1) {
  width: 80px;
  text-align: center;
}

.watch-records th:nth-child(2),
.watch-records td:nth-child(2) {
  width: 165px;
}

.watch-records tr:nth-child(odd) td {
  background: #ffffcc;
}

.archive-video {
  display: block;
  width: 350px;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border: 1px solid #000;
  background: #000;
}

.club-shepway-visual-index {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px;
  border: 2px solid #000;
  background: #ffffcc;
}

.club-shepway-visual-index figure {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 1px solid #000;
  background: #fff;
}

.club-shepway-visual-index img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  max-height: 420px;
  margin: 0 auto;
  object-fit: contain;
  background: #ffffcc;
}

.club-shepway-visual-index figcaption {
  padding: 5px 7px 7px;
  border-top: 1px solid #000;
  font-size: 0.93rem;
  line-height: 1.25;
  text-align: left;
}

@media (max-width: 620px) {
  .club-shepway-visual-index {
    grid-template-columns: 1fr;
  }

  .club-shepway-visual-index img {
    max-height: none;
  }
}

html.marine-masterplan-page .archive-gallery img.archive-evidence {
  width: 100%;
  height: auto;
  max-width: 748px;
  max-height: none;
  object-fit: contain;
}

.recording-table {
  table-layout: fixed;
}

.recording-table th:first-child,
.recording-table td:first-child {
  width: 310px;
  text-align: center;
}

.recording-table tr:nth-child(odd) td {
  background: #ffffcc;
}

.recording-table video {
  display: block;
  width: 300px;
  max-height: 535px;
  margin: 2px auto;
  border: 1px solid #000;
  background: #000;
}

.archive-gallery figcaption {
  margin: 0;
  padding: 5px 8px 0;
  font-size: 16px;
}

.photo-heading {
  margin: 0;
  padding: 4px;
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
  background: #ffcc00;
  font-family: "Times New Roman", Times, serif;
  font-size: 22px;
  font-weight: bold;
  text-align: center;
}

.back-link {
  display: block;
  margin: 0;
  padding: 8px;
  border-bottom: 1px solid #000;
  background: #66ccff;
  font-family: "Times New Roman", Times, serif;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
}

body > p:first-child {
  margin: 0;
  padding: 8px;
  border-bottom: 1px solid #000;
  background: #66ccff;
  font-family: "Times New Roman", Times, serif;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
}

.footer {
  clear: both;
  margin: 0;
  padding: 8px;
  border-top: 1px solid #000;
  background: #ffccff;
  font-family: "Times New Roman", Times, serif;
  font-size: 14px;
  text-align: center;
}

.dome-nav {
  margin: 0;
  padding: 7px 5px;
  border-bottom: 1px solid #000;
  background: #ccffff;
  font-family: "Times New Roman", Times, serif;
  font-size: 17px;
  font-weight: bold;
  text-align: center;
}

.source-box {
  margin: 0;
  padding: 7px 10px;
  border-bottom: 1px solid #000;
  background: #e8e8e8;
  font-family: "Times New Roman", Times, serif;
}

.bear-papers {
  margin: 0;
  padding: 7px 10px;
  border-bottom: 1px solid #000;
  background: #ffffcc;
  font-family: "Times New Roman", Times, serif;
}

.fragment-table th:first-child,
.fragment-table td:first-child {
  width: 205px;
  text-align: center;
}

.fragment-table tr:nth-child(odd) td {
  background: #ffffcc;
}

.fragment-table img {
  display: block;
  width: 195px;
  max-height: 235px;
  margin: 0 auto 3px;
  border: 1px solid #000;
  object-fit: contain;
}

.sponsor-strip {
  margin: 0;
  padding: 8px;
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
  background: #fff;
  text-align: center;
}

.sponsor-strip img {
  width: 210px;
  height: 160px;
  margin: 3px 16px;
  border: 1px solid #000;
  object-fit: contain;
  vertical-align: middle;
}

ul {
  margin: 8px 24px 12px 36px;
}

@media (max-width: 780px) {
  /* Authentic early-web behaviour: the 750px archive table remains fixed. */
  html {
    min-width: 770px;
  }

  body {
    margin-left: 8px;
    margin-right: 8px;
  }
}

/* Hooden Horse Trials side-quest page. */
html:has(body.hht-page) {
  min-width: 0;
  background: #000;
}

body.hht-page {
  width: min(1120px, calc(100vw - 24px));
  min-width: 0;
  background: #000;
  color: #00e5ff;
  border: 3px solid #ffff00;
  font-family: "Courier New", Courier, monospace;
}

body.hht-page::before {
  content: "CLUB SHEPWAY GAMES";
  background: #000;
  color: #ffff00;
  border-bottom: 3px solid #0018d8;
  font-family: "Courier New", Courier, monospace;
  font-size: clamp(24px, 6vw, 54px);
  text-shadow: 3px 3px 0 #0018d8;
}

.hht-page a:link,
.hht-page a:visited {
  color: #ffff00;
}

.hht-page h1,
.hht-page h2,
.hht-page h3 {
  font-family: "Courier New", Courier, monospace;
  text-transform: uppercase;
}

.hht-page h1 {
  background: #000;
  color: #ffff00;
  border-top: 3px solid #ff00cc;
  border-bottom: 3px solid #ff00cc;
  font-size: clamp(32px, 7vw, 68px);
  text-shadow: 3px 3px 0 #0018d8;
}

.hht-page h2 {
  background: #000;
  color: #ffff00;
  border-top: 2px solid #ffff00;
  border-bottom: 2px solid #ffff00;
  font-size: 24px;
  text-decoration: none;
}

.hht-page h3 {
  color: #ff00cc;
  text-align: left;
}

.hht-page p {
  text-align: left;
}

.hht-subtitle {
  margin: 0;
  padding: 7px;
  border-bottom: 2px solid #ffff00;
  background: #0018d8;
  color: #00e5ff;
  font-weight: bold;
  text-align: center;
  text-transform: uppercase;
}

.hht-nav,
.hht-note,
.hht-footer {
  margin: 0;
  padding: 8px;
  border-bottom: 2px solid #ffff00;
  background: #000;
  color: #00ff00;
  font-weight: bold;
  text-align: center;
}

.hht-panel {
  margin: 0;
  padding: 12px;
  border-bottom: 2px solid #ffff00;
  background: #000;
}

.hht-panel p {
  color: #00e5ff;
  line-height: 1.35;
}

.hht-kicker,
.hht-label {
  color: #ff00cc;
  font-weight: bold;
  text-transform: uppercase;
}

.hht-hero,
.hht-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 14px;
  align-items: start;
}

.hht-feature {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.85fr);
}

.hht-hero img,
.hht-feature img,
.hht-gallery img {
  display: block;
  width: 100%;
  border: 2px solid #ffff00;
  background: #000;
}

.hht-pixel img,
.hht-game-frame {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.hht-hero figcaption,
.hht-feature figcaption,
.hht-gallery figcaption {
  padding: 5px 0 0;
  color: #00ff00;
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  line-height: 1.25;
}

.hht-game-shell {
  width: min(100%, 960px);
  aspect-ratio: 4 / 3;
  margin: 0 auto;
  background: #000;
  border: 3px solid #ffff00;
  box-shadow: 0 0 0 3px #0018d8;
  overflow: hidden;
}

.hht-game-frame {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: #000;
}

.hht-controls,
.hht-levels,
.hht-rules,
.hht-gallery {
  display: grid;
  gap: 10px;
}

.hht-controls {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.hht-control,
.hht-card,
.hht-rule {
  border: 2px solid #0018d8;
  padding: 9px;
  background: #02020a;
}

.hht-control b,
.hht-card b,
.hht-rule b {
  color: #ffff00;
}

.hht-levels {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.hht-rules {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.hht-rule ul {
  margin: 6px 0 0 18px;
  padding: 0;
  color: #00e5ff;
}

.hht-gallery {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.hht-footer {
  border-top: 2px solid #ff00cc;
  border-bottom: 0;
}

@media (max-width: 760px) {
  .hht-hero,
  .hht-feature {
    grid-template-columns: 1fr;
  }

  html.marine-masterplan-page {
    min-width: 0;
  }

  html.marine-masterplan-page body {
    box-sizing: border-box;
    width: 100%;
    margin: 0 auto 20px;
  }

  html.marine-masterplan-page body::before {
    font-size: 30px;
  }

  html.marine-masterplan-page h1 {
    font-size: 27px;
  }

  html.marine-masterplan-page .facts th {
    width: 105px;
  }

  html.marine-masterplan-page .archive-table th:nth-child(1),
  html.marine-masterplan-page .archive-table td:nth-child(1) {
    width: 88px;
  }

  html.marine-masterplan-page .archive-table th:nth-child(2),
  html.marine-masterplan-page .archive-table td:nth-child(2) {
    width: 88px;
  }

  html.marine-masterplan-page .venue-photo {
    width: 82px;
  }

  html.marine-masterplan-page .venue-photo img,
  html.marine-masterplan-page .venue-photo img.portrait {
    width: 78px;
    height: auto;
    max-height: 116px;
    object-fit: contain;
  }

  html.marine-masterplan-page .venue-photo figcaption {
    font-size: 12px;
  }
}
