/* Montserrat site-wide; Century Gothic Regular for site title only */

:root {
  --bg: #faf9f6;
  --ink: #1a1a1a;
  --heading: #2a4353;
  --muted: #5c5c5c;
  --accent: #a41034;
  --card: #fff;
  --border: #e6e2dc;
  --ok: #1b5e20;
  --degraded: #b8860b;
  --down: #a41034;
  --unknown: #757575;
  --font: Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-logo: "Century Gothic", CenturyGothic, "Apple Gothic", sans-serif;
  --text-body: 1rem;
  --text-nav: 1.1rem;
  --text-logo: calc(1.5rem * 1.25);
  --text-lede: clamp(1.05rem, 2.5vw, 1.25rem);
  --text-h2: clamp(1.15rem, calc(1.05rem + 0.45vw), 2rem);
  --text-h3: 1.2rem;
  --text-small: 0.93333rem;
  --content-top: 4rem;
  --header-top: 3rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.page {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: 1.9;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus {
  left: 1rem;
}

.inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--card);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: var(--header-top) 1.25rem 1.25rem;
}

.logo {
  font-family: var(--font-logo);
  font-size: var(--text-logo);
  font-weight: 400;
  margin: 0;
  color: var(--heading);
  letter-spacing: -0.01em;
}

.logo a {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  text-decoration: none;
}

.logo-mark {
  display: block;
  width: 2.575rem;
  height: 2.575rem;
  flex-shrink: 0;
  object-fit: contain;
}

.logo a:hover,
.logo a:focus-visible {
  color: var(--accent);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  margin-right: 1rem;
}

.nav > a,
.nav-dropdown-toggle {
  color: var(--heading);
  text-decoration: none;
  font-weight: 500;
  font-size: var(--text-nav);
  border-bottom: 2px solid transparent;
  padding-bottom: 0.15rem;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: inherit;
  cursor: pointer;
}

.nav > a:hover,
.nav > a:focus-visible,
.nav-dropdown-toggle:hover,
.nav-dropdown-toggle:focus-visible {
  border-bottom-color: var(--accent);
}

.nav > a.is-active,
.nav-dropdown.is-active > .nav-dropdown-toggle {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle .caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 0.35rem;
  vertical-align: middle;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 12rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  z-index: 50;
  flex-direction: column;
  padding: 0.35rem 0;
}

.nav-dropdown.is-open .nav-dropdown-menu {
  display: flex;
}

.nav-dropdown[data-nav="resources"] .nav-dropdown-menu {
  min-width: 14rem;
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--heading);
  text-decoration: none;
  font-weight: 500;
  font-size: var(--text-body);
  border-bottom: none;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a:focus-visible {
  background: #f3f1ed;
}

.nav-dropdown-menu a.is-active {
  color: var(--accent);
  background: #faf5f6;
}

.nav-dropdown-section {
  display: block;
  padding: 0.5rem 1rem 0.2rem;
  font-size: var(--text-body);
  font-weight: 500;
  color: var(--heading);
  text-decoration: none;
}

.nav-dropdown-menu a.nav-dropdown-section {
  font-size: var(--text-body);
  font-weight: 500;
  padding: 0.5rem 1rem;
}

.nav-dropdown-menu a.nav-dropdown-section:hover,
.nav-dropdown-menu a.nav-dropdown-section:focus-visible {
  background: #f3f1ed;
}

.nav-dropdown-menu a.nav-dropdown-section.is-active {
  color: var(--accent);
  background: #faf5f6;
}

.nav-dropdown-section:not(:first-child) {
  margin-top: 0.35rem;
  border-top: 1px solid var(--border);
  padding-top: 0.65rem;
}

.nav-dropdown-menu a.nav-sub {
  padding-left: 1.5rem;
  font-weight: 400;
}

.nav-dropdown-menu-wide {
  min-width: 15rem;
}

.quality-placeholder {
  margin-top: 1rem;
}

.main {
  flex: 1;
  padding: 0 0 3rem;
}

.view.inner {
  padding-top: var(--content-top);
}

.is-hidden {
  display: none !important;
}

.lede {
  font-size: var(--text-lede);
  font-weight: 500;
  max-width: 42rem;
  line-height: 1.62;
  color: var(--heading);
}

.meta {
  color: var(--muted);
  font-size: var(--text-small);
  line-height: 1.65;
}

.subtitle {
  color: var(--muted);
  font-size: var(--text-small);
  line-height: 1.65;
  margin-top: -0.5rem;
  margin-bottom: 1rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.section-heading {
  font-size: var(--text-h3);
  font-weight: 700;
  line-height: 1.15;
  color: var(--heading);
  margin: 0 0 0.75rem;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: var(--text-small);
}

input,
select,
textarea {
  font: inherit;
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 3px;
}

.btn {
  font: inherit;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: var(--card);
}

.btn.primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: var(--text-small);
}

