@import url('https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@400;500;700&family=M+PLUS+1+Code:wght@400;500;600;700&display=swap');

:root {
  color-scheme: dark;

  --bs-primary: #4d8b31;
  --bs-primary-rgb: 77, 139, 49;
  --bs-link-color: var(--bs-primary);
  --bs-link-hover-color: #5fa53d;
  --bs-link-color-rgb: var(--bs-primary-rgb);

  --yw-accent: #FF8427;
  --yw-accent-rgb: 255, 132, 39;

  --bs-body-font-family: 'M PLUS Rounded 1c', sans-serif;
  --bs-font-monospace: 'M PLUS 1 Code', monospace;
  --yw-heading-font: 'M PLUS 1 Code', monospace;

  --yw-radius: 16px;
  --yw-radius-outer: 24px;
  --yw-radius-pill: 999px;

  --bs-border-radius: var(--yw-radius);
  --bs-border-radius-sm: 16px;
  --bs-border-radius-lg: var(--yw-radius);
  --bs-border-radius-xl: var(--yw-radius-outer);
  --bs-border-radius-xxl: var(--yw-radius-outer);
  --bs-border-radius-pill: var(--yw-radius-pill);
}

body {
  font-family: var(--bs-body-font-family);
}

h1, h2, h3, h4, h5, h6,
.navbar-brand {
  font-family: var(--yw-heading-font);
  letter-spacing: -0.01em;
}

main {
  padding: 0.25rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

@media (min-width: 992px) {
  main {
    padding: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
  }
}

/* Buttons: standalone pill, precompiled Bootstrap CDN classes need explicit recolouring */

.btn {
  border-radius: var(--yw-radius-pill);
}

.btn-primary {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #5fa53d;
  border-color: #5fa53d;
}

.btn-outline-secondary {
  color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #fff;
}

/* Button groups: inactive buttons use standard radius, hover/active becomes pill */

.yw-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

@media (min-width: 992px) {
  .yw-btn-group {
    gap: 1rem;
  }
}

.yw-btn-group .btn {
  border-radius: var(--yw-radius);
  transition: border-radius 0.15s ease;
}

.yw-btn-group .btn:hover,
.yw-btn-group .btn:focus-visible,
.yw-btn-group .btn.active {
  border-radius: var(--yw-radius-pill);
}

.yw-btn-accent {
  background-color: var(--yw-accent);
  border-color: var(--yw-accent);
  color: #1a1a1a;
}

.yw-btn-accent:hover,
.yw-btn-accent:focus {
  background-color: #e6741f;
  border-color: #e6741f;
  color: #1a1a1a;
}

/* List group active state, Bootstrap CDN vars must be set explicitly or load order wins */

.list-group-item.active {
  --bs-list-group-active-bg: var(--bs-primary);
  --bs-list-group-active-border-color: var(--bs-primary);
  --bs-list-group-active-color: #fff;
}

.list-group-item-action:hover,
.list-group-item-action:focus {
  background-color: color-mix(in srgb, var(--bs-primary) 14%, var(--bs-body-bg));
  color: var(--bs-body-color);
}

.list-group-item-action:hover i,
.list-group-item-action:focus i,
.list-group-item.active i {
  color: inherit;
}

/* Four-corner sets: only the outer eedges of a grid get the larger radius */

.yw-corner-set {
  display: grid;
  overflow: hidden;
  border-radius: var(--yw-radius-outer);
}

.yw-corner-set > * {
  border-radius: 0;
}

/* Texture container: grayscale blurred background image, solid surface on top, sharp content */

.yw-texture {
  position: relative;
  overflow: hidden;
  border-radius: var(--yw-radius);
}

.yw-texture::before {
  content: '';
  position: absolute;
  inset: -30px;
  background-image: var(--yw-texture-image, none);
  background-size: cover;
  background-position: center;
  filter: grayscale(1) blur(30px);
  z-index: 0;
}

.yw-texture::after {
  content: '';
  position: absolute;
  inset: 0;
  background-color: var(--bs-body-bg);
  opacity: 0.9;
  z-index: 1;
}

.yw-texture > * {
  position: relative;
  z-index: 2;
}

/* Accent colour, used sparingly */

.yw-accent {
  color: var(--yw-accent);
}

.yw-accent-bg {
  background-color: var(--yw-accent);
  }

/* Navbar */

.yw-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  background-color: var(--bs-primary);
  width: 100%;
  border-radius: 0 0 var(--yw-radius) var(--yw-radius);
}

.yw-navbar-inner {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.yw-navbar .navbar-brand,
.yw-navbar-toggle {
  color: #fff;
}

@media (min-width: 992px) {
  .yw-navbar {
    left: 1.5rem;
    right: 1.5rem;
    top: 1rem;
    transform: none;
    width: auto;
    max-width: none;
    border-radius: var(--yw-radius-pill);
  }
}

body {
  padding-top: 64px;
}

@media (min-width: 992px) {
  body {
    padding-top: 80px;

  }
/* Footer */

.yw-footer {
  background-color: var(--bs-tertiary-bg);
  border-radius: var(--yw-radius) var(--yw-radius) 0 0;
  color: var(--bs-body-color);
}

.yw-footer-brand {
  color: var(--bs-body-color);
}

.yw-footer-link {
  color: var(--bs-secondary-color);
  text-decoration: none;
}

.yw-footer-link:hover,
.yw-footer-link:focus-visible {
  color: var(--bs-primary);
}

.yw-footer-hr {
  border-color: var(--bs-border-color);
  opacity: 1;
  }
