:root {
  color-scheme: light;
  font: 16px/1.5 system-ui, sans-serif;
  color: #24292c;
  background: #fff;
  --line: #e2e5e3;
  --muted: #565f61;
  --accent: #244e40;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid #287559; outline-offset: 3px; }

.page {
  max-width: 76rem;
  margin: 0 auto;
  padding: clamp(1.25rem, 3.8vw, 3.5rem) clamp(1rem, 3vw, 2rem);
}

h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.45rem); line-height: 1.14; letter-spacing: -.035em; }
h2 { margin: 1.65rem 0 .4rem; font-size: 1.05rem; }
.page-heading, .detail-heading { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem 1.25rem; }
.page-heading { justify-content: space-between; margin-bottom: 1.3rem; }
.filter, .edit { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; }
label { font-weight: 600; }
select, .button {
  font: inherit;
  border: 1px solid #b9c4bf;
  border-radius: .4rem;
  padding: .38rem .65rem;
}
select { color: inherit; background: #fff; }
.button {
  display: inline-block;
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: #193b30; }
.button.secondary { color: var(--accent); background: #fff; border-color: #b9c4bf; }
.button.secondary:hover { background: #eef4f0; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: .55rem; }
table { width: 100%; border-collapse: collapse; font-size: .91rem; }
th, td { padding: .76rem .8rem; text-align: left; vertical-align: middle; }
thead { background: #f5f6f5; color: #424a49; }
tbody tr + tr, tbody tr:first-child { border-top: 1px solid var(--line); }
tbody tr:hover { background: #f8faf8; }
tbody th { font-weight: 600; min-width: 11rem; }
td .muted { font-size: .84rem; }
.number { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.muted, .empty { color: var(--muted); }
.empty { padding: 1.4rem .8rem; }
.status { display: inline-block; border-radius: .3rem; padding: .12rem .45rem; font-size: .84rem; font-weight: 600; white-space: nowrap; }
.status.new { background: #ebeeec; color: #3a4745; }
.status.in_progress { background: #e1efe5; color: #28523b; }
.status.review { background: #f6edda; color: #714d1b; }
.status.closed { background: #eae5ee; color: #4d3e60; }

.detail { max-width: 45rem; }
.back { display: inline-block; margin-bottom: 1.05rem; }
.detail-heading { margin-bottom: 1.4rem; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .55rem 1.5rem; border-block: 1px solid var(--line); padding-block: 1rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.note { margin: 0 0 1.45rem; }
.notice { color: var(--accent); margin: .55rem 0 0; }

@media (max-width: 36rem) {
  th, td { padding: .65rem .55rem; }
  .facts { column-gap: .85rem; }
}

.topbar { background: #f7f8f6; border-bottom: 1px solid var(--line); }
.topbar-inner {
  max-width: 76rem;
  margin: 0 auto;
  padding: .8rem clamp(1rem, 3vw, 2rem);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .55rem 1.15rem;
}
.brand {
  color: #233d33;
  font-weight: 850;
  font-size: .99rem;
  letter-spacing: .035em;
  white-space: nowrap;
  text-decoration: none;
}
.navigation { display: flex; flex: 1 1 auto; flex-wrap: wrap; gap: .15rem .25rem; }
.navigation a, .profile-link {
  color: #34413d;
  text-decoration: none;
  padding: .34rem .45rem;
  font-size: .88rem;
  font-weight: 600;
  border-radius: .35rem;
}
.navigation a:hover, .profile-link:hover { background: #edf0ed; }
.navigation [aria-current="page"], .profile-link[aria-current="page"] { color: #1d4738; background: #e4eee7; }
.profile-link { white-space: nowrap; text-align: left; }
.profile-link small { display: block; color: var(--muted); font-weight: 400; }

.signin, .account-form { padding: clamp(1rem, 4vw, 1.6rem); border: 1px solid var(--line); border-radius: .55rem; }
.signin { max-width: 24rem; margin: 0 auto; }
.signin h1 { font-size: 1.65rem; }
.form-stack { display: grid; align-content: start; gap: .44rem; margin-top: 1rem; }
.form-stack label:not(:first-of-type) { margin-top: .35rem; }
.form-stack .button { justify-self: start; margin-top: .35rem; }
.form-stack input, .form-stack textarea {
  width: 100%;
  border: 1px solid #b9c4bf;
  border-radius: .4rem;
  padding: .45rem .6rem;
  color: inherit;
  font: inherit;
  background: #fff;
}
textarea { resize: vertical; }
.form-error { color: #9c2a24; }
.signout { margin-top: 1.35rem; }
.banner { border: 1px solid #d5e6da; background: #f0f7f1; border-radius: .4rem; margin: 0 0 1rem; padding: .5rem .75rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.item-list { border-top: 1px solid var(--line); }
.item { padding: .85rem 0; border-bottom: 1px solid var(--line); }
.item-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: .25rem .65rem; }
.item h2, .account-form h2 { margin: 0; }
.item p { margin: .35rem 0; }
.item form { margin-top: .55rem; }
.item-meta { color: var(--muted); font-size: .88rem; }
.preserve-lines { white-space: pre-wrap; overflow-wrap: anywhere; }
.ticket-form { margin: 0 0 1.5rem; }
.user-layout { display: grid; align-items: start; grid-template-columns: minmax(0, 3fr) minmax(15rem, 2fr); gap: 1.15rem; }
@media (max-width: 43rem) {
  .navigation { order: 2; flex-basis: 100%; }
  .profile-link { margin-left: auto; }
  .user-layout { grid-template-columns: minmax(0, 1fr); }
}
