html {
  scroll-behavior: smooth;
}

header#page-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #f0f0f0;
  padding: 1em;
  border-bottom: 1px solid #ccc;
}

header h1 {
  margin: 0;
  font-variant: small-caps;
  font-size: 1.8em;
}

#breadcrumbs {
  margin-top: 0.5em;
  font-variant: small-caps;
  font-size: 0.9em;
}

#breadcrumbs a {
  color: inherit;
  text-decoration: none;
  margin-right: 0.25em;
}

#breadcrumbs a:hover {
  text-decoration: underline dotted;
}

#breadcrumbs span {
  font-weight: bold;
}

body {
  margin: 0px;
  padding: 0px;
  overflow-x: hidden;
  overflow-y: visible;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #f5f5f5; /* near-white */
}


#main-content {
  margin-left:  10px;
  padding-left:  8px;
  margin-right: 10px;
  padding-bottom: 0.5rem;
}

#group-page-footer {
  margin-top: 0.5rem;
  background-color: #f0f0f0;
  border-top: 1px solid #ccc;
  padding-top:  8px;
  margin-left:  0px;
  padding-left:  18px;
  margin-right: 0px;
  padding-bottom: 2.5rem;
}

table {
  border-collapse: collapse;
  margin-top: 1em;
}

th, td {
  padding: 6px 10px;
  text-align: center;
}

table.class-table,
table.char-table,
table.brauer-char-table,
table.max-table,
table.sylow-table {
  border: 1px solid #444;
}

.char-table-scroll,
.table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

table.types-table th,
table.types-table td {
  text-align: left;
}


table.class-table th,
table.class-table td,
table.char-table th,
table.char-table td,
table.brauer-char-table th,
table.brauer-char-table td,
table.max-table th,
table.max-table td,
table.sylow-table th,
table.sylow-table td {
  border: 1px solid #444;
  padding: 4px 6px;
}
#class-table tr:nth-child(odd),
#perm-table tr:nth-child(odd),
#lin-table tr:nth-child(odd),
#max-table tr:nth-child(odd),
#sylow-table tr:nth-child(odd) {
  background-color: #e9e9e9;
}

.dec-table {
  border-collapse: collapse;
  margin-top: 1em;
}

.dec-table thead th:first-child,
.dec-table tbody th:first-child {
  border-right: 2px solid black; /* vertical line through header and body */
}

.dec-table th,
.dec-table td {
  border: 1px solid #ccc;
  padding: 4px 8px;
  text-align: right;
}

.dec-table th:first-child,
.dec-table td:first-child {
  text-align: left; /* Align character names on the left */
}

.dec-table thead th {
  border-bottom: 2px solid black; /* horizontal line below header row */
}


.dec-table tr:first-child th,
.dec-table tr:first-child td {
  border-top: 2px solid black; /* top border */
}

.dec-table tr:last-child th,
.dec-table tr:last-child td {
  border-bottom: 2px solid black; /* bottom border */
}

.highlight-row {
  background-color: #ffeeba;
}

.highlight-col {
  background-color: #d4edda;
}

.highlight-row .highlight-col,
.highlight-col.highlight-row {
  background-color: #f7c08a !important; /* orange for intersection */
}

.cartan-matrix td {
  padding: 2px 6px;
  text-align: right;
  border: none;
}

.cartan-matrix {
  border-collapse: collapse;
  margin: 0.5em 0;
}

#nav-panel {
  position: fixed;
  top: 100px;
  top: 0;
  right: 0;
  z-index: 1100;
  width: 15rem;
  max-height: 100vh;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #d8d8d8;
  border-right: 0;
  border-top: 0;
  border-radius: 0 0 0 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 0.75rem 1rem;
  transition: width 0.2s ease, padding 0.2s ease;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
}

#nav-panel h3 {
  margin: 0;
  font-size: 1rem;
  white-space: nowrap;
}

#nav-panel ul {
  margin: 0.75rem 0 0;
  padding-left: 1rem;
}

#nav-panel li {
  margin-bottom: 6px;
}

#nav-panel a {
  text-decoration: none;
  color: #0074cc;
  padding: 2px 0;
  display: block;
}

#nav-panel a.active {
  font-weight: bold;
  color: #d33;
}

#nav-panel.collapsed {
  width: 6.75rem;
  padding: 0.75rem;
  overflow: hidden;
}

#nav-panel.collapsed ul {
  display: none;
}

#nav-panel.collapsed:hover,
#nav-panel.collapsed:focus-within {
  width: 15rem;
  padding: 0.75rem 1rem;
  overflow-y: auto;
}

#nav-panel.collapsed:hover ul,
#nav-panel.collapsed:focus-within ul {
  display: block;
}


.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 1000;
  background: #ffd;
  color: #000;
  padding: 8px 12px;
  text-decoration: none;
  font-weight: bold;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.skip-link:focus {
  position: fixed;
  top: 10px;
  left: 10px;
  width: auto;
  height: auto;
  clip: auto;
}

/* container ------------------------------------------------------------ */
#variant-selector,
.custom-dropdown {
  position: relative;
  display: inline-block;
  font-family: sans-serif;
}

/* closed button -------------------------------------------------------- */
.dropdown-button {
  background: #fff;
  border: 1px solid #aaa;
  padding: 4px 10px;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;          /* never wrap */
  box-sizing: border-box;       /* borders included in width */
  min-width: 160px;             /* safety floor if JS fails */
}

/* open list ------------------------------------------------------------ */
.dropdown-options {
  position: absolute;
  left: 0;
  top: 100%;
  background: #fff;
  border: 1px solid #aaa;
  box-shadow: 0 2px 5px rgba(0,0,0,.2);
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;
  white-space: nowrap;
  box-sizing: border-box;
  min-width: 0px;
  max-width: 100vw;             /* never exceed viewport */
}

.dropdown-options {
  width: max-content;
}
/* items ---------------------------------------------------------------- */
.dropdown-item {
  padding: 6px 10px;
  cursor: pointer;
}
.dropdown-item:hover { background:#f0f0f0; }

/* page must never pan sideways ---------------------------------------- */
/* make dropdown items use the normal body font size */
.dropdown-button,
.dropdown-options,
.dropdown-item {
  font-size: 1rem;   /* or just “inherit” */
  line-height: 1.3;  /* optional—gives a little breathing room */
}

/* Force Helvetica Neue for all normal math text */
mjx-container mjx-mi,
mjx-container mjx-mn,
mjx-container mjx-mtext {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
    font-style: normal !important;
    font-weight: normal !important;
}


/* mjx-container mjx-mi, mjx-mn, mjx-mtext { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important; } */


caption.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}






.mx-view, .mx-dl{ margin-left: .5rem; }


/* controls for the accordion */


.controls-accordion {
  margin: 0.5rem 0 0.75rem 0;
}

.controls-accordion > summary {
  cursor: pointer;
  user-select: none;
  font-weight: 600;
}


.controls-accordion > summary:focus {
  outline: 2px solid #888;
  outline-offset: 2px;
}
