.github-corner svg {
    fill: var(--primary-light-color);
    color: var(--page-background-color);
    width: 72px;
    height: 72px;
}

@media screen and (max-width: 767px) {
    .github-corner svg {
        width: 50px;
        height: 50px;
    }
    #projectnumber {
        margin-right: 22px;
    }
}

.alter-theme-button {
    display: inline-block;
    cursor: pointer;
    background: var(--primary-color);
    color: var(--page-background-color) !important;
    border-radius: var(--border-radius-medium);
    padding: var(--spacing-small) var(--spacing-medium);
    text-decoration: none;
}

.next_section_button {
    display: block;
    padding: var(--spacing-large) 0 var(--spacing-small) 0;
    color: var(--page-background-color);
    user-select: none;
}

.next_section_button::after {
    /* clearfix */
    content: "";
    clear: both;
    display: table;
}

.next_section_button a {
    overflow: hidden;
    float: right;
    border: 1px solid var(--separator-color);
    padding: var(--spacing-medium) calc(var(--spacing-large) / 2) var(--spacing-medium) var(--spacing-large);
    border-radius: var(--border-radius-medium);
    color: var(--page-secondary-foreground-color) !important;
    text-decoration: none;
    background-color: var(--page-background-color);
    transition: color .08s ease-in-out, background-color .1s ease-in-out;
}

.next_section_button a:hover {
    color: var(--page-foreground-color) !important;
    background-color: var(--odd-color);
}

.next_section_button a::after {
    content: '〉';
    color: var(--page-secondary-foreground-color) !important;
    padding-left: var(--spacing-large);
    display: inline-block;
    transition: color .08s ease-in-out, transform .09s ease-in-out;
}

.next_section_button a:hover::after {
    color: var(--page-foreground-color) !important;
    transform: translateX(3px);
}

.alter-theme-button:hover {
    background: var(--primary-dark-color);
}

html.dark-mode .darkmode_inverted_image img, /* < doxygen 1.9.3 */
html.dark-mode .darkmode_inverted_image object[type="image/svg+xml"] /* doxygen 1.9.3 */ {
    filter: brightness(87%) hue-rotate(180deg) invert();
}

.bordered_image {
    border-radius: var(--border-radius-small);
    border: 1px solid var(--separator-color);
    display: inline-block;
    overflow: hidden;
}

html.dark-mode .bordered_image img, /* < doxygen 1.9.3 */
html.dark-mode .bordered_image object[type="image/svg+xml"] /* doxygen 1.9.3 */ {
    border-radius: var(--border-radius-small);
}

.title_screenshot {
    filter: drop-shadow(0px 3px 10px rgba(0,0,0,0.22));
    max-width: 500px;
    margin: var(--spacing-large) 0;
}

.title_screenshot .caption {
    display: none;
}

/* ===== Preconditions (soft amber) ===== */
dl.section.pre {
    background-color: rgba(255, 200, 80, 0.08);
    border-left: 4px solid rgba(255, 180, 60, 0.55);
    padding: 10px 12px;
    margin: 12px 0;
    border-radius: 6px;
}

dl.section.pre dt {
    color: rgba(255, 190, 80, 0.95);
    font-weight: 600;
    letter-spacing: 0.3px;
}

dl.section.pre dd {
    opacity: 0.92;
}

dl.section.pre dt::before {
    content: "⚠ ";
}

/* ===== Notes (soft info tone) ===== */
dl.section.note {
    background-color: rgba(120, 160, 255, 0.07);
    border-left: 4px solid rgba(120, 160, 255, 0.45);
    padding: 10px 12px;
    margin: 12px 0;
    border-radius: 6px;
}

dl.section.note dt {
    color: rgba(140, 175, 255, 0.9);
    font-weight: 600;
    letter-spacing: 0.25px;
}

dl.section.note dd {
    opacity: 0.95;
}

