:root {
  --dark: #202020;
  --light: #eaeaea;

  --dark-main: var(--dark-color, #1f436b);
  --dark-secondary: var(--dark-light, #14405a);
  --light-main: var(--light-color, #9fc8f7);
  --light-secondary: var(--light-light, #b7d0e2);

  /* Day Theme */

  --main-color: var(--dark-main);
  --main-color-light: var(--dark-secondary);
  --secondary-color: var(--light-main);
  --secondary-light: var(--light-secondary);

  --text-color: var(--dark);
  --text-color-dark: #000000;
  --background-color: var(--light);
  --background-light: #ffffff;
  --shadow-color: rgba(0, 0, 0, 0.25);
}

/* Night Theme */
.night-theme {
  --main-color: var(--light-main);
  --main-color-light: var(--light-secondary);
  --secondary-color: var(--dark-main);
  --secondary-light: var(--dark-secondary);

  --text-color: var(--light);
  --text-color-dark: #ffffff;
  --background-color: var(--dark);
  --background-light: #000000;
  --shadow-color: rgba(255, 255, 255, 0.25);
}

#content {
  font-family: var(--font-family);
}

body {
  font-family: var(--font-family);
  font-size: 12pt;
  color: var(--text-color);
  background: var(--background-color);
}

.chn {
  font-family: var(--font-family-chn);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

code {
  font-family: var(--font-code);
  font-size: 10pt;
  color: var(--text-color);
  background: var(--background-color);
}

#content h1 {
  color: var(--main-color);
  text-align: center;
  margin-top: 1em;
  font-size: 16pt;
}

h2 {
  color: var(--main-color-light);
  margin-top: 1em;
  font-size: 14pt;
}

h3 {
  color: var(--main-color);
  margin-top: 1em;
  font-size: 12pt;
}

#content h6 {
  text-align: center;
  margin-top: 1em;
}

largertitle {
  margin-top: 1em;
  margin-bottom: 0.5em;
  text-align: center;
  font-size: 200%;
  font-weight: bold;
  border-bottom: 3px solid;
  border-color: var(--text-color);
  padding-top: 0.5em;
  padding-bottom: 0.5em;
  display: block;
  width: 100%;
}

.largertitle {
  margin-top: 0.5em;
  margin-bottom: 0.25em;
  text-align: center;
  font-size: 200%;
  font-weight: bold;
  padding-top: 0.25em;
  padding-bottom: 0.25em;
}

a {
  color: var(--main-color);
}

a:visited {
  color: var(--main-color);
}

.topnav {
  display: inline-block;
  position: fixed;
  top: 0px;
  left: 3px;
  right: 3px;
  background: linear-gradient(to bottom, var(--dark-main) 0%, var(--dark-secondary) 100%);
  color: var(--light);
  font-size: 16px;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.6);
  padding: 7px 12px;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    /* top highlight */ inset 0 -1px 0 rgba(0, 0, 0, 0.3),
    /* bottom inset */ 0 2px 6px rgba(0, 0, 0, 0.4); /* outer shadow */
  max-height: 36px;
  overflow: auto;
  white-space: nowrap;
  margin: 0 auto;
  z-index: 1000;
  backdrop-filter: blur(3px);
}

.topnav a {
  color: var(--light-main);
  text-align: center;
  padding: 7px 12px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 16px;
  display: inline-block;
}

.topnav a:visited {
  color: var(--light-main);
}

.topnav a:hover {
  background: linear-gradient(to bottom, var(--light-main) 0%, var(--light-secondary) 100%);
  color: var(--dark-secondary);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    0 2px 6px rgba(0, 0, 0, 0.5);
}

.topnav a:active {
  background: linear-gradient(to top, var(--light-main) 0%, var(--light-secondary) 100%);
  color: var(--dark);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    0 2px 6px rgba(0, 0, 0, 0.5);
  transform: translateY(0.25px);
}

.topnav a.active {
  background: linear-gradient(to top, var(--light-main) 0%, var(--light-secondary) 100%);
  color: var(--dark);
  cursor: default;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    0 2px 6px rgba(0, 0, 0, 0.5);
  transform: translateY(0.25px);
}

.topnav a.logo {
  padding: 0;
}

.topnav a.logo img {
  vertical-align: middle;
  height: 25px;
  width: 25px;
}

.navbar-print {
  display: none;
}

.botnav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  position: fixed;
  bottom: 0px;
  left: 3px;
  right: 3px;
  background: linear-gradient(to bottom, var(--light-main) 0%, var(--light-secondary) 100%);
  color: var(--dark);
  font-size: 14px;
  line-height: 1.2;
  text-shadow: 0 -0.5px 0 rgba(0, 0, 0, 0.6);
  padding: 8px 10px;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3),
    0 -2px 6px rgba(0, 0, 0, 0.4);
  margin: 0 auto;
  max-height: none;
  overflow: auto;
  white-space: normal;
  z-index: 1000;
  backdrop-filter: blur(3px);
}

