:root {
  --paper: #f2ead9;
  --paper-2: #e5d8bd;
  --ink: #171713;
  --red: #c93424;
  --yellow: #f1bd38;
  --green: #39754d;
  --white: #ffffff;
  --rule: rgba(23, 23, 19, 0.28);
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Arial Narrow", "Aptos Narrow", "Helvetica Neue", Arial, sans-serif;
  --max: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.45), transparent 22rem),
    var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
}

body::before {
  position: fixed;
  z-index: 20;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 4px;
}

.skip {
  position: fixed;
  z-index: 100;
  top: 1rem;
  left: 1rem;
  padding: 0.8rem 1rem;
  color: var(--white);
  background: var(--ink);
  transform: translateY(-160%);
}

.skip:focus {
  transform: none;
}

.shell {
  width: min(calc(100% - 48px), var(--max));
  margin-inline: auto;
}

.eyebrow {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  line-height: 1.2;
  text-transform: uppercase;
}

header {
  display: flex;
  min-height: 90px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--ink);
}

.brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: 1;
}

.brand .slash {
  color: var(--red);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}

.brand small {
  max-width: 9rem;
  padding-left: 0.7rem;
  border-left: 1px solid var(--ink);
  font-size: 0.57rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  line-height: 1.25;
  text-transform: uppercase;
}

