@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/dm-sans.woff2") format("woff2");
}
@font-face {
  font-family: "Host Grotesk";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("/fonts/host-grotesk.woff2") format("woff2");
}
@font-face {
  font-family: "Fragment Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/fragment-mono.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --bg: #0a0a0b;
  --bg-elev: #101012;
  --text: #fafafa;
  --text-muted: #a1a1aa;
  --text-faint: #71717a;
  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .16);
  --surface: rgba(255, 255, 255, .04);
  --surface-strong: rgba(255, 255, 255, .08);
  --solid: #0f0f11;
  --accent: #1db954;
  --accent-strong: #17a74c;
  --accent-soft: rgba(29, 185, 84, .14);
  --accent-ink: #0b0b0c;
  --glow: rgba(29, 185, 84, .07);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, .4);
  --header-bg: rgba(10, 10, 11, .72);
  --radius: 14px;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #fafafa;
  --bg-elev: #ffffff;
  --text: #18181b;
  --text-muted: #52525b;
  --text-faint: #a1a1aa;
  --border: rgba(0, 0, 0, .08);
  --border-strong: rgba(0, 0, 0, .16);
  --surface: rgba(0, 0, 0, .03);
  --surface-strong: rgba(0, 0, 0, .06);
  --solid: #ffffff;
  --accent: #169c46;
  --accent-strong: #0f7c37;
  --accent-soft: rgba(22, 156, 70, .12);
  --accent-ink: #ffffff;
  --glow: rgba(22, 156, 70, .05);
  --shadow-sm: 0 1px 2px rgba(24, 24, 27, .06);
  --shadow-md: 0 10px 30px rgba(24, 24, 27, .08);
  --header-bg: rgba(250, 250, 250, .72);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; background-color: var(--bg); color: var(--text); font-family: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a { color: var(--accent); text-decoration: none; }

.bg-orbs { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(110px); will-change: transform; }
.orb-one { width: 52vw; height: 52vw; left: -14vw; top: -18vw; background: radial-gradient(circle, rgba(29, 185, 84, .10), transparent 68%); animation: orb-a 30s ease-in-out infinite alternate; }
.orb-two { width: 44vw; height: 44vw; right: -16vw; top: 10vh; background: radial-gradient(circle, rgba(40, 160, 90, .08), transparent 68%); animation: orb-b 36s ease-in-out infinite alternate; }
.orb-three { width: 40vw; height: 40vw; left: 20vw; bottom: -18vw; background: radial-gradient(circle, rgba(60, 200, 130, .07), transparent 68%); animation: orb-c 42s ease-in-out infinite alternate; }
.orb-four { display: none; }
.bg-field { position: fixed; inset: 0; z-index: -1; pointer-events: none; }

.topbar { position: sticky; top: 12px; z-index: 40; width: min(1160px, calc(100% - 32px)); height: 56px; margin: 0 auto; padding: 0 8px 0 16px; display: flex; align-items: center; justify-content: space-between; border: 0; background: transparent; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; }
.brand-mark { width: 30px; height: 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 6px; border-radius: 8px; background: var(--accent); box-shadow: 0 4px 14px rgba(77, 107, 254, .3); }
.brand-mark span { border: 1.5px solid rgba(255, 255, 255, .95); border-radius: 2px; }
.brand-copy { display: flex; align-items: baseline; gap: 7px; }
.brand-copy strong { font-family: "Host Grotesk", "DM Sans", sans-serif; font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.brand-copy small { color: var(--text-faint); font-size: 12px; font-weight: 500; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.header-filter { position: relative; }
.filter-button, .icon-button, .account-button { border: 1px solid rgba(255, 255, 255, .06); background: linear-gradient(155deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .016) 50%, rgba(255, 255, 255, .03)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), inset 0 -1px 0 rgba(255, 255, 255, .02); backdrop-filter: blur(8px) saturate(1.2); transition: background .15s, border-color .15s, transform .05s, box-shadow .15s; }
.filter-button:hover, .icon-button:hover, .account-button:hover { background: linear-gradient(155deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .03) 50%, rgba(255, 255, 255, .05)); border-color: rgba(255, 255, 255, .12); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 -1px 0 rgba(255, 255, 255, .03); }
.filter-button:active, .icon-button:active, .account-button:active { transform: scale(.98); }
.filter-button { height: 38px; padding: 0 12px; display: flex; align-items: center; gap: 8px; border-radius: 10px; font-size: 13px; font-weight: 550; cursor: pointer; white-space: nowrap; }
.filter-button > svg:first-child { width: 15px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.filter-chevron { width: 13px; flex: 0 0 auto; fill: none; stroke: var(--text-faint); stroke-width: 2; stroke-linecap: round; transition: transform .15s; }
.filter-button[aria-expanded="true"] .filter-chevron { transform: rotate(180deg); }
.filter-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 50; min-width: 188px; padding: 5px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 15px; background: linear-gradient(170deg, rgba(30, 33, 44, .86), rgba(18, 20, 27, .9)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 -1px 0 rgba(255, 255, 255, .04), 0 22px 52px rgba(0, 0, 0, .45); backdrop-filter: blur(30px) saturate(1.6); }
.filter-menu[hidden] { display: none; }
.filter-option { width: 100%; height: 36px; padding: 0 10px; display: flex; align-items: center; border: 0; border-radius: 8px; color: var(--text-muted); background: transparent; font-size: 13px; font-weight: 500; cursor: pointer; text-align: left; transition: color .12s, background .12s; }
.filter-option:hover { color: var(--text); background: var(--surface); }
.filter-option.active { color: var(--text); background: var(--surface-strong); }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; cursor: pointer; }
.icon-button svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.account-button { height: 38px; padding: 3px 4px 3px 12px; display: flex; align-items: center; gap: 8px; border-radius: 10px; font-size: 13px; font-weight: 550; cursor: pointer; white-space: nowrap; }
.account-avatar { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: var(--accent-ink); background: var(--accent); font-size: 12px; font-weight: 650; }

