:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f3f5f1;
  color: #172d27;
  --ink: #172d27;
  --muted: #52645d;
  --line: #dce4dc;
  --accent: #254e43;
  --focus: #32746c;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.07; letter-spacing: -.05em; overflow-wrap: anywhere; }
h2 { font-size: 1.17rem; letter-spacing: -.02em; margin-bottom: 1rem; }
h3 { font-size: 1rem; overflow-wrap: anywhere; }
p { line-height: 1.5; }
input, select, textarea {
  width: 100%;
  min-height: 2.65rem;
  padding: .57rem .7rem;
  border: 1px solid #bfcfc4;
  border-radius: .48rem;
  background: #fff;
  color: var(--ink);
}
textarea { resize: vertical; }
label { display: grid; gap: .34rem; font-weight: 650; font-size: .88rem; }
small { color: var(--muted); font-size: .8rem; }

.app { display: grid; grid-template-columns: minmax(12rem, 15rem) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky;
  top: 0;
  min-height: min(35rem, 100vh);
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 2.15rem;
  padding: 1.85rem 1.15rem 1.35rem;
  background: #17372e;
  color: #f5f9f4;
}
.brand { display: inline-block; width: fit-content; font-size: 1.35rem; letter-spacing: -.075em; text-decoration: none; }
.brand strong { font-weight: 820; }
.brand span { color: #a2c8b7; margin-left: .1em; font-weight: 600; }
.sidebar .brand { margin-inline-start: .35rem; }
.sidebar nav { display: grid; gap: .35rem; }
.sidebar nav a { display: block; text-decoration: none; padding: .72rem .8rem; border-radius: .55rem; min-width: 0; }
.sidebar nav a:hover, .sidebar nav a[aria-current] { background: #315449; }
.sidebar a:focus-visible, .sidebar button:focus-visible { outline-color: #a2c8b7; }
.account { margin-top: auto; border-top: 1px solid #4a665d; padding: 1rem .35rem 0; overflow-wrap: anywhere; }
.account strong, .account small { display: block; color: inherit; }
.account small { margin-top: .23rem; color: #c1d5ca; }
.account .inline { margin-top: .65rem; }
.main-inner { padding: clamp(1.15rem, 4vw, 3.6rem); margin-inline: auto; max-width: 88rem; }
.page-title { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.55rem; }
.back { display: inline-block; margin-bottom: 1rem; font-size: .88rem; color: var(--muted); text-decoration-thickness: 1px; }
.surface { background: #fff; border: 1px solid var(--line); border-radius: .85rem; padding: clamp(1rem, 2vw, 1.45rem); min-width: 0; }
.surface + .surface { margin-top: 1rem; }
.columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.columns > .surface { margin: 0; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .78rem; }
.form { display: grid; gap: .8rem; }
.form button { justify-self: start; }
.button {
  display: inline-flex; justify-content: center; align-items: center;
  padding: .59rem .9rem; min-height: 2.55rem; border: 1px solid transparent;
  border-radius: .45rem; font-size: .87rem; font-weight: 710; text-align: center;
}
.primary { background: var(--accent); color: #fff; }
.primary:hover { background: #316454; }
.secondary { border-color: var(--line); color: var(--ink); background: #f6f8f5; }
.secondary:hover { background: #eaf0eb; }
.quiet { color: inherit; background: transparent; border: 1px solid #698279; }
.quiet:hover { background: #315449; }
summary { color: var(--accent); font-weight: 750; padding-block: .45rem; width: fit-content; }
.details-content { padding-block: .85rem .25rem; }
.details-content > .form + .form { margin-top: .8rem; }
.table-wrap { overflow: auto; margin: .9rem -.35rem 0; }
table { border-collapse: collapse; width: 100%; text-align: start; font-size: .94rem; }
th, td { text-align: start; vertical-align: top; padding: .75rem .55rem; }
thead { color: var(--muted); font-size: .8rem; }
tbody tr { border-top: 1px solid var(--line); }
tbody th small { display: block; font-weight: 450; margin-top: .18rem; }
tbody th a { color: var(--accent); }
.status { display: inline-flex; background: #edf1ee; color: #435850; padding: .2rem .65rem; border-radius: 2rem; font-size: .8rem; white-space: nowrap; }
.status.active { background: #e2f0e5; color: #285a3a; }
.status.paused { background: #f5ecd9; color: #6b4f1c; }
dl { margin: 0 0 .7rem; }
dl div { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); padding-block: .23rem; }
dt, .subtle, .empty { color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }
.empty { padding-top: .5rem; }
.links { display: flex; flex-wrap: wrap; gap: .35rem .8rem; }
.link { color: var(--accent); font-weight: 650; text-underline-offset: .14em; }
.record, .note, .audit { padding-block: .85rem; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.record:first-of-type, .note:first-of-type { margin-top: .8rem; }
.record h3 small { margin-left: .35rem; font-weight: 500; }
.account-record { display: grid; gap: .3rem; }
.account-record p, .audit, .note time { font-size: .86rem; }
.note header { display: flex; flex-wrap: wrap; gap: .3rem .75rem; align-items: baseline; }
.note time { color: var(--muted); }
.note p, .publication-text { white-space: pre-wrap; margin-top: .3rem; }
.notes .form { margin-top: .7rem; }
.tabs { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tabs a { padding: .52rem .75rem; border-radius: .5rem; color: var(--accent); text-decoration: none; font-weight: 650; }
.tabs a[aria-current], .tabs a:hover { background: #e2ece5; }
.audit small { display: block; }
.anonymous { display: grid; place-items: center; min-height: 100vh; padding: 1.1rem; }
.anonymous main { width: min(100%, 28rem); }
.login-card { padding: clamp(1.35rem, 6vw, 2.5rem); border: 1px solid var(--line); border-radius: .95rem; background: #fff; }
.login-card .brand { margin-bottom: 1.4rem; }
.login-card .brand span { color: #36765f; }
.login-card .form, .login-card h1 + p, .login-card .link { margin-top: 1.15rem; }
.eyebrow { color: var(--muted); font-weight: 720; font-size: .83rem; margin-bottom: .5rem; }
.alert { padding: .55rem; border-radius: .4rem; background: #f8e8e5; color: #71302a; }
.notice { padding: .6rem .75rem; border-radius: .45rem; background: #eaf0eb; color: #224438; font-size: .88rem; }
.divider { display: flex; align-items: center; gap: .75rem; margin: 1.15rem 0; color: var(--muted); font-size: .84rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.actions { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.status.ok { background: #e2f0e5; color: #285a3a; }
.status.failed { background: #f8e8e5; color: #71302a; }
.status.untested { background: #edf1ee; color: #435850; }
.meta-list { display: flex; flex-wrap: wrap; gap: .35rem .65rem; font-size: .84rem; color: var(--muted); margin-top: .25rem; }
.stack { display: grid; gap: .8rem; }
label.check { display: flex; align-items: center; gap: .5rem; font-weight: 550; cursor: pointer; }
label.check input[type="checkbox"] { width: auto; min-height: 0; margin: 0; }

@media (max-width: 65rem) {
  .columns { grid-template-columns: 1fr; }
}
@media (max-width: 43rem) {
  .app { display: block; }
  .sidebar { position: static; height: auto; min-height: 0; gap: .65rem; padding: .85rem 1rem; }
  .sidebar nav { display: flex; flex-wrap: wrap; }
  .account { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem .8rem; padding: .6rem 0 0; }
  .account .inline { margin: 0 0 0 auto; }
  .account small { margin: 0; }
  th, td { padding-inline: .4rem; }
}
@media (max-width: 30rem) {
  .fields { grid-template-columns: 1fr; }
}
