* {
  margin: 0;
  padding: 0;
}

:root {
  --padding: 0rem;
  --color-black: #000;
  --color-white: #fff;
  --color-grey: #777;
  --color-light: #efefef;
  --color-text: var(--color-black);
  --color-text-grey: var(--color-grey);
  --color-background: var(--color-white);
  --color-code-light-grey: #cacbd1;
  --color-code-comment: #a9aaad;
  --color-code-white: #c5c9c6;
  --color-code-red: #d16464;
  --color-code-orange: #de935f;
  --color-code-yellow: #f0c674;
  --color-code-green: #a7bd68;
  --color-code-aqua: #8abeb7;
  --color-code-blue: #7e9abf;
  --color-code-purple: #b294bb;
  --font-family-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-family-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
}

html {
  font-family: var(--font-family-sans);
  color: var(--color-text);
  background: var(--color-background);
}

img {
  width: 100%;
}

body {
  padding: var(--padding);
  /*max-width: 75rem;*/
  margin: 0 auto;
  /*background-color: #FAF9F6;*/
}

.main {
  padding: 2rem 2rem 1rem 2rem;

}

li {
  list-style: none;
}

a {
  color: currentColor;
  text-decoration: none;
}

button {
  font: inherit;
  background: none;
  border: 0;
  color: currentColor;
  cursor: pointer;
}

strong,
b {
  font-weight: 600;
}

small {
  font-size: inherit;
  color: var(--color-text-grey);
}

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

.color-grey {
  color: var(--color-text-grey);
}



/* Header Wrapper */
.site-header {
  border-bottom: 1px solid #eee;
  padding: 0 0;
  background: #ffffff;
  /*border-radius: 12px;*/
  box-shadow: -5px 7px 20px rgba(97, 97, 97, 0.3);
}

/* Flex Container */
.header-container {
  display: flex;
  flex-direction: column;
  /* Stack vertically by default */
  align-items: center;
  /* gap: 1.25rem;*/
  padding: 1rem;
  text-align: left;
}

.header {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-right: -1rem;
  margin-left: -1rem;
  margin-bottom: 2rem;
  margin-top: 1rem;
}

.subheader {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-right: -1rem;
  margin-left: 0rem;
  margin-bottom: 4rem;
  margin-top: 0rem;
}

.subheader a {
  text-decoration: underline;
}

.logo {
  padding-top: 0rem;
  padding-right: 1rem;
  padding-bottom: 0rem;
  padding-left: 1rem;
  display: flex;
  align-items: center;
  font-weight: 400;
  cursor: pointer;
  font-size: 2.3rem;
}

/* Logo styling */
.logo img {
  display: block;
  transition: opacity 0.2s;
}

.logo:hover img {
  opacity: 0.8;
}

.imglogo a {
  display: flex;

}

nav {
  display: flow-root;
}

/* Center Navigation */
.main-nav {
  border-top: 0px solid #eee;
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
}

/* Center Navigation */
.main-nav a {
  text-decoration: none;
  color: #111;
  font-weight: 500;
  font-size: 0.95rem;
  border-top: 0px solid #eee;
}

/* 1. The Sub-menu container */
.sub-menu {
  list-style: none;
  padding-left: 1rem;
  display: none;
  /* Indent sub-items */
}

/* 2. Sub-menu Links: Smaller and Grey */
.sub-menu a {
  font-size: .9rem !important;
  /* Smaller than main nav */
  color: var(--color-text-grey) !important;
  /* Grey color from your variables */
  font-weight: 400 !important;
  transition: color 0.2s;
}

.sub-menu li {
  padding-top: 0.8rem;
}

/* 3. Hover state for sub-menu */
.sub-menu a:hover,
.sub-menu a.active {
  color: var(--color-black) !important;
  text-decoration: underline;
}

/* Open state for mobile accordion */
.menu-item.open .sub-menu {
  display: flex;
  flex-direction: column;
}

/* Adjusting the main nav to handle the vertical stack better on mobile */
.menu-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  /*border-right: 1px solid #eee;*/
  padding-right: 0;
  width: 100%;
}

.menu-item-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.submenu-toggle {
  padding: 0 1rem;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--color-text-grey);
  transition: transform 0.2s;
}

.menu-item a {
  font-size: 0.75rem;
}

.menu-item.open .submenu-toggle {
  transform: rotate(180deg);
}

