:root {
  --bg: #f8f9fa; --surface: #ffffff; --surface-2: #f1f3f4; --text: #202124; --muted: #5f6368;
  --border: #dadce0; --primary: #1a73e8; --primary-soft: #e8f0fe; --shadow: 0 1px 2px rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
  --shadow-hover: 0 1px 3px rgba(60,64,67,.3), 0 4px 8px 3px rgba(60,64,67,.15);
  --green: #188038; --green-soft: #e6f4ea; --amber: #b06000; --amber-soft: #fef7e0; --red: #c5221f; --red-soft: #fce8e6; --grey-soft: #e8eaed;
}
[data-theme="dark"] {
  --bg: #202124; --surface: #292a2d; --surface-2: #303134; --text: #e8eaed; --muted: #9aa0a6;
  --border: #3c4043; --primary: #8ab4f8; --primary-soft: #1f2c3f; --shadow: 0 1px 2px rgba(0,0,0,.5);
  --shadow-hover: 0 2px 6px rgba(0,0,0,.6);
  --green: #81c995; --green-soft: #1e3a27; --amber: #fdd663; --amber-soft: #3d3014; --red: #f28b82; --red-soft: #3f2220; --grey-soft: #3c4043;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Google Sans Text", "Google Sans", Roboto, system-ui, sans-serif; background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--primary); text-decoration: none; }
code { font-family: "Roboto Mono", monospace; font-size: .9em; background: var(--surface-2); padding: 2px 6px; border-radius: 4px; }
.wrap { width: min(1200px, 100% - 32px); margin: 0 auto; }

.top { position: sticky; top: 0; z-index: 10; background: var(--surface); border-bottom: 1px solid var(--border); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: "Google Sans", sans-serif; font-size: 20px; font-weight: 500; color: var(--text); }
.logo { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; width: 26px; height: 26px; }
.logo i { border-radius: 3px; display: block; }
.logo .b { background: #4285f4; } .logo .r { background: #ea4335; } .logo .y { background: #fbbc04; } .logo .g { background: #34a853; }
.actions { display: flex; align-items: center; gap: 8px; flex: 1; justify-content: flex-end; }
#q {
  width: min(420px, 100%); height: 40px; border-radius: 24px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  padding: 0 16px; font: inherit; font-size: 15px; outline: none; transition: box-shadow .15s, background .15s;
}
#q:focus { background: var(--surface); box-shadow: var(--shadow); }
button.icon { width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); font-size: 20px; cursor: pointer; }
button.icon:hover { background: var(--surface-2); color: var(--text); }

.hero { padding: 40px 0 20px; }
.hero h1 { font-family: "Google Sans", sans-serif; font-weight: 400; font-size: clamp(28px, 4vw, 40px); margin: 0 0 8px; }
.hero p { color: var(--muted); font-size: 16px; margin: 0 0 20px; line-height: 1.5; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px; font-size: 14px; background: var(--surface); color: var(--text); cursor: pointer; font: inherit;
}
.chip[aria-pressed="true"] { background: var(--primary-soft); border-color: transparent; color: var(--primary); font-weight: 500; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; padding-bottom: 40px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 12px;
  transition: box-shadow .15s, transform .15s; position: relative;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.card .head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card h2 { font-family: "Google Sans", sans-serif; font-weight: 500; font-size: 18px; margin: 0; line-height: 1.3; }
.card .customer { color: var(--muted); font-size: 13px; margin-top: 4px; }
.card .avatar {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-family: "Google Sans", sans-serif; font-weight: 700; font-size: 18px; color: #fff;
}
.card p { margin: 0; color: var(--text); font-size: 14px; line-height: 1.5; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.card .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--border); padding-top: 12px; }
.card .host { font-family: "Roboto Mono", monospace; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.live { color: var(--green); background: var(--green-soft); }
.pill.beta, .pill.deploying { color: var(--amber); background: var(--amber-soft); }
.pill.down, .pill.retired { color: var(--red); background: var(--red-soft); }
.pill.iap { color: var(--muted); background: var(--grey-soft); } .pill.iap::before { content: "🔒"; background: none; width: auto; height: auto; font-size: 10px; }
.pill.public { color: var(--primary); background: var(--primary-soft); } .pill.public::before { display: none; }
.open {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 18px; background: var(--primary); color: #fff; font-weight: 500; font-size: 14px;
}
[data-theme="dark"] .open { color: #202124; }
.open:hover { filter: brightness(1.08); }
.card.stretched::after { content: ""; position: absolute; inset: 0; border-radius: 16px; }
.empty { color: var(--muted); text-align: center; padding: 40px 0; }
.foot { margin-top: auto; padding: 20px 0 32px; color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--border); }
@media (max-width: 600px) { .top .wrap { height: auto; padding: 10px 0; flex-wrap: wrap; } .actions { width: 100%; } #q { width: 100%; } }
