/* IndySoft public status page. No dependencies; light and dark; semantic colours only where status is shown.
   Brand palette mirrors indysoft.com: navy #003040, blue #0098DB, sky #7FCBED; headings in nimbus-sans-extended
   when the Adobe Fonts kit loads, system fonts otherwise. */
:root {
  --brand: #003040;
  --brand-blue: #0098DB;
  --brand-sky: #7FCBED;
  --bg: #F4F7F9;
  --surface: #FFFFFF;
  --surface-2: #EEF3F6;
  --ink: #16242C;
  --ink-2: #46555F;
  --ink-3: #71808A;
  --line: #D9E1E7;
  --accent: #0075A8;
  --ok: #2E8B57;
  --ok-soft: #E3F3EA;
  --degraded: #C48A16;
  --degraded-soft: #FBF0D5;
  --partial: #D9642B;
  --partial-soft: #FBE6DA;
  --major: #C4423A;
  --major-soft: #F8E0DE;
  --maint: #0075A8;
  --maint-soft: #E1F0F9;
  --radius: 8px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --heading-font: "nimbus-sans-extended", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #FFFFFF;
    --brand-blue: #0098DB;
    --brand-sky: #7FCBED;
    --bg: #0B1519;
    --surface: #132028;
    --surface-2: #1B2B34;
    --ink: #E6ECF0;
    --ink-2: #AEBBC4;
    --ink-3: #7F8E98;
    --line: #26363F;
    --accent: #7FCBED;
    --ok: #4CC07E;
    --ok-soft: #173B28;
    --degraded: #E0A93C;
    --degraded-soft: #3B2E12;
    --partial: #EE8A52;
    --partial-soft: #3F2415;
    --major: #E46A61;
    --major-soft: #3F1B19;
    --maint: #7FCBED;
    --maint-soft: #12324A;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
}
a { color: var(--accent); }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink-2); }
.small { font-size: 0.875rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 6px; }
.skip:focus { left: 8px; z-index: 10; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- header / footer (brand) ---- */
.site-header { background: var(--surface); border-top: 4px solid var(--brand-blue); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: var(--brand); min-width: 0; }
.brand .logo { height: 26px; width: auto; display: block; flex: none; }
.brand-sub {
  padding-left: 14px; border-left: 1px solid var(--line);
  font-family: var(--heading-font); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--brand-blue); line-height: 1.2; padding-top: 2px;
}
.site-nav { display: flex; gap: 20px; font-size: 0.9rem; font-family: var(--heading-font); font-weight: 600; letter-spacing: 0.02em; }
.site-nav a { color: var(--ink-2); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--brand); text-decoration: underline; text-decoration-color: var(--brand-blue); text-underline-offset: 4px; }
@media (max-width: 480px) { .brand .logo { height: 22px; } .brand-sub { display: none; } .site-nav { gap: 14px; } }

.site-footer { margin-top: 40px; padding: 26px 0 36px; background: var(--surface); border-top: 1px solid var(--line); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
.footer-brand { color: var(--brand); opacity: 0.85; text-decoration: none; }
.footer-brand .logo { height: 20px; width: auto; display: block; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 0.875rem; }
.footer-links a { color: var(--ink-2); text-decoration: none; }
.footer-links a:hover { color: var(--brand); text-decoration: underline; }
.footer-note { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* ---- overall status ---- */
.overall {
  margin: 28px 0 8px;
  padding: 20px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  border-left-width: 6px;
}
.overall-inner { display: flex; align-items: center; gap: 12px; }
.overall-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--ink-3); flex: none; }
.overall h1 { margin: 0; font-family: var(--heading-font); font-size: 1.3rem; font-weight: 700; letter-spacing: -0.005em; color: var(--brand); }
.overall p { margin: 6px 0 0 26px; }
.overall.status-none { border-left-color: var(--ok); } .overall.status-none .overall-dot { background: var(--ok); }
.overall.status-minor { border-left-color: var(--degraded); } .overall.status-minor .overall-dot { background: var(--degraded); }
.overall.status-major { border-left-color: var(--partial); } .overall.status-major .overall-dot { background: var(--partial); }
.overall.status-critical { border-left-color: var(--major); } .overall.status-critical .overall-dot { background: var(--major); }
.overall.status-maintenance { border-left-color: var(--maint); } .overall.status-maintenance .overall-dot { background: var(--maint); }
.overall.is-loading .overall-dot { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .overall.is-loading .overall-dot { animation: none; } }

