:root {
  --bg-color: #f4f4f4;
  --btn-color: #008aab;
  --footer-color-lt: #dadbdc;
  --footer-color-dk: #001d34;
  --quark-color: #4da1a9;
  --quark-color-highlight: #00332e;
  --quark-contrast: #fff;
  --lepton-color: #de7a52;
  --lepton-color-highlight: #560000;
  --lepton-contrast: #fff;
  --gauge-color: #eeb12a;
  --gauge-color-dark: #8c6819;
  --gauge-color-highlight: #382600;
  --gauge-contrast: #382600;
  --scalar-color: #5a4c7d;
  --scalar-color-highlight: #d0c8e0;
  --scalar-contrast: #fff;
  --positive-charge-color: #ea4646;
  --negative-charge-color: #627edf  ;
  --border-radius: 0.5rem;
  --spacing: 1rem;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Open Sans", sans-serif;
  line-height: 1.5;
  background: var(--bg-color);
  min-height: 100vh;
  overflow-x: hidden;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding-inline: 1.25rem;
}

header {
  padding-block: 5.5rem;
  -webkit-background-size: 100%;
  -moz-background-size: 100%;
  -o-background-size: 100%;
  background-size: 100%;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
  background-repeat: no-repeat;
  background-image: url('https://www.csiro.au/-/media/Education-and-Outreach/Banners-and-CTAs/Images/Quinn-hero-image.jpg');
}

#logo-cont {
  display: grid;
  grid-template-columns: 10rem 4.5rem;
  gap: 1rem;
  align-items: center;
}

h1 {
  font-size: 2.75rem;
  line-height: 1;
  font-weight: 300;
  margin-top: 6rem;
  color: #fff;
}

h2 {
  font-size: 1.75rem;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--particle-color);
}

h2.dark {
  color: var(--particle-color-dark);
}

h4 {
  font-size: 1.25rem;
  font-weight: 500;
  margin-top: 1rem;
  text-transform: uppercase;
}

/* Accessibility
--------------------------------------------- */

/* Text meant only for screen readers. */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: #f1f1f1;
  border-radius: 3px;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  clip: auto !important;
  clip-path: none;
  color: #21759b;
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* Do not show the outline on the skip link target. */
#particleTable[tabindex="-1"]:focus {
  outline: 0;
}


/* General layout */

.content-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 3rem 1fr;
  grid-template-areas: 
    ". icon"
    "model info";
  position: relative;
  gap: 0.5rem 2rem;
  align-items: start;
  padding-block: 2rem;
}

.particle-table {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

/* Menu icon */

#menu-icon {
  grid-area: icon;
  justify-self: end;
  position: sticky;
  top: 0;
  right: 0;
  padding: 0;
  border-radius: 0;
  background: var(--bg-color);
  border: none;
  cursor: pointer;
  z-index: 4000;
  padding: 0.25rem;
  border-radius: calc(var(--border-radius) / 2);
}

#burger {
  display: block;
  width: 1.875rem;
  height: 1.875rem;
  fill: var(--btn-color);
}

#menu-icon:hover #burger {
  fill: var(--footer-color-dk);
}

#menu-icon .line {
  transition: x 300ms ease-in, y 300ms ease-in 300ms, transform 300ms ease-in 300ms, rotate 300ms ease-in, opacity 0ms 300ms;
}

#menu-icon[aria-expanded="true"] .line {
  transition: x 300ms ease-in, y 300ms ease-in, transform 300ms ease-in, rotate 300ms ease-in 300ms, opacity 0ms 300ms;
}

#menu-icon[aria-expanded="true"] :is(.top, .bottom) {
  transform: scaleX(1.4);
}

#menu-icon[aria-expanded="true"] .top {
  rotate: 45deg;
  y: -3px;
}

#menu-icon[aria-expanded="true"] .middle {
  opacity: 0;
}

#menu-icon[aria-expanded="true"] .bottom {
  rotate: -45deg;
  x: -47px;
  y: 67px;
}

/* Side panel */

#info-cont {
  grid-area: info;
  position: sticky;
  top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--bg-color);
  overflow-y: auto;
  max-height: calc(100vh - 5rem);
}

#info-cont[data-state="opened"] {
  animation: clipPathMenuOpen 1.5s ease-in-out forwards;
  visibility: visible;
}

#info-cont[data-state="closing"] {
  animation: clipPathMenuClose 1.5s ease-in-out forwards;
  visibility: visible;
}

#info-cont[data-state="closed"] {
  visibility: hidden;
}

@keyframes clipPathMenuOpen {
  0% {
    clip-path: circle(0% at top right);
  }
  100% {
    clip-path: circle(150% at top right);
  }
}
@keyframes clipPathMenuClose {
  0% {
    clip-path: circle(150% at top right);
  }
  100% {
    clip-path: circle(0% at top right);
  }
}

.info-panel {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 1rem;
}

.info-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-head {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  gap: 1rem;
}

.info-item-head {
  display: grid;
  grid-template-columns: 1fr 1.5rem;
  background-color: var(--particle-color);
  padding: 0.5rem;
  border-radius: var(--border-radius);
}

