:root {
  color-scheme: dark;
  --bg: #161815;
  --panel: #1d201b;
  --field: #181a17;
  --raised: #272b24;
  --border: #3a4036;
  --text: #edf0e8;
  --muted: #acb5a5;
  --accent: #c8d9a6;
  --ink: #1a2411;
  --danger: #f3ae9c;
  --sans: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--sans); }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .24em; }
button, input, select, textarea { font: inherit; color: var(--text); }
button, input, select, textarea { border: 1px solid var(--border); border-radius: 5px; }
button, select { min-height: 40px; }
button {
  padding: .45rem .8rem;
  background: var(--raised);
  cursor: pointer;
  text-align: left;
}
button:hover:not(:disabled) { border-color: var(--muted); }
button:disabled { color: var(--muted); opacity: .55; cursor: default; }
button.primary { background: var(--accent); color: var(--ink); border-color: transparent; font-weight: 660; }
button.danger { background: #562f28; color: #ffe5dd; border-color: #7b493d; }
button.quiet { border-color: transparent; background: none; color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input, select, textarea { background: var(--field); padding: .55rem .65rem; width: 100%; }
textarea { resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #929b8a; opacity: 1; }
label { display: block; color: var(--muted); font-size: .86rem; margin: 0 0 .35rem; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.18; }
h1 { font-size: clamp(2rem, 4vw, 3.15rem); letter-spacing: -.055em; font-weight: 650; }
h2 { line-height: 1.25; font-size: clamp(1.45rem, 3vw, 2rem); letter-spacing: -.04em; }
h3 { font-size: 1rem; }
.mono { font-family: var(--mono); font-size: .82rem; }
.muted { color: var(--muted); }
.workspace { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.mast { border-bottom: 1px solid var(--border); }
.mast .workspace { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-weight: 650; text-decoration: none; letter-spacing: -.025em; }
.mark { display: grid; place-items: center; background: var(--accent); color: var(--ink); border-radius: 5px; width: 25px; height: 25px; font: 700 13px var(--mono); }
.account { display: flex; gap: 10px; align-items: center; color: var(--muted); }
#account-name { overflow-wrap: anywhere; font: .78rem var(--mono); }
.boot { padding-top: 54px; color: var(--muted); }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; min-width: 0; }
.login { max-width: 440px; margin: clamp(36px, 11vh, 115px) auto 0; padding: clamp(20px, 5vw, 34px); }
.login p:not(.failure) { margin: 13px 0 23px; color: var(--muted); }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.failure { color: var(--danger); margin-top: 12px; overflow-wrap: anywhere; }
.page-head { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 12px; margin: clamp(24px, 6vh, 55px) 0 24px; }
.page-head p { margin-top: 6px; color: var(--muted); }
.text-link { font-size: .91rem; }
.external::after {
  content: "";
  display: inline-block;
  width: .52em;
  height: .52em;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  background: linear-gradient(-45deg, transparent 44%, currentColor 45% 55%, transparent 56%);
}
.text-link.external::after { margin-left: .45em; vertical-align: .22em; }
.connect-launchers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.connect-launcher {
  display: grid;
  align-content: center;
  gap: 2px;
  min-height: 72px;
  padding: .65rem .9rem;
}
.connect-launcher strong { font-size: clamp(.95rem, 2vw, 1.1rem); }
.connect-launcher span { min-width: 0; font-size: .8rem; font-weight: 400; overflow-wrap: anywhere; }
.connect-launcher:not(.primary) { background: #293022; border-color: #57624d; }
.connect-launcher:not(.primary) span { color: var(--muted); }
.connect-launcher.primary span { color: #34402b; }
.primary-link { background: var(--accent); color: var(--ink); font-weight: 660; }
.button-link[aria-disabled="true"] { opacity: .55; cursor: default; }
#connection-target { overflow-wrap: anywhere; }
.layout { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(0, 1.45fr); gap: 18px; align-items: start; padding-bottom: 48px; }
.search-line, .detail { padding: 16px; }
.search-line { border-bottom: 1px solid var(--border); }
.notice { color: var(--muted); padding: 14px 16px; }
.notice:empty { display: none; }
.repos, .keys { list-style: none; margin: 0; padding: 0; }
.repos li + li { border-top: 1px solid var(--border); }
.repo-row {
  width: 100%; min-height: 62px; display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 7px; padding: .67rem .9rem .67rem 1rem; border: 0; border-radius: 0; background: transparent;
}
.repo-row:hover, .repo-row[aria-pressed="true"] { background: #303629; }
.repo-row[aria-pressed="true"] { box-shadow: inset 3px 0 var(--accent); }
.repo-row strong, .repo-row small { min-width: 0; overflow-wrap: anywhere; }
.repo-row small { color: var(--muted); grid-column: 1; font-size: .79rem; }
.repo-row time { grid-column: 2; grid-row: 1; color: var(--muted); font-size: .72rem; }
.repo-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; overflow-wrap: anywhere; }
.repo-head a { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border: 1px solid var(--border); border-radius: 5px; text-decoration: none; }
.description { color: var(--muted); margin-top: 8px; max-width: 58ch; overflow-wrap: anywhere; }
.metadata { display: flex; flex-wrap: wrap; column-gap: 26px; row-gap: 5px; margin: 16px 0; }
.metadata div { display: flex; gap: 8px; align-items: baseline; }
dt { color: var(--muted); font-size: .82rem; }
dd { margin: 0; overflow-wrap: anywhere; }
.tool-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 0 -16px 15px; padding-inline: 16px; }
.tool-tabs button { border: 0; border-radius: 0; background: transparent; color: var(--muted); }
.tool-tabs button[aria-pressed="true"] { color: var(--accent); box-shadow: inset 0 -2px var(--accent); }
.config-options { margin-bottom: 12px; }
.config-options select { width: auto; max-width: 100%; }
.access-line {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px 12px;
  margin-bottom: 14px;
}
.access-line select { width: auto; max-width: 100%; }
.access-note { align-self: center; font-size: .82rem; }
.button-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: .42rem .7rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  text-decoration: none;
}
.button-link:hover { border-color: var(--muted); }

.feedback { min-height: 1.45em; font-size: .87rem; color: var(--muted); margin-top: 6px; }
.feedback:empty { min-height: 0; margin-top: 0; }
.keys-head, .keys li, .dialog-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.keys li { padding: .72rem 0; border-bottom: 1px solid var(--border); }
.keys li:last-child { border-bottom: 0; }
.keys li p { overflow-wrap: anywhere; }
.key-details { color: var(--muted); font-size: .78rem; }
dialog { width: min(540px, calc(100% - 28px)); max-height: 90vh; background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 22px; }
dialog::backdrop { background: rgb(0 0 0 / 68%); }
dialog label, #revoke-description { margin-top: 12px; }
.dialog-title { margin-bottom: 8px; }
.dialog-title .quiet { font-size: 1.5rem; line-height: 1; padding: .35rem .65rem; }
.review { display: grid; gap: 6px; }
.review div { display: grid; grid-template-columns: 6.4rem minmax(0, 1fr); gap: .5rem; }
@media (max-width: 680px) {
  .workspace { width: calc(100% - 28px); }
  .connect-launchers { grid-template-columns: minmax(0, 1fr); }
  .layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .mast .workspace { min-height: 55px; }
  .tool-tabs { overflow-x: auto; }
}