nav {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

nav a,
.text-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0.55rem 0.85rem;
  border: 0;
  color: inherit;
  background: none;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

nav a:hover,
.text-button:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.nav-toggle {
  display: none;
  width: 44px;
  min-width: 44px;
  height: 44px;
  justify-content: center;
  padding: 0;
}

.nav-toggle:hover {
  text-decoration: none;
}

.nav-toggle-icon {
  position: relative;
  display: block;
  width: 24px;
  height: 18px;
}

.nav-toggle-line {
  position: absolute;
  left: 0;
  width: 24px;
  height: 2px;
  background: currentcolor;
  transform-origin: center;
  transition: top 0.2s ease, transform 0.2s ease, opacity 0.15s ease;
}

.nav-toggle-line:first-child {
  top: 1px;
}

.nav-toggle-line:nth-child(2) {
  top: 8px;
}

.nav-toggle-line:last-child {
  top: 15px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:first-child {
  top: 8px;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:last-child {
  top: 8px;
  transform: rotate(-45deg);
}

main {
  padding-bottom: 5rem;
}

.noscript-message,
.status-notice {
  width: min(calc(100% - 48px), var(--max));
  margin: 1rem auto 0;
  padding: 0.8rem 1rem;
  border: 2px solid var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.noscript-message a {
  color: inherit;
}

.status-notices:empty {
  display: none;
}

.notice-error {
  color: var(--white);
  background: var(--red);
}

.notice-stale {
  color: var(--ink);
  background: var(--yellow);
}

.mast {
  margin-top: 34px;
  border: 2px solid var(--ink);
  box-shadow: 10px 10px 0 var(--ink);
}

.overall {
  position: relative;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.4rem, 3.4vw, 2.7rem);
  overflow: hidden;
  background: var(--yellow);
}

.overall.state-operational .status-dot {
  background: var(--green);
}

.overall.state-degraded .status-dot {
  background: var(--yellow);
}

.overall.state-outage .status-dot {
  background: var(--red);
}

.overall.state-maintenance .status-dot {
  background: var(--paper-2);
}

.overall.state-no-data .status-dot {
  background: var(--paper);
}

.overall::after {
  position: absolute;
  right: -1rem;
  bottom: -4.8rem;
  content: "W";
  color: rgba(23, 23, 19, 0.07);
  font-family: var(--serif);
  font-size: 16rem;
  font-style: italic;
  line-height: 1;
  pointer-events: none;
}

.overall-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.status-dot {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
}

.overall-title {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 2.2rem 0 0.7rem;
  font-family: var(--serif);
  font-size: clamp(3rem, 6vw, 5.8rem);
  font-weight: 400;
  letter-spacing: -0.065em;
  line-height: 0.88;
}

.overall-copy {
  position: relative;
  z-index: 1;
  max-width: 660px;
  margin: 0;
  font-size: 0.94rem;
  font-weight: 700;
}

.generated-at {
  position: relative;
  z-index: 1;
  margin: 1rem 0 0;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.overall-title,
.overall-copy,
.component-name,
.event-code,
.event-main,
.event-title,
.event-body,
.event-meta-value,
.event-update-body {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ledger-heading,
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
}

.ledger-heading {
  margin: 82px 0 18px;
}

.section-head {
  margin-bottom: 18px;
}

.ledger-heading h2,
.section-head h2 {
  margin: 0.3rem 0 0;
  font-family: var(--serif);
  font-size: clamp(2.3rem, 4vw, 3.8rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.ledger-heading > p,
.section-head > p {
  max-width: 390px;
  margin: 0;
  color: var(--ink);
  font-size: 0.76rem;
  text-align: right;
}

.component-ledger {
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

.component-row {
  display: grid;
  grid-template-columns: minmax(205px, 0.82fr) minmax(300px, 1.7fr) 132px;
  gap: 1.4rem;
  align-items: center;
  min-height: 112px;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}

.component-row:last-child {
  border-bottom: 0;
}

.component-name h3 {
  margin: 0 0 0.25rem;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.035em;
}

.component-name p {
  margin: 0;
  color: var(--ink);
  font-size: 0.72rem;
}

.history-placeholder {
  position: relative;
  min-width: 0;
  height: 34px;
  overflow: hidden;
  border-block: 1px solid var(--rule);
  background: repeating-linear-gradient(90deg, transparent 0 7px, rgba(23, 23, 19, 0.13) 7px 9px);
}

.history-placeholder > span {
  position: absolute;
  top: 50%;
  left: 50%;
  padding: 0.2rem 0.55rem;
  color: var(--ink);
  background: var(--paper);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

.history-strip-container {
  display: flex;
  height: auto;
  min-height: 42px;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  border: 0;
  background: none;
}

.history-placeholder > .history-strip {
  position: static;
  display: grid;
  width: 100%;
  height: 17px;
  grid-template-columns: repeat(90, minmax(1px, 1fr));
  gap: 1px;
  padding: 0;
  background: none;
  transform: none;
}

.history-mark {
  display: block;
  min-width: 0;
  background: var(--green);
}

.history-mark.state-degraded {
  background: var(--yellow);
}

.history-mark.state-outage {
  background: var(--red);
}

.history-mark.state-maintenance {
  background: var(--paper-2);
  border: 1px solid var(--ink);
}

.history-mark.state-no-data {
  background: transparent;
  border: 1px solid var(--rule);
}

.history-placeholder > .history-meta {
  position: static;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  background: none;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transform: none;
  white-space: normal;
  overflow-wrap: anywhere;
}

.current-state {
  justify-self: end;
  text-align: right;
}

.state-stamp {
  display: inline-flex;
  min-height: 31px;
  align-items: center;
  padding: 0.32rem 0.6rem;
  border: 1px solid currentcolor;
  color: var(--ink);
  background: var(--paper);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.state-stamp.state-operational {
  color: var(--green);
}

.state-stamp.state-degraded {
  background: var(--yellow);
}

.state-stamp.state-outage {
  color: var(--white);
  background: var(--red);
}

.state-stamp.state-maintenance {
  background: var(--paper-2);
}

.state-stamp.state-no-data {
  border-style: dashed;
  background: var(--paper);
}

.active-section {
  margin-top: 78px;
}

#active-board {
  display: grid;
  gap: 2rem;
}

.ticket-event {
  position: relative;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  border: 2px solid var(--ink);
  background: var(--paper);
  box-shadow: 10px 10px 0 var(--ink);
}

.ticket-event.kind-incident {
  box-shadow: 10px 10px 0 var(--red);
}

.ticket-event::before,
.ticket-event::after {
  position: absolute;
  z-index: 1;
  top: 56px;
  width: 18px;
  height: 18px;
  content: "";
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
}

.ticket-event::before {
  left: -11px;
}

.ticket-event::after {
  right: -11px;
}

.event-stub {
  padding: 1.4rem;
  border-right: 1px dashed var(--ink);
  background: var(--paper-2);
}

.event-code {
  display: block;
  margin-top: 1.5rem;
  font-family: var(--serif);
  font-size: 2.1rem;
  font-style: italic;
}

.event-main {
  padding: 1.4rem 1.7rem;
}

.event-main h3 {
  margin: 0.25rem 0 0.45rem;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 400;
  letter-spacing: -0.035em;
}

.event-main p:last-child {
  max-width: 720px;
  margin: 0;
  color: var(--ink);
  font-size: 0.87rem;
}

.event-body {
  max-width: 720px;
  margin: 0;
  font-size: 0.87rem;
}

.event-meta {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.25rem 0.8rem;
  margin: 1rem 0 0;
  font-size: 0.74rem;
}

.event-meta-label {
  font-weight: 900;
  text-transform: uppercase;
}

.event-meta-value {
  margin: 0;
}

.event-timeline {
  margin-top: 1rem;
  border-top: 1px dashed var(--rule);
}

.event-timeline-summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.event-updates {
  margin: 0;
  padding: 0 0 0 1.2rem;
}

.event-update {
  padding: 0.65rem 0;
  border-top: 1px solid var(--rule);
}

.event-update-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.event-update-body {
  margin: 0.3rem 0 0;
  font-size: 0.8rem;
}

.history-section {
  margin-top: 86px;
}

.history-list {
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.history-empty {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 1.4rem;
  align-items: center;
  min-height: 112px;
  padding: 1rem 0;
}

.history-date {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-style: italic;
}

.history-copy h3 {
  margin: 0 0 0.25rem;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 400;
}

.history-copy p {
  margin: 0;
  color: var(--ink);
  font-size: 0.78rem;
}

.coverage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 86px;
  border-block: 2px solid var(--ink);
}

.coverage > div {
  min-height: 220px;
  padding: 2rem;
}

.coverage > div + div {
  border-left: 1px dashed var(--ink);
  background: var(--paper-2);
}

.coverage h2 {
  margin: 1.15rem 0 0.6rem;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1;
}

.coverage p:last-child {
  max-width: 470px;
  margin: 0;
  color: var(--ink);
  font-size: 0.8rem;
}

footer {
  display: flex;
  min-height: 160px;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

footer p {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-mark {
  font-family: var(--serif);
  font-size: 2rem;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.04em;
  text-transform: none;
}

@media (max-width: 1024px) {
  header {
    flex-wrap: wrap;
    align-content: center;
    padding-block: 16px;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  nav {
    flex: 0 0 100%;
    order: 3;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    margin-top: 12px;
    border-top: 1px solid var(--ink);
  }

  nav[hidden] {
    display: none;
  }

  nav a {
    width: 100%;
    min-height: 48px;
    justify-content: flex-start;
    padding: 0.75rem 0.25rem;
  }

  nav > * + * {
    border-top: 1px dashed var(--rule);
  }
}

@media (max-width: 820px) {
  .shell {
    width: min(calc(100% - 32px), var(--max));
  }

  header {
    min-height: 76px;
  }

  .brand small {
    display: none;
  }

  .overall {
    min-height: 330px;
  }

  .overall-title {
    font-size: clamp(2.8rem, 14vw, 4.6rem);
  }

  .ledger-heading,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.8rem;
  }

  .ledger-heading {
    margin-top: 64px;
  }

  .ledger-heading > p,
  .section-head > p {
    max-width: none;
    text-align: left;
  }

  .component-row {
    grid-template-columns: 1fr auto;
    gap: 0.8rem 1rem;
    padding: 1.2rem 0;
  }

  .history-placeholder {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .current-state {
    grid-column: 2;
    grid-row: 1;
  }

  .ticket-event {
    grid-template-columns: 1fr;
  }

  .event-stub {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-right: 0;
    border-bottom: 1px dashed var(--ink);
  }

  .event-code {
    margin-top: 0;
    font-size: 1.5rem;
  }

  .history-empty {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .coverage {
    grid-template-columns: 1fr;
  }

  .coverage > div {
    min-height: 0;
    padding: 1.6rem 0;
  }

  .coverage > div + div {
    border-top: 1px dashed var(--ink);
    border-left: 0;
    padding-inline: 1.2rem;
  }

  footer {
    min-height: 140px;
  }

  footer p:not(.footer-mark) {
    max-width: 180px;
  }
}

@media (max-width: 460px) {
  .mast {
    margin-top: 22px;
    box-shadow: 7px 7px 0 var(--ink);
  }

  .ticket-event {
    box-shadow: 7px 7px 0 var(--ink);
  }

  .ticket-event.kind-incident {
    box-shadow: 7px 7px 0 var(--red);
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 0.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .nav-toggle-line {
    transition: none !important;
  }
}
