/*
  The first layer makes this isolated package previewable without copying the
  private repository's shared styles. On the real Rustler site, its unlayered
  stylesheets take precedence and these declarations become harmless fallbacks.
*/
@layer rustler-preview-fallback {
  :root {
    --ink: #24170f;
    --paper: #fffdf8;
    --muted: #6f675e;
    --rule: #2e2118;
    --gold: #b78645;
    --rustler-ink: #081b2d;
    --rustler-paper: #f7f4ec;
    --rustler-panel: #fffdf8;
    --rustler-line: #c9d0cc;
    --rustler-muted: #576675;
    --rustler-rust: #db5a39;
    --rustler-sun: #f1b94f;
    --rustler-moss: #325b50;
    --rustler-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --rustler-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  }

  * {
    box-sizing: border-box;
  }

  html {
    background: var(--rustler-paper);
  }

  body {
    margin: 0;
    background: var(--rustler-paper);
    color: var(--rustler-ink);
    font-family: var(--rustler-serif);
    line-height: 1.55;
  }

  a {
    color: inherit;
    text-decoration-color: rgb(219 90 57 / 68%);
    text-underline-offset: 0.17em;
  }

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

  .wrap {
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto;
  }

  .reader-actions {
    background: var(--rustler-ink);
    color: #eef4f3;
    font-family: var(--rustler-sans);
  }

  .reader-actions .wrap {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .reader-action {
    min-height: 37px;
    padding: 10px 14px;
    border-left: 1px solid rgb(255 255 255 / 18%);
    color: #eef4f3;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-decoration: none;
    text-transform: uppercase;
  }

  .masthead {
    position: relative;
    overflow: hidden;
    min-height: 126px;
    border-bottom: 1px solid var(--rustler-line);
    background: var(--rustler-paper);
  }

  .masthead img {
    display: none;
  }

  .masthead > a:first-child {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.55rem;
    min-height: 126px;
    text-decoration: none;
  }

  .masthead > a:first-child::before {
    content: "THE";
    color: var(--rustler-rust);
    font: 900 clamp(0.62rem, 1.2vw, 0.82rem) var(--rustler-sans);
    letter-spacing: 0.23em;
    transform: translateY(-1.55em);
  }

  .masthead > a:first-child::after {
    content: "RUSTLER";
    font: 900 clamp(3.8rem, 10vw, 8.4rem) / 0.75 var(--rustler-serif);
    letter-spacing: -0.085em;
  }

  .masthead::after {
    content: "RUSSELL TOWNSHIP  /  ONTARIO";
    position: absolute;
    bottom: 16px;
    left: 50%;
    color: var(--rustler-muted);
    font: 800 0.6rem var(--rustler-sans);
    letter-spacing: 0.2em;
    transform: translateX(-50%);
  }

  .local-line {
    padding: 10px 0 11px;
    border-bottom: 1px solid var(--rustler-line);
    background: var(--rustler-panel);
    color: var(--rustler-moss);
    font: 800 0.67rem var(--rustler-sans);
    letter-spacing: 0.18em;
    text-align: center;
    text-transform: uppercase;
  }

  .nav {
    position: sticky;
    top: 0;
    z-index: 80;
    overflow-x: auto;
    background: var(--rustler-ink);
    color: #f7f4ec;
  }

  .nav .wrap {
    display: flex;
    align-items: center;
    font: 800 0.71rem var(--rustler-sans);
    letter-spacing: 0.08em;
  }

  .nav a {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0 16px;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .article-wrap {
    width: min(790px, calc(100% - 40px));
    margin: auto;
  }

  .back {
    display: inline-block;
    margin-top: 20px;
    font: 700 0.74rem var(--rustler-sans);
    letter-spacing: 0.09em;
    text-transform: uppercase;
  }

  .article-head {
    padding: 46px 0 25px;
    border-bottom: 1px solid var(--rustler-line);
  }

  .article-head h1 {
    margin: 8px 0 13px;
    color: var(--rustler-ink);
    font: 700 clamp(2.65rem, 6vw, 5.3rem) / 0.91 var(--rustler-serif);
    letter-spacing: -0.035em;
  }

  .kicker {
    margin: 0 0 7px;
    color: var(--rustler-rust);
    font: 900 0.65rem var(--rustler-sans);
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .deck {
    max-width: 44rem;
    margin: 0;
    color: #3d4e5c;
    font-size: 1.22rem;
    line-height: 1.36;
  }

  .footer {
    margin-top: 58px;
    padding: 34px 0 46px;
    background: var(--rustler-ink);
    color: #d9e2df;
    font: 0.78rem var(--rustler-sans);
  }

  .footer strong {
    color: #fff;
    font: 1.2rem var(--rustler-serif);
  }

  @media (max-width: 680px) {
    .reader-actions .wrap {
      justify-content: center;
    }

    .reader-action {
      flex: 1 1 31%;
      padding: 9px 5px;
      font-size: 0.58rem;
      letter-spacing: 0.045em;
      text-align: center;
    }

    .masthead,
    .masthead > a:first-child {
      min-height: 100px;
    }

    .masthead > a:first-child::after {
      font-size: clamp(3.45rem, 19vw, 5.9rem);
    }

    .nav .wrap {
      width: max-content;
    }
  }
}

:root {
  --gallery-accent: var(--gold, #b78645);
  --gallery-ink: var(--ink, #24170f);
  --gallery-muted: var(--muted, #6f675e);
  --gallery-paper: var(--paper, #fffdf8);
  --gallery-rule: #d9d1c4;
}

.panel-gallery-page {
  width: min(1540px, calc(100% - 32px));
}

.panel-gallery-page .article-head {
  max-width: 1040px;
}

.panel-gallery-page .article-head h1 {
  max-width: 18ch;
}

.gallery-source-note {
  display: grid;
  gap: 0.48rem;
  max-width: 1040px;
  margin: 0 auto clamp(2rem, 4vw, 3.5rem);
  padding: 1rem 1.1rem;
  border-top: 1px solid var(--gallery-rule);
  border-bottom: 1px solid var(--gallery-rule);
  border-left: 4px solid var(--gallery-accent);
  background: #f8f5ed;
  color: #403a34;
  font: 0.94rem/1.5 Arial, Helvetica, sans-serif;
}

.gallery-source-note p {
  margin: 0;
}

.gallery-source-note a {
  font-weight: 700;
}

.panel-gallery {
  display: grid;
  gap: clamp(2rem, 5vw, 4.5rem);
  padding-bottom: 4rem;
}

.panel-pair {
  padding-top: 0.9rem;
  border-top: 1px solid var(--gallery-rule);
}

.panel-number,
.language-label {
  font-family: Arial, Helvetica, sans-serif;
}

.panel-number {
  margin: 0 0 0.75rem;
  color: var(--gallery-muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.panel-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.85rem, 2vw, 1.5rem);
  align-items: start;
}

.panel {
  min-width: 0;
  margin: 0;
}

.language-label {
  display: block;
  margin-bottom: 0.42rem;
  color: var(--gallery-ink);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.panel a {
  display: block;
  background: #fff;
  box-shadow: 0 8px 22px rgb(36 23 15 / 13%);
}

.panel img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  background: #fff;
}

.panel a:focus-visible {
  outline: 4px solid var(--gallery-accent);
  outline-offset: 4px;
}

@media (max-width: 680px) {
  .panel-gallery-page {
    width: min(100% - 16px, 1540px);
  }

  .panel-gallery-page .article-head,
  .gallery-source-note {
    width: calc(100% - 16px);
  }

  .panel-columns {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

@media print {
  .reader-actions,
  .masthead,
  .local-line,
  .nav,
  .back,
  .footer {
    display: none !important;
  }

  .panel-pair {
    break-inside: avoid;
  }

  .panel a {
    box-shadow: none;
  }
}
