/* Go2Core theme for Trac 1.6 — light + dark.
   html[data-theme] is set by the script in site_head.html from the user's
   choice (Light / Dark / System). Colours come from the logo. */

:root {
  --gc-brand: #2E318E;          /* navy: bars, primary accents */
  --gc-brand-dark: #1F2163;
  --gc-orange: #FF6B17;
  --gc-orange-dark: #D9530A;

  --gc-bg: #ffffff;
  --gc-surface: #F4F5FB;        /* panels, table heads, fieldsets */
  --gc-surface-2: #fafafa;      /* zebra rows, code */
  --gc-border: #d7d7e4;
  --gc-text: #1b1c2b;
  --gc-muted: #6b6f85;
  --gc-link: #2E318E;
  --gc-link-hover: #D9530A;
  --gc-hover-bg: #FFF4EC;       /* row hover / link hover wash */
  --gc-heading: #2E318E;
  --gc-input-bg: #ffffff;

  /* Typography: self-hosted, see site/fonts/fonts.css */
  --gc-font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gc-font-display: "Plus Jakarta Sans", var(--gc-font-sans);
  --gc-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

html[data-theme="dark"] {
  --gc-brand: #2E318E;
  --gc-brand-dark: #3A3EA8;
  --gc-orange: #FF7A2E;
  --gc-orange-dark: #FF8A45;

  --gc-bg: #12131c;
  --gc-surface: #1b1d2b;
  --gc-surface-2: #171925;
  --gc-border: #34385a;
  --gc-text: #e3e5f0;
  --gc-muted: #9ba0b8;
  --gc-link: #aab0ff;
  --gc-link-hover: #FF8A45;
  --gc-hover-bg: rgba(255, 122, 46, .12);
  --gc-heading: #c9ccff;
  --gc-input-bg: #0f1018;
  color-scheme: dark;
}

/* ---------- Base ---------- */
body {
  background: var(--gc-bg);
  color: var(--gc-text);
}

/* ---------- Typography ---------- */
body, th, tr, input, select, button, .trac-button {
  font-family: var(--gc-font-sans);
  font-feature-settings: "cv11", "ss03";   /* Inter: single-storey a, rounder quotes */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body { line-height: 1.5; }
h1, h2, h3, h4, h5, h6, #ctxtnav, legend, .gc-kpi-value, .gc-report-count, .gc-report-title,
#ticketbox > h1, #ticketbox > h2, .trac-heading {
  font-family: var(--gc-font-display);
  letter-spacing: -0.015em;
}
h1, h2, h3, h4 { font-weight: 700; }
#mainnav { font-family: var(--gc-font-display); letter-spacing: .04em; font-size: .85em; }
#mainnav li { font-weight: 700; }
#metanav, #ctxtnav { font-size: .88em; }
code, tt, pre, textarea, kbd, samp, .code, table.code, div.code pre, pre.wiki, pre.literal-block,
.diff pre, .diff table.trac-diff td, .trac-name, .wikitoolbar + textarea, textarea.wikitext {
  font-family: var(--gc-font-mono);
  font-variant-ligatures: none;
}
code, tt { font-size: .9em; }
table.listing, .gc-kpi-value, .gc-report-count, .gc-bar-count, .gc-recent-id { font-variant-numeric: tabular-nums; }
:link, :visited { color: var(--gc-link); border-bottom-color: color-mix(in srgb, var(--gc-link) 30%, transparent); }
:link:hover, :visited:hover { color: var(--gc-link-hover); background-color: var(--gc-hover-bg); box-shadow: 0 0 0 .15em var(--gc-hover-bg); }
h1, h2, h3, h4 { color: var(--gc-heading); }
#header h1 :link:hover, #header h1 :visited:hover { color: var(--gc-orange); }
#metanav :link, #metanav :visited { color: var(--gc-link); }
hr { border-top-color: var(--gc-border); }

/* Wiki headings: brand text, orange underline */
h1.section, h2.section, h3.section, h4.section, h5.section, h6.section { color: var(--gc-heading); }
h2.section, h2.section:target {
  background: linear-gradient(to top, transparent 0, transparent .8em,
    var(--gc-orange) .8em, var(--gc-orange) .9em, transparent .9em, transparent 100%);
}
h3.section, h3.section:target {
  background: linear-gradient(to top, transparent 0, transparent .8em,
    var(--gc-orange) .8em, var(--gc-orange) .85em, transparent .85em, transparent 100%);
}
h1:target, h2:target, h3:target, h4:target, h5:target, h6:target, span:target { background-color: var(--gc-hover-bg); }

/* ---------- Main navigation ---------- */
#mainnav { background: var(--gc-brand); border: 0; border-radius: .3em; box-shadow: none; }
#mainnav li { background: transparent; border: 0; border-right: 1px solid rgba(255, 255, 255, .15); margin: 0; }
#mainnav .last { border-right: 0; }
#mainnav :link, #mainnav :visited { color: #fff; border: 0; }
#mainnav :link:hover, #mainnav :visited:hover { background: var(--gc-brand-dark); color: #fff; }
#mainnav .active { border: 0; }
#mainnav .active :link, #mainnav .active :visited { background: var(--gc-orange); color: #fff; }
#ctxtnav li ul { background: var(--gc-surface); }
#ctxtnav li li :link:hover, #ctxtnav li li :visited:hover { background: var(--gc-brand); color: #fff; }

/* ---------- Forms & buttons ---------- */
input[type=text], input[type=password], input[type=email], input[type=number],
input[type=search], input[type=url], input:not([type]), textarea, select {
  background: var(--gc-input-bg);
  color: var(--gc-text);
  border: 1px solid var(--gc-border);
}
select[disabled] { background: var(--gc-surface); }
input[type=submit], input[type=button], input[type=reset], .trac-button {
  background: var(--gc-bg);
  color: var(--gc-link);
  border: 1px solid var(--gc-link);
  box-shadow: none;
  text-shadow: none;
}
input[type=submit]:hover, input[type=button]:hover, input[type=reset]:hover, .trac-button:hover {
  background: var(--gc-hover-bg); box-shadow: none; text-shadow: none;
}
input[type=submit][name=submit], input[type=submit].trac-button-primary,
#propertyform input[type=submit], #newticket input[type=submit][name=submit] {
  background: var(--gc-orange); border-color: var(--gc-orange-dark); color: #fff;
}
input[type=submit][name=submit]:hover { background: var(--gc-orange-dark); }
input:focus, textarea:focus, select:focus, button:focus-visible { outline: 2px solid color-mix(in srgb, var(--gc-orange) 55%, transparent); outline-offset: 1px; }
fieldset { background: var(--gc-surface); border-color: var(--gc-border); }
.collapsed legend.foldable { background: var(--gc-bg); }