/* Right Side: Social and User */
.header-actions {
  padding-top: 1rem;
  border-top: 1px solid #eee;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.menu-list {
  gap: 1.5rem;
  padding: 1rem 1rem 1rem 0rem;
  font-size: 0rem;
}

.social-link {
  color: #000;
  display: flex;
  align-items: center;
}

.social {
  vertical-align: middle;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Ensure the image itself is forced to be a circle */
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50% !important;
  /* Force the circle */
  object-fit: cover;
  border: 1px solid #ddd;
  display: block;
  /* Removes bottom whitespace */
}

/* Ensure the placeholder is also a circle */
.user-avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eee;
  font-size: 14px;
  font-weight: bold;
  color: #666;
  text-transform: uppercase;
  border: 1px solid #ddd;
}

/* Ensure the container doesn't stretch the image */
.user-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  /* Remove any background or border-radius here that might look square */
}

.username {
  display: none;
  /* Hide on mobile by default */
  font-size: 1rem;
  padding-right: 1rem;
}

/* 2. Desktop Layout (Wide screens - Single Row) */
@media (min-width: 768px) {
  .site-header {
    border-bottom: 0px solid #eee;
    padding: 0 0;
    background: #ffffff;
    /*border-radius: 12px;*/
    box-shadow: -5px 7px 20px rgba(97, 97, 97, 0.3);
  }

  .header-container {
    flex-direction: row;
    /* Switch back to horizontal line */
    justify-content: flex-start;
    padding: 1rem 1.5rem;
  }

  /* Add a gap between the logo and the nav */
  .logo {
    margin-right: .5rem;
    /* Adjust this value to control the distance */
  }

  .header-actions {
    margin-left: auto;
    flex-direction: row;
    /* Horizontal social/user */
    border-left: 0px solid #eee;
    border-top: 0px solid #eee;
    width: auto;
    padding: 0 0 0 1.5rem;
  }

  .social {
    flex-direction: row;
    border-top: none;
    border-left: 0px solid #eee;
    border-top: 0px solid #eee;
    padding: 0 0 0 1.5rem;
  }

  .user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  /* Ensure the image itself is forced to be a circle */
  .user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50% !important;
    /* Force the circle */
    object-fit: cover;
    border: 1px solid #ddd;
    display: block;
    /* Removes bottom whitespace */
  }

  /* Ensure the placeholder is also a circle */
  .user-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eee;
    font-size: 14px;
    font-weight: bold;
    color: #666;
    text-transform: uppercase;
    border: 1px solid #ddd;
  }

  /* Ensure the container doesn't stretch the image */
  .user-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Remove any background or border-radius here that might look square */
  }

  .username {
    display: block;
    /* Show on desktop */
  }

  .menu-list {
    gap: 1.5rem;
    padding: 1rem 1rem 1rem 0rem;
    font-size: 0rem;
  }

  .menu-list a {
    font-size: 2rem;
  }



  /* Center Navigation */
  .main-nav {
    flex-wrap: wrap;
    flex-direction: row;
    border-top: none;
    width: 40%;
    /*border-left: 1px solid #eee;*/
    padding: 0 0 0 1.5rem;
  }

  /* Center Navigation */
  .main-nav a {
    text-decoration: none;
    color: #111;
    font-weight: 500;
    font-size: 0.75rem;
  }

  .menu-item-content {
    display: contents;
  }

  .submenu-toggle {
    display: none;
  }

  /* 1. The Sub-menu container */
  .sub-menu {
    /* Dropdown styling */
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 12rem;
    padding: 0.5rem 1rem 1rem 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #eee;
    z-index: 1000;
    flex-direction: column;
    gap: 0.25rem;
  }

  .menu-item:hover .sub-menu {
    display: flex;
  }

  /* Arrow indicator for items with sub-menu */
  .menu-item:has(.sub-menu)>a::after {
    content: '+';
    display: inline-block;
    margin-left: 0.5rem;
    width: 1em;
    text-align: center;
  }

  .menu-item:has(.sub-menu):hover>a::after {
    content: '-';
  }

  /* 2. Sub-menu Links: Smaller and Grey */
  .sub-menu a {
    font-size: 1rem !important;
    /* Smaller than main nav */
    color: var(--color-text-grey) !important;
    /* Grey color from your variables */
    font-weight: 400 !important;
    transition: color 0.2s;
  }

  /* 3. Hover state for sub-menu */
  .sub-menu a:hover,
  .sub-menu a.active {
    color: var(--color-black) !important;
    text-decoration: underline;
  }

  /* Adjusting the main nav to handle the vertical stack better on mobile */
  .menu-item {
    align-items: flex-start;
    /* Align to top-left of the nav item */
    position: relative;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #eee;
    padding-right: 0.75rem;
    width: auto;
  }

}

