/* Home: "Your Servers & Departments". Uses ui.css. */
.hm-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 26px 28px; border-radius: 22px; overflow: hidden;
  background: radial-gradient(120% 140% at 0% 0%, rgb(58 95 200 / .22), transparent 55%), radial-gradient(90% 120% at 100% 100%, rgb(224 38 63 / .18), transparent 60%), var(--ls-surface);
  border: 1px solid var(--ls-line-soft); }
.hm-hero::before { content: ''; position: absolute; right: -40px; top: -60px; width: 280px; height: 280px; opacity: .05; pointer-events: none;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%23fff' d='M50 4l13.5 29.6 32.4 3.5-24.2 21.8 6.8 31.9L50 74.6 21.5 90.8l6.8-31.9L4.1 37.1l32.4-3.5z'/%3E%3C/svg%3E"); }
.hm-me { display: flex; align-items: center; gap: 18px; min-width: 0; }
.hm-av { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; background: var(--ls-raised); box-shadow: 0 0 0 3px var(--ls-ground), 0 0 0 5px var(--ls-red); }
.hm-me h1 { margin: 2px 0 4px; font-size: clamp(24px, 3.2vw, 34px); line-height: 1.1; font-variation-settings: 'wdth' 120; letter-spacing: -.015em; }
.hm-me p { margin: 0; color: var(--ls-muted); }
.hm-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.hm-tiles { display: grid; grid-template-columns: repeat(3, minmax(96px, 1fr)); gap: 8px; }
.hm-tile { padding: 12px 14px; border-radius: 14px; background: rgb(255 255 255 / .03); border: 1px solid var(--ls-line-soft); text-align: left; }
.hm-tile b { display: block; font-size: 24px; line-height: 1.1; font-variation-settings: 'wdth' 115; }
.hm-tile span { font-size: 12px; color: var(--ls-muted); }
@media (max-width: 860px) { .hm-hero { grid-template-columns: 1fr; } .hm-tiles { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .hm-hero { padding: 20px 16px; } .hm-av { width: 56px; height: 56px; } }

/* cards */
.hm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.hm-grid.list { grid-template-columns: 1fr; }
.hm-card { --c: var(--ls-navy); position: relative; display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: var(--ls-r); background: var(--ls-surface); border: 1px solid var(--ls-line-soft); overflow: hidden; transition: border-color .18s, transform .18s, box-shadow .18s; }
.hm-card::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--c), transparent 80%); opacity: .9; }
.hm-card:hover { border-color: color-mix(in srgb, var(--c) 45%, var(--ls-line)); transform: translateY(-2px); box-shadow: var(--ls-shadow); }
.hm-card-h { display: flex; align-items: center; gap: 12px; min-width: 0; }
.hm-logo { width: 46px; height: 46px; border-radius: 12px; flex: none; display: grid; place-items: center; overflow: hidden; background: color-mix(in srgb, var(--c) 22%, var(--ls-raised)); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); font: 800 12px var(--ls-font); letter-spacing: .02em; color: #fff; }
.hm-logo img { width: 100%; height: 100%; object-fit: cover; }
.hm-logo svg { width: 22px; height: 22px; }
.hm-title { min-width: 0; flex: 1; }
.hm-title b { display: block; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-title .hm-sub { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.hm-about { margin: -4px 0 0; color: var(--ls-muted); font-size: 13px; }
.hm-stats { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--ls-muted); }
.hm-stats span { display: inline-flex; align-items: center; gap: 6px; }
.hm-stats b { color: var(--ls-ink); font-weight: 700; }
.hm-stats .good b { color: var(--ls-good); }
.hm-stats .warn b { color: var(--ls-warn); }
.hm-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.hm-actions .ls-btn { height: 32px; font-size: 12.5px; }
.hm-actions .ls-btn:first-child { background: color-mix(in srgb, var(--c) 24%, var(--ls-raised)); border-color: color-mix(in srgb, var(--c) 45%, transparent); }
/* list view: one line per card */
.hm-grid.list .hm-card { flex-direction: row; align-items: center; flex-wrap: wrap; padding: 14px 16px; }
.hm-grid.list .hm-card-h { flex: 1 1 280px; }
.hm-grid.list .hm-about { display: none; }
.hm-grid.list .hm-stats { flex: 0 1 auto; }
.hm-grid.list .hm-actions { margin: 0; flex: 0 0 auto; }
.hm-group { margin: 18px 0 10px; display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ls-muted); }
.hm-group::after { content: ''; flex: 1; height: 1px; background: var(--ls-line-soft); }
.hm-group:first-child { margin-top: 0; }