.status-dot {
  display: inline-block;
  width: calc(0.65rem * 1.2);
  height: calc(0.65rem * 1.2);
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.ok {
  background: var(--ok);
}
.status-dot.degraded {
  background: var(--degraded);
}
.status-dot.down {
  background: var(--down);
}
.status-dot.unknown {
  background: var(--unknown);
}

/* MCP / internal live-check table */
.check-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-small);
  table-layout: fixed;
}

.check-table th,
.check-table td {
  border: 1px solid var(--border);
  padding: 0.6rem 0.75rem;
  text-align: left;
  vertical-align: middle;
}

.check-table th {
  background: #f3f1ed;
  font-weight: 600;
}

.check-table-internal th,
.check-table-mcp th,
.history-table-internal th,
.history-table-mcp th {
  text-align: center;
}

.check-table .col-status {
  width: 3rem;
  text-align: center;
}

.check-table-internal col.col-status,
.check-table-mcp col.col-status,
.history-table-internal col.col-status,
.history-table-mcp col.col-status {
  width: 8rem;
}

.check-table-internal col.col-tool,
.check-table-mcp col.col-tool,
.history-table-internal col.col-tool,
.history-table-mcp col.col-tool {
  width: 14rem;
}

.check-table-internal col.col-actions,
.check-table-mcp col.col-actions {
  width: 14rem;
}

.history-table-internal col.col-time,
.history-table-mcp col.col-time {
  width: 12.5rem;
}

.history-table-internal col.col-ms,
.history-table-mcp col.col-ms {
  width: 4.5rem;
}

.check-table-internal td.col-status,
.check-table-mcp td.col-status,
.history-table-internal td.col-status,
.history-table-mcp td.col-status {
  text-align: left;
}

.check-table-internal .status-cell,
.check-table-mcp .status-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.check-table-internal .status-note,
.check-table-mcp .status-note {
  font-size: 0.86667rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: lowercase;
}

.status-note--ok {
  color: var(--ok);
}

.status-note--unknown {
  color: var(--muted);
}

.status-note--warning,
.status-note--forbidden {
  color: var(--degraded);
}

.status-note--error {
  color: var(--down);
}

.check-table-internal td.col-actions,
.check-table-mcp td.col-actions {
  text-align: center;
}

.check-table .col-tool {
  font-weight: 600;
  word-break: break-word;
}

.check-table td.col-meta {
  color: var(--muted);
  font-size: 0.86667rem;
}

.check-table .col-actions {
  width: 14rem;
  white-space: nowrap;
}

.check-table .col-actions .btn {
  margin-right: 0.35rem;
  margin-bottom: 0.25rem;
}

.external-link-card {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1rem 1.25rem;
  background: var(--card);
}

.external-link-card h3 {
  margin: 0 0 0.35rem;
  font-size: var(--text-h3);
}

.external-link-card a.external-link {
  font-weight: 600;
  color: var(--accent);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-small);
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--border);
  padding: 0.45rem 0.6rem;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  background: #f3f1ed;
  font-weight: 600;
}

.history-table {
  width: 100%;
  font-size: var(--text-small);
  border-collapse: collapse;
  table-layout: fixed;
}

.history-table th,
.history-table td {
  border: 1px solid var(--border);
  padding: 0.6rem 0.75rem;
  text-align: left;
  vertical-align: middle;
}

.history-table th {
  background: #f3f1ed;
  font-weight: 600;
  font-size: var(--text-small);
}

.history-table .col-tool {
  word-break: break-word;
  overflow-wrap: anywhere;
}

.history-table .col-detail {
  word-break: break-word;
}

.history-table-internal .status-cell,
.history-table-mcp .status-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.history-table-internal .status-note,
.history-table-mcp .status-note {
  font-size: 0.86667rem;
  font-weight: 600;
  text-transform: lowercase;
}

.slideshow-shell {
  position: relative;
}

.slideshow {
  height: 14rem;
  min-height: 14rem;
  box-sizing: border-box;
  overflow: hidden;
}

.slideshow-pause {
  position: absolute;
  z-index: 2;
  bottom: 0.75rem;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.375rem;
  height: 3.375rem;
  padding: 0;
  border: none;
  border-radius: 0;
  transform: translateX(-50%);
  background: transparent;
  color: #95a5a6;
  cursor: pointer;
  opacity: 0.72;
}

.slideshow-pause:hover,
.slideshow-pause:focus-visible {
  color: #7f8c8d;
  opacity: 1;
  outline: none;
}

.slideshow-pause-play {
  display: none;
}

.slideshow-pause.is-paused .slideshow-pause-bars {
  display: none;
}

.slideshow-pause.is-paused .slideshow-pause-play {
  display: block;
}

.slideshow-slide {
  animation: fadein 0.45s ease;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding-bottom: 2.75rem;
}