.section { margin: 28px 0; }
.section h2 { font-family: var(--heading-font); font-size: 0.95rem; font-weight: 700; margin: 0 0 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--brand); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }

/* ---- components ---- */
.groups { display: flex; flex-direction: column; gap: 14px; }
.group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.group-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-weight: 600; color: var(--brand); }
.component { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.component:last-child { border-bottom: none; }
.component-name { font-weight: 500; }
.component-desc { grid-column: 1; color: var(--ink-3); font-size: 0.85rem; }
.component-meta { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.uptime { color: var(--ink-3); font-size: 0.8rem; font-variant-numeric: tabular-nums; }

/* history bar: one tick per day, oldest on the left */
.uptime-bar-wrap { grid-column: 1 / -1; margin-top: 6px; }
.uptime-bar { display: flex; gap: 2px; height: 26px; align-items: stretch; }
.tick { flex: 1 1 0; min-width: 0; border-radius: 2px; background: var(--ok); outline: none; cursor: default; transition: transform 80ms ease; }
.tick:hover, .tick:focus-visible { transform: scaleY(1.18); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink-3); }
.tick.operational { background: var(--ok); }
.tick.degradedPerformance { background: var(--degraded); }
.tick.partialOutage { background: var(--partial); }
.tick.majorOutage { background: var(--major); }
.tick.underMaintenance { background: var(--maint); }
.uptime-axis { display: flex; justify-content: space-between; margin-top: 4px; color: var(--ink-3); font-size: 0.72rem; }
.uptime-axis .axis-narrow { display: none; }
@media (max-width: 640px) {
  .tick.old { display: none; }
  .uptime-axis .axis-wide { display: none; }
  .uptime-axis .axis-narrow { display: inline; }
}
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 4px 0; color: var(--ink-3); font-size: 0.78rem; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend .tick { flex: none; width: 10px; height: 14px; }
.tip { position: absolute; z-index: 20; max-width: 280px; padding: 10px 12px; background: var(--brand); color: #fff; border-radius: 6px; font-size: 0.8rem; line-height: 1.35; box-shadow: 0 6px 20px rgba(0,0,0,0.25); pointer-events: none; }
@media (prefers-color-scheme: dark) { .tip { background: #E6ECF0; color: #0B1519; } }
.tip-date { font-weight: 600; margin-bottom: 2px; }
.tip-status { font-weight: 600; }
.tip-status.operational { color: var(--ok); } .tip-status.degradedPerformance { color: var(--degraded); } .tip-status.partialOutage { color: var(--partial); } .tip-status.majorOutage { color: var(--major); } .tip-status.underMaintenance { color: var(--brand-sky); }
.tip-line { margin-top: 2px; } .tip-line.muted { opacity: 0.75; }
.tip-incident { margin-top: 4px; padding-left: 8px; border-left: 2px solid currentColor; opacity: 0.9; }
@media (prefers-reduced-motion: reduce) { .tick { transition: none; } .tick:hover, .tick:focus-visible { transform: none; } }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.operational { background: var(--ok-soft); color: var(--ok); }
.pill.degradedPerformance { background: var(--degraded-soft); color: var(--degraded); }
.pill.partialOutage { background: var(--partial-soft); color: var(--partial); }
.pill.majorOutage { background: var(--major-soft); color: var(--major); }
.pill.underMaintenance { background: var(--maint-soft); color: var(--maint); }

/* ---- incidents ---- */
.incident-list { display: flex; flex-direction: column; gap: 14px; }
.incident { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0; border-left-width: 5px; }
.incident-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 18px; cursor: pointer; list-style: none; }
.incident-head { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.incident-line::-webkit-details-marker { display: none; }
.incident-line:focus-visible { outline: 2px solid var(--ink-3); outline-offset: -2px; border-radius: var(--radius); }
.incident-line-meta { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; color: var(--ink-3); font-size: 0.85rem; padding-top: 2px; }
.incident-status { font-weight: 600; color: var(--ink-2); }
.chevron { width: 8px; height: 8px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg); transition: transform 120ms ease; }
.incident[open] .chevron { transform: rotate(-135deg); }
@media (prefers-reduced-motion: reduce) { .chevron { transition: none; } }
.incident-body { padding: 0 18px 14px; } .incident-body .updates { margin-top: 2px; }
.incident.impact-none { border-left-color: var(--ink-3); }
.incident.impact-minor { border-left-color: var(--degraded); }
.incident.impact-major { border-left-color: var(--partial); }
.incident.impact-critical { border-left-color: var(--major); }
.incident.impact-maintenance { border-left-color: var(--maint); }
.incident-title { margin: 0; font-size: 1rem; font-weight: 600; min-width: 0; color: var(--brand); }
.incident-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; color: var(--ink-3); font-size: 0.85rem; }
.chip { display: inline-block; padding: 1px 8px; border-radius: 4px; background: var(--surface-2); color: var(--ink-2); font-size: 0.78rem; }
.updates { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); padding-top: 10px; }
.update { display: grid; grid-template-columns: 110px 1fr; gap: 12px; }
.update-status { font-weight: 600; font-size: 0.9rem; }
.update-body { margin: 0; white-space: pre-line; }
.update-time { color: var(--ink-3); font-size: 0.8rem; margin-top: 2px; }
@media (max-width: 560px) {
  .update { grid-template-columns: 1fr; gap: 2px; }
  .component { grid-template-columns: 1fr; }
  .component-meta { justify-content: space-between; }
}

.history { display: flex; flex-direction: column; gap: 0; }
.history-day { padding: 12px 0; border-bottom: 1px solid var(--line); }
.history-day:last-child { border-bottom: none; }
.history-date { margin: 0 0 6px; font-weight: 600; font-size: 0.95rem; }
.history-empty { color: var(--ink-3); font-size: 0.9rem; margin: 0; }
.history .incident { margin-top: 8px; }
details.history-more { margin-top: 10px; }
details.history-more summary { cursor: pointer; color: var(--accent); font-size: 0.9rem; }

.error { background: var(--major-soft); color: var(--major); padding: 12px 16px; border-radius: var(--radius); }

.subscribe { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.subscribe-form { display: flex; gap: 8px; flex-wrap: wrap; }
.subscribe-form input { flex: 1 1 240px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); font: inherit; }
.subscribe-form button { padding: 10px 16px; border: 0; border-radius: 6px; background: var(--accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
@media (prefers-color-scheme: dark) { .subscribe-form button { color: #0B1519; } }
.subscribe-form button:hover { filter: brightness(1.08); }
.subscribe-form button[disabled] { opacity: 0.6; cursor: default; }

/* ---- documentation pages (api/) ---- */
.doc { padding-bottom: 20px; }
.doc h1 { font-family: var(--heading-font); font-size: 1.6rem; font-weight: 700; margin: 32px 0 6px; color: var(--brand); letter-spacing: -0.005em; }
.doc .lede { font-size: 1.05rem; color: var(--ink-2); margin: 0 0 24px; max-width: 64ch; }
.doc h2 { font-family: var(--heading-font); font-size: 0.95rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--brand); margin: 36px 0 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.doc h3 { font-size: 1rem; font-weight: 600; margin: 22px 0 8px; color: var(--brand); }
.doc p, .doc li { max-width: 72ch; }
.doc code { font-family: var(--mono); font-size: 0.86em; background: var(--surface-2); padding: 1px 6px; border-radius: 4px; color: var(--ink); }
.doc pre { margin: 10px 0 16px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand-blue); border-radius: var(--radius); overflow-x: auto; font-family: var(--mono); font-size: 0.82rem; line-height: 1.5; }
.doc pre code { background: none; padding: 0; font-size: inherit; }
.doc .callout { margin: 16px 0; padding: 12px 16px; background: var(--maint-soft); border: 1px solid var(--line); border-left: 4px solid var(--maint); border-radius: var(--radius); }
.doc .callout p { margin: 0; }
.doc .base-url { display: inline-flex; align-items: center; gap: 10px; margin: 4px 0 8px; padding: 8px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; font-family: var(--mono); font-size: 0.95rem; color: var(--brand); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin: 10px 0 16px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.doc th { background: var(--surface-2); font-family: var(--heading-font); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand); }
.doc tr:last-child td { border-bottom: none; }
.doc td code { white-space: nowrap; }
.method { display: inline-block; min-width: 44px; padding: 1px 7px; border-radius: 4px; font-family: var(--mono); font-size: 0.75rem; font-weight: 700; text-align: center; background: var(--ok-soft); color: var(--ok); margin-right: 8px; }
.method.post { background: var(--maint-soft); color: var(--maint); }
.vocab { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 12px; padding: 0; list-style: none; }
.vocab li { font-family: var(--mono); font-size: 0.8rem; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.toc { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 8px; padding: 0; list-style: none; font-size: 0.9rem; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
