:root {
  color-scheme: dark;
  --night: #10150f;
  --forest: #182218;
  --forest-glass: rgba(13, 22, 15, .79);
  --forest-soft: rgba(26, 39, 26, .82);
  --moss: #65734a;
  --moss-light: #9da979;
  --gold: #c7a96a;
  --gold-bright: #ead39a;
  --cream: #e9e0c9;
  --muted: #c1b99f;
  --rust: #8f513c;
  --line: rgba(199, 169, 106, .48);
  --sidebar-width: clamp(205px, 19vw, 265px);
  --shell-width: 1580px;
  --gap: clamp(12px, 1.5vw, 24px);
  --serif: Georgia, "Palatino Linotype", "Book Antiqua", serif;
  --sans: "Trebuchet MS", Verdana, sans-serif;
  --gothic: "UnifrakturMaguntia", "Old English Text MT", fantasy;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: #7b8055 #151b13;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--cream);
  background: var(--night);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.58;
}

a {
  color: var(--gold-bright);
  text-underline-offset: 3px;
}

a:hover,
a:focus-visible {
  color: #fff2c8;
}

a:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 4px;
}

/* =========================================================
   BACKGROUND AND SITE SHELL
   ========================================================= */

.forest-backdrop {
  min-height: 100vh;
  padding: clamp(10px, 1.4vh, 18px) clamp(10px, 1.5vw, 26px);
  background:
    linear-gradient(rgba(5, 10, 6, .08), rgba(5, 10, 6, .28)),
    url("images/forest-layout.png") center center / cover fixed no-repeat,
    #10150f;
}

.site-shell {
  width: min(100%, var(--shell-width));
  min-height: 590px;
  max-height: 1180px;
  height: calc(100vh - clamp(20px, 2.8vh, 36px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(205, 175, 105, .7);
  outline: 1px solid rgba(9, 12, 8, .9);
  outline-offset: 3px;
  background: rgba(9, 15, 10, .52);
  box-shadow:
    0 18px 60px rgba(0, 0, 0, .7),
    inset 0 0 0 5px rgba(12, 18, 12, .72);
}

/* =========================================================
   SITE TITLE — VICTORIAN GOTHIC
   ========================================================= */

.page-heading {
  position: relative;
  margin: 0 0 24px;
  padding: 12px 10px 18px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(
      ellipse at center,
      rgba(101, 115, 74, .15),
      transparent 72%
    );
}

.page-heading::before,
.page-heading::after {
  display: block;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: .28em;
  opacity: .8;
}

.page-heading::before {
  content: "❦  ✧  ❦";
  margin-bottom: 8px;
}

.page-heading::after {
  content: "✧  ❦  ✧";
  margin-top: 10px;
}

.page-heading .eyebrow {
  margin: 0 0 10px;
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: .78rem;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.page-heading h1 {
  margin: 0;
  color: #f0e6ca;
  font-family: var(--gothic);
  font-size: clamp(3rem, 5.4vw, 5.2rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: .025em;
  text-shadow:
    0 3px 8px #000,
    0 0 18px rgba(199, 169, 106, .22);
}

.page-heading h1 span {
  color: var(--gold-bright);
  font-family: var(--gothic);
  font-style: normal;
}

.tagline {
  margin: 10px 0 0;
  color: #e2d8bd;
  font: .88rem var(--serif);
  letter-spacing: .16em;
}

.ornament {
  margin-top: 8px;
  color: var(--gold);
  font-size: .82rem;
  letter-spacing: .12em;
}

/* =========================================================
   MAIN LAYOUT
   ========================================================= */

.site-layout {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: var(--gap);
  padding: clamp(12px, 1.6vw, 24px);
}

.sidebar {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #6c754e transparent;
  padding: 8px 8px 16px;
}

.sidebar-inner {
  min-height: 100%;
  padding: clamp(12px, 1.35vw, 21px);
  border: 1px solid var(--line);
  background:
    linear-gradient(
      145deg,
      rgba(16, 27, 17, .84),
      rgba(10, 17, 11, .80)
    );
  box-shadow:
    inset 0 0 0 4px rgba(177, 146, 81, .06),
    0 8px 22px #0005;
}

.sidebar-heading {
  margin: 0 0 12px;
  color: var(--gold-bright);
  font: 1.12rem var(--serif);
  text-align: center;
}

.sidebar-heading span {
  display: block;
  color: var(--gold);
  font-size: 1.4rem;
}

.main-nav {
  display: grid;
  gap: 5px;
}

.nav-link {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 7px 9px;
  border: 1px solid transparent;
  color: var(--cream);
  text-decoration: none;
  font-size: .9rem;
  line-height: 1.3;
  transition: background .18s ease, border-color .18s ease;
}

.nav-link span {
  width: 16px;
  flex: 0 0 16px;
  color: var(--gold);
  text-align: center;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active {
  background: rgba(119, 127, 77, .17);
  border-color: rgba(199, 169, 106, .38);
  color: #fff0c7;
}

.sidebar-rule {
  margin: 18px 0;
  color: var(--gold);
  text-align: center;
  font-size: .9rem;
  letter-spacing: .18em;
}

.sidebar-card {
  margin-top: 13px;
  padding: 12px;
  border: 1px solid rgba(199, 169, 106, .28);
  background: rgba(3, 8, 4, .3);
}

.sidebar-card h2 {
  margin: 0 0 7px;
  color: var(--gold-bright);
  font: 1.05rem var(--serif);
}

.sidebar-card p {
  margin: 4px 0;
  color: var(--muted);
  font-size: .85rem;
}

.sidebar-card strong {
  color: var(--cream);
  font: 1rem var(--serif);
}

.sidebar-card a {
  display: block;
  margin: 5px 0;
  font-size: .88rem;
}

.sidebar-card .small-note {
  margin-top: 9px;
  font-size: .8rem;
}

.sidebar-flourish {
  margin-top: 17px;
  color: var(--gold);
  text-align: center;
  font-size: 2rem;
  opacity: .7;
}

/* =========================================================
   CONTENT WINDOW
   ========================================================= */

.content-window {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(199, 169, 106, .74);
  background: var(--forest-glass);
  box-shadow:
    0 8px 28px #0008,
    inset 0 0 0 4px rgba(199, 169, 106, .045);
}

.window-bar {
  flex: 0 0 35px;
  display: grid;
  grid-template-columns: 70px 1fr 35px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(
      90deg,
      rgba(41, 51, 38, .88),
      rgba(24, 34, 25, .82) 60%,
      rgba(37, 41, 26, .87)
    );
  color: var(--gold-bright);
}

.window-lights {
  display: flex;
  gap: 5px;
}

.window-lights i {
  display: block;
  width: 8px;
  height: 8px;
  border: 1px solid #bca56f;
  border-radius: 50%;
  background: #596044;
}

.window-lights i:first-child {
  background: #8d573d;
}

.window-lights i:nth-child(2) {
  background: #b09551;
}

.window-title {
  text-align: center;
  font: italic .94rem var(--serif);
  letter-spacing: .06em;
}

.window-top {
  display: grid;
  place-items: center;
  justify-self: end;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  color: var(--gold-bright);
  text-decoration: none;
  font-size: 1.2rem;
}

.content-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #8a8659 #101710;
  scroll-padding-top: 14px;
}

.content-scroll::-webkit-scrollbar,
.sidebar::-webkit-scrollbar {
  width: 10px;
}

.content-scroll::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track {
  background: #101710;
}

.content-scroll::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb {
  border: 2px solid #101710;
  border-radius: 8px;
  background: #777850;
}

.content-inner {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: clamp(16px, 2.2vw, 32px);
}

/* =========================================================
   WELCOME PANEL
   ========================================================= */

.welcome-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(210px, .85fr);
  gap: clamp(16px, 2.5vw, 32px);
  align-items: center;
  padding: clamp(16px, 2vw, 27px);
  border: 1px solid rgba(199, 169, 106, .54);
  background:
    linear-gradient(
      120deg,
      rgba(34, 47, 31, .74),
      rgba(11, 19, 12, .78)
    );
  box-shadow: inset 0 0 0 4px rgba(199, 169, 106, .035);
}

.welcome-copy h2 {
  margin: 0 0 12px;
  color: #f0e5c9;
  font: 500 clamp(1.7rem, 2.6vw, 2.5rem)/1.15 var(--serif);
}

.welcome-copy p:not(.eyebrow) {
  margin: 0 0 11px;
  color: #d8d0b9;
  font-size: .96rem;
}

.button-link {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  margin-top: 6px;
  padding: 8px 13px;
  border: 1px solid var(--gold);
  background: rgba(115, 112, 66, .22);
  color: var(--gold-bright);
  font: .95rem var(--serif);
  text-decoration: none;
}

.button-link:hover {
  background: rgba(158, 143, 82, .28);
}

.welcome-art {
  min-width: 0;
  margin: 0;
  padding: 6px;
  border: 1px solid var(--gold);
  background: #0a100b;
  box-shadow: 0 8px 22px #0007;
}

.welcome-art img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  filter: saturate(.82) brightness(.86);
}

.welcome-art figcaption {
  padding: 7px 4px 2px;
  color: var(--gold-bright);
  font: italic .9rem var(--serif);
  text-align: center;
}

/* =========================================================
   SECTION DIVIDERS AND HEADINGS
   ========================================================= */

.section-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 22px 0;
  color: var(--gold);
  text-align: center;
}

.section-divider::before,
.section-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line));
}

