/* Same neutral palette as the other hubs; the app colours are the only
   saturated hues, so the icons are what the eye lands on. Dark mode follows
   the OS setting, like WalletHub and TokenHub. */
:root {
  --bg: #f6f7f9;
  --bg-glow: #e8edf5;
  --surface: #ffffff;
  --text: #1c2230;
  --muted: #5f6878;
  --border: #e3e6ec;
  --hover: #eef1f6;
  --brand: #1f3a5f;
  --focus: #2f6fd6;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 12px rgba(16, 24, 40, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f131a;
    --bg-glow: #18212f;
    --surface: #171c25;
    --text: #e8ebf1;
    --muted: #9aa3b2;
    --border: #262d3a;
    --hover: #1f2631;
    --brand: #8fb3e3;
    --focus: #7aa7ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 16px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f131a; --bg-glow: #18212f; --surface: #171c25; --text: #e8ebf1;
  --muted: #9aa3b2; --border: #262d3a; --hover: #1f2631; --brand: #8fb3e3;
  --focus: #7aa7ff; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(1200px 500px at 50% -150px, var(--bg-glow), transparent 70%), var(--bg);
  background-color: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 8px; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip-link:focus { left: 16px; }

/* Top bar */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; max-width: 1080px; margin: 0 auto; padding: 20px 24px 0;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { border-radius: 9px; display: block; }
.brand-name { font-weight: 650; letter-spacing: -.01em; line-height: 1.15; }
.brand-sub { font-size: 12.5px; color: var(--muted); line-height: 1.15; }
.clock { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }

main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px 48px; }
main:focus { outline: none; }

/* Hero + search */
.hero { text-align: center; padding: 48px 0 36px; }
.hero h1 { margin: 0; font-size: clamp(28px, 4.5vw, 40px); font-weight: 700; letter-spacing: -.025em; }
.lead { margin: 6px 0 24px; color: var(--muted); font-size: 16px; }
.search {
  position: relative; max-width: 520px; margin: 0 auto;
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 0 14px; box-shadow: var(--shadow); color: var(--muted);
}
.search:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 20%, transparent), var(--shadow); }
.search input {
  flex: 1; min-width: 0; height: 48px; border: 0; outline: 0; background: transparent;
  color: var(--text); font: inherit; font-size: 16px;
}
.search input::placeholder { color: var(--muted); opacity: .85; }
.search input::-webkit-search-cancel-button { display: none; }
.hint {
  font: 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted);
  border: 1px solid var(--border); border-radius: 6px; padding: 4px 7px;
}
.search:focus-within .hint { visibility: hidden; }

/* App groups */
.group { margin-top: 36px; }
.group-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 0 4px 14px; }
.group-head h2 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.group-head p { margin: 0; font-size: 13px; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }

/* Launchpad-style tile: big rounded icon, name, one line on what it's for */
.tile {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
  padding: 18px 10px 16px; border-radius: 18px; text-decoration: none;
  transition: background-color .15s ease;
}
.tile:hover { background: var(--hover); }
.icon {
  --tile: #64748b;
  display: grid; place-items: center; flex: none;
  width: 72px; height: 72px; border-radius: 22.5%;
  color: #fff;
  background: linear-gradient(160deg, color-mix(in srgb, var(--tile) 78%, #fff) 0%, var(--tile) 55%, color-mix(in srgb, var(--tile) 85%, #000) 100%);
  box-shadow: 0 1px 1px rgba(0, 0, 0, .08), 0 6px 14px color-mix(in srgb, var(--tile) 30%, transparent), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .18s cubic-bezier(.2, .8, .3, 1.4);
}
.tile:hover .icon, .tile:focus-visible .icon { transform: translateY(-3px) scale(1.04); }
.tile:active .icon { transform: scale(.96); }
.tile-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile-name { font-weight: 600; font-size: 14.5px; }
.tile-about { font-size: 12.5px; line-height: 1.35; color: var(--muted); }

.empty { text-align: center; color: var(--muted); margin: 40px 0; }

/* Tool guide */
.guide {
  margin-top: 56px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 24px; box-shadow: var(--shadow);
}
.guide-head h2 { margin: 0; font-size: 17px; font-weight: 650; }
.guide-head p { margin: 4px 0 16px; font-size: 13.5px; color: var(--muted); }
.guide-head a { color: var(--brand); }
.guide-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); column-gap: 32px;
}
.guide-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-top: 1px solid var(--border);
}
.need { font-size: 14px; }
.guide-app {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  font-weight: 600; font-size: 13.5px; text-decoration: none;
  padding: 4px 10px 4px 4px; border-radius: 999px;
}
.guide-app:hover { background: var(--hover); }
.icon.mini { width: 24px; height: 24px; border-radius: 7px; box-shadow: none; }

.foot {
  width: 100%; max-width: 1080px; margin: 0 auto; padding: 20px 24px 32px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  font-size: 12.5px; color: var(--muted);
}

@media (max-width: 560px) {
  .top { padding: 16px 16px 0; }
  .clock { display: none; }
  main { padding: 0 16px 40px; }
  .hero { padding: 32px 0 24px; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .tile { padding: 12px 4px; gap: 8px; }
  .tile .icon { width: 60px; height: 60px; }
  .tile .icon svg { width: 28px; height: 28px; }
  .tile-about { display: none; }
  .tile-name { font-size: 13px; }
  .guide { padding: 18px 16px; }
  .guide-list { grid-template-columns: 1fr; }
  .foot { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .icon, .tile { transition: none; }
}
