* { box-sizing: border-box; }
:root {
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #102825;
  background: #f2f6f3;
  line-height: 1.5;
}
body { margin: 0; }
body > header { background: #fff; border-bottom: 1px solid #dce7e1; }
.topbar {
  max-width: 1380px;
  min-height: 72px;
  margin: auto;
  padding: 12px max(20px, 4vw);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: inline-flex; gap: 12px; align-items: center; color: inherit; font-weight: 750; text-decoration: none; }
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #e9fff4;
  background: #104b3f;
  font-size: 18px;
}
.brand small { display: block; color: #4d665e; font-weight: 500; line-height: 1.25; }
main { max-width: 1380px; margin: auto; padding: 36px max(20px, 4vw); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: clamp(28px, 4vw, 42px); letter-spacing: -.04em; }
h2 { font-size: 21px; letter-spacing: -.02em; }
h3 { font-size: 16px; }
p { margin: .25em 0 .75em; color: #466159; }
a, summary { color: #155a4b; }
summary { cursor: pointer; }
.workspace { display: grid; grid-template-columns: 184px minmax(0, 1fr); gap: clamp(20px, 4vw, 56px); }
.sidebar nav { display: grid; gap: 5px; position: sticky; top: 20px; }
.sidebar a {
  border-radius: 8px;
  color: #284c42;
  font-size: 14px;
  font-weight: 650;
  padding: 9px 12px;
  text-decoration: none;
}
.sidebar a:hover, .sidebar a:focus-visible { background: #e1eee7; }
.workspace-content { min-width: 0; }
.intro, .section-head, .actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.intro { justify-content: space-between; margin-bottom: 20px; }
.section-head { align-items: baseline; }
.connection-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; }
.card, .login {
  background: #fff;
  border: 1px solid #dbe7e0;
  border-radius: 14px;
  padding: clamp(17px, 2.5vw, 26px);
  margin: 0 0 18px;
  min-width: 0;
}
.card:target { border-color: #66998b; }
.login { max-width: 450px; margin: clamp(24px, 10vh, 100px) auto 0; padding: clamp(24px, 5vw, 40px); }
.auth { background: radial-gradient(ellipse at top, #e0f1e8, #f2f6f3 65%); min-height: 100vh; }
.auth form { margin-top: 25px; }
.auth button { width: 100%; margin-top: 6px; }
.notice { border: 1px solid #afcfc1; background: #e5f4ec; padding: 10px 14px; border-radius: 8px; color: #1c483b; }
.notice[role="alert"] { border-color: #e7b8a6; color: #7d3929; background: #fff1eb; }
label { display: block; font-size: 14px; font-weight: 650; color: #28463e; }
input:not([type=checkbox]) {
  display: block;
  width: 100%;
  margin: 5px 0 13px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #bdcfc6;
  background: #fbfdfb;
  color: #102825;
  font: inherit;
}
fieldset { border: 1px solid #dbe7e0; border-radius: 8px; margin: 0 0 12px; display: flex; gap: 8px 12px; flex-wrap: wrap; }
legend { color: #466159; font-size: 13px; padding: 0 5px; }
.check { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 500; }
input[type=checkbox] { accent-color: #155a4b; }
button {
  border-radius: 8px;
  padding: 9px 13px;
  border: 1px solid transparent;
  background: #155a4b;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}
button:hover { filter: brightness(.94); }
button.secondary { background: #f1f6f2; color: #20473b; border-color: #c9dbd1; }
button.danger { background: #8a342c; color: #fff; }
button:disabled { opacity: .45; cursor: default; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid #2b8470; outline-offset: 3px; }
.stack { margin-top: 15px; }
.settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(255px, 100%), 1fr)); gap: 18px; }
.account-list article, .operation { padding: 15px 0; border-bottom: 1px solid #e0eae4; }
.account-list article:last-child, .operation:last-child { border-bottom: 0; }
.account-list article { display: flex; gap: 10px 16px; justify-content: space-between; flex-wrap: wrap; align-items: flex-start; }
.account-info { min-width: 0; overflow-wrap: anywhere; }
.account-list details, .operation details { font-size: 13px; }
.account-list details form { margin-top: 6px; }
.operation:target { background: #ebf5ef; padding: 14px; border-radius: 8px; }
.operation .actions { margin: 10px 0 0; }
.probe { flex-basis: 100%; border-left: 2px solid #8bb6a8; padding-left: 10px; }
.pill, .count, .tags li { display: inline-block; border-radius: 20px; padding: 3px 9px; background: #ebf2ed; color: #365c50; font-size: 12px; font-weight: 650; }
.pill.active { color: #11503d; background: #d9f2e6; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 8px; padding: 0; }
code, pre { background: #edf3ef; border-radius: 5px; padding: 4px 6px; color: #234c40; overflow-wrap: anywhere; }
pre { padding: 12px; max-height: 380px; overflow: auto; white-space: pre-wrap; }
footer { margin-top: 22px; color: #466159; font-size: 14px; }

@media (max-width: 960px) {
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .sidebar nav { position: static; display: flex; flex-wrap: wrap; gap: 3px; }
}
@media (max-width: 640px) {
  .connection-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  main { padding-top: 22px; }
  .sidebar a { padding: 6px 8px; }
}