.section-divider::after {
  transform: scaleX(-1);
}

.section-divider span {
  white-space: nowrap;
  letter-spacing: .15em;
}

.page-section {
  scroll-margin-top: 14px;
}

.section-heading {
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr) 35px;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  color: var(--gold);
  text-align: center;
}

.section-heading > span {
  font-size: 1.6rem;
}

.section-heading .eyebrow {
  margin-bottom: 2px;
  font-size: .7rem;
}

.section-heading h2 {
  margin: 0;
  color: var(--cream);
  font: 500 clamp(1.45rem, 2.1vw, 2rem)/1.2 var(--serif);
}

.section-intro {
  max-width: 790px;
  margin: 0 auto 20px;
  color: var(--muted);
  text-align: center;
  font-size: .94rem;
}

/* =========================================================
   FEATURE CARDS
   ========================================================= */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.feature-card {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(199, 169, 106, .36);
  background:
    linear-gradient(
      145deg,
      rgba(34, 45, 29, .66),
      rgba(10, 17, 11, .80)
    );
  box-shadow: 0 5px 14px #0003;
  transition: transform .18s ease, border-color .18s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  border-color: rgba(221, 194, 127, .75);
}

.feature-image {
  position: relative;
  min-height: 105px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2px;
  overflow: hidden;
  border: 1px solid rgba(199, 169, 106, .46);
  background:
    radial-gradient(
      ellipse at 50% 110%,
      rgba(137, 127, 71, .35),
      transparent 57%
    ),
    linear-gradient(145deg, #253324, #0c130d 68%);
  color: var(--gold);
}

.feature-image::before,
.feature-image::after {
  content: "";
  position: absolute;
  width: 95px;
  height: 95px;
  border: 1px solid rgba(199, 169, 106, .15);
  border-radius: 50%;
}

.feature-image::before {
  transform: scaleX(1.5);
}

.feature-image::after {
  width: 65px;
  height: 65px;
}

.feature-image span {
  z-index: 1;
  font: 2.3rem/1 var(--serif);
  text-shadow: 0 2px 8px #000;
}

.feature-image small {
  z-index: 1;
  color: #d6c79e;
  font: italic .78rem var(--serif);
  text-align: center;
}

.catz-card .feature-image {
  background:
    radial-gradient(
      ellipse at 50% 110%,
      rgba(100, 114, 132, .35),
      transparent 57%
    ),
    linear-gradient(145deg, #28313a, #0c1214 68%);
}

.pennyroyal-card .feature-image {
  background:
    radial-gradient(
      ellipse at 50% 110%,
      rgba(142, 75, 58, .36),
      transparent 57%
    ),
    linear-gradient(145deg, #34251f, #110e0b 68%);
}

.farm-card .feature-image {
  background:
    radial-gradient(
      ellipse at 50% 110%,
      rgba(127, 120, 61, .36),
      transparent 57%
    ),
    linear-gradient(145deg, #303323, #10150d 68%);
}

.minty-card .feature-image {
  background:
    radial-gradient(
      ellipse at 50% 110%,
      rgba(83, 112, 77, .36),
      transparent 57%
    ),
    linear-gradient(145deg, #233426, #0c130d 68%);
}

.links-card .feature-image {
  background:
    radial-gradient(
      ellipse at 50% 110%,
      rgba(121, 93, 62, .36),
      transparent 57%
    ),
    linear-gradient(145deg, #30271d, #100f0b 68%);
}

.feature-card h3 {
  margin: 10px 0 4px;
  color: var(--gold-bright);
  font: 1.18rem var(--serif);
}

.feature-card p {
  min-height: 44px;
  margin: 0 0 8px;
  color: #d0c8b2;
  font-size: .87rem;
  line-height: 1.5;
}

.text-link {
  font-size: .88rem;
}

/* =========================================================
   LIBRARY AND OVERWRITING FILES
   ========================================================= */

.library-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 11px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.mini-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid var(--line);
  color: var(--gold);
}

.library-heading h3 {
  margin: 0;
  color: var(--cream);
  font: 1.3rem var(--serif);
}

.library-heading p {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: .86rem;
}

.overwrite-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.overwrite-card {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid rgba(199, 169, 106, .3);
  background: rgba(4, 9, 5, .24);
}

.overwrite-card h4 {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 5px 12px;
  margin: 0 0 8px;
  padding-bottom: 7px;
  border-bottom: 1px dotted rgba(199, 169, 106, .35);
  font: 1.08rem var(--serif);
}

.overwrite-card h4 span {
  color: var(--muted);
  font: .75rem var(--sans);
}

.overwrite-card ul {
  columns: 2;
  column-gap: 22px;
  margin: 0;
  padding-left: 18px;
  color: #d5cdb6;
  font-size: .86rem;
}

.overwrite-card li {
  break-inside: avoid;
  padding: 1px 0;
}

.single-feature {
  grid-template-columns: minmax(0, 1fr);
}

.single-feature .overwrite-card ul {
  columns: 2;
}

.second-heading {
  margin-top: 27px;
}

.last-updated {
  margin: 22px 0 0;
  color: var(--gold);
  text-align: center;
  font: italic .9rem var(--serif);
}

/* =========================================================
   FOOTER
   ========================================================= */

.content-end {
  margin-top: 26px;
  padding: 20px 10px 8px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.content-end span {
  color: var(--gold);
  font-size: 1.7rem;
}

.content-end p {
  margin: 2px 0 7px;
  color: var(--muted);
  font: italic 1rem var(--serif);
}

.content-end a {
  font-size: .86rem;
}

/* =========================================================
   LARGE SCREENS
   ========================================================= */

@media (min-width: 1500px) {
  .content-inner {
    padding: 30px 38px;
  }

  .feature-grid {
    gap: 16px;
  }

  .feature-card {
    padding: 12px;
  }

  .feature-image {
    min-height: 125px;
  }
}

/* =========================================================
   TABLETS
   ========================================================= */

@media (max-width: 1000px) {
  :root {
    --sidebar-width: 205px;
    --gap: 12px;
  }

  .site-layout {
    padding: 12px;
  }

  .sidebar-inner {
    padding: 18px;
  }

  .content-inner {
    padding: 18px;
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .welcome-panel {
    grid-template-columns: minmax(0, 1fr) minmax(175px, .72fr);
  }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {
  .forest-backdrop {
    padding: 0;
    background-attachment: scroll;
  }

  .site-shell {
    width: 100%;
    height: auto;
    min-height: 100vh;
    max-height: none;
    border-left: 0;
    border-right: 0;
    outline: 0;
  }

  .page-heading {
    margin-bottom: 18px;
    padding: 10px 5px 14px;
  }

  .page-heading h1 {
    font-size: clamp(2.8rem, 12vw, 4.2rem);
  }

  .page-heading .eyebrow {
    font-size: .7rem;
    letter-spacing: .13em;
  }

  .tagline {
    font-size: .8rem;
    letter-spacing: .09em;
  }

  .site-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 10px;
  }

  .sidebar {
    overflow: visible;
  }

  .sidebar-inner {
    padding: 18px;
  }

  .nav-block {
    display: block;
  }

  .main-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .nav-link {
    padding: 8px 6px;
    font-size: .83rem;
  }

  .sidebar-rule,
  .sidebar-flourish {
    display: none;
  }

  .sidebar-card {
    display: none;
  }

  .content-window {
    min-height: 0;
  }

  .window-bar {
    position: sticky;
    top: 0;
    z-index: 2;
  }

  .content-scroll {
    overflow: visible;
  }

  .content-inner {
    padding: 13px;
  }

  .welcome-panel {
    grid-template-columns: minmax(0, 1fr);
    padding: 14px;
  }

  .welcome-art {
    max-width: 460px;
    width: 100%;
    margin: 0 auto;
  }

  .welcome-art img {
    aspect-ratio: 16 / 9;
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .feature-card {
    padding: 8px;
  }

  .feature-image {
    min-height: 92px;
  }

  .feature-card p {
    min-height: 0;
  }

  .overwrite-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .overwrite-card ul,
  .single-feature .overwrite-card ul {
    columns: 2;
  }
}

/* =========================================================
   VERY NARROW MOBILE
   ========================================================= */

@media (max-width: 390px) {
  .main-nav {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-heading h1 {
    font-size: clamp(2.5rem, 13vw, 3.4rem);
  }

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

  .feature-image {
    min-height: 110px;
  }

  .section-heading {
    grid-template-columns: 22px minmax(0, 1fr) 22px;
  }

  .section-heading > span {
    font-size: 1.25rem;
  }

  .overwrite-card ul,
  .single-feature .overwrite-card ul {
    columns: 1;
  }
}

/* =========================================================
   SHORT DESKTOP VIEWPORTS
   ========================================================= */

@media (max-height: 720px) and (min-width: 701px) {
  .site-shell {
    min-height: 0;
  }

  .page-heading {
    margin-bottom: 16px;
    padding-top: 5px;
    padding-bottom: 12px;
  }

  .page-heading::before {
    margin-bottom: 3px;
  }

  .page-heading::after {
    margin-top: 4px;
  }

  .page-heading h1 {
    font-size: clamp(2.8rem, 4vw, 3.8rem);
  }

  .site-layout {
    padding: 10px;
  }

  .content-inner {
    padding: 16px 22px;
  }

  .welcome-panel {
    padding: 14px;
  }

  .welcome-copy h2 {
    font-size: 1.8rem;
  }

  .welcome-art img {
    aspect-ratio: 16 / 9;
  }

  .feature-image {
    min-height: 85px;
  }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* =========================================================
   DESKTOP LAYOUT — BACKGROUND IMAGE AS THE FRAME
   ========================================================= */

@media (min-width: 701px) {
  html,
  body {
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
  }

  .forest-backdrop {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 620px;
    padding: 0;
    overflow: hidden;
    background:
      linear-gradient(
        rgba(3, 7, 4, .04),
        rgba(3, 7, 4, .04)
      ),
      url("images/forest-layout.png") center center / 100% 100% no-repeat,
      #10150f;
  }

  .site-shell {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    margin: 0;
    display: block;
    border: 0;
    outline: 0;
    background: transparent;
    box-shadow: none;
  }

  .site-layout {
    position: absolute;
    inset: 0;
    display: block;
    padding: 0;
    min-height: 0;
  }

  /*
    NAVIGATION FRAME ADJUSTMENT

    Moved farther down and inward.
    Reduced width and height to prevent the sidebar
    overlapping the ornamental border.
  */
  .sidebar {
    position: absolute;
    left: calc(3.1% + 25px);
    top: calc(13% + 60px);
    width: calc(15.2% - 35px);
    height: calc(64% - 24px);
    min-height: 0;
    padding: 16px;
    overflow: auto;
    scrollbar-color: #82734b transparent;
    background: transparent;
  }

  .sidebar-inner {
    min-height: 100%;
    padding: clamp(8px, .8vw, 14px);
    border: 0;
    background: rgba(7, 15, 8, .24);
    box-shadow: none;
  }

  .sidebar-heading {
    font-size: clamp(.85rem, 1vw, 1.05rem);
  }

  .nav-link {
    gap: 6px;
    padding: 5px 4px;
    font-size: clamp(.72rem, .78vw, .85rem);
  }

  .nav-link span {
    width: 14px;
    flex-basis: 14px;
  }

  .sidebar-card {
    background: rgba(4, 9, 5, .18);
  }

  /* Main content remains in its original position. */
  .content-window {
    position: absolute;
    left: 19.2%;
    top: 11%;
    width: 63.8%;
    height: 77%;
    min-height: 0;
    border: 1px solid rgba(199, 169, 106, .58);
    background: rgba(5, 13, 7, .27);
    box-shadow: none;
  }

  .window-bar {
    background: rgba(16, 27, 17, .42);
    border-bottom-color: rgba(199, 169, 106, .42);
  }

  .content-scroll {
    background: rgba(4, 10, 5, .13);
  }

  .content-inner {
    padding: clamp(14px, 1.7vw, 28px);
  }

  .page-heading {
    background:
      radial-gradient(
        ellipse at center,
        rgba(101, 115, 74, .12),
        transparent 72%
      );
  }

  .welcome-panel {
    background: rgba(12, 23, 13, .36);
    backdrop-filter: blur(1px);
  }

  .feature-card {
    background: rgba(8, 16, 9, .40);
  }

  .feature-image {
    background-color: rgba(9, 17, 10, .35);
  }

  .overwrite-card {
    background: rgba(4, 9, 5, .18);
  }
}

/* =========================================================
   MOBILE BACKGROUND
   ========================================================= */

@media (max-width: 700px) {
  html,
  body {
    height: auto;
    min-height: 100%;
    overflow: auto;
  }

  .forest-backdrop {
    min-height: 100vh;
    background:
      linear-gradient(
        rgba(5, 10, 6, .16),
        rgba(5, 10, 6, .28)
      ),
      url("images/forest-layout.png") center top / auto 100vh repeat-y,
      #10150f;
  }
}

/* =========================================================
   CALAMINT GROVE — PET CARDS & OVERWRITING FILE LIBRARY
   Dark Victorian Woodland theme additions.
   Add to the END of the existing stylesheet.
   
   Preserves the new site layout and existing page styling.
   ========================================================= */


/* =========================================================
   PET VIEWER — BREED DIRECTORY
   ========================================================= */

#breedlist {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

#breedlist .breed-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;

  flex: 0 1 auto;
  width: fit-content;
  max-width: 180px;
  min-width: 0;
  min-height: 36px;

  padding: 6px 9px;

  background: var(--forest-soft);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);

  color: var(--cream);
  font: 700 14px/1.4 var(--sans);
  text-align: left;
  text-decoration: none;
  overflow-wrap: anywhere;

  transition:
    background-color .15s ease,
    color .15s ease,
    border-color .15s ease;
}

#breedlist .breed-link::before {
  content: "»";
  flex: 0 0 auto;
  color: var(--gold);
}

#breedlist .breed-link:hover {
  background: rgba(101, 115, 74, .32);
  border-color: var(--gold-bright);
  color: var(--gold-bright);
}

#breedlist .breed-link.is-active {
  background: var(--moss);
  border-color: var(--gold-bright);
  border-left-color: var(--gold-bright);
  color: #fff4d7;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, .25);
}

#breedlist .breed-link.is-active::before {
  color: var(--gold-bright);
}

#breedlist .breed-link:focus-visible {
  z-index: 1;
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
}


/* =========================================================
   PET VIEWER — SECTION AND SELECTED BREED
   ========================================================= */

#content {
  display: block;
  width: 100%;
  min-width: 0;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

#content h1 {
  margin: 0 0 18px;
  color: var(--gold-bright);
  font: 500 clamp(20px, 3vw, 26px)/1.3 var(--serif);
  text-align: left;
  text-transform: none;
}

#content.pet-content {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.pet-viewer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;

  margin: 0 0 20px;
  padding: 12px 14px;

  background:
    linear-gradient(
      135deg,
      rgba(101, 115, 74, .35),
      rgba(13, 22, 15, .88)
    );

  border: 3px double var(--gold);
  outline: 1px solid var(--line);
  outline-offset: -5px;

  box-shadow: 3px 3px 0 rgba(0, 0, 0, .25);
  color: var(--cream);
}

.pet-viewer-heading-text {
  min-width: 0;
}

.pet-viewer-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--gold);
  font: 700 10px/1.4 var(--sans);
  letter-spacing: 1.2px;
  overflow-wrap: anywhere;
}