.botnav::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.botnav a {
  color: var(--dark-main);
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.botnav a:visited {
  color: var(--dark-main);
}

.botnav-credit {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  white-space: nowrap;
}

.botnav-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1;
}

.botnav-icon {
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
  color: var(--dark-main);
  position: relative;
  top: 0;
}

.botnav-sep {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  opacity: 0.7;
  user-select: none;
}

.column {
  float: left;
  width: 50%;
}

.row:after {
  content: '';
  display: table;
  clear: both;
}

#content {
  margin: 0 auto;
  max-width: 90%;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  box-sizing: border-box;
}

.vfill {
  flex: 1;
}

button {
  font-family: var(--font-family);
  font-size: 16px;
  padding: 10px 25px;
  color: var(--secondary-color);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);

  background: linear-gradient(to bottom, var(--main-color) 0%, var(--main-color-light) 100%);
  border: 1px solid var(--main-color);
  border-radius: 8px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3),
    0 2px 6px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
  transform: translateY(0px);
}

button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 45%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.1));
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  pointer-events: none;
}

button:hover:not(:disabled) {
  background: linear-gradient(to bottom, var(--main-color-light) 0%, var(--main-color) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    0 5px 10px rgba(0, 0, 0, 0.6);
  transform: translateY(0px);
}

button:active:not(:disabled) {
  background: linear-gradient(to bottom, var(--main-color-light) 0%, var(--main-color) 100%);
  box-shadow:
    inset 0 2px 3px rgba(0, 0, 0, 0.5),
    inset 0 -3px 4px rgba(0, 0, 0, 0.6),
    0 1px 4px rgba(0, 0, 0, 0.5);
  transform: translateY(2px);
}

button:disabled {
  border: 1px solid #4a5253;
  background: #4a5253;
  color: #443f39;
  cursor: default;
}

textarea {
  font-family: var(--font-family);
  font-size: 14px;
  color: var(--text-color-dark);
  background-color: var(--background-light);
  border-color: var(--text-color);
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid #bbb;
  width: 75%;
  margin: 0 auto 0 auto;
  display: block;
  resize: none;
  height: auto;
  overflow: hidden;
}

input {
  font-family: var(--font-family);
  font-size: 14px;
  color: var(--text-color-dark);
  background-color: var(--background-light);
  border-color: var(--text-color);
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid #bbb;
}

.button-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 120px;
}

.button-wrapper span {
  margin-right: 10px;
  font-size: 16px;
}

.buttons-container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: 100%;
}

.switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 70px;
  height: 34px;
  overflow: hidden;
}

/* Hide the default HTML checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider/round button */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #bebdbc;
  transition: 0.4s;
  border-radius: 34px;
}

/* The circle inside the switch, initially with a background image */
.slider:before {
  position: absolute;
  content: '';
  height: 26px;
  width: 26px;
  border-radius: 50%;
  left: 4px;
  bottom: 4px;
  background-image: url('/logos/no.png');
  background-size: cover;
  transition: 0.4s;
}

input:checked + .slider {
  background-color: #e2cf72;
}

input:checked + .slider:before {
  transform: translateX(25px);
  background-image: url('/logos/yes.png');
}
.choices input {
  margin-right: 10px;
}

#timer {
  position: fixed;
  top: 60px;
  left: 3px;
  background-color: var(--secondary-color);
  padding: 10px 15px;
  border-radius: 8px;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

#login {
  position: fixed;
  top: 60px;
  right: 3px;
  background: linear-gradient(
    to bottom,
    var(--secondary-color) 0%,
    var(--secondary-light) 100%
  ); /* Soft light gradient */
  color: var(--main-color); /* Dark brown text */
  padding: 10px 15px;
  border-radius: 8px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    /* top inner highlight */ inset 0 -1px 0 rgba(0, 0, 0, 0.3),
    /* bottom inner shadow */ 0 2px 6px rgba(0, 0, 0, 0.4); /* outer shadow */
  z-index: 1000;
  text-decoration: none;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4); /* Subtle text shadow for embossed look */
  display: inline-block;
  transition: all 0.2s ease; /* For smooth hover and active transitions */
}