.slideshow-slide--query,
.slideshow-slide--filler {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.slideshow-filler {
  margin: 0;
  font-size: var(--text-body);
  font-style: italic;
  color: var(--heading);
}

.slideshow-slide--query h4 {
  margin: 0;
}

@keyframes fadein {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.slideshow-slide h4 {
  margin: 0 0 0.65rem;
  font-size: var(--text-body);
  font-weight: 400;
  font-style: italic;
  color: var(--heading);
}

.slideshow-slide pre.sql {
  flex: 1;
  min-height: 0;
  margin: 0;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background: #f3f1ed;
  padding: 0.75rem;
  border-radius: 3px;
  font-size: 0.82rem;
}

.quality-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.quality-frame {
  display: block;
  width: 100%;
  height: 1px;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  overflow: visible;
}

.scroll-to-top {
  position: fixed;
  z-index: 30;
  right: 1.25rem;
  bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.375rem;
  height: 3.375rem;
  padding: 0 0 0.2rem;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #95a5a6;
  font-size: 2.025rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
}

.scroll-to-top:hover,
.scroll-to-top:focus-visible {
  background: transparent;
  color: #7f8c8d;
  outline: none;
}

.app-notice {
  position: fixed;
  z-index: 40;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  max-width: min(36rem, calc(100% - 2rem));
  margin: 0;
  padding: 0.85rem 2.5rem 0.85rem 1rem;
  background: #fff5f5;
  border: 1px solid #e6c4c4;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  color: #5c2c2c;
  font-size: var(--text-small);
  line-height: 1.55;
}

.app-notice-text {
  margin: 0;
}

.app-notice-dismiss {
  position: absolute;
  top: 0.35rem;
  right: 0.45rem;
  z-index: 1;
  padding: 0.15rem 0.4rem;
  border: none;
  background: transparent;
  color: inherit;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  pointer-events: auto;
}

.app-notice-dismiss:hover,
.app-notice-dismiss:focus-visible {
  opacity: 1;
}

.quality-unavailable {
  margin: 0;
  padding: 2rem 1.5rem;
  color: var(--muted);
  font-size: var(--text-small);
  line-height: 1.65;
}

.activity-error {
  color: var(--down);
}

.activity-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.activity-page-head h2 {
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
}

.activity-settings-wrap {
  position: relative;
  flex-shrink: 0;
}

.activity-settings-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem;
  border: none;
  border-radius: 4px;
  background: none;
  font: inherit;
  color: var(--heading);
  cursor: pointer;
}

.activity-settings-toggle:hover,
.activity-settings-toggle:focus-visible {
  color: var(--accent);
  outline: none;
}

.activity-settings-toggle[aria-expanded="true"] {
  color: var(--accent);
}

.gear-icon {
  font-size: 1.495rem;
  line-height: 1;
}

.activity-settings-popover {
  display: none;
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 50;
  width: min(36rem, calc(100vw - 2rem));
  padding: 1rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.activity-settings-wrap.is-open .activity-settings-popover {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.activity-settings-popover[hidden] {
  display: none !important;
}

.activity-settings-numeric {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.activity-settings-popover .btn {
  align-self: flex-start;
}

.activity-settings-dates input[type="date"] {
  min-height: 2.35rem;
}

.activity-settings-dates input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--card);
  padding: 2rem 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.footer-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2rem 3rem;
}

.footer-logo-link {
  display: block;
  line-height: 0;
}

.footer-logo {
  display: block;
  height: 48px;
  width: auto;
  max-width: min(100vw - 2.5rem, 320px);
}

.footer-logo-peoplelab {
  height: 52px;
}

.footer-logo-hks {
  height: 27px;
  max-width: min(100vw - 2.5rem, 242px);
}

.footer-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.86667rem;
}

h2 {
  font-family: var(--font);
  font-weight: 700;
  font-size: var(--text-h2);
  line-height: 0.95;
  color: var(--heading);
  margin-top: 0;
  margin-bottom: 1rem;
}

h3 {
  font-family: var(--font);
  font-weight: 700;
  font-size: var(--text-h3);
  line-height: 1.15;
  color: var(--heading);
}

.home-summary-heading {
  display: inline-block;
  font-size: var(--text-h3);
  font-weight: 700;
  line-height: 1.15;
  color: var(--heading);
  margin: 1.5rem 0 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--heading);
}

.home-env-status {
  margin: 0;
}

.home-env-status-line {
  display: flex;
  align-items: center;
  margin: 0 0 0.5rem;
  font-size: var(--text-body);
  color: var(--ink);
}

.home-env-status-line:last-child {
  margin-bottom: 0;
}

.home-env-status-line .status-dot {
  width: calc(0.715rem * 1.2);
  height: calc(0.715rem * 1.2);
  margin-right: 0.85rem;
  flex-shrink: 0;
}

.activity-title {
  margin-bottom: 0.25rem;
}
