:root {
  --bg: #fff;
  --fg: #000;
  --accent: #ff9900;
}

html {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header, footer {
  background-color: #ffe599;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2ch 2ch;
  color: #1a0f00;
}

footer {
  justify-content: center;
  gap: 10%;
  font-size: 0.9em;
  font-weight: 600;
}

main {
  flex: 1 0 auto; /* Allows main to grow but content stays at top */
}

article {
  font-size: 1.2em;
  max-width: 70ch;
  margin: 4ch auto;
  line-height: 1.6em;
}
h1, h2 {
  color: #741b47;
  margin-bottom: 2ch;
}

#title {
  display: flex;
  align-items: center;
  gap: 0.5em; /* Adds space between logo and text */
  h1 {
    margin: 0;
    font-weight: 400;
  }
}

#title img {
  display: block; /* Removes extra space below inline images */
  width: 4ch; /* Will be twice the font size */
  height: auto;
}

nav menu {
  margin: 0;
  padding: 0;
  align-items: center;
  display: flex;
  list-style: none;
}

nav a {
  font-size: 1.2em;
  font-weight: 500;
  padding: 0.4ch 0.4ch;
}

a {
  background: linear-gradient(
    0deg,
    rgba(255, 0, 0, 0) 5%,
    rgba(245, 179, 154, 1) 5%,
    rgba(245, 179, 154, 1) 50%,
    rgba(0, 255, 0, 0) 50%
  );
  text-decoration: none;
  color: black;
  padding: 0.2ch;
}

a:hover {
  background: linear-gradient(
    0deg,
    rgba(255, 0, 0, 0) 5%,
    /* rgba(93, 239, 93, 1) 5%, */ /* rgba(93, 239, 93, 1) 50%, */ rgb(
      255,
      218,
      179
    ) 5%,
    rgb(255, 218, 179) 50%,
    rgba(0, 255, 0, 0) 50%
  );
}

code {
  background: #ffe0b3;
}

pre {
  border: 0.5em solid var(--accent);
  border-radius: 5px;
  padding: 1ch;
  code {
    background: none;
  }
}
/* Container */
#fuzzySearchContainer {
  /* horizontal single-line layout */
  display: flex;
  align-items: center;
  gap: 8px; /* minimal spacing between icon and input */
  width: 100%;
  max-width: 40ch; /* optional max width */
  margin: 0; /* let the parent control placement */
}

/* Icon button (classless) */
#searchIcon {
  /* keep it visually simple and clickable */
  background: transparent;
  border: 0;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: inherit; /* inherit text color */
  line-height: 0;
}

/* Full-horizontal input */
#fuzzySearchInput {
  /* take remaining horizontal space */
  flex: 1 1 auto;
  min-width: 0; /* important to allow shrinking inside flex */
  border: 0;
  outline: none;
  padding: 8px 6px;
  font: inherit;
  background: transparent;
  color: inherit;
  /* subtle bottom rule to hint input boundary */
  border-bottom: 1px solid currentColor;
}

/* focus state for keyboard users */
#fuzzySearchContainer:focus-within #fuzzySearchInput {
  outline: none;
  border-bottom-width: 2px;
}

/* placeholder tone (keeps it minimal) */
#fuzzySearchInput::placeholder {
  opacity: 0.6;
}

/* results region — invisible until used */
#fuzzySearchResults {
  margin-top: 6px;
  width: 100%;
}

/* remove default form submit focus outline for mouse but keep keyboard focus */
#searchIcon:focus {
  outline: 2px solid Highlight; /* system keyboard focus color */
  outline-offset: 2px;
}

/* very small-device tweak */
@media (max-width: 420px) {
  #fuzzySearchContainer {
    gap: 6px;
  }
  #fuzzySearchInput {
    padding: 6px 4px;
  }
}