#login:hover {
  background: linear-gradient(
    to bottom,
    var(--secondary-light) 0%,
    var(--secondary-color) 100%
  ); /* Inverse gradient on hover */
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    0 2px 6px rgba(0, 0, 0, 0.5); /* Slightly darker shadow for hover effect */
}

#login:active {
  background: linear-gradient(
    to bottom,
    var(--secondary-light) 0%,
    var(--secondary-color) 100%
  ); /* Active state with inverse gradient */
  box-shadow:
    inset 0 2px 3px rgba(0, 0, 0, 0.5),
    /* Deeper inner shadow for active press effect */ inset 0 -3px 4px rgba(0, 0, 0, 0.6),
    /* Stronger bottom inner shadow */ 0 1px 4px rgba(0, 0, 0, 0.5); /* More pronounced outer shadow */
  transform: translateY(2px); /* Simulate the pressing down effect */
}

#lang {
  position: fixed;
  bottom: 60px;
  right: 3px;
  background: linear-gradient(to bottom, var(--text-color) 0%, var(--text-color-dark) 100%);
  width: 25px;
  height: 25px;
  line-height: 25px;
  font-size: 10px;
  text-align: center;
  color: var(--secondary-light);
  padding: 5px 5px;
  border-radius: 8px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3),
    0 2px 6px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  text-decoration: none;
  text-shadow: 0 0.75px 0 rgba(255, 255, 255, 0.4);
  display: inline-block;
  transition: all 0.2s ease;
  cursor: pointer;
  user-select: none;
}

#lang:hover {
  background: linear-gradient(to bottom, var(--text-color) 0%, var(--text-color-dark));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    0 2px 6px rgba(0, 0, 0, 0.5);
}

#lang:active {
  background: linear-gradient(to bottom, var(--text-color-dark) 0%, var(--text-color));
  box-shadow:
    inset 0 2px 3px rgba(0, 0, 0, 0.5),
    inset 0 -3px 4px rgba(0, 0, 0, 0.6),
    0 1px 4px rgba(0, 0, 0, 0.5);
  transform: translateY(2px);
  cursor: pointer;
}

.exam-container {
  width: 80%; /* Or set to a specific pixel value, like 600px */
  max-width: 800px; /* Max width of the container */
  margin: 0 auto; /* Centers the container */
  padding: 20px;
  box-sizing: border-box;
}

.login-grid {
  display: inline-grid;
  grid-template-columns: 1fr 2fr;
  gap: 25px;
  max-width: 500px;
  background: var(--secondary-light);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

table {
  margin-left: auto;
  margin-right: auto;
  border-collapse: collapse;
}

table,
th,
td {
  border: 0.5px solid var(--main-color);
}

th {
  background-color: var(--main-color);
  color: var(--secondary-light);
  padding: 8px;
}

td {
  padding: 8px;
}

tr:nth-child(even) {
  background-color: var(--secondary-light);
}

tr:nth-child(odd) {
  background-color: var(--secondary-color);
}

@media print {
  #day-night,
  #agent-toggle,
  #agent-panel {
    display: none !important;
  }

  .topnav {
    display: none !important;
  }

  .break {
    display: none !important;
  }

  .navbar-print {
    background-color: #ffffff !important;
    color: var(--main-color) !important;
    display: block !important;
    margin-bottom: 20px;
  }

  th {
    background-color: #ffffff !important;
    color: var(--main-color) !important;
    padding: 8px;
  }
}

#dynamic-island {
  position: fixed;
  top: 60px;
  left: 50%;
  background: linear-gradient(to bottom, var(--text-color) 0%, var(--text-color-dark) 100%);
  height: 25px;
  line-height: 25px;
  font-size: 10px;
  text-align: center;
  color: var(--secondary-light);
  padding: 5px 5px;
  border-radius: 8px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3),
    0 2px 6px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  text-decoration: none;
  text-shadow: 0 0.75px 0 rgba(255, 255, 255, 0.4);
  display: inline-block;
  transition: all 0.2s ease;
  cursor: pointer;
  user-select: none;
}

#dynamic-island:hover {
  background: linear-gradient(to bottom, var(--text-color) 0%, var(--text-color-dark));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    0 2px 6px rgba(0, 0, 0, 0.5);
}