.pet-viewer-heading h1 {
  margin: 0 !important;
  color: var(--cream) !important;
  font: 500 clamp(21px, 3vw, 27px)/1.2 var(--serif) !important;
  text-align: left !important;
  overflow-wrap: anywhere;
}

.pet-viewer-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 32px;
  padding: 6px 9px;

  background: var(--night);
  border: 1px solid var(--gold);
  color: var(--gold-bright);
  font: 700 12px/1.3 var(--sans);
  white-space: nowrap;
}


/* =========================================================
   PET GALLERY
   ========================================================= */

.pet-gallery {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;

  width: 100%;
  min-width: 0;
}


/* =========================================================
   PET CARDS — PARCHMENT AND ANTIQUE GOLD
   ========================================================= */

.pet-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;

  flex: 0 1 auto;
  width: max-content;
  max-width: 100%;
  min-width: 0;
  align-self: flex-start;

  padding: 5px;
  overflow: hidden;

  background:
    repeating-linear-gradient(
      0deg,
      rgba(102, 81, 59, .035) 0,
      rgba(102, 81, 59, .035) 1px,
      transparent 1px,
      transparent 4px
    ),
    var(--cream);

  border: 3px double var(--gold);
  outline: 1px solid rgba(199, 169, 106, .25);
  outline-offset: -2px;

  box-shadow:
    3px 3px 0 rgba(0, 0, 0, .3),
    inset 0 0 0 1px rgba(255, 255, 255, .25);

  text-align: center;

  transition:
    border-color .15s ease,
    box-shadow .15s ease,
    transform .15s ease;
}