.username {
  color: #666;
}

.logout-link {
  color: #000;
  text-decoration: none;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border: 1px solid #000;
  border-radius: 4px;
  transition: all 0.2s;
}

.logout-link:hover {
  background: #000;
  color: #fff;
}

.subheadermenu {
  display: flex;
  padding: 0 0.5rem .5rem .5rem;
  font-weight: 500;
}

.menu {
  display: flex;
}

.menu a {
  padding: 1rem;
  display: block;
}

.menu a[aria-current] {
  text-decoration: underline;
}

.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  /* Allow items to jump to next line if needed */
  justify-content: flex-start;
  gap: 1rem;
}

.menu-list a {
  font-size: 1.2rem;
  /*text-decoration: underline;*/
}

.social {
  display: flex;
  padding: 0 0.5rem 0rem .5rem;
  vertical-align: middle;
}

.social a {
  padding: 0rem .5rem;
  vertical-align: middle;
}

.headerusername {
  font-size: 1rem;
  font-style: italic;
  display: flex;
  padding: 1rem 0rem 1rem 1rem;
}

.headerusername a {
  text-decoration: underline;
  font-size: 1rem;
  font-style: italic;
  padding: 0rem 0rem 0rem 0rem;
}

.headerlogout {
  font-size: 1rem;
  font-style: italic;
  display: flex;
  padding: 1rem 1rem 0rem 0.5rem;
}

.headerlogout a {
  text-decoration: underline;
  font-size: 1rem;
  font-style: italic;
  padding: 0rem 0rem 0rem 0rem;
}

.login {
  display: flex;
  padding: 0 0.5rem .5rem .5rem;
}

.login a {
  padding: 1rem .0rem;
}

.defaultfield {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
}

.defaultlabel {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #444;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.defaultinput {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  /* Crucial for width: 100% */
}

/* Input Focus state: High visibility */
.defaultinput:focus {
  outline: none;
  border-color: #000;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

/* Placeholder styling */
.defaultinput::placeholder {
  color: #aaa;
}

/* Helper text (the <small> tag) */
.defaultfield small {
  display: block;
  margin-top: 0.5rem;
  color: #777;
  font-size: 0.8rem;
  line-height: 1.4;
}

/* The Submit Button */
.defaultbutton {
  width: 100%;
  padding: 0.85rem;
  background-color: #111;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-top: 0.5rem;
}

.defaultbutton:hover {
  background-color: #333;
}

.defaultbutton:active {
  background-color: #000;
}

/* Disabled state: For when the form is submitting */
.defaultbutton:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  transform: none;
}


.section {
  padding: 2rem 0;
}

.default-flex-grid {
  display: grid;
  grid-template-columns: 2fr;
  /* 2/3 and 1/3 split */
  gap: 2rem;
}

/* Responsive: Stack columns on small screens */
@media (max-width: 768px) {
  .default-flex-grid {
    grid-template-columns: 2fr;
  }
}

