/* Server-rendered Pokédex pages. Colors come from the shared tokens, so these pages follow the
   theme and color palette chosen in the app (head.js applies them before first paint). */
@import url("tokens.css");
* { box-sizing: border-box; }
body { margin: 0; background: var(--hero-glow) no-repeat, var(--bg); color: var(--ink); font: 15px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-underline-offset: .18em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.page-header, main, .page-footer { max-width: 1100px; margin: 0 auto; padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); }

/* Masthead: the same band as the app header, with Ho-Oh's crimson, gold and emerald as a horizon line under it. */
.page-masthead { padding-bottom: var(--stripe-height); background: var(--brand-stripe) bottom / 100% var(--stripe-height) no-repeat, var(--header-bg); }
.page-masthead :focus-visible { outline-color: var(--header-focus); }
.page-header { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: center; justify-content: space-between; min-height: 3.5rem; padding-block: .625rem; }
.page-header a { color: var(--header-ink-muted); font-weight: 500; text-decoration: none; }
.page-header a:hover { color: var(--header-ink); text-decoration: underline; }
.page-header .brand { color: var(--header-ink); font-size: 1.0625rem; font-weight: 700; letter-spacing: -.015em; text-decoration: none; }
.brand-accent { color: var(--header-accent); background: var(--wordmark); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
@media (forced-colors: active) { .brand-accent { background: none; -webkit-text-fill-color: currentColor; } }
.page-header nav { display: flex; gap: 1.25rem; font-size: .875rem; }

main { padding-block: 1.75rem 2.5rem; }
main p { color: var(--ink-muted); }
h1 { margin: 0 0 .5rem; font-size: 1.625rem; line-height: 1.25; letter-spacing: -.02em; }
h2 { margin: 1.75rem 0 .625rem; font-size: .8125rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
h2::before { content: ''; display: inline-block; width: 1.25rem; height: 3px; margin-right: .5rem; border-radius: 2px; background: var(--brand-stripe); vertical-align: .2em; }
.sprite { display: block; margin: .5rem 0 1rem; max-width: 100%; height: auto; }

/* Tables: a card on the page, parchment header row and zebra rows in light, flat rows in dark. */
.table-wrap { overflow-x: auto; border: 1px solid var(--card-border); border-radius: var(--radius-lg); background: var(--panel); box-shadow: var(--card-shadow); }
.stat-table { max-width: 22rem; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: .9rem; }
th, td { padding: .5rem .75rem; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
thead th { border-bottom-color: var(--table-head-line); background: var(--table-head-bg); color: var(--table-head-ink); font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
tbody th { font-weight: 600; }
tbody tr:nth-child(even) > * { background: var(--table-stripe); }
tbody tr:hover > * { background: var(--row-hover); }
tbody tr:last-child > * { border-bottom: 0; }
.stat-total > * { border-top: 1px solid var(--line-strong); font-weight: 700; }
td:not(:first-child), th[scope="col"]:not(:first-child) { text-align: right; }
/* The list's Types column is text, so it stays left-aligned beside the name. */
.table-wrap:not(.stat-table) :is(th[scope="col"]:nth-child(2), tbody th + td) { text-align: left; }

.page-footer { padding-block: 1.5rem 2.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