.pet-card::before,
.pet-card::after {
  position: absolute;
  z-index: 2;
  width: 12px;
  height: 12px;
  color: var(--brown);
  font: 12px/1 var(--serif);
  pointer-events: none;
}

.pet-card::before {
  content: "❦";
  top: 5px;
  left: 6px;
}

.pet-card::after {
  content: "❦";
  right: 6px;
  bottom: 5px;
}

.pet-card:hover {
  border-color: var(--gold-bright);
  box-shadow:
    4px 4px 0 rgba(0, 0, 0, .38),
    inset 0 0 0 1px rgba(255, 255, 255, .45);
  transform: translateY(-2px);
}


/* =========================================================
   PET IMAGE FRAME
   ========================================================= */

.pet-card-image {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;

  width: fit-content;
  max-width: 100%;
  min-width: 0;
  min-height: 0;

  align-self: center;
  flex: 0 0 auto;

  padding: 12px;

  background:
    radial-gradient(
      circle at 50% 45%,
      rgba(255, 255, 255, .42),
      transparent 70%
    ),
    #d9d0b5;

  border: 1px solid rgba(102, 81, 59, .48);
  outline: 1px dotted rgba(102, 81, 59, .5);
  outline-offset: -5px;
}

.pet-card-image img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: none;
  object-fit: contain;
  object-position: center;
  margin: 0 auto;
  flex: 0 1 auto;
}