dl.section.note dt::before {
    content: "⚠ ";
}



/* Return‑type column: give it a preferred width and cap it */
td.memItemLeft {
    width: 25%;                /* hint: aim for ~40% of table width */
    white-space: normal;
    overflow-wrap: break-word;
}


/* Highlight function brief in function text */
.memdoc > p:first-of-type {
    font-size: 1.06em;
    font-weight: 500;
    opacity: 0.92;
}

/* template parameter tables */
.tparams td.paramname {
    padding-right: 0.3em;
    white-space: nowrap; /* prevents ugly wrapping */
}




/* =========================================================
   COLOR PALETTE (VSCode-like, theme aware)
   ========================================================= */

:root {
    --tgen-primitive: #C586C0;              /* int, uint64_t */
    --tgen-keyword:   #569CD6;              /* const, constexpr, auto */
    --tgen-type:      #4EC9B0;              /* vector, pair, string */
    --tgen-namespace: #9CDCFE;              /* std */
    --tgen-function:  #4FC1FF;              /* function names */
    --tgen-param:     rgb(134, 169, 196);   /* parameter variables */
    --tgen-muted:     #9AA7B5;              /* punctuation */
}

html[data-theme="light"] {
    --tgen-primitive: #AF00DB;
    --tgen-keyword:   #0000FF;
    --tgen-type:      #267F99;
    --tgen-namespace: #001080;
    --tgen-function:  #795E26;
    --tgen-param:     rgb(51, 92, 128);
    --tgen-muted:     #6A737D;
}

/* =========================================================
   BASE SIGNATURE LOOK
   ========================================================= */

.memproto,
.memItemLeft,
.memItemRight {
    font-family: var(--font-family-monospace);
}

/* punctuation softer */
.memproto td { color: var(--tgen-muted); }

.mlabel {
    color: var(--on-primary-color) !important;
}

/* =========================================================
   FULL FUNCTION SIGNATURE (the big declaration block)
   ========================================================= */

/* prevent doxygen from fighting our tokenizer */
.memproto .keywordtype,
.memproto .keyword,
.memproto .stringliteral,
.memproto .comment {
    color: inherit;
    font-weight: inherit;
}

/* return type */
.tgen-return {
    letter-spacing: 0.02em;
}
.tgen-return::after { content: "\00A0"; }

/* function name */
.tgen-name {
    color: var(--tgen-function);
    font-weight: 700;
}

/* namespaces */
.tgen-hl.namespace { color: var(--tgen-namespace); }

/* primitives */
.tgen-hl.primitive { color: var(--tgen-primitive); }

/* types */
.tgen-hl.type { color: var(--tgen-type); }

/* keywords */
.tgen-hl.keyword { color: var(--tgen-keyword); }

/* params */
.paramname em,
.tgen-hl.param { color: var(--tgen-param); }

/* =========================================================
   MEMBER TABLES (namespace/class function lists)
   ========================================================= */

/* primitives */
.memItemLeft .keywordtype,
.memItemRight .keywordtype {
    color: var(--tgen-primitive);
}

/* keywords */
.memItemLeft .keyword,
.memItemRight .keyword {
    color: var(--tgen-keyword);
}

/* STL & user types */
.memItemLeft .type,
.memItemRight .type {
    color: var(--tgen-type);
}

/* namespaces */
.memItemLeft .namespace,
.memItemRight .namespace {
    color: var(--tgen-namespace);
}

/* function name links */
.memItemRight a.el {
    color: var(--tgen-function);
    font-weight: 600;
    text-decoration: none;
}
.memItemRight a.el:hover {
    text-decoration: underline;
}

/* parameter names */
.memItemRight .paramname {
    color: var(--tgen-param);
}
.memItemRight .paramdefval {
    font-weight: 600;
}

/* =========================================================
   MEMPROTO PARAMETER TABLE (multi-line parameter lists)
   ========================================================= */