/* ---------- Tables & listings ---------- */
table.listing thead tr, table.listing thead th { background: var(--gc-surface); }
table.listing thead th { border-bottom-color: var(--gc-brand); color: var(--gc-heading); }
table.listing, table.listing th, table.listing td { border-color: var(--gc-border); }
table.listing tbody tr.even { background-color: var(--gc-surface-2); }
table.listing tbody tr.odd { background-color: var(--gc-bg); }
table.listing tbody tr:hover td { background: var(--gc-hover-bg) !important; }
table.wiki th { background-color: var(--gc-surface); }
table.wiki tbody tr.even { background-color: var(--gc-surface-2); }
table.wiki tbody tr.odd { background-color: var(--gc-bg); }
table.wiki, table.wiki td, table.wiki th { border-color: var(--gc-border); }
pre.wiki, pre.literal-block, .wikipage pre, div.code { background: var(--gc-surface-2); border-color: var(--gc-border); }
code, tt { background: var(--gc-surface-2); }

/* ---------- Ticket box ---------- */
#ticketbox { background: var(--gc-surface); border-color: color-mix(in srgb, var(--gc-brand) 30%, transparent); }
#ticketbox > h1, #ticketbox > h2 { color: var(--gc-heading); }
#ticketbox > h2 .trac-status { color: var(--gc-orange-dark); }

/* "Download in other formats" (RSS / CSV / TSV / ...) links: hidden on every page */
#altlinks { display: none; }