.pet-card-image::after {
  content: "✧  ❦  ✧";
  position: absolute;
  right: 8px;
  bottom: 5px;
  color: rgba(102, 81, 59, .7);
  font: 11px/1 var(--serif);
  letter-spacing: 2px;
  pointer-events: none;
}


/* =========================================================
   PET CARD DETAILS
   ========================================================= */

.pet-card-details {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;

  contain: inline-size;
  flex: 0 0 auto;

  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;

  margin-top: 5px;
  padding: 12px 9px 14px;

  background:
    linear-gradient(
      145deg,
      rgba(32, 45, 31, .96),
      rgba(17, 27, 18, .98)
    );

  border: 1px solid rgba(199, 169, 106, .3);
}


/* Pet name */

.pet-card .pet-name {
  position: relative;
  flex: 0 0 100%;

  width: 100%;
  min-width: 0;
  max-width: 100%;

  margin: 0;
  padding: 0 0 9px;

  color: var(--cream);
  font: 700 16px/1.35 var(--serif);
  text-align: center;

  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;

  border-bottom: 1px dotted rgba(199, 169, 106, .38);
}

.pet-card .pet-name::after {
  content: "❧";
  position: absolute;
  bottom: -8px;
  left: 50%;
  padding: 0 5px;

  background: #19251a;
  color: var(--gold);
  font: 14px/1 var(--serif);

  transform: translateX(-50%);
}


/* =========================================================
   PET DETAILS — GENDER, BREED AND ORIGIN TAGS
   ========================================================= */

.pet-gender,
.pet-breed,
.pet-origin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 auto;

  width: fit-content;
  min-width: 0;
  max-width: 100%;

  margin: 0;
  padding: 4px 8px;

  border: 1px solid;
  border-radius: 2px;

  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}


/* Gender and breed */

.pet-gender,
.pet-breed {
  background: #293629;
  border-color: rgba(157, 169, 121, .55);
  color: #ddd6bf;

  font: 700 12px/1.4 var(--sans);
}

/* Female */

.pet-gender.gender-female {
  background: #392b2b;
  border-color: #86605c;
  color: #e0c2b8;
}

/* Male */

.pet-gender.gender-male {
  background: #29372e;
  border-color: #647d68;
  color: #c7d4c1;
}

/* Breed */

.pet-breed {
  background: #343727;
  border-color: #8c8054;
  color: #e0d2a7;
}


/* Origin */

.pet-origin {
  padding: 4px 9px;

  font-family: var(--sans);
  font-size: .85rem;
  line-height: 1.3;
  letter-spacing: .03em;

  box-shadow: none;
}

/* Bred here */

.pet-origin.origin-bred {
  background: #293629;
  border-color: #71815b;
  color: #c9d2b3;
}

/* Adopted */

.pet-origin.origin-adopted {
  background: #392f25;
  border-color: #8e7550;
  color: #dfcba5;
}


/* =========================================================
   BREEDER CREDITS
   ========================================================= */

.pet-card .pet-breeder {
  display: block;
  flex: 0 0 100%;

  width: 100%;
  min-width: 0;
  max-width: 100%;

  margin: 0;
  padding-top: 8px;

  border-top: 1px dotted rgba(199, 169, 106, .32);

  color: #bdb69e;
  font: italic 13px/1.5 var(--sans);

  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}

