/* Shared appearance controls; the existing parchment style is Medieval. */
:root { --site-header-height:80px; }
.site-header .nav-wrap { gap:22px; }
.site-header .site-navigation { gap:19px; margin-left:auto; }
.header-tools { display:flex; align-items:center; gap:14px; flex-shrink:0; }
.theme-control { display:flex; align-items:center; gap:8px; margin:0; font-size:10px; font-weight:500; color:#6a5d4b; }
.theme-control select { width:106px; min-height:32px; padding:5px 8px; border:1px solid #b7a283; border-radius:5px; background:#fbf8f1; color:#745a3b; font:inherit; font-size:12px; cursor:pointer; }
.theme-control select:focus-visible { outline:2px solid #745a3b; outline-offset:3px; }
html[data-theme] { scroll-padding-top:calc(var(--site-header-height) + 20px); }

/* Modern stays black and white, with small green and orange accents. */
html[data-theme="modern"] {
  --paper:#ffffff; --white:#ffffff; --ink:#111111; --muted:#303030;
  --line:#e3e3e3; --soft:#ffffff; --accent:#111111;
  --accent-dark:#000000; --accent-soft:#ffffff; --border:#e3e3e3;
  --bs-body-bg:#ffffff; --bs-body-color:#111111;
}
html[data-theme="modern"] body { background:#ffffff; color:#111111; }
html[data-theme="modern"] .site-header { background:#fffffff5; color:#111111; border-color:#e3e3e3; }
html[data-theme="modern"] .site-header .dashboard-nav-link { color:#111111; border-color:#e3e3e3; }
html[data-theme="modern"] .site-header .site-navigation a:hover,
html[data-theme="modern"] .site-header .dashboard-nav-link:hover { color:#000000; }
html[data-theme="modern"] .site-header .site-navigation .nav-contact { color:#111111; border-color:#bdbdbd; }
html[data-theme="modern"] .site-header .site-navigation .nav-contact:hover { background:#ffffff; }
html[data-theme="modern"] .theme-control { color:#303030; }
html[data-theme="modern"] .theme-control select { background:#fff; color:#000000; border-color:#bdbdbd; }
html[data-theme="modern"] :is(a,button,select):focus-visible { outline-color:#111111; }

html[data-theme="modern"] .home-page :is(.eyebrow,.project-type,.experience-label,.card-topline,.publication-link,.code-project-link) { color:#111111; }
html[data-theme="modern"] .home-page :is(.hero-role,.profile-strip strong) { color:#111111; }
html[data-theme="modern"] .home-page :is(.hero-description,.project-copy > p,.preview-caption) { color:#303030; }
html[data-theme="modern"] .home-page .button-dark { background:#111111; border-color:#111111; }
html[data-theme="modern"] .home-page .button-dark:hover { background:#000000; border-color:#000000; }
html[data-theme="modern"] .home-page .text-link { color:#111111; border-color:#bdbdbd; }
html[data-theme="modern"] .home-page .role-marker { background:#267357; }
html[data-theme="modern"] .home-page :is(.eyebrow,.card-topline,.project-type,.experience-label) { color:#267357; }
html[data-theme="modern"] .home-page .card-topline > span:first-child { color:#b65b2a; }
html[data-theme="modern"] .home-page .expertise-card { border-top:1px solid #e3e3e3; }
html[data-theme="modern"] .home-page .expertise-list li::marker { color:#267357; }
html[data-theme="modern"] .home-page :is(.featured-project,.project-tags span,.project-preview,.project-preview img,.code-project,.research-grid h3,.specialist-training,.publication) { border-color:#e3e3e3; }
html[data-theme="modern"] .home-page .project-tags span { background:#e9f6ef; color:#24684e; }
html[data-theme="modern"] .home-page .work-section { background:#fcfaf7; }
html[data-theme="modern"] .home-page .featured-project { background:#ffffff; }
html[data-theme="modern"] .home-page .project-preview { background:#fdfcf9; }
html[data-theme="modern"] .home-page .research-section { background:#fbfaf7; }
html[data-theme="modern"] :is(.contact-section,.site-footer) { background:#111111; color:#ffffff; border-color:#444444; }
html[data-theme="modern"] .contact-section :is(p,.eyebrow),
html[data-theme="modern"] .site-footer { color:#f0f0f0; }
html[data-theme="modern"] .contact-email { border-color:#a0a0a0; }
html[data-theme="modern"] .contact-section .eyebrow { color:#a8d1b7; }
html[data-theme="modern"] .site-footer > div > span:first-child { color:#ffffff; }

html[data-theme="modern"] .bslib-sidebar-layout > .sidebar { background:#ffffff; }
html[data-theme="modern"] .card-header { background:#ffffff; }
html[data-theme="modern"] :is(.card,.card-header,.modal-content,.summary-metric,.period-comparison-controls > div,.accordion-button,.accordion-body,.shiny-notification) { background:#fff; border-color:#e3e3e3; }
html[data-theme="modern"] :is(.control-label,.sidebar-intro p,.analysis-context,.summary-note,.caption-detail,.source-note) { color:#303030; }
html[data-theme="modern"] :is(.form-control,.selectize-input,.accordion-item,.share-analysis,.location-analysis .modal-content,.location-analysis .modal-header,.location-analysis .analysis-actions,#analysis_period_accordion .accordion-item) { border-color:#d0d0d0; }
html[data-theme="modern"] :is(.form-control,.selectize-input,.selectize-dropdown) { background:#fff; color:#111111; }
html[data-theme="modern"] :is(.form-control:focus,.selectize-input.focus) { border-color:#111111; box-shadow:0 0 0 3px #11111118; }
html[data-theme="modern"] .irs--shiny .irs-handle { background:#111111; border-color:#111111; }
html[data-theme="modern"] :is(.step-number,.status-chip,.analysis-plots .nav-tabs) { background:#ffffff; color:#111111; }
html[data-theme="modern"] .analysis-plots .nav-tabs .nav-link { color:#303030; }
html[data-theme="modern"] .analysis-plots .nav-tabs .nav-link.active { background:#fff; color:#000000; box-shadow:inset 0 -2px 0 #267357; }
html[data-theme="modern"] .accordion-button:not(.collapsed) { background:#ffffff; color:#000000; }
html[data-theme="modern"] .btn-primary { background:#111111; border-color:#111111; color:#fff; }
html[data-theme="modern"] .btn-primary:is(:hover,:focus-visible) { background:#000000; border-color:#000000; }
html[data-theme="modern"] .btn.btn-quiet { background:#ffffff; color:#000000; border-color:#bdbdbd; }
html[data-theme="modern"] .btn.btn-quiet:is(:hover,:focus-visible,:active) { background:#ffffff; color:#111111; border-color:#707070; }
html[data-theme="modern"] .btn-outline-secondary { color:#303030; border-color:#bdbdbd; background:transparent; }
html[data-theme="modern"] .btn-outline-secondary:is(:hover,:focus-visible) { color:#000000; background:#ffffff; border-color:#707070; }
html[data-theme="modern"] :is(.btn-map,.map-caption,.map-instruction,.analysis-close,.bslib-sidebar-layout > .collapse-toggle) { background:#fff; color:#000000; border-color:#bdbdbd; }
html[data-theme="modern"] :is(.btn-map,.analysis-close,.bslib-sidebar-layout > .collapse-toggle):hover { background:#ffffff; }
html[data-theme="modern"] .selectize-dropdown :is(.option.selected,.option.active,.option:hover) { background:#f1f8f3 !important; color:#111111 !important; box-shadow:inset 3px 0 0 #267357; }
html[data-theme="modern"] .selectize-dropdown .highlight,
html[data-theme="modern"] .selectize-input .item.active { background:#eaf5ed !important; color:#111111 !important; }
html[data-theme="modern"] .air-datepicker-cell.-selected- { background:#111111 !important; color:#fff !important; }
html[data-theme="modern"] .air-datepicker-cell.-selected-:hover { background:#000000 !important; }
html[data-theme="modern"] :is(.air-datepicker-cell.-current-,.air-datepicker-body--day-name,.air-datepicker-button) { color:#111111; }
html[data-theme="modern"] .air-datepicker-cell.-in-range- { background:#ffffff; }
html[data-theme="modern"] .air-datepicker { --adp-accent-color:#111111; --adp-cell-background-color-in-range:#ffffff; }
html[data-theme="modern"] :is(.sidebar,.location-analysis) { accent-color:#111111; }
html[data-theme="modern"] .sidebar-intro .preview-note { background:#ffffff; border-color:#d0d0d0; border-left:3px solid #b65b2a; color:#111111; }

@media(max-width:980px) {
  .site-header .site-navigation { margin-left:0; }
  html[data-theme="modern"] .site-header .site-navigation { background:#ffffff; border-color:#e3e3e3; }
}
@media(max-width:767px) {
  :root { --site-header-height:104px; }
  .site-header .nav-wrap { display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-rows:60px 36px; height:104px; padding-bottom:8px; gap:0 8px; }
  .site-header .brand-links { grid-column:1; grid-row:1; }
  .site-header .header-tools { display:contents; }
  .site-header .nav-toggle { grid-column:2; grid-row:1; justify-self:end; }
  .site-header .theme-control { grid-column:1 / -1; grid-row:2; justify-self:end; }
  .theme-control select { font-size:16px; width:125px; min-height:32px; padding:2px 7px; }
  .bslib-page-sidebar .bslib-sidebar-layout { min-height:calc(100dvh - var(--site-header-height)); }
}
