:root {
  --ink: #192e40;
  --muted: #526575;
  --accent: #17665f;
  --paper: #fff;
  --canvas: #f3f5f4;
  --line: #dbe3e1;
  --serif: georgia, "Times New Roman", serif;
  --sans: -apple-system, blinkmacsystemfont, "Segoe UI", arial, sans-serif;
}

html {
  font-size: 16px;
  scroll-padding-top: 2rem;
}

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.65;
  overflow-x: visible;
}

body :is(a, button, input, textarea, select):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

body a:hover {
  transition-duration: 0s;
}

body .container {
  width: 100%;
  max-width: 1160px;
  padding-right: 24px;
  padding-left: 24px;
}

.topbar {
  background: var(--paper);
  border-top: 4px solid var(--accent);
}

.topbar > .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 24px;
  padding-bottom: 24px;
}

.site-brand {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  color: var(--ink);
  text-decoration: none;
}

.site-brand:hover {
  color: var(--ink);
}

.site-brand-name {
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -0.7px;
}

.site-brand-description,
.site-reference {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.02em;
}

body #header {
  background: var(--ink);
}

#header :focus-visible {
  outline-color: #e0ba69;
}

body #header .menu-color {
  background: none !important;
}

#header .menu-color > .row {
  flex-wrap: nowrap;
  align-items: center;
  margin: 0;
}

#header .menu-color > .row > :first-child {
  flex: 1;
  width: auto;
  min-width: 0;
  padding: 0;
}

#header .menu-color > .row > .col-lg-1 {
  flex: 0 0 48px;
  width: 48px;
  padding: 0;
}

body #header .sidebar {
  position: static;
  width: 100%;
  height: auto;
  padding: 0;
  visibility: visible;
  overflow: visible;
  opacity: 1;
  background: none;
}

body .main-menu-navigation {
  overflow: visible;
}

body .primary-navigation ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
  margin: 0;
  padding: 0;
  text-align: left;
}

body .primary-navigation li {
  float: none;
  padding: 0;
}

body #header .primary-navigation ul li a {
  display: block;
  padding: 16px 14px !important;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  color: #fff !important;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: 0;
}

body #header .primary-navigation li:is(.current-menu-item, .current-page-ancestor) > a,
body #header .primary-navigation ul li a:hover {
  background: #294253 !important;
  border-bottom-color: #91c5ba;
}

body .toggle-menu,
body .sidebar .closebtn,
body #contact-info,
body #header .social-media {
  display: none;
}

body #header .search-box {
  display: block;
  text-align: right;
}

body .search-open {
  border: 0;
  background: transparent;
  color: #fff;
}

.search-open .fas {
  color: inherit;
}

body .search-outer {
  background: var(--ink);
}

body .search-close {
  color: #fff;
}

body .middle-align {
  flex: 1;
  width: 100%;
  margin: 0 auto;
  padding: 32px 0 64px;
}

.page-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 960px;
  margin: 0 auto 20px;
  color: var(--muted);
  font-size: 13px;
}

.page-breadcrumbs a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

body .background-img-skin {
  max-width: 960px;
  padding: clamp(20px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  box-shadow: 0 4px 24px #192e4005;
}

body .background-img-skin > h1 {
  margin: 0 0 28px;
  padding: 0 0 24px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

/* Keep prose styling outside the Crown legislation layout and its amendment colours. */
:where(.entry-content) > :is(p, ul, ol),
:where(.entry-content) > :is(ul, ol) li {
  font-size: 17px;
  line-height: 1.75;
}

:where(.entry-content) > p {
  margin-bottom: 20px;
}

:where(.entry-content) > :is(ul, ol) {
  margin: 0 0 24px 24px;
}

:where(.entry-content) > :is(ul, ol) li {
  padding: 8px 0;
}

:where(.entry-content) > :is(p, ul, ol) a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.entry-content > :is(h2, h3, h4) {
  margin: 24px 0 12px;
  padding: 0;
  color: var(--ink);
  font-family: var(--serif);
}

/* The 0.8em legislation text becomes 18px; all nested widths, floats and indents stay intact. */
#viewLegContents .LegSnippet {
  font-size: 1.40625rem;
}

.LegSnippet .LegLHS[class*="No"] {
  white-space: nowrap;
}

.LegSnippet .LegTableContainer {
  max-width: 100%;
  overflow-x: auto;
}

.LegSnippet [id] {
  scroll-margin-top: 2rem;
}

body.home .background-img-skin {
  max-width: 1112px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.home .background-img-skin > h1 {
  max-width: 800px;
  margin-bottom: 16px;
  padding: 12px 0 0;
  border: 0;
  font-size: clamp(38px, 5vw, 60px);
}

.home-intro {
  max-width: 680px;
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.65;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.resource-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
}

.resource-card:hover {
  border-color: var(--accent);
  background: #edf4f1;
  color: var(--ink);
}

.resource-card strong {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 400;
  line-height: 1.25;
}

.resource-card span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

body.home .entry-content {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
}

body.home .wp-block-gallery {
  margin-bottom: 24px;
}

body footer {
  border-top: 1px solid var(--line);
  background: #eaf0ed;
}

body #footer {
  padding: 28px 0 12px;
  background: transparent;
  color: var(--muted);
}

body #footer .footer-reference {
  margin-bottom: 16px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 22px;
}

body #footer :is(ul, aside) {
  margin: 0;
  padding: 0;
}

body #footer ul {
  list-style: none;
}

body #footer li {
  padding: 0;
}

body #footer li::before {
  display: none;
}

body #footer a,
body .copyright p a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

body .copyright {
  padding: 12px 24px 24px;
  background: transparent;
}

body .copyright p {
  color: var(--muted);
  font-size: 12px !important;
}

body #scroll-top {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--ink);
  color: #fff;
}

body #cookie-notice {
  font-family: var(--sans);
}

@media (width <= 760px) {
  .site-reference {
    display: none;
  }

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

@media (width <= 480px) {
  body .container {
    padding-right: 16px;
    padding-left: 16px;
  }

  .topbar > .container {
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .site-brand-name {
    font-size: 28px;
  }

  body #header .primary-navigation ul li a {
    padding: 12px 8px !important;
    font-size: 13px;
  }

  body .primary-navigation ul {
    gap: 0;
  }

  body .middle-align {
    padding-top: 24px;
    padding-bottom: 40px;
  }

  body .background-img-skin,
  body.home .entry-content {
    padding: 20px 16px;
  }

  .resource-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .resource-card {
    padding: 20px;
  }
}

@media print {
  body {
    background: #fff;
  }

  body header,
  body footer,
  .page-breadcrumbs,
  .resource-grid,
  #scroll-top,
  #cookie-notice {
    display: none !important;
  }

  body .middle-align,
  body .container,
  body .background-img-skin {
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  #viewLegContents .LegSnippet {
    font-size: 15pt;
  }
}

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