/* ---------- Footer ---------- */
#footer {
  color: var(--gc-muted); border-top: 3px solid var(--gc-orange);
  display: flex; align-items: center; justify-content: space-between; gap: 1em; flex-wrap: wrap;
  padding-top: .9em;
}
#footer hr { display: none; }
/* Stock "Trac Powered" logo and "Powered by Trac / By Edgewall Software" text: replaced by site_footer.html */
#tracpowered, #footer p.left { display: none; }
#footer p.right { margin: 0; }
.gc-footer-brand { display: flex; align-items: center; gap: .8em; font-size: .9em; }
.gc-footer-brand :link, .gc-footer-brand :visited { border-bottom: 0; }
.gc-footer-logo img { display: block; height: 28px; width: auto; }
.gc-footer-logo:hover { background: none !important; box-shadow: none !important; }

/* ---------- Theme switcher ---------- */
#metanav li.gc-theme { padding-right: 0; }
.gc-theme-switch { display: inline-flex; border: 1px solid var(--gc-border); border-radius: 999px; overflow: hidden; vertical-align: middle; }
.gc-theme-switch button {
  font: inherit; font-size: .85em; line-height: 1; cursor: pointer;
  background: transparent; color: var(--gc-muted); border: 0; padding: .3em .7em;
}
.gc-theme-switch button + button { border-left: 1px solid var(--gc-border); }
.gc-theme-switch button:hover { color: var(--gc-text); background: var(--gc-hover-bg); }
.gc-theme-switch button[aria-pressed="true"] { background: var(--gc-brand); color: #fff; }

/* =================================================================
   Dark mode: Trac's stylesheets hard-code light backgrounds in many
   places; these map them onto the dark palette.
   ================================================================= */
/* Trac's light grey drop-shadows glow on a dark page; drop them all. */
html[data-theme="dark"] body * { box-shadow: none !important; text-shadow: none !important; }
html[data-theme="dark"] .gc-footer-logo img { background: #fff; border-radius: .3em; padding: .2em .4em; }
html[data-theme="dark"] #logo img { background: #fff; border-radius: .4em; padding: .3em .5em; }
html[data-theme="dark"] .anchor:link, html[data-theme="dark"] .anchor:visited { color: var(--gc-border); }
html[data-theme="dark"] #metanav form.trac-logout button { color: var(--gc-link); }

/* text colours Trac hard-codes as black / dark grey / dark red */
html[data-theme="dark"] .timeline dt :link, html[data-theme="dark"] .timeline dt :visited,
html[data-theme="dark"] .timeline dt em.trac-parent-resource, html[data-theme="dark"] .timeline dt :link:hover,
html[data-theme="dark"] fieldset.radio legend, html[data-theme="dark"] #prefs fieldset legend,
html[data-theme="dark"] .report div.reports h3 :link, html[data-theme="dark"] .report div.reports h3 :visited,
html[data-theme="dark"] .tickets tbody tr:hover, html[data-theme="dark"] .tickets tr.color3-odd,
html[data-theme="dark"] .tickets tr.color3-even, html[data-theme="dark"] .tickets tbody tr.fullrow td,
html[data-theme="dark"] .tickets tbody td.fullrow, html[data-theme="dark"] #tabs li li,
html[data-theme="dark"] #tabcontent > h2, html[data-theme="dark"] .trac-toggler,
html[data-theme="dark"] .milestone .info h2 :link, html[data-theme="dark"] .milestone .info h2 :visited,
html[data-theme="dark"] #content.search .filters, html[data-theme="dark"] .foldable :link,
html[data-theme="dark"] .foldable :visited, html[data-theme="dark"] .suggestions,
html[data-theme="dark"] a.missing:hover, html[data-theme="dark"] #header h1 :link:hover { color: var(--gc-text); }
html[data-theme="dark"] .timeline dt .trac-author, html[data-theme="dark"] .trac-author-user,
html[data-theme="dark"] p.hint, html[data-theme="dark"] span.hint, html[data-theme="dark"] span.trac-datetimehint,
html[data-theme="dark"] label.trac-textarea-hint, html[data-theme="dark"] p.help, html[data-theme="dark"] #altlinks li :link,
html[data-theme="dark"] #altlinks li :visited, html[data-theme="dark"] a.missing:link, html[data-theme="dark"] a.missing:visited,
html[data-theme="dark"] a.missing, html[data-theme="dark"] span.missing, html[data-theme="dark"] #attachments p,
html[data-theme="dark"] #content .paging :link, html[data-theme="dark"] #content .paging :visited,
html[data-theme="dark"] #content h2 .numresults, html[data-theme="dark"] #pagepath .sep,
html[data-theme="dark"] fieldset > legend.foldable :link, html[data-theme="dark"] fieldset > legend.foldable :visited,
html[data-theme="dark"] #content.prefs #tabs li, html[data-theme="dark"] #environmentinfo table td.file,
html[data-theme="dark"] #ticket th, html[data-theme="dark"] legend { color: var(--gc-muted); }
html[data-theme="dark"] .timeline dt em, html[data-theme="dark"] .report div.reports h3 em,
html[data-theme="dark"] .milestone .info h2 em, html[data-theme="dark"] .plugin > .foldable,
html[data-theme="dark"] button.trac-revert, html[data-theme="dark"] #metanav form.trac-logout button { color: var(--gc-orange-dark); }
html[data-theme="dark"] code, html[data-theme="dark"] tt { color: #ffb38a; }
html[data-theme="dark"] code, html[data-theme="dark"] tt { border-color: var(--gc-border); }

/* ticket box internals (olive/khaki in stock Trac) */
html[data-theme="dark"] #ticketbox table.properties { border-top-color: var(--gc-border); }
html[data-theme="dark"] #ticketbox table.properties > tbody > tr { border-bottom-color: var(--gc-border); }
html[data-theme="dark"] #ticketbox table.properties > tbody > tr > th,
html[data-theme="dark"] #ticketbox .date, html[data-theme="dark"] #changelog h3.change,
html[data-theme="dark"] #ticketchange h3.change { color: var(--gc-muted); }
html[data-theme="dark"] #ticketbox table.properties > tbody > tr > th.missing { color: color-mix(in srgb, var(--gc-muted) 55%, transparent); }
html[data-theme="dark"] #ticketbox div.description h2 { color: var(--gc-heading); border-bottom-color: var(--gc-border); }
html[data-theme="dark"] #ticketbox > h2 .trac-type { color: var(--gc-muted); }
html[data-theme="dark"] #changelog .changes, html[data-theme="dark"] #ticketchange .changes { color: var(--gc-text); border-color: var(--gc-border); }
html[data-theme="dark"] #changelog .changes tr, html[data-theme="dark"] .changes th, html[data-theme="dark"] .changes td { border-color: var(--gc-border); }

/* collapsible section headers ("Attachments", "Change History") */
html[data-theme="dark"] .foldable :link, html[data-theme="dark"] .foldable :visited { border-color: var(--gc-border); }

/* wiki editor toolbar is an icon sprite drawn for light backgrounds */
html[data-theme="dark"] .wikitoolbar { background: #dfe1ee; border-color: var(--gc-border); }

/* panels and boxes */
html[data-theme="dark"] #tabs, html[data-theme="dark"] .plugin,
html[data-theme="dark"] #prefs, html[data-theme="dark"] #info,
html[data-theme="dark"] h2.report-result, html[data-theme="dark"] .timeline h2,
html[data-theme="dark"] .milestone .info h2, html[data-theme="dark"] div.message,
html[data-theme="dark"] #environmentinfo table th, html[data-theme="dark"] .diff li.entry,
html[data-theme="dark"] .tickets tr.trac-columns th, html[data-theme="dark"] .wiki-toc,
html[data-theme="dark"] #content.prefs #tabs li, html[data-theme="dark"] .image-file,
html[data-theme="dark"] .suggestions, html[data-theme="dark"] .suggestions li,
html[data-theme="dark"] div.trac-draft, html[data-theme="dark"] #ticketbox.ticketdraft,
html[data-theme="dark"] .ticketdraft, html[data-theme="dark"] #changelog .changes,
html[data-theme="dark"] #ticketchange .changes, html[data-theme="dark"] .trac-shade,
html[data-theme="dark"] #preview, html[data-theme="dark"] .plugin .listing td,
html[data-theme="dark"] .plugin .listing td.trac-module {
  background: var(--gc-surface); color: var(--gc-text); border-color: var(--gc-border);
}
html[data-theme="dark"] #tabs li li.active, html[data-theme="dark"] #content.prefs #tabs li.active,
html[data-theme="dark"] .wiki-toc .active { background: var(--gc-surface-2); }
html[data-theme="dark"] #content.prefs #tabcontent { background: var(--gc-bg); }
html[data-theme="dark"] #trac-comment-editor textarea { background: var(--gc-input-bg); }
html[data-theme="dark"] .suggestions li.selected { background: var(--gc-brand); color: #fff; }
html[data-theme="dark"] div.trac-grip { background-color: var(--gc-surface); }
html[data-theme="dark"] #changelog h3.change, html[data-theme="dark"] #ticketchange h3.change { background: none; }
html[data-theme="dark"] #content .paging .current { background: var(--gc-brand); }

/* messages */
html[data-theme="dark"] #content.error .message, html[data-theme="dark"] div.system-message,
html[data-theme="dark"] span.system-message, html[data-theme="dark"] .important {
  background: rgba(255, 90, 60, .14); border-color: rgba(255, 90, 60, .45); color: var(--gc-text);
}
html[data-theme="dark"] #warning.system-message, html[data-theme="dark"] .warning.system-message {
  background: rgba(255, 200, 0, .12); border-color: rgba(255, 200, 0, .4);
}
html[data-theme="dark"] #notice.system-message, html[data-theme="dark"] .notice.system-message {
  background: rgba(60, 200, 110, .13); border-color: rgba(60, 200, 110, .45);
}
html[data-theme="dark"] div.system-message .trac-close-msg:hover { background: var(--gc-surface); }

/* code view */
html[data-theme="dark"] table.code thead th, html[data-theme="dark"] .diff table.trac-diff thead th { background: var(--gc-surface); }
html[data-theme="dark"] table.code tbody th, html[data-theme="dark"] .diff table.trac-diff tbody th { background: var(--gc-surface-2); color: var(--gc-muted); }
html[data-theme="dark"] table.code tbody tr:hover td, html[data-theme="dark"] .diff table.trac-diff tbody tr:hover td { background: var(--gc-hover-bg); }
html[data-theme="dark"] table.code tr.hilite th, html[data-theme="dark"] table.code tr.hilite td { background: rgba(120, 130, 255, .2); }
html[data-theme="dark"] table.code, html[data-theme="dark"] table.code td, html[data-theme="dark"] table.code th { border-color: var(--gc-border); }

/* diffs */
html[data-theme="dark"] .diff table.trac-diff td, html[data-theme="dark"] .diff pre,
html[data-theme="dark"] .legend dt, html[data-theme="dark"] .chglist .unknown { background: var(--gc-bg); }
html[data-theme="dark"] .diff table.trac-diff tbody.skipped td { background: var(--gc-surface); }
html[data-theme="dark"] pre.diff .rem, html[data-theme="dark"] .diff table.inline tbody.mod td.l,
html[data-theme="dark"] .diff table.inline tbody.rem td.l, html[data-theme="dark"] .diff table.sidebyside tbody.rem td.l,
html[data-theme="dark"] .diff table.sidebyside tbody.rem td.r { background: rgba(255, 80, 80, .16); }
html[data-theme="dark"] pre.diff .add, html[data-theme="dark"] .diff table.inline tbody.mod td.r,
html[data-theme="dark"] .diff table.inline tbody.add td.r, html[data-theme="dark"] .diff table.sidebyside tbody.add td.l,
html[data-theme="dark"] .diff table.sidebyside tbody.add td.r { background: rgba(70, 200, 90, .16); }
html[data-theme="dark"] .diff table.sidebyside tbody.mod td.l, html[data-theme="dark"] .diff table.sidebyside tbody.mod td.r { background: rgba(255, 190, 60, .14); }
html[data-theme="dark"] .diff table.inline tbody.mod td del, html[data-theme="dark"] .diff table.sidebyside tbody.mod del { background: rgba(255, 80, 80, .4); }
html[data-theme="dark"] .diff table.inline tbody.mod td ins, html[data-theme="dark"] .diff table.sidebyside tbody.mod ins { background: rgba(70, 200, 90, .4); }

/* reports: priority row colours as tinted versions */
html[data-theme="dark"] .tickets tbody tr:hover { background: var(--gc-hover-bg); }
html[data-theme="dark"] .tickets tr.color1-odd, html[data-theme="dark"] table.tickets tbody tr.prio1 { background: rgba(255, 107, 23, .18); }
html[data-theme="dark"] .tickets tr.color1-even, html[data-theme="dark"] table.tickets tbody tr.even.prio1 { background: rgba(255, 107, 23, .12); }
html[data-theme="dark"] .tickets tr.color2-odd, html[data-theme="dark"] table.tickets tbody tr.prio2 { background: rgba(255, 210, 0, .13); }
html[data-theme="dark"] .tickets tr.color2-even, html[data-theme="dark"] table.tickets tbody tr.even.prio2 { background: rgba(255, 210, 0, .08); }
html[data-theme="dark"] .tickets tr.color3-odd, html[data-theme="dark"] table.tickets tbody tr.prio3 { background: rgba(255, 255, 255, .03); }
html[data-theme="dark"] .tickets tr.color3-even, html[data-theme="dark"] table.tickets tbody tr.even.prio3 { background: rgba(255, 255, 255, .06); }
html[data-theme="dark"] .tickets tr.color4-odd, html[data-theme="dark"] table.tickets tbody tr.prio4 { background: rgba(0, 200, 210, .12); }
html[data-theme="dark"] .tickets tr.color4-even, html[data-theme="dark"] table.tickets tbody tr.even.prio4 { background: rgba(0, 200, 210, .08); }
html[data-theme="dark"] .tickets tr.color5-odd, html[data-theme="dark"] table.tickets tbody tr.prio5 { background: rgba(120, 140, 255, .15); }
html[data-theme="dark"] .tickets tr.color5-even, html[data-theme="dark"] table.tickets tbody tr.even.prio5 { background: rgba(120, 140, 255, .10); }
html[data-theme="dark"] .tickets tr.color6-odd, html[data-theme="dark"] table.tickets tbody tr.prio6 { background: rgba(255, 255, 255, .04); }
html[data-theme="dark"] .tickets tr.color6-even, html[data-theme="dark"] table.tickets tbody tr.even.prio6 { background: rgba(255, 255, 255, .07); }

/* roadmap */
html[data-theme="dark"] table.progress td { background: var(--gc-surface); }
html[data-theme="dark"] table.progress td.new { background: rgba(255, 210, 0, .35); }
html[data-theme="dark"] table.progress td.closed { background: rgba(70, 200, 90, .45); }

/* timeline */
html[data-theme="dark"] .timeline dt :link:hover, html[data-theme="dark"] .timeline dt :visited:hover { background-color: var(--gc-hover-bg); }
html[data-theme="dark"] .timeline dt.highlight { background-color: rgba(255, 210, 0, .14); }

/* search & misc highlights */
html[data-theme="dark"] .searchword0 { background: rgba(255, 220, 0, .3); }
html[data-theme="dark"] .searchword1 { background: rgba(70, 200, 90, .3); }
html[data-theme="dark"] .searchword2 { background: rgba(0, 200, 210, .3); }
html[data-theme="dark"] .searchword3 { background: rgba(120, 140, 255, .3); }
html[data-theme="dark"] .searchword4 { background: rgba(255, 100, 255, .3); }
html[data-theme="dark"] .trac-placeholder, html[data-theme="dark"] #environmentinfo #config tr.modified,
html[data-theme="dark"] .tracini table.wiki tbody tr:target { background: var(--gc-hover-bg); }

/* jQuery UI widgets (date picker, dialogs) */
html[data-theme="dark"] .ui-widget-content, html[data-theme="dark"] .ui-widget-header {
  background: var(--gc-surface); color: var(--gc-text); border-color: var(--gc-border);
}