.pet-card .pet-breeder a {
  max-width: 100%;

  color: var(--gold-bright);
  text-decoration-color: rgba(199, 169, 106, .55);

  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.pet-card .pet-breeder a:hover {
  color: #f0e5c9;
}

.pet-breeder-label {
  font-weight: 700;
}

.pet-breeder-name {
  min-width: 0;
  max-width: 100%;

  font-weight: 400;
  overflow-wrap: anywhere;
}


/* =========================================================
   EMPTY PET COLLECTION
   ========================================================= */

.pet-viewer-empty {
  width: 100%;
  margin: 0;
  padding: 18px;

  background: rgba(20, 31, 21, .9);
  border: 1px dashed rgba(199, 169, 106, .65);

  color: var(--muted);
  font: italic 15px/1.6 var(--serif);
  text-align: center;
}


/* =========================================================
   OVERWRITING FILE LIBRARY
   ========================================================= */

.overwrite-library {
  width: 100%;
  min-width: 0;
}


/* Introduction */

.overwrite-library .overwrite-intro {
  margin: 0 0 24px;

  color: var(--cream);
  font-size: 15px;
  line-height: 1.7;
}


/* Groups */

.overwrite-library .overwrite-group {
  margin: 0 0 30px;
}

.overwrite-library .overwrite-group:last-of-type {
  margin-bottom: 20px;
}


/* Group headings */

.overwrite-library .overwrite-group-heading {
  display: flex;
  align-items: center;
  gap: 12px;

  margin: 0 0 14px;
  padding: 10px 12px;

  background:
    linear-gradient(
      120deg,
      rgba(101, 115, 74, .55),
      rgba(13, 22, 15, .92)
    );

  color: var(--cream);
  border: 1px solid var(--gold);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .25);
}

.overwrite-library .overwrite-heading-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;

  width: 34px;
  height: 34px;

  background: var(--cream);
  color: var(--forest);
  border: 1px solid var(--gold);

  font-size: 22px;
  line-height: 1;
}

.overwrite-library .overwrite-group-heading h3 {
  margin: 0;

  color: var(--gold-bright);
  font: 700 19px/1.3 var(--serif);
  text-align: left;
}

.overwrite-library .overwrite-group-heading p {
  margin: 3px 0 0;

  color: var(--muted);
  font: 14px/1.5 var(--sans);
}


/* =========================================================
   OVERWRITING LIBRARY — CREATOR GRID
   ========================================================= */

.overwrite-library .overwrite-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 14px;

  width: 100%;
  min-width: 0;
}


/* Creator cards */

.overwrite-library .overwrite-card {
  display: flex;
  flex-direction: column;

  min-width: 0;
  max-width: 100%;
  padding: 0;

  background: var(--forest-soft);
  border: 1px solid var(--line);

  box-shadow: 3px 3px 0 rgba(0, 0, 0, .22);

  transition:
    box-shadow .15s ease,
    border-color .15s ease;
}

.overwrite-library .overwrite-card:hover {
  border-color: var(--gold-bright);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .32);
}


/* Creator name bar */

.overwrite-library .overwrite-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  min-width: 0;
  padding: 12px 13px;

  background: rgba(101, 115, 74, .25);
  border-bottom: 1px solid var(--line);
}

.overwrite-library .overwrite-card-header > div {
  min-width: 0;
}


/* Creator name */

.overwrite-library .overwrite-card h4 {
  margin: 0;

  color: var(--gold-bright);
  font: 700 18px/1.3 var(--serif);
  text-align: left;

  overflow-wrap: anywhere;
}

.overwrite-library .overwrite-card h4 a {
  color: var(--gold-bright);

  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.overwrite-library .overwrite-card h4 a:hover {
  color: #fff4d7;
  background: rgba(101, 115, 74, .25);
}

.overwrite-library .overwrite-card h4 a:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}


/* Creator file count */

.overwrite-library .overwrite-count {
  margin: 4px 0 0;

  color: var(--muted);
  font: 13px/1.4 var(--sans);
}


/* Creator symbol */

.overwrite-library .overwrite-card-symbol {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;

  width: 34px;
  height: 34px;

  background: var(--forest);
  border: 1px solid var(--line);
  color: var(--gold);

  font-size: 19px;
  line-height: 1;
}


/* =========================================================
   OVERWRITING LIBRARY — FILE LISTS
   ========================================================= */

.overwrite-library .overwrite-files {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 6px;

  flex: 1;
  min-width: 0;

  margin: 0 !important;
  padding: 12px !important;

  background: transparent !important;
  border: 0 !important;
  list-style: none;
}

.overwrite-library .overwrite-files li {
  display: flex;
  align-items: flex-start;

  min-width: 0;
  margin: 0;
  padding: 7px 8px !important;

  background: rgba(16, 25, 16, .72);
  border: 1px solid rgba(199, 169, 106, .2);

  color: var(--cream);
  font: 14px/1.45 var(--sans);

  overflow-wrap: anywhere;
  word-break: normal;

  transition:
    background-color .12s ease,
    border-color .12s ease;
}

.overwrite-library .overwrite-files li::before {
  content: none !important;
}

.overwrite-library .overwrite-files li:hover {
  background: rgba(101, 115, 74, .22);
  border-color: var(--line);
  color: var(--gold-bright);
}


/* Featured collections — desktop */

@media (min-width: 761px) {
  .overwrite-library .overwrite-card-featured {
    grid-column: span 2;
  }

  .overwrite-library .overwrite-card-featured .overwrite-files {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}


/* Occasionally used section */

.overwrite-library .overwrite-group-occasional {
  margin-top: 8px;
  padding-top: 22px;

  border-top: 3px double var(--line);
}

.overwrite-library .overwrite-group-occasional
.overwrite-group-heading {
  background: rgba(65, 49, 34, .7);
  border-color: rgba(199, 169, 106, .6);
}


/* Last updated */

.overwrite-library .overwrite-updated {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;

  margin-top: 24px;
  padding: 12px;

  background: rgba(101, 115, 74, .18);
  border: 1px dashed var(--line);

  color: var(--cream);
  font: 14px/1.5 var(--sans);
  text-align: center;
}

.overwrite-library .overwrite-updated span {
  color: var(--gold);
  font-size: 17px;
}


/* =========================================================
   PET VIEWER & LIBRARY — TABLETS
   ========================================================= */

@media (max-width: 900px) {
  .pet-gallery {
    gap: 13px;
  }

  .pet-card-image {
    padding: 10px;
  }
}


/* =========================================================
   PET VIEWER & LIBRARY — SMALL SCREENS
   ========================================================= */

@media (max-width: 760px) {

  /* Breed buttons */

  #breedlist .breed-link {
    flex: 0 1 auto;
    width: fit-content;
    max-width: 180px;
  }


  /* Pet gallery */

  .pet-gallery {
    gap: 10px;
  }

  .pet-card,
  .pet-card-image {
    max-width: 100%;
  }

  .pet-card-image img {
    max-width: 100%;
    height: auto;
  }


  /* Creator grid */

  .overwrite-library .overwrite-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .overwrite-library .overwrite-card-featured {
    grid-column: 1 / -1;
  }


  /* File lists */

  .overwrite-library .overwrite-files {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 9px !important;
  }

  .overwrite-library .overwrite-card-featured .overwrite-files {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }


  /* Creator cards */

  .overwrite-library .overwrite-card-header {
    padding: 10px;
  }

  .overwrite-library .overwrite-card h4 {
    font-size: 16px;
  }

  .overwrite-library .overwrite-files li {
    padding: 7px !important;
    font-size: 14px;
  }


  /* Group headings */

  .overwrite-library .overwrite-group-heading h3 {
    font-size: 18px;
  }
}


