:root {
  --color-ink: #16343c;
  --color-primary: #176b75;
  --color-background: #eef3f5;
  --color-surface: #fff;
  --color-muted: #526971;
  --color-border: #c8d7dd;
  --danger: #a32537;
  --scroll-thumb: #78959e;
  --scroll-track: #e1eaed;
  --scroll-hover: #526971;
  --scroll-active: #16343c;
  --font-body: "Avenir Next", Avenir, system-ui, sans-serif;
  --font-utility: SFMono-Regular, Consolas, monospace;
  --radius-control: 6px;
  --radius-panel: 12px;
  --space: 6px;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
  scrollbar-gutter: stable;
}
* {
  box-sizing: border-box;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
  scrollbar-width: thin;
}
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-track {
  background: var(--scroll-track);
}
*::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: 6px;
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-hover);
}
*::-webkit-scrollbar-thumb:active {
  background: var(--scroll-active);
}
body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-ink);
  font: 15px/1.55 var(--font-body);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
select {
  cursor: pointer;
}
button {
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  background: var(--color-primary);
  color: var(--color-surface);
  padding: 9px 16px;
  min-height: 42px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.12s;
}
button:hover {
  filter: brightness(0.92);
}
button:active {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
button.ghost {
  color: var(--color-ink);
  background: transparent;
  border-color: var(--color-border);
}
button.ghost:hover {
  background: var(--color-background);
}
button.danger {
  background: var(--danger);
  color: white;
}
.danger-text {
  color: var(--danger);
}
:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}
input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  padding: 10px 12px;
  background: var(--color-surface);
  color: var(--color-ink);
  min-width: 0;
}
textarea {
  min-height: 120px;
  resize: none;
}
label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -1px;
  margin-bottom: 10px;
}
h2 {
  font-size: 21px;
  letter-spacing: -0.4px;
}
h3 {
  font-size: 17px;
}
.eyebrow,
.aside-label {
  font: 11px/1.5 var(--font-utility);
  letter-spacing: 1.3px;
  color: var(--color-muted);
}
aside {
  width: 228px;
  position: fixed;
  inset: 0 auto 0 0;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  overflow: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.1;
  letter-spacing: 1px;
  margin-bottom: 50px;
}
.brand small {
  display: block;
  font: 10px/1.4 var(--font-utility);
  letter-spacing: 0;
  color: var(--color-muted);
  margin-top: 6px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 40px;
  border: 2px solid var(--color-primary);
  font-size: 27px;
  font-weight: 700;
  color: var(--color-primary);
  border-radius: 3px 12px 3px 12px;
}
.aside-label {
  margin-bottom: 12px;
}
nav {
  display: grid;
  gap: 4px;
}
nav a {
  display: block;
  text-decoration: none;
  color: var(--color-muted);
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
}
nav a:hover {
  background: var(--color-background);
}
nav a[aria-current="page"] {
  background: #e1eff1;
  color: var(--color-primary);
  font-weight: 700;
}
.aside-note {
  margin-top: auto;
  padding-top: 36px;
  font-size: 12px;
  color: var(--color-muted);
}
.aside-note strong {
  font-weight: 500;
}
.shell {
  margin-left: 228px;
}
header {
  min-height: 76px;
  padding: 16px 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 13px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-actions label {
  margin: 0;
  font-size: 12px;
}
.header-actions select {
  max-width: 250px;
  min-width: 140px;
  font-size: 13px;
}
main {
  max-width: 1252px;
  margin: auto;
  padding: 46px 36px;
}
.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.intro > div {
  max-width: 740px;
}
.intro p:last-child {
  color: var(--color-muted);
  margin-bottom: 0;
}
.notice {
  min-height: 28px;
  font-size: 14px;
  margin: 18px 0 12px;
}
.notice[data-tone="error"],
.error {
  color: var(--danger);
}
.notice[data-tone="success"] {
  color: var(--color-primary);
}
.error {
  min-height: 24px;
  font-size: 14px;
  margin: 12px 0;
  overflow-wrap: anywhere;
}
.login-panel {
  max-width: 580px;
  background: var(--color-surface);
  padding: 36px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  margin-top: 22px;
}
.login-panel > p {
  color: var(--color-muted);
}
.secret {
  display: flex;
  gap: 8px;
}
.secret input {
  flex: 1;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.section-head h2 {
  margin: 0;
}
.list-region {
  min-height: 180px;
  overflow: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  background: var(--color-surface);
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--color-muted);
  font-weight: 600;
  background: #f7fafb;
}
td,
th {
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
}
tr:last-child td {
  border: 0;
}
td:first-child {
  font-weight: 600;
  min-width: 150px;
}
td:last-child {
  width: 1%;
  white-space: nowrap;
}
.status {
  border: 1px solid var(--color-border);
  border-radius: 5px;
  padding: 3px 7px;
  font-size: 11px;
  white-space: nowrap;
}
.empty {
  padding: 42px;
  color: var(--color-muted);
  text-align: center;
}
.empty strong {
  display: block;
  color: var(--color-ink);
  font-size: 18px;
  margin-bottom: 10px;
}
#more {
  margin-top: 16px;
}
.detail {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  padding: 28px;
  margin-top: 24px;
}
.detail h2 {
  margin: 0;
}
.detail-head {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 20px;
}
.actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.continuity {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  padding: 20px 0;
  margin-bottom: 20px;
  border-block: 1px solid var(--color-border);
}
.continuity span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--color-muted);
}
.continuity strong {
  font-size: 14px;
}
.body-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.muted {
  color: var(--color-muted);
}
details {
  margin-top: 24px;
}
summary {
  cursor: pointer;
  color: var(--color-muted);
}
pre {
  font: 12px/1.6 var(--font-utility);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--color-background);
  padding: 16px;
  border-radius: 6px;
  max-height: 420px;
  overflow: auto;
}
footer {
  padding: 20px 36px;
  color: var(--color-muted);
  font-size: 11px;
}
dialog {
  width: min(620px, calc(100% - 24px));
  max-height: 90dvh;
  overflow: auto;
  padding: 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  color: var(--color-ink);
  box-shadow: 0 24px 90px #16343c33;
}
dialog::backdrop {
  background: #16343c66;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
}
.dialog-head h2 {
  margin: 0;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
.field {
  margin: 16px 0;
}
.help {
  font-size: 12px;
  color: var(--color-muted);
  margin: 5px 0;
}
.check {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 400;
}
.check input {
  width: auto;
}
.skip {
  position: fixed;
  left: 12px;
  top: -100px;
  z-index: 5;
  background: white;
  padding: 12px;
}
.skip:focus {
  top: 12px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 820px) {
  aside {
    position: static;
    width: auto;
    padding: 20px;
    border-right: 0;
    border-bottom: 1px solid var(--color-border);
  }
  .brand {
    margin-bottom: 20px;
  }
  .aside-label,
  .aside-note {
    display: none;
  }
  nav {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
  }
  nav a {
    font-size: 12px;
    padding: 7px 10px;
  }
  .shell {
    margin: 0;
  }
  header {
    padding: 16px 20px;
    flex-wrap: wrap;
  }
  .header-actions {
    flex-wrap: wrap;
    gap: 8px;
  }
  main {
    padding: 30px 20px;
  }
  .intro {
    align-items: start;
  }
  h1 {
    font-size: 27px;
  }
  .login-panel {
    padding: 24px;
  }
  .secret {
    flex-wrap: wrap;
  }
  .secret button {
    font-size: 12px;
  }
  .detail {
    padding: 20px;
  }
  .detail-head {
    flex-wrap: wrap;
  }
  td,
  th {
    padding: 12px;
  }
  footer {
    padding: 20px;
  }
  .continuity {
    gap: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (forced-colors: active) {
  * {
    scrollbar-color: auto;
  }
  .brand-mark {
    border-color: ButtonText;
  }
  :focus-visible {
    outline-color: Highlight;
  }
}

textarea.expanded {
  min-height: 300px;
}
.compact {
  font-size: 12px;
  padding: 4px 9px;
  min-height: 32px;
  margin-top: 6px;
}
.source-search {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}
.source-search input {
  min-width: 0;
  width: 100%;
}
.source-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--color-border);
  padding: 10px 0;
}
.source-file span {
  overflow-wrap: anywhere;
  min-width: 0;
}
.source-file button {
  max-width: 45%;
  overflow-wrap: anywhere;
  white-space: normal;
}