#dynamic-island:active {
  background: linear-gradient(to bottom, var(--text-color-dark) 0%, var(--text-color));
  box-shadow:
    inset 0 2px 3px rgba(0, 0, 0, 0.5),
    inset 0 -3px 4px rgba(0, 0, 0, 0.6),
    0 1px 4px rgba(0, 0, 0, 0.5);
  transform: translateY(2px);
  cursor: pointer;
}

.utility-button {
  background: linear-gradient(to bottom, var(--text-color) 0%, var(--text-color-dark) 100%);
  height: 25px;
  min-width: 25px;
  line-height: 25px;
  font-size: 12px;
  font-family: var(--font-family);
  text-align: center;
  color: var(--secondary-light);
  padding: 5px 8px;
  border: none;
  border-radius: 8px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3),
    0 2px 6px rgba(0, 0, 0, 0.4);
  text-decoration: none;
  text-shadow: 0 0.75px 0 rgba(255, 255, 255, 0.4);
  display: inline-block;
  transition: all 0.2s ease;
  cursor: pointer;
  user-select: none;
  position: relative;
  overflow: visible;
  transform: none;
  white-space: nowrap;
  box-sizing: content-box;
}

.utility-button::before {
  display: none;
}

.utility-button:hover,
.utility-button:hover:not(:disabled) {
  background: linear-gradient(to bottom, var(--text-color) 0%, var(--text-color-dark));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    0 2px 6px rgba(0, 0, 0, 0.5);
  transform: none;
  color: var(--secondary-light);
}

.utility-button:active,
.utility-button:active:not(:disabled) {
  background: linear-gradient(to bottom, var(--text-color-dark) 0%, var(--text-color));
  box-shadow:
    inset 0 2px 3px rgba(0, 0, 0, 0.5),
    inset 0 -3px 4px rgba(0, 0, 0, 0.6),
    0 1px 4px rgba(0, 0, 0, 0.5);
  transform: translateY(2px);
  color: var(--secondary-light);
}

#day-night {
  position: fixed;
  bottom: 42px;
  left: 12px;
  width: 25px;
  font-size: 20px;
  padding: 5px;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.utility-icon {
  display: block;
  flex-shrink: 0;
  color: inherit;
}

ruby {
  font-size: 1em;
  margin-right: 0.15em;
}
rt {
  font-size: 0.5em;
  color: var(--main-color-light);
}

#result-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  background: var(--shadow-color);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

#result-box {
  position: relative;
  background: var(--background-color);
  border-radius: 12px;
  box-shadow: 0 8px 32px var(--shadow-color);
  padding: 32px 60px;
  min-width: 280px;
  max-width: 75%;
  font-size: 1.2em;
  color: var(--text-color-dark);
  font-weight: bold;
  text-align: center;
}

#close-modal-btn {
  position: absolute;
  top: 12px;
  right: 14px;
  background: #b01212;
  color: #fff;
  padding: 1px 5px;
  border-color: #850b0b;
}

.clms {
  margin-bottom: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.led-ticker {
  display: inline-block;
  overflow: hidden;
  vertical-align: middle;
  width: 90%;
  box-sizing: border-box;
}

.led-message {
  display: inline-block;
  color: var(--dark);
  font-weight: 10;
  font-size: 16px;
  will-change: transform;
}

@keyframes led-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

.night-theme #pdf-render,
#pdf-render-top,
#pdf-render-bottom {
  filter: invert(0.88) hue-rotate(180deg);
}

.day-theme #pdf-render,
#pdf-render-top,
#pdf-render-bottom {
  filter: invert(0.08) hue-rotate(0deg);
}

.textLayer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  line-height: 1;
  font-family: sans-serif;
  white-space: pre;
  transform-origin: 0 0;
  color: rgba(0, 0, 0, 0);
}
.textLayer span {
  position: absolute;
  cursor: text;
}

#pdf-viewer-container {
  position: relative;
  margin: 20px auto;
}

.block-container {
  display: flex;
  max-width: 95%;
  margin: 40px auto;
  background: var(--background-light);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  overflow: hidden;
}
.left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light-light);
  min-width: 220px;
}
.image-center {
  background: var(--background-color);
  max-width: 75%;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.09);
}
.right {
  flex: 2;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.block-container > .right > .title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 18px;
  color: var(--main-color);
  line-height: 1.35;
}
.block-container .description {
  color: var(--text-color);
  font-size: inherit;
  line-height: inherit;
  margin: 0;
  opacity: 1;
}