/* =========================================================
   PET VIEWER & LIBRARY — MOBILE
   ========================================================= */

@media (max-width: 420px) {

  /* Breed buttons */

  #breedlist {
    gap: 5px;
  }

  #breedlist .breed-link {
    max-width: 180px;
    min-height: 32px;
    padding: 6px 5px;

    font-size: 12px;
    line-height: 1.3;
  }


  /* Pet gallery */

  .pet-gallery {
    gap: 8px;
  }

  .pet-card {
    padding: 4px;
  }

  .pet-card::before,
  .pet-card::after {
    font-size: 10px;
  }


  /* Viewer heading */

  .pet-viewer-heading {
    align-items: flex-start;
    gap: 8px;
    padding: 10px;
  }

  .pet-viewer-eyebrow {
    font-size: 9px;
    letter-spacing: .7px;
  }

  .pet-viewer-heading h1 {
    font-size: 21px !important;
  }

  .pet-viewer-count {
    padding: 5px 6px;
    font-size: 11px;
  }


  /* Pet images */

  .pet-card-image {
    padding: 7px;
  }

  .pet-card-image::after {
    right: 5px;
    bottom: 4px;
    font-size: 9px;
  }


  /* Pet details */

  .pet-card-details {
    gap: 7px;
    padding: 10px 5px 12px;
  }

  .pet-card .pet-name {
    font-size: 14px;
  }

  .pet-gender,
  .pet-breed {
    padding: 4px 5px;
    font-size: 11px;
  }

  .pet-card .pet-breeder {
    font-size: 12px;
  }


  /* Creator grid */

  .overwrite-library .overwrite-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .overwrite-library .overwrite-card-featured {
    grid-column: auto;
  }


  /* File lists */

  .overwrite-library .overwrite-files,
  .overwrite-library .overwrite-card-featured .overwrite-files {
    grid-template-columns: 1fr;
    padding: 10px !important;
  }

  .overwrite-library .overwrite-files li {
    padding: 8px !important;
    font-size: 15px;
  }


  /* Creator cards */

  .overwrite-library .overwrite-card-header {
    padding: 11px 12px;
  }

  .overwrite-library .overwrite-card h4 {
    font-size: 17px;
  }


  /* Group headings */

  .overwrite-library .overwrite-group-heading {
    gap: 9px;
    padding: 9px;
  }

  .overwrite-library .overwrite-group-heading p {
    font-size: 13px;
  }


  /* Last updated */

  .overwrite-library .overwrite-updated {
    gap: 7px;
    font-size: 13px;
  }
}


/* =========================================================
   PET CARD — REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .pet-card:hover {
    transform: none;
  }
}


/* =========================================================
   PET CARD — WOODLAND IMAGE
   ========================================================= */

.pet-card-image {
  background-color: #182319;

  background-image:
    radial-gradient(
      circle at 50% 40%,
      rgba(101, 115, 74, .24),
      transparent 72%
    ),
    url("https://petz.mossynewt.net/calamint/images/grove-path.png");

  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;

  border-color: rgba(199, 169, 106, .46);
  outline-color: rgba(199, 169, 106, .32);
}

.pet-card-image::after {
  color: rgba(199, 169, 106, .68);
}


/* =========================================================
   PET CARD — DARK LEDGER APPEARANCE
   ========================================================= */

.pet-card {
  background:
    repeating-linear-gradient(
      0deg,
      rgba(199, 169, 106, .018) 0,
      rgba(199, 169, 106, .018) 1px,
      transparent 1px,
      transparent 5px
    ),
    linear-gradient(
      145deg,
      rgba(29, 42, 29, .98),
      rgba(13, 21, 14, .99)
    );

  border-color: rgba(199, 169, 106, .58);
  outline-color: rgba(199, 169, 106, .16);

  box-shadow:
    3px 3px 0 rgba(0, 0, 0, .42),
    inset 0 0 0 1px rgba(199, 169, 106, .045);
}

.pet-card::before,
.pet-card::after {
  color: var(--gold);
}

.pet-card:hover {
  border-color: var(--gold-bright);

  box-shadow:
    4px 4px 0 rgba(0, 0, 0, .5),
    inset 0 0 0 1px rgba(199, 169, 106, .1);
}


/* =========================================================
   COLLECTION STATISTICS
   ========================================================= */

.collection-statistics {
  position: relative;
  width: 100%;
  min-width: 0;
  margin-top: 10px;
}


/* Individual collections */

.statistics-collection {
  position: relative;
  min-width: 0;

  margin: 26px 0;
  padding: clamp(15px, 2vw, 24px);

  background:
    linear-gradient(
      145deg,
      rgba(29, 42, 29, .88),
      rgba(12, 20, 13, .94)
    );

  border: 3px double rgba(199, 169, 106, .58);
  outline: 1px solid rgba(199, 169, 106, .16);
  outline-offset: -5px;

  box-shadow:
    inset 0 0 24px rgba(0, 0, 0, .2),
    3px 4px 12px rgba(0, 0, 0, .24);
}

.statistics-collection + .statistics-collection {
  margin-top: 24px;
}


/* Collection headings */

.statistics-collection-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;

  margin-bottom: 8px;
  padding-bottom: 12px;

  border-bottom: 1px solid var(--line);
  color: var(--gold);
}

