:root {
  --navy:       #0c1b33;
  --navy-light: #1a3a6b;
  --blue:       #1d4ed8;
  --blue-soft:  #2563eb;
  --blue-pale:  #eff6ff;
  --blue-line:  #bfdbfe;
  --bg:         #f1f5f9;
  --surface:    #ffffff;
  --border:     #e2e8f0;
  --text:       #0f172a;
  --muted:      #475569;
  --light:      #94a3b8;
  --shadow-md:  0 4px 16px rgba(12,27,51,.10);
  --radius:     14px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--text);
  min-height: 100vh; display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
[hidden] { display: none !important; }
.search input::-webkit-search-cancel-button { filter: invert(1) brightness(1.6); cursor: pointer; }

/* ── HEADER ─────────────────────────────── */
.header {
  position: sticky; top: 0; z-index: 100;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 2px 16px rgba(0,0,0,.25);
}
.header__inner {
  width: min(1160px, calc(100vw - 32px)); margin: 0 auto;
  display: flex; align-items: center; gap: 16px; padding: 14px 0 12px; flex-wrap: wrap;
}
.header__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.header__badge {
  width: 36px; height: 36px; border-radius: 10px; flex: 0 0 auto;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
  display: grid; place-items: center; color: #fff;
}
.header__badge svg { width: 18px; height: 18px; }
.header__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.header__title { font-size: 17px; font-weight: 800; color: #fff; letter-spacing: .3px; }
.header__sub   { font-size: 12px; color: rgba(255,255,255,.55); letter-spacing: .4px; text-transform: uppercase; font-weight: 500; }

.search {
  margin-left: auto; position: relative; flex: 0 1 280px; min-width: 180px;
}
.search input {
  width: 100%; border: 1px solid rgba(255,255,255,.18); border-radius: 10px;
  background: rgba(255,255,255,.08); color: #fff; font: inherit; font-size: 13.5px;
  padding: 9px 34px 9px 34px; outline: none; transition: background .15s, border-color .15s;
}
.search input::placeholder { color: rgba(255,255,255,.5); }
.search input:focus { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.35); }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: rgba(255,255,255,.55); }
.search kbd {
  position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
  font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: rgba(255,255,255,.55);
  border: 1px solid rgba(255,255,255,.25); border-radius: 5px; padding: 3px 5px;
}

.nav {
  width: min(1160px, calc(100vw - 32px)); margin: 0 auto;
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  flex: 0 0 auto; padding: 9px 14px 11px; font-size: 13px; font-weight: 700; letter-spacing: .2px;
  color: rgba(255,255,255,.62); text-decoration: none; border-bottom: 2px solid transparent;
  transition: color .12s, border-color .12s;
}
.nav a:hover { color: #fff; }
.nav a[aria-current="page"] { color: #fff; border-bottom-color: #60a5fa; }

/* ── LAYOUT ─────────────────────────────── */
.main {
  width: min(1160px, calc(100vw - 32px)); margin: 0 auto; flex: 1;
  padding: 28px 0 40px; display: flex; flex-direction: column; gap: 20px;
}

/* ── SECTION CARD ───────────────────────── */
.section-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-md); overflow: hidden;
}
.section-head {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px 16px; border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fafcff 0%, var(--surface) 100%);
}
.section-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--blue-pale); border: 1px solid var(--blue-line);
  display: grid; place-items: center; flex: 0 0 auto; color: var(--blue-soft);
}
.section-icon svg { width: 18px; height: 18px; }
.section-label { flex: 1; min-width: 0; }
.section-label h2 { font-size: 15px; font-weight: 800; letter-spacing: .2px; }
.section-label p  { font-size: 12.5px; color: var(--muted); }
.section-count {
  font-size: 11.5px; font-weight: 700; color: var(--muted); background: var(--bg);
  border: 1px solid var(--border); border-radius: 999px; padding: 3px 9px;
}

/* ── TILE GRID ──────────────────────────── */
.tile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); }
@media (max-width: 860px) { .tile-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tile-grid { grid-template-columns: 1fr; } }

.tile {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; background: var(--surface); text-decoration: none;
  transition: background .12s ease; position: relative; min-width: 0;
}
.tile::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--blue-soft); border-radius: 0 2px 2px 0;
  opacity: 0; transition: opacity .12s ease;
}
.tile:hover { background: #f8faff; }
.tile:hover::after, .tile:focus-visible::after { opacity: 1; }
.tile:active { background: var(--blue-pale); }
.tile:focus-visible { outline: 2px solid var(--blue-soft); outline-offset: -2px; }

.tile-icon {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 10px;
  background: linear-gradient(145deg, #1e3a8a, #1d4ed8);
  display: grid; place-items: center; overflow: hidden;
  box-shadow: 0 2px 8px rgba(29,78,216,.25);
}
.tile-icon img { width: 28px; height: 28px; object-fit: contain; background: #fff; border-radius: 6px; padding: 3px; }
.tile-icon span { font-size: 12.5px; font-weight: 900; color: #fff; letter-spacing: .3px; }

.tile-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tile-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .1px; }
.tile-desc { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tile-arrow {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--border); display: grid; place-items: center;
  color: var(--light); transition: border-color .12s, color .12s;
}
.tile:hover .tile-arrow { border-color: var(--blue-line); color: var(--blue-soft); }
.tile-arrow svg { width: 14px; height: 14px; }

.empty, .notice {
  padding: 32px 20px; text-align: center; color: var(--light);
  font-size: 13px; background: var(--surface); grid-column: 1 / -1;
}
.notice { border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-md); color: var(--muted); }
.notice strong { display: block; color: var(--text); font-size: 15px; margin-bottom: 6px; }
.notice a { color: var(--blue-soft); font-weight: 700; }

/* skeleton */
.skel .tile-icon, .skel .tile-name, .skel .tile-desc { background: #eef2f7; box-shadow: none; color: transparent; border-radius: 6px; }
.skel .tile-name { width: 60%; height: 12px; } .skel .tile-desc { width: 80%; height: 10px; }
.skel { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }

/* ── FOOTER ─────────────────────────────── */
.footer {
  text-align: center; padding: 24px 16px 28px;
  color: var(--light); font-size: 11.5px; line-height: 1.6;
  max-width: 640px; margin: 0 auto;
}
.footer a { color: var(--light); }

@media (max-width: 560px) {
  .header__title { font-size: 15px; }
  .search { flex: 1 1 100%; margin-left: 0; }
  .search kbd { display: none; }
}