main { flex: 1 0 auto; width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px 40px; }
.directory { min-height: 100px; padding-top: 28px; }
kbd { padding: 4px 7px; border: 1px solid var(--border); border-radius: 6px; color: var(--text-faint); background: var(--surface); font-family: "Fragment Mono", monospace; font-size: 11px; }

.service-grid { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; list-style: none; }
.service-grid.favorites-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.service-card { position: relative; min-height: 128px; padding: 15px; display: flex; flex-direction: column; border: 1px solid rgba(255, 255, 255, .06); border-radius: 18px; background: linear-gradient(155deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .012) 50%, rgba(255, 255, 255, .025)); backdrop-filter: blur(8px) saturate(1.2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), inset 0 -1px 0 rgba(255, 255, 255, .02); transition: border-color .18s ease, box-shadow .18s ease, transform .18s cubic-bezier(.2, .8, .2, 1); animation: card-in .45s cubic-bezier(.16, 1, .3, 1) backwards; }
.service-card::before { position: absolute; inset: 0; z-index: 1; content: ""; border-radius: inherit; pointer-events: none; background: radial-gradient(140% 70% at 50% -20%, rgba(255, 255, 255, .05), transparent 55%); }
.service-card::after { position: absolute; inset: 0; z-index: 1; content: ""; border-radius: inherit; pointer-events: none; background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .04), transparent 60%); opacity: 0; transition: opacity .2s ease; }
.service-card:hover::after { opacity: 1; }
.service-card:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, .12); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 -1px 0 rgba(255, 255, 255, .03); }
.service-card:nth-child(2) { animation-delay: .05s; }
.service-card:nth-child(3) { animation-delay: .1s; }
.service-card:nth-child(4) { animation-delay: .15s; }
.service-card:nth-child(5) { animation-delay: .2s; }
.service-card:nth-child(6) { animation-delay: .25s; }
.service-card:nth-child(7) { animation-delay: .3s; }
.service-card:nth-child(8) { animation-delay: .35s; }
.service-card.large { min-height: 224px; padding: 22px; }
.card-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card-top, .card-bottom, .service-card h3, .service-card p, .service-symbol, .product-label, .open-arrow { pointer-events: none; }
.favorite-button { pointer-events: auto; }
.card-top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; }
.service-symbol { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--svc, #ffffff) 55%, transparent); border-radius: 11px; color: var(--svc, var(--text)); background: linear-gradient(180deg, color-mix(in srgb, var(--svc, #ffffff) 32%, transparent), color-mix(in srgb, var(--svc, #ffffff) 12%, transparent)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 -4px 8px -4px rgba(255, 255, 255, .18), 0 0 18px color-mix(in srgb, var(--svc, #ffffff) 26%, transparent); transition: border-color .15s, color .15s, box-shadow .15s; }
.service-card:hover .service-symbol { border-color: color-mix(in srgb, var(--svc, #ffffff) 55%, transparent); color: var(--svc, var(--text)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 0 22px color-mix(in srgb, var(--svc, #ffffff) 30%, transparent); }
.service-symbol svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.coral { --svc: #f57d7d; }
.violet { --svc: #9b8af0; }
.cyan { --svc: #5ec8dc; }
.amber { --svc: #e8b75c; }
.blue { --svc: #6f96f5; }
.sky { --svc: #62b8ea; }
.green { --svc: #5cbe9c; }
.rose { --svc: #e585a8; }
.mint { --svc: #5bc6b6; }
.orange { --svc: #eea15f; }
.slate { --svc: #94a3b8; }
.favorite-button { position: relative; z-index: 2; width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 8px; color: var(--text-faint); background: transparent; cursor: pointer; transition: color .12s, background .12s; }
.favorite-button:hover { color: var(--text); background: var(--surface-strong); }
.favorite-button.active { color: var(--accent-strong); }
.favorite-button svg { width: 16px; fill: currentColor; stroke: currentColor; stroke-width: 1.6; }
.service-card h3 { position: relative; z-index: 2; margin: 13px 0 3px; font-family: "Host Grotesk", "DM Sans", sans-serif; font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; }
.service-card p { position: relative; z-index: 2; margin: 0; color: var(--text-muted); font-size: 12.5px; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-bottom { position: relative; z-index: 2; margin-top: auto; padding-top: 13px; display: flex; align-items: center; justify-content: space-between; }
.product-label { color: var(--text-faint); font-family: "Fragment Mono", monospace; font-size: 10.5px; font-weight: 400; letter-spacing: .04em; text-transform: uppercase; }
.open-arrow { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 7px; color: var(--text-faint); font-size: 11px; transition: color .15s, border-color .15s, transform .15s; }
.service-card:hover .open-arrow { transform: translate(1px, -1px); color: var(--accent-strong); border-color: var(--border-strong); }
.service-card.large .service-symbol { width: 52px; height: 52px; border-radius: 13px; }
.service-card.large .service-symbol svg { width: 26px; height: 26px; }
.service-card.large .card-top { gap: 14px; justify-content: flex-start; }
.service-card.large .name-group { flex: 1 1 auto; min-width: 0; }
.service-card.large h3 { font-size: 27px; margin: 0; letter-spacing: -.02em; }
.service-card.large p { white-space: normal; font-size: 13px; line-height: 1.5; margin-top: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.service-card.large .card-bottom { padding-top: 18px; }
.skeleton { height: 128px; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(100deg, var(--surface) 25%, var(--surface-strong) 40%, var(--surface) 55%); background-size: 300% 100%; animation: shimmer 1.5s infinite; }
.empty-state { padding: 80px 20px; text-align: center; }
.empty-state span { display: block; color: var(--text-faint); font-size: 40px; }
.empty-state h3 { margin: 10px 0 7px; font-family: "Host Grotesk", "DM Sans", sans-serif; font-size: 18px; font-weight: 600; }
.empty-state p { margin: 0; color: var(--text-muted); }
.empty-state button { margin-top: 18px; padding: 9px 14px; border: 1px solid var(--border); border-radius: 9px; color: var(--text); background: var(--surface); cursor: pointer; transition: background .15s, border-color .15s; }
.empty-state button:hover { background: var(--surface-strong); border-color: var(--border-strong); }

footer { max-width: 1160px; margin: 0 auto; padding: 24px 24px 44px; display: flex; justify-content: space-between; border-top: 1px solid var(--border); color: var(--text-faint); font-size: 12px; }
footer span { display: flex; align-items: center; gap: 8px; }
footer i { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .12); }
footer p { margin: 0; }

dialog { width: min(440px, calc(100vw - 28px)); padding: 26px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 20px; color: var(--text); background: linear-gradient(170deg, rgba(30, 33, 44, .88), rgba(17, 19, 26, .92)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 -1px 0 rgba(255, 255, 255, .04), 0 36px 90px rgba(0, 0, 0, .55); backdrop-filter: blur(34px) saturate(1.6); }
dialog::backdrop { background: rgba(0, 0, 0, .5); backdrop-filter: blur(6px); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; }
.dialog-head > div { display: grid; grid-template-columns: auto 1fr; column-gap: 13px; }
.dialog-mark { grid-row: 1 / 3; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 11px; color: var(--text); background: var(--surface); font-size: 12px; font-weight: 650; }
.dialog-head h2 { margin: 0; font-family: "Host Grotesk", "DM Sans", sans-serif; font-size: 19px; font-weight: 600; }
.dialog-head p { margin: 5px 0 0; color: var(--text-muted); font-size: 13px; }
.close-button { width: 32px; height: 32px; border: 0; font-size: 22px; line-height: 1; color: var(--text-faint); cursor: pointer; }
.auth-tabs { margin: 26px 0 20px; padding: 4px; display: grid; grid-template-columns: 1fr 1fr; border-radius: 11px; background: var(--surface); }
.auth-tabs button { height: 37px; border: 0; border-radius: 8px; color: var(--text-muted); background: transparent; font-size: 13px; font-weight: 550; cursor: pointer; }
.auth-tabs button.active { color: var(--text); background: var(--solid); box-shadow: var(--shadow-sm); }
form label { margin-top: 15px; display: block; color: var(--text-muted); font-size: 12px; font-weight: 550; }
form input { width: 100%; height: 44px; margin-top: 7px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; outline: 0; color: var(--text); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
form small { display: block; margin: 6px 0 0; color: var(--text-faint); font-weight: 400; }
.form-error { min-height: 18px; margin: 10px 0 -2px; color: #f87171; font-size: 12px; }
.primary-button, .secondary-button { width: 100%; height: 44px; border: 0; border-radius: 10px; font-weight: 600; cursor: pointer; transition: background .15s, transform .05s, opacity .15s; }
.primary-button { color: var(--accent-ink); background: var(--accent); }
.primary-button:hover { background: var(--accent-strong); }
.primary-button:active { transform: scale(.99); }
.primary-button:disabled { opacity: .5; cursor: wait; }
.secondary-button { border: 1px solid var(--border); color: var(--text); background: transparent; }
.secondary-button:hover { background: var(--surface); }
.guest-note { margin: 18px 4px 0; color: var(--text-faint); font-size: 11px; line-height: 1.5; text-align: center; }
.credential-list { margin: 24px 0 16px; overflow: hidden; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); }
.credential-list > div { min-height: 48px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; }
.credential-list > div + div { border-top: 1px solid var(--border); }
.credential-list span { color: var(--text-muted); font-size: 13px; }
.credential-list strong { font-family: "Fragment Mono", monospace; font-size: 13.5px; letter-spacing: .03em; }
.guest-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.account-summary { margin: 24px 0 16px; padding: 14px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--border); border-radius: 11px; color: var(--text-muted); background: var(--surface); font-size: 12px; line-height: 1.4; }
.status-pill { margin-left: auto; padding: 4px 9px; border-radius: 999px; color: #22c55e; background: rgba(34, 197, 94, .1); font-weight: 600; }
.toast { position: fixed; z-index: 60; left: 50%; bottom: 28px; padding: 11px 16px; transform: translate(-50%, 16px); border: 1px solid var(--border); border-radius: 11px; opacity: 0; color: var(--text); background: var(--solid); box-shadow: var(--shadow-md); font-size: 13px; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@keyframes card-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes orb-a { from { transform: translate(0, 0) scale(1); } to { transform: translate(8vw, 6vh) scale(1.18); } }
@keyframes orb-b { from { transform: translate(0, 0) scale(1); } to { transform: translate(-7vw, 9vh) scale(1.14); } }
@keyframes orb-c { from { transform: translate(0, 0) scale(1); } to { transform: translate(5vw, -7vh) scale(1.2); } }

@media (max-width: 1000px) {
  .service-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { top: 8px; width: calc(100% - 20px); height: 54px; }
}

@media (max-width: 600px) {
  .topbar { top: 8px; height: 52px; padding: 0 6px 0 10px; gap: 6px; }
  .brand { gap: 8px; }
  .brand-copy small { display: none; }
  .brand-copy strong { display: none; }
  .brand-mark { width: 30px; height: 30px; padding: 6px; }
  .top-actions { gap: 6px; }
  .filter-button { height: 34px; padding: 0 9px; gap: 6px; border-radius: 9px; }
  .filter-button > svg:first-child { width: 14px; }
  #filter-label { display: none; }
  .filter-chevron { width: 12px; }
  .icon-button { width: 34px; height: 34px; border-radius: 9px; }
  .account-button { height: 34px; padding: 3px; gap: 0; border-radius: 9px; }
  #account-label { display: none; }
  .account-avatar { width: 28px; height: 28px; font-size: 12px; border-radius: 8px; }
  main { padding: 0 16px 56px; }
  .directory { padding-top: 20px; }
  .service-grid { grid-template-columns: 1fr; gap: 8px; }
  .service-grid.favorites-layout { grid-template-columns: 1fr; gap: 8px; }
  .service-card { min-height: 0; padding: 11px; }
  .service-card.large { min-height: 0; padding: 12px; }
  .service-card.large .service-symbol { width: 38px; height: 38px; }
  .service-card.large .service-symbol svg { width: 18px; height: 18px; }
  .service-card.large .card-top { gap: 10px; }
  .service-card.large h3 { font-size: 20px; margin: 0; }
  .service-card.large p { font-size: 11.5px; line-height: 1.4; margin-top: 10px; }
  .service-card .card-bottom { padding-top: 8px; }
  .guest-actions { grid-template-columns: 1fr; }
  footer { padding: 22px 16px 34px; display: block; }
  footer p { margin-top: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