.grid {
  /*--columns: 12;*/
  /*--gutter: 1rem;*/
  display: flex;
  /*grid-gap: var(--gutter);*/
  /*grid-template-columns: 1fr;*/
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.grid>.column {
  flex-grow: 1;
  flex-basis: calc(100% / 12 * var(--span));
  grid-column: span var(--columns);
  /*margin-bottom: var(--gutter);*/
}

.autogrid {
  --gutter: 3rem;
  --min: 10rem;
  display: grid;
  grid-gap: var(--gutter);
  grid-template-columns: repeat(auto-fit, minmax(var(--min), 1fr));
  grid-auto-flow: dense;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.text {
  line-height: 1.5em;
}

.text a {
  text-decoration: underline;
}

.text :first-child {
  margin-top: 0;
}

.text :last-child {
  margin-bottom: 0;
}

.text p,
.text ul,
.text ol {
  margin-bottom: 1.5rem;
}

.text ul,
.text ol {
  margin-left: 1rem;
}

.text ul p,
.text ol p {
  margin-bottom: 0;
}

.text ul>li {
  list-style: disc;
}

.text ol>li {
  list-style: decimal;
}

.text ul ol,
.text ul ul,
.text ol ul,
.text ol ol {
  margin-bottom: 0;
}

.text h1,
.h1,
.intro {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  line-height: 1.25em;
}

.text h2,
.h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.text h3,
.h3 {
  font-weight: 600;
}

.text .codeblock {
  display: grid;
}

.text code {
  font-family: var(--font-family-mono);
  font-size: 1em;
  background: var(--color-light);
  padding: 0 .5rem;
  display: inline-block;
  color: var(--color-black);
}

.text pre {
  margin: 3rem 0;
  background: var(--color-black);
  color: var(--color-white);
  padding: 1.5rem;
  overflow-x: scroll;
  overflow-y: hidden;
  line-height: 1.5rem;
}

.text pre code {
  padding: 0;
  background: none;
  color: inherit;
}

.text hr {
  margin: 6rem 0;
}

.text dt {
  font-weight: 600;
}

.text blockquote {
  font-size: 1.25rem;
  line-height: 1.325em;
  border-left: 2px solid var(--color-black);
  padding-left: 1rem;
  margin: 3rem 0;
  max-width: 25rem;
}

.text blockquote footer {
  font-size: .875rem;
  font-style: italic;
}

.text figure {
  margin: 3rem 0;
}

.text figcaption {
  padding-top: .75rem;
  color: var(--color-text-grey);
}

.text figure ul {
  line-height: 0;
  display: grid;
  gap: 1.5rem;
  margin: 0;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
}

.text figure ul li {
  list-style: none;
}

hr {
  border: 0;
  background: currentColor;
  height: 2px;
  width: 1.5rem;
  margin: 3rem auto;
}

.align-center {
  text-align: center;
}

.intro {
  max-width: 40rem;
}

.intro *:not(:last-child) {
  margin-bottom: 1em;
}

.cta {
  background: var(--color-black);
  color: var(--color-white);
  display: inline-flex;
  justify-content: center;
  padding: .75rem 1.5rem;
  border: 4px solid var(--color-white);
  outline: 2px solid var(--color-black);
}

.box {
  background: var(--color-light);
  padding: 1.5rem;
  border: 4px solid var(--color-white);
  outline: 2px solid var(--color-light);
}

.video,
.img {
  position: relative;
  display: block;
  --w: 1;
  --h: 1;
  padding-bottom: calc(100% / var(--w) * var(--h));
  background: var(--color-black);
}

.img img,
.video iframe {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}

.img[data-contain] img {
  object-fit: contain;
}

.img-caption,
.video-caption {
  padding-top: .75rem;
  line-height: 1.5em;
}

.footer {
  padding: 0rem 0 2rem 2.5rem;
  line-height: 1.5em;
}

.footer:before {
  content: "";
  display: block;
  width: 1.5rem;
  height: 2px;
  background: var(--color-black);
  margin-bottom: 1.5rem;
}

.footer h2 {
  font-weight: 600;
  margin-bottom: .75rem;
}

.footer ul,
.footer p {
  color: var(--color-text-grey);
}

.footer p {
  max-width: 15rem;
}

.footer a:hover {
  color: var(--color-text);
}


.map {
  --w: 2;
  --h: 1;
  padding-bottom: calc(100% / var(--w) * var(--h));
  position: relative;
  overflow: hidden;
  background: var(--color-black);
}

.map iframe {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.margin-s {
  margin-bottom: .75rem;
}

.margin-m {
  margin-bottom: 1.5rem;
}

.margin-l {
  margin-bottom: 3rem;
}

.margin-xl {
  margin-bottom: 1.5rem;
}

.margin-xxl {
  margin-bottom: 6rem;
}


.pagination {
  display: flex;
  padding-top: 6rem;
}

.pagination>span {
  color: var(--color-text-grey);
}

.pagination>* {
  padding: .5rem;
  width: 3rem;
  text-align: center;
  border: 2px solid currentColor;
  margin-right: 1.5rem;
}

.pagination>a:hover {
  background: var(--color-black);
  color: var(--color-white);
  border-color: var(--color-black);
}

.note-excerpt {
  line-height: 1.5em;
}

.note-excerpt header {
  margin-bottom: 1.5rem;
}

.note-excerpt figure {
  margin-bottom: .5rem;
}

.note-excerpt-title {
  font-weight: 600;
}

.note-excerpt-date {
  color: var(--color-text-grey);
}