.statistics-collection-heading h3 {
  margin: 0;

  color: var(--gold-bright);
  font-family: var(--gothic);
  font-size: clamp(1.65rem, 3vw, 2rem);
  font-weight: normal;
  line-height: 1.3;
  text-align: center;
}

.statistics-collection-heading span {
  flex: 0 0 auto;

  color: var(--gold);
  font-size: 1rem;
}


/* Status message */

.stats-status {
  margin: 10px 0 20px;

  color: var(--moss-light);
  font-family: var(--serif);
  font-size: .88rem;
  font-style: italic;
  text-align: center;
}


/* Statistics grid */

.statistics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 13px;

  width: 100%;
  min-width: 0;
}


/* Individual statistic cards */

.statistics-card {
  position: relative;
  display: flex;
  flex-direction: column;

  min-width: 0;
  padding: 15px;

  background:
    linear-gradient(
      145deg,
      rgba(21, 32, 22, .96),
      rgba(9, 16, 10, .96)
    );

  border: 1px solid rgba(199, 169, 106, .38);

  box-shadow:
    inset 0 0 0 3px rgba(199, 169, 106, .035),
    2px 3px 7px rgba(0, 0, 0, .2);

  transition: border-color .2s ease;
}


/* Decorative corners */

.statistics-card::before,
.statistics-card::after {
  position: absolute;

  color: rgba(199, 169, 106, .6);
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1;

  pointer-events: none;
}

.statistics-card::before {
  content: "✧";
  top: 6px;
  left: 7px;
}

.statistics-card::after {
  content: "✧";
  right: 7px;
  bottom: 6px;
}

.statistics-card:hover {
  border-color: var(--gold);
}


/* Card headings */

.statistics-card .eyebrow {
  margin: 0 0 7px;

  color: var(--gold);
  font-family: var(--serif);
  font-size: .69rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.statistics-card h4 {
  min-height: 48px;

  margin: 0 0 10px;
  padding-bottom: 10px;

  color: var(--cream);
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: normal;
  line-height: 1.35;

  border-bottom: 1px solid rgba(199, 169, 106, .35);
}


/* Ranking lists */

.statistics-list {
  display: flex;
  flex-direction: column;
  gap: 0;

  margin: 0;
  padding: 0;

  list-style: none;
  counter-reset: statistics;
}

.statistics-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;

  min-width: 0;
  padding: 9px 0;

  border-bottom: 1px solid rgba(199, 169, 106, .15);

  counter-increment: statistics;
}

.statistics-list li:last-child {
  border-bottom: none;
}


/* Numbered entries */

.statistics-list li:not(.stats-empty)::before {
  content: counter(statistics, decimal-leading-zero);

  grid-column: 1;
  grid-row: 1;

  color: var(--gold);
  font-family: var(--serif);
  font-size: .72rem;
  letter-spacing: .05em;
}


/* Pet names */

.statistics-list .stat-name {
  grid-column: 1;
  grid-row: 2;

  min-width: 0;

  color: var(--cream);
  font-family: var(--sans);
  font-size: .88rem;
  line-height: 1.45;

  overflow-wrap: anywhere;
}


/* Numerical counts */

.statistics-list .stat-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  grid-column: 2;
  grid-row: 1 / span 2;

  min-width: 32px;
  padding: 5px 8px;

  color: var(--gold-bright);
  background: rgba(0, 0, 0, .28);
  border: 1px solid rgba(199, 169, 106, .4);

  font-family: var(--serif);
  font-size: .95rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}


/* Empty / loading messages */

.statistics-list .stats-empty {
  display: block;

  color: var(--muted);
  font-family: var(--serif);
  font-size: .88rem;
  font-style: italic;
  line-height: 1.5;
}


/* Catz placeholder */

.catz-statistics {
  background:
    linear-gradient(
      145deg,
      rgba(29, 42, 29, .72),
      rgba(12, 20, 13, .86)
    );
}

.catz-stats-placeholder {
  padding: 25px 18px;

  color: var(--muted);
  background: rgba(0, 0, 0, .2);
  border: 1px dashed var(--line);

  text-align: center;
}

.catz-stats-placeholder > span {
  display: block;
  margin-bottom: 10px;

  color: var(--gold);
  font-family: var(--serif);
  font-size: 1.7rem;
}

.catz-stats-placeholder p {
  margin: 6px 0;

  font-family: var(--serif);
  font-size: .92rem;
  line-height: 1.6;
}

.catz-stats-placeholder p:first-of-type {
  color: var(--cream);
}


/* =========================================================
   STATISTICS — TABLETS
   ========================================================= */

@media (max-width: 850px) {
  .statistics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .statistics-card:last-child {
    grid-column: 1 / -1;
  }

  .statistics-card h4 {
    min-height: 0;
  }
}


/* =========================================================
   STATISTICS — MOBILE
   ========================================================= */

@media (max-width: 560px) {

  .statistics-collection {
    margin: 20px 0;
    padding: 15px 12px;
  }

  .statistics-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .statistics-card,
  .statistics-card:last-child {
    grid-column: auto;
    padding: 15px 13px;
  }

  .statistics-card h4 {
    min-height: 0;
    font-size: 1.15rem;
  }

  .statistics-collection-heading {
    gap: 10px;
  }

  .statistics-collection-heading h3 {
    font-size: 1.65rem;
  }

  .stats-status {
    font-size: .84rem;
  }
}


/* =========================================================
   STATISTICS — REDUCED MOTION
   ========================================================= */

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


/* =========================================================
   PET COLLECTION FILTERS
   ========================================================= */

.pet-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 14px;

  width: 100%;
  margin: 0 auto 20px;
}

.pet-filter {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 150px;

  max-width: 240px;
}


/* Filter labels */

.pet-filter label {
  color: var(--gold-bright);
  font-size: .95rem;
  text-align: left;
}


/* Dropdowns */

.pet-filter select {
  width: 100%;
  min-width: 0;
  padding: 9px 30px 9px 11px;

  border: 1px solid var(--gold);
  border-radius: 4px;

  background: var(--forest);
  color: var(--cream);

  font: inherit;
  cursor: pointer;
}


/* Dropdown accessibility */

.pet-filter select:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

.pet-filter select option {
  background: var(--forest);
  color: var(--cream);
}
