/* /guides hub: a main PvZH Vault page (same chrome and type as the home app). */

:root {
  color-scheme: dark;
  --bg: #12181b;
  --surface: #1b2226;
  --surface-2: #20282d;
  --surface-3: #283238;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #ffffff;
  --body: #d3dadf;
  --muted: #a0aab2;
  --dim: #828e96;
  --accent: #00b4d8;
  --sans: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --wrap: 1180px;
  --r: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body.gh-main { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.5 var(--sans); }
.gh-main img { max-width: 100%; }
.gh-main a { color: var(--accent); }
.gh-main :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.gh-main [hidden] { display: none !important; }
.gh-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gh-skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: #04161c; padding: 8px 12px; border-radius: 8px; font-weight: 700; text-decoration: none; }
.gh-skip:focus { top: 10px; }

/* ---------- Main-page chrome (matches the home app) ---------- */

.gh-topbar { border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.gh-topbar-inner { max-width: var(--wrap); margin: 0 auto; padding: 10px 24px; min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 6px 20px; }
.gh-updated { font-size: 14px; color: var(--muted); }
.gh-updated a { color: var(--text); font-weight: 600; text-decoration: none; }
.gh-back { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; color: var(--accent) !important; font-weight: 600; font-size: 15px; text-decoration: none; border-radius: 8px; }
.gh-back:hover { background: rgba(0, 180, 216, 0.08); }
.gh-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.gh-brand { max-width: var(--wrap); margin: 0 auto; padding: 28px 24px 8px; text-align: center; }
.gh-brand-row { display: inline-flex; align-items: center; gap: 18px; }
.gh-brand img { width: 72px; height: 72px; }
.gh-brand span { font-size: 76px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.gh-title { text-align: center; margin: 18px 0 0; }
.gh-title h1 { margin: 0; font-size: 32px; font-weight: 700; line-height: 1.2; color: var(--accent); }
.gh-effect {
  background: linear-gradient(to right, #00d2ff, #4a90e2, #00d2ff); background-size: 200% auto;
  color: transparent; -webkit-background-clip: text; background-clip: text; font-weight: 800;
}
.gh-effect:hover { animation: gh-shimmer 2.5s linear infinite; }
@keyframes gh-shimmer { to { background-position: 200% center; } }
.gh-title p { margin: 5px 0 0; font-size: 16.8px; color: var(--muted); }

.gh-footer { margin-top: 32px; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.gh-footer-inner { max-width: var(--wrap); margin: 0 auto; padding: 26px 24px 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 32px; color: var(--dim); font-size: 13.5px; }
.gh-footer-inner p { margin: 0; }
.gh-footer-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.gh-footer-contact span { display: inline-flex; align-items: center; gap: 6px; }
.gh-footer-contact img { width: 16px; height: 16px; border-radius: 3px; }
.gh-footer-contact strong { color: var(--accent); font-weight: 600; }

/* ---------- Search + section jump ---------- */

main { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.gh-search { position: relative; max-width: 520px; margin: 22px auto 0; }
.gh-search input {
  width: 100%; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 12px 14px 12px 42px; color: var(--text); font: 16px var(--sans);
}
.gh-search input::placeholder { color: var(--dim); }
.gh-search input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.gh-search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--dim); pointer-events: none; }
.gh-jump { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 14px 0 6px; }
.gh-jump a {
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted) !important;
  font-size: 14px; font-weight: 600; text-decoration: none; background: rgba(255, 255, 255, 0.03);
}
.gh-jump a:hover { color: var(--text) !important; border-color: rgba(255, 255, 255, 0.25); }
.gh-empty { text-align: center; color: var(--muted); margin: 30px 0; }

/* ---------- Sections ---------- */

.gh-section { margin: 40px 0 0; scroll-margin-top: 16px; }
.gh-section-head { margin: 0 0 14px; }
.gh-section-head h2 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -0.01em; }
.gh-section-head p { margin: 4px 0 0; color: var(--muted); font-size: 15px; max-width: 70ch; }
.gh-sub { margin: 18px 0 10px; font-size: 15px; font-weight: 700; color: var(--body); }
.gh-sub:first-child { margin-top: 0; }

.gh-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.gh-grid-big { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

.gh-tile {
  display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; align-items: center;
  padding: 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line);
  color: var(--text) !important; text-decoration: none; transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.gh-tile:hover { border-color: var(--line-2); background: var(--surface-2); transform: translateY(-1px); }
.gh-tile-media { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 10px; background: rgba(255, 255, 255, 0.04); }
.gh-tile-media img { width: 52px; height: 52px; object-fit: contain; }
.gh-ico { width: 24px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gh-tile-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gh-tile-text strong { font-size: 15.5px; font-weight: 700; line-height: 1.3; }
.gh-tile-text small { font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.gh-tile-text em { font-style: normal; font-size: 12.5px; color: var(--dim); }
.gh-tile.is-big { grid-template-columns: 64px minmax(0, 1fr); padding: 16px; }
.gh-tile.is-big .gh-tile-media, .gh-tile.is-big .gh-tile-media img { width: 64px; height: 64px; }
.gh-tile.is-big .gh-tile-text strong { font-size: 17px; }

/* Heroes */
.gh-heroes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.gh-hero {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text) !important; text-decoration: none; font-weight: 600; font-size: 14.5px;
}
.gh-hero:hover { border-color: var(--line-2); background: var(--surface-2); }
.gh-hero img { width: 40px; height: 40px; object-fit: contain; flex: none; }

/* Card guides */
#cards { display: block; }
#cards .gh-side + .gh-side { margin-top: 26px; }
.gh-class { margin: 0 0 14px; }
.gh-class h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--body); }
.gh-class h3 i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.gh-class h3 small { color: var(--dim); font-weight: 600; }
.gh-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 6px; }
.gh-card {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 8px; align-items: center;
  padding: 5px 8px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line);
  color: var(--text) !important; text-decoration: none; font-size: 14px; font-weight: 600;
}
.gh-card:hover { border-color: var(--line-2); background: var(--surface-2); }
.gh-card img { width: 34px; height: 34px; object-fit: contain; }
.gh-card span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Class tier grades: same colors as deck grades */
.cg { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(14, 18, 21, 0.72); font-weight: 800; font-size: 12px; line-height: 1; }
.cg-s { color: #00E5FF; } .cg-a { color: #4CAF50; } .cg-b { color: #8BC34A; } .cg-c { color: #ffb300; } .cg-d { color: #ff8800; } .cg-f { color: #ff4b4b; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .gh-grid, .gh-grid-big { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .gh-topbar-inner { flex-direction: column; justify-content: center; padding: 8px 10px; gap: 2px; }
  .gh-updated { font-size: 12.5px; }
  .gh-back { font-size: 14px; height: 36px; }
  .gh-brand { padding: 22px 10px 4px; }
  .gh-brand-row { gap: 10px; }
  .gh-brand img { width: 42px; height: 42px; }
  .gh-brand span { font-size: 39px; }
  .gh-title { margin-top: 10px; }
  .gh-title h1 { font-size: 30px; }
  .gh-title p { font-size: 15.5px; }
  main { padding: 0 14px; }
  .gh-grid, .gh-grid-big { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .gh-tile.is-big { grid-template-columns: 52px minmax(0, 1fr); padding: 14px; }
  .gh-tile.is-big .gh-tile-media, .gh-tile.is-big .gh-tile-media img { width: 52px; height: 52px; }
  .gh-heroes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gh-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gh-card { grid-template-columns: 28px minmax(0, 1fr) auto; font-size: 13px; padding: 5px 6px; }
  .gh-card img { width: 28px; height: 28px; }
  .gh-section { margin-top: 32px; }
  .gh-footer-inner { flex-direction: column; align-items: flex-start; padding: 22px 14px 32px; font-size: 13px; }
}