.memproto .paramname .paramname { color: var(--tgen-param); }
.memproto .paramname { font-weight: 400; }
.memproto .paramname .paramdefval { font-weight: 600; }

/* templates softer */
.memproto .template { opacity: 0.85; }

/* =========================================================
   SMALL POLISH
   ========================================================= */

.memproto .mlabel {
    opacity: 0.75;
    font-weight: 500;
}

.memproto .mlabel.inline {
    color: var(--tgen-keyword);
}


/* inline stuff */
.texttt {
    font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
    font-size: 0.95em;
}
.tgen-type {
    color: var(--tgen-type);
    font-weight: 500;
}
.tgen-func {
    color: var(--tgen-func);
    font-weight: 600;
}
.tgen-code {
    font-family: var(--font-family-monospace);

    font-size: 0.95em;
    line-height: 1;
    display: inline;

    padding: 0.10em 0.34em;
    border-radius: 6px;
    vertical-align: baseline;
}
.tgen-code {
    font-family: var(--font-family-monospace);
    font-size: 0.95em;
    line-height: 1;
    padding: 0.08em 0.34em;
    border-radius: 6px;
    vertical-align: baseline;

    /* LIGHT MODE (default) — matches your block */
    background-color: #f3f4f6;
    color: #24292e;
    border: 1px solid #d1d5da;
}

/* DARK MODE override */
html.dark-mode .tgen-code {
    background-color: #2b3136;
    color: #cfe0ff;
    border: 1px solid #3a4046;
}
.tgen-primitive {
    color: var(--tgen-primitive);
    opacity: 0.85;
}

/* inline namespace in prose (std::, tgen::, etc) */
.tgen-ns {
    font-family: var(--font-family-monospace);
    font-size: 0.95em;

    color: var(--tgen-namespace);
    opacity: 0.85;

    letter-spacing: 0.01em;
}




/* ===== GitHub corner ===== */

/* Proper corner ribbon */

.github-corner {
  position: fixed;
  top: 0;
  right: 0;
  width: 95px;
  height: 95px;
  z-index: 10000;
  overflow: hidden;
  pointer-events: auto;
}

.github-corner svg {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
}

/* triangle */
.github-corner .corner-bg {
  fill: var(--primary-color);
}

/* octocat */
.github-corner .octo-arm {
  fill: #ffffff;
  transform-origin: 130px 106px;
}

/* wave animation */
.github-corner:hover .octo-arm {
  animation: octo-wave 560ms ease-in-out;
}

@keyframes octo-wave {
  0%,100% { transform: rotate(0); }
  20%,60% { transform: rotate(-25deg); }
  40%,80% { transform: rotate(10deg); }
}

@media (max-width: 768px) {
  .github-corner { display: none; }
}





/* horizontal layout */
.top-buttons {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;   /* pushes to right side of navbar */
	margin-top: 8px;
}

/* prevent shield from baseline misalignment */
.top-buttons img {
    display: block;
}

.top-buttons img,
#github-button a,
#projectlogo img {
  display: block;
}

/* remove previous margin hacks */
#github-button {
    margin: 0;
	position: relative;
    top: 2px; 
}



#projectlogo img {
  max-height: 55px;
  height: 40px;
  width: auto;
  vertical-align: middle;
}




/* LOGO - Light mode (default) */
html.light-mode #logo {
    content: url("tgen_logo_black.svg");
}

/* LOGO - Dark mode */
html.dark-mode #logo {
    content: url("tgen_logo_white.svg");
}

/* Light mode */
html.light-mode #projectlogo img {
    content: url("tgen_logo_black_small.svg");
}

/* Dark mode */
html.dark-mode #projectlogo img {
    content: url("tgen_logo_white_small.svg");
}



/* prevent link flash inside signatures */
.tgen-name a {
  color: inherit !important;
  text-decoration: none !important;
  pointer-events: none;
  cursor: default;
}