.prop-head {
  grid-template-columns: 1.25rem 1fr 1.5rem;
  gap: 0.5rem;
}

.info-item-title {
  font-size: 1.125rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--particle-contrast);
  pointer-events: none;
}

#chevron {
  fill: none;
  stroke: #fff;
  stroke-width: 1;
  stroke-linecap: round;
  stroke-miterlimit: 10;
  opacity: 0.6;
  transition: rotate 300ms ease-in;
  transform-origin: center;
}

.info-item-head:hover #chevron {
  opacity: 1;
}

.info-item[aria-expanded="true"] #chevron {
  rotate: 180deg;
}

.info-item-content {
  padding: 0 0.5rem;
  overflow-y: hidden;
  max-height: 1000px; /* approximate max height */
  transition-property: all;
  transition-duration: 1.5s;
}

.info-input-content {
  padding-left: 3rem;
}

.info-item[aria-expanded="false"] .info-item-content  {
  max-height: 0;
}

.bdr-cont {
  position: relative;
}

#charge-legend {
  display: grid;
  grid-template-columns: repeat(7, 2rem);
  grid-template-rows: 2rem;
  gap: 0.5rem;
  margin-top: 1rem;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
}

.pos {
  background-color: var(--positive-charge-color);
}

.neg {
  background-color: var(--negative-charge-color);
}

.charge-bdr {
  position: absolute;
  inset: -0.5rem;
  border-radius: calc(var(--border-radius) * 2.25);
  display: none;
}

.pos-bdr {
  border: solid 0.5rem var(--positive-charge-color);
}

.neg-bdr {
  border: solid 0.5rem var(--negative-charge-color);
}

.neu-bdr {
  border: solid 0.5rem #fff;
}

.two-thirds {
  opacity: 0.67;
}

.one-third {
  opacity: 0.33;
}

.button-group {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--border-radius);
  background: #f0f0f0;
  cursor: pointer;
  transition: background-color 0.2s;
}

button:hover {
  background: #e0e0e0;
}

button.active {
  background: #333;
  color: white;
}

.feynman-placeholder {
  display: flex;
  justify-content: center;
  align-items: center;
  border: solid 1px var(--footer-color-dk);
  height: 16rem;
  text-align: center;
  margin-top: 1rem;
}

footer {
  background: var(--footer-color-lt);
}

.researchers p {
  margin-left: 1rem;
  font-size: 0.875rem;
  line-height: 1.75;
}

.researchers a {
  color: var(--btn-color);
  font-weight: 700;
}

.footer-div {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr 1px 1fr;
  gap: 3rem;
  padding-block: 5rem;
}

.footer-logo {
  height: 5rem;
}

.footer-logo img {
  height: 100%;
}

.institute-tagline {
  font-size: 1.5rem;
  margin-block: 2rem;
}

.divider-line {
  background-color: var(--footer-color-dk);
}

.link-divider-line {
  width: 1px;
  height: 1.125rem;
  background-color: var(--footer-color-dk);
}

.social-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, 2rem);
  height: 2rem;
  gap: 1rem;
}

.social-icon {
  aspect-ratio: 1/1;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--btn-color);
  display: flex;
  justify-content: center;
}

.social-icon a {
  display: flex;
}

.social-icon svg {
  fill: #fff;
  width: 1.375rem;
  height: 1.375rem;
  align-self: center;
}

.social-icon:hover,
.social-icon:focus {
  background: #fff;
}

.social-icon:hover svg,
.social-icon:focus svg {
  fill: var(--btn-color);
}

.footer-links {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-link {
  font-size: 0.75rem;
}

a, a:visited {
  color: var(--footer-color-dk);
  text-decoration: none;
}

a:hover, a:active {
  text-decoration: underline;
}

.footer-base {
  background: var(--footer-color-dk);
  color: #fff;
  padding-block: 3rem;
}

.footer-details {
  font-size: 0.75rem;
}

.acknowledgement {
  max-width: 800px;
}

.split-outer {
  display: flex;
  justify-content: space-between;
  margin-top: 4rem;
}

.split-outer a {
  color: #fff;
}

@media screen and (min-width: 38em) { /* 608px in normal conditions */
  .content-wrapper {
    grid-template-columns: 1fr 27rem;
  }
}


@media screen and (min-width: 42em) { /* 672px in normal conditions */

  .footer-div {
    grid-template-columns: 1fr 1px 1fr;
    grid-template-rows: 1fr;
  }

  #logo-cont {
    grid-template-columns: 13rem 5.5rem;
    gap: 3rem;
  }

}

@media screen and (min-width: 62.5em) { /* 1000px in normal conditions */

  #menu-icon {
    display: none;
  }

  #info-cont {
    position: initial;
    overflow-y: initial;
    max-height: initial;
  }

}

.particle-cell.obscured::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-color: white;
  opacity: 0.8;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
}

.particle-cell {
  position: relative;
  transition: opacity 0.3s ease-in-out;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.particle-icon {
  transition: transform 0.4s ease;
  transform-origin: center;
}