/* Compact collapsible cards (Notes / Projects) */
.block-container:has(.block-header) {
  margin: 0.65rem auto;
  box-shadow: 0 1px 6px color-mix(in srgb, var(--shadow-color) 55%, transparent);
  border: 1px solid color-mix(in srgb, var(--main-color) 14%, transparent);
  border-radius: 8px;
}
.block-container:has(.block-header) > .right {
  padding: 0.7rem 0.95rem;
  width: 100%;
}
.block-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
  width: 100%;
  margin: 0;
  padding: 0.15rem 0;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}
.block-header:hover .title {
  color: var(--main-color);
}
.block-header .title {
  font-size: 0.98rem;
  font-weight: 650;
  margin: 0;
  color: var(--main-color);
  flex: 1 1 12rem;
  min-width: 0;
  line-height: 1.35;
}
.block-header .choices-list {
  flex: 0 1 auto;
  margin: 0;
}
.block-chevron {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  margin-left: auto;
  color: var(--main-color);
  opacity: 0.75;
  transition: transform 0.18s ease;
}
.block-container:not(.is-collapsed) .block-chevron {
  transform: rotate(180deg);
}
.block-body {
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid color-mix(in srgb, var(--main-color) 16%, transparent);
}
.block-container.is-collapsed .block-body {
  display: none;
}
.block-container:has(.block-header) .block-body .description {
  font-size: 0.86rem;
  line-height: 1.45;
  margin: 0 0 0.65rem;
  opacity: 0.92;
}
.block-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
a.block-link-btn {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  line-height: 1.2;
  padding: 0.32em 0.72em;
  border-radius: 5px;
  border: 1px solid color-mix(in srgb, var(--main-color) 35%, transparent);
  background: color-mix(in srgb, var(--main-color) 8%, var(--background-light));
  color: var(--main-color);
  text-decoration: none !important;
  box-shadow: none;
}
a.block-link-btn:hover {
  background: color-mix(in srgb, var(--main-color) 16%, var(--background-light));
  border-color: var(--main-color);
}
@media (max-width: 900px) {
  .block-container {
    flex-direction: column;
  }
  .left {
    min-width: 0;
    justify-content: center;
    padding: 24px 0;
  }
  .right {
    padding: 24px;
  }
  .block-container > .right > .title {
    font-size: 1.3rem;
  }
  .block-container:has(.block-header) > .right {
    padding: 0.65rem 0.8rem;
  }
  .block-header .title {
    font-size: 0.95rem;
    flex-basis: 100%;
  }
  .image-center {
    width: 100%;
  }
}
.choices-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-start;
  align-items: center;
  height: auto;
  overflow: visible;
}

.choices-list.filter-bar {
  justify-content: center;
  margin: 1rem 0 0.35rem;
  padding: 0.15rem 0;
}

.choice-item button {
  background: var(--background-light);
  border: 1px solid color-mix(in srgb, var(--main-color) 32%, transparent);
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-family);
  font-size: 12px;
  line-height: 1.2;
  padding: 0.5em 0.95em;
  color: var(--text-color);
  white-space: nowrap;
  box-shadow: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.choice-item button:hover {
  background: color-mix(in srgb, var(--main-color) 10%, var(--background-light));
  border-color: var(--main-color);
  color: var(--main-color);
}

.choice-item button:active {
  background: color-mix(in srgb, var(--main-color) 18%, var(--background-light));
  border-color: var(--main-color);
  color: var(--main-color);
}

.choice-item button.active {
  background: var(--main-color);
  border-color: var(--main-color);
  color: var(--background-light);
}

/* Decorative tags on each card — not filter controls */
.block-container .choice-item .tag,
.block-container .choice-item button {
  display: inline-flex;
  align-items: center;
  cursor: default;
  pointer-events: none;
  padding: 0.28em 0.58em;
  font-size: 0.72rem;
  line-height: 1.2;
  border-radius: 4px;
  opacity: 0.92;
  background: color-mix(in srgb, var(--main-color) 8%, var(--background-light));
  border: 1px solid color-mix(in srgb, var(--main-color) 28%, transparent);
  color: var(--text-color);
  white-space: nowrap;
}

.block-container .choice-item button.active,
.block-container .choice-item button:hover,
.block-container .choice-item button:active {
  background: color-mix(in srgb, var(--main-color) 8%, var(--background-light));
  border-color: color-mix(in srgb, var(--main-color) 28%, transparent);
  color: var(--text-color);
}

.rounded-block {
  background: var(--secondary-light);
  border-radius: 8px;
  padding: 8px;
  margin: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: block;
  max-width: 95%;
}