.hm-empty { padding: 26px; border-radius: var(--ls-r); border: 1px dashed var(--ls-line); text-align: center; color: var(--ls-muted); }
.hm-empty b { display: block; color: var(--ls-ink); font-size: 15px; margin-bottom: 4px; }

/* signed out */
.hm-login { min-height: calc(100vh - 64px); display: grid; place-items: center; padding: 20px; }
.hm-login-card { width: min(440px, 100%); padding: 32px 28px; border-radius: 22px; background: var(--ls-surface); border: 1px solid var(--ls-line-soft); text-align: center; }
.hm-login-card img { width: 64px; height: 64px; border-radius: 16px; }
.hm-login-card h1 { margin: 14px 0 6px; font-size: 26px; font-variation-settings: 'wdth' 120; }
.hm-login-card p { color: var(--ls-muted); margin: 0 0 20px; }
.hm-discord { width: 100%; justify-content: center; height: 44px; background: #5865F2; border-color: transparent; color: #fff; font-size: 14.5px; }
.hm-discord:hover { background: #6974F4; }

.hm-skel { height: 190px; border-radius: var(--ls-r); background: linear-gradient(90deg, var(--ls-surface), var(--ls-raised), var(--ls-surface)); background-size: 200% 100%; animation: hm-sk 1.4s linear infinite; }
@keyframes hm-sk { to { background-position: -200% 0; } }
html.lite .hm-card, html.lite .hm-card:hover { transform: none; transition: none; }

/* welcome (signed out): the main address */
.hm-welcome { min-height: calc(100vh - 64px); }
.hm-wl-hero { position: relative; display: grid; justify-items: center; text-align: center; gap: 8px; padding: 64px 20px 46px; overflow: hidden;
  background: radial-gradient(70% 90% at 15% 0%, rgb(58 95 200 / .28), transparent 60%), radial-gradient(60% 80% at 90% 100%, rgb(224 38 63 / .22), transparent 60%); border-bottom: 1px solid var(--ls-line-soft); }
.hm-wl-hero::before { content: ''; position: absolute; right: 6%; top: -40px; width: 320px; height: 320px; opacity: .05; pointer-events: none;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%23fff' d='M50 4l13.5 29.6 32.4 3.5-24.2 21.8 6.8 31.9L50 74.6 21.5 90.8l6.8-31.9L4.1 37.1l32.4-3.5z'/%3E%3C/svg%3E"); }
.hm-wl-logo { width: 84px; height: 84px; border-radius: 22px; box-shadow: 0 0 0 4px var(--ls-ground), 0 0 0 6px var(--ls-red); margin-bottom: 10px; }
.hm-wl-hero h1 { margin: 0; font-size: clamp(30px, 5.5vw, 54px); line-height: 1.05; font-variation-settings: 'wdth' 122; letter-spacing: -.02em; }
.hm-wl-hero p { margin: 0 0 14px; color: var(--ls-muted); font-size: 17px; max-width: 560px; }
.hm-wl-signin { width: auto; padding: 0 22px; }
.hm-wl-note { color: var(--ls-faint); font-size: 12.5px; }
.hm-wl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.hm-wl-tile { --c: var(--ls-navy); display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 4px 14px; align-items: center; padding: 18px; border-radius: var(--ls-r); background: var(--ls-surface); border: 1px solid var(--ls-line-soft); text-decoration: none; color: inherit; transition: border-color .18s, transform .18s, box-shadow .18s; position: relative; overflow: hidden; }
.hm-wl-tile::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c); }
.hm-wl-tile:hover { border-color: color-mix(in srgb, var(--c) 45%, var(--ls-line)); transform: translateY(-2px); box-shadow: var(--ls-shadow); }
.hm-wl-ic { grid-row: span 2; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 20%, var(--ls-raised)); color: #fff; }
.hm-wl-ic svg { width: 22px; height: 22px; }
.hm-wl-tile b { font-size: 15.5px; }
.hm-wl-tile small { color: var(--ls-muted); font-size: 13px; }
.hm-wl-apply { display: flex; flex-wrap: wrap; gap: 8px; }
.hm-wl-apply a { --c: var(--ls-navy); display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 11px; background: var(--ls-surface); border: 1px solid color-mix(in srgb, var(--c) 40%, var(--ls-line)); color: inherit; text-decoration: none; font-weight: 600; font-size: 13.5px; }
.hm-wl-apply a:hover { background: color-mix(in srgb, var(--c) 16%, var(--ls-surface)); }
.hm-wl-apply a i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
html.lite .hm-wl-tile, html.lite .hm-wl-tile:hover { transform: none; transition: none; }
